Author: nick
Date: 2007-10-26 18:56:01 +0000 (Fri, 26 Oct 2007)
New Revision: 26201

Modified:
   xfce4-panel/trunk/plugins/systray/xfce-tray-widget.c
Log:
extra check for an arrow button


Modified: xfce4-panel/trunk/plugins/systray/xfce-tray-widget.c
===================================================================
--- xfce4-panel/trunk/plugins/systray/xfce-tray-widget.c        2007-10-26 
15:02:40 UTC (rev 26200)
+++ xfce4-panel/trunk/plugins/systray/xfce-tray-widget.c        2007-10-26 
18:56:01 UTC (rev 26201)
@@ -333,6 +333,10 @@
 {
     GtkArrowType arrow_type;
 
+    /* return when the button has not been mapped */
+    if (tray->button == NULL)
+      return;
+
     /* get the origional arrow type */
     arrow_type = tray->arrow_position;
 
@@ -475,7 +479,7 @@
         tray->n_hidden_childeren--;
 
         /* collapse the hidden button */
-        if (tray->n_hidden_childeren == 0)
+        if (tray->n_hidden_childeren == 0 && tray->button)
             gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tray->button), 
FALSE);
     }
 
@@ -685,7 +689,7 @@
     _panel_return_if_fail (XFCE_IS_TRAY_WIDGET (tray));
 
     /* ignore if there is already a redraw scheduled */
-    if (tray->idle_redraw_id != 0)
+    if (tray->idle_redraw_id != 0 || tray->button == NULL)
         return;
 
     /* schedule an idle redraw */
@@ -720,7 +724,7 @@
     if (tray->n_hidden_childeren != n_hidden_childeren)
     {
         /* collapse the button if there are no hidden childeren */
-        if (n_hidden_childeren == 0)
+        if (n_hidden_childeren == 0 && tray->button)
             gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tray->button), 
FALSE);
 
         /* set new value */

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to