summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Sales de Andrade <quantum.analyst@gmail.com>2023-04-25 15:00:33 -0500
committerElliott Sales de Andrade <quantum.analyst@gmail.com>2023-04-25 15:00:33 -0500
commite2af3524445d4c375d4d09ea89f7460fbea4ad5e (patch)
treee54608da05c98ca773b6f49eae453a1799fe8d23
parent6ef5b320d4ab0cda827749a54184c2a1e1146d9d (diff)
downloadpidgin-e2af3524445d4c375d4d09ea89f7460fbea4ad5e.tar.gz
Fix account request field in Pidgin when filtering
The field is set to its default value first, filtered, then a notify signal is connected. If the filter excludes the default, then the notification is not fired at this point. So if there's a filter that excludes that default and you don't change the selection from the UI, then nothing will have told the field that the default is not the selection, and the field result will not match what the user thought they selected. Testing Done: Tried a few times in the I'dle Mak'er plugin. Previously, if accounts loaded such that a Demo account is before an XMPP account, then even though the XMPP account appeared in the selector initially, the idle would be attempted on the Demo account. Now it is always the XMPP account as expected from the UI. Reviewed at https://reviews.imfreedom.org/r/2443/
-rw-r--r--pidgin/gtkrequest.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pidgin/gtkrequest.c b/pidgin/gtkrequest.c
index f8d1fd2082..acd557c090 100644
--- a/pidgin/gtkrequest.c
+++ b/pidgin/gtkrequest.c
@@ -1239,14 +1239,14 @@ create_account_field(PurpleRequestField *field, GtkWidget **account_hint)
pidgin_account_chooser_set_selected(PIDGIN_ACCOUNT_CHOOSER(widget),
account);
+ g_signal_connect(widget, "notify::account", G_CALLBACK(field_account_cb),
+ field);
+
if(GTK_IS_FILTER(filter)) {
pidgin_account_chooser_set_filter(PIDGIN_ACCOUNT_CHOOSER(widget), filter);
g_object_unref(filter);
}
- g_signal_connect(widget, "notify::account", G_CALLBACK(field_account_cb),
- field);
-
type_hint = purple_request_field_get_type_hint(field);
if(purple_strequal(type_hint, "account")) {
*account_hint = widget;