diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2010-07-30 06:16:49 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2010-07-30 06:16:49 +0000 |
commit | e29900ebe2fadd133dda97ce21be84dd6e8f0bdb (patch) | |
tree | c085ebd8b5198b26341c63ebfb3ddd6d377de020 /src/mainwindow.c | |
parent | 13d01a84fdb1f7243b07741f793de51e4c0d89a5 (diff) |
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
Diffstat (limited to 'src/mainwindow.c')
-rw-r--r-- | src/mainwindow.c | 16 |
1 files changed, 11 insertions, 5 deletions
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) |