[Pkg-bazaar-commits] ./bzr-gtk/unstable r69: Merge Szilveszter's toggle enable patch.

Jelmer Vernooij jelmer at samba.org
Fri Apr 10 07:16:21 UTC 2009


------------------------------------------------------------
revno: 69
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: bzr-gtk
timestamp: Sat 2006-07-29 13:53:01 +0200
message:
  Merge Szilveszter's toggle enable patch.
modified:
  commit.py
    ------------------------------------------------------------
    revno: 66.1.1
    committer: Szilveszter Farkas (Phanatic) <Szilveszter.Farkas at gmail.com>
    timestamp: Mon 2006-07-24 17:02:00 +0200
    message:
      (phanatic) Toggling enabled in commit file selector
    modified:
      commit.py
-------------- next part --------------
=== modified file 'commit.py'
--- a/commit.py	2006-06-16 15:14:29 +0000
+++ b/commit.py	2006-07-24 15:02:00 +0000
@@ -38,8 +38,11 @@
     def _create_file_view(self):
         self.file_store = gtk.ListStore(gobject.TYPE_BOOLEAN, gobject.TYPE_STRING, gobject.TYPE_STRING)
         self.file_view = gtk.TreeView(self.file_store)
+        crt = gtk.CellRendererToggle()
+        crt.set_property("activatable", True)
+        crt.connect("toggled", self._toggle_commit, self.file_store)
         self.file_view.append_column(gtk.TreeViewColumn("Commit", 
-                                     gtk.CellRendererToggle(), active=0))
+                                     crt, active=0))
         self.file_view.append_column(gtk.TreeViewColumn("Path", 
                                      gtk.CellRendererText(), text=1))
         self.file_view.append_column(gtk.TreeViewColumn("Type", 
@@ -59,6 +62,10 @@
 
         self.file_view.show()
 
+    def _toggle_commit(self, cell, path, model):
+        model[path][0] = not model[path][0]
+        return
+    
     def _get_specific_files(self):
         ret = []
         it = self.file_store.get_iter_first()



More information about the Pkg-bazaar-commits mailing list