ViewManager/ViewManager.py

branch
Py2 comp.
changeset 3484
645c12de6b0c
parent 3456
96232974dcdb
parent 3446
5a670e55adbb
child 3547
c2a187c63209
--- a/ViewManager/ViewManager.py	Sun Mar 30 22:00:14 2014 +0200
+++ b/ViewManager/ViewManager.py	Thu Apr 03 23:05:31 2014 +0200
@@ -11,8 +11,8 @@
 
 import os
 
-from PyQt4.QtCore import QSignalMapper, QTimer, QFileInfo, pyqtSignal, \
-    QRegExp, QObject, Qt
+from PyQt4.QtCore import pyqtSignal, QSignalMapper, QTimer, \
+    QFileInfo, QRegExp, QObject, Qt
 from PyQt4.QtGui import QColor, QKeySequence, QLineEdit, QToolBar, \
     QWidgetAction, QDialog, QApplication, QMenu, QPalette, QComboBox, QPixmap
 from PyQt4.Qsci import QsciScintilla
@@ -266,8 +266,52 @@
         self.sbLang = sbLanguage
         self.sbEol = sbEol
         self.sbZoom = sbZoom
-        self.sbZoom.valueChanged.connect(self.__zoom)
+        self.sbZoom.valueChanged.connect(self.__zoomTo)
         self.__setSbFile(zoom=0)
+        
+        self.sbLang.clicked.connect(self.__showLanguagesMenu)
+        self.sbEol.clicked.connect(self.__showEolMenu)
+        self.sbEnc.clicked.connect(self.__showEncodingsMenu)
+    
+    ##################################################################
+    ## Below are menu handling methods for status bar labels
+    ##################################################################
+    
+    def __showLanguagesMenu(self, pos):
+        """
+        Private slot to show the Languages menu of the current editor.
+        
+        @param pos position the menu should be shown at (QPoint)
+        """
+        aw = self.activeWindow()
+        if aw is not None:
+            menu = aw.getMenu("Languages")
+            if menu is not None:
+                menu.exec_(pos)
+    
+    def __showEolMenu(self, pos):
+        """
+        Private slot to show the EOL menu of the current editor.
+        
+        @param pos position the menu should be shown at (QPoint)
+        """
+        aw = self.activeWindow()
+        if aw is not None:
+            menu = aw.getMenu("Eol")
+            if menu is not None:
+                menu.exec_(pos)
+    
+    def __showEncodingsMenu(self, pos):
+        """
+        Private slot to show the Encodings menu of the current editor.
+        
+        @param pos position the menu should be shown at (QPoint)
+        """
+        aw = self.activeWindow()
+        if aw is not None:
+            menu = aw.getMenu("Encodings")
+            if menu is not None:
+                menu.exec_(pos)
     
     ###########################################################################
     ## methods below need to be implemented by a subclass
@@ -533,7 +577,7 @@
             """<b>New</b>"""
             """<p>An empty editor window will be created.</p>"""
         ))
-        self.newAct.triggered[()].connect(self.newEditor)
+        self.newAct.triggered.connect(self.newEditor)
         self.fileActions.append(self.newAct)
         
         self.openAct = E5Action(
@@ -551,7 +595,7 @@
             """<p>You will be asked for the name of a file to be opened"""
             """ in an editor window.</p>"""
         ))
-        self.openAct.triggered[()].connect(self.openFiles)
+        self.openAct.triggered.connect(self.__openFiles)
         self.fileActions.append(self.openAct)
         
         self.closeActGrp = createActionGroup(self)
@@ -570,7 +614,7 @@
             """<b>Close Window</b>"""
             """<p>Close the current window.</p>"""
         ))
-        self.closeAct.triggered[()].connect(self.closeCurrentWindow)
+        self.closeAct.triggered.connect(self.closeCurrentWindow)
         self.fileActions.append(self.closeAct)
         
         self.closeAllAct = E5Action(
@@ -584,7 +628,7 @@
             """<b>Close All Windows</b>"""
             """<p>Close all editor windows.</p>"""
         ))
-        self.closeAllAct.triggered[()].connect(self.closeAllWindows)
+        self.closeAllAct.triggered.connect(self.closeAllWindows)
         self.fileActions.append(self.closeAllAct)
         
         self.closeActGrp.setEnabled(False)
@@ -605,7 +649,7 @@
             """<b>Save File</b>"""
             """<p>Save the contents of current editor window.</p>"""
         ))
-        self.saveAct.triggered[()].connect(self.saveCurrentEditor)
+        self.saveAct.triggered.connect(self.saveCurrentEditor)
         self.fileActions.append(self.saveAct)
         
         self.saveAsAct = E5Action(
@@ -623,7 +667,7 @@
             """<p>Save the contents of current editor window to a new file."""
             """ The file can be entered in a file selection dialog.</p>"""
         ))
-        self.saveAsAct.triggered[()].connect(self.saveAsCurrentEditor)
+        self.saveAsAct.triggered.connect(self.saveAsCurrentEditor)
         self.fileActions.append(self.saveAsAct)
         
         self.saveAllAct = E5Action(
@@ -638,7 +682,7 @@
             """<b>Save All Files</b>"""
             """<p>Save the contents of all editor windows.</p>"""
         ))
-        self.saveAllAct.triggered[()].connect(self.saveAllEditors)
+        self.saveAllAct.triggered.connect(self.saveAllEditors)
         self.fileActions.append(self.saveAllAct)
         
         self.saveActGrp.setEnabled(False)
@@ -657,7 +701,7 @@
             """<b>Print File</b>"""
             """<p>Print the contents of current editor window.</p>"""
         ))
-        self.printAct.triggered[()].connect(self.printCurrentEditor)
+        self.printAct.triggered.connect(self.printCurrentEditor)
         self.printAct.setEnabled(False)
         self.fileActions.append(self.printAct)
         
@@ -673,7 +717,7 @@
             """<b>Print Preview</b>"""
             """<p>Print preview of the current editor window.</p>"""
         ))
-        self.printPreviewAct.triggered[()].connect(
+        self.printPreviewAct.triggered.connect(
             self.printPreviewCurrentEditor)
         self.printPreviewAct.setEnabled(False)
         self.fileActions.append(self.printPreviewAct)
@@ -691,7 +735,7 @@
             """<b>Search File</b>"""
             """<p>Search for a file.</p>"""
         ))
-        self.findFileNameAct.triggered[()].connect(self.__findFileName)
+        self.findFileNameAct.triggered.connect(self.__findFileName)
         self.fileActions.append(self.findFileNameAct)
         
     def initFileMenu(self):
@@ -811,7 +855,7 @@
             """<b>Undo</b>"""
             """<p>Undo the last change done in the current editor.</p>"""
         ))
-        self.undoAct.triggered[()].connect(self.__editUndo)
+        self.undoAct.triggered.connect(self.__editUndo)
         self.editActions.append(self.undoAct)
         
         self.redoAct = E5Action(
@@ -829,7 +873,7 @@
             """<b>Redo</b>"""
             """<p>Redo the last change done in the current editor.</p>"""
         ))
-        self.redoAct.triggered[()].connect(self.__editRedo)
+        self.redoAct.triggered.connect(self.__editRedo)
         self.editActions.append(self.redoAct)
         
         self.revertAct = E5Action(
@@ -849,7 +893,7 @@
             """<p>Undo all changes up to the last saved state"""
             """ of the current editor.</p>"""
         ))
-        self.revertAct.triggered[()].connect(self.__editRevert)
+        self.revertAct.triggered.connect(self.__editRevert)
         self.editActions.append(self.revertAct)
         
         self.copyActGrp = createActionGroup(self.editActGrp)
