goffice r2105 - in trunk: . goffice/gtk
- From: robsta svn gnome org
- To: svn-commits-list gnome org
- Subject: goffice r2105 - in trunk: . goffice/gtk
- Date: Fri, 13 Jun 2008 11:45:09 +0000 (UTC)
Author: robsta
Date: Fri Jun 13 11:45:09 2008
New Revision: 2105
URL: http://svn.gnome.org/viewvc/goffice?rev=2105&view=rev
Log:
Use plain menu items for toolbar overflow image menu item proxies, so they are displayed correctly with gtk-menu-images=0,
fixes #537541.
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/goffice/gtk/go-color-palette.c
trunk/goffice/gtk/go-combo-pixmaps.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Fri Jun 13 11:45:09 2008
@@ -6,6 +6,10 @@
* Fixed plot types activation/deactivation issues.
* Always use full lines when drawing markers. [#536276]
+Rob Staudinger:
+ * Use plain menu items for toolbar overflow image menu item proxies,
+ so they are displayed correctly with gtk-menu-images=0. [#537541]
+
--------------------------------------------------------------------------
goffice 0.6.3:
Modified: trunk/goffice/gtk/go-color-palette.c
==============================================================================
--- trunk/goffice/gtk/go-color-palette.c (original)
+++ trunk/goffice/gtk/go-color-palette.c Fri Jun 13 11:45:09 2008
@@ -573,9 +573,16 @@
COLOR_PREVIEW_WIDTH, COLOR_PREVIEW_HEIGHT);
gdk_pixbuf_fill (pixbuf, c);
- button = gtk_image_menu_item_new_with_label (label);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (button),
- gtk_image_new_from_pixbuf (pixbuf));
+ if (label && 0 == strcmp (label, " ")) {
+ /* color buttons are created with a label of " " */
+ button = gtk_menu_item_new ();
+ gtk_container_add (GTK_CONTAINER (button),
+ gtk_image_new_from_pixbuf (pixbuf));
+ } else {
+ button = gtk_image_menu_item_new_with_label (label);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (button),
+ gtk_image_new_from_pixbuf (pixbuf));
+ }
g_object_unref (pixbuf);
gtk_widget_show_all (button);
Modified: trunk/goffice/gtk/go-combo-pixmaps.c
==============================================================================
--- trunk/goffice/gtk/go-combo-pixmaps.c (original)
+++ trunk/goffice/gtk/go-combo-pixmaps.c Fri Jun 13 11:45:09 2008
@@ -350,9 +350,9 @@
row = col / menu->cols;
col = col % menu->cols;
- button = gtk_image_menu_item_new_with_label (" ");
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (button),
- gtk_image_new_from_pixbuf ((GdkPixbuf *)pixbuf));
+ button = gtk_menu_item_new ();
+ gtk_container_add (GTK_CONTAINER (button),
+ gtk_image_new_from_pixbuf (pixbuf));
g_object_unref ((GdkPixbuf *)pixbuf);
g_object_set_data (G_OBJECT (button),
"ItemID", GINT_TO_POINTER (id));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]