362 def __createFileActions(self): |
362 def __createFileActions(self): |
363 """ |
363 """ |
364 Private method to create the File actions. |
364 Private method to create the File actions. |
365 """ |
365 """ |
366 self.newAct = E5Action( |
366 self.newAct = E5Action( |
367 self.trUtf8('New'), |
367 self.tr('New'), |
368 UI.PixmapCache.getIcon("new.png"), |
368 UI.PixmapCache.getIcon("new.png"), |
369 self.trUtf8('&New'), |
369 self.tr('&New'), |
370 QKeySequence(self.trUtf8("Ctrl+N", "File|New")), |
370 QKeySequence(self.tr("Ctrl+N", "File|New")), |
371 0, self, 'vm_file_new') |
371 0, self, 'vm_file_new') |
372 self.newAct.setStatusTip(self.trUtf8('Open an empty editor window')) |
372 self.newAct.setStatusTip(self.tr('Open an empty editor window')) |
373 self.newAct.setWhatsThis(self.trUtf8( |
373 self.newAct.setWhatsThis(self.tr( |
374 """<b>New</b>""" |
374 """<b>New</b>""" |
375 """<p>An empty editor window will be created.</p>""" |
375 """<p>An empty editor window will be created.</p>""" |
376 )) |
376 )) |
377 self.newAct.triggered[()].connect(self.__newFile) |
377 self.newAct.triggered[()].connect(self.__newFile) |
378 self.fileActions.append(self.newAct) |
378 self.fileActions.append(self.newAct) |
379 |
379 |
380 self.openAct = E5Action( |
380 self.openAct = E5Action( |
381 self.trUtf8('Open'), |
381 self.tr('Open'), |
382 UI.PixmapCache.getIcon("open.png"), |
382 UI.PixmapCache.getIcon("open.png"), |
383 self.trUtf8('&Open...'), |
383 self.tr('&Open...'), |
384 QKeySequence(self.trUtf8("Ctrl+O", "File|Open")), |
384 QKeySequence(self.tr("Ctrl+O", "File|Open")), |
385 0, self, 'vm_file_open') |
385 0, self, 'vm_file_open') |
386 self.openAct.setStatusTip(self.trUtf8('Open a file')) |
386 self.openAct.setStatusTip(self.tr('Open a file')) |
387 self.openAct.setWhatsThis(self.trUtf8( |
387 self.openAct.setWhatsThis(self.tr( |
388 """<b>Open a file</b>""" |
388 """<b>Open a file</b>""" |
389 """<p>You will be asked for the name of a file to be opened.</p>""" |
389 """<p>You will be asked for the name of a file to be opened.</p>""" |
390 )) |
390 )) |
391 self.openAct.triggered[()].connect(self.__open) |
391 self.openAct.triggered[()].connect(self.__open) |
392 self.fileActions.append(self.openAct) |
392 self.fileActions.append(self.openAct) |
393 |
393 |
394 self.saveAct = E5Action( |
394 self.saveAct = E5Action( |
395 self.trUtf8('Save'), |
395 self.tr('Save'), |
396 UI.PixmapCache.getIcon("fileSave.png"), |
396 UI.PixmapCache.getIcon("fileSave.png"), |
397 self.trUtf8('&Save'), |
397 self.tr('&Save'), |
398 QKeySequence(self.trUtf8("Ctrl+S", "File|Save")), |
398 QKeySequence(self.tr("Ctrl+S", "File|Save")), |
399 0, self, 'vm_file_save') |
399 0, self, 'vm_file_save') |
400 self.saveAct.setStatusTip(self.trUtf8('Save the current file')) |
400 self.saveAct.setStatusTip(self.tr('Save the current file')) |
401 self.saveAct.setWhatsThis(self.trUtf8( |
401 self.saveAct.setWhatsThis(self.tr( |
402 """<b>Save File</b>""" |
402 """<b>Save File</b>""" |
403 """<p>Save the contents of current editor window.</p>""" |
403 """<p>Save the contents of current editor window.</p>""" |
404 )) |
404 )) |
405 self.saveAct.triggered[()].connect(self.__save) |
405 self.saveAct.triggered[()].connect(self.__save) |
406 self.fileActions.append(self.saveAct) |
406 self.fileActions.append(self.saveAct) |
407 |
407 |
408 self.saveAsAct = E5Action( |
408 self.saveAsAct = E5Action( |
409 self.trUtf8('Save as'), |
409 self.tr('Save as'), |
410 UI.PixmapCache.getIcon("fileSaveAs.png"), |
410 UI.PixmapCache.getIcon("fileSaveAs.png"), |
411 self.trUtf8('Save &as...'), |
411 self.tr('Save &as...'), |
412 QKeySequence(self.trUtf8("Shift+Ctrl+S", "File|Save As")), |
412 QKeySequence(self.tr("Shift+Ctrl+S", "File|Save As")), |
413 0, self, 'vm_file_save_as') |
413 0, self, 'vm_file_save_as') |
414 self.saveAsAct.setStatusTip(self.trUtf8( |
414 self.saveAsAct.setStatusTip(self.tr( |
415 'Save the current file to a new one')) |
415 'Save the current file to a new one')) |
416 self.saveAsAct.setWhatsThis(self.trUtf8( |
416 self.saveAsAct.setWhatsThis(self.tr( |
417 """<b>Save File as</b>""" |
417 """<b>Save File as</b>""" |
418 """<p>Save the contents of current editor window to a new file.""" |
418 """<p>Save the contents of current editor window to a new file.""" |
419 """ The file can be entered in a file selection dialog.</p>""" |
419 """ The file can be entered in a file selection dialog.</p>""" |
420 )) |
420 )) |
421 self.saveAsAct.triggered[()].connect(self.__saveAs) |
421 self.saveAsAct.triggered[()].connect(self.__saveAs) |
422 self.fileActions.append(self.saveAsAct) |
422 self.fileActions.append(self.saveAsAct) |
423 |
423 |
424 self.closeAct = E5Action( |
424 self.closeAct = E5Action( |
425 self.trUtf8('Close'), |
425 self.tr('Close'), |
426 UI.PixmapCache.getIcon("close.png"), |
426 UI.PixmapCache.getIcon("close.png"), |
427 self.trUtf8('&Close'), |
427 self.tr('&Close'), |
428 QKeySequence(self.trUtf8("Ctrl+W", "File|Close")), |
428 QKeySequence(self.tr("Ctrl+W", "File|Close")), |
429 0, self, 'vm_file_close') |
429 0, self, 'vm_file_close') |
430 self.closeAct.setStatusTip(self.trUtf8('Close the editor window')) |
430 self.closeAct.setStatusTip(self.tr('Close the editor window')) |
431 self.closeAct.setWhatsThis(self.trUtf8( |
431 self.closeAct.setWhatsThis(self.tr( |
432 """<b>Close Window</b>""" |
432 """<b>Close Window</b>""" |
433 """<p>Close the current window.</p>""" |
433 """<p>Close the current window.</p>""" |
434 )) |
434 )) |
435 self.closeAct.triggered[()].connect(self.close) |
435 self.closeAct.triggered[()].connect(self.close) |
436 self.fileActions.append(self.closeAct) |
436 self.fileActions.append(self.closeAct) |
437 |
437 |
438 self.printAct = E5Action( |
438 self.printAct = E5Action( |
439 self.trUtf8('Print'), |
439 self.tr('Print'), |
440 UI.PixmapCache.getIcon("print.png"), |
440 UI.PixmapCache.getIcon("print.png"), |
441 self.trUtf8('&Print'), |
441 self.tr('&Print'), |
442 QKeySequence(self.trUtf8("Ctrl+P", "File|Print")), |
442 QKeySequence(self.tr("Ctrl+P", "File|Print")), |
443 0, self, 'vm_file_print') |
443 0, self, 'vm_file_print') |
444 self.printAct.setStatusTip(self.trUtf8('Print the current file')) |
444 self.printAct.setStatusTip(self.tr('Print the current file')) |
445 self.printAct.setWhatsThis(self.trUtf8( |
445 self.printAct.setWhatsThis(self.tr( |
446 """<b>Print File</b>""" |
446 """<b>Print File</b>""" |
447 """<p>Print the contents of the current file.</p>""" |
447 """<p>Print the contents of the current file.</p>""" |
448 )) |
448 )) |
449 self.printAct.triggered[()].connect(self.__printFile) |
449 self.printAct.triggered[()].connect(self.__printFile) |
450 self.fileActions.append(self.printAct) |
450 self.fileActions.append(self.printAct) |
451 |
451 |
452 self.printPreviewAct = E5Action( |
452 self.printPreviewAct = E5Action( |
453 self.trUtf8('Print Preview'), |
453 self.tr('Print Preview'), |
454 UI.PixmapCache.getIcon("printPreview.png"), |
454 UI.PixmapCache.getIcon("printPreview.png"), |
455 QApplication.translate('ViewManager', 'Print Preview'), |
455 QApplication.translate('ViewManager', 'Print Preview'), |
456 0, 0, self, 'vm_file_print_preview') |
456 0, 0, self, 'vm_file_print_preview') |
457 self.printPreviewAct.setStatusTip(self.trUtf8( |
457 self.printPreviewAct.setStatusTip(self.tr( |
458 'Print preview of the current file')) |
458 'Print preview of the current file')) |
459 self.printPreviewAct.setWhatsThis(self.trUtf8( |
459 self.printPreviewAct.setWhatsThis(self.tr( |
460 """<b>Print Preview</b>""" |
460 """<b>Print Preview</b>""" |
461 """<p>Print preview of the current file.</p>""" |
461 """<p>Print preview of the current file.</p>""" |
462 )) |
462 )) |
463 self.printPreviewAct.triggered[()].connect(self.__printPreviewFile) |
463 self.printPreviewAct.triggered[()].connect(self.__printPreviewFile) |
464 self.fileActions.append(self.printPreviewAct) |
464 self.fileActions.append(self.printPreviewAct) |
466 def __createEditActions(self): |
466 def __createEditActions(self): |
467 """ |
467 """ |
468 Private method to create the Edit actions. |
468 Private method to create the Edit actions. |
469 """ |
469 """ |
470 self.undoAct = E5Action( |
470 self.undoAct = E5Action( |
471 self.trUtf8('Undo'), |
471 self.tr('Undo'), |
472 UI.PixmapCache.getIcon("editUndo.png"), |
472 UI.PixmapCache.getIcon("editUndo.png"), |
473 self.trUtf8('&Undo'), |
473 self.tr('&Undo'), |
474 QKeySequence(self.trUtf8("Ctrl+Z", "Edit|Undo")), |
474 QKeySequence(self.tr("Ctrl+Z", "Edit|Undo")), |
475 QKeySequence(self.trUtf8("Alt+Backspace", "Edit|Undo")), |
475 QKeySequence(self.tr("Alt+Backspace", "Edit|Undo")), |
476 self, 'vm_edit_undo') |
476 self, 'vm_edit_undo') |
477 self.undoAct.setStatusTip(self.trUtf8('Undo the last change')) |
477 self.undoAct.setStatusTip(self.tr('Undo the last change')) |
478 self.undoAct.setWhatsThis(self.trUtf8( |
478 self.undoAct.setWhatsThis(self.tr( |
479 """<b>Undo</b>""" |
479 """<b>Undo</b>""" |
480 """<p>Undo the last change done in the current editor.</p>""" |
480 """<p>Undo the last change done in the current editor.</p>""" |
481 )) |
481 )) |
482 self.undoAct.triggered[()].connect(self.__undo) |
482 self.undoAct.triggered[()].connect(self.__undo) |
483 self.editActions.append(self.undoAct) |
483 self.editActions.append(self.undoAct) |
484 |
484 |
485 self.redoAct = E5Action( |
485 self.redoAct = E5Action( |
486 self.trUtf8('Redo'), |
486 self.tr('Redo'), |
487 UI.PixmapCache.getIcon("editRedo.png"), |
487 UI.PixmapCache.getIcon("editRedo.png"), |
488 self.trUtf8('&Redo'), |
488 self.tr('&Redo'), |
489 QKeySequence(self.trUtf8("Ctrl+Shift+Z", "Edit|Redo")), |
489 QKeySequence(self.tr("Ctrl+Shift+Z", "Edit|Redo")), |
490 0, self, 'vm_edit_redo') |
490 0, self, 'vm_edit_redo') |
491 self.redoAct.setStatusTip(self.trUtf8('Redo the last change')) |
491 self.redoAct.setStatusTip(self.tr('Redo the last change')) |
492 self.redoAct.setWhatsThis(self.trUtf8( |
492 self.redoAct.setWhatsThis(self.tr( |
493 """<b>Redo</b>""" |
493 """<b>Redo</b>""" |
494 """<p>Redo the last change done in the current editor.</p>""" |
494 """<p>Redo the last change done in the current editor.</p>""" |
495 )) |
495 )) |
496 self.redoAct.triggered[()].connect(self.__redo) |
496 self.redoAct.triggered[()].connect(self.__redo) |
497 self.editActions.append(self.redoAct) |
497 self.editActions.append(self.redoAct) |
498 |
498 |
499 self.cutAct = E5Action( |
499 self.cutAct = E5Action( |
500 self.trUtf8('Cut'), |
500 self.tr('Cut'), |
501 UI.PixmapCache.getIcon("editCut.png"), |
501 UI.PixmapCache.getIcon("editCut.png"), |
502 self.trUtf8('Cu&t'), |
502 self.tr('Cu&t'), |
503 QKeySequence(self.trUtf8("Ctrl+X", "Edit|Cut")), |
503 QKeySequence(self.tr("Ctrl+X", "Edit|Cut")), |
504 QKeySequence(self.trUtf8("Shift+Del", "Edit|Cut")), |
504 QKeySequence(self.tr("Shift+Del", "Edit|Cut")), |
505 self, 'vm_edit_cut') |
505 self, 'vm_edit_cut') |
506 self.cutAct.setStatusTip(self.trUtf8('Cut the selection')) |
506 self.cutAct.setStatusTip(self.tr('Cut the selection')) |
507 self.cutAct.setWhatsThis(self.trUtf8( |
507 self.cutAct.setWhatsThis(self.tr( |
508 """<b>Cut</b>""" |
508 """<b>Cut</b>""" |
509 """<p>Cut the selected text of the current editor to the""" |
509 """<p>Cut the selected text of the current editor to the""" |
510 """ clipboard.</p>""" |
510 """ clipboard.</p>""" |
511 )) |
511 )) |
512 self.cutAct.triggered[()].connect(self.__textEdit.cut) |
512 self.cutAct.triggered[()].connect(self.__textEdit.cut) |
513 self.editActions.append(self.cutAct) |
513 self.editActions.append(self.cutAct) |
514 |
514 |
515 self.copyAct = E5Action( |
515 self.copyAct = E5Action( |
516 self.trUtf8('Copy'), |
516 self.tr('Copy'), |
517 UI.PixmapCache.getIcon("editCopy.png"), |
517 UI.PixmapCache.getIcon("editCopy.png"), |
518 self.trUtf8('&Copy'), |
518 self.tr('&Copy'), |
519 QKeySequence(self.trUtf8("Ctrl+C", "Edit|Copy")), |
519 QKeySequence(self.tr("Ctrl+C", "Edit|Copy")), |
520 QKeySequence(self.trUtf8("Ctrl+Ins", "Edit|Copy")), |
520 QKeySequence(self.tr("Ctrl+Ins", "Edit|Copy")), |
521 self, 'vm_edit_copy') |
521 self, 'vm_edit_copy') |
522 self.copyAct.setStatusTip(self.trUtf8('Copy the selection')) |
522 self.copyAct.setStatusTip(self.tr('Copy the selection')) |
523 self.copyAct.setWhatsThis(self.trUtf8( |
523 self.copyAct.setWhatsThis(self.tr( |
524 """<b>Copy</b>""" |
524 """<b>Copy</b>""" |
525 """<p>Copy the selected text of the current editor to the""" |
525 """<p>Copy the selected text of the current editor to the""" |
526 """ clipboard.</p>""" |
526 """ clipboard.</p>""" |
527 )) |
527 )) |
528 self.copyAct.triggered[()].connect(self.__textEdit.copy) |
528 self.copyAct.triggered[()].connect(self.__textEdit.copy) |
529 self.editActions.append(self.copyAct) |
529 self.editActions.append(self.copyAct) |
530 |
530 |
531 self.pasteAct = E5Action( |
531 self.pasteAct = E5Action( |
532 self.trUtf8('Paste'), |
532 self.tr('Paste'), |
533 UI.PixmapCache.getIcon("editPaste.png"), |
533 UI.PixmapCache.getIcon("editPaste.png"), |
534 self.trUtf8('&Paste'), |
534 self.tr('&Paste'), |
535 QKeySequence(self.trUtf8("Ctrl+V", "Edit|Paste")), |
535 QKeySequence(self.tr("Ctrl+V", "Edit|Paste")), |
536 QKeySequence(self.trUtf8("Shift+Ins", "Edit|Paste")), |
536 QKeySequence(self.tr("Shift+Ins", "Edit|Paste")), |
537 self, 'vm_edit_paste') |
537 self, 'vm_edit_paste') |
538 self.pasteAct.setStatusTip(self.trUtf8( |
538 self.pasteAct.setStatusTip(self.tr( |
539 'Paste the last cut/copied text')) |
539 'Paste the last cut/copied text')) |
540 self.pasteAct.setWhatsThis(self.trUtf8( |
540 self.pasteAct.setWhatsThis(self.tr( |
541 """<b>Paste</b>""" |
541 """<b>Paste</b>""" |
542 """<p>Paste the last cut/copied text from the clipboard to""" |
542 """<p>Paste the last cut/copied text from the clipboard to""" |
543 """ the current editor.</p>""" |
543 """ the current editor.</p>""" |
544 )) |
544 )) |
545 self.pasteAct.triggered[()].connect(self.__textEdit.paste) |
545 self.pasteAct.triggered[()].connect(self.__textEdit.paste) |
546 self.editActions.append(self.pasteAct) |
546 self.editActions.append(self.pasteAct) |
547 |
547 |
548 self.deleteAct = E5Action( |
548 self.deleteAct = E5Action( |
549 self.trUtf8('Clear'), |
549 self.tr('Clear'), |
550 UI.PixmapCache.getIcon("editDelete.png"), |
550 UI.PixmapCache.getIcon("editDelete.png"), |
551 self.trUtf8('Cl&ear'), |
551 self.tr('Cl&ear'), |
552 QKeySequence(self.trUtf8("Alt+Shift+C", "Edit|Clear")), |
552 QKeySequence(self.tr("Alt+Shift+C", "Edit|Clear")), |
553 0, |
553 0, |
554 self, 'vm_edit_clear') |
554 self, 'vm_edit_clear') |
555 self.deleteAct.setStatusTip(self.trUtf8('Clear all text')) |
555 self.deleteAct.setStatusTip(self.tr('Clear all text')) |
556 self.deleteAct.setWhatsThis(self.trUtf8( |
556 self.deleteAct.setWhatsThis(self.tr( |
557 """<b>Clear</b>""" |
557 """<b>Clear</b>""" |
558 """<p>Delete all text of the current editor.</p>""" |
558 """<p>Delete all text of the current editor.</p>""" |
559 )) |
559 )) |
560 self.deleteAct.triggered[()].connect(self.__textEdit.clear) |
560 self.deleteAct.triggered[()].connect(self.__textEdit.clear) |
561 self.editActions.append(self.deleteAct) |
561 self.editActions.append(self.deleteAct) |
1955 def __createHelpActions(self): |
1955 def __createHelpActions(self): |
1956 """ |
1956 """ |
1957 Private method to create the Help actions. |
1957 Private method to create the Help actions. |
1958 """ |
1958 """ |
1959 self.aboutAct = E5Action( |
1959 self.aboutAct = E5Action( |
1960 self.trUtf8('About'), |
1960 self.tr('About'), |
1961 self.trUtf8('&About'), |
1961 self.tr('&About'), |
1962 0, 0, self, 'about_eric') |
1962 0, 0, self, 'about_eric') |
1963 self.aboutAct.setStatusTip(self.trUtf8( |
1963 self.aboutAct.setStatusTip(self.tr( |
1964 'Display information about this software')) |
1964 'Display information about this software')) |
1965 self.aboutAct.setWhatsThis(self.trUtf8( |
1965 self.aboutAct.setWhatsThis(self.tr( |
1966 """<b>About</b>""" |
1966 """<b>About</b>""" |
1967 """<p>Display some information about this software.</p>""")) |
1967 """<p>Display some information about this software.</p>""")) |
1968 self.aboutAct.triggered[()].connect(self.__about) |
1968 self.aboutAct.triggered[()].connect(self.__about) |
1969 self.helpActions.append(self.aboutAct) |
1969 self.helpActions.append(self.aboutAct) |
1970 |
1970 |
1971 self.aboutQtAct = E5Action( |
1971 self.aboutQtAct = E5Action( |
1972 self.trUtf8('About Qt'), |
1972 self.tr('About Qt'), |
1973 self.trUtf8('About &Qt'), |
1973 self.tr('About &Qt'), |
1974 0, 0, self, 'about_qt') |
1974 0, 0, self, 'about_qt') |
1975 self.aboutQtAct.setStatusTip( |
1975 self.aboutQtAct.setStatusTip( |
1976 self.trUtf8('Display information about the Qt toolkit')) |
1976 self.tr('Display information about the Qt toolkit')) |
1977 self.aboutQtAct.setWhatsThis(self.trUtf8( |
1977 self.aboutQtAct.setWhatsThis(self.tr( |
1978 """<b>About Qt</b>""" |
1978 """<b>About Qt</b>""" |
1979 """<p>Display some information about the Qt toolkit.</p>""" |
1979 """<p>Display some information about the Qt toolkit.</p>""" |
1980 )) |
1980 )) |
1981 self.aboutQtAct.triggered[()].connect(self.__aboutQt) |
1981 self.aboutQtAct.triggered[()].connect(self.__aboutQt) |
1982 self.helpActions.append(self.aboutQtAct) |
1982 self.helpActions.append(self.aboutQtAct) |
1983 |
1983 |
1984 self.whatsThisAct = E5Action( |
1984 self.whatsThisAct = E5Action( |
1985 self.trUtf8('What\'s This?'), |
1985 self.tr('What\'s This?'), |
1986 UI.PixmapCache.getIcon("whatsThis.png"), |
1986 UI.PixmapCache.getIcon("whatsThis.png"), |
1987 self.trUtf8('&What\'s This?'), |
1987 self.tr('&What\'s This?'), |
1988 QKeySequence(self.trUtf8("Shift+F1", "Help|What's This?'")), |
1988 QKeySequence(self.tr("Shift+F1", "Help|What's This?'")), |
1989 0, self, 'help_help_whats_this') |
1989 0, self, 'help_help_whats_this') |
1990 self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help')) |
1990 self.whatsThisAct.setStatusTip(self.tr('Context sensitive help')) |
1991 self.whatsThisAct.setWhatsThis(self.trUtf8( |
1991 self.whatsThisAct.setWhatsThis(self.tr( |
1992 """<b>Display context sensitive help</b>""" |
1992 """<b>Display context sensitive help</b>""" |
1993 """<p>In What's This? mode, the mouse cursor shows an arrow""" |
1993 """<p>In What's This? mode, the mouse cursor shows an arrow""" |
1994 """ with a question mark, and you can click on the interface""" |
1994 """ with a question mark, and you can click on the interface""" |
1995 """ elements to get a short description of what they do and""" |
1995 """ elements to get a short description of what they do and""" |
1996 """ how to use them. In dialogs, this feature can be""" |
1996 """ how to use them. In dialogs, this feature can be""" |
2054 filetb.addAction(self.printPreviewAct) |
2054 filetb.addAction(self.printPreviewAct) |
2055 filetb.addAction(self.printAct) |
2055 filetb.addAction(self.printAct) |
2056 filetb.addSeparator() |
2056 filetb.addSeparator() |
2057 filetb.addAction(self.closeAct) |
2057 filetb.addAction(self.closeAct) |
2058 |
2058 |
2059 edittb = self.addToolBar(self.trUtf8("Edit")) |
2059 edittb = self.addToolBar(self.tr("Edit")) |
2060 edittb.setIconSize(UI.Config.ToolBarIconSize) |
2060 edittb.setIconSize(UI.Config.ToolBarIconSize) |
2061 edittb.addAction(self.undoAct) |
2061 edittb.addAction(self.undoAct) |
2062 edittb.addAction(self.redoAct) |
2062 edittb.addAction(self.redoAct) |
2063 edittb.addSeparator() |
2063 edittb.addSeparator() |
2064 edittb.addAction(self.cutAct) |
2064 edittb.addAction(self.cutAct) |
2065 edittb.addAction(self.copyAct) |
2065 edittb.addAction(self.copyAct) |
2066 edittb.addAction(self.pasteAct) |
2066 edittb.addAction(self.pasteAct) |
2067 edittb.addAction(self.deleteAct) |
2067 edittb.addAction(self.deleteAct) |
2068 |
2068 |
2069 findtb = self.addToolBar(self.trUtf8("Find")) |
2069 findtb = self.addToolBar(self.tr("Find")) |
2070 findtb.setIconSize(UI.Config.ToolBarIconSize) |
2070 findtb.setIconSize(UI.Config.ToolBarIconSize) |
2071 findtb.addAction(self.searchAct) |
2071 findtb.addAction(self.searchAct) |
2072 findtb.addAction(self.searchNextAct) |
2072 findtb.addAction(self.searchNextAct) |
2073 findtb.addAction(self.searchPrevAct) |
2073 findtb.addAction(self.searchPrevAct) |
2074 findtb.addAction(self.searchClearMarkersAct) |
2074 findtb.addAction(self.searchClearMarkersAct) |
2075 |
2075 |
2076 helptb = self.addToolBar(self.trUtf8("Help")) |
2076 helptb = self.addToolBar(self.tr("Help")) |
2077 helptb.setIconSize(UI.Config.ToolBarIconSize) |
2077 helptb.setIconSize(UI.Config.ToolBarIconSize) |
2078 helptb.addAction(self.whatsThisAct) |
2078 helptb.addAction(self.whatsThisAct) |
2079 |
2079 |
2080 def __createStatusBar(self): |
2080 def __createStatusBar(self): |
2081 """ |
2081 """ |
2084 self.__statusBar = self.statusBar() |
2084 self.__statusBar = self.statusBar() |
2085 self.__statusBar.setSizeGripEnabled(True) |
2085 self.__statusBar.setSizeGripEnabled(True) |
2086 |
2086 |
2087 self.sbWritable = QLabel(self.__statusBar) |
2087 self.sbWritable = QLabel(self.__statusBar) |
2088 self.__statusBar.addPermanentWidget(self.sbWritable) |
2088 self.__statusBar.addPermanentWidget(self.sbWritable) |
2089 self.sbWritable.setWhatsThis(self.trUtf8( |
2089 self.sbWritable.setWhatsThis(self.tr( |
2090 """<p>This part of the status bar displays an indication of the""" |
2090 """<p>This part of the status bar displays an indication of the""" |
2091 """ editors files writability.</p>""" |
2091 """ editors files writability.</p>""" |
2092 )) |
2092 )) |
2093 |
2093 |
2094 self.sbLine = QLabel(self.__statusBar) |
2094 self.sbLine = QLabel(self.__statusBar) |
2095 self.__statusBar.addPermanentWidget(self.sbLine) |
2095 self.__statusBar.addPermanentWidget(self.sbLine) |
2096 self.sbLine.setWhatsThis(self.trUtf8( |
2096 self.sbLine.setWhatsThis(self.tr( |
2097 """<p>This part of the status bar displays the line number of""" |
2097 """<p>This part of the status bar displays the line number of""" |
2098 """ the editor.</p>""" |
2098 """ the editor.</p>""" |
2099 )) |
2099 )) |
2100 |
2100 |
2101 self.sbPos = QLabel(self.__statusBar) |
2101 self.sbPos = QLabel(self.__statusBar) |
2102 self.__statusBar.addPermanentWidget(self.sbPos) |
2102 self.__statusBar.addPermanentWidget(self.sbPos) |
2103 self.sbPos.setWhatsThis(self.trUtf8( |
2103 self.sbPos.setWhatsThis(self.tr( |
2104 """<p>This part of the status bar displays the cursor position""" |
2104 """<p>This part of the status bar displays the cursor position""" |
2105 """ of the editor.</p>""" |
2105 """ of the editor.</p>""" |
2106 )) |
2106 )) |
2107 |
2107 |
2108 self.__statusBar.showMessage(self.trUtf8("Ready")) |
2108 self.__statusBar.showMessage(self.tr("Ready")) |
2109 |
2109 |
2110 def __readSettings(self): |
2110 def __readSettings(self): |
2111 """ |
2111 """ |
2112 Private method to read the settings remembered last time. |
2112 Private method to read the settings remembered last time. |
2113 """ |
2113 """ |