[gtk/simplify-fixes: 1/2] builder-tool: Fix property check



commit 28be1c5d3a0707891b69bc3b183ecc445692e6b0
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Apr 23 21:25:59 2019 +0000

    builder-tool: Fix property check
    
    Embarrassingly, there was a missing else
    causing us to check all packing properties
    as object properties, never finding them.

 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 7d64b2aa41..9b7eeeba14 100644
--- a/gtk/tools/gtk-builder-tool-simplify.c
+++ b/gtk/tools/gtk-builder-tool-simplify.c
@@ -500,7 +500,7 @@ property_can_be_omitted (Element      *element,
 
   if (g_str_equal (element->parent->element_name, "packing"))
     kind = PROP_KIND_PACKING;
-  if (g_str_equal (element->parent->element_name, "cell-packing"))
+  else if (g_str_equal (element->parent->element_name, "cell-packing"))
     kind = PROP_KIND_CELL_PACKING;
   else
     kind = PROP_KIND_OBJECT;
@@ -522,7 +522,8 @@ property_can_be_omitted (Element      *element,
         property_name = (const gchar *)element->attribute_values[i];
     }
 
-  if (keep_for_rewrite (class_name, property_name, kind))
+  if (data->convert3to4 && 
+      keep_for_rewrite (class_name, property_name, kind))
     return FALSE; /* keep, will be rewritten */
 
   if (translatable)


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