eric6/QScintilla/ShellWindow.py

changeset 7829
5a99dd3ebe5f
parent 7781
607a6098cb44
child 7923
91e843545d9a
equal deleted inserted replaced
7828:4588940a2c19 7829:5a99dd3ebe5f
239 0, 0, self, 'shell_restart') 239 0, 0, self, 'shell_restart')
240 self.restartAct.setStatusTip(self.tr( 240 self.restartAct.setStatusTip(self.tr(
241 'Restart the shell')) 241 'Restart the shell'))
242 self.restartAct.setWhatsThis(self.tr( 242 self.restartAct.setWhatsThis(self.tr(
243 """<b>Restart</b>""" 243 """<b>Restart</b>"""
244 """<p>Restart the shell for the currently selected language.</p>""" 244 """<p>Restart the shell for the currently selected"""
245 """ environment.</p>"""
245 )) 246 ))
246 self.restartAct.triggered.connect(self.__shell.doRestart) 247 self.restartAct.triggered.connect(self.__shell.doRestart)
247 self.fileActions.append(self.restartAct) 248 self.fileActions.append(self.restartAct)
248 249
249 self.clearRestartAct = E5Action( 250 self.clearRestartAct = E5Action(
254 self.clearRestartAct.setStatusTip(self.tr( 255 self.clearRestartAct.setStatusTip(self.tr(
255 'Clear the window and restart the shell')) 256 'Clear the window and restart the shell'))
256 self.clearRestartAct.setWhatsThis(self.tr( 257 self.clearRestartAct.setWhatsThis(self.tr(
257 """<b>Restart and Clear</b>""" 258 """<b>Restart and Clear</b>"""
258 """<p>Clear the shell window and restart the shell for the""" 259 """<p>Clear the shell window and restart the shell for the"""
259 """ currently selected language.</p>""" 260 """ currently selected environment.</p>"""
260 )) 261 ))
261 self.clearRestartAct.triggered.connect(self.__shell.doClearRestart) 262 self.clearRestartAct.triggered.connect(self.__shell.doClearRestart)
262 self.fileActions.append(self.clearRestartAct) 263 self.fileActions.append(self.clearRestartAct)
263 264
264 def __createEditActions(self): 265 def __createEditActions(self):
278 QKeySequence(QCoreApplication.translate( 279 QKeySequence(QCoreApplication.translate(
279 'ViewManager', "Shift+Del", "Edit|Cut")), 280 'ViewManager', "Shift+Del", "Edit|Cut")),
280 self.copyActGrp, 'vm_edit_cut') 281 self.copyActGrp, 'vm_edit_cut')
281 self.cutAct.setStatusTip(QCoreApplication.translate( 282 self.cutAct.setStatusTip(QCoreApplication.translate(
282 'ViewManager', 'Cut the selection')) 283 'ViewManager', 'Cut the selection'))
283 self.cutAct.setWhatsThis(QCoreApplication.translate( 284 self.cutAct.setWhatsThis(self.tr(
284 'ViewManager',
285 """<b>Cut</b>""" 285 """<b>Cut</b>"""
286 """<p>Cut the selected text of the current editor to the""" 286 """<p>Cut the selected text to the clipboard.</p>"""
287 """ clipboard.</p>"""
288 )) 287 ))
289 self.cutAct.triggered.connect(self.__shell.cut) 288 self.cutAct.triggered.connect(self.__shell.cut)
290 self.editActions.append(self.cutAct) 289 self.editActions.append(self.cutAct)
291 290
292 self.copyAct = E5Action( 291 self.copyAct = E5Action(
298 QKeySequence(QCoreApplication.translate( 297 QKeySequence(QCoreApplication.translate(
299 'ViewManager', "Ctrl+Ins", "Edit|Copy")), 298 'ViewManager', "Ctrl+Ins", "Edit|Copy")),
300 self.copyActGrp, 'vm_edit_copy') 299 self.copyActGrp, 'vm_edit_copy')
301 self.copyAct.setStatusTip(QCoreApplication.translate( 300 self.copyAct.setStatusTip(QCoreApplication.translate(
302 'ViewManager', 'Copy the selection')) 301 'ViewManager', 'Copy the selection'))
303 self.copyAct.setWhatsThis(QCoreApplication.translate( 302 self.copyAct.setWhatsThis(self.tr(
304 'ViewManager',
305 """<b>Copy</b>""" 303 """<b>Copy</b>"""
306 """<p>Copy the selected text of the current editor to the""" 304 """<p>Copy the selected text to the clipboard.</p>"""
307 """ clipboard.</p>"""
308 )) 305 ))
309 self.copyAct.triggered.connect(self.__shell.copy) 306 self.copyAct.triggered.connect(self.__shell.copy)
310 self.editActions.append(self.copyAct) 307 self.editActions.append(self.copyAct)
311 308
312 self.pasteAct = E5Action( 309 self.pasteAct = E5Action(
318 QKeySequence(QCoreApplication.translate( 315 QKeySequence(QCoreApplication.translate(
319 'ViewManager', "Shift+Ins", "Edit|Paste")), 316 'ViewManager', "Shift+Ins", "Edit|Paste")),
320 self.copyActGrp, 'vm_edit_paste') 317 self.copyActGrp, 'vm_edit_paste')
321 self.pasteAct.setStatusTip(QCoreApplication.translate( 318 self.pasteAct.setStatusTip(QCoreApplication.translate(
322 'ViewManager', 'Paste the last cut/copied text')) 319 'ViewManager', 'Paste the last cut/copied text'))
323 self.pasteAct.setWhatsThis(QCoreApplication.translate( 320 self.pasteAct.setWhatsThis(self.tr(
324 'ViewManager',
325 """<b>Paste</b>""" 321 """<b>Paste</b>"""
326 """<p>Paste the last cut/copied text from the clipboard to""" 322 """<p>Paste the last cut/copied text from the clipboard.</p>"""
327 """ the current editor.</p>"""
328 )) 323 ))
329 self.pasteAct.triggered.connect(self.__shell.paste) 324 self.pasteAct.triggered.connect(self.__shell.paste)
330 self.editActions.append(self.pasteAct) 325 self.editActions.append(self.pasteAct)
331 326
332 self.clearAct = E5Action( 327 self.clearAct = E5Action(
337 'ViewManager', "Alt+Shift+C", "Edit|Clear")), 332 'ViewManager', "Alt+Shift+C", "Edit|Clear")),
338 0, 333 0,
339 self.copyActGrp, 'vm_edit_clear') 334 self.copyActGrp, 'vm_edit_clear')
340 self.clearAct.setStatusTip(QCoreApplication.translate( 335 self.clearAct.setStatusTip(QCoreApplication.translate(
341 'ViewManager', 'Clear all text')) 336 'ViewManager', 'Clear all text'))
342 self.clearAct.setWhatsThis(QCoreApplication.translate( 337 self.clearAct.setWhatsThis(self.tr(
343 'ViewManager',
344 """<b>Clear</b>""" 338 """<b>Clear</b>"""
345 """<p>Delete all text of the current editor.</p>""" 339 """<p>Delete all text.</p>"""
346 )) 340 ))
347 self.clearAct.triggered.connect(self.__shell.clear) 341 self.clearAct.triggered.connect(self.__shell.clear)
348 self.editActions.append(self.clearAct) 342 self.editActions.append(self.clearAct)
349 343
350 self.cutAct.setEnabled(False) 344 self.cutAct.setEnabled(False)
748 self.searchAct.setStatusTip(QCoreApplication.translate( 742 self.searchAct.setStatusTip(QCoreApplication.translate(
749 'ViewManager', 'Search for a text')) 743 'ViewManager', 'Search for a text'))
750 self.searchAct.setWhatsThis(QCoreApplication.translate( 744 self.searchAct.setWhatsThis(QCoreApplication.translate(
751 'ViewManager', 745 'ViewManager',
752 """<b>Search</b>""" 746 """<b>Search</b>"""
753 """<p>Search for some text in the current editor. A""" 747 """<p>Search for some text in the shell window. A"""
754 """ dialog is shown to enter the searchtext and options""" 748 """ dialog is shown to enter the search text and options"""
755 """ for the search.</p>""" 749 """ for the search.</p>"""
756 )) 750 ))
757 self.searchAct.triggered.connect(self.__showFind) 751 self.searchAct.triggered.connect(self.__showFind)
758 self.searchActions.append(self.searchAct) 752 self.searchActions.append(self.searchAct)
759 753
769 self.searchNextAct.setStatusTip(QCoreApplication.translate( 763 self.searchNextAct.setStatusTip(QCoreApplication.translate(
770 'ViewManager', 'Search next occurrence of text')) 764 'ViewManager', 'Search next occurrence of text'))
771 self.searchNextAct.setWhatsThis(QCoreApplication.translate( 765 self.searchNextAct.setWhatsThis(QCoreApplication.translate(
772 'ViewManager', 766 'ViewManager',
773 """<b>Search next</b>""" 767 """<b>Search next</b>"""
774 """<p>Search the next occurrence of some text in the current""" 768 """<p>Search the next occurrence of some text in the shell"""
775 """ editor. The previously entered searchtext and options are""" 769 """ window. The previously entered search text and options are"""
776 """ reused.</p>""" 770 """ reused.</p>"""
777 )) 771 ))
778 self.searchNextAct.triggered.connect( 772 self.searchNextAct.triggered.connect(
779 self.__searchWidget.on_findNextButton_clicked) 773 self.__searchWidget.on_findNextButton_clicked)
780 self.searchActions.append(self.searchNextAct) 774 self.searchActions.append(self.searchNextAct)
790 self.searchPrevAct.setStatusTip(QCoreApplication.translate( 784 self.searchPrevAct.setStatusTip(QCoreApplication.translate(
791 'ViewManager', 'Search previous occurrence of text')) 785 'ViewManager', 'Search previous occurrence of text'))
792 self.searchPrevAct.setWhatsThis(QCoreApplication.translate( 786 self.searchPrevAct.setWhatsThis(QCoreApplication.translate(
793 'ViewManager', 787 'ViewManager',
794 """<b>Search previous</b>""" 788 """<b>Search previous</b>"""
795 """<p>Search the previous occurrence of some text in the current""" 789 """<p>Search the previous occurrence of some text in the shell"""
796 """ editor. The previously entered searchtext and options are""" 790 """ window. The previously entered search text and options are"""
797 """ reused.</p>""" 791 """ reused.</p>"""
798 )) 792 ))
799 self.searchPrevAct.triggered.connect( 793 self.searchPrevAct.triggered.connect(
800 self.__searchWidget.on_findPrevButton_clicked) 794 self.__searchWidget.on_findPrevButton_clicked)
801 self.searchActions.append(self.searchPrevAct) 795 self.searchActions.append(self.searchPrevAct)

eric ide

mercurial