[nautilus/wip/antoniof/modernize-properties-dialog: 16/19] properties-window: use HdyActionRow for security context
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/modernize-properties-dialog: 16/19] properties-window: use HdyActionRow for security context
- Date: Sun, 2 Jan 2022 14:40:18 +0000 (UTC)
commit 6ef67d6faae465700ab22c964164729a35a1d694
Author: Peter Eisenmann <p3732 getgoogleoff me>
Date: Thu Dec 30 20:34:52 2021 +0100
properties-window: use HdyActionRow for security context
Wrap the security context label in an AdwActionRow.
Part of #1326
src/nautilus-properties-window.c | 7 +++---
src/resources/ui/nautilus-properties-window.ui | 33 ++++++++++++--------------
2 files changed, 18 insertions(+), 22 deletions(-)
---
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index b71bfbdfb..4f9153674 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -170,7 +170,7 @@ struct _NautilusPropertiesWindow
GtkRevealer *execution_inconsistent_revealer;
GtkSwitch *execution_switch;
- GtkWidget *security_context_title_label;
+ GtkWidget *security_context_list_box;
GtkWidget *security_context_value_label;
GtkWidget *change_permissions_button_box;
@@ -3646,8 +3646,7 @@ setup_permissions_page (NautilusPropertiesWindow *self)
create_simple_permissions (self);
#ifdef HAVE_SELINUX
- gtk_widget_show (self->security_context_title_label);
- gtk_widget_show (self->security_context_value_label);
+ gtk_widget_show (self->security_context_list_box);
/* Stash a copy of the file attribute name in this field for the callback's sake. */
g_object_set_data_full (G_OBJECT (self->security_context_value_label), "file_attribute",
@@ -4862,7 +4861,7 @@ nautilus_properties_window_class_init (NautilusPropertiesWindowClass *klass)
gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow, execution_row);
gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow,
execution_inconsistent_revealer);
gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow, execution_switch);
- gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow,
security_context_title_label);
+ gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow, security_context_list_box);
gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow,
security_context_value_label);
gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow,
change_permissions_button_box);
gtk_widget_class_bind_template_child (widget_class, NautilusPropertiesWindow, change_permissions_button);
diff --git a/src/resources/ui/nautilus-properties-window.ui b/src/resources/ui/nautilus-properties-window.ui
index cd36a96a0..a5cb09ed5 100644
--- a/src/resources/ui/nautilus-properties-window.ui
+++ b/src/resources/ui/nautilus-properties-window.ui
@@ -845,30 +845,27 @@
</object>
</child>
<child>
- <object class="GtkLabel" id="security_context_title_label">
+ <object class="GtkListBox" id="security_context_list_box">
<property name="visible">False</property>
- <property name="margin_top">12</property>
- <property name="label" translatable="yes">Security context</property>
- <property name="xalign">1</property>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Security Context</property>
+ <child>
+ <object class="GtkLabel" id="security_context_value_label">
+ <property name="selectable">True</property>
+ <property name="max-width-chars">24</property>
+ <property name="xalign">1</property>
+ </object>
+ </child>
+ </object>
+ </child>
<style>
- <class name="dim-label"/>
+ <class name="boxed-list"/>
</style>
<layout>
<property name="column">0</property>
<property name="row">7</property>
- </layout>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="security_context_value_label">
- <property name="visible">False</property>
- <property name="margin_top">12</property>
- <property name="selectable">True</property>
- <property name="max_width_chars">24</property>
- <property name="xalign">0</property>
- <layout>
- <property name="column">1</property>
- <property name="row">7</property>
+ <property name="column-span">2</property>
</layout>
</object>
</child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]