[nautilus/wip/antoniof/gtk4-preparation-batch-rename-dialog: 59/63] batch-rename-dialog: Don't recreate separator if one exists already




commit afaacbe4be77842ccb67da644a802fe0605e9931
Author: António Fernandes <antoniof gnome org>
Date:   Sat Oct 16 16:32:22 2021 +0100

    batch-rename-dialog: Don't recreate separator if one exists already

 src/nautilus-batch-rename-dialog.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-batch-rename-dialog.c b/src/nautilus-batch-rename-dialog.c
index b223f4e64..4f278c268 100644
--- a/src/nautilus-batch-rename-dialog.c
+++ b/src/nautilus-batch-rename-dialog.c
@@ -491,14 +491,14 @@ listbox_header_func (GtkListBoxRow             *row,
                      NautilusBatchRenameDialog *dialog)
 {
     gboolean show_separator;
+    GtkWidget *separator;
 
     show_separator = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row),
                                                          "show-separator"));
 
-    if (show_separator)
+    separator = gtk_list_box_row_get_header (row);
+    if (separator == NULL && show_separator)
     {
-        GtkWidget *separator;
-
         separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
         gtk_widget_show (separator);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]