|
@@ -39,22 +39,31 @@ import com.dmdirc.ui.input.AdditionalTabTargets;
|
39
|
39
|
* Opens the channel settings window for the channel.
|
40
|
40
|
*/
|
41
|
41
|
@CommandOptions(allowOffline = false)
|
42
|
|
-public class ChannelSettings extends Command implements
|
43
|
|
- IntelligentCommand {
|
|
42
|
+public class ChannelSettings extends Command implements IntelligentCommand {
|
44
|
43
|
|
45
|
44
|
/** A command info object for this command. */
|
46
|
45
|
public static final CommandInfo INFO = new BaseCommandInfo("channelsettings",
|
47
|
46
|
"channelsettings - opens the channel settings window",
|
48
|
47
|
CommandType.TYPE_CHANNEL);
|
49
|
48
|
|
|
49
|
+ /** The controller to use to show the settings window. */
|
|
50
|
+ private final SwingController controller;
|
|
51
|
+
|
|
52
|
+ /**
|
|
53
|
+ * Creates a new instance of the {@link ChannelSettings} command.
|
|
54
|
+ *
|
|
55
|
+ * @param controller The controller to use to show the settings window.
|
|
56
|
+ */
|
|
57
|
+ public ChannelSettings(final SwingController controller) {
|
|
58
|
+ this.controller = controller;
|
|
59
|
+ }
|
|
60
|
+
|
50
|
61
|
/** {@inheritDoc} */
|
51
|
62
|
@Override
|
52
|
63
|
public void execute(final FrameContainer origin,
|
53
|
64
|
final CommandArguments args, final CommandContext context) {
|
54
|
|
- ((SwingController) getController().getMain().getPluginManager()
|
55
|
|
- .getPluginInfoByName("ui_swing").getPlugin())
|
56
|
|
- .showChannelSettingsDialog(((ChannelCommandContext) context)
|
57
|
|
- .getChannel());
|
|
65
|
+ controller.showChannelSettingsDialog(
|
|
66
|
+ ((ChannelCommandContext) context).getChannel());
|
58
|
67
|
}
|
59
|
68
|
|
60
|
69
|
/** {@inheritDoc} */
|