aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/eab-gui-util.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2004-01-31 06:52:39 +0800
committerChris Toshok <toshok@src.gnome.org>2004-01-31 06:52:39 +0800
commitde481df1b35a4dfc8b425082a84519e43f92c9e4 (patch)
treeac7af4c967ea08687eec0ab406b6129470d28e03 /addressbook/gui/widgets/eab-gui-util.c
parentf06004a362ac6bb3bc3248653b5db266d554eb15 (diff)
downloadgsoc2013-evolution-de481df1b35a4dfc8b425082a84519e43f92c9e4.tar
gsoc2013-evolution-de481df1b35a4dfc8b425082a84519e43f92c9e4.tar.gz
gsoc2013-evolution-de481df1b35a4dfc8b425082a84519e43f92c9e4.tar.bz2
gsoc2013-evolution-de481df1b35a4dfc8b425082a84519e43f92c9e4.tar.lz
gsoc2013-evolution-de481df1b35a4dfc8b425082a84519e43f92c9e4.tar.xz
gsoc2013-evolution-de481df1b35a4dfc8b425082a84519e43f92c9e4.tar.zst
gsoc2013-evolution-de481df1b35a4dfc8b425082a84519e43f92c9e4.zip
enable d&d drop photos.
2004-01-30 Chris Toshok <toshok@ximian.com> * gui/contact-editor/e-contact-editor.c: enable d&d drop photos. * gui/contact-editor/contact-editor.glade: use eab_create_image_chooser_widget for the d&d'able image. * gui/contact-list-editor/e-contact-list-editor.c: abstract out all the d&d image support (it's now in widgets/misc/e-image-chooser.[ch]). * gui/contact-list-editor/contact-list-editor.glade: use eab_create_image_chooser_widget for the d&d'able image. * gui/widgets/eab-gui-util.c (eab_create_image_chooser_widget): new function. * gui/widgets/eab-gui-util.h: add prototype for eab_create_image_chooser_widget. svn path=/trunk/; revision=24553
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;
+}