vala r1858 - in trunk: . gobject



Author: malureau
Date: Fri Oct 17 19:32:12 2008
New Revision: 1858
URL: http://svn.gnome.org/viewvc/vala?rev=1858&view=rev

Log:
Rename dbus result

Modified:
   trunk/ChangeLog
   trunk/gobject/valaccodeobjecttypesymbolbinding.vala

Modified: trunk/gobject/valaccodeobjecttypesymbolbinding.vala
==============================================================================
--- trunk/gobject/valaccodeobjecttypesymbolbinding.vala	(original)
+++ trunk/gobject/valaccodeobjecttypesymbolbinding.vala	Fri Oct 17 19:32:12 2008
@@ -35,6 +35,18 @@
 		return true;
 	}
 
+	string dbus_result_name (CodeNode node) {
+		var dbus_attribute = node.get_attribute ("DBus");
+		if (dbus_attribute != null
+		    && dbus_attribute.has_argument ("result")) {
+			var result_name = dbus_attribute.get_string ("result");
+			if (result_name != null && result_name != "")
+				return result_name;
+		}
+
+		return "result";
+	}
+
 	public CCodeFragment register_dbus_info (ObjectTypeSymbol bindable) {
 
 		CCodeFragment fragment = new CCodeFragment ();
@@ -125,7 +137,8 @@
 			}
 
 			if (!(m.return_type is VoidType)) {
-				blob.append ("result\\0");
+				blob.append (dbus_result_name (m));
+				blob.append ("\\0");
 				start++;
 
 				blob.append ("O\\0");



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