to strings and added print config
This commit is contained in:
parent
0371080b00
commit
7a6b9e34c3
@ -65,7 +65,7 @@ public class Config {
|
|||||||
String string = "config:";
|
String string = "config:";
|
||||||
|
|
||||||
for(ConfigVariable i: variables) {
|
for(ConfigVariable i: variables) {
|
||||||
string += " " + i.getKey() + " " + i.getValue();
|
string += " " + i.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
return string;
|
return string;
|
||||||
|
@ -62,5 +62,14 @@ public class ConfigVariable {
|
|||||||
public List<VariableListener> getListeners() {
|
public List<VariableListener> getListeners() {
|
||||||
return listeners;
|
return listeners;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
String string = getKey() + ": " + getValue();
|
||||||
|
if(isTemporary())
|
||||||
|
string += " (temp)";
|
||||||
|
|
||||||
|
return string;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -356,6 +356,11 @@ public class RootController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
protected void handlePrintConfig(ActionEvent event) {
|
||||||
|
System.out.println(FmFramework.getSessionConfig());
|
||||||
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
protected void handleScrobble(ActionEvent event) throws IOException {
|
protected void handleScrobble(ActionEvent event) throws IOException {
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
<MenuItem fx:id="menuItemScrobble" mnemonicParsing="false" onAction="#handleScrobble" text="scrobble" />
|
<MenuItem fx:id="menuItemScrobble" mnemonicParsing="false" onAction="#handleScrobble" text="scrobble" />
|
||||||
<MenuItem fx:id="menuItemOpenConsole" mnemonicParsing="false" onAction="#handleOpenConsole" text="open console" />
|
<MenuItem fx:id="menuItemOpenConsole" mnemonicParsing="false" onAction="#handleOpenConsole" text="open console" />
|
||||||
<MenuItem mnemonicParsing="false" onAction="#handleChangeUsername" text="set username" />
|
<MenuItem mnemonicParsing="false" onAction="#handleChangeUsername" text="set username" />
|
||||||
|
<MenuItem fx:id="menuItemPrintConfig" mnemonicParsing="false" onAction="#handlePrintConfig" text="print config" />
|
||||||
</items>
|
</items>
|
||||||
</Menu>
|
</Menu>
|
||||||
</menus>
|
</menus>
|
||||||
|
Loading…
Reference in New Issue
Block a user