From 507066e6d3eaf4e1812eb9bf2c0791e6f2670f04 Mon Sep 17 00:00:00 2001 From: waker Date: Sun, 4 Nov 2012 20:33:08 +0100 Subject: transition to the new plugin action API (WIP) --- plugins/shellexecui/interface.c | 7 ------- plugins/shellexecui/shellexec.glade | 20 -------------------- plugins/shellexecui/shellexecui.c | 11 +++-------- 3 files changed, 3 insertions(+), 35 deletions(-) (limited to 'plugins/shellexecui') diff --git a/plugins/shellexecui/interface.c b/plugins/shellexecui/interface.c index ee41ed1d..f6286eac 100644 --- a/plugins/shellexecui/interface.c +++ b/plugins/shellexecui/interface.c @@ -134,7 +134,6 @@ create_shellexec_conf_edit_dialog (void) GtkWidget *multiple_check; GtkWidget *local_check; GtkWidget *remote_check; - GtkWidget *playlist_check; GtkWidget *common_check; GtkWidget *dialog_action_area1; GtkWidget *edit_cancel_button; @@ -221,11 +220,6 @@ create_shellexec_conf_edit_dialog (void) 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); @@ -266,7 +260,6 @@ create_shellexec_conf_edit_dialog (void) GLADE_HOOKUP_OBJECT (shellexec_conf_edit_dialog, multiple_check, "multiple_check"); 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"); diff --git a/plugins/shellexecui/shellexec.glade b/plugins/shellexecui/shellexec.glade index d2f21b35..3e64ca2b 100644 --- a/plugins/shellexecui/shellexec.glade +++ b/plugins/shellexecui/shellexec.glade @@ -475,26 +475,6 @@ - - - True - Item should appear on the playlist tab context menu - True - Playlist - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - True diff --git a/plugins/shellexecui/shellexecui.c b/plugins/shellexecui/shellexecui.c index b2a60230..9bd82bc6 100644 --- a/plugins/shellexecui/shellexecui.c +++ b/plugins/shellexecui/shellexecui.c @@ -196,10 +196,7 @@ on_edit_button_clicked(GtkButton *button, gpointer user_data) { current_action->parent.flags & DB_ACTION_SINGLE_TRACK); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(lookup_widget(edit_dlg, "multiple_check")), - current_action->parent.flags & DB_ACTION_ALLOW_MULTIPLE_TRACKS); - gtk_toggle_button_set_active( - GTK_TOGGLE_BUTTON(lookup_widget(edit_dlg, "playlist_check")), - current_action->parent.flags & DB_ACTION_PLAYLIST); + current_action->parent.flags & DB_ACTION_MULTIPLE_TRACKS); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(lookup_widget(edit_dlg, "local_check")), current_action->shx_flags & SHX_ACTION_LOCAL_ONLY); @@ -294,9 +291,7 @@ on_edit_ok_button_clicked (GtkButton *button, gpointer user_data) { active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(edit_dlg, "single_check"))); flags = (flags & ~DB_ACTION_SINGLE_TRACK) | (active?DB_ACTION_SINGLE_TRACK:0); active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(edit_dlg, "multiple_check"))); - flags = (flags & ~DB_ACTION_ALLOW_MULTIPLE_TRACKS) | (active?DB_ACTION_ALLOW_MULTIPLE_TRACKS:0); - active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(edit_dlg, "playlist_check"))); - flags = (flags & ~DB_ACTION_PLAYLIST) | (active?DB_ACTION_PLAYLIST:0); + flags = (flags & ~DB_ACTION_MULTIPLE_TRACKS) | (active?DB_ACTION_MULTIPLE_TRACKS:0); active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(edit_dlg, "local_check"))); 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"))); @@ -362,7 +357,7 @@ shellexecui_action_gtk (void *data) static int shellexecui_action_callback(DB_plugin_action_t *action, - void *user_data) { + void *user_data, int ctx) { g_idle_add (shellexecui_action_gtk, NULL); return 0; } -- cgit v1.2.3