X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=radiant%2Ftextureentry.cpp;h=04512f6f6887374ec735eaa4bc92a013c7f811b7;hb=1c5f9677125c9f218810c148b2e41911ebc7a9e7;hp=96a46dcda1d31a1b11d70a794c9c9a6c9e0dc2a6;hpb=1227d1b7ffbce0b50bf2efbfcb2dedd5a60a5761;p=xonotic%2Fnetradiant.git diff --git a/radiant/textureentry.cpp b/radiant/textureentry.cpp index 96a46dcd..04512f6f 100644 --- a/radiant/textureentry.cpp +++ b/radiant/textureentry.cpp @@ -27,25 +27,23 @@ template void EntryCompletion::connect(ui::Entry entry) { if (!m_store) { - m_store = ui::ListStore(gtk_list_store_new(1, G_TYPE_STRING)); + m_store = ui::ListStore::from(gtk_list_store_new(1, G_TYPE_STRING)); fill(); StringList().connect(IdleDraw::QueueDrawCaller(m_idleUpdate)); } - auto completion = ui::EntryCompletion(gtk_entry_completion_new()); + auto completion = ui::EntryCompletion::from(gtk_entry_completion_new()); gtk_entry_set_completion(entry, completion); - gtk_entry_completion_set_model(completion, GTK_TREE_MODEL(m_store)); + gtk_entry_completion_set_model(completion, m_store); gtk_entry_completion_set_text_column(completion, 0); } template void EntryCompletion::append(const char *string) { - GtkTreeIter iter; - gtk_list_store_append(m_store, &iter); - gtk_list_store_set(m_store, &iter, 0, string, -1); + m_store.append(0, string); } template @@ -57,7 +55,7 @@ void EntryCompletion::fill() template void EntryCompletion::clear() { - gtk_list_store_clear(m_store); + m_store.clear(); } template