diff options
author | Alexandru Pandelea <alexandru.pandelea@gmail.com> | 2016-06-21 15:33:28 +0300 |
---|---|---|
committer | Alexandru Pandelea <alexandru.pandelea@gmail.com> | 2016-07-02 14:57:16 +0300 |
commit | 519951b15fc324d8d4c68c506632c2db98d4d535 (patch) | |
tree | 21dbf08682758e0e13f124d2d91e51be80846891 | |
parent | fb95c78c8ef445114dff6555948f982dd821e4e9 (diff) | |
download | nautilus-519951b15fc324d8d4c68c506632c2db98d4d535.tar.gz |
Add UI for Format mode
Add Text mode was merged with the format mode.
https://bugzilla.gnome.org/show_bug.cgi?id=768311
-rw-r--r-- | src/nautilus-batch-rename.c | 157 | ||||
-rw-r--r-- | src/nautilus-batch-rename.h | 2 | ||||
-rw-r--r-- | src/resources/ui/nautilus-batch-rename-dialog.ui | 469 |
3 files changed, 393 insertions, 235 deletions
diff --git a/src/nautilus-batch-rename.c b/src/nautilus-batch-rename.c index 815db759e..e50621f7a 100644 --- a/src/nautilus-batch-rename.c +++ b/src/nautilus-batch-rename.c @@ -27,7 +27,7 @@ #define ADD_TEXT_ENTRY_SIZE 550 #define REPLACE_ENTRY_SIZE 275 -#define MAX_DISPLAY_LEN 50 +#define MAX_DISPLAY_LEN 65 struct _NautilusBatchRename { @@ -35,23 +35,23 @@ struct _NautilusBatchRename GtkWidget *grid; - GtkWidget *add_text_options; GtkWidget *cancel_button; GtkWidget *conflict_listbox; GtkWidget *error_label; GtkWidget *expander; GtkWidget *name_entry; GtkWidget *rename_button; - GtkWidget *rename_modes; GtkWidget *find_label; - GtkWidget *left_stack; + GtkWidget *find_entry; + GtkWidget *mode_stack; GtkWidget *label_stack; - GtkWidget *right_stack; GtkWidget *replace_entry; GtkWidget *replace_label; - GtkWidget *replace_box; + GtkWidget *new_name_button; + GtkWidget *append_button; + GtkWidget *prepend_button; - GList *listbox_rows;//adauga aici rows de la listbox pt a fi sterse + GList *listbox_rows; GList *selection; NautilusBatchRenameModes mode; @@ -75,7 +75,11 @@ batch_rename_get_new_names (NautilusBatchRename *dialog) selection = dialog->selection; - entry_text = g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->name_entry))); + if (dialog->mode == NAUTILUS_BATCH_RENAME_REPLACE) + entry_text = g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->find_entry))); + else + entry_text = g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->name_entry))); + replace_text = g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->replace_entry))); result = get_new_names_list (dialog->mode, selection, entry_text, replace_text); @@ -115,78 +119,46 @@ rename_files_on_names_accepted (NautilusBatchRename *dialog, } static void -batch_rename_add_text_changed (GtkComboBoxText *widget, - NautilusBatchRename *dialog) +batch_rename_format_mode_changed (NautilusBatchRename *dialog) { - gchar* active_item; + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->new_name_button))) + dialog->mode = NAUTILUS_BATCH_RENAME_NEW_NAME; - active_item = gtk_combo_box_text_get_active_text (widget); + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->prepend_button))) + dialog->mode = NAUTILUS_BATCH_RENAME_PREPEND; - if (strcmp (active_item, "Append") == 0) + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->append_button))) dialog->mode = NAUTILUS_BATCH_RENAME_APPEND; - if (strcmp (active_item, "Prepend") == 0) - dialog->mode = NAUTILUS_BATCH_RENAME_PREPEND; - /* update display text */ file_names_widget_entry_on_changed (dialog); } static void -switch_to_replace_mode (NautilusBatchRename *dialog) -{ - GValue width = G_VALUE_INIT; - - g_value_init (&width, G_TYPE_INT); - g_value_set_int (&width, 3); - - gtk_stack_set_visible_child (GTK_STACK (dialog->left_stack), GTK_WIDGET (dialog->find_label)); - gtk_stack_set_visible_child (GTK_STACK (dialog->right_stack), GTK_WIDGET (dialog->replace_box)); - gtk_widget_show (GTK_WIDGET (dialog->replace_box)); - - gtk_widget_grab_focus (dialog->name_entry); - - gtk_container_child_set_property (GTK_CONTAINER (dialog->grid), dialog->name_entry, "width",&width); - - gtk_widget_set_size_request (dialog->name_entry, REPLACE_ENTRY_SIZE, -1); -} - -static void -switch_to_add_text_mode (NautilusBatchRename *dialog) +mode_stack_changed (GtkStack *stack, + GParamSpec *pspec, + NautilusBatchRename *dialog) { - GValue width = G_VALUE_INIT; - - g_value_init (&width, G_TYPE_INT); - g_value_set_int (&width, 6); + const gchar *visible_child; + visible_child = gtk_stack_get_visible_child_name (stack); - gtk_stack_set_visible_child (GTK_STACK (dialog->left_stack), GTK_WIDGET (dialog->add_text_options)); - gtk_widget_hide (GTK_WIDGET (dialog->replace_box)); + if (strcmp (visible_child, "format") == 0) { + /* switch the mode to what was before set with the radio buttons */ + batch_rename_format_mode_changed (dialog); - gtk_widget_grab_focus (dialog->name_entry); + gtk_entry_set_text (GTK_ENTRY (dialog->name_entry), + gtk_entry_get_text (GTK_ENTRY (dialog->find_entry))); - gtk_container_child_set_property (GTK_CONTAINER (dialog->grid), dialog->name_entry, "width",&width); - - gtk_widget_set_size_request (dialog->name_entry, ADD_TEXT_ENTRY_SIZE, -1); -} - -static void -batch_rename_mode_changed (GtkComboBoxText *widget, - NautilusBatchRename *dialog) -{ - gchar* active_item; - - active_item = gtk_combo_box_text_get_active_text (widget); + gtk_widget_grab_focus (dialog->name_entry); + } - if (strcmp (active_item, "Replace") == 0) { + if (strcmp (visible_child, "replace") == 0) { dialog->mode = NAUTILUS_BATCH_RENAME_REPLACE; - switch_to_replace_mode (dialog); - } - /* check whether before it was append or prepend */ - if (strcmp (active_item, "Add Text") == 0) { - batch_rename_add_text_changed (GTK_COMBO_BOX_TEXT (dialog->add_text_options), dialog); + gtk_entry_set_text (GTK_ENTRY (dialog->find_entry), + gtk_entry_get_text (GTK_ENTRY (dialog->name_entry))); - switch_to_add_text_mode (dialog); + gtk_widget_grab_focus (dialog->find_entry); } /* update display text */ @@ -194,25 +166,6 @@ batch_rename_mode_changed (GtkComboBoxText *widget, } static void -activate_expander (GtkExpander *expander, - NautilusBatchRename *dialog) -{ - //GValue width = G_VALUE_INIT; - - //g_value_init (&width, G_TYPE_INT); - - //if (gtk_expander_get_expanded (GTK_EXPANDER (expander))) { - - //g_value_set_int (&width, 8); - //gtk_container_child_set_property (GTK_CONTAINER (dialog->grid), dialog->label_stack, "width",&width); - //} else { - - //g_value_set_int (&width, 5); - //gtk_container_child_set_property (GTK_CONTAINER (dialog->grid), dialog->label_stack, "width",&width); - //} -} - -static void listbox_header_func (GtkListBoxRow *row, GtkListBoxRow *before, NautilusBatchRename *dialog) @@ -306,7 +259,6 @@ file_names_widget_entry_on_changed (NautilusBatchRename *dialog) gchar *display_text = NULL; NautilusFile *file; gboolean singe_conflict; - //GValue width = G_VALUE_INIT; if(dialog->selection == NULL) return; @@ -318,6 +270,7 @@ file_names_widget_entry_on_changed (NautilusBatchRename *dialog) singe_conflict = (duplicates->next == NULL) ? TRUE:FALSE; file_name = NULL; + entry_text = NULL; /* check if there are name conflicts and display them if they exist */ if (duplicates != NULL) { @@ -363,22 +316,21 @@ file_names_widget_entry_on_changed (NautilusBatchRename *dialog) gtk_widget_set_sensitive (dialog->rename_button, TRUE); gtk_stack_set_visible_child (GTK_STACK (dialog->label_stack), GTK_WIDGET (dialog->error_label)); - - //g_value_init (&width, G_TYPE_INT); - //g_value_set_int (&width, 8); - //gtk_container_child_set_property (GTK_CONTAINER (dialog->grid), dialog->label_stack, "width",&width); - - } /* Update label that shows an example of the renaming result */ file = NAUTILUS_FILE (dialog->selection->data); file_name = g_strdup (nautilus_file_get_name (file)); - entry_text = g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->name_entry))); + if (dialog->mode == NAUTILUS_BATCH_RENAME_REPLACE) { + entry_text = g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->find_entry))); + } + else + entry_text = g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->name_entry))); + replace_text = g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->replace_entry))); - if (entry_text == NULL ) { + if (entry_text == NULL) { gtk_label_set_label (GTK_LABEL (dialog->error_label), file_name); g_free (file_name); @@ -431,27 +383,26 @@ nautilus_batch_rename_class_init (NautilusBatchRenameClass *klass) gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/nautilus/ui/nautilus-batch-rename-dialog.ui"); gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, grid); - gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, add_text_options); gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, cancel_button); gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, conflict_listbox); gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, error_label); gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, expander); gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, name_entry); gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, rename_button); - gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, rename_modes); gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, find_label); - gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, left_stack); + gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, find_entry); gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, label_stack); - gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, right_stack); gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, replace_label); gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, replace_entry); - gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, replace_box); + gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, new_name_button); + gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, append_button); + gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, prepend_button); + gtk_widget_class_bind_template_child (widget_class, NautilusBatchRename, mode_stack); gtk_widget_class_bind_template_callback (widget_class, file_names_widget_entry_on_changed); gtk_widget_class_bind_template_callback (widget_class, batch_rename_dialog_on_closed); - gtk_widget_class_bind_template_callback (widget_class, batch_rename_mode_changed); gtk_widget_class_bind_template_callback (widget_class, file_names_widget_on_activate); - gtk_widget_class_bind_template_callback (widget_class, batch_rename_add_text_changed); + gtk_widget_class_bind_template_callback (widget_class, batch_rename_format_mode_changed); } GtkWidget* @@ -469,6 +420,8 @@ nautilus_batch_rename_new (NautilusFilesView *view) gtk_widget_grab_focus (dialog->name_entry); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->append_button), TRUE); + gtk_label_set_ellipsize (GTK_LABEL (dialog->error_label), PANGO_ELLIPSIZE_END); gtk_label_set_max_width_chars (GTK_LABEL (dialog->error_label), MAX_DISPLAY_LEN); @@ -477,6 +430,11 @@ nautilus_batch_rename_new (NautilusFilesView *view) gtk_widget_set_vexpand (dialog->rename_button, FALSE); + g_signal_connect (dialog->mode_stack, + "notify::visible-child", + G_CALLBACK (mode_stack_changed), + dialog); + /* update display text */ file_names_widget_entry_on_changed (dialog); @@ -488,16 +446,11 @@ nautilus_batch_rename_init (NautilusBatchRename *self) { gtk_widget_init_template (GTK_WIDGET (self)); - gtk_combo_box_set_active (GTK_COMBO_BOX (self->add_text_options), 1); - gtk_combo_box_set_active (GTK_COMBO_BOX (self->rename_modes), 0); - gtk_list_box_set_header_func (GTK_LIST_BOX (self->conflict_listbox), (GtkListBoxUpdateHeaderFunc) listbox_header_func, self, NULL); - g_signal_connect (self->expander, "activate", G_CALLBACK (activate_expander), self); - self->expander_label = gtk_label_new (""); self->mode = NAUTILUS_BATCH_RENAME_PREPEND; diff --git a/src/nautilus-batch-rename.h b/src/nautilus-batch-rename.h index 63fab696b..27e77ec38 100644 --- a/src/nautilus-batch-rename.h +++ b/src/nautilus-batch-rename.h @@ -12,7 +12,7 @@ typedef enum { NAUTILUS_BATCH_RENAME_APPEND = 0, NAUTILUS_BATCH_RENAME_PREPEND = 1, NAUTILUS_BATCH_RENAME_REPLACE = 2, - NAUTILUS_BATCH_RENAME_FORMAT = 3, + NAUTILUS_BATCH_RENAME_NEW_NAME = 3, } NautilusBatchRenameModes; #define NAUTILUS_TYPE_BATCH_RENAME (nautilus_batch_rename_get_type()) diff --git a/src/resources/ui/nautilus-batch-rename-dialog.ui b/src/resources/ui/nautilus-batch-rename-dialog.ui index 5a6004328..0fd0d2f8c 100644 --- a/src/resources/ui/nautilus-batch-rename-dialog.ui +++ b/src/resources/ui/nautilus-batch-rename-dialog.ui @@ -5,34 +5,47 @@ <property name="modal">True</property> <property name="window_position">center-on-parent</property> <property name="destroy_with_parent">True</property> - <property name="title">Batch rename</property> - <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> - <signal name="clicked" handler="batch_rename_dialog_on_closed" swapped="yes" /> - </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> - <signal name="clicked" handler="file_names_widget_on_activate" swapped="yes" /> - <style> - <class name="suggested-action"/> - </style> + <child internal-child="headerbar"> + <object class="GtkHeaderBar" id="headerbar1"> + <property name="visible">1</property> + <property name="show-close-button">0</property> + <child type="title"> + <object class="GtkStackSwitcher" id="stack_switcher"> + <property name="visible">True</property> + <property name="stack">mode_stack</property> + <property name="no-show-all">1</property> + </object> + </child> + <child> + <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> + <signal name="clicked" handler="batch_rename_dialog_on_closed" swapped="yes" /> + </object> + <packing> + <property name="pack-type">start</property> + </packing> + </child> + <child> + <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> + <signal name="clicked" handler="file_names_widget_on_activate" swapped="yes" /> + <style> + <class name="suggested-action"/> + </style> + </object> + <packing> + <property name="pack-type">end</property> + </packing> + </child> </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"> <child> @@ -45,48 +58,303 @@ <property name="row-homogeneous">False</property> <property name="column-homogeneous">False</property> <child> - <object class="GtkComboBoxText" id="rename_modes"> + <object class="GtkStack" id="mode_stack"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="expand">False</property> - <signal name="changed" handler="batch_rename_mode_changed" swapped="no" /> - <items> - <item translatable="yes" id="add_text">Add Text</item> - <item translatable="yes" id="replace">Replace</item> - <item translatable="yes" id="format">Format</item> - </items> + <property name="can_focus">False</property> + <property name="vhomogeneous">False</property> + <property name="hhomogeneous">False</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">10</property> + <property name="row-spacing">6</property> + <property name="column-spacing">6</property> + <child> + <object class="GtkBox" id="hbox3"> + <property name="orientation">horizontal</property> + <property name="spacing">15</property> + <property name="visible">True</property> + <property name="halign">center</property> + <child> + <object class="GtkRadioButton" id="new_name_button"> + <property name="label" translatable="yes">_New Name</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_format_mode_changed" swapped="yes" /> + </object> + </child> + <child> + <object class="GtkRadioButton" id="append_button"> + <property name="label" translatable="yes">_Append</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">False</property> + <property name="group">new_name_button</property> + <signal name="toggled" handler="batch_rename_format_mode_changed" swapped="yes" /> + </object> + </child> + <child> + <object class="GtkRadioButton" id="prepend_button"> + <property name="label" translatable="yes">_Prepend</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">False</property> + <property name="group">new_name_button</property> + <signal name="toggled" handler="batch_rename_format_mode_changed" swapped="yes" /> + </object> + </child> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">0</property> + <property name="width">6</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="name_entry"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="width_request">550</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">1</property> + <property name="width">5</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="name_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Name:</property> + <property name="can_focus">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="GtkLabel" id="where_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Where</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left-attach">3</property> + <property name="top-attach">2</property> + <property name="width">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="add_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Add</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">2</property> + <property name="width">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="vbox3"> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <property name="visible">True</property> + <property name="halign">center</property> + <child> + <object class="GtkRadioButton" id="after"> + <property name="label" translatable="yes">_After Name</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">False</property> + </object> + </child> + <child> + <object class="GtkRadioButton" id="before"> + <property name="label" translatable="yes">_Before Name</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">False</property> + <property name="group">after</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">3</property> + <property name="top-attach">3</property> + <property name="width">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="vbox4"> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <property name="visible">True</property> + <property name="halign">center</property> + <child> + <object class="GtkCheckButton" id="index"> + <property name="label" translatable="yes">Index</property> + <property name="visible">True</property> + <property name="active">False</property> + <property name="can_focus">True</property> + </object> + </child> + <child> + <object class="GtkCheckButton" id="padding"> + <property name="label" translatable="yes">Zero padding</property> + <property name="visible">True</property> + <property name="active">False</property> + <property name="can_focus">True</property> + </object> + </child> + <child> + <object class="GtkCheckButton" id="date"> + <property name="label" translatable="yes">Date</property> + <property name="visible">True</property> + <property name="active">False</property> + <property name="can_focus">True</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">3</property> + <property name="width">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="start_at"> + <property name="visible">True</property> + <property name="label" translatable="yes">Start at</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">4</property> + <property name="width">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="spinbutton1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="width-chars">2</property> + <property name="max-width-chars">2</property> + <property name="adjustment">adjustment</property> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">4</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">10</property> + <property name="row-spacing">6</property> + <property name="column-spacing">6</property> + <child> + <object class="GtkLabel" id="find_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Replace:</property> + <property name="can_focus">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">275</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">With:</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left-attach">4</property> + <property name="top-attach">0</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">275</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">6</property> + <property name="top-attach">0</property> + <property name="width">3</property> + </packing> + </child> + </object> + <packing> + <property name="name">replace</property> + <property name="title" translatable="yes">Replace</property> + </packing> + </child> + <!--Metadata mode (nonexistent yet)--> + <child> + <object class="GtkBox" id="metadata_stack_child"> + <property name="visible">True</property> + </object> + <packing> + <property name="name">metadata</property> + <property name="title" translatable="yes">Metadata</property> + </packing> + </child> </object> <packing> <property name="left-attach">0</property> - <property name="top-attach">0</property> - <property name="width">1</property> - </packing> - </child> - <child> - <object class="GtkStackSwitcher" id="stack_switcher"> - <property name="stack">label_stack</property> - <property name="no-show-all">1</property> - </object> - <packing> - <property name="left-attach">1</property> - <property name="top-attach">0</property> - <property name="width">1</property> - </packing> - </child> - <child> - <object class="GtkEntry" id="name_entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="width_request">275</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">1</property> - <property name="width">3</property> + <property name="width">8</property> </packing> </child> <child> @@ -100,7 +368,6 @@ <property name="can_focus">False</property> </object> </child> - <child> <object class="GtkExpander" id="expander"> <property name="visible">True</property> @@ -132,7 +399,6 @@ </child> </object> </child> - </object> <packing> <property name="left-attach">0</property> @@ -140,77 +406,16 @@ <property name="width">8</property> </packing> </child> - - <child> - <object class="GtkStack" id="left_stack"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hhomogeneous">True</property> - <child> - <object class="GtkComboBoxText" id="add_text_options"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="expand">False</property> - <signal name="changed" handler="batch_rename_add_text_changed" swapped="no" /> - <items> - <item translatable="yes" id="append">Append</item> - <item translatable="yes" id="prepend">Prepend</item> - </items> - </object> - </child> - <child> - <object class="GtkLabel" id="find_label"> - <property name="visible">True</property> - <property name="label" translatable="yes">Replace:</property> - <property name="can_focus">False</property> - </object> - </child> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">1</property> - <property name="width">1</property> - </packing> - </child> - <child> - <object class="GtkStack" id="right_stack"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hhomogeneous">True</property> - <child> - <object class="GtkBox" id="replace_box"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">horizontal</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel" id="replace_label"> - <property name="visible">True</property> - <property name="label" translatable="yes">With:</property> - <property name="can_focus">False</property> - </object> - </child> - <child> - <object class="GtkEntry" id="replace_entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="width_request">275</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> - </child> - </object> - </child> - </object> - <packing> - <property name="left-attach">4</property> - <property name="top-attach">1</property> - <property name="width">3</property> - </packing> - </child> </object> </child> </object> </child> </template> + <object class="GtkAdjustment" id="adjustment"> + <property name="upper">100000000</property> + <property name="lower">0</property> + <property name="value">1</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> </interface>
\ No newline at end of file |