Preferences and Setting hotfix. Few bugs left.
This commit is contained in:
parent
01d5ebd634
commit
9b1aaa9c36
2 changed files with 4 additions and 4 deletions
|
@ -52,7 +52,7 @@ public class AppPreferences {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public int getTitleKeysCount(){
|
public int getTitleKeysCount(){ // TODO: do the same for other multi-keys and single
|
||||||
return preferences.getInt("title_keys_count", 0);
|
return preferences.getInt("title_keys_count", 0);
|
||||||
}
|
}
|
||||||
// Since we don't want to store title keys that are no longer in use, we have to (try to) remove them.
|
// Since we don't want to store title keys that are no longer in use, we have to (try to) remove them.
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class SettingsController implements Initializable {
|
||||||
public void initialize(URL url, ResourceBundle resourceBundle) {
|
public void initialize(URL url, ResourceBundle resourceBundle) {
|
||||||
ListSelectorKAEKAppController.initSelector(32, "key_area_key_application_");
|
ListSelectorKAEKAppController.initSelector(32, "key_area_key_application_");
|
||||||
ListSelectorKAEKOceanController.initSelector(32, "key_area_key_ocean_");
|
ListSelectorKAEKOceanController.initSelector(32, "key_area_key_ocean_");
|
||||||
ListSelectorKAEKSysController.initSelector(32, "key_area_key_sys_");
|
ListSelectorKAEKSysController.initSelector(32, "key_area_key_system_");
|
||||||
ListSelectorTitleKeysController.initSelector(32, null); // 32 required
|
ListSelectorTitleKeysController.initSelector(32, null); // 32 required
|
||||||
|
|
||||||
LinkedHashMap<String, String> preparedPairsMapInit = new LinkedHashMap<>();
|
LinkedHashMap<String, String> preparedPairsMapInit = new LinkedHashMap<>();
|
||||||
|
@ -60,7 +60,7 @@ public class SettingsController implements Initializable {
|
||||||
preparedPairsMapInit.clear();
|
preparedPairsMapInit.clear();
|
||||||
cnt = 0;
|
cnt = 0;
|
||||||
while (!(kaekApp = AppPreferences.getInstance().getSystemKey(cnt)).isEmpty()){
|
while (!(kaekApp = AppPreferences.getInstance().getSystemKey(cnt)).isEmpty()){
|
||||||
preparedPairsMapInit.put("key_area_key_sys_"+String.format("%02d", cnt), kaekApp);
|
preparedPairsMapInit.put("key_area_key_system_"+String.format("%02d", cnt), kaekApp);
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
ListSelectorKAEKSysController.setList(preparedPairsMapInit);
|
ListSelectorKAEKSysController.setList(preparedPairsMapInit);
|
||||||
|
@ -195,7 +195,7 @@ public class SettingsController implements Initializable {
|
||||||
String[] kaekSysKeySet = ListSelectorKAEKSysController.getList();
|
String[] kaekSysKeySet = ListSelectorKAEKSysController.getList();
|
||||||
if (kaekSysKeySet != null){
|
if (kaekSysKeySet != null){
|
||||||
for (int i = 0; i < kaekSysKeySet.length; i++)
|
for (int i = 0; i < kaekSysKeySet.length; i++)
|
||||||
AppPreferences.getInstance().setOceanKey(i, kaekSysKeySet[i].split("\\s=\\s", 2)[1]);
|
AppPreferences.getInstance().setSystemKey(i, kaekSysKeySet[i].split("\\s=\\s", 2)[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] titleKeysSet = ListSelectorTitleKeysController.getList();
|
String[] titleKeysSet = ListSelectorTitleKeysController.getList();
|
||||||
|
|
Loading…
Reference in a new issue