3275: PageView reworking, changes by B. Malengier and N.Hall

Specifically: improve new treeview by using a linked list implementation so 
 iters can be quickly iterated over
Also: progressdialog on long personview loads.


svn: r14002
This commit is contained in:
Benny Malengier
2010-01-09 11:10:32 +00:00
parent afe85ad0d5
commit de2d669763
9 changed files with 412 additions and 178 deletions

View File

@ -3,6 +3,7 @@
#
# Copyright (C) 2001-2007 Donald N. Allingham
# Copyright (C) 2009 Nick Hall
# Copyright (C) 2009 Benny Malengier
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -532,6 +533,8 @@ class ListView(NavigationView):
obj A TreeViewColumn object of the column clicked
data The column index
"""
self.uistate.set_busy_cursor(1)
self.uistate.push_message(self.dbstate, _("Column clicked, sorting..."))
cput = time.clock()
same_col = False
if self.sort_col != data:
@ -558,6 +561,7 @@ class ListView(NavigationView):
filter_info = (False, value, False)
if same_col:
self.list.set_model(None)
self.model.reverse_order()
else:
self.model = self.make_model(self.dbstate.db, self.sort_col,
@ -575,6 +579,8 @@ class ListView(NavigationView):
search_col = self.column_order()[data][1]
self.list.set_search_column(search_col)
self.uistate.set_busy_cursor(0)
_LOG.debug(' ' + self.__class__.__name__ + ' column_clicked ' +
str(time.clock() - cput) + ' sec')