+static void
+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));
+}
+