Hi,
I'm a new subscriber, and I'm working on a GUI for TMSU (https://bitbucket.org/oniony/tmsu/), a CLI-based file tagging system.
It takes 2-5 seconds each time I type anything, for the display to catch up and the completion to update.
completion.get_model().set_sort_func(NAME_COLUMN, compare_name_and_desc, 'foo') completion.get_model().set_sort_func(DESC_COLUMN, compare_name_and_desc, 'foo') completion.get_model().set_sort_column_id(NAME_COLUMN, gtk.SortType.DESCENDING)
Then I connect the entry's 'change' signal to this function, which simply resets the sort function to use the new key.
def resort(entry): m = entry.get_completion().get_model() t = entry.get_text()
# The delay is probably caused by this line:
m.set_sort_func(NAME_COLUMN, compare_name_and_desc, t ) print('sort reset to %r' % t)
full code is at 'https://bpaste.net/show/aa03e47d9bdd'. It requires Levenshtein module.
Is there any faster way to do this?
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx https://mail.gnome.org/mailman/listinfo/gtk-list