[grilo-plugins] lua-factory: Don't warn for the "type" key
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [grilo-plugins] lua-factory: Don't warn for the "type" key
- Date: Sat,  1 Mar 2014 19:44:23 +0000 (UTC)
commit 337937b5a16d84467e3b0852c70b38bb4a899fd9
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Mar 1 20:41:47 2014 +0100
    lua-factory: Don't warn for the "type" key
    
    We don't handle it in this loop, but it's correct to define the
    type of a GrlMedia and handled just above.
 src/lua-factory/grl-lua-library.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/lua-factory/grl-lua-library.c b/src/lua-factory/grl-lua-library.c
index 14f0d24..89bd7dd 100644
--- a/src/lua-factory/grl-lua-library.c
+++ b/src/lua-factory/grl-lua-library.c
@@ -218,6 +218,11 @@ grl_util_build_media (lua_State *L,
     gchar *ptr = NULL;
     GType type = G_TYPE_NONE;
 
+    /* Handled above */
+    if (g_strcmp0 (key_name, "type") == 0) {
+      goto next_key;
+    }
+
     /* Replace '_' to '-': convenient for the developer */
     while ((ptr = strstr (key_name, "_")) != NULL) {
       *ptr = '-';
@@ -281,6 +286,7 @@ grl_util_build_media (lua_State *L,
       GRL_WARNING ("'%s' is not a valid keyword", key_name);
     }
 
+next_key:
     g_free (key_name);
     lua_pop (L, 1);
   }
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]