static gboolean on_zoom_minus_plus_not_implemented (ModestWindow *window);
-static void
-on_account_inserted (TnyAccountStore *accoust_store,
- TnyAccount *account,
- gpointer user_data);
+static void on_account_inserted (TnyAccountStore *accoust_store,
+ TnyAccount *account,
+ gpointer user_data);
-static void
-on_account_removed (TnyAccountStore *accoust_store,
- TnyAccount *account,
- gpointer user_data);
+static void on_account_removed (TnyAccountStore *accoust_store,
+ TnyAccount *account,
+ gpointer user_data);
+
+static void on_account_changed (TnyAccountStore *account_store,
+ TnyAccount *account,
+ gpointer user_data);
static void on_default_account_changed (ModestAccountMgr* mgr,
gpointer user_data);
static void on_refresh_account_action_activated (GtkAction *action,
gpointer user_data);
-static void on_account_updated (ModestAccountMgr* mgr, gchar* account_name,
- gpointer user_data);
-
static void on_send_receive_csm_activated (GtkMenuItem *item,
gpointer user_data);
G_CALLBACK (on_default_account_changed),
self);
- priv->sighandlers =
- modest_signal_mgr_connect (priv->sighandlers,
- G_OBJECT (modest_runtime_get_account_mgr ()),
- "account_updated",
- G_CALLBACK (on_account_updated),
- self);
/* Account store */
priv->sighandlers =
modest_signal_mgr_connect (priv->sighandlers,
+ G_OBJECT (modest_runtime_get_account_store ()),
+ "account_changed",
+ G_CALLBACK (on_account_changed),
+ self);
+
+ priv->sighandlers =
+ modest_signal_mgr_connect (priv->sighandlers,
G_OBJECT (modest_runtime_get_account_store()),
"password_requested",
G_CALLBACK (modest_ui_actions_on_password_requested),
}
static void
-on_account_updated (ModestAccountMgr* mgr,
- gchar* account_name,
+on_account_changed (TnyAccountStore *account_store,
+ TnyAccount *account,
gpointer user_data)
{
ModestMainWindow *win = MODEST_MAIN_WINDOW (user_data);
+ /* We need to refresh the details widget because it could have changed */
if (modest_main_window_get_contents_style(win) == MODEST_MAIN_WINDOW_CONTENTS_STYLE_DETAILS) {
modest_main_window_set_contents_style (win, MODEST_MAIN_WINDOW_CONTENTS_STYLE_DETAILS);
}
+
+ /* Update the menus as well, the account name could be changed */
+ update_menus (MODEST_MAIN_WINDOW (user_data));
}
/*