summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEduardo Lima (Etrunko) <eduardo.lima@intel.com>2013-09-17 15:22:19 -0300
committerEduardo Lima (Etrunko) <eduardo.lima@intel.com>2013-09-19 19:45:26 -0300
commit0a7ee257c2c3fd8e9db4b311b3cf7cb41385a1ac (patch)
tree513104a4db15484b3000fe9984bef06a19de5ab2 /src
parentbd06d5ec04df4276af9502aace782157751509a7 (diff)
downloadweekeyboard-0a7ee257c2c3fd8e9db4b311b3cf7cb41385a1ac.tar.gz
weekeyboard-0a7ee257c2c3fd8e9db4b311b3cf7cb41385a1ac.tar.bz2
weekeyboard-0a7ee257c2c3fd8e9db4b311b3cf7cb41385a1ac.zip
Added missing implementation of config_key_string_list_set
Also fix config_key_string_set Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/wkb-ibus-config-key.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/wkb-ibus-config-key.c b/src/wkb-ibus-config-key.c
index 6853974..38f76d1 100644
--- a/src/wkb-ibus-config-key.c
+++ b/src/wkb-ibus-config-key.c
@@ -112,7 +112,7 @@ _key_string_set(struct wkb_config_key *key, Eldbus_Message_Iter *iter)
return EINA_FALSE;
}
- if ((*field = (const char *) key->field) != NULL)
+ if ((field = (const char *) key->field) && *field)
eina_stringshare_del(*field);
if (str && strlen(str))
@@ -143,6 +143,18 @@ _key_string_list_free(Eina_List **list)
static Eina_Bool
_key_string_list_set(struct wkb_config_key *key, Eldbus_Message_Iter *iter)
{
+ const char *str;
+ Eina_List *list = NULL;
+ Eina_List **field;
+
+ while (eldbus_message_iter_get_and_next(iter, 's', &str))
+ list = eina_list_append(list,eina_stringshare_add(str));
+
+ if ((field = (Eina_List **) key->field) && *field)
+ _key_string_list_free(field);
+
+ *field = list;
+
return EINA_TRUE;
}
@@ -155,7 +167,6 @@ _key_string_list_get(struct wkb_config_key *key)
/*
* PUBLIC FUNCTIONS
*/
-
struct wkb_config_key *
wkb_config_key_int(const char *id, void *field)
{