evolution r36007 - trunk/shell



Author: msuman
Date: Mon Aug 18 04:05:13 2008
New Revision: 36007
URL: http://svn.gnome.org/viewvc/evolution?rev=36007&view=rev

Log:
Milan Crha  <mcrha redhat com> ** Fix for bug #416258 (Evolution "New Mail" icon is wrong size).

Modified:
   trunk/shell/ChangeLog
   trunk/shell/e-user-creatable-items-handler.c

Modified: trunk/shell/e-user-creatable-items-handler.c
==============================================================================
--- trunk/shell/e-user-creatable-items-handler.c	(original)
+++ trunk/shell/e-user-creatable-items-handler.c	Mon Aug 18 04:05:13 2008
@@ -60,6 +60,7 @@
 	char *tooltip;
 	char *component;
 	GdkPixbuf *icon;
+	GdkPixbuf *icon_toolbar;
 };
 typedef struct _MenuItem MenuItem;
 
@@ -258,8 +259,13 @@
 
 				if (corba_item->iconName == NULL || *corba_item->iconName == '\0') {
 					item->icon = NULL;
+					item->icon_toolbar = NULL;
 				} else {
 					item->icon = e_icon_factory_get_icon (corba_item->iconName, E_ICON_SIZE_MENU);
+					if (item_is_default (item, component->alias))
+						item->icon_toolbar = e_icon_factory_get_icon (corba_item->iconName, E_ICON_SIZE_LARGE_TOOLBAR);
+					else
+						item->icon_toolbar = NULL;
 				}
 
 				if (corba_item->type == GNOME_Evolution_CREATABLE_OBJECT)
@@ -304,6 +310,9 @@
 		if (item->icon != NULL)
 			g_object_unref (item->icon);
 
+		if (item->icon_toolbar != NULL)
+			g_object_unref (item->icon_toolbar);
+
 		g_free (item->component);
 		g_free (item);
 	}
@@ -698,7 +707,7 @@
 	val = gconf_client_get_string (gconf, "/desktop/gnome/interface/toolbar_style", NULL);
 
 	set_combo_button_style (E_COMBO_BUTTON (priv->new_button),
-				val, priv->default_menu_item->icon);
+				val, priv->default_menu_item->icon_toolbar ? priv->default_menu_item->icon_toolbar : priv->default_menu_item->icon);
 
 	g_free (val);
 	gtk_widget_show (priv->new_button);
@@ -738,7 +747,7 @@
 	gtk_widget_set_sensitive (priv->new_button, TRUE);
 
 	set_combo_button_style (E_COMBO_BUTTON (priv->new_button),
-				val, priv->default_menu_item->icon);
+				val, priv->default_menu_item->icon_toolbar ? priv->default_menu_item->icon_toolbar : priv->default_menu_item->icon);
 
 	gconf_client_notify_add(gconf,"/desktop/gnome/interface/toolbar_style",
 		(GConfClientNotifyFunc)new_button_change, handler, NULL, NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]