From 27366302199abf9bfa86a10d1c7aaf8a53d46fb9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sergio=20Villar=20Sen=C3=ADn?= Date: Thu, 26 Nov 2009 12:05:28 +0100 Subject: [PATCH] Add support to automatically add contacts to abook when sending message Now adding contacts or not depends on a Global setting Fixes NB#144914 --- src/modest-ui-actions.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index fccb9b7..c7eabb5 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -2639,7 +2639,7 @@ gboolean modest_ui_actions_on_send (GtkWidget *widget, ModestMsgEditWindow *edit_window) { TnyTransportAccount *transport_account = NULL; - gboolean had_error = FALSE; + gboolean had_error = FALSE, add_to_contacts; MsgData *data; ModestAccountMgr *account_mgr; gchar *account_name; @@ -2648,8 +2648,10 @@ modest_ui_actions_on_send (GtkWidget *widget, ModestMsgEditWindow *edit_window) g_return_val_if_fail (MODEST_IS_MSG_EDIT_WINDOW(edit_window), TRUE); - /* Check names but do not automatically add them to addressbook */ - if (!modest_msg_edit_window_check_names (edit_window, FALSE)) + /* Check whether to automatically add new contacts to addressbook or not */ + add_to_contacts = modest_conf_get_bool (modest_runtime_get_conf (), + MODEST_CONF_AUTO_ADD_TO_CONTACTS, NULL); + if (!modest_msg_edit_window_check_names (edit_window, add_to_contacts)) return TRUE; data = modest_msg_edit_window_get_msg_data (edit_window); -- 1.7.9.5