[vala/switch-to-gir: 14/22] girparser: Fix support for signals metadata.



commit 6a13e3eceb06e3ff4557c8a4fe81e2c0c7569aa0
Author: Luca Bruno <lucabru src gnome org>
Date:   Wed Nov 17 21:05:31 2010 +0100

    girparser: Fix support for signals metadata.

 vala/valagirparser.vala |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 64967b6..6d9aa6b 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -289,11 +289,11 @@ public class Vala.GirParser : CodeVisitor {
 				next ();
 				return MetadataType.GENERIC;
 			case TokenType.COLON:
-				if (next () == TokenType.COLON) {
-					next ();
-					return MetadataType.SIGNAL;
-				}
+				next ();
 				return MetadataType.PROPERTY;
+			case TokenType.DOUBLE_COLON:
+				next ();
+				return MetadataType.SIGNAL;
 			default:
 				return null;
 			}
@@ -981,6 +981,7 @@ public class Vala.GirParser : CodeVisitor {
 
 		var type = MetadataType.GENERIC;
 		if (name == "glib:signal") {
+			child_name = child_name.replace ("-", "_");
 			type = MetadataType.SIGNAL;
 		} else if (name == "property") {
 			type = MetadataType.PROPERTY;



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