/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: Jelmer Vernooij
  • Date: 2007-03-06 13:48:35 UTC
  • mfrom: (157.1.9 trunk)
  • Revision ID: jelmer@samba.org-20070306134835-4e3gg9sq0ovvzwad
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
from bzrlib.branch import Branch
35
35
import bzrlib.errors as bzrerrors
 
36
from bzrlib.lazy_import import lazy_import
36
37
from bzrlib.workingtree import WorkingTree
37
38
 
38
39
from bzrlib.plugins.gtk.dialog import error_dialog, info_dialog, warning_dialog
40
41
from guifiles import GLADEFILENAME
41
42
 
42
43
from bzrlib.plugins.gtk.diff import DiffWindow
43
 
from bzrlib.plugins.gtk.viz.branchwin import BranchWindow
 
44
lazy_import(globals(), """
 
45
from bzrlib.plugins.gtk.viz import branchwin
 
46
""")
44
47
from bzrlib.plugins.gtk.annotate.gannotate import GAnnotateWindow
45
48
from bzrlib.plugins.gtk.annotate.config import GAnnotateConfig
46
49
from bzrlib.plugins.gtk.commit import CommitDialog
 
50
from bzrlib.plugins.gtk.conflicts import ConflictsDialog
47
51
from bzrlib.plugins.gtk.push import PushDialog
48
52
 
49
53
class OliveGtk:
86
90
        self.menuitem_branch_commit = self.toplevel.get_widget('menuitem_branch_commit')
87
91
        self.menuitem_branch_status = self.toplevel.get_widget('menuitem_branch_status')
88
92
        self.menuitem_branch_missing = self.toplevel.get_widget('menuitem_branch_missing_revisions')
 
93
        self.menuitem_branch_conflicts = self.toplevel.get_widget('menuitem_branch_conflicts')
89
94
        self.menuitem_stats = self.toplevel.get_widget('menuitem_stats')
90
95
        self.menuitem_stats_diff = self.toplevel.get_widget('menuitem_stats_diff')
91
96
        self.menuitem_stats_log = self.toplevel.get_widget('menuitem_stats_log')
126
131
                "on_menuitem_branch_pull_activate": self.on_menuitem_branch_pull_activate,
127
132
                "on_menuitem_branch_status_activate": self.on_menuitem_branch_status_activate,
128
133
                "on_menuitem_branch_missing_revisions_activate": self.on_menuitem_branch_missing_revisions_activate,
 
134
                "on_menuitem_branch_conflicts_activate": self.on_menuitem_branch_conflicts_activate,
129
135
                "on_menuitem_stats_diff_activate": self.on_menuitem_stats_diff_activate,
130
136
                "on_menuitem_stats_log_activate": self.on_menuitem_stats_log_activate,
131
137
                "on_menuitem_stats_infos_activate": self.on_menuitem_stats_infos_activate,
244
250
            
245
251
            commit.destroy()
246
252
    
 
253
    def on_menuitem_branch_conflicts_activate(self, widget):
 
254
        """ Branch/Conflicts... menu handler. """
 
255
        conflicts = ConflictsDialog(self.wt, self.window)
 
256
        response = conflicts.run()
 
257
        if response != gtk.RESPONSE_NONE:
 
258
            conflicts.destroy()
 
259
    
247
260
    def on_menuitem_branch_merge_activate(self, widget):
248
261
        """ Branch/Merge... menu handler. """
249
262
        from bzrlib.plugins.gtk.merge import MergeDialog
425
438
    
426
439
    def on_menuitem_stats_log_activate(self, widget):
427
440
        """ Statistics/Log... menu handler. """
428
 
        window = BranchWindow()
 
441
        window = branchwin.BranchWindow()
429
442
        window.set_branch(self.wt.branch, self.wt.branch.last_revision(), None)
430
443
        window.show()
431
444
    
725
738
        self.menuitem_branch_commit.set_sensitive(not self.notbranch)
726
739
        self.menuitem_branch_status.set_sensitive(not self.notbranch)
727
740
        self.menuitem_branch_missing.set_sensitive(not self.notbranch)
 
741
        self.menuitem_branch_conflicts.set_sensitive(not self.notbranch)
728
742
        self.menuitem_stats.set_sensitive(not self.notbranch)
729
743
        self.menuitem_add_files.set_sensitive(not self.notbranch)
730
744
        self.menuitem_remove_files.set_sensitive(not self.notbranch)