X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmodest-account-mgr.c;h=6c5f32039d645fd585be1e9c916459050dc774e5;hb=c45f7efd716c1779f74ef6b78a507537828372a9;hp=f42113e4dac3b36ee884b219b44de08e9816464a;hpb=7929406e046ed92142ff337bd9161e6a16e1d04e;p=modest diff --git a/src/modest-account-mgr.c b/src/modest-account-mgr.c index f42113e..6c5f320 100644 --- a/src/modest-account-mgr.c +++ b/src/modest-account-mgr.c @@ -690,11 +690,6 @@ modest_account_mgr_remove_account (ModestAccountMgr * self, 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 */ @@ -708,6 +703,11 @@ modest_account_mgr_remove_account (ModestAccountMgr * self, } 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; } @@ -1540,6 +1540,11 @@ modest_account_mgr_set_display_name (ModestAccountMgr *self, 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, @@ -1547,5 +1552,6 @@ modest_account_mgr_set_display_name (ModestAccountMgr *self, 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); }