aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/eab-gui-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/widgets/eab-gui-util.c')
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index 038c1454fc..2459b5c483 100644
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ b/addressbook/gui/widgets/eab-gui-util.c
@@ -30,6 +30,7 @@
#include "eab-gui-util.h"
#include "util/eab-book-util.h"
#include "util/eab-destination.h"
+#include "widgets/misc/e-image-chooser.h"
#include "widgets/misc/e-source-selector.h"
#include <gnome.h>
@@ -859,3 +860,26 @@ eab_send_contact (EContact *contact, EABDisposition disposition)
eab_send_contact_list (list, disposition);
g_list_free (list);
}
+
+GtkWidget *
+eab_create_image_chooser_widget(gchar *name,
+ gchar *string1, gchar *string2,
+ gint int1, gint int2)
+{
+ char *filename;
+ GtkWidget *w = NULL;
+ if (string1) {
+ if (*string1 == '/')
+ filename = g_strdup(string1);
+ else
+ filename = g_build_filename (EVOLUTION_IMAGESDIR, string1, NULL);
+
+ w = e_image_chooser_new ();
+ e_image_chooser_set_from_file (E_IMAGE_CHOOSER (w), filename);
+
+ gtk_widget_show_all (w);
+ g_free (filename);
+ }
+
+ return w;
+}