@@ -871,7 +915,7 @@
             """<p>Cut the selected text of the current editor to the"""
             """ clipboard.</p>"""
         ))
-        self.cutAct.triggered[()].connect(self.__editCut)
+        self.cutAct.triggered.connect(self.__editCut)
         self.editActions.append(self.cutAct)
         
         self.copyAct = E5Action(
@@ -891,7 +935,7 @@
             """<p>Copy the selected text of the current editor to the"""
             """ clipboard.</p>"""
         ))
-        self.copyAct.triggered[()].connect(self.__editCopy)
+        self.copyAct.triggered.connect(self.__editCopy)
         self.editActions.append(self.copyAct)
         
         self.pasteAct = E5Action(
@@ -911,7 +955,7 @@
             """<p>Paste the last cut/copied text from the clipboard to"""
             """ the current editor.</p>"""
         ))
-        self.pasteAct.triggered[()].connect(self.__editPaste)
+        self.pasteAct.triggered.connect(self.__editPaste)
         self.editActions.append(self.pasteAct)
         
         self.deleteAct = E5Action(
@@ -929,7 +973,7 @@
             """<b>Clear</b>"""
             """<p>Delete all text of the current editor.</p>"""
         ))
-        self.deleteAct.triggered[()].connect(self.__editDelete)
+        self.deleteAct.triggered.connect(self.__editDelete)
         self.editActions.append(self.deleteAct)
         
         self.joinAct = E5Action(
@@ -946,7 +990,7 @@
             """<b>Join Lines</b>"""
             """<p>Join the current and the next lines.</p>"""
         ))
-        self.joinAct.triggered[()].connect(self.__editJoin)
+        self.joinAct.triggered.connect(self.__editJoin)
         self.editActions.append(self.joinAct)
         
         self.indentAct = E5Action(
@@ -965,7 +1009,7 @@
             """<p>Indents the current line or the lines of the"""
             """ selection by one level.</p>"""
         ))
-        self.indentAct.triggered[()].connect(self.__editIndent)
+        self.indentAct.triggered.connect(self.__editIndent)
         self.editActions.append(self.indentAct)
         
         self.unindentAct = E5Action(
@@ -984,7 +1028,7 @@
             """<p>Unindents the current line or the lines of the"""
             """ selection by one level.</p>"""
         ))
-        self.unindentAct.triggered[()].connect(self.__editUnindent)
+        self.unindentAct.triggered.connect(self.__editUnindent)
         self.editActions.append(self.unindentAct)
         
         self.smartIndentAct = E5Action(
@@ -1003,7 +1047,7 @@
             """<p>Indents the current line or the lines of the"""
             """ current selection smartly.</p>"""
         ))
-        self.smartIndentAct.triggered[()].connect(self.__editSmartIndent)
+        self.smartIndentAct.triggered.connect(self.__editSmartIndent)
         self.editActions.append(self.smartIndentAct)
         
         self.commentAct = E5Action(
@@ -1022,7 +1066,7 @@
             """<p>Comments the current line or the lines of the"""
             """ current selection.</p>"""
         ))
-        self.commentAct.triggered[()].connect(self.__editComment)
+        self.commentAct.triggered.connect(self.__editComment)
         self.editActions.append(self.commentAct)
         
         self.uncommentAct = E5Action(
@@ -1041,7 +1085,7 @@
             """<p>Uncomments the current line or the lines of the"""
             """ current selection.</p>"""
         ))
-        self.uncommentAct.triggered[()].connect(self.__editUncomment)
+        self.uncommentAct.triggered.connect(self.__editUncomment)
         self.editActions.append(self.uncommentAct)
         
         self.toggleCommentAct = E5Action(
@@ -1063,7 +1107,7 @@
             """ the current line or selection is commented. If it is already"""
             """ commented, this comment block is uncommented. </p>"""
         ))
-        self.toggleCommentAct.triggered[()].connect(self.__editToggleComment)
+        self.toggleCommentAct.triggered.connect(self.__editToggleComment)
         self.editActions.append(self.toggleCommentAct)
         
         self.streamCommentAct = E5Action(
@@ -1080,7 +1124,7 @@
             """<p>Stream comments the current line or the current"""
             """ selection.</p>"""
         ))
-        self.streamCommentAct.triggered[()].connect(self.__editStreamComment)
+        self.streamCommentAct.triggered.connect(self.__editStreamComment)
         self.editActions.append(self.streamCommentAct)
         
         self.boxCommentAct = E5Action(
@@ -1096,7 +1140,7 @@
             """<p>Box comments the current line or the lines of the"""
             """ current selection.</p>"""
         ))
-        self.boxCommentAct.triggered[()].connect(self.__editBoxComment)
+        self.boxCommentAct.triggered.connect(self.__editBoxComment)
         self.editActions.append(self.boxCommentAct)
         
         self.selectBraceAct = E5Action(
@@ -1114,7 +1158,7 @@
             """<p>Select text of the current editor to the matching"""
             """ brace.</p>"""
         ))
-        self.selectBraceAct.triggered[()].connect(self.__editSelectBrace)
+        self.selectBraceAct.triggered.connect(self.__editSelectBrace)
         self.editActions.append(self.selectBraceAct)
         
         self.selectAllAct = E5Action(
@@ -1131,7 +1175,7 @@
             """<b>Select All</b>"""
             """<p>Select all text of the current editor.</p>"""
         ))
-        self.selectAllAct.triggered[()].connect(self.__editSelectAll)
+        self.selectAllAct.triggered.connect(self.__editSelectAll)
         self.editActions.append(self.selectAllAct)
         
         self.deselectAllAct = E5Action(
@@ -1148,7 +1192,7 @@
             """<b>Deselect All</b>"""
             """<p>Deselect all text of the current editor.</p>"""
         ))
-        self.deselectAllAct.triggered[()].connect(self.__editDeselectAll)
+        self.deselectAllAct.triggered.connect(self.__editDeselectAll)
         self.editActions.append(self.deselectAllAct)
         
         self.convertEOLAct = E5Action(
@@ -1166,7 +1210,7 @@
             """<p>Convert the line end characters to the currently set"""
             """ type.</p>"""
         ))
-        self.convertEOLAct.triggered[()].connect(self.__convertEOL)
+        self.convertEOLAct.triggered.connect(self.__convertEOL)
         self.editActions.append(self.convertEOLAct)
         
         self.shortenEmptyAct = E5Action(
@@ -1182,7 +1226,7 @@
             """<p>Shorten lines consisting solely of whitespace"""
             """ characters.</p>"""
         ))
-        self.shortenEmptyAct.triggered[()].connect(self.__shortenEmptyLines)
+        self.shortenEmptyAct.triggered.connect(self.__shortenEmptyLines)
         self.editActions.append(self.shortenEmptyAct)
         
         self.autoCompleteAct = E5Action(
@@ -1200,7 +1244,7 @@
             """<p>Performs an autocompletion of the word containing"""
             """ the cursor.</p>"""
         ))
-        self.autoCompleteAct.triggered[()].connect(self.__editAutoComplete)
+        self.autoCompleteAct.triggered.connect(self.__editAutoComplete)
         self.editActions.append(self.autoCompleteAct)
         
         self.autoCompleteFromDocAct = E5Action(
@@ -1222,7 +1266,7 @@
             """<p>Performs an autocompletion from document of the word"""
             """ containing the cursor.</p>"""
         ))
-        self.autoCompleteFromDocAct.triggered[()].connect(
+        self.autoCompleteFromDocAct.triggered.connect(
             self.__editAutoCompleteFromDoc)
         self.editActions.append(self.autoCompleteFromDocAct)
         
@@ -1243,7 +1287,7 @@
             """<p>Performs an autocompletion from APIs of the word"""
             """ containing the cursor.</p>"""
         ))
