Now adding contacts or not depends on a Global setting
Fixes NB#144914
modest_ui_actions_on_send (GtkWidget *widget, ModestMsgEditWindow *edit_window)
{
TnyTransportAccount *transport_account = NULL;
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;
MsgData *data;
ModestAccountMgr *account_mgr;
gchar *account_name;
g_return_val_if_fail (MODEST_IS_MSG_EDIT_WINDOW(edit_window), TRUE);
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);
return TRUE;
data = modest_msg_edit_window_get_msg_data (edit_window);