vala r1079 - in trunk: . gobject



Author: juergbi
Date: Sat Mar  1 16:21:55 2008
New Revision: 1079
URL: http://svn.gnome.org/viewvc/vala?rev=1079&view=rev

Log:
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


Modified:
   trunk/ChangeLog
   trunk/gobject/valaccodegenerator.vala
   trunk/gobject/valaccodegeneratorclass.vala

Modified: trunk/gobject/valaccodegenerator.vala
==============================================================================
--- trunk/gobject/valaccodegenerator.vala	(original)
+++ trunk/gobject/valaccodegenerator.vala	Sat Mar  1 16:21:55 2008
@@ -619,7 +619,8 @@
 		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 ()));
 		}
 	}

Modified: trunk/gobject/valaccodegeneratorclass.vala
==============================================================================
--- trunk/gobject/valaccodegeneratorclass.vala	(original)
+++ trunk/gobject/valaccodegeneratorclass.vala	Sat Mar  1 16:21:55 2008
@@ -418,6 +418,11 @@
 				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 @@
 			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 @@
 			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;
 



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