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

  • Committer: Alexander Belchenko
  • Date: 2006-10-14 11:44:16 UTC
  • mto: (91.1.8 trunk) (66.2.10 trunk)
  • mto: This revision was merged to the branch mainline in revision 103.
  • Revision ID: bialix@ukr.net-20061014114416-ca05e2a28b8d12f5
olive is able to successfully work without installation

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
 
57
57
from dialog import error_dialog, info_dialog
58
58
 
 
59
# import this classes only once
 
60
try:
 
61
    from bzrlib.plugins.gtk.viz.diffwin import DiffWindow
 
62
    from bzrlib.plugins.gtk.viz.branchwin import BranchWindow
 
63
except ImportError:
 
64
    # olive+bzr-gtk not installed. try to import from sources
 
65
    path = os.path.dirname(os.path.dirname(__file__))
 
66
    if path not in sys.path:
 
67
        sys.path.append(path)
 
68
    from viz.diffwin import DiffWindow
 
69
    from viz.branchwin import BranchWindow
 
70
 
 
71
 
59
72
class OliveGtk:
60
73
    """ The main Olive GTK frontend class. This is called when launching the
61
74
    program. """
351
364
    
352
365
    def on_menuitem_stats_diff_activate(self, widget):
353
366
        """ Statistics/Differences... menu handler. """
354
 
        from bzrlib.plugins.gtk.viz.diffwin import DiffWindow
355
367
        window = DiffWindow()
356
368
        parent_tree = self.wt.branch.repository.revision_tree(self.wt.branch.last_revision())
357
369
        window.set_diff(self.wt.branch.nick, self.wt, parent_tree)
365
377
    
366
378
    def on_menuitem_stats_log_activate(self, widget):
367
379
        """ Statistics/Log... menu handler. """
368
 
        from bzrlib.plugins.gtk.viz.branchwin import BranchWindow
369
380
        window = BranchWindow()
370
381
        window.set_branch(self.wt.branch, self.wt.branch.last_revision(), None)
371
382
        window.show()