deleted account */
modest_account_mgr_set_first_account_as_default (self);
}
-
- /* Notify the observers. We do this *after* deleting
- the keys, because otherwise a call to account_names
- will retrieve also the deleted account */
- g_signal_emit (G_OBJECT(self), signals[ACCOUNT_REMOVED_SIGNAL], 0, name);
/* if this was the last account, stop any auto-updating */
/* (re)set the automatic account update */
} else
modest_account_mgr_free_account_names (acc_names);
+ /* Notify the observers. We do this *after* deleting
+ the keys, because otherwise a call to account_names
+ will retrieve also the deleted account */
+ g_signal_emit (G_OBJECT(self), signals[ACCOUNT_REMOVED_SIGNAL], 0, name);
+
return TRUE;
}
const gchar *account_name,
const gchar *display_name)
{
+ gboolean notify = TRUE;
+
+ if (!modest_account_mgr_get_display_name (self, account_name))
+ notify = FALSE;
+
modest_account_mgr_set_string (self,
account_name,
MODEST_ACCOUNT_DISPLAY_NAME,
FALSE /* not server account */);
/* Notify about the change in the display name */
- g_signal_emit (self, signals[DISPLAY_NAME_CHANGED_SIGNAL], 0, account_name);
+ if (notify)
+ g_signal_emit (self, signals[DISPLAY_NAME_CHANGED_SIGNAL], 0, account_name);
}