-        self.autoCompleteFromAPIsAct.triggered[()].connect(
+        self.autoCompleteFromAPIsAct.triggered.connect(
             self.__editAutoCompleteFromAPIs)
         self.editActions.append(self.autoCompleteFromAPIsAct)
         
@@ -1266,7 +1310,7 @@
             """<p>Performs an autocompletion from document and APIs"""
             """ of the word containing the cursor.</p>"""
         ))
-        self.autoCompleteFromAllAct.triggered[()].connect(
+        self.autoCompleteFromAllAct.triggered.connect(
             self.__editAutoCompleteFromAll)
         self.editActions.append(self.autoCompleteFromAllAct)
         
@@ -1285,7 +1329,7 @@
             """<p>Show calltips based on the characters immediately to the"""
             """ left of the cursor.</p>"""
         ))
-        self.calltipsAct.triggered[()].connect(self.__editShowCallTips)
+        self.calltipsAct.triggered.connect(self.__editShowCallTips)
         self.editActions.append(self.calltipsAct)
         
         self.sortAct = E5Action(
@@ -1304,7 +1348,7 @@
             """<p>Sort the lines spanned by a rectangular selection based on"""
             """ the selection ignoring leading and trailing whitespace.</p>"""
         ))
-        self.sortAct.triggered[()].connect(self.__editSortSelectedLines)
+        self.sortAct.triggered.connect(self.__editSortSelectedLines)
         self.editActions.append(self.sortAct)
         
         self.editActGrp.setEnabled(False)
@@ -1328,7 +1372,7 @@
         if isMacPlatform():
             act.setAlternateShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Meta+B')))
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1340,7 +1384,7 @@
             act.setAlternateShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Meta+F')))
         self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1352,7 +1396,7 @@
             act.setAlternateShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Meta+P')))
         self.esm.setMapping(act, QsciScintilla.SCI_LINEUP)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1364,7 +1408,7 @@
             act.setAlternateShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Meta+N')))
         self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1376,7 +1420,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Alt+Left')))
         self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFT)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1388,7 +1432,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Alt+Right')))
         self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHT)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1403,7 +1447,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Ctrl+Left')))
         self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFT)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1415,7 +1459,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Ctrl+Right')))
         self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1431,7 +1475,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Home')))
         self.esm.setMapping(act, QsciScintilla.SCI_VCHOME)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1448,7 +1492,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Alt+Home')))
         self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1465,7 +1509,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'End')))
         self.esm.setMapping(act, QsciScintilla.SCI_LINEEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1475,7 +1519,7 @@
             0,
             self.editorActGrp, 'vm_edit_scroll_down_line')
         self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLDOWN)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1484,7 +1528,7 @@
             QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Up')), 0,
             self.editorActGrp, 'vm_edit_scroll_up_line')
         self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLUP)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1493,7 +1537,7 @@
             QKeySequence(QApplication.translate('ViewManager', 'Alt+Up')), 0,
             self.editorActGrp, 'vm_edit_move_up_para')
         self.esm.setMapping(act, QsciScintilla.SCI_PARAUP)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1502,7 +1546,7 @@
             QKeySequence(QApplication.translate('ViewManager', 'Alt+Down')), 0,
             self.editorActGrp, 'vm_edit_move_down_para')
         self.esm.setMapping(act, QsciScintilla.SCI_PARADOWN)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1511,7 +1555,7 @@
             QKeySequence(QApplication.translate('ViewManager', 'PgUp')), 0,
             self.editorActGrp, 'vm_edit_move_up_page')
         self.esm.setMapping(act, QsciScintilla.SCI_PAGEUP)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1523,7 +1567,7 @@
             act.setAlternateShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Meta+V')))
         self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1538,7 +1582,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Ctrl+Home')))
         self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTART)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1553,7 +1597,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Ctrl+End')))
         self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1562,7 +1606,7 @@
             QKeySequence(QApplication.translate('ViewManager', 'Tab')), 0,
             self.editorActGrp, 'vm_edit_indent_one_level')
         self.esm.setMapping(act, QsciScintilla.SCI_TAB)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1572,7 +1616,7 @@
             0,
             self.editorActGrp, 'vm_edit_unindent_one_level')
         self.esm.setMapping(act, QsciScintilla.SCI_BACKTAB)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1587,7 +1631,7 @@
             act.setAlternateShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Meta+Shift+B')))
         self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1602,7 +1646,7 @@
             act.setAlternateShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Meta+Shift+F')))
         self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1616,7 +1660,7 @@
             act.setAlternateShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Meta+Shift+P')))
         self.esm.setMapping(act, QsciScintilla.SCI_LINEUPEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1631,7 +1675,7 @@
             act.setAlternateShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Meta+Shift+N')))
         self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1645,7 +1689,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Alt+Shift+Left')))
         self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFTEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1659,7 +1703,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Alt+Shift+Right')))
         self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1676,7 +1720,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Ctrl+Shift+Left')))
         self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1693,7 +1737,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Ctrl+Shift+Right')))
         self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1711,7 +1755,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Shift+Home')))
         self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1728,7 +1772,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Shift+End')))
         self.esm.setMapping(act, QsciScintilla.SCI_LINEENDEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1741,7 +1785,7 @@
             0,
             self.editorActGrp, 'vm_edit_extend_selection_up_para')
         self.esm.setMapping(act, QsciScintilla.SCI_PARAUPEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1754,7 +1798,7 @@
             0,
             self.editorActGrp, 'vm_edit_extend_selection_down_para')
         self.esm.setMapping(act, QsciScintilla.SCI_PARADOWNEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1766,7 +1810,7 @@
             0,
             self.editorActGrp, 'vm_edit_extend_selection_up_page')
         self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1782,7 +1826,7 @@
             act.setAlternateShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Meta+Shift+V')))
         self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1799,7 +1843,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Ctrl+Shift+Home')))
         self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1816,7 +1860,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Ctrl+Shift+End')))
         self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTENDEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1832,7 +1876,7 @@
             act.setAlternateShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Shift+Backspace')))
         self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACK)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1845,7 +1889,7 @@
             0, 0,
             self.editorActGrp, 'vm_edit_delet_previous_char_not_line_start')
         self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACKNOTLINE)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1857,7 +1901,7 @@
             act.setAlternateShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Meta+D')))
         self.esm.setMapping(act, QsciScintilla.SCI_CLEAR)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1868,7 +1912,7 @@
             0,
             self.editorActGrp, 'vm_edit_delete_word_left')
         self.esm.setMapping(act, QsciScintilla.SCI_DELWORDLEFT)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1877,7 +1921,7 @@
             QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Del')), 0,
             self.editorActGrp, 'vm_edit_delete_word_right')
         self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHT)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1888,7 +1932,7 @@
             0,
             self.editorActGrp, 'vm_edit_delete_line_left')
         self.esm.setMapping(act, QsciScintilla.SCI_DELLINELEFT)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1903,7 +1947,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Ctrl+Shift+Del')))
         self.esm.setMapping(act, QsciScintilla.SCI_DELLINERIGHT)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1913,7 +1957,7 @@
             QKeySequence(QApplication.translate('ViewManager', 'Enter')),
             self.editorActGrp, 'vm_edit_insert_line')
         self.esm.setMapping(act, QsciScintilla.SCI_NEWLINE)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1925,7 +1969,7 @@
                 'ViewManager', 'Shift+Return')),
             QKeySequence(QApplication.translate('ViewManager', 'Shift+Enter')),
             self.editorActGrp, 'vm_edit_insert_line_below')
