Parcourir la source

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 il y a 10 ans
Parent
révision
8e3fa1c947

+ 2
- 2
src/com/dmdirc/addons/dcc/ChatContainer.java Voir le fichier

133
 
133
 
134
     /** {@inheritDoc} */
134
     /** {@inheritDoc} */
135
     @Override
135
     @Override
136
-    public void windowClosing() {
137
-        super.windowClosing();
136
+    public void close() {
137
+        super.close();
138
         dccChat.close();
138
         dccChat.close();
139
     }
139
     }
140
 
140
 

+ 2
- 5
src/com/dmdirc/addons/dcc/DCCFrameContainer.java Voir le fichier

93
 
93
 
94
     /** {@inheritDoc} */
94
     /** {@inheritDoc} */
95
     @Override
95
     @Override
96
-    public void windowClosing() {
96
+    public void close() {
97
         windowClosing = true;
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 Voir le fichier

86
                 @Override
86
                 @Override
87
                 public boolean save() {
87
                 public boolean save() {
88
                     PlaceholderContainer.super.close();
88
                     PlaceholderContainer.super.close();
89
+                    plugin.removeContainer();
89
                     return true;
90
                     return true;
90
                 }
91
                 }
91
 
92
 
97
             }.display();
98
             }.display();
98
         } else {
99
         } else {
99
             super.close();
100
             super.close();
101
+            plugin.removeContainer();
100
         }
102
         }
101
     }
103
     }
102
 
104
 
106
         return null;
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
     /** {@inheritDoc} */
111
     /** {@inheritDoc} */
120
     @Override
112
     @Override
121
     public void removeChild(final FrameContainer child) {
113
     public void removeChild(final FrameContainer child) {

+ 3
- 6
src/com/dmdirc/addons/dcc/TransferContainer.java Voir le fichier

353
      * Closes this container (and it's associated frame).
353
      * Closes this container (and it's associated frame).
354
      */
354
      */
355
     @Override
355
     @Override
356
-    public void windowClosing() {
356
+    public void close() {
357
         windowClosing = true;
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
     public void addSocketCloseCallback(final SocketCloseListener listener) {
364
     public void addSocketCloseCallback(final SocketCloseListener listener) {

+ 4
- 6
src/com/dmdirc/addons/parserdebug/DebugWindow.java Voir le fichier

83
      * Closes this container (and its associated frame).
83
      * Closes this container (and its associated frame).
84
      */
84
      */
85
     @Override
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
         if (parser != null) {
90
         if (parser != null) {
89
             parser.getCallbackManager().delCallback(DebugInfoListener.class, plugin);
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 Voir le fichier

68
 
68
 
69
     /** {@inheritDoc} */
69
     /** {@inheritDoc} */
70
     @Override
70
     @Override
71
-    protected void windowClosing() {
71
+    public void close() {
72
+        super.close();
73
+
72
         thread.cancel();
74
         thread.cancel();
73
         plugin.windowClosing(this);
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
 }

Chargement…
Annuler
Enregistrer