[POS-commit] CVS: Kiwi/Kiwi Delegates.py,1.89,1.90

Christian Reis kiko at async.com.br
Wed Feb 5 17:06:06 BRDT 2003


Update of /cvs/Kiwi/Kiwi
In directory anthem:/tmp/cvs-serv10204/Kiwi

Modified Files:
	Delegates.py 
Log Message:
Finish off last fix with API cleanup for select_and_focus_row, and
update test to actually use this feature. 


Index: Delegates.py
===================================================================
RCS file: /cvs/Kiwi/Kiwi/Delegates.py,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- Delegates.py	5 Feb 2003 17:56:17 -0000	1.89
+++ Delegates.py	5 Feb 2003 18:06:04 -0000	1.90
@@ -299,7 +299,7 @@
                 # have disappeared with the clear/_load
                 row = clist.find_row_from_data(instance)
                 if row >= 0:
-                    self._select_and_focus_row(row, clist['selection_mode'])
+                    self._select_and_focus_row(row)
         clist.thaw()
 
     def clear_list(self):
@@ -567,10 +567,11 @@
                 self.clist.set_column_justification(i, justify)
                 column.justify = justify
 
-    def _select_and_focus_row(self, row, old_mode):
+    def _select_and_focus_row(self, row):
         clist = self.clist
+        mode = clist['selection_mode'] 
         clist.select_row(row, -1)
-        if old_mode in (gtk.SELECTION_BROWSE, gtk.SELECTION_EXTENDED):
+        if mode in (gtk.SELECTION_BROWSE, gtk.SELECTION_EXTENDED):
             if hasattr(clist, "set_focus_row"):
                 clist.set_focus_row(row)
             else:



More information about the POS-commit mailing list