-        act.triggered[()].connect(self.__newLineBelow)
+        act.triggered.connect(self.__newLineBelow)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1936,7 +1980,7 @@
             0,
             self.editorActGrp, 'vm_edit_delete_current_line')
         self.esm.setMapping(act, QsciScintilla.SCI_LINEDELETE)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1945,7 +1989,7 @@
             QKeySequence(QApplication.translate('ViewManager', 'Ctrl+D')), 0,
             self.editorActGrp, 'vm_edit_duplicate_current_line')
         self.esm.setMapping(act, QsciScintilla.SCI_LINEDUPLICATE)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1956,7 +2000,7 @@
             QKeySequence(QApplication.translate('ViewManager', 'Ctrl+T')), 0,
             self.editorActGrp, 'vm_edit_swap_current_previous_line')
         self.esm.setMapping(act, QsciScintilla.SCI_LINETRANSPOSE)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1966,7 +2010,7 @@
             0,
             self.editorActGrp, 'vm_edit_cut_current_line')
         self.esm.setMapping(act, QsciScintilla.SCI_LINECUT)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1977,7 +2021,7 @@
             0,
             self.editorActGrp, 'vm_edit_copy_current_line')
         self.esm.setMapping(act, QsciScintilla.SCI_LINECOPY)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -1986,7 +2030,7 @@
             QKeySequence(QApplication.translate('ViewManager', 'Ins')), 0,
             self.editorActGrp, 'vm_edit_toggle_insert_overtype')
         self.esm.setMapping(act, QsciScintilla.SCI_EDITTOGGLEOVERTYPE)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -2003,7 +2047,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Alt+End')))
         self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAY)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -2017,7 +2061,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Ctrl+Shift+Right')))
         self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAYEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -2026,7 +2070,7 @@
             0, 0,
             self.editorActGrp, 'vm_edit_formfeed')
         self.esm.setMapping(act, QsciScintilla.SCI_FORMFEED)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -2035,7 +2079,7 @@
             QKeySequence(QApplication.translate('ViewManager', 'Esc')), 0,
             self.editorActGrp, 'vm_edit_escape')
         self.esm.setMapping(act, QsciScintilla.SCI_CANCEL)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -2051,7 +2095,7 @@
             act.setAlternateShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Meta+Alt+Shift+N')))
         self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNRECTEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -2066,7 +2110,7 @@
             act.setAlternateShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Meta+Alt+Shift+P')))
         self.esm.setMapping(act, QsciScintilla.SCI_LINEUPRECTEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -2084,7 +2128,7 @@
             act.setAlternateShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Meta+Alt+Shift+B')))
         self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTRECTEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -2102,7 +2146,7 @@
             act.setAlternateShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Meta+Alt+Shift+F')))
         self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -2121,7 +2165,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Alt+Shift+Home')))
         self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -2140,7 +2184,7 @@
             act.setShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Alt+Shift+End')))
         self.esm.setMapping(act, QsciScintilla.SCI_LINEENDRECTEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -2155,7 +2199,7 @@
             0,
             self.editorActGrp, 'vm_edit_extend_rect_selection_up_page')
         self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPRECTEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -2173,7 +2217,7 @@
             act.setAlternateShortcut(QKeySequence(
                 QApplication.translate('ViewManager', 'Meta+Alt+Shift+V')))
         self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNRECTEXTEND)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         act = E5Action(
@@ -2186,7 +2230,7 @@
             0,
             self.editorActGrp, 'vm_edit_duplicate_current_selection')
         self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE)
-        act.triggered[()].connect(self.esm.map)
+        act.triggered.connect(self.esm.map)
         self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"):
@@ -2201,7 +2245,7 @@
                 act.setShortcut(QKeySequence(
                     QApplication.translate('ViewManager', 'Home')))
             self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOSTART)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_SCROLLTOEND"):
@@ -2216,7 +2260,7 @@
                 act.setShortcut(QKeySequence(
                     QApplication.translate('ViewManager', 'End')))
             self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOEND)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_VERTICALCENTRECARET"):
@@ -2231,7 +2275,7 @@
                 act.setShortcut(QKeySequence(
                     QApplication.translate('ViewManager', 'Meta+L')))
             self.esm.setMapping(act, QsciScintilla.SCI_VERTICALCENTRECARET)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_WORDRIGHTEND"):
@@ -2246,7 +2290,7 @@
                 act.setShortcut(QKeySequence(
                     QApplication.translate('ViewManager', 'Alt+Right')))
             self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEND)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_WORDRIGHTENDEXTEND"):
@@ -2261,7 +2305,7 @@
                 act.setShortcut(QKeySequence(
                     QApplication.translate('ViewManager', 'Alt+Shift+Right')))
             self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTENDEXTEND)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_WORDLEFTEND"):
@@ -2273,7 +2317,7 @@
                 0, 0,
                 self.editorActGrp, 'vm_edit_move_end_previous_word')
             self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEND)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_WORDLEFTENDEXTEND"):
@@ -2285,7 +2329,7 @@
                 0, 0,
                 self.editorActGrp, 'vm_edit_select_end_previous_word')
             self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTENDEXTEND)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_HOME"):
@@ -2300,7 +2344,7 @@
                 act.setShortcut(QKeySequence(
                     QApplication.translate('ViewManager', 'Meta+A')))
             self.esm.setMapping(act, QsciScintilla.SCI_HOME)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_HOMEEXTEND"):
@@ -2318,7 +2362,7 @@
                 act.setShortcut(QKeySequence(
                     QApplication.translate('ViewManager', 'Meta+Shift+A')))
             self.esm.setMapping(act, QsciScintilla.SCI_HOME)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_HOMERECTEXTEND"):
@@ -2335,7 +2379,7 @@
                 act.setShortcut(QKeySequence(
                     QApplication.translate('ViewManager', 'Meta+Alt+Shift+A')))
             self.esm.setMapping(act, QsciScintilla.SCI_HOMERECTEXTEND)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_HOMEDISPLAYEXTEND"):
@@ -2353,7 +2397,7 @@
                 act.setShortcut(QKeySequence(
                     QApplication.translate('ViewManager', 'Ctrl+Shift+Left')))
             self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAYEXTEND)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_HOMEWRAP"):
@@ -2367,7 +2411,7 @@
                 0, 0,
                 self.editorActGrp, 'vm_edit_move_start_display_document_line')
             self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAP)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_HOMEWRAPEXTEND"):
@@ -2382,7 +2426,7 @@
                 self.editorActGrp,
                 'vm_edit_extend_selection_start_display_document_line')
             self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAPEXTEND)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_VCHOMEWRAP"):
@@ -2399,7 +2443,7 @@
                 self.editorActGrp,
                 'vm_edit_move_first_visible_char_document_line')
             self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAP)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_VCHOMEWRAPEXTEND"):
@@ -2416,7 +2460,7 @@
                 self.editorActGrp,
                 'vm_edit_extend_selection_first_visible_char_document_line')
             self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAPEXTEND)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_LINEENDWRAP"):
@@ -2430,7 +2474,7 @@
                 0, 0,
                 self.editorActGrp, 'vm_edit_end_start_display_document_line')
             self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAP)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_LINEENDWRAPEXTEND"):
@@ -2445,7 +2489,7 @@
                 self.editorActGrp,
                 'vm_edit_extend_selection_end_display_document_line')
             self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAPEXTEND)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUP"):
@@ -2457,7 +2501,7 @@
                 0, 0,
                 self.editorActGrp, 'vm_edit_stuttered_move_up_page')
             self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUP)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUPEXTEND"):
@@ -2470,7 +2514,7 @@
                 self.editorActGrp,
                 'vm_edit_stuttered_extend_selection_up_page')
             self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUPEXTEND)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWN"):
