diff options
author | Not Zed <NotZed@Ximian.com> | 2003-12-03 08:27:52 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2003-12-03 08:27:52 +0800 |
commit | 33efd90a82fbbbfb3f7645a149cfbfed471596fb (patch) | |
tree | 585cb9db9a30643a658bcf7564ded0b2d7cb928e /mail/em-utils.c | |
parent | ccd5cdcf82c299aba622da4f5f87347aea93d99c (diff) | |
download | gsoc2013-evolution-33efd90a82fbbbfb3f7645a149cfbfed471596fb.tar.gz gsoc2013-evolution-33efd90a82fbbbfb3f7645a149cfbfed471596fb.tar.zst gsoc2013-evolution-33efd90a82fbbbfb3f7645a149cfbfed471596fb.zip |
changed to setup the rule part properly, it could never have worked. Bug
2003-12-03 Not Zed <NotZed@Ximian.com>
* mail-autofilter.c (rule_match_thread): changed to setup the rule
part properly, it could never have worked. Bug #51601.
* em-popup.c (emp_uri_popup_address_add): implement.
* em-folder-view.c (emfv_popup_add_sender): implement.
(emfv_add_sender_addressbook): hook up to above func.
* em-utils.c (em_utils_add_address): implementation to add an
email address to the addressbook.
(emu_add_address_cb): callback required for funny api. Bug
#51321.
svn path=/trunk/; revision=23592
Diffstat (limited to 'mail/em-utils.c')
-rw-r--r-- | mail/em-utils.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c index 6a0712d311..e2da2fa6d3 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -1443,6 +1443,48 @@ em_utils_save_messages (GtkWidget *parent, CamelFolder *folder, GPtrArray *uids) gtk_widget_show((GtkWidget *)filesel); } +/* ********************************************************************** */ + +static void +emu_add_address_cb(BonoboListener *listener, const char *name, const CORBA_any *any, CORBA_Environment *ev, void *data) +{ + char *type = bonobo_event_subtype(name); + + if (!strcmp(type, "Destroy")) + gtk_widget_destroy((GtkWidget *)data); + + g_free(type); +} + +/** + * em_utils_add_address: + * @parent: + * @email: + * + * Add address @email to the addressbook. + **/ +void em_utils_add_address(struct _GtkWidget *parent, const char *email) +{ + GtkWidget *win; + GtkWidget *control; + /*GtkWidget *socket;*/ + + win = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_window_set_title((GtkWindow *)win, _("Add address")); + + control = bonobo_widget_new_control("OAFIID:GNOME_Evolution_Addressbook_AddressPopup:" BASE_VERSION, CORBA_OBJECT_NIL); + bonobo_widget_set_property((BonoboWidget *)control, "email", TC_CORBA_string, email, NULL); + + bonobo_event_source_client_add_listener(bonobo_widget_get_objref((BonoboWidget *)control), emu_add_address_cb, NULL, NULL, win); + + /*socket = find_socket (GTK_CONTAINER (control)); + g_object_weak_ref ((GObject *) socket, (GWeakNotify) gtk_widget_destroy, win);*/ + + gtk_container_add((GtkContainer *)win, control); + gtk_widget_show_all(win); +} + +/* ********************************************************************** */ /* Flag-for-Followup... */ /* tag-editor callback data */ |