[gtk/wip/ebassi/shortcut: 181/267] bindings: Add more variant types
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/ebassi/shortcut: 181/267] bindings: Add more variant types
- Date: Thu, 6 Feb 2020 18:19:04 +0000 (UTC)
commit 48ae9fc50016ede98a4e907900dba5f8e7c820ae
Author: Benjamin Otte <otte redhat com>
Date: Sat Aug 4 12:27:30 2018 +0200
bindings: Add more variant types
Also marshal types that the code in gtkbindings.c doesn't use. These
will be used by gtk_widget_class_add_binding_signal().
gtk/gtkbindings.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/gtk/gtkbindings.c b/gtk/gtkbindings.c
index 51df2d8d33..402c260791 100644
--- a/gtk/gtkbindings.c
+++ b/gtk/gtkbindings.c
@@ -541,10 +541,22 @@ binding_compose_params (GObject *object,
switch ((guint) g_variant_classify (tmp_variant))
{
+ case G_VARIANT_CLASS_BOOLEAN:
+ g_value_init (&tmp_value, G_TYPE_BOOLEAN);
+ g_value_set_boolean (&tmp_value, g_variant_get_boolean (tmp_variant));
+ break;
case G_VARIANT_CLASS_DOUBLE:
g_value_init (&tmp_value, G_TYPE_DOUBLE);
g_value_set_double (&tmp_value, g_variant_get_double (tmp_variant));
break;
+ case G_VARIANT_CLASS_INT32:
+ g_value_init (&tmp_value, G_TYPE_LONG);
+ g_value_set_long (&tmp_value, g_variant_get_int32 (tmp_variant));
+ break;
+ case G_VARIANT_CLASS_UINT32:
+ g_value_init (&tmp_value, G_TYPE_LONG);
+ g_value_set_long (&tmp_value, g_variant_get_uint32 (tmp_variant));
+ break;
case G_VARIANT_CLASS_INT64:
g_value_init (&tmp_value, G_TYPE_LONG);
g_value_set_long (&tmp_value, g_variant_get_int64 (tmp_variant));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]