|
@@ -25,7 +25,7 @@ package com.dmdirc.config.prefs;
|
25
|
25
|
import com.dmdirc.actions.ActionManager;
|
26
|
26
|
import com.dmdirc.actions.CoreActionType;
|
27
|
27
|
import com.dmdirc.config.ConfigManager;
|
28
|
|
-import com.dmdirc.config.Identity;
|
|
28
|
+import com.dmdirc.interfaces.config.ConfigProvider;
|
29
|
29
|
import com.dmdirc.plugins.PluginManager;
|
30
|
30
|
import com.dmdirc.plugins.Service;
|
31
|
31
|
import com.dmdirc.util.collections.ListenerList;
|
|
@@ -46,8 +46,7 @@ import lombok.Getter;
|
46
|
46
|
public class PreferencesDialogModel {
|
47
|
47
|
|
48
|
48
|
/** A list of categories. */
|
49
|
|
- private final List<PreferencesCategory> categories
|
50
|
|
- = new ArrayList<PreferencesCategory>();
|
|
49
|
+ private final List<PreferencesCategory> categories = new ArrayList<>();
|
51
|
50
|
/** A list of listeners. */
|
52
|
51
|
private final ListenerList listeners = new ListenerList();
|
53
|
52
|
/** UI specific plugin panel. */
|
|
@@ -63,7 +62,7 @@ public class PreferencesDialogModel {
|
63
|
62
|
private final ConfigManager configManager;
|
64
|
63
|
/** Identity to write settings to. */
|
65
|
64
|
@Getter
|
66
|
|
- private final Identity identity;
|
|
65
|
+ private final ConfigProvider identity;
|
67
|
66
|
/** Plugin manager. */
|
68
|
67
|
private final PluginManager pluginManager;
|
69
|
68
|
/** Action Manager. */
|
|
@@ -86,7 +85,7 @@ public class PreferencesDialogModel {
|
86
|
85
|
final PreferencesInterface updatesPanel,
|
87
|
86
|
final PreferencesInterface urlHandlerPanel,
|
88
|
87
|
final ConfigManager configManager,
|
89
|
|
- final Identity identity,
|
|
88
|
+ final ConfigProvider identity,
|
90
|
89
|
final ActionManager actionManager,
|
91
|
90
|
final PluginManager pluginManager) {
|
92
|
91
|
this.pluginPanel = pluginPanel;
|
|
@@ -227,7 +226,7 @@ public class PreferencesDialogModel {
|
227
|
226
|
*/
|
228
|
227
|
private void addTabCompletionCategory(final PreferencesCategory parent) {
|
229
|
228
|
final PreferencesCategory category = new PreferencesCategory("Tab Completion", "");
|
230
|
|
- final Map<String, String> taboptions = new HashMap<String, String>();
|
|
229
|
+ final Map<String, String> taboptions = new HashMap<>();
|
231
|
230
|
|
232
|
231
|
for (Service service : pluginManager.getServicesByType("tabcompletion")) {
|
233
|
232
|
taboptions.put(service.getName(), service.getName());
|
|
@@ -371,11 +370,11 @@ public class PreferencesDialogModel {
|
371
|
370
|
final PreferencesCategory category = new PreferencesCategory("Notifications",
|
372
|
371
|
"", "input-error");
|
373
|
372
|
|
374
|
|
- final Map<String, String> options = new HashMap<String, String>();
|
375
|
|
- final Map<String, String> commonOptions = new HashMap<String, String>();
|
376
|
|
- final Map<String, String> whoisOptions = new HashMap<String, String>();
|
377
|
|
- final Map<String, String> ctcprOptions = new HashMap<String, String>();
|
378
|
|
- final Map<String, String> mapOptions = new HashMap<String, String>();
|
|
373
|
+ final Map<String, String> options = new HashMap<>();
|
|
374
|
+ final Map<String, String> commonOptions = new HashMap<>();
|
|
375
|
+ final Map<String, String> whoisOptions = new HashMap<>();
|
|
376
|
+ final Map<String, String> ctcprOptions = new HashMap<>();
|
|
377
|
+ final Map<String, String> mapOptions = new HashMap<>();
|
379
|
378
|
|
380
|
379
|
options.put("all", "All windows");
|
381
|
380
|
options.put("active", "Active window");
|