talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit e5a059330156212c1d83eb5e4af86a66a103df7d
parent 9af57a8c0c6d4908bc422596bc57cbf74ee6bf2f
Author: wwp <wwp@free.fr>
Date:   Fri,  4 May 2018 09:04:04 +0200

Don't manage account list focus state when closing an account edit window,
when this window has been called from main window's "Preferences for
current account" menu item.
Closes bug #4022: Closing "Account Preferences" window opens "Edit Accounts"
window if "Edit Accounts" window has been opened before at least once.

Diffstat:
Msrc/account.c | 7++++---
Msrc/account.h | 2+-
Msrc/mainwindow.c | 2+-
3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/account.c b/src/account.c @@ -450,7 +450,7 @@ void account_add(void) } } -void account_open(PrefsAccount *ac_prefs) +void account_open(PrefsAccount *ac_prefs, gboolean called_from_acc_list) { gboolean prev_default; gchar *ac_name, *old_prefix, *new_prefix; @@ -471,7 +471,8 @@ void account_open(PrefsAccount *ac_prefs) prefs_account_open(ac_prefs, &account_dirty); - account_edit_focus(); + if (called_from_acc_list) + account_edit_focus(); if (account_dirty) { if (!prev_default && ac_prefs->is_default) @@ -862,7 +863,7 @@ static void account_edit_prefs(GtkWidget *widget, gpointer data) ac_prefs = account_list_view_get_selected_account(edit_account.list_view); if (ac_prefs) { - account_open(ac_prefs); + account_open(ac_prefs, TRUE); account_list_view_set(); } } diff --git a/src/account.h b/src/account.h @@ -60,7 +60,7 @@ GList *account_get_list (void); void account_edit_open (gpointer a, gpointer b); void account_add (void); -void account_open (PrefsAccount *ac_prefs); +void account_open (PrefsAccount *ac_prefs, gboolean called_from_acc_list); void account_set_as_recv_at_get_all (PrefsAccount *ac_prefs); PrefsAccount *account_get_default (void); diff --git a/src/mainwindow.c b/src/mainwindow.c @@ -5073,7 +5073,7 @@ static void prefs_account_open_cb(GtkAction *action, gpointer data) if (!cur_account) { new_account_cb(NULL, mainwin); } else { - account_open(cur_account); + account_open(cur_account, FALSE); } }