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

  • Committer: Adrian Wilkins
  • Date: 2008-04-24 15:26:14 UTC
  • mto: This revision was merged to the branch mainline in revision 470.
  • Revision ID: adrian.wilkins@gmail.com-20080424152614-2rnnljbro6vzqvf7
Detect the reserved null: revision in appropriate places. 

This removes a huge shower of stack traces that get dumped to console when 
you look at the bottom of a log.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
    pass
27
27
 
28
28
import gtk
29
 
from dialog import question_dialog
30
29
 
31
30
import bzrlib.errors as errors
32
31
from bzrlib.workingtree import WorkingTree
33
32
 
34
 
from bzrlib.plugins.gtk.dialog import error_dialog, info_dialog, warning_dialog
 
33
from bzrlib.plugins.gtk.dialog import error_dialog, info_dialog, question_dialog, warning_dialog
35
34
from bzrlib.plugins.gtk.errors import show_bzr_error
36
35
from bzrlib.plugins.gtk.annotate.gannotate import GAnnotateWindow
37
36
from bzrlib.plugins.gtk.annotate.config import GAnnotateConfig
197
196
        branch = wt.branch
198
197
        file_id = wt.path2id(wt.relpath(os.path.join(directory, filename)))
199
198
        
200
 
        window = GAnnotateWindow(all=False, plain=False)
 
199
        window = GAnnotateWindow(all=False, plain=False, parent=self.app)
201
200
        window.set_title(os.path.join(directory, filename) + " - Annotate")
202
201
        config = GAnnotateConfig(window)
203
202
        window.show()
289
288
        except NotBranchError, e:
290
289
            path = e.path
291
290
        
292
 
        commit = CommitDialog(wt, path, not branch, self.selected)
 
291
        if self.selected:
 
292
            selected = os.path.join(path, self.selected)
 
293
        else:
 
294
            selected = None
 
295
        commit = CommitDialog(wt=wt, selected=selected, parent=None)
293
296
        response = commit.run()
294
297
        if response != gtk.RESPONSE_NONE:
295
298
            commit.hide()
303
306
    def diff(self, action):
304
307
        """ Right context menu -> Diff """
305
308
        wt = WorkingTree.open_containing(self.path)[0]
306
 
        window = DiffWindow()
 
309
        window = DiffWindow(self.app)
307
310
        parent_tree = wt.branch.repository.revision_tree(wt.branch.last_revision())
308
311
        window.set_diff(wt.branch.nick, wt, parent_tree)
309
312
        window.set_file(wt.relpath(self.path + os.sep + self.selected))