summaryrefslogtreecommitdiff
path: root/src/nautilus-batch-rename-dialog.c
diff options
context:
space:
mode:
authorSirbu Lavinia Stefania <sirbu.lavinia.stefania@gmail.com>2016-09-27 18:57:21 -0400
committerCarlos Soriano <csoriano@gnome.org>2016-09-29 09:38:54 +0200
commitb37950722078595699b127b154ea07e9c57cbc09 (patch)
treec2bac8e3ec29d0a930fb366e2b0e29bc8ce77d01 /src/nautilus-batch-rename-dialog.c
parentf2e10b9f101e44fc73b0c53d08961824d73fec1a (diff)
downloadnautilus-b37950722078595699b127b154ea07e9c57cbc09.tar.gz
batch-rename-dialog: revealer for auto numbering
Currently we have a big padding that initially has no meaning. The problem is that when using the rename for multiple files, we initially have an extra padding due to auto numbering. Even if the automatic numbering is not used, the space for the toggle button used for the numbering options is now blank and waiting for a possible use of the automatic option. Add a GtkReaveler that contains the toggle button and reveals his child only when necesarry, when the automatic numbering option is added. https://bugzilla.gnome.org/show_bug.cgi?id=771813
Diffstat (limited to 'src/nautilus-batch-rename-dialog.c')
-rw-r--r--src/nautilus-batch-rename-dialog.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nautilus-batch-rename-dialog.c b/src/nautilus-batch-rename-dialog.c
index 7f805ae23..7b7213e4d 100644
--- a/src/nautilus-batch-rename-dialog.c
+++ b/src/nautilus-batch-rename-dialog.c
@@ -56,6 +56,7 @@ struct _NautilusBatchRenameDialog
GtkWidget *scrolled_window;
GtkWidget *numbering_order_popover;
GtkWidget *numbering_order_button;
+ GtkWidget *numbering_revealer;
GtkWidget *conflict_box;
GtkWidget *conflict_label;
GtkWidget *conflict_down;
@@ -1524,12 +1525,14 @@ update_display_text (NautilusBatchRenameDialog *dialog)
if (!numbering_tag_is_some_added (dialog))
{
gtk_label_set_label (GTK_LABEL (dialog->numbering_label), "");
- gtk_widget_hide (dialog->numbering_order_button);
+ gtk_widget_hide (dialog->numbering_label);
+ gtk_revealer_set_reveal_child(GTK_REVEALER(dialog->numbering_revealer), FALSE);
}
else
{
gtk_label_set_label (GTK_LABEL (dialog->numbering_label), _("Automatic Numbering Order"));
- gtk_widget_show (dialog->numbering_order_button);
+ gtk_widget_show (dialog->numbering_label);
+ gtk_revealer_set_reveal_child(GTK_REVEALER(dialog->numbering_revealer), TRUE);
}
dialog->new_names = batch_rename_dialog_get_new_names (dialog);
@@ -2095,6 +2098,7 @@ nautilus_batch_rename_dialog_class_init (NautilusBatchRenameDialogClass *klass)
gtk_widget_class_bind_template_child (widget_class, NautilusBatchRenameDialog, scrolled_window);
gtk_widget_class_bind_template_child (widget_class, NautilusBatchRenameDialog, numbering_order_popover);
gtk_widget_class_bind_template_child (widget_class, NautilusBatchRenameDialog, numbering_order_button);
+ gtk_widget_class_bind_template_child (widget_class, NautilusBatchRenameDialog, numbering_revealer);
gtk_widget_class_bind_template_child (widget_class, NautilusBatchRenameDialog, numbering_order_menu);
gtk_widget_class_bind_template_child (widget_class, NautilusBatchRenameDialog, conflict_box);
gtk_widget_class_bind_template_child (widget_class, NautilusBatchRenameDialog, conflict_label);