@@ -2482,7 +2526,7 @@
                 0, 0,
                 self.editorActGrp, 'vm_edit_stuttered_move_down_page')
             self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWN)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWNEXTEND"):
@@ -2495,7 +2539,7 @@
                 self.editorActGrp,
                 'vm_edit_stuttered_extend_selection_down_page')
             self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWNEXTEND)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_DELWORDRIGHTEND"):
@@ -2510,7 +2554,7 @@
                 act.setShortcut(QKeySequence(
                     QApplication.translate('ViewManager', 'Alt+Del')))
             self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHTEND)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESUP"):
@@ -2522,7 +2566,7 @@
                 0, 0,
                 self.editorActGrp, 'vm_edit_move_selection_up_one_line')
             self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESUP)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESDOWN"):
@@ -2534,7 +2578,7 @@
                 0, 0,
                 self.editorActGrp, 'vm_edit_move_selection_down_one_line')
             self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESDOWN)
-            act.triggered[()].connect(self.esm.map)
+            act.triggered.connect(self.esm.map)
             self.editActions.append(act)
         
         self.editorActGrp.setEnabled(False)
@@ -2548,7 +2592,7 @@
             0,
             self.editActGrp, 'vm_edit_convert_selection_lower')
         self.esm.setMapping(self.editLowerCaseAct, QsciScintilla.SCI_LOWERCASE)
-        self.editLowerCaseAct.triggered[()].connect(self.esm.map)
+        self.editLowerCaseAct.triggered.connect(self.esm.map)
         self.editActions.append(self.editLowerCaseAct)
         
         self.editUpperCaseAct = E5Action(
@@ -2561,7 +2605,7 @@
             0,
             self.editActGrp, 'vm_edit_convert_selection_upper')
         self.esm.setMapping(self.editUpperCaseAct, QsciScintilla.SCI_UPPERCASE)
-        self.editUpperCaseAct.triggered[()].connect(self.esm.map)
+        self.editUpperCaseAct.triggered.connect(self.esm.map)
         self.editActions.append(self.editUpperCaseAct)
     
     def initEditMenu(self):
@@ -2705,7 +2749,7 @@
             """ dialog is shown to enter the searchtext and options"""
             """ for the search.</p>"""
         ))
-        self.searchAct.triggered[()].connect(self.__search)
+        self.searchAct.triggered.connect(self.__search)
         self.searchActions.append(self.searchAct)
         
         self.searchNextAct = E5Action(
@@ -2726,7 +2770,7 @@
             """ editor. The previously entered searchtext and options are"""
             """ reused.</p>"""
         ))
-        self.searchNextAct.triggered[()].connect(self.__searchWidget.findNext)
+        self.searchNextAct.triggered.connect(self.__searchWidget.findNext)
         self.searchActions.append(self.searchNextAct)
         
         self.searchPrevAct = E5Action(
@@ -2746,7 +2790,7 @@
             """ editor. The previously entered searchtext and options are"""
             """ reused.</p>"""
         ))
-        self.searchPrevAct.triggered[()].connect(self.__searchWidget.findPrev)
+        self.searchPrevAct.triggered.connect(self.__searchWidget.findPrev)
         self.searchActions.append(self.searchPrevAct)
         
         self.searchClearMarkersAct = E5Action(
@@ -2764,7 +2808,7 @@
             """<b>Clear search markers</b>"""
             """<p>Clear all displayed search markers.</p>"""
         ))
-        self.searchClearMarkersAct.triggered[()].connect(
+        self.searchClearMarkersAct.triggered.connect(
             self.__searchClearMarkers)
         self.searchActions.append(self.searchClearMarkersAct)
         
@@ -2788,7 +2832,7 @@
             """<p>Search the next occurrence of the current word of the"""
             """ current editor.</p>"""
         ))
-        self.searchNextWordAct.triggered[()].connect(self.__findNextWord)
+        self.searchNextWordAct.triggered.connect(self.__findNextWord)
         self.searchActions.append(self.searchNextWordAct)
         
         self.searchPrevWordAct = E5Action(
@@ -2811,7 +2855,7 @@
             """<p>Search the previous occurrence of the current word of the"""
             """ current editor.</p>"""
         ))
-        self.searchPrevWordAct.triggered[()].connect(self.__findPrevWord)
+        self.searchPrevWordAct.triggered.connect(self.__findPrevWord)
         self.searchActions.append(self.searchPrevWordAct)
         
         self.replaceAct = E5Action(
@@ -2830,7 +2874,7 @@
             """ A dialog is shown to enter the searchtext, the replacement"""
             """ text and options for the search and replace.</p>"""
         ))
-        self.replaceAct.triggered[()].connect(self.__replace)
+        self.replaceAct.triggered.connect(self.__replace)
         self.searchActions.append(self.replaceAct)
         
         self.quickSearchAct = E5Action(
@@ -2851,7 +2895,7 @@
             """ is already active and contains text, it searches for the"""
             """ next occurrence of this text.</p>"""
         ))
-        self.quickSearchAct.triggered[()].connect(self.__quickSearch)
+        self.quickSearchAct.triggered.connect(self.__quickSearch)
         self.searchActions.append(self.quickSearchAct)
         
         self.quickSearchBackAct = E5Action(
@@ -2871,7 +2915,7 @@
             """<p>This searches the previous occurrence of the quicksearch"""
             """ text.</p>"""
         ))
-        self.quickSearchBackAct.triggered[()].connect(self.__quickSearchPrev)
+        self.quickSearchBackAct.triggered.connect(self.__quickSearchPrev)
         self.searchActions.append(self.quickSearchBackAct)
         
         self.quickSearchExtendAct = E5Action(
@@ -2891,7 +2935,7 @@
             """<p>This extends the quicksearch text to the end of the word"""
             """ currently found.</p>"""
         ))
-        self.quickSearchExtendAct.triggered[()].connect(
+        self.quickSearchExtendAct.triggered.connect(
             self.__quickSearchExtend)
         self.searchActions.append(self.quickSearchExtendAct)
         
@@ -2911,7 +2955,7 @@
             """<p>Go to a specific line of text in the current editor."""
             """ A dialog is shown to enter the linenumber.</p>"""
         ))
-        self.gotoAct.triggered[()].connect(self.__goto)
+        self.gotoAct.triggered.connect(self.__goto)
         self.searchActions.append(self.gotoAct)
         
         self.gotoBraceAct = E5Action(
@@ -2929,7 +2973,7 @@
             """<b>Goto Brace</b>"""
             """<p>Go to the matching brace in the current editor.</p>"""
         ))
-        self.gotoBraceAct.triggered[()].connect(self.__gotoBrace)
+        self.gotoBraceAct.triggered.connect(self.__gotoBrace)
         self.searchActions.append(self.gotoBraceAct)
         
         self.gotoLastEditAct = E5Action(
@@ -2949,7 +2993,7 @@
             """<p>Go to the location of the last edit in the current"""
             """ editor.</p>"""
         ))
-        self.gotoLastEditAct.triggered[()].connect(self.__gotoLastEditPosition)
+        self.gotoLastEditAct.triggered.connect(self.__gotoLastEditPosition)
         self.searchActions.append(self.gotoLastEditAct)
         
         self.gotoPreviousDefAct = E5Action(
@@ -2972,7 +3016,7 @@
             """<p>Goes to the line of the previous method or class"""
             """ definition and highlights the name.</p>"""
         ))
-        self.gotoPreviousDefAct.triggered[()].connect(
+        self.gotoPreviousDefAct.triggered.connect(
             self.__gotoPreviousMethodClass)
         self.searchActions.append(self.gotoPreviousDefAct)
         
@@ -2992,7 +3036,7 @@
             """<p>Goes to the line of the next method or class definition"""
             """ and highlights the name.</p>"""
         ))
