[gnome-control-center] applications: Use AdwPreferences{Page, Group} for Built-in Permissions dialog, make it resizable
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] applications: Use AdwPreferences{Page, Group} for Built-in Permissions dialog, make it resizable
- Date: Tue, 1 Feb 2022 15:01:48 +0000 (UTC)
commit 3250b3fab5040bb0d7bc2a977bd71623e766a78b
Author: Christopher Davis <christopherdavis gnome org>
Date: Sat Jan 22 12:46:36 2022 -0800
applications: Use AdwPreferences{Page,Group} for Built-in Permissions dialog, make it resizable
panels/applications/cc-applications-panel.c | 6 +++---
panels/applications/cc-applications-panel.ui | 32 ++++++++++------------------
2 files changed, 14 insertions(+), 24 deletions(-)
---
diff --git a/panels/applications/cc-applications-panel.c b/panels/applications/cc-applications-panel.c
index 56090841a..69cda412d 100644
--- a/panels/applications/cc-applications-panel.c
+++ b/panels/applications/cc-applications-panel.c
@@ -109,7 +109,7 @@ struct _CcApplicationsPanel
CcInfoRow *no_microphone;
CcInfoRow *builtin;
GtkDialog *builtin_dialog;
- GtkLabel *builtin_label;
+ AdwPreferencesGroup *builtin_group;
GtkListBox *builtin_list;
GtkButton *handler_reset;
@@ -829,7 +829,7 @@ add_static_permissions (CcApplicationsPanel *self,
added += add_static_permission_row (self, _("Settings"), _("Can change settings"));
text = g_strdup_printf (_("%s has the following permissions built-in. These cannot be altered. If you are
concerned about these permissions, consider removing this application."), g_app_info_get_display_name (info));
- gtk_label_set_label (self->builtin_label, text);
+ adw_preferences_group_set_description (self->builtin_group, text);
return added > 0;
}
@@ -1724,7 +1724,7 @@ cc_applications_panel_class_init (CcApplicationsPanelClass *klass)
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, app_name_label);
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, builtin);
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, builtin_dialog);
- gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, builtin_label);
+ gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, builtin_group);
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, builtin_list);
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, cache);
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, camera);
diff --git a/panels/applications/cc-applications-panel.ui b/panels/applications/cc-applications-panel.ui
index 19c912bf1..f441f63ba 100644
--- a/panels/applications/cc-applications-panel.ui
+++ b/panels/applications/cc-applications-panel.ui
@@ -319,30 +319,20 @@
<property name="title" translatable="yes">Built-in Permissions</property>
<property name="modal">1</property>
<property name="use-header-bar">1</property>
- <property name="resizable">0</property>
+ <property name="resizable">True</property>
<property name="hide-on-close">True</property>
<child>
- <object class="GtkBox">
- <property name="margin-top">24</property>
- <property name="margin-bottom">24</property>
- <property name="margin-start">24</property>
- <property name="margin-end">24</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkLabel" id="builtin_label">
- <property name="xalign">0</property>
- <property name="wrap">1</property>
- <property name="max-width-chars">50</property>
- <property name="label">Yadda Yadda</property>
- </object>
- </child>
+ <object class="AdwPreferencesPage">
<child>
- <object class="GtkListBox" id="builtin_list">
- <property name="selection-mode">none</property>
- <style>
- <class name="boxed-list"/>
- </style>
+ <object class="AdwPreferencesGroup" id="builtin_group">
+ <child>
+ <object class="GtkListBox" id="builtin_list">
+ <property name="selection-mode">none</property>
+ <style>
+ <class name="boxed-list"/>
+ </style>
+ </object>
+ </child>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]