Refactoring of WListbox widget.
commit7df67031a2c863cc94544dc998b18e73889a8b03
authorAndrew Borodin <aborodin@vmail.ru>
Mon, 2 Dec 2013 06:27:32 +0000 (2 10:27 +0400)
committerAndrew Borodin <aborodin@vmail.ru>
Tue, 14 Jan 2014 10:13:38 +0000 (14 14:13 +0400)
tree6bca8d62cbfa070be7395c8052594f63a640f876
parent8aa3c77ecfc0125653329efadb3229312d6d84ba
Refactoring of WListbox widget.

Use GQueue instead of GList to store listbox entries.

g_list_append() function is slow because it uses g_list_last()
internally to traverse from the beginning to the end of a list, so
forming a list of results has O(n*n) complexity instead of O(n).
GQueue contains pointers to head and tail of list and list length.
So in this case we don't need seach end of list every time when we
want append listbox entry to the listbox.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
lib/widget/history.c
lib/widget/input_complete.c
lib/widget/listbox.c
lib/widget/listbox.h
src/filemanager/find.c
src/filemanager/hotlist.c