[Xfce4-commits] <parole:bluesabre/gtk3> Fix/improve tray icon window minimizing

Sean Davis noreply at xfce.org
Mon Sep 2 04:00:01 CEST 2013


Updating branch refs/heads/bluesabre/gtk3
         to 02a00ad8893ca4235dd824b50535c33ef53b289e (commit)
       from feeff0de0af6f64633280475b60e9d876a1970ab (commit)

commit 02a00ad8893ca4235dd824b50535c33ef53b289e
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sun Sep 1 21:58:09 2013 -0400

    Fix/improve tray icon window minimizing

 data/interfaces/parole.ui        |    4 ++--
 src/plugins/tray/tray-provider.c |    6 +++++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/data/interfaces/parole.ui b/data/interfaces/parole.ui
index 52d7c45..328205a 100644
--- a/data/interfaces/parole.ui
+++ b/data/interfaces/parole.ui
@@ -141,7 +141,7 @@
     <signal name="destroy" handler="parole_player_destroy_cb" swapped="no"/>
     <signal name="configure-event" handler="parole_player_configure_event_cb" swapped="no"/>
     <signal name="key-press-event" handler="parole_player_key_press" swapped="no"/>
-    <signal name="delete-event" handler="parole_player_delete_event_cb" swapped="no"/>
+    <signal name="delete-event" handler="parole_player_delete_event_cb" after="yes" swapped="no"/>
     <child>
       <object class="GtkBox" id="box1">
         <property name="visible">True</property>
@@ -422,8 +422,8 @@
                         <property name="use_underline">True</property>
                         <property name="image">image3</property>
                         <property name="use_stock">False</property>
-                        <accelerator key="equal" signal="activate"/>
                         <accelerator key="plus" signal="activate"/>
+                        <accelerator key="equal" signal="activate"/>
                         <signal name="activate" handler="parole_player_volume_up" swapped="no"/>
                       </object>
                     </child>
diff --git a/src/plugins/tray/tray-provider.c b/src/plugins/tray/tray-provider.c
index 09a9632..4087525 100644
--- a/src/plugins/tray/tray-provider.c
+++ b/src/plugins/tray/tray-provider.c
@@ -207,7 +207,11 @@ popup_menu_cb (GtkStatusIcon *icon, guint button,
 static void
 tray_activate_cb (GtkStatusIcon *tray_icon, TrayProvider *tray)
 {
-    gtk_widget_set_visible( tray->window, gtk_widget_get_visible (tray->window) );
+    /* Show the window if it is hidden or does not have focus */
+    if (!gtk_widget_get_visible(tray->window) || !gtk_window_is_active(GTK_WINDOW(tray->window)))
+        gtk_window_present(GTK_WINDOW(tray->window));
+    else
+        gtk_widget_hide(tray->window);
 }
 
 static void


More information about the Xfce4-commits mailing list