/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to diff.py

  • Committer: John Arbash Meinel
  • Date: 2007-10-01 18:26:38 UTC
  • mto: (322.1.1 trunk) (330.3.3 trunk)
  • mto: This revision was merged to the branch mainline in revision 368.
  • Revision ID: john@arbash-meinel.com-20071001182638-k6us5j33j06n3ppy
Delay computing the delta, and clean up some of the diff view names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
from bzrlib.trace import warning
38
38
 
39
39
 
40
 
class DiffDisplay(gtk.ScrolledWindow):
 
40
class DiffView(gtk.ScrolledWindow):
41
41
    """This is the soft and chewy filling for a DiffWindow."""
42
42
 
43
43
    def __init__(self):
152
152
                except IOError, e:
153
153
                    warning('could not open file %s: %s' % (f, str(e)))
154
154
                else:
155
 
                    colors.update(DiffDisplay.parse_colordiffrc(f))
 
155
                    colors.update(DiffView.parse_colordiffrc(f))
156
156
                    f.close()
157
157
 
158
158
        if not colors:
271
271
 
272
272
        # The diffs of the  selected file: a scrollable source or
273
273
        # text view
274
 
        self.diff_win = DiffDisplay()
275
 
        pane.pack2(self.diff_win)
276
 
        self.diff_win.show()
 
274
        self.diff_view = DiffView()
 
275
        pane.pack2(self.diff_view)
 
276
        self.diff_view.show()
277
277
 
278
278
    def set_diff(self, description, rev_tree, parent_tree):
279
279
        """Set the differences showed by this window.
281
281
        Compares the two trees and populates the window with the
282
282
        differences.
283
283
        """
284
 
        self.diff_win.set_trees(rev_tree, parent_tree)
 
284
        self.diff_view.set_trees(rev_tree, parent_tree)
285
285
        self.rev_tree = rev_tree
286
286
        self.parent_tree = parent_tree
287
287
 
335
335
        elif specific_files == [ "" ]:
336
336
            specific_files = None
337
337
 
338
 
        self.diff_win.show_diff(specific_files)
 
338
        self.diff_view.show_diff(specific_files)