diff options
author | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2023-03-17 00:47:16 -0500 |
---|---|---|
committer | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2023-03-17 00:47:16 -0500 |
commit | f107009d2649a96a3b93994bb197c2f2637c08a1 (patch) | |
tree | 7284403b6ecc447f99e0130f7457f5d839b4e833 /finch | |
parent | d492e84c03fe66bd8f2466b0fa176c179261d831 (diff) | |
download | pidgin-f107009d2649a96a3b93994bb197c2f2637c08a1.tar.gz |
Remove tracking of required fields
The field required&filled status is now encapsulated in the valid property due to /r/2351.
This means that UIs no longer need to check that all required fields are filled.
So the page no longer needs to track required fields either.
Testing Done:
Compiled and ran `ninja test`. Also opened Request Fields from Demo protocol, removed the required string or entered an invalid email, and confirmed the OK button disabled correctly.
Reviewed at https://reviews.imfreedom.org/r/2352/
Diffstat (limited to 'finch')
-rw-r--r-- | finch/gntrequest.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/finch/gntrequest.c b/finch/gntrequest.c index 66d1579659..501dd67089 100644 --- a/finch/gntrequest.c +++ b/finch/gntrequest.c @@ -377,9 +377,9 @@ request_fields_cb(GntWidget *button, PurpleRequestPage *page) { purple_notify_close_with_handle(button); - if (!g_object_get_data(G_OBJECT(button), "cancellation-function") && - (!purple_request_page_all_required_filled(page) || - !purple_request_page_is_valid(page))) { + if(!g_object_get_data(G_OBJECT(button), "cancellation-function") && + !purple_request_page_is_valid(page)) + { purple_notify_error(button, _("Error"), _("You must properly fill all the required fields."), _("The required fields are underlined."), NULL); |