Changeset e16f4f525d84…
Parent 757c9d0c17fc…
by
Changes to one file · Browse files at e16f4f525d84 Showing diff from parent 757c9d0c17fc Diff from another changeset...
@@ -702,14 +702,14 @@
def viewMenuRequest(self, point, selection):
'User requested a context menu in repo view widget'
- if len(selection) == 0:
- return
# selection is a list of the currently selected revisions.
# Integers for changelog revisions, None for the working copy,
# or strings for unapplied patches.
- if self.bundle:
+ if len(selection) == 0:
+ return
+ elif self.bundle:
# Special menu for applied bundle
menu = QMenu(self) # TODO: save in repowidget
act = QAction(_('Pull to here'), self)
@@ -717,7 +717,15 @@ menu.addAction(act)
menu.exec_(point)
return
-
+ elif len(selection) == 1:
+ self.singleSelectionMenu(point, selection)
+ elif len(selection) == 2:
+ self.doubleSelectionMenu(point, selection)
+ else:
+ self.multipleSelectionMenu(point, selection)
+
+ def singleSelectionMenu(self, point, selection):
+
if not self.contextmenu:
menu = QMenu(self)
allactions = [[None, ['update', 'manifest', 'merge', 'tag',
@@ -767,6 +775,12 @@
self.contextmenu.exec_(point)
+ def doubleSelectionMenu(self, point, selection):
+ pass
+
+ def multipleSelectionMenu(self, point, selection):
+ pass
+
def updateToRevision(self):
dlg = update.UpdateDialog(self.repo, self.rev, self)
dlg.output.connect(self.output)
|
Loading...