diff options
author | Sirbu Lavinia Stefania <sirbu.lavinia.stefania@gmail.com> | 2016-09-27 18:57:21 -0400 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2016-10-03 11:29:24 +0200 |
commit | 568193ea2fccbeb0c7bef684a563d4b3f646a252 (patch) | |
tree | 25d49944378ca9b34809cbd8a1420cdfcf9213fd /src/nautilus-batch-rename-dialog.c | |
parent | d71b29fa1e6afb469d65c4e4ead84040942a6aad (diff) | |
download | nautilus-568193ea2fccbeb0c7bef684a563d4b3f646a252.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 a child represented by a GtkBox. The GtkBox
contains a label and the toggle button for choosing an option of automatic
renaming. The child is revealed only when necesarry, more specifically 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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nautilus-batch-rename-dialog.c b/src/nautilus-batch-rename-dialog.c index 7f805ae23..050d56624 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; @@ -1523,13 +1524,11 @@ 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_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_revealer_set_reveal_child(GTK_REVEALER(dialog->numbering_revealer), TRUE); } dialog->new_names = batch_rename_dialog_get_new_names (dialog); @@ -2095,6 +2094,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); |