summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Lima (Etrunko) <eduardo.lima@intel.com>2014-10-28 17:34:15 -0200
committerEduardo Lima (Etrunko) <eduardo.lima@intel.com>2014-10-28 17:34:15 -0200
commit32d6adb8490af9ad53dd458916c44d3819b3933b (patch)
treea931d57d06aa16c58cc1099297ceff79553b51c0
parent7cbae318da20cb97eb079e901ff494ceddfb5f6e (diff)
downloadweekeyboard-32d6adb8490af9ad53dd458916c44d3819b3933b.tar.gz
weekeyboard-32d6adb8490af9ad53dd458916c44d3819b3933b.tar.bz2
weekeyboard-32d6adb8490af9ad53dd458916c44d3819b3933b.zip
Fix set_value for string_list keys
Change-Id: I4b0478cb1adc9d6f17a0378fa9230c0db7e67def Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
-rw-r--r--src/wkb-ibus-config-eet.c2
-rw-r--r--src/wkb-ibus-config-key.c11
2 files changed, 10 insertions, 3 deletions
diff --git a/src/wkb-ibus-config-eet.c b/src/wkb-ibus-config-eet.c
index dbcee54..b18d74b 100644
--- a/src/wkb-ibus-config-eet.c
+++ b/src/wkb-ibus-config-eet.c
@@ -925,7 +925,7 @@ _config_eet_value_changed(struct wkb_ibus_config_eet *config_eet, struct wkb_con
array = eldbus_message_iter_container_new(value, 'a', "s");
for (s = slist; *s != NULL; ++s)
- eldbus_message_iter_arguments_append(array, "s", s);
+ eldbus_message_iter_arguments_append(array, "s", *s);
eldbus_message_iter_container_close(value, array);
diff --git a/src/wkb-ibus-config-key.c b/src/wkb-ibus-config-key.c
index 78a2db2..f29db1e 100644
--- a/src/wkb-ibus-config-key.c
+++ b/src/wkb-ibus-config-key.c
@@ -159,9 +159,16 @@ _key_string_list_set(struct wkb_config_key *key, Eldbus_Message_Iter *iter)
const char *str;
Eina_List *list = NULL;
Eina_List **field;
+ Eldbus_Message_Iter *array = NULL;
- while (iter && eldbus_message_iter_get_and_next(iter, 's', &str))
- list = eina_list_append(list,eina_stringshare_add(str));
+ if (!eldbus_message_iter_arguments_get(iter, "as", &array))
+ {
+ ERR("Expecting 'as' got '%s'", eldbus_message_iter_signature_get(iter));
+ return EINA_FALSE;
+ }
+
+ while (eldbus_message_iter_get_and_next(array, 's', &str))
+ list = eina_list_append(list, eina_stringshare_add(str));
if ((field = (Eina_List **) key->field))
_key_string_list_free(field);