[vala] gtk+-2.0, gtk+-3.0: Fix GtkActionEntry binding
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] gtk+-2.0, gtk+-3.0: Fix GtkActionEntry binding
- Date: Tue, 22 Feb 2011 07:26:59 +0000 (UTC)
commit 60eb0417824f0edcba18d82c8754307c6b5c9c46
Author: Jürg Billeter <j bitron ch>
Date: Tue Feb 22 08:25:51 2011 +0100
gtk+-2.0, gtk+-3.0: Fix GtkActionEntry binding
Fixes bug 642427.
vapi/gtk+-2.0.vapi | 2 +-
vapi/gtk+-3.0.vapi | 2 +-
vapi/packages/gtk+-2.0/gtk+-2.0.metadata | 2 +-
vapi/packages/gtk+-3.0/gtk+-3.0.metadata | 2 +-
vapigen/valagidlparser.vala | 6 ++++++
5 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/vapi/gtk+-2.0.vapi b/vapi/gtk+-2.0.vapi
index 0f8ddad..74e5867 100644
--- a/vapi/gtk+-2.0.vapi
+++ b/vapi/gtk+-2.0.vapi
@@ -6245,7 +6245,7 @@ namespace Gtk {
public weak string accelerator;
public weak string tooltip;
[CCode (type = "GCallback")]
- public Gtk.ActionCallback callback;
+ public weak Gtk.ActionCallback callback;
}
[CCode (type_id = "GTK_TYPE_ALLOCATION", cheader_filename = "gtk/gtk.h")]
public struct Allocation {
diff --git a/vapi/gtk+-3.0.vapi b/vapi/gtk+-3.0.vapi
index d2f7238..fa1ffbd 100644
--- a/vapi/gtk+-3.0.vapi
+++ b/vapi/gtk+-3.0.vapi
@@ -6090,7 +6090,7 @@ namespace Gtk {
public weak string accelerator;
public weak string tooltip;
[CCode (type = "GCallback")]
- public Gtk.ActionCallback callback;
+ public weak Gtk.ActionCallback callback;
}
[CCode (type_id = "GTK_TYPE_ALLOCATION", cheader_filename = "gtk/gtk.h")]
public struct Allocation {
diff --git a/vapi/packages/gtk+-2.0/gtk+-2.0.metadata b/vapi/packages/gtk+-2.0/gtk+-2.0.metadata
index 6ecba2c..fb3a650 100644
--- a/vapi/packages/gtk+-2.0/gtk+-2.0.metadata
+++ b/vapi/packages/gtk+-2.0/gtk+-2.0.metadata
@@ -26,7 +26,7 @@ gtk_action_new.tooltip nullable="1"
gtk_action_new.stock_id nullable="1"
GtkAction::activate has_emitter="1"
GtkActionEntry is_value_type="1"
-GtkActionEntry.callback type_name="ActionCallback" ctype="GCallback"
+GtkActionEntry.callback type_name="ActionCallback" ctype="GCallback" value_owned="0"
gtk_action_group_add_action_with_accel.accelerator nullable="1"
gtk_action_group_add_actions.user_data hidden="0"
gtk_action_group_add_actions_full.user_data hidden="0"
diff --git a/vapi/packages/gtk+-3.0/gtk+-3.0.metadata b/vapi/packages/gtk+-3.0/gtk+-3.0.metadata
index 0272404..23d00b4 100644
--- a/vapi/packages/gtk+-3.0/gtk+-3.0.metadata
+++ b/vapi/packages/gtk+-3.0/gtk+-3.0.metadata
@@ -26,7 +26,7 @@ gtk_action_new.tooltip nullable="1"
gtk_action_new.stock_id nullable="1"
GtkAction::activate has_emitter="1"
GtkActionEntry is_value_type="1"
-GtkActionEntry.callback type_name="ActionCallback" ctype="GCallback"
+GtkActionEntry.callback type_name="ActionCallback" ctype="GCallback" value_owned="0"
gtk_action_group_add_action_with_accel.accelerator nullable="1"
gtk_action_group_add_actions.user_data hidden="0"
gtk_action_group_add_actions_full.user_data hidden="0"
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index bc45b3e..1e01638 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -2517,6 +2517,12 @@ public class Vala.GIdlParser : CodeVisitor {
if (eval (nv[1]) == "0") {
type.value_owned = true;
}
+ } else if (nv[0] == "value_owned") {
+ if (eval (nv[1]) == "0") {
+ type.value_owned = false;
+ } else if (eval (nv[1]) == "1") {
+ type.value_owned = true;
+ }
} else if (nv[0] == "type_name") {
type = parse_type_from_string (eval (nv[1]), true);
} else if (nv[0] == "type_arguments") {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]