소스 검색

Add config + identity to {GroupChat,Connection}PrefsRequestedEvent

pull/544/head
Greg Holmes 9 년 전
부모
커밋
74c4d9f4f9

+ 2
- 2
src/com/dmdirc/config/prefs/PreferencesManager.java 파일 보기

@@ -123,7 +123,7 @@ public class PreferencesManager {
123 123
                 "Reconnect message", "Default quit message to use when reconnecting",
124 124
                 manager, identity));
125 125
 
126
-        eventBus.publish(new ConnectionPrefsRequestedEvent(category));
126
+        eventBus.publish(new ConnectionPrefsRequestedEvent(category, manager, identity));
127 127
 
128 128
         return category;
129 129
     }
@@ -226,7 +226,7 @@ public class PreferencesManager {
226 226
                 "Number of items of input history to keep",
227 227
                 manager, identity));
228 228
 
229
-        eventBus.publish(new GroupChatPrefsRequestedEvent(category));
229
+        eventBus.publish(new GroupChatPrefsRequestedEvent(category, manager, identity));
230 230
 
231 231
         return category;
232 232
     }

+ 16
- 1
src/com/dmdirc/events/ConnectionPrefsRequestedEvent.java 파일 보기

@@ -23,6 +23,8 @@
23 23
 package com.dmdirc.events;
24 24
 
25 25
 import com.dmdirc.config.prefs.PreferencesCategory;
26
+import com.dmdirc.interfaces.config.AggregateConfigProvider;
27
+import com.dmdirc.interfaces.config.ConfigProvider;
26 28
 
27 29
 /**
28 30
  * Raised when the connection preferences are requested.
@@ -30,13 +32,26 @@ import com.dmdirc.config.prefs.PreferencesCategory;
30 32
 public class ConnectionPrefsRequestedEvent extends PreferencesEvent {
31 33
 
32 34
     private final PreferencesCategory category;
35
+    private final AggregateConfigProvider config;
36
+    private final ConfigProvider identity;
33 37
 
34
-    public ConnectionPrefsRequestedEvent(final PreferencesCategory category) {
38
+    public ConnectionPrefsRequestedEvent(final PreferencesCategory category,
39
+            final AggregateConfigProvider config, final ConfigProvider identity) {
35 40
         this.category = category;
41
+        this.config = config;
42
+        this.identity = identity;
36 43
     }
37 44
 
38 45
     public PreferencesCategory getCategory() {
39 46
         return category;
40 47
     }
41 48
 
49
+    public ConfigProvider getIdentity() {
50
+        return identity;
51
+    }
52
+
53
+    public AggregateConfigProvider getConfig() {
54
+        return config;
55
+    }
56
+
42 57
 }

+ 15
- 1
src/com/dmdirc/events/GroupChatPrefsRequestedEvent.java 파일 보기

@@ -23,6 +23,8 @@
23 23
 package com.dmdirc.events;
24 24
 
25 25
 import com.dmdirc.config.prefs.PreferencesCategory;
26
+import com.dmdirc.interfaces.config.AggregateConfigProvider;
27
+import com.dmdirc.interfaces.config.ConfigProvider;
26 28
 
27 29
 /**
28 30
  * Raised when the group chat preferences are requested.
@@ -30,13 +32,25 @@ import com.dmdirc.config.prefs.PreferencesCategory;
30 32
 public class GroupChatPrefsRequestedEvent extends PreferencesEvent {
31 33
 
32 34
     private final PreferencesCategory category;
35
+    private final AggregateConfigProvider config;
36
+    private final ConfigProvider identity;
33 37
 
34
-    public GroupChatPrefsRequestedEvent(final PreferencesCategory category) {
38
+    public GroupChatPrefsRequestedEvent(final PreferencesCategory category,
39
+            final AggregateConfigProvider config, final ConfigProvider identity) {
35 40
         this.category = category;
41
+        this.config = config;
42
+        this.identity = identity;
36 43
     }
37 44
 
38 45
     public PreferencesCategory getCategory() {
39 46
         return category;
40 47
     }
41 48
 
49
+    public ConfigProvider getIdentity() {
50
+        return identity;
51
+    }
52
+
53
+    public AggregateConfigProvider getConfig() {
54
+        return config;
55
+    }
42 56
 }

Loading…
취소
저장