[Xfce4-commits] <parole:master> Revert "Improve setting name in tray plugin."

Sean Davis noreply at xfce.org
Thu Mar 7 00:30:01 CET 2013


Updating branch refs/heads/master
         to 421683cb40955a84f60509ffdf716e08eea4b518 (commit)
       from 5299271ceb3fa6078f727df14483dfc3c501c274 (commit)

commit 421683cb40955a84f60509ffdf716e08eea4b518
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Wed Mar 6 18:27:24 2013 -0500

    Revert "Improve setting name in tray plugin."
    
    This reverts commit 5299271ceb3fa6078f727df14483dfc3c501c274.

 src/plugins/tray/tray-provider.c |   32 +++++++++-----------------------
 1 files changed, 9 insertions(+), 23 deletions(-)

diff --git a/src/plugins/tray/tray-provider.c b/src/plugins/tray/tray-provider.c
index 06bd3ba..a8b6284 100644
--- a/src/plugins/tray/tray-provider.c
+++ b/src/plugins/tray/tray-provider.c
@@ -95,17 +95,10 @@ play_pause_activated_cb (TrayProvider *tray)
 }   
   
 static void
-previous_activated_cb (TrayProvider *tray)
+stop_activated_cb (TrayProvider *tray)
 {
     menu_selection_done_cb (tray);
-    parole_provider_player_previous (tray->player);
-}
-
-static void
-next_activated_cb (TrayProvider *tray)
-{
-    menu_selection_done_cb (tray);
-    parole_provider_player_next (tray->player);
+    parole_provider_player_stop (tray->player);
 }
 
 static void
@@ -133,19 +126,12 @@ popup_menu_cb (GtkStatusIcon *icon, guint button,
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
     
     /*
-     * Previous
-     */
-    mi = gtk_image_menu_item_new_from_stock (GTK_STOCK_MEDIA_PREVIOUS, NULL);
-    gtk_widget_show (mi);
-    g_signal_connect_swapped (mi, "activate", G_CALLBACK (previous_activated_cb), tray);
-    gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-    
-    /*
-     * Next
+     * Stop
      */
-    mi = gtk_image_menu_item_new_from_stock (GTK_STOCK_MEDIA_NEXT, NULL);
+    mi = gtk_image_menu_item_new_from_stock (GTK_STOCK_MEDIA_STOP, NULL);
+    gtk_widget_set_sensitive (mi, tray->state >= PAROLE_STATE_PAUSED);
     gtk_widget_show (mi);
-    g_signal_connect_swapped (mi, "activate", G_CALLBACK (next_activated_cb), tray);
+    g_signal_connect_swapped (mi, "activate", G_CALLBACK (stop_activated_cb), tray);
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
     
     /*
@@ -259,7 +245,7 @@ configure_plugin (TrayProvider *tray, GtkWidget *widget)
     dialog = gtk_dialog_new_with_buttons (_("Tray icon plugin"), 
 					  GTK_WINDOW (widget),
 					  GTK_DIALOG_DESTROY_WITH_PARENT,
-					  GTK_STOCK_CLOSE,
+					  GTK_STOCK_CANCEL,
                                           GTK_RESPONSE_CANCEL,
                                           NULL);
 
@@ -287,7 +273,7 @@ action_on_hide_confirmed_cb (GtkWidget *widget, gpointer data)
     
     toggled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
     
-    write_entry_bool ("remember-quit-action", toggled);
+    write_entry_bool ("ACTION_CONFIRMED_ON_DELETE", toggled);
 }
 
 static gboolean
@@ -297,7 +283,7 @@ delete_event_cb (GtkWidget *widget, GdkEvent *ev, TrayProvider *tray)
     GtkWidget *minimize, *img;
     gboolean confirmed, ret_val = TRUE, minimize_to_tray;
     
-    confirmed = read_entry_bool ("remember-quit-action", FALSE);
+    confirmed = read_entry_bool ("ACTION_CONFIRMED_ON_DELETE", FALSE);
     minimize_to_tray = read_entry_bool ("minimize-to-tray", TRUE);
     
     if ( confirmed )


More information about the Xfce4-commits mailing list