src/Palete/Gir.vala wip_alan_T7297_filter_objects_on_roo origin/wip_alan_T7297_filter_objects_on_roo
authorAlan <alan@roojs.com>
Wed, 6 Jul 2022 07:35:37 +0000 (15:35 +0800)
committerAlan <alan@roojs.com>
Wed, 6 Jul 2022 07:35:37 +0000 (15:35 +0800)
src/Palete/Gir.vala

index ad708ea..eed7cf7 100644 (file)
@@ -243,14 +243,18 @@ namespace Palete {
                        if (type.length < 1 || type.contains(".")) {
                                return "null";
                        }
-                       switch(type) {
+                       switch(type.down()) {
+                               case "boolean":
+                               case "bool":
                                case "gboolean":
                                        return "true";
+                               case "int":                                     
                                case "guint":
                                        return "0";
                                case "gdouble":
                                        return "0f";
                                case "utf8":
+                               case "string":
                                        return "\"\"";
                                default:
                                        return "?"+  type + "?";