aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-02-22 10:22:43 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-02-22 10:22:43 +0800
commitbaf32e6a42c8d1997ff12658c16ec617cab65d0d (patch)
tree15b318f491ca41cba0e3fcc93bebda42c3063cbc /addressbook/gui
parentea56ff65a2dd18ca6344c004c3aa10cc4985e821 (diff)
downloadgsoc2013-evolution-baf32e6a42c8d1997ff12658c16ec617cab65d0d.tar
gsoc2013-evolution-baf32e6a42c8d1997ff12658c16ec617cab65d0d.tar.gz
gsoc2013-evolution-baf32e6a42c8d1997ff12658c16ec617cab65d0d.tar.bz2
gsoc2013-evolution-baf32e6a42c8d1997ff12658c16ec617cab65d0d.tar.lz
gsoc2013-evolution-baf32e6a42c8d1997ff12658c16ec617cab65d0d.tar.xz
gsoc2013-evolution-baf32e6a42c8d1997ff12658c16ec617cab65d0d.tar.zst
gsoc2013-evolution-baf32e6a42c8d1997ff12658c16ec617cab65d0d.zip
Define $(iconsdir).
* gui/component/Makefile.am: Define $(iconsdir). * gui/component/addressbook-component.c (add_creatable_item): New helper function. (create_component): Add the icons for the user creatable items as well. svn path=/trunk/; revision=15789
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);