[nautilus/wip/antoniof/gtk4-preparation-batch-rename-dialog: 3/5] batch-rename-dialog: Don't add separator above first row




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

    batch-rename-dialog: Don't add separator above first row
    
    It doesn't look good.

 src/nautilus-batch-rename-dialog.c | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/src/nautilus-batch-rename-dialog.c b/src/nautilus-batch-rename-dialog.c
index 982ff1caa..87ad3eb0b 100644
--- a/src/nautilus-batch-rename-dialog.c
+++ b/src/nautilus-batch-rename-dialog.c
@@ -492,6 +492,13 @@ listbox_header_func (GtkListBoxRow             *row,
 {
     GtkWidget *separator;
 
+    if (before == NULL)
+    {
+        /* First row needs no separator */
+        gtk_list_box_row_set_header (row, NULL);
+        return;
+    }
+
     separator = gtk_list_box_row_get_header (row);
     if (separator == NULL)
     {


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