diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2008-08-07 22:29:49 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-08-07 22:29:49 +0800 |
commit | c714d8efd156f22661de6d2055e82522de17b382 (patch) | |
tree | 930cb413b6fe34f44a648173f05866e9e2205491 /shell/e-component-registry.c | |
parent | 92bc398f6b596236019c34029f85fac5c6449e20 (diff) | |
download | gsoc2013-evolution-c714d8efd156f22661de6d2055e82522de17b382.tar.gz gsoc2013-evolution-c714d8efd156f22661de6d2055e82522de17b382.tar.zst gsoc2013-evolution-c714d8efd156f22661de6d2055e82522de17b382.zip |
** Fixes bug #467115
2008-08-07 Matthew Barnes <mbarnes@redhat.com>
** Fixes bug #467115
* shell/e-component-registry.h:
Replace button and menu icon pixbufs with an icon name string.
* shell/e-component-registry.c (query_components):
No need to create pixbufs, just save the icon name.
* shell/e-sidebar.c:
Remember a default icon name rather than a default pixbuf.
* shell/e-sidebar.c (e_sidebar_add_button),
(e_sidebar_change_button_icon):
* shell/e-shell-window.c (e_shell_window_change_component_button_icon):
Take an icon name instead of a pixbuf.
* shell/e-shell-window.c (switch_view):
Call gtk_window_set_icon_name() instead of gtk_window_set_icon().
* shell/e-shell-window.c (setup_widgets):
Change XML from pixtype="pixbuf" to pixbuf="filename" and derive
an appropriate filename from the icon name.
svn path=/trunk/; revision=35924
Diffstat (limited to 'shell/e-component-registry.c')
-rw-r--r-- | shell/e-component-registry.c | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/shell/e-component-registry.c b/shell/e-component-registry.c index ebb4cd9b9c..146ceb26a6 100644 --- a/shell/e-component-registry.c +++ b/shell/e-component-registry.c @@ -54,9 +54,8 @@ component_info_new (const char *id, const char *button_tooltips, const char *menu_label, const char *menu_accelerator, - int sort_order, - GdkPixbuf *button_icon, - GdkPixbuf *menu_icon) + const char *icon_name, + int sort_order) { EComponentInfo *info = g_new0 (EComponentInfo, 1); @@ -67,16 +66,9 @@ component_info_new (const char *id, info->button_tooltips = g_strdup (button_tooltips); info->menu_label = g_strdup (menu_label); info->menu_accelerator = g_strdup (menu_accelerator); + info->icon_name = g_strdup (icon_name); info->sort_order = sort_order; - info->button_icon = button_icon; - if (info->button_icon) - g_object_ref (info->button_icon); - - info->menu_icon = menu_icon; - if (info->menu_icon) - g_object_ref (info->menu_icon); - return info; } @@ -90,12 +82,6 @@ component_info_free (EComponentInfo *info) g_free (info->menu_label); g_free (info->menu_accelerator); - if (info->button_icon) - g_object_unref (info->button_icon); - - if (info->menu_icon) - g_object_unref (info->menu_icon); - if (info->iface != NULL) bonobo_object_release_unref (info->iface, NULL); @@ -183,7 +169,6 @@ query_components (EComponentRegistry *registry) const char *icon_name; const char *sort_order_string; const char *tooltips; - GdkPixbuf *icon = NULL, *menuicon = NULL; EComponentInfo *info; int sort_order; GNOME_Evolution_Component iface; @@ -211,10 +196,6 @@ query_components (EComponentRegistry *registry) alias = bonobo_server_info_prop_lookup (& info_list->_buffer[i], "evolution:component_alias", NULL); icon_name = bonobo_server_info_prop_lookup (& info_list->_buffer[i], "evolution:button_icon", NULL); - if (icon_name) { - icon = e_icon_factory_get_icon (icon_name, E_ICON_SIZE_LARGE_TOOLBAR); - menuicon = e_icon_factory_get_icon (icon_name, E_ICON_SIZE_MENU); - } sort_order_string = bonobo_server_info_prop_lookup (& info_list->_buffer[i], "evolution:button_sort_order", NULL); @@ -224,15 +205,11 @@ query_components (EComponentRegistry *registry) sort_order = atoi (sort_order_string); info = component_info_new (id, iface, alias, label, tooltips, menu_label, - menu_accelerator, sort_order, icon, menuicon); + menu_accelerator, icon_name, sort_order); set_schemas (info, & info_list->_buffer [i]); registry->priv->infos = g_slist_prepend (registry->priv->infos, info); - if (icon != NULL) - g_object_unref (icon); - if (menuicon != NULL) - g_object_unref (menuicon); bonobo_object_release_unref(iface, NULL); } g_slist_free(languages); |