[Xfce4-commits] r25679 - libxfcegui4/trunk/libxfcegui4
Brian Tarricone
kelnos at xfce.org
Sat May 5 20:23:37 CEST 2007
Author: kelnos
Date: 2007-05-05 18:23:37 +0000 (Sat, 05 May 2007)
New Revision: 25679
Modified:
libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.c
libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.h
Log:
always use GTK_ICON_SIZE_MENU for XfceAppMenuItem icons (bug 3080)
Modified: libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.c
===================================================================
--- libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.c 2007-05-05 18:10:37 UTC (rev 25678)
+++ libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.c 2007-05-05 18:23:37 UTC (rev 25679)
@@ -74,7 +74,7 @@
static void _command_activate_cb(GtkMenuItem *menu_item,
gpointer user_data);
-static guint _xfce_app_menu_item_icon_size = 24;
+static guint _xfce_app_menu_item_icon_size = 0;
G_DEFINE_TYPE(XfceAppMenuItem, xfce_app_menu_item, GTK_TYPE_IMAGE_MENU_ITEM)
@@ -247,6 +247,11 @@
gtk_widget_add_events(GTK_WIDGET(app_menu_item),
GDK_STRUCTURE_MASK | GDK_SUBSTRUCTURE_MASK
| GDK_VISIBILITY_NOTIFY_MASK);
+
+ if(!_xfce_app_menu_item_icon_size) {
+ gtk_icon_size_lookup(GTK_ICON_SIZE_MENU,
+ &_xfce_app_menu_item_icon_size, NULL);
+ }
}
static void
@@ -859,11 +864,14 @@
* with icons. This is a @static method and does not need an instance of
* #XfceAppMenuItem to exist before it is called.
*
+ * Deprecated: This function currently does nothing; the 'menu' icon size
+ * is always used.
+ *
* Since 4.1
**/
void xfce_app_menu_item_set_icon_size(guint icon_size)
{
- _xfce_app_menu_item_icon_size = icon_size;
+ /* deprecated */
}
/**
Modified: libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.h
===================================================================
--- libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.h 2007-05-05 18:10:37 UTC (rev 25678)
+++ libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.h 2007-05-05 18:23:37 UTC (rev 25679)
@@ -101,10 +101,12 @@
#define xfce_app_menu_item_get_image(mi) gtk_image_menu_item_get_image(GTK_IMAGE_MENU_ITEM(mi))
-void xfce_app_menu_item_set_icon_size (guint icon_size);
-
void xfce_app_menu_item_set_icon_theme_name (const gchar *theme_name);
+#ifndef XFCE_DISABLE_DEPRECATED
+void xfce_app_menu_item_set_icon_size (guint icon_size) G_GNUC_DEPRECATED;
+#endif
+
G_END_DECLS
#endif /* !def __XFCE_APP_MENU_ITEM_H__ */
More information about the Xfce4-commits
mailing list