[POS-commit] Kiwi/Kiwi List.py,1.83,1.84
Christian Robottom Reis
kiko at async.com.br
Wed Oct 15 22:05:21 BRST 2003
Update of /cvs/Kiwi/Kiwi
In directory anthem:/tmp/cvs-serv32414
Modified Files:
List.py
Log Message:
Minor code cleanups and reorganizations in _sort_by_type
Index: List.py
===================================================================
RCS file: /cvs/Kiwi/Kiwi/List.py,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- List.py 15 Oct 2003 04:16:56 -0000 1.83
+++ List.py 15 Oct 2003 22:05:19 -0000 1.84
@@ -1341,7 +1341,7 @@
self.set_sort_column(column)
self.set_sort_type(direction)
- # stop select_row emission using evil select_row_default_cb
+ # stop select_row emission via evil select_row_default_cb
self._stop_select_row = TRUE
self.freeze()
@@ -1351,7 +1351,7 @@
# if all we have are strings we can use the builtin sorting and
# take advantage of it's speed.
- if self._get_column_type(column) == StringType:
+ if self._get_column_type(column) is StringType:
gtk.GtkCList.sort(self)
else:
# For numeric columns, use Kiwi's own simulation of sort()
@@ -1379,14 +1379,14 @@
else:
raise AssertionError
+ self.clear()
+
+ # Restore data and selection for rows
+ #
# Store local variables to avoid lookups
append = self._raw_append
select_row = self._raw_select_row
set_row_data = self._raw_set_row_data
-
- self.clear()
-
- # Restore data and selection for rows
for row in rows:
i = append(self._o, row["text"])
if row["selected"]:
@@ -1397,15 +1397,16 @@
gdkwin.set_cursor(None)
gtk.mainiteration()
- self._shading = shading
- if self._shading:
- self._sync_shade()
- self.thaw()
-
self._stop_select_row = FALSE
self.last_column = column
self.last_direction = direction
self.unsorted = FALSE
+ self._shading = shading
+
+ if shading:
+ self._sync_shade()
+ self.thaw()
+
return TRUE
def _column_clicked(self, clist, column):
More information about the POS-commit
mailing list