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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Jun 1 16:14:08 EEST 2007
Author: lucasr
Date: 2007-06-01 16:14:07 +0300 (Fri, 01 Jun 2007)
New Revision: 12042

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c
Log:
2007-06-01  Lucas Rocha  <lucas.rocha at nokia.com>

	* src/hd-applications-menu.c: provided alternative menu items to
	make the menu work properly while we don't fix the nasty popup menu
	bug.


Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-06-01 13:02:39 UTC (rev 12041)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-06-01 13:14:07 UTC (rev 12042)
@@ -1,3 +1,9 @@
+2007-06-01  Lucas Rocha  <lucas.rocha at nokia.com>
+
+	* src/hd-applications-menu.c: provided alternative menu items to
+	make the menu work properly while we don't fix the nasty popup menu
+	bug.
+
 2007-06-01  Johan Bilien  <johan.bilien at nokia.com>
 
 	* configure.ac: 0.0.16

Modified: projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c
===================================================================
--- projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c	2007-06-01 13:02:39 UTC (rev 12041)
+++ projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c	2007-06-01 13:14:07 UTC (rev 12042)
@@ -610,11 +610,15 @@
     }
     else if (level > 0)
     {
+#if 0
       /* Application */
       menu_item = gtk_image_menu_item_new_with_label (
                                 (item_text_domain && *item_text_domain) ?
                                 dgettext(item_text_domain, item_name) : _(item_name));
-
+#else
+      menu_item = gtk_menu_item_new ();
+#endif
+      
       GTK_WIDGET_SET_FLAGS (menu_item, GTK_CAN_FOCUS);
 
       gtk_widget_set_name (GTK_WIDGET (menu_item), HD_APPS_MENU_APP_MENU_ITEM_NAME);
@@ -625,12 +629,41 @@
       		              MENU_ITEM_ICON_SIZE);
       }
 
+      if (item_icon)
+      {
+#if 0
       /* FIXME: disable icons on application while we don't fix the 
        * crash related to toggle area sizing in the menu items. */
-      if (!item_icon)
-      {
         gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item),
             		               gtk_image_new_from_pixbuf (item_icon));
+#else
+        GtkWidget *hbox, *image, *label;
+	
+	hbox = gtk_hbox_new (FALSE, 0);
+
+	image = gtk_image_new_from_pixbuf (item_icon);
+	
+	gtk_box_pack_start (GTK_BOX (hbox),
+			    image, 
+			    FALSE, 
+			    FALSE, 
+			    15);
+
+        label = gtk_label_new ((item_text_domain && *item_text_domain) ?
+			        dgettext(item_text_domain, item_name) : _(item_name)), 
+
+        gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+	
+	gtk_box_pack_start (GTK_BOX (hbox),
+			    label,
+			    TRUE, 
+			    TRUE, 
+			    0);
+
+	gtk_container_add (GTK_CONTAINER (menu_item), hbox);
+
+	gtk_widget_show_all (hbox);
+#endif
       }
 
       g_object_set_data_full (G_OBJECT (menu_item),


More information about the maemo-commits mailing list