/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: Gary van der Merwe
  • Date: 2007-08-12 16:12:33 UTC
  • mto: (256.2.37 gtk)
  • mto: This revision was merged to the branch mainline in revision 262.
  • Revision ID: garyvdm@gmail.com-20070812161233-yhv1vafcxtsvpugj
Fix for bug Bug #132017 : olive no longer able to find bzrlib location.

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