Kaynağa Gözat

Remove windowClosing() methods from plugins.

Override the close() method instead as per earlier core change.

Change-Id: Ic14615537aa544095733785a983b79556c8f2477
Reviewed-on: http://gerrit.dmdirc.com/3012
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
tags/0.8
Chris Smith 10 yıl önce
ebeveyn
işleme
8e3fa1c947

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

@@ -133,8 +133,8 @@ public class ChatContainer extends DCCFrameContainer implements DCCChatHandler {
133 133
 
134 134
     /** {@inheritDoc} */
135 135
     @Override
136
-    public void windowClosing() {
137
-        super.windowClosing();
136
+    public void close() {
137
+        super.close();
138 138
         dccChat.close();
139 139
     }
140 140
 

+ 2
- 5
src/com/dmdirc/addons/dcc/DCCFrameContainer.java Dosyayı Görüntüle

@@ -93,13 +93,10 @@ public abstract class DCCFrameContainer extends WritableFrameContainer {
93 93
 
94 94
     /** {@inheritDoc} */
95 95
     @Override
96
-    public void windowClosing() {
96
+    public void close() {
97 97
         windowClosing = true;
98 98
 
99
-        // 2: Remove any callbacks or listeners
100
-        // 3: Trigger any actions neccessary
101
-        // 4: Trigger action for the window closing
102
-        // 5: Inform any parents that the window is closing
99
+        super.close();
103 100
     }
104 101
 
105 102
 }

+ 2
- 10
src/com/dmdirc/addons/dcc/PlaceholderContainer.java Dosyayı Görüntüle

@@ -86,6 +86,7 @@ public class PlaceholderContainer extends FrameContainer {
86 86
                 @Override
87 87
                 public boolean save() {
88 88
                     PlaceholderContainer.super.close();
89
+                    plugin.removeContainer();
89 90
                     return true;
90 91
                 }
91 92
 
@@ -97,6 +98,7 @@ public class PlaceholderContainer extends FrameContainer {
97 98
             }.display();
98 99
         } else {
99 100
             super.close();
101
+            plugin.removeContainer();
100 102
         }
101 103
     }
102 104
 
@@ -106,16 +108,6 @@ public class PlaceholderContainer extends FrameContainer {
106 108
         return null;
107 109
     }
108 110
 
109
-    /** {@inheritDoc} */
110
-    @Override
111
-    public void windowClosing() {
112
-        // 2: Remove any callbacks or listeners
113
-        // 3: Trigger any actions neccessary
114
-        // 4: Trigger action for the window closing
115
-        // 5: Inform any parents that the window is closing
116
-        plugin.removeContainer();
117
-    }
118
-
119 111
     /** {@inheritDoc} */
120 112
     @Override
121 113
     public void removeChild(final FrameContainer child) {

+ 3
- 6
src/com/dmdirc/addons/dcc/TransferContainer.java Dosyayı Görüntüle

@@ -353,15 +353,12 @@ public class TransferContainer extends FrameContainer implements
353 353
      * Closes this container (and it's associated frame).
354 354
      */
355 355
     @Override
356
-    public void windowClosing() {
356
+    public void close() {
357 357
         windowClosing = true;
358 358
 
359
-        // 2: Remove any callbacks or listeners
360
-        // 3: Trigger any actions neccessary
361
-        dcc.removeFromTransfers();
359
+        super.close();
362 360
 
363
-        // 4: Trigger action for the window closing
364
-        // 5: Inform any parents that the window is closing
361
+        dcc.removeFromTransfers();
365 362
     }
366 363
 
367 364
     public void addSocketCloseCallback(final SocketCloseListener listener) {

+ 4
- 6
src/com/dmdirc/addons/parserdebug/DebugWindow.java Dosyayı Görüntüle

@@ -83,15 +83,13 @@ public class DebugWindow extends FrameContainer {
83 83
      * Closes this container (and its associated frame).
84 84
      */
85 85
     @Override
86
-    public void windowClosing() {
87
-        // 2: Remove any callbacks or listeners
86
+    public void close() {
87
+        super.close();
88
+
89
+        // Remove any callbacks or listeners
88 90
         if (parser != null) {
89 91
             parser.getCallbackManager().delCallback(DebugInfoListener.class, plugin);
90 92
         }
91
-
92
-        // 3: Trigger any actions neccessary
93
-        // 4: Trigger action for the window closing
94
-        // 5: Inform any parents that the window is closing
95 93
     }
96 94
 
97 95
 }

+ 3
- 5
src/com/dmdirc/addons/swingdebug/SystemStreamContainer.java Dosyayı Görüntüle

@@ -68,13 +68,11 @@ public class SystemStreamContainer extends FrameContainer {
68 68
 
69 69
     /** {@inheritDoc} */
70 70
     @Override
71
-    protected void windowClosing() {
71
+    public void close() {
72
+        super.close();
73
+
72 74
         thread.cancel();
73 75
         plugin.windowClosing(this);
74
-        // 2: Remove any callbacks or listeners
75
-        // 3: Trigger any actions neccessary
76
-        // 4: Trigger action for the window closing
77
-        // 5: Inform any parents that the window is closing
78 76
     }
79 77
 
80 78
 }

Loading…
İptal
Kaydet