diff options
Diffstat (limited to 'src/lua_interface.c')
-rw-r--r-- | src/lua_interface.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lua_interface.c b/src/lua_interface.c index 745ce368..69033bf3 100644 --- a/src/lua_interface.c +++ b/src/lua_interface.c @@ -826,18 +826,19 @@ bool l_cec_get_completions_for(const char *entry_text) { /** * Populates the Command Entry Completion with the contents of a Lua table at * the stack top. + * @param store The GtkListStore to populate. * @see l_cec_get_completions_for */ -void l_cec_populate() { +void l_cec_populate(GtkListStore *store) { GtkTreeIter iter; if (!lua_istable(lua, -1)) return warn("command_entry.get_completions_for return not a table."); - gtk_list_store_clear(cec_store); + gtk_list_store_clear(store); lua_pushnil(lua); while (lua_next(lua, -2)) { if (lua_type(lua, -1) == LUA_TSTRING) { - gtk_list_store_append(cec_store, &iter); - gtk_list_store_set(cec_store, &iter, 0, lua_tostring(lua, -1), -1); + gtk_list_store_append(store, &iter); + gtk_list_store_set(store, &iter, 0, lua_tostring(lua, -1), -1); } else warn("command_entry.get_completions_for: string value expected."); lua_pop(lua, 1); // value } |