summaryrefslogtreecommitdiff
path: root/src/resources/ui/nautilus-batch-rename-dialog.ui
diff options
context:
space:
mode:
authorAlexandru Pandelea <alexandru.pandelea@gmail.com>2016-08-27 19:34:08 +0300
committerAlexandru Pandelea <alexandru.pandelea@gmail.com>2016-08-29 13:02:50 +0300
commitbe12a7510090b2ec38229b6e86bc601800d2056b (patch)
treecac557d7d2ca16476d8d803eb80e5c1beba1f54b /src/resources/ui/nautilus-batch-rename-dialog.ui
parentd2961830106abe6c6576207f90e2d968b554a115 (diff)
downloadnautilus-be12a7510090b2ec38229b6e86bc601800d2056b.tar.gz
Implement batch renaming
Renaming multiple files at once has been a missing feature in Nautilus for a long time. This patch implements that feature in the following way: This operation is launched in the same way as the rename one, when the selection has more than one file. When the batch renaming is launched, a dialog is shown, offering two modes. In the first mode, the user can use metadata (if available), numbering and original file name tags to create the new names. Between the tags, there also can be written normal text, which will be added in the new names. If numbering is used, the order of the files can be modified by using several criteria. In the second mode, the user can replace an existing part of the name. https://bugzilla.gnome.org/show_bug.cgi?id=768311
Diffstat (limited to 'src/resources/ui/nautilus-batch-rename-dialog.ui')
-rw-r--r--src/resources/ui/nautilus-batch-rename-dialog.ui502
1 files changed, 502 insertions, 0 deletions
diff --git a/src/resources/ui/nautilus-batch-rename-dialog.ui b/src/resources/ui/nautilus-batch-rename-dialog.ui
new file mode 100644
index 000000000..6628abf7e
--- /dev/null
+++ b/src/resources/ui/nautilus-batch-rename-dialog.ui
@@ -0,0 +1,502 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <template class="NautilusBatchRenameDialog" parent="GtkDialog">
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="height-request">563</property>
+ <property name="window_position">center-on-parent</property>
+ <property name="destroy_with_parent">True</property>
+ <signal name="response" handler="batch_rename_dialog_on_response"/>
+ <child type="action">
+ <object class="GtkButton" id="cancel_button">
+ <property name="label" translatable="yes">_Cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ <child type="action">
+ <object class="GtkButton" id="rename_button">
+ <property name="label" translatable="yes">_Rename</property>
+ <property name="visible">True</property>
+ <property name="use_underline">True</property>
+ <property name="can_default">True</property>
+ <style>
+ <class name="suggested-action"/>
+ </style>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="ok" default="true">rename_button</action-widget>
+ <action-widget response="cancel">cancel_button</action-widget>
+ </action-widgets>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="vbox">
+ <property name="border-width">0</property>
+ <child>
+ <object class="GtkGrid" id="grid">
+ <property name="visible">True</property>
+ <property name="margin">0</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">6</property>
+ <property name="hexpand">True</property>
+ <property name="row-homogeneous">False</property>
+ <property name="column-homogeneous">False</property>
+ <child>
+ <object class="GtkBox">
+ <property name="orientation">horizontal</property>
+ <property name="spacing">15</property>
+ <property name="visible">True</property>
+ <property name="halign">center</property>
+ <property name="margin">20</property>
+ <child>
+ <object class="GtkRadioButton" id="format_mode_button">
+ <property name="label" translatable="yes">Rename _using a template</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <signal name="toggled" handler="batch_rename_dialog_mode_changed" swapped="yes" />
+ </object>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="replace_mode_button">
+ <property name="label" translatable="yes">Find and replace _text</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="group">format_mode_button</property>
+ <signal name="toggled" handler="batch_rename_dialog_mode_changed" swapped="yes" />
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left-attach">3</property>
+ <property name="top-attach">0</property>
+ <property name="width">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkStack" id="mode_stack">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="vhomogeneous">False</property>
+ <property name="hhomogeneous">True</property>
+ <property name="transition_type">crossfade</property>
+ <property name="transition_duration">100</property>
+ <child>
+ <object class="GtkGrid" id="format_stack_child">
+ <property name="visible">True</property>
+ <property name="margin-left">40</property>
+ <property name="margin-right">40</property>
+ <property name="margin-top">0</property>
+ <property name="margin-bottom">10</property>
+ <property name="row-spacing">15</property>
+ <property name="column-spacing">6</property>
+ <child>
+ <object class="GtkBox">
+ <property name="orientation">horizontal</property>
+ <property name="spacing">0</property>
+ <property name="visible">True</property>
+ <property name="halign">center</property>
+ <child>
+ <object class="GtkEntry" id="name_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_focus">True</property>
+ <property name="width_request">400</property>
+ <property name="hexpand">False</property>
+ <property name="activates-default">True</property>
+ <signal name="changed" handler="file_names_widget_entry_on_changed" swapped="yes" />
+ <signal name="activate" handler="file_names_widget_on_activate" swapped="yes" />
+ <signal name="key-press-event" handler="on_key_press_event" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkToggleButton" id="add_button">
+ <property name="visible">True</property>
+ <signal name="toggled" handler="add_button_clicked" swapped="yes" />
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="orientation">horizontal</property>
+ <property name="spacing">0</property>
+ <child>
+ <object class="GtkImage">
+ <property name="visible">True</property>
+ <property name="icon-name">list-add-symbolic</property>
+ <property name="icon-size">1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Add</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <style>
+ <class name="linked"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
+ <property name="width">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="numbering_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Automatic Numbering Order</property>
+ <property name="can_focus">False</property>
+ <property name="height-request">35</property>
+ <property name="sensitive">False</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
+ <property name="width">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToggleButton" id="numbering_order_button">
+ <property name="visible">True</property>
+ <signal name="toggled" handler="numbering_order_button_clicked" swapped="yes" />
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="orientation">horizontal</property>
+ <property name="spacing">15</property>
+ <child>
+ <object class="GtkLabel" id="numbering_order_label">
+ <property name="visible">True</property>
+ <property name="width-request">180</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Original name (Ascending)</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImage" id="action_icon">
+ <property name="visible">True</property>
+ <property name="icon-name">pan-down-symbolic</property>
+ <property name="icon-size">1</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left-attach">4</property>
+ <property name="top-attach">1</property>
+ <property name="width">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="name">format</property>
+ <property name="title" translatable="yes">Format</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="replace_stack_child">
+ <property name="visible">True</property>
+ <property name="margin-left">40</property>
+ <property name="margin-right">40</property>
+ <property name="margin-top">0</property>
+ <property name="margin-bottom">10</property>
+ <property name="row-spacing">16</property>
+ <property name="column-spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="existing_text_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Existing Text</property>
+ <property name="can_focus">False</property>
+ <property name="sensitive">False</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
+ <property name="width">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="find_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="width_request">375</property>
+ <property name="hexpand">False</property>
+ <property name="activates-default">True</property>
+ <signal name="changed" handler="file_names_widget_entry_on_changed" swapped="yes" />
+ <signal name="activate" handler="file_names_widget_on_activate" swapped="yes" />
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
+ <property name="width">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="replace_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Replace With</property>
+ <property name="can_focus">False</property>
+ <property name="sensitive">False</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
+ <property name="width">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="replace_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="width_request">375</property>
+ <signal name="changed" handler="file_names_widget_entry_on_changed" swapped="yes" />
+ <signal name="activate" handler="file_names_widget_on_activate" swapped="yes" />
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
+ <property name="width">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="name">replace</property>
+ <property name="title" translatable="yes">Replace</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
+ <property name="width">8</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolled_window">
+ <property name="height_request">250</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">False</property>
+ <property name="vexpand">True</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkViewport">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkBox" id="a_box">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkListBox" id="original_name_listbox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBox" id="arrow_listbox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBox" id="result_listbox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
+ <property name="width">8</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="conflict_box">
+ <property name="orientation">horizontal</property>
+ <property name="spacing">6</property>
+ <property name="visible">False</property>
+ <property name="margin-left">6</property>
+ <child>
+ <object class="GtkLabel" id="conflict_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="pack-type">start</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="orientation">horizontal</property>
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkButton" id="conflict_down">
+ <property name="visible">True</property>
+ <property name="relief">none</property>
+ <signal name="clicked" handler="select_next_conflict_down" swapped="yes" />
+ <child>
+ <object class="GtkImage">
+ <property name="visible">True</property>
+ <property name="icon-name">go-down-symbolic</property>
+ <property name="icon-size">1</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="conflict_up">
+ <property name="visible">True</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <signal name="clicked" handler="select_next_conflict_up" swapped="yes" />
+ <child>
+ <object class="GtkImage">
+ <property name="visible">True</property>
+ <property name="icon-name">go-up-symbolic</property>
+ <property name="icon-size">1</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="pack-type">end</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
+ <property name="width">8</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </template>
+ <menu id="add_tag_menu">
+ <section>
+ <attribute name="label" translatable="yes">Automatic Numbers</attribute>
+ <item>
+ <attribute name="label" translatable="yes">1, 2, 3, 4</attribute>
+ <attribute name="action">dialog.add-numbering-tag-zero</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">01, 02, 03, 04</attribute>
+ <attribute name="action">dialog.add-numbering-tag-one</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">001, 002, 003, 004</attribute>
+ <attribute name="action">dialog.add-numbering-tag-two</attribute>
+ </item>
+ </section>
+ <section>
+ <attribute name="label" translatable="yes">Metadata</attribute>
+ <item>
+ <attribute name="label" translatable="yes">Creation Date</attribute>
+ <attribute name="action">dialog.add-creation-date-tag</attribute>
+ <attribute name="hidden-when">action-disabled</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Camera Model</attribute>
+ <attribute name="action">dialog.add-equipment-tag</attribute>
+ <attribute name="hidden-when">action-disabled</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Season Number</attribute>
+ <attribute name="action">dialog.add-season-tag</attribute>
+ <attribute name="hidden-when">action-disabled</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Episode Number</attribute>
+ <attribute name="action">dialog.add-episode-tag</attribute>
+ <attribute name="hidden-when">action-disabled</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Track Number</attribute>
+ <attribute name="action">dialog.add-track-number-tag</attribute>
+ <attribute name="hidden-when">action-disabled</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Artist Name</attribute>
+ <attribute name="action">dialog.add-artist-name-tag</attribute>
+ <attribute name="hidden-when">action-disabled</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Title</attribute>
+ <attribute name="action">dialog.add-title-tag</attribute>
+ <attribute name="hidden-when">action-disabled</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Album Name</attribute>
+ <attribute name="action">dialog.add-album-name-tag</attribute>
+ <attribute name="hidden-when">action-disabled</attribute>
+ </item>
+ </section>
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">Original File Name</attribute>
+ <attribute name="action">dialog.add-original-file-name-tag</attribute>
+ </item>
+ </section>
+ </menu>
+ <object class="GtkPopover" id="add_popover">
+ <property name="position">bottom</property>
+ <property name="relative-to">add_button</property>
+ <signal name="closed" handler="add_popover_closed" swapped="yes" />
+ </object>
+ <object class="GtkImage" id="done_image">
+ <property name="visible">True</property>
+ <property name="icon_name">object-select-symbolic</property>
+ </object>
+ <menu id="numbering_order_menu">
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">Original name (Ascending) </attribute>
+ <attribute name="action">dialog.numbering-order-changed</attribute>
+ <attribute name="target">name-ascending</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Original name (Descending)</attribute>
+ <attribute name="action">dialog.numbering-order-changed</attribute>
+ <attribute name="target">name-descending</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">First Modified</attribute>
+ <attribute name="action">dialog.numbering-order-changed</attribute>
+ <attribute name="target">first-modified</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Last Modified</attribute>
+ <attribute name="action">dialog.numbering-order-changed</attribute>
+ <attribute name="target">last-modified</attribute>
+ </item>
+ </section>
+ </menu>
+ <object class="GtkPopover" id="numbering_order_popover">
+ <property name="position">bottom</property>
+ <property name="relative-to">numbering_order_button</property>
+ <signal name="closed" handler="numbering_order_popover_closed" swapped="yes" />
+ </object>
+</interface> \ No newline at end of file