diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-09-22 19:16:47 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-09-22 19:16:47 +0200 |
commit | 45a3d7f0e2783d9898f017772583d31c1c9e0f03 (patch) | |
tree | a0b24517d375d6572741975f9ee787cb1596574b /src/gui/newSliceWindow.vala | |
parent | 4b19e75939c5b7122d1429f6f258d4b83cd90dde (diff) |
New upstream version 0.7.0upstream/0.7.0
Diffstat (limited to 'src/gui/newSliceWindow.vala')
-rw-r--r-- | src/gui/newSliceWindow.vala | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/gui/newSliceWindow.vala b/src/gui/newSliceWindow.vala index d719213..3133e34 100644 --- a/src/gui/newSliceWindow.vala +++ b/src/gui/newSliceWindow.vala @@ -61,7 +61,7 @@ public class NewSliceWindow : GLib.Object { private Gtk.Box workspace_only_box = null; private Gtk.Image icon = null; private Gtk.Entry name_entry = null; - private Gtk.Entry command_entry = null; + private CommandComboList command_list = null; private Gtk.Entry uri_entry = null; private Gtk.Switch quickaction_checkbutton = null; private Gtk.Switch workspace_only_checkbutton = null; @@ -195,11 +195,18 @@ public class NewSliceWindow : GLib.Object { this.name_entry = builder.get_object("name-entry") as Gtk.Entry; this.uri_entry = builder.get_object("uri-entry") as Gtk.Entry; - this.command_entry = builder.get_object("command-entry") as Gtk.Entry; this.quickaction_checkbutton = builder.get_object("quick-action-checkbutton") as Gtk.Switch; this.quickaction_box = builder.get_object("quickaction-box") as Gtk.Box; this.icon = builder.get_object("icon") as Gtk.Image; + this.command_list = new CommandComboList(); + this.command_list.on_select.connect((name, command, icon) => { + this.set_icon(icon); + this.name_entry.text = name; + }); + + this.command_box.pack_start(this.command_list, true, true); + this.workspace_only_checkbutton = builder.get_object("workspace-only-checkbutton") as Gtk.Switch; this.workspace_only_box = builder.get_object("workspace-only-box") as Gtk.Box; @@ -275,7 +282,7 @@ public class NewSliceWindow : GLib.Object { switch (type) { case "app": this.current_custom_icon = action.icon; - this.command_entry.text = action.real_command; + this.command_list.text = action.real_command; break; case "key": this.current_custom_icon = action.icon; @@ -319,7 +326,7 @@ public class NewSliceWindow : GLib.Object { this.key_select.set_trigger(new Trigger()); this.pie_select.select_first(); this.name_entry.text = _("Rename me!"); - this.command_entry.text = ""; + this.command_list.text = ""; this.uri_entry.text = ""; } @@ -359,7 +366,7 @@ public class NewSliceWindow : GLib.Object { case "app": group = new ActionGroup(this.current_id); group.add_action(new AppAction(this.name_entry.text, this.current_icon, - this.command_entry.text, + this.command_list.text, this.quickaction_checkbutton.active)); break; case "key": |