summaryrefslogtreecommitdiff
path: root/plugins/shellexecui
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-04-24 20:15:30 +0200
committerGravatar waker <wakeroid@gmail.com>2012-04-24 20:15:30 +0200
commit7eeeacd7041caf80713e78e1b3c8f6c7a6035185 (patch)
tree402fb8303686b2a53260dce48d05c568a6ffc9ee /plugins/shellexecui
parent6498b5187f44a48571aac268c9c377b7c3e6af7b (diff)
shellexecui: added support for 'common' flag to GUI config, added some tooltips
shellexed: save/load 'common' flag gtkui: fixed duplication when adding new custom popup menus
Diffstat (limited to 'plugins/shellexecui')
-rw-r--r--plugins/shellexecui/interface.c12
-rw-r--r--plugins/shellexecui/shellexec.glade25
-rw-r--r--plugins/shellexecui/shellexecui.c5
3 files changed, 42 insertions, 0 deletions
diff --git a/plugins/shellexecui/interface.c b/plugins/shellexecui/interface.c
index cb986101..671af44c 100644
--- a/plugins/shellexecui/interface.c
+++ b/plugins/shellexecui/interface.c
@@ -129,6 +129,7 @@ create_shellexec_conf_edit_dialog (void)
GtkWidget *local_check;
GtkWidget *remote_check;
GtkWidget *playlist_check;
+ GtkWidget *common_check;
GtkWidget *dialog_action_area1;
GtkWidget *edit_cancel_button;
GtkWidget *edit_ok_button;
@@ -197,22 +198,32 @@ create_shellexec_conf_edit_dialog (void)
single_check = gtk_check_button_new_with_mnemonic (_("Single Tracks"));
gtk_widget_show (single_check);
gtk_box_pack_start (GTK_BOX (dialog_vbox1), single_check, FALSE, FALSE, 0);
+ gtk_widget_set_tooltip_text (single_check, _("Works on single track."));
multiple_check = gtk_check_button_new_with_mnemonic (_("Multiple Tracks"));
gtk_widget_show (multiple_check);
gtk_box_pack_start (GTK_BOX (dialog_vbox1), multiple_check, FALSE, FALSE, 0);
+ gtk_widget_set_tooltip_text (multiple_check, _("Works on multiple tracks."));
local_check = gtk_check_button_new_with_mnemonic (_("Local"));
gtk_widget_show (local_check);
gtk_box_pack_start (GTK_BOX (dialog_vbox1), local_check, FALSE, FALSE, 0);
+ gtk_widget_set_tooltip_text (local_check, _("Works on local files."));
remote_check = gtk_check_button_new_with_mnemonic (_("Remote"));
gtk_widget_show (remote_check);
gtk_box_pack_start (GTK_BOX (dialog_vbox1), remote_check, FALSE, FALSE, 0);
+ gtk_widget_set_tooltip_text (remote_check, _("Works on remote files (e.g. http:// streams)"));
playlist_check = gtk_check_button_new_with_mnemonic (_("Playlist"));
gtk_widget_show (playlist_check);
gtk_box_pack_start (GTK_BOX (dialog_vbox1), playlist_check, FALSE, FALSE, 0);
+ gtk_widget_set_tooltip_text (playlist_check, _("Item should appear on the playlist tab context menu"));
+
+ common_check = gtk_check_button_new_with_mnemonic (_("Common"));
+ gtk_widget_show (common_check);
+ gtk_box_pack_start (GTK_BOX (dialog_vbox1), common_check, FALSE, FALSE, 0);
+ gtk_widget_set_tooltip_text (common_check, _("Item should appear in the main menu"));
dialog_action_area1 = gtk_dialog_get_action_area (GTK_DIALOG (shellexec_conf_edit_dialog));
gtk_widget_show (dialog_action_area1);
@@ -250,6 +261,7 @@ create_shellexec_conf_edit_dialog (void)
GLADE_HOOKUP_OBJECT (shellexec_conf_edit_dialog, local_check, "local_check");
GLADE_HOOKUP_OBJECT (shellexec_conf_edit_dialog, remote_check, "remote_check");
GLADE_HOOKUP_OBJECT (shellexec_conf_edit_dialog, playlist_check, "playlist_check");
+ GLADE_HOOKUP_OBJECT (shellexec_conf_edit_dialog, common_check, "common_check");
GLADE_HOOKUP_OBJECT_NO_REF (shellexec_conf_edit_dialog, dialog_action_area1, "dialog_action_area1");
GLADE_HOOKUP_OBJECT (shellexec_conf_edit_dialog, edit_cancel_button, "edit_cancel_button");
GLADE_HOOKUP_OBJECT (shellexec_conf_edit_dialog, edit_ok_button, "edit_ok_button");
diff --git a/plugins/shellexecui/shellexec.glade b/plugins/shellexecui/shellexec.glade
index 2b291d9f..e90504e6 100644
--- a/plugins/shellexecui/shellexec.glade
+++ b/plugins/shellexecui/shellexec.glade
@@ -386,6 +386,7 @@
<child>
<widget class="GtkCheckButton" id="single_check">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Works on single track.</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Single Tracks</property>
<property name="use_underline">True</property>
@@ -405,6 +406,7 @@
<child>
<widget class="GtkCheckButton" id="multiple_check">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Works on multiple tracks.</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Multiple Tracks</property>
<property name="use_underline">True</property>
@@ -424,6 +426,7 @@
<child>
<widget class="GtkCheckButton" id="local_check">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Works on local files.</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Local</property>
<property name="use_underline">True</property>
@@ -443,6 +446,7 @@
<child>
<widget class="GtkCheckButton" id="remote_check">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Works on remote files (e.g. http:// streams)</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Remote</property>
<property name="use_underline">True</property>
@@ -462,6 +466,7 @@
<child>
<widget class="GtkCheckButton" id="playlist_check">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Item should appear on the playlist tab context menu</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Playlist</property>
<property name="use_underline">True</property>
@@ -477,6 +482,26 @@
<property name="fill">False</property>
</packing>
</child>
+
+ <child>
+ <widget class="GtkCheckButton" id="common_check">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Item should appear in the main menu</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Common</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
</widget>
</child>
</widget>
diff --git a/plugins/shellexecui/shellexecui.c b/plugins/shellexecui/shellexecui.c
index 6662798e..5d76ccff 100644
--- a/plugins/shellexecui/shellexecui.c
+++ b/plugins/shellexecui/shellexecui.c
@@ -221,6 +221,9 @@ on_edit_button_clicked(GtkButton *button, gpointer user_data) {
gtk_toggle_button_set_active(
GTK_TOGGLE_BUTTON(lookup_widget(edit_dlg, "remote_check")),
current_action->shx_flags & SHX_ACTION_REMOTE_ONLY);
+ gtk_toggle_button_set_active(
+ GTK_TOGGLE_BUTTON(lookup_widget(edit_dlg, "common_check")),
+ current_action->parent.flags & DB_ACTION_COMMON);
//disable_button(edit_dlg, "edit_ok_button"); // OK button is disabled by default
gtk_widget_show(edit_dlg);
@@ -325,6 +328,8 @@ on_edit_ok_button_clicked (GtkButton *button, gpointer user_data) {
shx_flags = (shx_flags & ~SHX_ACTION_LOCAL_ONLY) | (active?SHX_ACTION_LOCAL_ONLY:0);
active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(edit_dlg, "remote_check")));
shx_flags = (shx_flags & ~SHX_ACTION_REMOTE_ONLY) | (active?SHX_ACTION_REMOTE_ONLY:0);
+ active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(edit_dlg, "common_check")));
+ flags = (flags & ~DB_ACTION_COMMON) | (active?DB_ACTION_COMMON:0);
current_action->parent.flags = flags;
current_action->shx_flags = shx_flags;