Commits

Steve Borho committed 40e99f0

revdetails: move fileview movement actions into the fileview itself

Comments (0)

Files changed (2)

tortoisehg/hgqt/fileview.py

         tb.addAction(self.actionNextDiff)
         tb.addAction(self.actionPrevDiff)
 
+        self.actionNextLine = QAction('Next line', self)
+        self.actionNextLine.setShortcut(Qt.SHIFT + Qt.Key_Down)
+        self.actionNextLine.triggered.connect(self.nextLine)
+        self.addAction(self.actionNextLine)
+        self.actionPrevLine = QAction('Prev line', self)
+        self.actionPrevLine.setShortcut(Qt.SHIFT + Qt.Key_Up)
+        self.actionPrevLine.triggered.connect(self.prevLine)
+        self.addAction(self.actionPrevLine)
+        self.actionNextCol = QAction('Next column', self)
+        self.actionNextCol.setShortcut(Qt.SHIFT + Qt.Key_Right)
+        self.actionNextCol.triggered.connect(self.nextCol)
+        self.addAction(self.actionNextCol)
+        self.actionPrevCol = QAction('Prev column', self)
+        self.actionPrevCol.setShortcut(Qt.SHIFT + Qt.Key_Left)
+        self.actionPrevCol.triggered.connect(self.prevCol)
+        self.addAction(self.actionPrevCol)
+
         self.timer = QTimer()
         self.timer.setSingleShot(False)
         self.timer.timeout.connect(self.idle_fill_files)

tortoisehg/hgqt/revdetails.py

         self.filelist.clearDisplay.connect(self.fileview.clearDisplay)
 
     def createActions(self):
-        # navigate in file viewer
-        self.actionNextLine = QAction('Next line', self)
-        self.actionNextLine.setShortcut(Qt.SHIFT + Qt.Key_Down)
-        self.actionNextLine.triggered.connect(self.fileview.nextLine)
-        self.addAction(self.actionNextLine)
-        self.actionPrevLine = QAction('Prev line', self)
-        self.actionPrevLine.setShortcut(Qt.SHIFT + Qt.Key_Up)
-        self.actionPrevLine.triggered.connect(self.fileview.prevLine)
-        self.addAction(self.actionPrevLine)
-        self.actionNextCol = QAction('Next column', self)
-        self.actionNextCol.setShortcut(Qt.SHIFT + Qt.Key_Right)
-        self.actionNextCol.triggered.connect(self.fileview.nextCol)
-        self.addAction(self.actionNextCol)
-        self.actionPrevCol = QAction('Prev column', self)
-        self.actionPrevCol.setShortcut(Qt.SHIFT + Qt.Key_Left)
-        self.actionPrevCol.triggered.connect(self.fileview.prevCol)
-        self.addAction(self.actionPrevCol)
-
         # Activate file (file diff navigator)
         self.actionActivateFile = QAction('Activate file', self)
         self.actionActivateFileAlt = QAction('Activate alt. file', self)