-        self.gotoNextDefAct.triggered[()].connect(self.__gotoNextMethodClass)
+        self.gotoNextDefAct.triggered.connect(self.__gotoNextMethodClass)
         self.searchActions.append(self.gotoNextDefAct)
         
         self.searchActGrp.setEnabled(False)
@@ -3014,7 +3058,7 @@
             """ or the project. A dialog is shown to enter the searchtext"""
             """ and options for the search and to display the result.</p>"""
         ))
-        self.searchFilesAct.triggered[()].connect(self.__searchFiles)
+        self.searchFilesAct.triggered.connect(self.__searchFiles)
         self.searchActions.append(self.searchFilesAct)
         
         self.replaceFilesAct = E5Action(
@@ -3034,7 +3078,7 @@
             """ the searchtext, the replacement text and options for the"""
             """ search and to display the result.</p>"""
         ))
-        self.replaceFilesAct.triggered[()].connect(self.__replaceFiles)
+        self.replaceFilesAct.triggered.connect(self.__replaceFiles)
         self.searchActions.append(self.replaceFilesAct)
         
         self.searchOpenFilesAct = E5Action(
@@ -3055,7 +3099,7 @@
             """ A dialog is shown to enter the searchtext"""
             """ and options for the search and to display the result.</p>"""
         ))
-        self.searchOpenFilesAct.triggered[()].connect(self.__searchOpenFiles)
+        self.searchOpenFilesAct.triggered.connect(self.__searchOpenFiles)
         self.searchActions.append(self.searchOpenFilesAct)
         
         self.replaceOpenFilesAct = E5Action(
@@ -3076,7 +3120,7 @@
             """ the searchtext, the replacement text and options for the"""
             """ search and to display the result.</p>"""
         ))
-        self.replaceOpenFilesAct.triggered[()].connect(self.__replaceOpenFiles)
+        self.replaceOpenFilesAct.triggered.connect(self.__replaceOpenFiles)
         self.searchActions.append(self.replaceOpenFilesAct)
         
     def initSearchToolbars(self, toolbarManager):
@@ -3141,7 +3185,7 @@
         self.quickFindtextAction = QWidgetAction(self)
         self.quickFindtextAction.setDefaultWidget(self.quickFindtextCombo)
         self.quickFindtextAction.setObjectName("vm_quickfindtext_action")
-        self.quickFindtextAction.setText(self.trUtf8("Quicksearch Textedit"))
+        self.quickFindtextAction.setText(self.tr("Quicksearch Textedit"))
         qtb.addAction(self.quickFindtextAction)
         qtb.addAction(self.quickSearchAct)
         qtb.addAction(self.quickSearchBackAct)
@@ -3206,7 +3250,7 @@
             """<b>Zoom in</b>"""
             """<p>Zoom in on the text. This makes the text bigger.</p>"""
         ))
-        self.zoomInAct.triggered[()].connect(self.__zoomIn)
+        self.zoomInAct.triggered.connect(self.__zoomIn)
         self.viewActions.append(self.zoomInAct)
         
         self.zoomOutAct = E5Action(
@@ -3225,7 +3269,7 @@
             """<b>Zoom out</b>"""
             """<p>Zoom out on the text. This makes the text smaller.</p>"""
         ))
-        self.zoomOutAct.triggered[()].connect(self.__zoomOut)
+        self.zoomOutAct.triggered.connect(self.__zoomOut)
         self.viewActions.append(self.zoomOutAct)
         
         self.zoomResetAct = E5Action(
@@ -3244,7 +3288,7 @@
             """<p>Reset the zoom of the text. """
             """This sets the zoom factor to 100%.</p>"""
         ))
-        self.zoomResetAct.triggered[()].connect(self.__zoomReset)
+        self.zoomResetAct.triggered.connect(self.__zoomReset)
         self.viewActions.append(self.zoomResetAct)
         
         self.zoomToAct = E5Action(
@@ -3263,7 +3307,7 @@
             """<p>Zoom the text. This opens a dialog where the"""
             """ desired size can be entered.</p>"""
         ))
-        self.zoomToAct.triggered[()].connect(self.__zoom)
+        self.zoomToAct.triggered.connect(self.__zoom)
         self.viewActions.append(self.zoomToAct)
         
         self.toggleAllAct = E5Action(
@@ -3277,7 +3321,7 @@
             """<b>Toggle all folds</b>"""
             """<p>Toggle all folds of the current editor.</p>"""
         ))
-        self.toggleAllAct.triggered[()].connect(self.__toggleAll)
+        self.toggleAllAct.triggered.connect(self.__toggleAll)
         self.viewActions.append(self.toggleAllAct)
         
         self.toggleAllChildrenAct = E5Action(
@@ -3294,7 +3338,7 @@
             """<p>Toggle all folds of the current editor including"""
             """ all children.</p>"""
         ))
-        self.toggleAllChildrenAct.triggered[()].connect(
+        self.toggleAllChildrenAct.triggered.connect(
             self.__toggleAllChildren)
         self.viewActions.append(self.toggleAllChildrenAct)
         
@@ -3310,7 +3354,7 @@
             """<p>Toggle the folds of the current line of the current"""
             """ editor.</p>"""
         ))
-        self.toggleCurrentAct.triggered[()].connect(self.__toggleCurrent)
+        self.toggleCurrentAct.triggered.connect(self.__toggleCurrent)
         self.viewActions.append(self.toggleCurrentAct)
         
         self.unhighlightAct = E5Action(
@@ -3326,7 +3370,7 @@
             """<b>Remove all highlights</b>"""
             """<p>Remove the highlights of all editors.</p>"""
         ))
-        self.unhighlightAct.triggered[()].connect(self.unhighlight)
+        self.unhighlightAct.triggered.connect(self.__unhighlight)
         self.viewActions.append(self.unhighlightAct)
         
         self.newDocumentViewAct = E5Action(
@@ -3343,7 +3387,7 @@
             """ the same document. However, the cursors may be positioned"""
             """ independently.</p>"""
         ))
-        self.newDocumentViewAct.triggered[()].connect(self.__newDocumentView)
+        self.newDocumentViewAct.triggered.connect(self.__newDocumentView)
         self.viewActions.append(self.newDocumentViewAct)
         
         self.newDocumentSplitViewAct = E5Action(
@@ -3363,7 +3407,7 @@
             """ Both views show the same document. However, the cursors may"""
             """ be positioned independently.</p>"""
         ))
-        self.newDocumentSplitViewAct.triggered[()].connect(
+        self.newDocumentSplitViewAct.triggered.connect(
             self.__newDocumentSplitView)
         self.viewActions.append(self.newDocumentSplitViewAct)
         
@@ -3379,7 +3423,7 @@
             """<b>Split view</b>"""
             """<p>Add a split to the view.</p>"""
         ))
-        self.splitViewAct.triggered[()].connect(self.__splitView)
+        self.splitViewAct.triggered.connect(self.__splitView)
         self.viewActions.append(self.splitViewAct)
         
         self.splitOrientationAct = E5Action(
@@ -3409,7 +3453,7 @@
             """<b>Remove split</b>"""
             """<p>Remove the current split.</p>"""
         ))
-        self.splitRemoveAct.triggered[()].connect(self.removeSplit)
+        self.splitRemoveAct.triggered.connect(self.removeSplit)
         self.viewActions.append(self.splitRemoveAct)
         
         self.nextSplitAct = E5Action(
@@ -3426,7 +3470,7 @@
             """<b>Next split</b>"""
             """<p>Move to the next split.</p>"""
         ))
