aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-view.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-12-03 08:27:52 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-12-03 08:27:52 +0800
commit33efd90a82fbbbfb3f7645a149cfbfed471596fb (patch)
tree585cb9db9a30643a658bcf7564ded0b2d7cb928e /mail/em-folder-view.c
parentccd5cdcf82c299aba622da4f5f87347aea93d99c (diff)
downloadgsoc2013-evolution-33efd90a82fbbbfb3f7645a149cfbfed471596fb.tar
gsoc2013-evolution-33efd90a82fbbbfb3f7645a149cfbfed471596fb.tar.gz
gsoc2013-evolution-33efd90a82fbbbfb3f7645a149cfbfed471596fb.tar.bz2
gsoc2013-evolution-33efd90a82fbbbfb3f7645a149cfbfed471596fb.tar.lz
gsoc2013-evolution-33efd90a82fbbbfb3f7645a149cfbfed471596fb.tar.xz
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-folder-view.c')
-rw-r--r--mail/em-folder-view.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index 602993e8f9..ca3df84be6 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -630,8 +630,17 @@ emfv_popup_label_set(GtkWidget *w, struct _emfv_label_item *item)
static void
emfv_popup_add_sender(GtkWidget *w, EMFolderView *emfv)
{
- /* FIXME */
- printf("UNIMPLEMENTED: add sender to addressbook\n");
+ GPtrArray *uids = message_list_get_selected(emfv->list);
+ CamelMessageInfo *info;
+ const char *addr;
+
+ if (uids->len == 1
+ && (info = camel_folder_get_message_info(emfv->folder, uids->pdata[0])) != NULL
+ && (addr = camel_message_info_from(info)) != NULL
+ && addr[0] != 0)
+ em_utils_add_address((GtkWidget *)emfv, addr);
+
+ em_utils_uids_free(uids);
}
static void
@@ -824,6 +833,7 @@ from(BonoboUIComponent *uid, void *data, const char *path) \
to(NULL, (EMFolderView *)data); \
}
+EMFV_MAP_CALLBACK(emfv_add_sender_addressbook, emfv_popup_add_sender)
EMFV_MAP_CALLBACK(emfv_message_apply_filters, emfv_popup_apply_filters)
EMFV_MAP_CALLBACK(emfv_message_copy, emfv_popup_copy)
EMFV_MAP_CALLBACK(emfv_message_move, emfv_popup_move)
@@ -934,15 +944,6 @@ emfv_mail_previous_unread(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfv_add_sender_addressbook(BonoboUIComponent *uid, void *data, const char *path)
-{
- EMFolderView *emfv = data;
-
- emfv = emfv;
- /* FIXME: need to find out what the new addressbook API is for this... */
-}
-
-static void
emfv_message_forward_attached (BonoboUIComponent *uic, void *data, const char *path)
{
EMFolderView *emfv = data;