summaryrefslogtreecommitdiff
path: root/src/resources/ui
diff options
context:
space:
mode:
authorPeter Eisenmann <650-p3732@users.noreply.gitlab.gnome.org>2023-01-08 16:42:25 +0000
committerAntónio Fernandes <antoniof@gnome.org>2023-01-08 16:42:25 +0000
commit11dea19756b47af160e396fb16c280d1b6ccc997 (patch)
tree1a01b64fcc7ae0458a0806d0d9817876dbf59794 /src/resources/ui
parent1bde3cac68e37699f411100963e0a9fb0d3d93a7 (diff)
downloadnautilus-11dea19756b47af160e396fb16c280d1b6ccc997.tar.gz
file-conflict-dialog: change base to AdwWindow
Use AdwWindow as a base class for the conflict dialog, as GtkDialog is deprecated with GTK 4.10.
Diffstat (limited to 'src/resources/ui')
-rw-r--r--src/resources/ui/nautilus-file-conflict-dialog.ui217
1 files changed, 119 insertions, 98 deletions
diff --git a/src/resources/ui/nautilus-file-conflict-dialog.ui b/src/resources/ui/nautilus-file-conflict-dialog.ui
index 8993fb659..e721491c9 100644
--- a/src/resources/ui/nautilus-file-conflict-dialog.ui
+++ b/src/resources/ui/nautilus-file-conflict-dialog.ui
@@ -1,106 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
- <template class="NautilusFileConflictDialog" parent="GtkDialog">
+ <template class="NautilusFileConflictDialog" parent="AdwWindow">
<property name="modal">True</property>
<property name="resizable">False</property>
- <child internal-child="content_area">
+ <child>
<object class="GtkBox">
- <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="spacing">12</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkBox">
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkLabel" id="primary_label">
- <property name="justify">center</property>
- <property name="halign">center</property>
- <property name="max-width-chars">50</property>
- <property name="wrap">True</property>
- <property name="wrap-mode">word-char</property>
+ <object class="GtkHeaderBar">
+ <property name="show-title-buttons">False</property>
+ <child type="start">
+ <object class="GtkButton" id="cancel_button">
+ <property name="label" translatable="yes">_Cancel</property>
+ <property name="use-underline">True</property>
+ <signal name="clicked" handler="cancel_button_cb" swapped="yes"/>
+ </object>
+ </child>
+ <child type="end">
+ <object class="GtkButton" id="skip_button">
+ <property name="label" translatable="yes">_Skip</property>
+ <property name="use-underline">True</property>
+ <signal name="clicked" handler="skip_button_cb" swapped="yes"/>
+ </object>
+ </child>
+ <child type="end">
+ <object class="GtkButton" id="rename_button">
+ <property name="visible">False</property>
+ <property name="label" translatable="yes">Re_name</property>
+ <property name="use-underline">True</property>
+ <signal name="clicked" handler="rename_button_cb" swapped="yes"/>
<style>
- <class name="title-2"/>
+ <class name="suggested-action"/>
</style>
</object>
</child>
- <child>
- <object class="GtkLabel" id="secondary_label">
- <property name="justify">center</property>
- <property name="halign">center</property>
- <property name="max-width-chars">50</property>
- <property name="wrap">True</property>
- <property name="wrap-mode">word-char</property>
+ <child type="end">
+ <object class="GtkButton" id="replace_button">
+ <property name="label" translatable="yes">Re_place</property>
+ <property name="use-underline">True</property>
+ <signal name="clicked" handler="replace_button_cb" swapped="yes"/>
+ <style>
+ <class name="suggested-action"/>
+ </style>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <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="spacing">12</property>
<child>
<object class="GtkBox">
- <property name="halign">start</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
- <object class="GtkBox">
- <property name="spacing">12</property>
- <child>
- <object class="GtkPicture" id="dest_icon"/>
- </child>
- <child>
- <object class="GtkLabel" id="dest_label"/>
- </child>
+ <object class="GtkLabel" id="primary_label">
+ <property name="justify">center</property>
+ <property name="halign">center</property>
+ <property name="max-width-chars">50</property>
+ <property name="wrap">True</property>
+ <property name="wrap-mode">word-char</property>
+ <style>
+ <class name="title-2"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="secondary_label">
+ <property name="justify">center</property>
+ <property name="halign">center</property>
+ <property name="max-width-chars">50</property>
+ <property name="wrap">True</property>
+ <property name="wrap-mode">word-char</property>
</object>
</child>
<child>
<object class="GtkBox">
+ <property name="halign">start</property>
+ <property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
- <object class="GtkPicture" id="src_icon"/>
- </child>
- <child>
- <object class="GtkLabel" id="src_label"/>
+ <object class="GtkBox">
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkPicture" id="dest_icon"/>
+ </child>
+ <child>
+ <object class="GtkLabel" id="dest_label"/>
+ </child>
+ </object>
</child>
- </object>
- </child>
- <child>
- <object class="GtkExpander" id="expander">
- <property name="label" translatable="yes">_Select a new name for the destination</property>
- <property name="use-underline">True</property>
- <signal name="notify::expanded" handler="on_expanded_notify"/>
<child>
<object class="GtkBox">
- <property name="margin-top">6</property>
- <style>
- <class name="linked"/>
- </style>
+ <property name="spacing">12</property>
<child>
- <object class="GtkEntry" id="entry">
- <property name="activates-default">True</property>
- <property name="hexpand">True</property>
- <signal name="changed" handler="entry_text_changed_cb"/>
- </object>
+ <object class="GtkPicture" id="src_icon"/>
</child>
<child>
- <object class="GtkButton">
- <property name="label" translatable="yes">_Reset</property>
- <property name="use-underline">True</property>
- <signal name="clicked" handler="reset_button_clicked_cb"/>
+ <object class="GtkLabel" id="src_label"/>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkExpander" id="expander">
+ <property name="label" translatable="yes">_Select a new name for the destination</property>
+ <property name="use-underline">True</property>
+ <signal name="notify::expanded" handler="on_expanded_notify"/>
+ <child>
+ <object class="GtkBox">
+ <property name="margin-top">6</property>
+ <style>
+ <class name="linked"/>
+ </style>
+ <child>
+ <object class="GtkEntry" id="entry">
+ <property name="activates-default">True</property>
+ <property name="hexpand">True</property>
+ <signal name="changed" handler="entry_text_changed_cb"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton">
+ <property name="label" translatable="yes">_Reset</property>
+ <property name="use-underline">True</property>
+ <signal name="clicked" handler="reset_button_clicked_cb"/>
+ </object>
+ </child>
</object>
</child>
</object>
</child>
</object>
</child>
- </object>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbox">
- <signal name="toggled" handler="checkbox_toggled_cb"/>
<child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Apply this action to all files and folders</property>
- <property name="use-underline">True</property>
+ <object class="GtkCheckButton" id="checkbox">
+ <signal name="toggled" handler="checkbox_toggled_cb"/>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Apply this action to all files and folders</property>
+ <property name="use-underline">True</property>
+ </object>
+ </child>
</object>
</child>
</object>
@@ -109,39 +154,15 @@
</child>
</object>
</child>
- <child type="action">
- <object class="GtkButton" id="cancel_button">
- <property name="label" translatable="yes">_Cancel</property>
- <property name="use-underline">True</property>
- </object>
- </child>
- <child type="action">
- <object class="GtkButton" id="rename_button">
- <property name="visible">False</property>
- <property name="label" translatable="yes">Re_name</property>
- <property name="use-underline">True</property>
- </object>
- </child>
- <child type="action">
- <object class="GtkButton" id="replace_button">
- <property name="label" translatable="yes">Re_place</property>
- <property name="use-underline">True</property>
- </object>
- </child>
- <child type="action">
- <object class="GtkButton" id="skip_button">
- <property name="label" translatable="yes">_Skip</property>
- <property name="use-underline">True</property>
+ <child>
+ <object class='GtkShortcutController'>
+ <child>
+ <object class='GtkShortcut'>
+ <property name='trigger'>Escape</property>
+ <property name='action'>action(window.close)</property>
+ </object>
+ </child>
</object>
</child>
- <action-widgets>
- <action-widget response="cancel">cancel_button</action-widget>
- <!-- 3 is CONFLICT_RESPONSE_RENAME -->
- <action-widget response="3">rename_button</action-widget>
- <!-- 2 is CONFLICT_RESPONSE_REPLACE -->
- <action-widget response="2" default="true">replace_button</action-widget>
- <!-- 1 is CONFLICT_RESPONSE_SKIP -->
- <action-widget response="1">skip_button</action-widget>
- </action-widgets>
</template>
</interface>