-        self.nextSplitAct.triggered[()].connect(self.nextSplit)
+        self.nextSplitAct.triggered.connect(self.nextSplit)
         self.viewActions.append(self.nextSplitAct)
         
         self.prevSplitAct = E5Action(
@@ -3442,7 +3486,7 @@
             """<b>Previous split</b>"""
             """<p>Move to the previous split.</p>"""
         ))
-        self.prevSplitAct.triggered[()].connect(self.prevSplit)
+        self.prevSplitAct.triggered.connect(self.prevSplit)
         self.viewActions.append(self.prevSplitAct)
         
         self.previewAct = E5Action(
@@ -3550,7 +3594,7 @@
             """<b>Start Macro Recording</b>"""
             """<p>Start recording editor commands into a new macro.</p>"""
         ))
-        self.macroStartRecAct.triggered[()].connect(self.__macroStartRecording)
+        self.macroStartRecAct.triggered.connect(self.__macroStartRecording)
         self.macroActions.append(self.macroStartRecAct)
         
         self.macroStopRecAct = E5Action(
@@ -3564,7 +3608,7 @@
             """<b>Stop Macro Recording</b>"""
             """<p>Stop recording editor commands into a new macro.</p>"""
         ))
-        self.macroStopRecAct.triggered[()].connect(self.__macroStopRecording)
+        self.macroStopRecAct.triggered.connect(self.__macroStopRecording)
         self.macroActions.append(self.macroStopRecAct)
         
         self.macroRunAct = E5Action(
@@ -3578,7 +3622,7 @@
             """<b>Run Macro</b>"""
             """<p>Run a previously recorded editor macro.</p>"""
         ))
-        self.macroRunAct.triggered[()].connect(self.__macroRun)
+        self.macroRunAct.triggered.connect(self.__macroRun)
         self.macroActions.append(self.macroRunAct)
         
         self.macroDeleteAct = E5Action(
@@ -3592,7 +3636,7 @@
             """<b>Delete Macro</b>"""
             """<p>Delete a previously recorded editor macro.</p>"""
         ))
-        self.macroDeleteAct.triggered[()].connect(self.__macroDelete)
+        self.macroDeleteAct.triggered.connect(self.__macroDelete)
         self.macroActions.append(self.macroDeleteAct)
         
         self.macroLoadAct = E5Action(
@@ -3606,7 +3650,7 @@
             """<b>Load Macro</b>"""
             """<p>Load an editor macro from a file.</p>"""
         ))
-        self.macroLoadAct.triggered[()].connect(self.__macroLoad)
+        self.macroLoadAct.triggered.connect(self.__macroLoad)
         self.macroActions.append(self.macroLoadAct)
         
         self.macroSaveAct = E5Action(
@@ -3620,7 +3664,7 @@
             """<b>Save Macro</b>"""
             """<p>Save a previously recorded editor macro to a file.</p>"""
         ))
-        self.macroSaveAct.triggered[()].connect(self.__macroSave)
+        self.macroSaveAct.triggered.connect(self.__macroSave)
         self.macroActions.append(self.macroSaveAct)
         
         self.macroActGrp.setEnabled(False)
@@ -3664,7 +3708,7 @@
             """<p>Toggle a bookmark at the current line of the current"""
             """ editor.</p>"""
         ))
-        self.bookmarkToggleAct.triggered[()].connect(self.__toggleBookmark)
+        self.bookmarkToggleAct.triggered.connect(self.__toggleBookmark)
         self.bookmarkActions.append(self.bookmarkToggleAct)
         
         self.bookmarkNextAct = E5Action(
@@ -3682,7 +3726,7 @@
             """<b>Next Bookmark</b>"""
             """<p>Go to next bookmark of the current editor.</p>"""
         ))
-        self.bookmarkNextAct.triggered[()].connect(self.__nextBookmark)
+        self.bookmarkNextAct.triggered.connect(self.__nextBookmark)
         self.bookmarkActions.append(self.bookmarkNextAct)
         
         self.bookmarkPreviousAct = E5Action(
@@ -3700,7 +3744,7 @@
             """<b>Previous Bookmark</b>"""
             """<p>Go to previous bookmark of the current editor.</p>"""
         ))
-        self.bookmarkPreviousAct.triggered[()].connect(self.__previousBookmark)
+        self.bookmarkPreviousAct.triggered.connect(self.__previousBookmark)
         self.bookmarkActions.append(self.bookmarkPreviousAct)
         
         self.bookmarkClearAct = E5Action(
@@ -3717,7 +3761,7 @@
             """<b>Clear Bookmarks</b>"""
             """<p>Clear bookmarks of all editors.</p>"""
         ))
-        self.bookmarkClearAct.triggered[()].connect(self.__clearAllBookmarks)
+        self.bookmarkClearAct.triggered.connect(self.__clearAllBookmarks)
         self.bookmarkActions.append(self.bookmarkClearAct)
         
         self.syntaxErrorGotoAct = E5Action(
@@ -3733,7 +3777,7 @@
             """<b>Goto Syntax Error</b>"""
             """<p>Go to next syntax error of the current editor.</p>"""
         ))
-        self.syntaxErrorGotoAct.triggered[()].connect(self.__gotoSyntaxError)
+        self.syntaxErrorGotoAct.triggered.connect(self.__gotoSyntaxError)
         self.bookmarkActions.append(self.syntaxErrorGotoAct)
         
         self.syntaxErrorClearAct = E5Action(
@@ -3748,7 +3792,7 @@
             """<b>Clear Syntax Errors</b>"""
             """<p>Clear syntax errors of all editors.</p>"""
         ))
-        self.syntaxErrorClearAct.triggered[()].connect(
+        self.syntaxErrorClearAct.triggered.connect(
             self.__clearAllSyntaxErrors)
         self.bookmarkActions.append(self.syntaxErrorClearAct)
         
@@ -3764,9 +3808,9 @@
             'ViewManager',
             """<b>Next warning message</b>"""
             """<p>Go to next line of the current editor"""
-            """ having a py3flakes warning.</p>"""
+            """ having a pyflakes warning.</p>"""
         ))
-        self.warningsNextAct.triggered[()].connect(self.__nextWarning)
+        self.warningsNextAct.triggered.connect(self.__nextWarning)
         self.bookmarkActions.append(self.warningsNextAct)
         
         self.warningsPreviousAct = E5Action(
@@ -3782,9 +3826,9 @@
             'ViewManager',
             """<b>Previous warning message</b>"""
             """<p>Go to previous line of the current editor"""
-            """ having a py3flakes warning.</p>"""
+            """ having a pyflakes warning.</p>"""
         ))
-        self.warningsPreviousAct.triggered[()].connect(self.__previousWarning)
+        self.warningsPreviousAct.triggered.connect(self.__previousWarning)
         self.bookmarkActions.append(self.warningsPreviousAct)
         
         self.warningsClearAct = E5Action(
@@ -3797,9 +3841,9 @@
         self.warningsClearAct.setWhatsThis(QApplication.translate(
             'ViewManager',
             """<b>Clear Warning Messages</b>"""
-            """<p>Clear py3flakes warning messages of all editors.</p>"""
+            """<p>Clear pyflakes warning messages of all editors.</p>"""
         ))
-        self.warningsClearAct.triggered[()].connect(self.__clearAllWarnings)
+        self.warningsClearAct.triggered.connect(self.__clearAllWarnings)
         self.bookmarkActions.append(self.warningsClearAct)
         
         self.notcoveredNextAct = E5Action(
@@ -3816,7 +3860,7 @@
             """<p>Go to next line of the current editor marked as not"""
             """ covered.</p>"""
         ))
