apps: Separate the "Required Permissions" row into its own section

The "Required Permissions" row is located at its own
AdwPreferencesGroup in the latest mockups:

d609252cde

Partially fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2829
This commit is contained in:
Automeris naranja 2024-01-08 20:02:34 -03:00 committed by Felipe Borges
parent c7c265c4c5
commit acf9dbd1c0
2 changed files with 11 additions and 4 deletions

View file

@ -114,6 +114,7 @@ struct _CcApplicationsPanel
AdwSwitchRow *shortcuts;
AdwSwitchRow *microphone;
CcInfoRow *no_microphone;
AdwPreferencesGroup *other_permissions_section;
CcInfoRow *builtin;
GtkWindow *builtin_dialog;
AdwPreferencesPage *builtin_page;
@ -1403,7 +1404,7 @@ update_usage_section (CcApplicationsPanel *self,
remove_static_permissions (self);
has_builtin = add_static_permissions (self, info, portal_app_id);
gtk_widget_set_visible (GTK_WIDGET (self->builtin), has_builtin);
gtk_widget_set_visible (GTK_WIDGET (self->other_permissions_section), has_builtin);
gtk_widget_set_visible (GTK_WIDGET (self->usage_section), portal_app_id || has_builtin);
}
@ -1776,6 +1777,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, app_search_entry);
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, app_settings_page);
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, other_permissions_section);
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_page);

View file

@ -376,8 +376,7 @@
</child>
<child>
<object class="AdwPreferencesGroup" id="usage_section">
<property name="title" translatable="yes">General</property>
<object class="AdwPreferencesGroup" id="other_permissions_section">
<child>
<object class="CcInfoRow" id="builtin">
<property name="title" translatable="yes">Re_quired Access</property>
@ -387,6 +386,12 @@
<signal name="activated" handler="on_builtin_row_activated_cb" object="CcApplicationsPanel" swapped="yes" />
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup" id="usage_section">
<property name="title" translatable="yes">General</property>
<child>
<object class="CcInfoRow" id="handler_row">
<property name="title" translatable="yes">_File &amp;amp; Link Associations</property>