aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-component-registry.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-10-23 08:20:01 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-10-23 08:20:01 +0800
commit0935ca72c9f6d2d0a8df816cc8973abc660e9630 (patch)
tree8b09ee92238abb6a6e427bf706602d0a54eed3b8 /shell/e-component-registry.c
parentabb1418197b7a28a83a005da765aa62e3c2aaa1c (diff)
downloadgsoc2013-evolution-0935ca72c9f6d2d0a8df816cc8973abc660e9630.tar
gsoc2013-evolution-0935ca72c9f6d2d0a8df816cc8973abc660e9630.tar.gz
gsoc2013-evolution-0935ca72c9f6d2d0a8df816cc8973abc660e9630.tar.bz2
gsoc2013-evolution-0935ca72c9f6d2d0a8df816cc8973abc660e9630.tar.lz
gsoc2013-evolution-0935ca72c9f6d2d0a8df816cc8973abc660e9630.tar.xz
gsoc2013-evolution-0935ca72c9f6d2d0a8df816cc8973abc660e9630.tar.zst
gsoc2013-evolution-0935ca72c9f6d2d0a8df816cc8973abc660e9630.zip
Add a little border to the buttons so it looks nicer.
* e-sidebar.c (e_sidebar_add_button): Add a little border to the buttons so it looks nicer. * e-component-registry.c (query_components): Set an icon from the "evolution:button_icon" attribute. svn path=/trunk/; revision=23023
Diffstat (limited to 'shell/e-component-registry.c')
-rw-r--r--shell/e-component-registry.c34
1 files changed, 26 insertions, 8 deletions
diff --git a/shell/e-component-registry.c b/shell/e-component-registry.c
index 72ee37c334..e5e48aadc4 100644
--- a/shell/e-component-registry.c
+++ b/shell/e-component-registry.c
@@ -26,6 +26,8 @@
#include "e-component-registry.h"
+#include "e-shell-utils.h"
+
#include "e-util/e-lang-utils.h"
#include <gal/util/e-util.h>
@@ -113,22 +115,38 @@ query_components (EComponentRegistry *registry)
language_list = e_get_language_list ();
for (i = 0; i < info_list->_length; i++) {
- const char *id = info_list->_buffer[i].iid;
- const char *label = bonobo_server_info_prop_lookup (& info_list->_buffer[i],
- "evolution:button_label",
- language_list);
- const char *sort_order_string = bonobo_server_info_prop_lookup (& info_list->_buffer[i],
- "evolution:button_sort_order",
- NULL);
+ const char *id;
+ const char *label;
+ const char *icon_name;
+ const char *sort_order_string;
+ GdkPixbuf *icon;
int sort_order;
+ id = info_list->_buffer[i].iid;
+ label = bonobo_server_info_prop_lookup (& info_list->_buffer[i], "evolution:button_label", language_list);
+
+ icon_name = bonobo_server_info_prop_lookup (& info_list->_buffer[i], "evolution:button_icon", NULL);
+ if (icon_name == NULL) {
+ icon = NULL;
+ g_print ("no icon for %s\n", id);
+ } else {
+ char *full_path = e_shell_get_icon_path (icon_name, TRUE);
+ g_print ("icon %s\n", full_path);
+ icon = gdk_pixbuf_new_from_file (full_path, NULL);
+ }
+
+ sort_order_string = bonobo_server_info_prop_lookup (& info_list->_buffer[i],
+ "evolution:button_sort_order", NULL);
if (sort_order_string == NULL)
sort_order = 0;
else
sort_order = atoi (sort_order_string);
registry->priv->infos = g_slist_prepend (registry->priv->infos,
- component_info_new (id, label, sort_order, NULL));
+ component_info_new (id, label, sort_order, icon));
+
+ if (icon != NULL)
+ g_object_unref (icon);
}
CORBA_free (info_list);