[maemo-commits] [maemo-commits] r10222 - in projects/haf/trunk/hildon-desktop: . src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Feb 27 13:55:16 EET 2007
Author: lucasr
Date: 2007-02-27 13:55:15 +0200 (Tue, 27 Feb 2007)
New Revision: 10222

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/src/hn-app-button.c
   projects/haf/trunk/hildon-desktop/src/hn-app-switcher.c
Log:
2007-02-27  Lucas Rocha  <lucas.rocha at nokia.com>

	* src/hn-app-button.c: fix weird behavior when switching
	windows with app switcher buttons.


Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-02-27 11:39:44 UTC (rev 10221)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-02-27 11:55:15 UTC (rev 10222)
@@ -1,3 +1,8 @@
+2007-02-27  Lucas Rocha  <lucas.rocha at nokia.com>
+
+	* src/hn-app-button.c: fix weird behavior when switching
+	windows with app switcher buttons.
+
 2007-02-26  Moises Martinez  <moises.martinez at nokia.com>
 	
 	* libhildondesktop/hildon-desktop-notification-manager.h:

Modified: projects/haf/trunk/hildon-desktop/src/hn-app-button.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hn-app-button.c	2007-02-27 11:39:44 UTC (rev 10221)
+++ projects/haf/trunk/hildon-desktop/src/hn-app-button.c	2007-02-27 11:55:15 UTC (rev 10222)
@@ -470,7 +470,7 @@
     {
       HN_DBG ("Retoggling previously toggled button");
 	 
-      gtk_toggle_button_set_active (app_button->priv->prev_button, TRUE);
+      /*gtk_toggle_button_set_active (app_button->priv->prev_button, TRUE);*/
       gtk_toggle_button_toggled (app_button->priv->prev_button);
     }
   
@@ -715,7 +715,6 @@
   HNAppButton *app_button = HN_APP_BUTTON (widget);
   HNAppButtonPrivate *priv = app_button->priv;
   gint x,y;
-  gboolean force_untoggle = FALSE;
   gboolean untoggle = FALSE;
   
   HN_DBG("Button released ...");
@@ -748,30 +747,19 @@
     {
       untoggle = TRUE;
     }
-  else if (priv->info && hd_entry_info_get_n_children (priv->info) == 1)
-    {
-      /* single window application, i.e., no submenu -- have to untogle
-       * the button and wait for MB notification of change in stacking order
-       * to make the toggle permanent
-       */
-      force_untoggle = TRUE;
-    }
     
-  if(untoggle || force_untoggle)
+  if(untoggle)
     {
       if (priv->prev_button)
         {
           HN_DBG ("Retoggling previously toggled button");
-	 
-	  gtk_toggle_button_set_active (priv->prev_button, TRUE);
-	  gtk_toggle_button_toggled (priv->prev_button);
-	}
-
-      if (untoggle)
-        {
-          /* click canceled -- we are done */
-          goto out;
+     
+          gtk_toggle_button_set_active (priv->prev_button, TRUE);
+          gtk_toggle_button_toggled (priv->prev_button);
         }
+  
+      /* click canceled -- we are done */
+      goto out;
     }
   
   hn_app_button_pop_menu (app_button);

Modified: projects/haf/trunk/hildon-desktop/src/hn-app-switcher.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hn-app-switcher.c	2007-02-27 11:39:44 UTC (rev 10221)
+++ projects/haf/trunk/hildon-desktop/src/hn-app-switcher.c	2007-02-27 11:55:15 UTC (rev 10222)
@@ -728,7 +728,6 @@
         g_assert_not_reached ();
     }
   }
-  g_debug ("####################################################################################### %d %d", *x, *y);
 }
 
 
@@ -941,7 +940,6 @@
                                                  menu_button_pressed_timeout,
                                                app_switcher);
                                                
-  
   return TRUE;
 }
 
@@ -1528,7 +1526,7 @@
     gtk_widget_set_sensitive (priv->main_button, TRUE);
     gtk_widget_show (app_image);
   }
-
+  
   return FALSE;
 }
 
@@ -1831,12 +1829,12 @@
 hn_app_switcher_changed_stack_cb (HDWM *hdwm, HDEntryInfo *entry_info, gpointer data)
 {
   HNAppSwitcher	       * app_switcher = HN_APP_SWITCHER (data);
+  HNAppSwitcherPrivate * priv = app_switcher->priv;
   gint                   pos, active_pos;
   GList                * l;
-  HNAppSwitcherPrivate * priv = app_switcher->priv;
   HDEntryInfo          * parent;
   gboolean               active_found = FALSE;
-  
+
   g_debug ("In hn_app_switcher_real_changed_stack");
 
   if (priv->main_menu)
@@ -1867,7 +1865,7 @@
   if (entry_info->type != HD_ENTRY_DESKTOP)  
   {
      parent = hd_entry_info_get_parent (entry_info);
-     
+
      if (!parent)
      {
        g_warning ("Orphan entry info");
@@ -1909,7 +1907,7 @@
       gtk_toggle_button_toggled (app_button);
     }
   }  
-  
+
   /* we do not worry about the urgency hint here, as we will receive a
    * notification when it is cleared from the WM
    */


More information about the maemo-commits mailing list