summaryrefslogtreecommitdiff
path: root/finch/gntblist.c
diff options
context:
space:
mode:
authorElliott Sales de Andrade <quantum.analyst@gmail.com>2023-03-10 01:15:41 -0600
committerElliott Sales de Andrade <quantum.analyst@gmail.com>2023-03-10 01:15:41 -0600
commit33dea489fea7bca54847b5c4275017676fcd2c5b (patch)
treea01ee35485a78a6694fa65d1e461447e965694ab /finch/gntblist.c
parent36dee2d7f7b622d9e1ecf873b4bfa4779179e13d (diff)
downloadpidgin-33dea489fea7bca54847b5c4275017676fcd2c5b.tar.gz
Make PurpleRequestFieldAccount into a GObject
This also does an `hg cp`, though with all the renaming of the parameter names, maybe that wasn't as useful for tracking the diff, and I should just make these new files entirely? Note, I didn't bother re-indenting some of the blocks, because they'll all eventually be moved when everything is subclassed. Testing Done: Compiled, and opened Request Fields from the Demo protocol. Reviewed at https://reviews.imfreedom.org/r/2331/
Diffstat (limited to 'finch/gntblist.c')
-rw-r--r--finch/gntblist.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/finch/gntblist.c b/finch/gntblist.c
index 7fdd79a0ee..8536671adc 100644
--- a/finch/gntblist.c
+++ b/finch/gntblist.c
@@ -601,9 +601,12 @@ finch_request_add_buddy(G_GNUC_UNUSED PurpleBuddyList *list,
purple_request_field_set_type_hint(field, "group");
field = purple_request_field_account_new("account", _("Account"), NULL);
- purple_request_field_account_set_show_all(field, FALSE);
- if (account)
- purple_request_field_account_set_value(field, account);
+ purple_request_field_account_set_show_all(PURPLE_REQUEST_FIELD_ACCOUNT(field),
+ FALSE);
+ if(account) {
+ purple_request_field_account_set_value(PURPLE_REQUEST_FIELD_ACCOUNT(field),
+ account);
+ }
purple_request_group_add_field(group, field);
purple_request_fields(NULL, _("Add Buddy"), NULL, _("Please enter buddy information."),
@@ -689,9 +692,12 @@ finch_request_add_chat(G_GNUC_UNUSED PurpleBuddyList *list,
purple_request_page_add_group(page, group);
field = purple_request_field_account_new("account", _("Account"), NULL);
- purple_request_field_account_set_show_all(field, FALSE);
- if (account)
- purple_request_field_account_set_value(field, account);
+ purple_request_field_account_set_show_all(PURPLE_REQUEST_FIELD_ACCOUNT(field),
+ FALSE);
+ if(account) {
+ purple_request_field_account_set_value(PURPLE_REQUEST_FIELD_ACCOUNT(field),
+ account);
+ }
purple_request_group_add_field(group, field);
field = purple_request_field_string_new("name", _("Name"), name, FALSE);