bigboard r7251 - trunk/applet



Author: otaylor
Date: Mon Feb  4 21:04:47 2008
New Revision: 7251
URL: http://svn.gnome.org/viewvc/bigboard?rev=7251&view=rev

Log:
Fix a problem where we sent an Unpopout message when the bigboard went away,
  causing the bigboard to go into minimized-mode on --replace (also triggered
  some sort of race in setup code.)


Modified:
   trunk/applet/bigboard-button.c

Modified: trunk/applet/bigboard-button.c
==============================================================================
--- trunk/applet/bigboard-button.c	(original)
+++ trunk/applet/bigboard-button.c	Mon Feb  4 21:04:47 2008
@@ -133,8 +133,7 @@
         PanelAppletOrient orient;
         int size;
 
-        gboolean suppress_popout_set;
-        guint showing_bigboard : 2; /* Represents "unknown" basically */
+        guint showing_bigboard : 1;
         guint button_activate;
 
         GtkIconTheme *icon_theme;
@@ -187,9 +186,7 @@
         }
 
         g_debug ("got bb PoppedOutChanged: %d\n", is_expanded);
-        button_data->suppress_popout_set = TRUE;
         update_showing_bigboard (button_data, is_expanded);
-        button_data->suppress_popout_set = FALSE;
 }
 
 static void
@@ -484,10 +481,12 @@
 update_showing_bigboard (ButtonData        *button_data,
                          gboolean           showing_bigboard)
 {
-        if ((showing_bigboard != FALSE) == button_data->showing_bigboard)
+        showing_bigboard = showing_bigboard != FALSE;
+        
+        if (showing_bigboard == button_data->showing_bigboard)
                 return;
         
-        button_data->showing_bigboard = showing_bigboard != FALSE;
+        button_data->showing_bigboard = showing_bigboard;
         g_debug("Set showing_bigboard=%d", button_data->showing_bigboard);
         
         update_button_state (button_data);
@@ -623,9 +622,7 @@
                                      button_data,
                                      button_data->applet);
 
-        button_data->suppress_popout_set = TRUE;
         update_button_state (button_data);
-        button_data->suppress_popout_set = FALSE;
 }
 
 static void
@@ -996,14 +993,15 @@
 button_toggled_callback (GtkWidget       *button,
                          ButtonData      *button_data)
 {
-        if (button_data->suppress_popout_set)
-        	return;
-        if (button_data->bb_proxy) {
-                if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button))) {
-                        hippo_dbus_proxy_VOID__UINT32 (button_data->bb_proxy, "Popout",
-                                                       gtk_get_current_event_time());
-                } else {
-                        hippo_dbus_proxy_VOID__VOID (button_data->bb_proxy, "Unpopout");
+        gboolean active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button));
+        if (active != button_data->showing_bigboard) {
+                if (button_data->bb_proxy) {
+                        if (active) {
+                                hippo_dbus_proxy_VOID__UINT32 (button_data->bb_proxy, "Popout",
+                                                               gtk_get_current_event_time());
+                        } else {
+                                hippo_dbus_proxy_VOID__VOID (button_data->bb_proxy, "Unpopout");
+                        }
                 }
         }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]