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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Sep 6 19:40:57 EEST 2007
Author: jobi
Date: 2007-09-06 19:40:56 +0300 (Thu, 06 Sep 2007)
New Revision: 13652

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-menu.c
Log:

2007-09-06 Johan Bilien  <johan.bilien at nokia.com>

	* libhildondesktop/hildon-desktop-popup-menu.c: do not paint
	the ViewPorts as their background already have the right color



Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-09-06 16:19:10 UTC (rev 13651)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-09-06 16:40:56 UTC (rev 13652)
@@ -1,3 +1,8 @@
+2007-09-06 Johan Bilien  <johan.bilien at nokia.com>
+
+	* libhildondesktop/hildon-desktop-popup-menu.c: do not paint
+	the ViewPorts as their background already have the right color
+
 2007-09-06  Lucas Rocha  <lucas.rocha at nokia.com>
 
 	* src/hd-switcher-menu.c (hd_switcher_menu_refresh_application_items,

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-menu.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-menu.c	2007-09-06 16:19:10 UTC (rev 13651)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-popup-menu.c	2007-09-06 16:40:56 UTC (rev 13652)
@@ -205,10 +205,32 @@
 }
 
 static gboolean
-hildon_desktop_popup_menu_paint (GtkWidget      *widget,
-                                 GdkEventExpose *event,
-                                 gpointer        user_data)
+hildon_desktop_popup_menu_paint_viewport (GtkWidget      *widget,
+                                          GdkEventExpose *event,
+                                          gpointer        user_data)
 {
+  static GtkWidgetClass *parent_class = NULL;
+
+  if (!parent_class)
+    parent_class =
+        GTK_WIDGET_CLASS (g_type_class_peek_parent (GTK_VIEWPORT_GET_CLASS (widget)));
+
+  parent_class->expose_event (widget, event);
+
+  return TRUE;
+}
+
+static gboolean
+hildon_desktop_popup_menu_paint_pane (GtkWidget      *widget,
+                                      GdkEventExpose *event,
+                                      gpointer        user_data)
+{
+  static GtkWidgetClass *parent_class = NULL;
+
+  if (!parent_class)
+    parent_class =
+        GTK_WIDGET_CLASS (g_type_class_peek_parent (GTK_VBOX_GET_CLASS (widget)));
+
   gtk_paint_box (widget->style,
                  widget->window,
                  GTK_STATE_NORMAL,
@@ -221,7 +243,9 @@
                  widget->allocation.width,
                  widget->allocation.height);
 
-  return FALSE;
+  parent_class->expose_event (widget, event);
+
+  return TRUE;
 }
 
 static GObject *
@@ -330,12 +354,12 @@
 
   g_signal_connect (menu,
                     "expose_event",
-                    G_CALLBACK (hildon_desktop_popup_menu_paint), 
+                    G_CALLBACK (hildon_desktop_popup_menu_paint_pane), 
                     NULL);
   
   g_signal_connect (menu->priv->viewport,
                     "expose_event",
-                    G_CALLBACK (hildon_desktop_popup_menu_paint), 
+                    G_CALLBACK (hildon_desktop_popup_menu_paint_viewport), 
                     NULL);
   
   return object;


More information about the maemo-commits mailing list