|
@@ -38,6 +38,7 @@ import com.dmdirc.config.prefs.PreferencesType;
|
38
|
38
|
import com.dmdirc.interfaces.ActionListener;
|
39
|
39
|
import com.dmdirc.interfaces.ConfigChangeListener;
|
40
|
40
|
import com.dmdirc.plugins.Plugin;
|
|
41
|
+import com.dmdirc.ui.WindowManager;
|
41
|
42
|
import com.dmdirc.ui.interfaces.Window;
|
42
|
43
|
import com.dmdirc.util.RollingList;
|
43
|
44
|
|
|
@@ -160,7 +161,7 @@ public final class LagDisplayPlugin extends Plugin implements ActionListener, Co
|
160
|
161
|
}
|
161
|
162
|
|
162
|
163
|
if (!useAlternate && type.equals(CoreActionType.SERVER_GOTPING)) {
|
163
|
|
- final Window active = Main.getUI().getActiveWindow();
|
|
164
|
+ final Window active = WindowManager.getActiveWindow();
|
164
|
165
|
final String value = formatTime(arguments[1]);
|
165
|
166
|
|
166
|
167
|
getHistory(((Server) arguments[0])).add((Long) arguments[1]);
|
|
@@ -172,7 +173,7 @@ public final class LagDisplayPlugin extends Plugin implements ActionListener, Co
|
172
|
173
|
|
173
|
174
|
panel.refreshDialog();
|
174
|
175
|
} else if (!useAlternate && type.equals(CoreActionType.SERVER_NOPING)) {
|
175
|
|
- final Window active = Main.getUI().getActiveWindow();
|
|
176
|
+ final Window active = WindowManager.getActiveWindow();
|
176
|
177
|
final String value = formatTime(arguments[1]) + "+";
|
177
|
178
|
|
178
|
179
|
pings.put(((Server) arguments[0]), value);
|
|
@@ -183,7 +184,7 @@ public final class LagDisplayPlugin extends Plugin implements ActionListener, Co
|
183
|
184
|
|
184
|
185
|
panel.refreshDialog();
|
185
|
186
|
} else if (type.equals(CoreActionType.SERVER_DISCONNECTED)) {
|
186
|
|
- final Window active = Main.getUI().getActiveWindow();
|
|
187
|
+ final Window active = WindowManager.getActiveWindow();
|
187
|
188
|
|
188
|
189
|
if (((Server) arguments[0]).ownsFrame(active)) {
|
189
|
190
|
panel.setText("Not connected");
|
|
@@ -211,7 +212,7 @@ public final class LagDisplayPlugin extends Plugin implements ActionListener, Co
|
211
|
212
|
final long sent = Long.parseLong(((String[]) arguments[2])[3].substring(9));
|
212
|
213
|
final Long duration = Long.valueOf(new Date().getTime() - sent);
|
213
|
214
|
final String value = formatTime(duration);
|
214
|
|
- final Window active = Main.getUI().getActiveWindow();
|
|
215
|
+ final Window active = WindowManager.getActiveWindow();
|
215
|
216
|
|
216
|
217
|
pings.put((Server) arguments[0], value);
|
217
|
218
|
getHistory(((Server) arguments[0])).add(duration);
|