/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: Jelmer Vernooij
  • Date: 2008-07-18 12:29:56 UTC
  • mfrom: (531.7.14 vis-enhancements)
  • Revision ID: jelmer@samba.org-20080718122956-27468cxu2b613ib8
Merge diff widget in viz.

Show diffs side-by-side

added added

removed removed

Lines of Context:
330
330
        # text view
331
331
 
332
332
    def set_diff_text_sections(self, sections):
333
 
        self.diff_view = DiffFileView()
 
333
        if getattr(self, 'diff_view', None) is None:
 
334
            self.diff_view = DiffFileView()
 
335
            self.pack2(self.diff_view)
334
336
        self.diff_view.show()
335
 
        self.pack2(self.diff_view)
336
337
        for oldname, newname, patch in sections:
337
338
            self.diff_view._diffs[newname] = str(patch)
338
339
            if newname is None:
346
347
        Compares the two trees and populates the window with the
347
348
        differences.
348
349
        """
349
 
        self.diff_view = DiffView()
350
 
        self.pack2(self.diff_view)
 
350
        if getattr(self, 'diff_view', None) is None:
 
351
            self.diff_view = DiffView()
 
352
            self.pack2(self.diff_view)
351
353
        self.diff_view.show()
352
354
        self.diff_view.set_trees(rev_tree, parent_tree)
353
355
        self.rev_tree = rev_tree
380
382
                self.model.append(titer, [ path, path ])
381
383
 
382
384
        self.treeview.expand_all()
 
385
        self.diff_view.show_diff(None)
383
386
 
384
387
    def set_file(self, file_path):
385
388
        """Select the current file to display"""