From e29900ebe2fadd133dda97ce21be84dd6e8f0bdb Mon Sep 17 00:00:00 2001 From: hiro Date: Fri, 30 Jul 2010 06:16:49 +0000 Subject: added new global option 'Change current account on folder open'. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2649 ee746299-78ed-0310-b773-934348b2243d --- src/mainwindow.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/mainwindow.c') diff --git a/src/mainwindow.c b/src/mainwindow.c index b00fb148..c1329202 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -1408,6 +1408,16 @@ static void main_window_show_cur_account(MainWindow *mainwin) g_free(ac_name); } +void main_window_change_cur_account(void) +{ + MainWindow *mainwin; + + mainwin = main_window_get(); + main_window_show_cur_account(mainwin); + main_window_set_menu_sensitive(mainwin); + main_window_set_toolbar_sensitive(mainwin); +} + MainWindow *main_window_get(void) { if (mainwin_list) @@ -3957,12 +3967,8 @@ static void new_account_cb(MainWindow *mainwin, guint action, static void account_selector_menu_cb(GtkMenuItem *menuitem, gpointer data) { - MainWindow *mainwin = main_window_get(); - cur_account = (PrefsAccount *)data; - main_window_show_cur_account(mainwin); - main_window_set_menu_sensitive(mainwin); - main_window_set_toolbar_sensitive(mainwin); + main_window_change_cur_account(); } static void account_receive_menu_cb(GtkMenuItem *menuitem, gpointer data) -- cgit v1.2.3