[gtk/shortcuts-rebased-again: 10/96] bindings: Add more variant types
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/shortcuts-rebased-again: 10/96] bindings: Add more variant types
- Date: Tue, 18 Jun 2019 23:39:19 +0000 (UTC)
commit 5142320b243076a1393ce42106917f010edbfb93
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 ad93fb51a2..3ec2a4054c 100644
--- a/gtk/gtkbindings.c
+++ b/gtk/gtkbindings.c
@@ -441,10 +441,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]