summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorCorey Berla <corey@berla.me>2022-08-05 12:48:59 -0700
committerAntónio Fernandes <antoniof@gnome.org>2022-08-07 01:15:29 +0000
commit8fe25c418c9d3c8321385cd91f000e433e113147 (patch)
treea664cbea50a21d8ef20de9e6d4e121a7de47f621 /src/resources
parentd2ad33b3a3605dbfd80ed8fc397450d414948bdd (diff)
downloadnautilus-8fe25c418c9d3c8321385cd91f000e433e113147.tar.gz
app-chooser: Replace Reset and Set as Default buttons with a Switch
Set the switch to active when the association is set as default and inactive when it is not set as default (also a way to remove the default association). Add a label for the switch with a subtitle indicating the content description.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/ui/nautilus-app-chooser.ui66
1 files changed, 41 insertions, 25 deletions
diff --git a/src/resources/ui/nautilus-app-chooser.ui b/src/resources/ui/nautilus-app-chooser.ui
index 5c2eb95f5..b99623822 100644
--- a/src/resources/ui/nautilus-app-chooser.ui
+++ b/src/resources/ui/nautilus-app-chooser.ui
@@ -19,14 +19,14 @@
<property name="name">list</property>
<property name="child">
<object class="GtkScrolledWindow">
+ <property name="margin-top">18</property>
+ <property name="margin-bottom">18</property>
+ <property name="margin-start">18</property>
+ <property name="margin-end">18</property>
<property name="hscrollbar-policy">never</property>
<property name="vexpand">true</property>
<property name="child">
<object class="AdwClamp">
- <property name="margin-top">12</property>
- <property name="margin-bottom">12</property>
- <property name="margin-start">12</property>
- <property name="margin-end">12</property>
<style>
<class name="background"/>
</style>
@@ -36,31 +36,12 @@
<property name="spacing">12</property>
<child>
<object class="GtkBox" id="app_chooser_widget_box">
+ <property name="margin-start">18</property>
+ <property name="margin-end">18</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
</object>
</child>
- <child>
- <object class="GtkBox">
- <property name="spacing">6</property>
- <child>
- <object class="GtkButton" id="reset_button">
- <property name="label" translatable="yes">_Reset</property>
- <property name="use-underline">True</property>
- <property name="focusable">True</property>
- <property name="receives_default">True</property>
- <property name="hexpand">True</property>
- <property name="halign">start</property>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="set_as_default_button">
- <property name="label" translatable="yes">Set as _Default</property>
- <property name="use-underline">True</property>
- </object>
- </child>
- </object>
- </child>
</object>
</property>
</object>
@@ -71,6 +52,40 @@
</child>
</object>
</child>
+ <child>
+ <object class="GtkBox" id="set_default_box">
+ <property name="margin-bottom">18</property>
+ <property name="margin-start">18</property>
+ <property name="margin-end">18</property>
+ <child>
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="halign">start</property>
+ <property name="hexpand">True</property>
+ <property name="label" translatable="yes">Always use for this file type</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_content_type_description">
+ <property name="halign">start</property>
+ <style>
+ <class name="dim-label"/>
+ <class name="caption"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSwitch" id="set_as_default_switch">
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ </object>
+ </child>
+ </object>
+ </child>
</object>
</child>
<child type="action">
@@ -84,6 +99,7 @@
<property name="label" translatable="yes">_Open</property>
<property name="use-underline">True</property>
<property name="sensitive">False</property>
+ <signal name="clicked" object="NautilusAppChooser" handler="open_button_clicked_cb" swapped="no"/>
</object>
</child>
<action-widgets>