[nautilus/wip/cdavis/post-port-cleanups: 5/6] batch-rename-dialog: Use always-show-arrow for numbering order
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/cdavis/post-port-cleanups: 5/6] batch-rename-dialog: Use always-show-arrow for numbering order
- Date: Sat, 16 Jul 2022 18:56:43 +0000 (UTC)
commit 9dbaaac27deff34fff23305a53e674f3e593c9ae
Author: Christopher Davis <christopherdavis gnome org>
Date: Sat Jul 16 08:27:26 2022 -0400
batch-rename-dialog: Use always-show-arrow for numbering order
GtkMenuButton now has the `always-show-arrow` property. This
means we don't need to pack a label and icon ourselves anymore.
src/nautilus-batch-rename-dialog.c | 8 ++++----
src/resources/ui/nautilus-batch-rename-dialog.ui | 22 +++-------------------
2 files changed, 7 insertions(+), 23 deletions(-)
---
diff --git a/src/nautilus-batch-rename-dialog.c b/src/nautilus-batch-rename-dialog.c
index 514be8879..128db5e8e 100644
--- a/src/nautilus-batch-rename-dialog.c
+++ b/src/nautilus-batch-rename-dialog.c
@@ -49,7 +49,7 @@ struct _NautilusBatchRenameDialog
GtkWidget *replace_entry;
GtkWidget *format_mode_button;
GtkWidget *replace_mode_button;
- GtkWidget *numbering_order_label;
+ GtkWidget *numbering_order_button;
GtkWidget *numbering_label;
GtkWidget *scrolled_window;
GtkWidget *numbering_revealer;
@@ -131,8 +131,8 @@ change_numbering_order (GSimpleAction *action,
{
if (g_strcmp0 (sorts_constants[i].action_target_name, target_name) == 0)
{
- gtk_label_set_label (GTK_LABEL (dialog->numbering_order_label),
- gettext (sorts_constants[i].label));
+ gtk_button_set_label (GTK_BUTTON (dialog->numbering_order_button),
+ gettext (sorts_constants[i].label));
dialog->selection = nautilus_batch_rename_dialog_sort (dialog->selection,
sorts_constants[i].sort_mode,
dialog->create_date);
@@ -1880,7 +1880,7 @@ nautilus_batch_rename_dialog_class_init (NautilusBatchRenameDialogClass *klass)
gtk_widget_class_bind_template_child (widget_class, NautilusBatchRenameDialog, mode_stack);
gtk_widget_class_bind_template_child (widget_class, NautilusBatchRenameDialog, replace_mode_button);
gtk_widget_class_bind_template_child (widget_class, NautilusBatchRenameDialog, format_mode_button);
- gtk_widget_class_bind_template_child (widget_class, NautilusBatchRenameDialog, numbering_order_label);
+ gtk_widget_class_bind_template_child (widget_class, NautilusBatchRenameDialog, numbering_order_button);
gtk_widget_class_bind_template_child (widget_class, NautilusBatchRenameDialog, scrolled_window);
gtk_widget_class_bind_template_child (widget_class, NautilusBatchRenameDialog, numbering_order_menu);
gtk_widget_class_bind_template_child (widget_class, NautilusBatchRenameDialog, numbering_revealer);
diff --git a/src/resources/ui/nautilus-batch-rename-dialog.ui
b/src/resources/ui/nautilus-batch-rename-dialog.ui
index 0583132cd..f9b6e7481 100644
--- a/src/resources/ui/nautilus-batch-rename-dialog.ui
+++ b/src/resources/ui/nautilus-batch-rename-dialog.ui
@@ -216,26 +216,10 @@
</object>
</child>
<child>
- <object class="GtkMenuButton">
+ <object class="GtkMenuButton" id="numbering_order_button">
<property name="menu-model">numbering_order_menu</property>
- <child>
- <object class="GtkBox">
- <property name="spacing">15</property>
- <child>
- <object class="GtkLabel" id="numbering_order_label">
- <property name="width-request">180</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Original Name
(Ascending)</property>
- </object>
- </child>
- <child>
- <object class="GtkImage" id="action_icon">
- <property name="icon-name">pan-down-symbolic</property>
- <property name="icon-size">1</property>
- </object>
- </child>
- </object>
- </child>
+ <property name="label" translatable="yes">Original Name
(Ascending)</property>
+ <property name="always-show-arrow">True</property>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]