|
@@ -49,6 +49,8 @@ import javax.swing.WindowConstants;
|
49
|
49
|
|
50
|
50
|
import net.miginfocom.swing.MigLayout;
|
51
|
51
|
|
|
52
|
+import static com.google.common.base.Preconditions.checkNotNull;
|
|
53
|
+
|
52
|
54
|
/**
|
53
|
55
|
* Allows the user to modify channel settings (modes, topics, etc).
|
54
|
56
|
*/
|
|
@@ -99,7 +101,7 @@ public class ChannelSettingsDialog extends StandardDialog implements ActionListe
|
99
|
101
|
* @param serviceManager Service manager
|
100
|
102
|
* @param preferencesManager Preferences Manager
|
101
|
103
|
* @param compFactory Preferences setting component factory
|
102
|
|
- * @param newChannel The channel object that we're editing settings for
|
|
104
|
+ * @param channel The channel object that we're editing settings for
|
103
|
105
|
* @param parentWindow Parent window
|
104
|
106
|
*/
|
105
|
107
|
public ChannelSettingsDialog(
|
|
@@ -112,25 +114,25 @@ public class ChannelSettingsDialog extends StandardDialog implements ActionListe
|
112
|
114
|
final ServiceManager serviceManager,
|
113
|
115
|
final PreferencesManager preferencesManager,
|
114
|
116
|
final PrefsComponentFactory compFactory,
|
115
|
|
- final Channel newChannel,
|
|
117
|
+ final Channel channel,
|
116
|
118
|
final MainFrame parentWindow) {
|
117
|
119
|
super(parentWindow, ModalityType.MODELESS);
|
118
|
120
|
|
119
|
|
- this.controller = controller;
|
120
|
|
- this.iconManager = iconManager;
|
121
|
|
- this.userConfig = userConfig;
|
122
|
|
- this.serviceManager = serviceManager;
|
123
|
|
- this.preferencesManager = preferencesManager;
|
124
|
|
- this.compFactory = compFactory;
|
|
121
|
+ this.controller = checkNotNull(controller);
|
|
122
|
+ this.iconManager = checkNotNull(iconManager);
|
|
123
|
+ this.globalConfig = checkNotNull(globalConfig);
|
|
124
|
+ this.userConfig = checkNotNull(userConfig);
|
|
125
|
+ this.serviceManager = checkNotNull(serviceManager);
|
|
126
|
+ this.preferencesManager = checkNotNull(preferencesManager);
|
|
127
|
+ this.compFactory = checkNotNull(compFactory);
|
|
128
|
+ this.channel = checkNotNull(channel);
|
125
|
129
|
|
126
|
|
- channel = newChannel;
|
127
|
|
- identity = identityFactory.createChannelConfig(channel.getConnection().getNetwork(),
|
|
130
|
+ this.identity = identityFactory.createChannelConfig(channel.getConnection().getNetwork(),
|
128
|
131
|
channel.getChannelInfo().getName());
|
129
|
|
- this.channelWindow = (InputWindow) windowFactory.getSwingWindow(newChannel);
|
|
132
|
+ this.channelWindow = (InputWindow) windowFactory.getSwingWindow(channel);
|
130
|
133
|
|
131
|
134
|
initComponents();
|
132
|
135
|
initListeners();
|
133
|
|
- this.globalConfig = globalConfig;
|
134
|
136
|
}
|
135
|
137
|
|
136
|
138
|
/** Initialises the main UI components. */
|