don't register private properties with GObject property system, fixes bug
authorJuerg Billeter <j@bitron.ch>
Sat, 1 Mar 2008 16:21:55 +0000 (16:21 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Sat, 1 Mar 2008 16:21:55 +0000 (16:21 +0000)
2008-03-01  Juerg Billeter  <j@bitron.ch>

* gobject/valaccodegenerator.vala,
  gobject/valaccodegeneratorclass.vala: don't register private
  properties with GObject property system, fixes bug 519201

svn path=/trunk/; revision=1079

ChangeLog
gobject/valaccodegenerator.vala
gobject/valaccodegeneratorclass.vala

index 6d66523..6b60fbf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2008-03-01  Jürg Billeter  <j@bitron.ch>
 
+       * gobject/valaccodegenerator.vala,
+         gobject/valaccodegeneratorclass.vala: don't register private
+         properties with GObject property system, fixes bug 519201
+
+2008-03-01  Jürg Billeter  <j@bitron.ch>
+
        * vapi/Makefile.am, vapi/hildon-fm-2.deps, vapi/hildon-fm-2.vapi,
          vapi/packages/hildon-fm-2/: add hildon-fm-2 bindings,
          based on patch by Levi Bard, fixes bug 511092
index e9aa25a..3d02ca9 100644 (file)
@@ -619,7 +619,8 @@ public class Vala.CCodeGenerator : CodeGenerator {
                next_temp_var_id = old_next_temp_var_id;
 
                // FIXME: omit real struct types for now since they cannot be expressed as gobject property yet
-               if (prop.parent_symbol is Class && !prop.type_reference.is_real_struct_type ()) {
+               // don't register private properties
+               if (prop.parent_symbol is Class && !prop.type_reference.is_real_struct_type () && prop.access != SymbolAccessibility.PRIVATE) {
                        prop_enum.add_value (new CCodeEnumValue (prop.get_upper_case_cname ()));
                }
        }
index 63ee50a..4c0bf64 100644 (file)
@@ -418,6 +418,11 @@ public class Vala.CCodeGenerator {
                                if (prop.type_reference.is_real_struct_type ()) {
                                        continue;
                                }
+                               if (prop.access == SymbolAccessibility.PRIVATE) {
+                                       // don't register private properties
+                                       continue;
+                               }
+
                                if (prop.overrides || prop.base_interface_property != null) {
                                        var cinst = new CCodeFunctionCall (new CCodeIdentifier ("g_object_class_override_property"));
                                        cinst.add_argument (ccall);
@@ -601,6 +606,10 @@ public class Vala.CCodeGenerator {
                        if (prop.get_accessor == null || prop.is_abstract || prop.type_reference.is_real_struct_type ()) {
                                continue;
                        }
+                       if (prop.access == SymbolAccessibility.PRIVATE) {
+                               // don't register private properties
+                               continue;
+                       }
 
                        bool is_virtual = prop.base_property != null || prop.base_interface_property != null;
 
@@ -652,6 +661,10 @@ public class Vala.CCodeGenerator {
                        if (prop.set_accessor == null || prop.is_abstract || prop.type_reference.is_real_struct_type ()) {
                                continue;
                        }
+                       if (prop.access == SymbolAccessibility.PRIVATE) {
+                               // don't register private properties
+                               continue;
+                       }
 
                        bool is_virtual = prop.base_property != null || prop.base_interface_property != null;