/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 __init__.py

  • Committer: Aaron Bentley
  • Date: 2008-05-22 02:33:40 UTC
  • mfrom: (487.2.8 save-patch)
  • Revision ID: aaron@aaronbentley.com-20080522023340-3x585s8593j6a409
Allow saving from patch window, refactoring, testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
705
705
 
706
706
    def run(self, path):
707
707
        try:
708
 
            from bzrlib.plugins.gtk.diff import (DiffWindow,
709
 
                                                 MergeDirectiveWindow)
 
708
            from bzrlib.plugins.gtk.diff import (DiffController,
 
709
                                                 MergeDirectiveController)
710
710
            if path == '-':
711
711
                lines = sys.stdin.readlines()
712
712
            else:
715
715
            try:
716
716
                directive = merge_directive.MergeDirective.from_lines(lines)
717
717
            except errors.NotAMergeDirective:
718
 
                window = DiffWindow()
719
 
                window.set_diff_text(path, lines)
 
718
                controller = DiffController(path, lines)
720
719
            else:
721
 
                window = MergeDirectiveWindow(directive, path)
722
 
                window.set_diff_text(path, directive.patch.splitlines(True))
 
720
                controller = MergeDirectiveController(path, directive)
 
721
            window = controller.window
723
722
            window.show()
724
723
            gtk = self.open_display()
725
724
            window.connect("destroy", gtk.main_quit)