[grilo] core: Fix warning when setting a related boolean key



commit 948686dbaec8fe1d45b9b0b5983297da606c2ab7
Author: Rafael Fonseca <r4f4rfs gmail com>
Date:   Sat Jan 30 16:10:28 2016 +0100

    core: Fix warning when setting a related boolean key
    
    When trying to set a related key for which there is no specific handle, grilo
    complains with the following message
    
    Grilo-WARNING **: [data] data/grl-data.c:742: Trying to add an empty
    GrlRelatedKeys to GrlData
    
    This patch makes it possible to properly set such boolean keys.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707643

 src/data/grl-related-keys.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/data/grl-related-keys.c b/src/data/grl-related-keys.c
index 2bde3c0..3a03d54 100644
--- a/src/data/grl-related-keys.c
+++ b/src/data/grl-related-keys.c
@@ -151,6 +151,8 @@ grl_related_keys_new_valist (GrlKeyID key,
       grl_related_keys_set_int (prop, next_key, va_arg (args, gint));
     } else if (key_type == G_TYPE_FLOAT) {
       grl_related_keys_set_float (prop, next_key, va_arg (args, double));
+    } else if (key_type == G_TYPE_BOOLEAN) {
+      grl_related_keys_set_boolean (prop, next_key, va_arg (args, gboolean));
     } else if (key_type == G_TYPE_BYTE_ARRAY) {
       next_value = va_arg (args, gpointer);
       grl_related_keys_set_binary (prop,


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