[gtk/arnaudb/better-substitution: 1/5] Fix a gtk-builder-tool substitution.



commit 17ec74da3546dabf7c6addfc07b16985932b3963
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sun Apr 12 17:32:40 2020 +0200

    Fix a gtk-builder-tool substitution.
    
    The margin-left and margin-right properties have been
    removed in favor of margin-start and margin-end ones.

 gtk/tools/gtk-builder-tool-simplify.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/tools/gtk-builder-tool-simplify.c b/gtk/tools/gtk-builder-tool-simplify.c
index 72b867f920..ce066e31f4 100644
--- a/gtk/tools/gtk-builder-tool-simplify.c
+++ b/gtk/tools/gtk-builder-tool-simplify.c
@@ -726,9 +726,10 @@ maybe_rename_property (Element *element, MyParserData *data)
     const char *new_name;
     const char *alt_names[3];
   } props[] = {
+    /* the "replacement" property is placed *after* the "added" properties */
     { "GtkPopover", "modal", GTK_TYPE_POPOVER, PROP_KIND_OBJECT, "autohide", { NULL, NULL, NULL } },
-    { "GtkWidget", "expand", GTK_TYPE_WIDGET, PROP_KIND_OBJECT, "hexpand", { "vexpand", NULL, NULL } },
-    { "GtkWidget", "margin", GTK_TYPE_WIDGET, PROP_KIND_OBJECT, "margin-left", { "margin-top", 
"margin-right", "margin-bottom" } },
+    { "GtkWidget", "expand", GTK_TYPE_WIDGET, PROP_KIND_OBJECT, "vexpand", { "hexpand", NULL, NULL } },
+    { "GtkWidget", "margin", GTK_TYPE_WIDGET, PROP_KIND_OBJECT, "margin-bottom", { "margin-start", 
"margin-end", "margin-top" } },
     { "GtkHeaderBar", "show-close-button", GTK_TYPE_HEADER_BAR, PROP_KIND_OBJECT, "show-title-buttons", { 
NULL, NULL, NULL } }
   };
   int i, k, l;


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