56
56
# Set default values
58
58
self.selected = selected
59
print "DEBUG: path =", self.path
60
print "DEBUG: selected =", self.selected
60
62
# Create the file list context menu
61
63
self.ui = gtk.UIManager()
204
206
def commit(self, action):
205
207
""" Right context menu -> Commit """
206
from commit import CommitDialog
208
from commit import OliveCommit
207
209
wt, path = WorkingTree.open_containing(self.path)
208
commit = CommitDialog(wt, path)
210
commit = OliveCommit(wt, path)
211
213
def diff(self, action):
212
214
""" Right context menu -> Diff """
213
from bzrlib.plugins.gtk.viz.diffwin import DiffWindow
216
wt = WorkingTree.open_containing(self.path)[0]
217
except errors.NotBranchError:
218
error_dialog(_('File is not in a branch'),
219
_('The selected file is not in a branch.'))
222
window = DiffWindow()
223
parent_tree = wt.branch.repository.revision_tree(wt.branch.last_revision())
224
window.set_diff(wt.branch.nick, wt, parent_tree)
215
from diff import OliveDiff
216
diff = OliveDiff(self.comm)
227
219
def bookmark(self, action):
228
220
""" Right context menu -> Bookmark """
229
if self.pref.add_bookmark(self.path):
221
if self.pref.add_bookmark(self.comm.get_path()):
230
222
info_dialog(_('Bookmark successfully added'),
231
223
_('The current directory was bookmarked. You can reach\nit by selecting it from the left panel.'))
234
225
warning_dialog(_('Location already bookmarked'),
235
226
_('The current directory is already bookmarked.\nSee the left panel for reference.'))