|
@@ -40,7 +40,6 @@ import com.dmdirc.interfaces.ActionListener;
|
40
|
40
|
import com.dmdirc.interfaces.ConfigChangeListener;
|
41
|
41
|
import com.dmdirc.plugins.Plugin;
|
42
|
42
|
import com.dmdirc.ui.WindowManager;
|
43
|
|
-import com.dmdirc.ui.interfaces.Window;
|
44
|
43
|
import com.dmdirc.util.RollingList;
|
45
|
44
|
|
46
|
45
|
import java.util.Date;
|
|
@@ -162,32 +161,32 @@ public final class LagDisplayPlugin extends Plugin implements ActionListener, Co
|
162
|
161
|
}
|
163
|
162
|
|
164
|
163
|
if (!useAlternate && type.equals(CoreActionType.SERVER_GOTPING)) {
|
165
|
|
- final Window active = WindowManager.getActiveWindow().getFrame();
|
|
164
|
+ final FrameContainer<?> active = WindowManager.getActiveWindow();
|
166
|
165
|
final String value = formatTime(arguments[1]);
|
167
|
166
|
|
168
|
167
|
getHistory(((Server) arguments[0])).add((Long) arguments[1]);
|
169
|
168
|
pings.put(((Server) arguments[0]), value);
|
170
|
169
|
|
171
|
|
- if (((Server) arguments[0]).ownsFrame(active)) {
|
|
170
|
+ if (((Server) arguments[0]).isChild(active) || arguments[0] == active) {
|
172
|
171
|
panel.setText(value);
|
173
|
172
|
}
|
174
|
173
|
|
175
|
174
|
panel.refreshDialog();
|
176
|
175
|
} else if (!useAlternate && type.equals(CoreActionType.SERVER_NOPING)) {
|
177
|
|
- final Window active = WindowManager.getActiveWindow().getFrame();
|
|
176
|
+ final FrameContainer<?> active = WindowManager.getActiveWindow();
|
178
|
177
|
final String value = formatTime(arguments[1]) + "+";
|
179
|
178
|
|
180
|
179
|
pings.put(((Server) arguments[0]), value);
|
181
|
180
|
|
182
|
|
- if (((Server) arguments[0]).ownsFrame(active)) {
|
|
181
|
+ if (((Server) arguments[0]).isChild(active) || arguments[0] == active) {
|
183
|
182
|
panel.setText(value);
|
184
|
183
|
}
|
185
|
184
|
|
186
|
185
|
panel.refreshDialog();
|
187
|
186
|
} else if (type.equals(CoreActionType.SERVER_DISCONNECTED)) {
|
188
|
|
- final Window active = WindowManager.getActiveWindow().getFrame();
|
|
187
|
+ final FrameContainer<?> active = WindowManager.getActiveWindow();
|
189
|
188
|
|
190
|
|
- if (((Server) arguments[0]).ownsFrame(active)) {
|
|
189
|
+ if (((Server) arguments[0]).isChild(active) || arguments[0] == active) {
|
191
|
190
|
panel.setText("Not connected");
|
192
|
191
|
pings.remove((Server) arguments[0]);
|
193
|
192
|
}
|
|
@@ -213,12 +212,12 @@ public final class LagDisplayPlugin extends Plugin implements ActionListener, Co
|
213
|
212
|
final long sent = Long.parseLong(((String[]) arguments[2])[3].substring(9));
|
214
|
213
|
final Long duration = Long.valueOf(new Date().getTime() - sent);
|
215
|
214
|
final String value = formatTime(duration);
|
216
|
|
- final Window active = WindowManager.getActiveWindow().getFrame();
|
|
215
|
+ final FrameContainer<?> active = WindowManager.getActiveWindow();
|
217
|
216
|
|
218
|
217
|
pings.put((Server) arguments[0], value);
|
219
|
218
|
getHistory(((Server) arguments[0])).add(duration);
|
220
|
219
|
|
221
|
|
- if (((Server) arguments[0]).ownsFrame(active)) {
|
|
220
|
+ if (((Server) arguments[0]).isChild(active) || arguments[0] == active) {
|
222
|
221
|
panel.setText(value);
|
223
|
222
|
}
|
224
|
223
|
} catch (NumberFormatException ex) {
|