ViewManager/ViewManager.py

changeset 478
e7d778ea21d6
parent 476
121633976eca
child 482
4650a72c307a
--- a/ViewManager/ViewManager.py	Mon Aug 09 19:58:48 2010 +0200
+++ b/ViewManager/ViewManager.py	Tue Aug 10 10:42:11 2010 +0200
@@ -846,6 +846,21 @@
         self.deleteAct.triggered[()].connect(self.__editDelete)
         self.editActions.append(self.deleteAct)
         
+        self.joinAct = E5Action(QApplication.translate('ViewManager', 'Join Lines'),
+                QApplication.translate('ViewManager', 'Join Lines'),
+                QKeySequence(QApplication.translate('ViewManager', 
+                    "Ctrl+J", "Edit|Join Lines")), 
+                0,
+                self.copyActGrp, 'vm_edit_join_lines')
+        self.joinAct.setStatusTip(QApplication.translate('ViewManager', 
+            'Join Lines'))
+        self.joinAct.setWhatsThis(QApplication.translate('ViewManager', 
+            """<b>Join Lines</b>"""
+            """<p>Join the current and the next lines.</p>"""
+        ))
+        self.joinAct.triggered[()].connect(self.__editJoin)
+        self.editActions.append(self.joinAct)
+        
         self.indentAct = E5Action(QApplication.translate('ViewManager', 'Indent'),
                 UI.PixmapCache.getIcon("editIndent.png"),
                 QApplication.translate('ViewManager', '&Indent'),
@@ -3804,6 +3819,12 @@
         else:
             self.activeWindow().clear()
         
+    def __editJoin(self):
+        """
+        Private method to handle the join action.
+        """
+        self.activeWindow().joinLines()
+        
     def __editIndent(self):
         """
         Private method to handle the indent action.

eric ide

mercurial