to strings and added print config

This commit is contained in:
aj 2019-05-13 07:56:11 +01:00
parent 0371080b00
commit 7a6b9e34c3
4 changed files with 16 additions and 1 deletions

View File

@ -65,7 +65,7 @@ public class Config {
String string = "config:";
for(ConfigVariable i: variables) {
string += " " + i.getKey() + " " + i.getValue();
string += " " + i.toString();
}
return string;

View File

@ -63,4 +63,13 @@ public class ConfigVariable {
return listeners;
}
@Override
public String toString() {
String string = getKey() + ": " + getValue();
if(isTemporary())
string += " (temp)";
return string;
}
}

View File

@ -357,6 +357,11 @@ public class RootController {
}
@FXML
protected void handlePrintConfig(ActionEvent event) {
System.out.println(FmFramework.getSessionConfig());
}
@FXML
protected void handleScrobble(ActionEvent event) throws IOException {
// Album album = sarsoo.fmframework.jframe.Getter.getAlbum();

View File

@ -36,6 +36,7 @@
<MenuItem fx:id="menuItemScrobble" mnemonicParsing="false" onAction="#handleScrobble" text="scrobble" />
<MenuItem fx:id="menuItemOpenConsole" mnemonicParsing="false" onAction="#handleOpenConsole" text="open console" />
<MenuItem mnemonicParsing="false" onAction="#handleChangeUsername" text="set username" />
<MenuItem fx:id="menuItemPrintConfig" mnemonicParsing="false" onAction="#handlePrintConfig" text="print config" />
</items>
</Menu>
</menus>