-        self.notcoveredNextAct.triggered[()].connect(self.__nextUncovered)
+        self.notcoveredNextAct.triggered.connect(self.__nextUncovered)
         self.bookmarkActions.append(self.notcoveredNextAct)
         
         self.notcoveredPreviousAct = E5Action(
@@ -3834,7 +3878,7 @@
             """<p>Go to previous line of the current editor marked"""
             """ as not covered.</p>"""
         ))
-        self.notcoveredPreviousAct.triggered[()].connect(
+        self.notcoveredPreviousAct.triggered.connect(
             self.__previousUncovered)
         self.bookmarkActions.append(self.notcoveredPreviousAct)
         
@@ -3851,7 +3895,7 @@
             """<b>Next Task</b>"""
             """<p>Go to next line of the current editor having a task.</p>"""
         ))
-        self.taskNextAct.triggered[()].connect(self.__nextTask)
+        self.taskNextAct.triggered.connect(self.__nextTask)
         self.bookmarkActions.append(self.taskNextAct)
         
         self.taskPreviousAct = E5Action(
@@ -3869,7 +3913,7 @@
             """<p>Go to previous line of the current editor having a"""
             """ task.</p>"""
         ))
-        self.taskPreviousAct.triggered[()].connect(self.__previousTask)
+        self.taskPreviousAct.triggered.connect(self.__previousTask)
         self.bookmarkActions.append(self.taskPreviousAct)
         
         self.changeNextAct = E5Action(
@@ -3886,7 +3930,7 @@
             """<p>Go to next line of the current editor having a change"""
             """ marker.</p>"""
         ))
-        self.changeNextAct.triggered[()].connect(self.__nextChange)
+        self.changeNextAct.triggered.connect(self.__nextChange)
         self.bookmarkActions.append(self.changeNextAct)
         
         self.changePreviousAct = E5Action(
@@ -3904,7 +3948,7 @@
             """<p>Go to previous line of the current editor having"""
             """ a change marker.</p>"""
         ))
-        self.changePreviousAct.triggered[()].connect(self.__previousChange)
+        self.changePreviousAct.triggered.connect(self.__previousChange)
         self.bookmarkActions.append(self.changePreviousAct)
         
         self.bookmarkActGrp.setEnabled(False)
@@ -4012,7 +4056,7 @@
             """<b>Check spelling</b>"""
             """<p>Perform a spell check of the current editor.</p>"""
         ))
-        self.spellCheckAct.triggered[()].connect(self.__spellCheck)
+        self.spellCheckAct.triggered.connect(self.__spellCheck)
         self.spellingActions.append(self.spellCheckAct)
         
         self.autoSpellCheckAct = E5Action(
@@ -4032,7 +4076,7 @@
         ))
         self.autoSpellCheckAct.setChecked(
             Preferences.getEditor("AutoSpellCheckingEnabled"))
-        self.autoSpellCheckAct.triggered[()].connect(
+        self.autoSpellCheckAct.triggered.connect(
             self.__setAutoSpellChecking)
         self.spellingActions.append(self.autoSpellCheckAct)
         
@@ -4103,33 +4147,34 @@
     ## Methods and slots that deal with file and window handling
     ##################################################################
     
-    def openFiles(self, prog=None):
+    def __openFiles(self):
+        """
+        Private slot to open some files.
+        """
+        # set the cwd of the dialog based on the following search criteria:
+        #     1: Directory of currently active editor
+        #     2: Directory of currently active project
+        #     3: CWD
+        import QScintilla.Lexers
+        filter = self._getOpenFileFilter()
+        progs = E5FileDialog.getOpenFileNamesAndFilter(
+            self.ui,
+            QApplication.translate('ViewManager', "Open files"),
+            self._getOpenStartDir(),
+            QScintilla.Lexers.getOpenFileFiltersList(True, True),
+            filter)[0]
+        for prog in progs:
+            self.openFiles(prog)
+    
+    def openFiles(self, prog):
         """
         Public slot to open some files.
         
         @param prog name of file to be opened (string)
         """
-        # Get the file name if one wasn't specified.
-        if prog is None:
-            # set the cwd of the dialog based on the following search criteria:
-            #     1: Directory of currently active editor
-            #     2: Directory of currently active project
-            #     3: CWD
-            import QScintilla.Lexers
-            filter = self._getOpenFileFilter()
-            progs = E5FileDialog.getOpenFileNamesAndFilter(
-                self.ui,
-                QApplication.translate('ViewManager', "Open files"),
-                self._getOpenStartDir(),
-                QScintilla.Lexers.getOpenFileFiltersList(True, True),
-                filter)[0]
-        else:
-            progs = [prog]
-        
-        for prog in progs:
-            prog = Utilities.normabspath(prog)
-            # Open up the new files.
-            self.openSourceFile(prog)
+        prog = Utilities.normabspath(prog)
+        # Open up the new files.
+        self.openSourceFile(prog)
 
     def checkDirty(self, editor, autosave=False):
         """
@@ -4522,9 +4567,16 @@
             pixmap = QPixmap()
         return pixmap
         
+    def __unhighlight(self):
+        """
+        Privat slot to switch of all highlights.
+        """
+        self.unhighlight()
+        
     def unhighlight(self, current=False):
         """
-        Public method to switch off all highlights.
+        Public method to switch off all highlights or the highlight of
+        the current editor.
         
         @param current flag indicating only the current editor should be
             unhighlighted (boolean)
@@ -4545,7 +4597,8 @@
         filenames = []
         for editor in self.editors:
             fn = editor.getFileName()
-            if fn is not None and fn not in filenames:
+            if fn is not None and fn not in filenames and os.path.exists(fn):
+                # only return names of existing files
                 filenames.append(fn)
         
         return filenames
@@ -5539,25 +5592,34 @@
                 aw.zoomTo(0)
                 self.sbZoom.setValue(aw.getZoom())
         
-    def __zoom(self, value=None):
+    def __zoom(self):
         """
         Private method to handle the zoom action.
-        
-        @keyparam value zoom value to be set (integer)
         """
         if QApplication.focusWidget() == e5App().getObject("Shell"):
             aw = e5App().getObject("Shell")
         else:
             aw = self.activeWindow()
         if aw:
-            if value is None:
-                from QScintilla.ZoomDialog import ZoomDialog
-                dlg = ZoomDialog(aw.getZoom(), self.ui, None, True)
-                if dlg.exec_() == QDialog.Accepted:
-                    value = dlg.getZoomSize()
-            if value is not None:
-                aw.zoomTo(value)
-                self.sbZoom.setValue(aw.getZoom())
+            from QScintilla.ZoomDialog import ZoomDialog
+            dlg = ZoomDialog(aw.getZoom(), self.ui, None, True)
+            if dlg.exec_() == QDialog.Accepted:
+                value = dlg.getZoomSize()
+                self.__zoomTo(value)
+        
+    def __zoomTo(self, value):
+        """
+        Private slot to zoom to a given value.
+        
+        @param value zoom value to be set (integer)
+        """
+        if QApplication.focusWidget() == e5App().getObject("Shell"):
+            aw = e5App().getObject("Shell")
+        else:
+            aw = self.activeWindow()
+        if aw:
+            aw.zoomTo(value)
+            self.sbZoom.setValue(aw.getZoom())
         
     def zoomValueChanged(self, value):
         """
@@ -6263,7 +6325,7 @@
             else:
                 self.autoCompleteFromAPIsAct.setEnabled(False)
             
-            if editor.getPyVersion() or editor.isRubyFile():
+            if editor.isPyFile() or editor.isRubyFile():
                 self.gotoPreviousDefAct.setEnabled(True)
                 self.gotoNextDefAct.setEnabled(True)
             else:

eric ide

mercurial