|
@@ -41,31 +41,31 @@ public class HistoryWindow extends FrameContainer {
|
41
|
41
|
|
42
|
42
|
/** The title of our window. */
|
43
|
43
|
private final String title;
|
44
|
|
-
|
45
|
|
- /** The server we're associated with. */
|
46
|
|
- private final Server server;
|
47
|
|
-
|
|
44
|
+
|
48
|
45
|
/** The window we're using. */
|
49
|
46
|
private final Window myWindow;
|
50
|
47
|
|
|
48
|
+ /** Our parent window. */
|
|
49
|
+ private final Window parent;
|
|
50
|
+
|
51
|
51
|
/**
|
52
|
52
|
* Creates a new HistoryWindow.
|
53
|
53
|
*
|
54
|
54
|
* @param title The title of the window
|
55
|
55
|
* @param reader The reader to use to get the history
|
56
|
|
- * @param server The server we're associated with
|
|
56
|
+ * @param parent The window this history window was opened from
|
57
|
57
|
*/
|
58
|
|
- public HistoryWindow(final String title, final ReverseFileReader reader, final Server server) {
|
|
58
|
+ public HistoryWindow(final String title, final ReverseFileReader reader, final Window parent) {
|
59
|
59
|
super();
|
60
|
60
|
|
61
|
61
|
this.title = title;
|
62
|
|
- this.server = server;
|
|
62
|
+ this.parent = parent;
|
63
|
63
|
|
64
|
64
|
icon = IconManager.getIconManager().getIcon("raw");
|
65
|
65
|
|
66
|
66
|
myWindow = Main.getUI().getWindow(this);
|
67
|
67
|
|
68
|
|
- WindowManager.addWindow(server.getFrame(), myWindow);
|
|
68
|
+ WindowManager.addWindow(parent, myWindow);
|
69
|
69
|
|
70
|
70
|
myWindow.setTitle(title);
|
71
|
71
|
myWindow.setFrameIcon(icon);
|
|
@@ -97,6 +97,6 @@ public class HistoryWindow extends FrameContainer {
|
97
|
97
|
|
98
|
98
|
/** {@inheritDoc} */
|
99
|
99
|
public Server getServer() {
|
100
|
|
- return server;
|
|
100
|
+ return parent.getContainer().getServer();
|
101
|
101
|
}
|
102
|
102
|
}
|