[Commits] [SCM] claws branch, master, updated. 3.16.0-144-ge5a0593

wwp at claws-mail.org wwp at claws-mail.org
Fri May 4 09:04:37 CEST 2018


The branch, master has been updated
       via  e5a059330156212c1d83eb5e4af86a66a103df7d (commit)
      from  9af57a8c0c6d4908bc422596bc57cbf74ee6bf2f (commit)

Summary of changes:
 src/account.c    |    7 ++++---
 src/account.h    |    2 +-
 src/mainwindow.c |    2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)


- Log -----------------------------------------------------------------
commit e5a059330156212c1d83eb5e4af86a66a103df7d
Author: wwp <wwp at free.fr>
Date:   Fri May 4 09:04:04 2018 +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.

diff --git a/src/account.c b/src/account.c
index be5967f..527b16d 100644
--- 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
index e7c7760..4462f66 100644
--- 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
index 42de186..4f56588 100644
--- 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);
 	}
 }
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list