diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2008-08-19 00:18:42 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-08-19 00:18:42 +0800 |
commit | 4187293731274274e4283d9039f6e30c95578118 (patch) | |
tree | ab8ce6e6bc9316846097b827157e0f664cf57634 /shell/e-user-creatable-items-handler.c | |
parent | 28b28bf057056d2aa28458b322319bf679608ae5 (diff) | |
download | gsoc2013-evolution-4187293731274274e4283d9039f6e30c95578118.tar gsoc2013-evolution-4187293731274274e4283d9039f6e30c95578118.tar.gz gsoc2013-evolution-4187293731274274e4283d9039f6e30c95578118.tar.bz2 gsoc2013-evolution-4187293731274274e4283d9039f6e30c95578118.tar.lz gsoc2013-evolution-4187293731274274e4283d9039f6e30c95578118.tar.xz gsoc2013-evolution-4187293731274274e4283d9039f6e30c95578118.tar.zst gsoc2013-evolution-4187293731274274e4283d9039f6e30c95578118.zip |
Merge revisions 35993:36015 from trunk.
Adapt recent "crash recovery" changes to new architecture.
svn path=/branches/kill-bonobo/; revision=36018
Diffstat (limited to 'shell/e-user-creatable-items-handler.c')
-rw-r--r-- | shell/e-user-creatable-items-handler.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/shell/e-user-creatable-items-handler.c b/shell/e-user-creatable-items-handler.c index f18deeb527..24ba4acd39 100644 --- a/shell/e-user-creatable-items-handler.c +++ b/shell/e-user-creatable-items-handler.c @@ -60,6 +60,7 @@ struct _MenuItem { char *tooltip; char *component; GdkPixbuf *icon; + GdkPixbuf *icon_toolbar; }; typedef struct _MenuItem MenuItem; @@ -258,8 +259,13 @@ ensure_menu_items (EUserCreatableItemsHandler *handler) 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 @@ free_menu_items (GSList *menu_items) 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 @@ new_button_change (GConfClient *gconf, 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 @@ setup_toolbar_button (EUserCreatableItemsHandler *handler) 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); |