[gnome-software] update dialog: Hide permissions box when not needed
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] update dialog: Hide permissions box when not needed
- Date: Wed, 16 Jan 2019 18:48:54 +0000 (UTC)
commit cd358e5da0d6a8e5cf000ab792259e360f3aba1b
Author: Kalev Lember <klember redhat com>
Date: Wed Jan 16 18:24:23 2019 +0100
update dialog: Hide permissions box when not needed
Commit af3a132 added a box around the permissions section, but forgot to
hide it when the permissions aren't shown, creating empty space at the
top of the dialog.
src/gs-update-dialog.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/gs-update-dialog.c b/src/gs-update-dialog.c
index 4bec35d2..8d348e3c 100644
--- a/src/gs-update-dialog.c
+++ b/src/gs-update-dialog.c
@@ -64,7 +64,7 @@ struct _GsUpdateDialog
GtkWidget *scrolledwindow_details;
GtkWidget *spinner;
GtkWidget *stack;
- GtkWidget *permissions_section_title;
+ GtkWidget *permissions_section_box;
GtkWidget *permissions_section_content;
};
@@ -211,12 +211,10 @@ set_updates_description_ui (GsUpdateDialog *dialog, GsApp *app)
gtk_widget_set_visible (dialog->button_back, !g_queue_is_empty (dialog->back_entry_stack));
if (gs_app_has_quirk (app, GS_APP_QUIRK_NEW_PERMISSIONS)) {
- gtk_widget_show (dialog->permissions_section_title);
- gtk_widget_show (dialog->permissions_section_content);
+ gtk_widget_show (dialog->permissions_section_box);
populate_permissions_section (dialog, gs_app_get_permissions (app));
} else {
- gtk_widget_hide (dialog->permissions_section_title);
- gtk_widget_hide (dialog->permissions_section_content);
+ gtk_widget_hide (dialog->permissions_section_box);
}
}
@@ -836,7 +834,7 @@ gs_update_dialog_class_init (GsUpdateDialogClass *klass)
gtk_widget_class_bind_template_child (widget_class, GsUpdateDialog, scrolledwindow_details);
gtk_widget_class_bind_template_child (widget_class, GsUpdateDialog, spinner);
gtk_widget_class_bind_template_child (widget_class, GsUpdateDialog, stack);
- gtk_widget_class_bind_template_child (widget_class, GsUpdateDialog, permissions_section_title);
+ gtk_widget_class_bind_template_child (widget_class, GsUpdateDialog, permissions_section_box);
gtk_widget_class_bind_template_child (widget_class, GsUpdateDialog, permissions_section_content);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]