aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/component/Makefile.am3
-rw-r--r--addressbook/gui/component/addressbook-component.c43
2 files changed, 39 insertions, 7 deletions
diff --git a/addressbook/gui/component/Makefile.am b/addressbook/gui/component/Makefile.am
index 0916f75f98..c68aa8fd63 100644
--- a/addressbook/gui/component/Makefile.am
+++ b/addressbook/gui/component/Makefile.am
@@ -21,7 +21,6 @@ INCLUDES = \
-DEVOLUTION_IMAGESDIR=\""$(datadir)"/images/evolution\" \
$(EVOLUTION_ADDRESSBOOK_CFLAGS)
-
bin_PROGRAMS = \
evolution-addressbook
@@ -73,6 +72,8 @@ oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
gladedir = $(datadir)/evolution/glade
glade_DATA = addressbook-config.glade
+iconsdir = $(datadir)/images/evolution
+
EXTRA_DIST = \
$(glade_DATA) \
$(oaf_DATA) \
diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c
index 766d655b39..7ff0f05770 100644
--- a/addressbook/gui/component/addressbook-component.c
+++ b/addressbook/gui/component/addressbook-component.c
@@ -503,6 +503,37 @@ destination_folder_handle_drop (EvolutionShellComponentDndDestinationFolder *fol
/* The factory function. */
+static void
+add_creatable_item (EvolutionShellComponent *shell_component,
+ const char *id,
+ const char *description,
+ const char *menu_description,
+ char menu_shortcut,
+ const char *icon_name)
+{
+ char *icon_path;
+ GdkPixbuf *icon;
+
+ if (icon_name == NULL) {
+ icon_path = NULL;
+ icon = NULL;
+ } else {
+ icon_path = g_concat_dir_and_file (EVOLUTION_ICONSDIR, icon_name);
+ icon = gdk_pixbuf_new_from_file (icon_path);
+ }
+
+ evolution_shell_component_add_user_creatable_item (shell_component,
+ id,
+ description,
+ menu_description,
+ menu_shortcut,
+ icon);
+
+ if (icon != NULL)
+ gdk_pixbuf_unref (icon);
+ g_free (icon_path);
+}
+
static BonoboObject *
create_component (void)
{
@@ -523,12 +554,12 @@ create_component (void)
bonobo_object_add_interface (BONOBO_OBJECT (shell_component),
BONOBO_OBJECT (destination_interface));
- evolution_shell_component_add_user_creatable_item (shell_component, "contact",
- _("New Contact"), _("_Contact"), 'c',
- NULL);
- evolution_shell_component_add_user_creatable_item (shell_component, "contact_list",
- _("New Contact List"), _("Contact _List"), 'l',
- NULL);
+ add_creatable_item (shell_component, "contact",
+ _("New Contact"), _("_Contact"), 'c',
+ "evolution-contacts-mini.png");
+ add_creatable_item (shell_component, "contact_list",
+ _("New Contact List"), _("Contact _List"), 'l',
+ "all_contacts.xpm");
gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set",
GTK_SIGNAL_FUNC (owner_set_cb), NULL);