Kaynağa Gözat

Associated changes from core commit

Change-Id: I17790a0e71a6c004a088a6eb51332293b23062a4
Depends-On: Iadcf92d4390034828d005a9c9e92d9a8ba189c99
Reviewed-on: http://gerrit.dmdirc.com/2454
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.7rc1
Greg Holmes 12 yıl önce
ebeveyn
işleme
3971b17a38

+ 1
- 1
src/com/dmdirc/addons/dcc/ChatContainer.java Dosyayı Görüntüle

@@ -57,7 +57,7 @@ public class ChatContainer extends DCCFrameContainer implements DCCChatHandler {
57 57
             final ConfigManager configManager, final String title,
58 58
             final String nick, final String targetNick) {
59 59
         super(title, "dcc-chat-inactive", configManager,
60
-                DCCCommandParser.getDCCCommandParser(),
60
+                DCCCommandParser.getDCCCommandParser(configManager),
61 61
                 Arrays.asList(WindowComponent.TEXTAREA.getIdentifier(),
62 62
                 WindowComponent.INPUTFIELD.getIdentifier()));
63 63
         dccChat = dcc;

+ 7
- 4
src/com/dmdirc/addons/dcc/DCCCommandParser.java Dosyayı Görüntüle

@@ -27,6 +27,7 @@ import com.dmdirc.WritableFrameContainer;
27 27
 import com.dmdirc.commandparser.CommandManager;
28 28
 import com.dmdirc.commandparser.CommandType;
29 29
 import com.dmdirc.commandparser.parsers.GlobalCommandParser;
30
+import com.dmdirc.config.ConfigManager;
30 31
 
31 32
 /**
32 33
  * DCC CommandParser.
@@ -41,9 +42,11 @@ public final class DCCCommandParser extends GlobalCommandParser {
41 42
 
42 43
     /**
43 44
      * Creates a new instance of the GlobalCommandParser.
45
+     *
46
+     * @param configManager Config manager
44 47
      */
45
-    private DCCCommandParser() {
46
-        super();
48
+    private DCCCommandParser(final ConfigManager configManager) {
49
+        super(configManager, CommandManager.getCommandManager());
47 50
     }
48 51
 
49 52
     /**
@@ -51,9 +54,9 @@ public final class DCCCommandParser extends GlobalCommandParser {
51 54
      *
52 55
      * @return The singleton DCCCommandParser
53 56
      */
54
-    public static synchronized DCCCommandParser getDCCCommandParser() {
57
+    public static synchronized DCCCommandParser getDCCCommandParser(final ConfigManager configManager) {
55 58
         if (me == null) {
56
-            me = new DCCCommandParser();
59
+            me = new DCCCommandParser(configManager);
57 60
         }
58 61
 
59 62
         return me;

+ 3
- 1
src/com/dmdirc/addons/time/TimedCommand.java Dosyayı Görüntüle

@@ -24,6 +24,7 @@ package com.dmdirc.addons.time;
24 24
 
25 25
 import com.dmdirc.FrameContainer;
26 26
 import com.dmdirc.WritableFrameContainer;
27
+import com.dmdirc.commandparser.CommandManager;
27 28
 import com.dmdirc.commandparser.parsers.CommandParser;
28 29
 import com.dmdirc.commandparser.parsers.GlobalCommandParser;
29 30
 
@@ -102,7 +103,8 @@ public final class TimedCommand extends TimerTask {
102 103
     public void run() {
103 104
         CommandParser parser;
104 105
         if (origin == null) {
105
-            parser = GlobalCommandParser.getGlobalCommandParser();
106
+            parser = new GlobalCommandParser(origin.getConfigManager(),
107
+                    CommandManager.getCommandManager());
106 108
         } else {
107 109
             parser = ((WritableFrameContainer) origin).getCommandParser();
108 110
         }

+ 3
- 1
src/com/dmdirc/addons/ui_swing/components/frames/TextFrame.java Dosyayı Görüntüle

@@ -44,6 +44,7 @@ import com.dmdirc.addons.ui_swing.textpane.TextPaneHomeAction;
44 44
 import com.dmdirc.addons.ui_swing.textpane.TextPaneListener;
45 45
 import com.dmdirc.addons.ui_swing.textpane.TextPanePageDownAction;
46 46
 import com.dmdirc.addons.ui_swing.textpane.TextPanePageUpAction;
47
+import com.dmdirc.commandparser.CommandManager;
47 48
 import com.dmdirc.commandparser.PopupManager;
48 49
 import com.dmdirc.commandparser.PopupMenu;
49 50
 import com.dmdirc.commandparser.PopupMenuItem;
@@ -156,7 +157,8 @@ public abstract class TextFrame extends JPanel implements Window,
156 157
         }
157 158
 
158 159
         if (localParser == null) {
159
-            localParser = GlobalCommandParser.getGlobalCommandParser();
160
+            localParser = new GlobalCommandParser(frameParent.getConfigManager(),
161
+                    CommandManager.getCommandManager());
160 162
         }
161 163
 
162 164
         return localParser;

Loading…
İptal
Kaydet