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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Aug 16 17:50:46 EEST 2007
Author: lucasr
Date: 2007-08-16 17:50:44 +0300 (Thu, 16 Aug 2007)
New Revision: 13267

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-menu.c
   projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-window.c
   projects/haf/trunk/hildon-desktop/src/hd-switcher-menu.c
Log:
2007-08-16  Lucas Rocha  <lucas.rocha at nokia.com>

	* libhildondesktop/hildon-desktop-popup-window.c: handle delete_event
	on extra panes in order to avoid them to be destroyed by a
	gdk_close_all_temporary_windows() call.
	* src/hd-switcher-menu.c: polished the handling of Home key long and
	short press.


Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-08-16 13:53:35 UTC (rev 13266)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-08-16 14:50:44 UTC (rev 13267)
@@ -1,5 +1,13 @@
 2007-08-16  Lucas Rocha  <lucas.rocha at nokia.com>
 
+	* libhildondesktop/hildon-desktop-popup-window.c: handle delete_event
+	on extra panes in order to avoid them to be destroyed by a
+	gdk_close_all_temporary_windows() call.
+	* src/hd-switcher-menu.c: polished the handling of Home key long and
+	short press.
+
+2007-08-16  Lucas Rocha  <lucas.rocha at nokia.com>
+
 	* libhildondesktop/hildon-desktop-home-item.c: remove default handler
 	for settings signal as it brakes plugins with old API.
 

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-menu.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-menu.c	2007-08-16 13:53:35 UTC (rev 13266)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-menu.c	2007-08-16 14:50:44 UTC (rev 13267)
@@ -292,7 +292,7 @@
 hildon_desktop_popup_menu_finalize (GObject *object)
 {
   g_object_unref (G_OBJECT (HILDON_DESKTOP_POPUP_MENU (object)->priv->box_buttons));
-	
+
   G_OBJECT_CLASS (hildon_desktop_popup_menu_parent_class)->finalize (object);	
 }	
 

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-window.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-window.c	2007-08-16 13:53:35 UTC (rev 13266)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-window.c	2007-08-16 14:50:44 UTC (rev 13267)
@@ -88,6 +88,11 @@
 static gboolean hildon_desktop_popup_window_visibility_notify (GtkWidget          *widget,
 				                               GdkEventVisibility *event,
 			        		               gpointer            data);
+
+static gboolean hildon_desktop_popup_window_pane_delete_event (GtkWidget *widget,
+						  	       GdkEvent  *event,
+							       gpointer   data);
+
 static gboolean hildon_desktop_popup_window_delete_event (GtkWidget *widget,
 							  GdkEvent  *event,
 							  gpointer   data);
@@ -291,6 +296,11 @@
     gtk_window_set_decorated (GTK_WINDOW (popup->priv->extra_panes[i]), FALSE);
 
     gtk_widget_add_events (GTK_WIDGET (popup), GDK_VISIBILITY_NOTIFY_MASK);
+
+    g_signal_connect (popup->priv->extra_panes[i],
+  		      "delete-event",
+  		      G_CALLBACK (hildon_desktop_popup_window_pane_delete_event),
+  		      NULL);
 #endif
     g_object_ref (G_OBJECT (popup->priv->extra_panes[i]));
     gtk_object_sink (GTK_OBJECT (popup->priv->extra_panes[i]));		 
@@ -679,6 +689,14 @@
 }
 
 static gboolean 
+hildon_desktop_popup_window_pane_delete_event (GtkWidget *widget,
+					       GdkEvent *event,
+					       gpointer data)
+{
+  return TRUE;
+}
+
+static gboolean 
 hildon_desktop_popup_window_delete_event (GtkWidget *widget,
 					  GdkEvent *event,
 					  gpointer data)
@@ -786,7 +804,7 @@
   else
   {
      for (i=0; i < popup->priv->n_extra_panes; i++)
-     {	     
+     {
        w = popup->priv->extra_panes[i]->allocation.width;
        h = popup->priv->extra_panes[i]->allocation.height;
 

Modified: projects/haf/trunk/hildon-desktop/src/hd-switcher-menu.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-switcher-menu.c	2007-08-16 13:53:35 UTC (rev 13266)
+++ projects/haf/trunk/hildon-desktop/src/hd-switcher-menu.c	2007-08-16 14:50:44 UTC (rev 13267)
@@ -1503,17 +1503,12 @@
   {
     if (switcher->priv->is_open)	  
       hildon_desktop_popup_window_popdown (switcher->priv->popup_window);
+
     switcher->priv->is_open = FALSE;
+
     return;
-  }   
+  } 
 
-  if (switcher->priv->is_open)
-  {	  
-    hildon_desktop_popup_menu_select_next_item (switcher->priv->menu_applications);
-    hd_wm_debug ("selecting next item");
-    return;
-  }
-    
   hildon_desktop_popup_window_popup 
    (switcher->priv->popup_window,
     hd_switcher_menu_position_func,
@@ -2060,10 +2055,18 @@
 static void 
 hd_switcher_menu_show_menu_cb (HDWM *hdwm, HDSwitcherMenu *switcher)
 {
-  gtk_toggle_button_set_active
-    (GTK_TOGGLE_BUTTON (switcher->priv->toggle_button), TRUE);
-
-  g_signal_emit_by_name (switcher->priv->toggle_button, "toggled");
+  if (switcher->priv->is_open)
+  {	  
+    hildon_desktop_popup_menu_select_next_item (switcher->priv->menu_applications);
+    hd_wm_debug ("selecting next item");
+  }
+  else
+  {
+    gtk_toggle_button_set_active
+      (GTK_TOGGLE_BUTTON (switcher->priv->toggle_button), TRUE);
+  
+    g_signal_emit_by_name (switcher->priv->toggle_button, "toggled");
+  }
 }
 
 static gboolean


More information about the maemo-commits mailing list