[Pkg-bazaar-commits] ./bzr-gtk/unstable r46: show diff on row activation, LP# 44591

Wouter van Heyst larstiq at larstiq.dyndns.org
Fri Apr 10 07:16:00 UTC 2009


------------------------------------------------------------
revno: 46
committer: Wouter van Heyst <larstiq at larstiq.dyndns.org>
branch nick: bzrk
timestamp: Sun 2006-05-14 20:38:24 +0200
message:
  show diff on row activation, LP# 44591
modified:
  branchwin.py
-------------- next part --------------
=== modified file 'branchwin.py'
--- a/branchwin.py	2006-05-08 20:04:21 +0000
+++ b/branchwin.py	2006-05-14 18:38:24 +0000
@@ -77,6 +77,7 @@
         self.treeview.set_rules_hint(True)
         self.treeview.set_search_column(4)
         self.treeview.connect("cursor-changed", self._treeview_cursor_cb)
+        self.treeview.connect("row-activated", self._treeview_clicked_cb)
         scrollwin.add(self.treeview)
         self.treeview.show()
 
@@ -416,3 +417,12 @@
         if self.app is not None:
             self.app.show_diff(self.branch, revid, parentid)
         self.treeview.grab_focus()
+
+    def _treeview_clicked_cb(self, widget, path, col):
+        # TODO: more than one parent
+        """Callback for when the treeview is double-clicked"""
+        revision = self.model[path][0]
+        parent_id = self.parent_ids[revision][0]
+        if self.app is not None:
+            self.app.show_diff(self.branch, revision.revision_id, parent_id)
+        self.treeview.grab_focus()



More information about the Pkg-bazaar-commits mailing list