aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/manage_accounts
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-11-19 00:00:08 +0100
committerfiaxh <git@lightrise.org>2019-11-19 00:48:38 +0100
commitb02ee171c1713b56e2d6db7721488b64c238b478 (patch)
tree2541342ba8bb72438b722f1eb7a675a808fd6516 /main/src/ui/manage_accounts
parent41ada4fcc8991ecacd390d92f8ff7829f4e649ff (diff)
downloaddino-b02ee171c1713b56e2d6db7721488b64c238b478.tar.gz
dino-b02ee171c1713b56e2d6db7721488b64c238b478.zip
Don't display labels of hidden DataForm fields
Diffstat (limited to 'main/src/ui/manage_accounts')
-rw-r--r--main/src/ui/manage_accounts/add_account_dialog.vala8
1 files changed, 2 insertions, 6 deletions
diff --git a/main/src/ui/manage_accounts/add_account_dialog.vala b/main/src/ui/manage_accounts/add_account_dialog.vala
index 27807d8e..0ad8b72d 100644
--- a/main/src/ui/manage_accounts/add_account_dialog.vala
+++ b/main/src/ui/manage_accounts/add_account_dialog.vala
@@ -301,16 +301,12 @@ public class AddAccountDialog : Gtk.Dialog {
register_form_continue.visible = true;
register_form_continue.grab_focus();
} else if (form.fields.size > 0) {
- int i = 0;
foreach (Xep.DataForms.DataForm.Field field in form.fields) {
- if (field.label != null && field.label != "") {
+ Widget? field_widget = Util.get_data_form_fild_widget(field);
+ if (field.label != null && field.label != "" && field_widget != null) {
form_box.add(new Label(field.label) { xalign=0, margin_top=7, visible=true });
- }
- Widget field_widget = Util.get_data_form_fild_widget(field);
- if (field_widget != null) {
form_box.add(field_widget);
}
- i++;
}
register_form_continue.visible = true;
register_form_continue_label.label = _("Register");