[Xfce4-commits] <parole:master> Implement open menu item in the tray plugin.

Ali Abdallah noreply at xfce.org
Tue Nov 24 15:48:04 CET 2009


Updating branch refs/heads/master
         to ca9c1f46905d7dbdc8184eb1688a9450f8b4d92a (commit)
       from d5fb7869a9aa6425ee65d168e9e1abd7ad0e5674 (commit)

commit ca9c1f46905d7dbdc8184eb1688a9450f8b4d92a
Author: Ali Abdallah <ali at ali-xfce.org>
Date:   Tue Nov 24 15:45:03 2009 +0100

    Implement open menu item in the tray plugin.

 plugins/tray/tray-provider.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/plugins/tray/tray-provider.c b/plugins/tray/tray-provider.c
index e702a55..92634ac 100644
--- a/plugins/tray/tray-provider.c
+++ b/plugins/tray/tray-provider.c
@@ -111,6 +111,12 @@ stop_activated_cb (TrayProvider *tray)
 }
 
 static void
+open_activated_cb (TrayProvider *tray)
+{
+    parole_provider_player_open_media_chooser (tray->player);
+}
+
+static void
 popup_menu_cb (GtkStatusIcon *icon, guint button, 
                guint activate_time, TrayProvider *tray)
 {
@@ -138,6 +144,14 @@ popup_menu_cb (GtkStatusIcon *icon, guint button,
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
     
     /*
+     * Open
+     */
+    mi = gtk_image_menu_item_new_from_stock (GTK_STOCK_OPEN, NULL);
+    gtk_widget_show (mi);
+    g_signal_connect_swapped (mi, "activate", G_CALLBACK (open_activated_cb), tray);
+    gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
+    
+    /*
      * Separator.
      */
     mi = gtk_separator_menu_item_new ();



More information about the Xfce4-commits mailing list