[vala] gtktemplate: Handle callbacks for detailed signals
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] gtktemplate: Handle callbacks for detailed signals
- Date: Mon, 6 Jan 2014 10:32:27 +0000 (UTC)
commit 86bf398bdff96c03ffb34ef0a60d311557db5077
Author: Luca Bruno <lucabru src gnome org>
Date: Mon Jan 6 11:31:41 2014 +0100
gtktemplate: Handle callbacks for detailed signals
Fixes bug 720825
codegen/valagtkmodule.vala | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/codegen/valagtkmodule.vala b/codegen/valagtkmodule.vala
index f3c9a3d..603ec60 100644
--- a/codegen/valagtkmodule.vala
+++ b/codegen/valagtkmodule.vala
@@ -2,7 +2,7 @@
/* valagtkmodule.vala
*
* Copyright (C) 2013 Jürg Billeter
- * Copyright (C) 2013 Luca Bruno
+ * Copyright (C) 2013-2014 Luca Bruno
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -126,7 +126,13 @@ public class Vala.GtkModule : GSignalModule {
var signal_name = reader.get_attribute ("name");
var handler_name = reader.get_attribute ("handler");
if (current_class != null) {
- var sig = SemanticAnalyzer.symbol_lookup_inherited (current_class,
signal_name.replace("-", "_")) as Signal;
+ var sep_idx = signal_name.index_of ("::");
+ if (sep_idx >= 0) {
+ // detailed signal, we don't care about the detail
+ signal_name = signal_name.substring (0, sep_idx);
+ }
+
+ var sig = SemanticAnalyzer.symbol_lookup_inherited (current_class,
signal_name.replace ("-", "_")) as Signal;
if (sig != null) {
current_handler_to_signal_map.set (handler_name, sig);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]