[Pkg-bazaar-commits] ./bzr-gtk/unstable r11: Add a default "Complete Diff" option to the top of the diff window
Scott James Remnant
scott at netsplit.com
Fri Apr 10 07:15:15 UTC 2009
------------------------------------------------------------
revno: 11
committer: Scott James Remnant <scott at netsplit.com>
timestamp: Mon 2005-10-17 09:07:18 +0100
message:
Add a default "Complete Diff" option to the top of the diff window
modified:
diffwin.py
-------------- next part --------------
=== modified file 'diffwin.py'
--- a/diffwin.py 2005-10-17 07:55:01 +0000
+++ b/diffwin.py 2005-10-17 08:07:18 +0000
@@ -99,7 +99,6 @@
sourceview = gtk.TextView(self.buffer)
sourceview.set_editable(False)
- sourceview.set_wrap_mode(gtk.WRAP_CHAR)
sourceview.modify_font(pango.FontDescription("Monospace"))
scrollwin.add(sourceview)
sourceview.show()
@@ -116,6 +115,8 @@
self.model.clear()
delta = compare_trees(self.parent_tree, self.rev_tree)
+ self.model.append(None, [ "Complete Diff", "" ])
+
if len(delta.added):
titer = self.model.append(None, [ "Added", None ])
for path, id, kind in delta.added:
@@ -143,10 +144,12 @@
def _treeview_cursor_cb(self, *args):
"""Callback for when the treeview cursor changes."""
(path, col) = self.treeview.get_cursor()
- path = self.model[path][1]
- if path is None:
+ specific_files = [ self.model[path][1] ]
+ if specific_files == [ None ]:
return
+ elif specific_files == [ "" ]:
+ specific_files = []
s = StringIO()
- show_diff_trees(self.parent_tree, self.rev_tree, s, [ path ])
+ show_diff_trees(self.parent_tree, self.rev_tree, s, specific_files)
self.buffer.set_text(s.getvalue())
More information about the Pkg-bazaar-commits
mailing list