Fix problem that the enabled-accounts menu is empty when creating a new account

Mon, 10 Jun 2024 20:24:58 -0500

author
Markus Fischer <ivanhoe@fiscari.de>
date
Mon, 10 Jun 2024 20:24:58 -0500
changeset 42788
33f25c732a0b
parent 42787
a96dfca87750
child 42789
497c03200a99

Fix problem that the enabled-accounts menu is empty when creating a new account

`purple_account_manager_add` needs to set up signal connections before `purple_account_set_enabled` is called because the "notify::enabled" signal eventually triggers the update of the menu model of the enabled-accounts section of the accounts menu.

Testing Done:
Created a new account and checked that it's listed in the enabled-accounts section of the accounts menu.

Reviewed at https://reviews.imfreedom.org/r/3250/

pidgin/pidginaccounteditor.c file | annotate | diff | comparison | revisions
--- a/pidgin/pidginaccounteditor.c	Sun Jun 09 15:36:02 2024 -0500
+++ b/pidgin/pidginaccounteditor.c	Mon Jun 10 20:24:58 2024 -0500
@@ -1324,9 +1324,9 @@
 	if(new_account) {
 		PurpleAccountManager *manager = NULL;
 
-		purple_account_set_enabled(editor->account, TRUE);
-
 		manager = purple_account_manager_get_default();
 		purple_account_manager_add(manager, editor->account);
+
+		purple_account_set_enabled(editor->account, TRUE);
 	}
 }

mercurial