3343:f7a6d271bb40 | 3345:071afe8be2a1 |
---|---|
440 self.newTabAct.setWhatsThis(self.tr( | 440 self.newTabAct.setWhatsThis(self.tr( |
441 """<b>New Tab</b>""" | 441 """<b>New Tab</b>""" |
442 """<p>This opens a new help window tab.</p>""" | 442 """<p>This opens a new help window tab.</p>""" |
443 )) | 443 )) |
444 if not self.initShortcutsOnly: | 444 if not self.initShortcutsOnly: |
445 self.newTabAct.triggered[()].connect(self.newTab) | 445 self.newTabAct.triggered.connect(self.newTab) |
446 self.__actions.append(self.newTabAct) | 446 self.__actions.append(self.newTabAct) |
447 | 447 |
448 self.newAct = E5Action( | 448 self.newAct = E5Action( |
449 self.tr('New Window'), | 449 self.tr('New Window'), |
450 UI.PixmapCache.getIcon("newWindow.png"), | 450 UI.PixmapCache.getIcon("newWindow.png"), |
455 self.newAct.setWhatsThis(self.tr( | 455 self.newAct.setWhatsThis(self.tr( |
456 """<b>New Window</b>""" | 456 """<b>New Window</b>""" |
457 """<p>This opens a new help browser window.</p>""" | 457 """<p>This opens a new help browser window.</p>""" |
458 )) | 458 )) |
459 if not self.initShortcutsOnly: | 459 if not self.initShortcutsOnly: |
460 self.newAct.triggered[()].connect(self.newWindow) | 460 self.newAct.triggered.connect(self.newWindow) |
461 self.__actions.append(self.newAct) | 461 self.__actions.append(self.newAct) |
462 | 462 |
463 self.openAct = E5Action( | 463 self.openAct = E5Action( |
464 self.tr('Open File'), | 464 self.tr('Open File'), |
465 UI.PixmapCache.getIcon("open.png"), | 465 UI.PixmapCache.getIcon("open.png"), |
471 """<b>Open File</b>""" | 471 """<b>Open File</b>""" |
472 """<p>This opens a new help file for display.""" | 472 """<p>This opens a new help file for display.""" |
473 """ It pops up a file selection dialog.</p>""" | 473 """ It pops up a file selection dialog.</p>""" |
474 )) | 474 )) |
475 if not self.initShortcutsOnly: | 475 if not self.initShortcutsOnly: |
476 self.openAct.triggered[()].connect(self.__openFile) | 476 self.openAct.triggered.connect(self.__openFile) |
477 self.__actions.append(self.openAct) | 477 self.__actions.append(self.openAct) |
478 | 478 |
479 self.openTabAct = E5Action( | 479 self.openTabAct = E5Action( |
480 self.tr('Open File in New Tab'), | 480 self.tr('Open File in New Tab'), |
481 UI.PixmapCache.getIcon("openNewTab.png"), | 481 UI.PixmapCache.getIcon("openNewTab.png"), |
488 """<b>Open File in New Tab</b>""" | 488 """<b>Open File in New Tab</b>""" |
489 """<p>This opens a new help file for display in a new tab.""" | 489 """<p>This opens a new help file for display in a new tab.""" |
490 """ It pops up a file selection dialog.</p>""" | 490 """ It pops up a file selection dialog.</p>""" |
491 )) | 491 )) |
492 if not self.initShortcutsOnly: | 492 if not self.initShortcutsOnly: |
493 self.openTabAct.triggered[()].connect(self.__openFileNewTab) | 493 self.openTabAct.triggered.connect(self.__openFileNewTab) |
494 self.__actions.append(self.openTabAct) | 494 self.__actions.append(self.openTabAct) |
495 | 495 |
496 self.saveAsAct = E5Action( | 496 self.saveAsAct = E5Action( |
497 self.tr('Save As'), | 497 self.tr('Save As'), |
498 UI.PixmapCache.getIcon("fileSaveAs.png"), | 498 UI.PixmapCache.getIcon("fileSaveAs.png"), |
504 self.saveAsAct.setWhatsThis(self.tr( | 504 self.saveAsAct.setWhatsThis(self.tr( |
505 """<b>Save As...</b>""" | 505 """<b>Save As...</b>""" |
506 """<p>Saves the current page to disk.</p>""" | 506 """<p>Saves the current page to disk.</p>""" |
507 )) | 507 )) |
508 if not self.initShortcutsOnly: | 508 if not self.initShortcutsOnly: |
509 self.saveAsAct.triggered[()].connect(self.__savePageAs) | 509 self.saveAsAct.triggered.connect(self.__savePageAs) |
510 self.__actions.append(self.saveAsAct) | 510 self.__actions.append(self.saveAsAct) |
511 | 511 |
512 self.savePageScreenAct = E5Action( | 512 self.savePageScreenAct = E5Action( |
513 self.tr('Save Page Screen'), | 513 self.tr('Save Page Screen'), |
514 UI.PixmapCache.getIcon("fileSavePixmap.png"), | 514 UI.PixmapCache.getIcon("fileSavePixmap.png"), |
519 self.savePageScreenAct.setWhatsThis(self.tr( | 519 self.savePageScreenAct.setWhatsThis(self.tr( |
520 """<b>Save Page Screen...</b>""" | 520 """<b>Save Page Screen...</b>""" |
521 """<p>Saves the current page as a screen shot.</p>""" | 521 """<p>Saves the current page as a screen shot.</p>""" |
522 )) | 522 )) |
523 if not self.initShortcutsOnly: | 523 if not self.initShortcutsOnly: |
524 self.savePageScreenAct.triggered[()].connect(self.__savePageScreen) | 524 self.savePageScreenAct.triggered.connect(self.__savePageScreen) |
525 self.__actions.append(self.savePageScreenAct) | 525 self.__actions.append(self.savePageScreenAct) |
526 | 526 |
527 self.saveVisiblePageScreenAct = E5Action( | 527 self.saveVisiblePageScreenAct = E5Action( |
528 self.tr('Save Visible Page Screen'), | 528 self.tr('Save Visible Page Screen'), |
529 UI.PixmapCache.getIcon("fileSaveVisiblePixmap.png"), | 529 UI.PixmapCache.getIcon("fileSaveVisiblePixmap.png"), |
536 """<b>Save Visible Page Screen...</b>""" | 536 """<b>Save Visible Page Screen...</b>""" |
537 """<p>Saves the visible part of the current page as a""" | 537 """<p>Saves the visible part of the current page as a""" |
538 """ screen shot.</p>""" | 538 """ screen shot.</p>""" |
539 )) | 539 )) |
540 if not self.initShortcutsOnly: | 540 if not self.initShortcutsOnly: |
541 self.saveVisiblePageScreenAct.triggered[()].connect( | 541 self.saveVisiblePageScreenAct.triggered.connect( |
542 self.__saveVisiblePageScreen) | 542 self.__saveVisiblePageScreen) |
543 self.__actions.append(self.saveVisiblePageScreenAct) | 543 self.__actions.append(self.saveVisiblePageScreenAct) |
544 | 544 |
545 bookmarksManager = self.bookmarksManager() | 545 bookmarksManager = self.bookmarksManager() |
546 self.importBookmarksAct = E5Action( | 546 self.importBookmarksAct = E5Action( |
552 self.importBookmarksAct.setWhatsThis(self.tr( | 552 self.importBookmarksAct.setWhatsThis(self.tr( |
553 """<b>Import Bookmarks</b>""" | 553 """<b>Import Bookmarks</b>""" |
554 """<p>Import bookmarks from other browsers.</p>""" | 554 """<p>Import bookmarks from other browsers.</p>""" |
555 )) | 555 )) |
556 if not self.initShortcutsOnly: | 556 if not self.initShortcutsOnly: |
557 self.importBookmarksAct.triggered[()].connect( | 557 self.importBookmarksAct.triggered.connect( |
558 bookmarksManager.importBookmarks) | 558 bookmarksManager.importBookmarks) |
559 self.__actions.append(self.importBookmarksAct) | 559 self.__actions.append(self.importBookmarksAct) |
560 | 560 |
561 self.exportBookmarksAct = E5Action( | 561 self.exportBookmarksAct = E5Action( |
562 self.tr('Export Bookmarks'), | 562 self.tr('Export Bookmarks'), |
567 self.exportBookmarksAct.setWhatsThis(self.tr( | 567 self.exportBookmarksAct.setWhatsThis(self.tr( |
568 """<b>Export Bookmarks</b>""" | 568 """<b>Export Bookmarks</b>""" |
569 """<p>Export the bookmarks into a file.</p>""" | 569 """<p>Export the bookmarks into a file.</p>""" |
570 )) | 570 )) |
571 if not self.initShortcutsOnly: | 571 if not self.initShortcutsOnly: |
572 self.exportBookmarksAct.triggered[()].connect( | 572 self.exportBookmarksAct.triggered.connect( |
573 bookmarksManager.exportBookmarks) | 573 bookmarksManager.exportBookmarks) |
574 self.__actions.append(self.exportBookmarksAct) | 574 self.__actions.append(self.exportBookmarksAct) |
575 | 575 |
576 self.printAct = E5Action( | 576 self.printAct = E5Action( |
577 self.tr('Print'), | 577 self.tr('Print'), |
583 self.printAct.setWhatsThis(self.tr( | 583 self.printAct.setWhatsThis(self.tr( |
584 """<b>Print</b>""" | 584 """<b>Print</b>""" |
585 """<p>Print the displayed help text.</p>""" | 585 """<p>Print the displayed help text.</p>""" |
586 )) | 586 )) |
587 if not self.initShortcutsOnly: | 587 if not self.initShortcutsOnly: |
588 self.printAct.triggered[()].connect(self.tabWidget.printBrowser) | 588 self.printAct.triggered.connect(self.tabWidget.printBrowser) |
589 self.__actions.append(self.printAct) | 589 self.__actions.append(self.printAct) |
590 | 590 |
591 self.printPdfAct = E5Action( | 591 self.printPdfAct = E5Action( |
592 self.tr('Print as PDF'), | 592 self.tr('Print as PDF'), |
593 UI.PixmapCache.getIcon("printPdf.png"), | 593 UI.PixmapCache.getIcon("printPdf.png"), |
598 self.printPdfAct.setWhatsThis(self.tr( | 598 self.printPdfAct.setWhatsThis(self.tr( |
599 """<b>Print as PDF</b>""" | 599 """<b>Print as PDF</b>""" |
600 """<p>Print the displayed help text as a PDF file.</p>""" | 600 """<p>Print the displayed help text as a PDF file.</p>""" |
601 )) | 601 )) |
602 if not self.initShortcutsOnly: | 602 if not self.initShortcutsOnly: |
603 self.printPdfAct.triggered[()].connect( | 603 self.printPdfAct.triggered.connect( |
604 self.tabWidget.printBrowserPdf) | 604 self.tabWidget.printBrowserPdf) |
605 self.__actions.append(self.printPdfAct) | 605 self.__actions.append(self.printPdfAct) |
606 | 606 |
607 self.printPreviewAct = E5Action( | 607 self.printPreviewAct = E5Action( |
608 self.tr('Print Preview'), | 608 self.tr('Print Preview'), |
614 self.printPreviewAct.setWhatsThis(self.tr( | 614 self.printPreviewAct.setWhatsThis(self.tr( |
615 """<b>Print Preview</b>""" | 615 """<b>Print Preview</b>""" |
616 """<p>Print preview of the displayed help text.</p>""" | 616 """<p>Print preview of the displayed help text.</p>""" |
617 )) | 617 )) |
618 if not self.initShortcutsOnly: | 618 if not self.initShortcutsOnly: |
619 self.printPreviewAct.triggered[()].connect( | 619 self.printPreviewAct.triggered.connect( |
620 self.tabWidget.printPreviewBrowser) | 620 self.tabWidget.printPreviewBrowser) |
621 self.__actions.append(self.printPreviewAct) | 621 self.__actions.append(self.printPreviewAct) |
622 | 622 |
623 self.closeAct = E5Action( | 623 self.closeAct = E5Action( |
624 self.tr('Close'), | 624 self.tr('Close'), |
631 self.closeAct.setWhatsThis(self.tr( | 631 self.closeAct.setWhatsThis(self.tr( |
632 """<b>Close</b>""" | 632 """<b>Close</b>""" |
633 """<p>Closes the current help window.</p>""" | 633 """<p>Closes the current help window.</p>""" |
634 )) | 634 )) |
635 if not self.initShortcutsOnly: | 635 if not self.initShortcutsOnly: |
636 self.closeAct.triggered[()].connect(self.tabWidget.closeBrowser) | 636 self.closeAct.triggered.connect(self.tabWidget.closeBrowser) |
637 self.__actions.append(self.closeAct) | 637 self.__actions.append(self.closeAct) |
638 | 638 |
639 self.closeAllAct = E5Action( | 639 self.closeAllAct = E5Action( |
640 self.tr('Close All'), | 640 self.tr('Close All'), |
641 self.tr('Close &All'), | 641 self.tr('Close &All'), |
644 self.closeAllAct.setWhatsThis(self.tr( | 644 self.closeAllAct.setWhatsThis(self.tr( |
645 """<b>Close All</b>""" | 645 """<b>Close All</b>""" |
646 """<p>Closes all help windows except the first one.</p>""" | 646 """<p>Closes all help windows except the first one.</p>""" |
647 )) | 647 )) |
648 if not self.initShortcutsOnly: | 648 if not self.initShortcutsOnly: |
649 self.closeAllAct.triggered[()].connect( | 649 self.closeAllAct.triggered.connect( |
650 self.tabWidget.closeAllBrowsers) | 650 self.tabWidget.closeAllBrowsers) |
651 self.__actions.append(self.closeAllAct) | 651 self.__actions.append(self.closeAllAct) |
652 | 652 |
653 self.privateBrowsingAct = E5Action( | 653 self.privateBrowsingAct = E5Action( |
654 self.tr('Private Browsing'), | 654 self.tr('Private Browsing'), |
660 """<b>Private Browsing</b>""" | 660 """<b>Private Browsing</b>""" |
661 """<p>Enables private browsing. In this mode no history is""" | 661 """<p>Enables private browsing. In this mode no history is""" |
662 """ recorded anymore.</p>""" | 662 """ recorded anymore.</p>""" |
663 )) | 663 )) |
664 if not self.initShortcutsOnly: | 664 if not self.initShortcutsOnly: |
665 self.privateBrowsingAct.triggered[()].connect( | 665 self.privateBrowsingAct.triggered.connect( |
666 self.__privateBrowsing) | 666 self.__privateBrowsing) |
667 self.privateBrowsingAct.setCheckable(True) | 667 self.privateBrowsingAct.setCheckable(True) |
668 self.__actions.append(self.privateBrowsingAct) | 668 self.__actions.append(self.privateBrowsingAct) |
669 | 669 |
670 self.exitAct = E5Action( | 670 self.exitAct = E5Action( |
678 """<b>Quit</b>""" | 678 """<b>Quit</b>""" |
679 """<p>Quit the eric5 Web Browser.</p>""" | 679 """<p>Quit the eric5 Web Browser.</p>""" |
680 )) | 680 )) |
681 if not self.initShortcutsOnly: | 681 if not self.initShortcutsOnly: |
682 if self.fromEric: | 682 if self.fromEric: |
683 self.exitAct.triggered[()].connect(self.close) | 683 self.exitAct.triggered.connect(self.close) |
684 else: | 684 else: |
685 self.exitAct.triggered[()].connect(self.__closeAllWindows) | 685 self.exitAct.triggered.connect(self.__closeAllWindows) |
686 self.__actions.append(self.exitAct) | 686 self.__actions.append(self.exitAct) |
687 | 687 |
688 self.backAct = E5Action( | 688 self.backAct = E5Action( |
689 self.tr('Backward'), | 689 self.tr('Backward'), |
690 UI.PixmapCache.getIcon("back.png"), | 690 UI.PixmapCache.getIcon("back.png"), |
697 """<b>Backward</b>""" | 697 """<b>Backward</b>""" |
698 """<p>Moves one help screen backward. If none is""" | 698 """<p>Moves one help screen backward. If none is""" |
699 """ available, this action is disabled.</p>""" | 699 """ available, this action is disabled.</p>""" |
700 )) | 700 )) |
701 if not self.initShortcutsOnly: | 701 if not self.initShortcutsOnly: |
702 self.backAct.triggered[()].connect(self.__backward) | 702 self.backAct.triggered.connect(self.__backward) |
703 self.__actions.append(self.backAct) | 703 self.__actions.append(self.backAct) |
704 | 704 |
705 self.forwardAct = E5Action( | 705 self.forwardAct = E5Action( |
706 self.tr('Forward'), | 706 self.tr('Forward'), |
707 UI.PixmapCache.getIcon("forward.png"), | 707 UI.PixmapCache.getIcon("forward.png"), |
715 """<b>Forward</b>""" | 715 """<b>Forward</b>""" |
716 """<p>Moves one help screen forward. If none is""" | 716 """<p>Moves one help screen forward. If none is""" |
717 """ available, this action is disabled.</p>""" | 717 """ available, this action is disabled.</p>""" |
718 )) | 718 )) |
719 if not self.initShortcutsOnly: | 719 if not self.initShortcutsOnly: |
720 self.forwardAct.triggered[()].connect(self.__forward) | 720 self.forwardAct.triggered.connect(self.__forward) |
721 self.__actions.append(self.forwardAct) | 721 self.__actions.append(self.forwardAct) |
722 | 722 |
723 self.homeAct = E5Action( | 723 self.homeAct = E5Action( |
724 self.tr('Home'), | 724 self.tr('Home'), |
725 UI.PixmapCache.getIcon("home.png"), | 725 UI.PixmapCache.getIcon("home.png"), |
731 self.homeAct.setWhatsThis(self.tr( | 731 self.homeAct.setWhatsThis(self.tr( |
732 """<b>Home</b>""" | 732 """<b>Home</b>""" |
733 """<p>Moves to the initial help screen.</p>""" | 733 """<p>Moves to the initial help screen.</p>""" |
734 )) | 734 )) |
735 if not self.initShortcutsOnly: | 735 if not self.initShortcutsOnly: |
736 self.homeAct.triggered[()].connect(self.__home) | 736 self.homeAct.triggered.connect(self.__home) |
737 self.__actions.append(self.homeAct) | 737 self.__actions.append(self.homeAct) |
738 | 738 |
739 self.reloadAct = E5Action( | 739 self.reloadAct = E5Action( |
740 self.tr('Reload'), | 740 self.tr('Reload'), |
741 UI.PixmapCache.getIcon("reload.png"), | 741 UI.PixmapCache.getIcon("reload.png"), |
748 self.reloadAct.setWhatsThis(self.tr( | 748 self.reloadAct.setWhatsThis(self.tr( |
749 """<b>Reload</b>""" | 749 """<b>Reload</b>""" |
750 """<p>Reloads the current help screen.</p>""" | 750 """<p>Reloads the current help screen.</p>""" |
751 )) | 751 )) |
752 if not self.initShortcutsOnly: | 752 if not self.initShortcutsOnly: |
753 self.reloadAct.triggered[()].connect(self.__reload) | 753 self.reloadAct.triggered.connect(self.__reload) |
754 self.__actions.append(self.reloadAct) | 754 self.__actions.append(self.reloadAct) |
755 | 755 |
756 self.stopAct = E5Action( | 756 self.stopAct = E5Action( |
757 self.tr('Stop'), | 757 self.tr('Stop'), |
758 UI.PixmapCache.getIcon("stopLoading.png"), | 758 UI.PixmapCache.getIcon("stopLoading.png"), |
764 self.stopAct.setWhatsThis(self.tr( | 764 self.stopAct.setWhatsThis(self.tr( |
765 """<b>Stop</b>""" | 765 """<b>Stop</b>""" |
766 """<p>Stops loading of the current tab.</p>""" | 766 """<p>Stops loading of the current tab.</p>""" |
767 )) | 767 )) |
768 if not self.initShortcutsOnly: | 768 if not self.initShortcutsOnly: |
769 self.stopAct.triggered[()].connect(self.__stopLoading) | 769 self.stopAct.triggered.connect(self.__stopLoading) |
770 self.__actions.append(self.stopAct) | 770 self.__actions.append(self.stopAct) |
771 | 771 |
772 self.copyAct = E5Action( | 772 self.copyAct = E5Action( |
773 self.tr('Copy'), | 773 self.tr('Copy'), |
774 UI.PixmapCache.getIcon("editCopy.png"), | 774 UI.PixmapCache.getIcon("editCopy.png"), |
779 self.copyAct.setWhatsThis(self.tr( | 779 self.copyAct.setWhatsThis(self.tr( |
780 """<b>Copy</b>""" | 780 """<b>Copy</b>""" |
781 """<p>Copy the selected text to the clipboard.</p>""" | 781 """<p>Copy the selected text to the clipboard.</p>""" |
782 )) | 782 )) |
783 if not self.initShortcutsOnly: | 783 if not self.initShortcutsOnly: |
784 self.copyAct.triggered[()].connect(self.__copy) | 784 self.copyAct.triggered.connect(self.__copy) |
785 self.__actions.append(self.copyAct) | 785 self.__actions.append(self.copyAct) |
786 | 786 |
787 self.findAct = E5Action( | 787 self.findAct = E5Action( |
788 self.tr('Find...'), | 788 self.tr('Find...'), |
789 UI.PixmapCache.getIcon("find.png"), | 789 UI.PixmapCache.getIcon("find.png"), |
794 self.findAct.setWhatsThis(self.tr( | 794 self.findAct.setWhatsThis(self.tr( |
795 """<b>Find</b>""" | 795 """<b>Find</b>""" |
796 """<p>Find text in the current page.</p>""" | 796 """<p>Find text in the current page.</p>""" |
797 )) | 797 )) |
798 if not self.initShortcutsOnly: | 798 if not self.initShortcutsOnly: |
799 self.findAct.triggered[()].connect(self.__find) | 799 self.findAct.triggered.connect(self.__find) |
800 self.__actions.append(self.findAct) | 800 self.__actions.append(self.findAct) |
801 | 801 |
802 self.findNextAct = E5Action( | 802 self.findNextAct = E5Action( |
803 self.tr('Find next'), | 803 self.tr('Find next'), |
804 UI.PixmapCache.getIcon("findNext.png"), | 804 UI.PixmapCache.getIcon("findNext.png"), |
810 self.findNextAct.setWhatsThis(self.tr( | 810 self.findNextAct.setWhatsThis(self.tr( |
811 """<b>Find next</b>""" | 811 """<b>Find next</b>""" |
812 """<p>Find the next occurrence of text in the current page.</p>""" | 812 """<p>Find the next occurrence of text in the current page.</p>""" |
813 )) | 813 )) |
814 if not self.initShortcutsOnly: | 814 if not self.initShortcutsOnly: |
815 self.findNextAct.triggered[()].connect(self.findDlg.findNext) | 815 self.findNextAct.triggered.connect(self.findDlg.findNext) |
816 self.__actions.append(self.findNextAct) | 816 self.__actions.append(self.findNextAct) |
817 | 817 |
818 self.findPrevAct = E5Action( | 818 self.findPrevAct = E5Action( |
819 self.tr('Find previous'), | 819 self.tr('Find previous'), |
820 UI.PixmapCache.getIcon("findPrev.png"), | 820 UI.PixmapCache.getIcon("findPrev.png"), |
827 """<b>Find previous</b>""" | 827 """<b>Find previous</b>""" |
828 """<p>Find the previous occurrence of text in the current""" | 828 """<p>Find the previous occurrence of text in the current""" |
829 """ page.</p>""" | 829 """ page.</p>""" |
830 )) | 830 )) |
831 if not self.initShortcutsOnly: | 831 if not self.initShortcutsOnly: |
832 self.findPrevAct.triggered[()].connect(self.findDlg.findPrevious) | 832 self.findPrevAct.triggered.connect(self.findDlg.findPrevious) |
833 self.__actions.append(self.findPrevAct) | 833 self.__actions.append(self.findPrevAct) |
834 | 834 |
835 self.bookmarksManageAct = E5Action( | 835 self.bookmarksManageAct = E5Action( |
836 self.tr('Manage Bookmarks'), | 836 self.tr('Manage Bookmarks'), |
837 self.tr('&Manage Bookmarks...'), | 837 self.tr('&Manage Bookmarks...'), |
842 self.bookmarksManageAct.setWhatsThis(self.tr( | 842 self.bookmarksManageAct.setWhatsThis(self.tr( |
843 """<b>Manage Bookmarks...</b>""" | 843 """<b>Manage Bookmarks...</b>""" |
844 """<p>Open a dialog to manage the bookmarks.</p>""" | 844 """<p>Open a dialog to manage the bookmarks.</p>""" |
845 )) | 845 )) |
846 if not self.initShortcutsOnly: | 846 if not self.initShortcutsOnly: |
847 self.bookmarksManageAct.triggered[()].connect( | 847 self.bookmarksManageAct.triggered.connect( |
848 self.__showBookmarksDialog) | 848 self.__showBookmarksDialog) |
849 self.__actions.append(self.bookmarksManageAct) | 849 self.__actions.append(self.bookmarksManageAct) |
850 | 850 |
851 self.bookmarksAddAct = E5Action( | 851 self.bookmarksAddAct = E5Action( |
852 self.tr('Add Bookmark'), | 852 self.tr('Add Bookmark'), |
860 self.bookmarksAddAct.setWhatsThis(self.tr( | 860 self.bookmarksAddAct.setWhatsThis(self.tr( |
861 """<b>Add Bookmark</b>""" | 861 """<b>Add Bookmark</b>""" |
862 """<p>Open a dialog to add the current URL as a bookmark.</p>""" | 862 """<p>Open a dialog to add the current URL as a bookmark.</p>""" |
863 )) | 863 )) |
864 if not self.initShortcutsOnly: | 864 if not self.initShortcutsOnly: |
865 self.bookmarksAddAct.triggered[()].connect(self.__addBookmark) | 865 self.bookmarksAddAct.triggered.connect(self.__addBookmark) |
866 self.__actions.append(self.bookmarksAddAct) | 866 self.__actions.append(self.bookmarksAddAct) |
867 | 867 |
868 self.bookmarksAddFolderAct = E5Action( | 868 self.bookmarksAddFolderAct = E5Action( |
869 self.tr('Add Folder'), | 869 self.tr('Add Folder'), |
870 self.tr('Add &Folder...'), | 870 self.tr('Add &Folder...'), |
874 self.bookmarksAddFolderAct.setWhatsThis(self.tr( | 874 self.bookmarksAddFolderAct.setWhatsThis(self.tr( |
875 """<b>Add Folder...</b>""" | 875 """<b>Add Folder...</b>""" |
876 """<p>Open a dialog to add a new bookmarks folder.</p>""" | 876 """<p>Open a dialog to add a new bookmarks folder.</p>""" |
877 )) | 877 )) |
878 if not self.initShortcutsOnly: | 878 if not self.initShortcutsOnly: |
879 self.bookmarksAddFolderAct.triggered[()].connect( | 879 self.bookmarksAddFolderAct.triggered.connect( |
880 self.__addBookmarkFolder) | 880 self.__addBookmarkFolder) |
881 self.__actions.append(self.bookmarksAddFolderAct) | 881 self.__actions.append(self.bookmarksAddFolderAct) |
882 | 882 |
883 self.bookmarksAllTabsAct = E5Action( | 883 self.bookmarksAllTabsAct = E5Action( |
884 self.tr('Bookmark All Tabs'), | 884 self.tr('Bookmark All Tabs'), |
890 """<b>Bookmark All Tabs...</b>""" | 890 """<b>Bookmark All Tabs...</b>""" |
891 """<p>Open a dialog to add a new bookmarks folder for""" | 891 """<p>Open a dialog to add a new bookmarks folder for""" |
892 """ all open tabs.</p>""" | 892 """ all open tabs.</p>""" |
893 )) | 893 )) |
894 if not self.initShortcutsOnly: | 894 if not self.initShortcutsOnly: |
895 self.bookmarksAllTabsAct.triggered[()].connect(self.bookmarkAll) | 895 self.bookmarksAllTabsAct.triggered.connect(self.bookmarkAll) |
896 self.__actions.append(self.bookmarksAllTabsAct) | 896 self.__actions.append(self.bookmarksAllTabsAct) |
897 | 897 |
898 self.whatsThisAct = E5Action( | 898 self.whatsThisAct = E5Action( |
899 self.tr('What\'s This?'), | 899 self.tr('What\'s This?'), |
900 UI.PixmapCache.getIcon("whatsThis.png"), | 900 UI.PixmapCache.getIcon("whatsThis.png"), |
909 """ elements to get a short description of what they do and how""" | 909 """ elements to get a short description of what they do and how""" |
910 """ to use them. In dialogs, this feature can be accessed using""" | 910 """ to use them. In dialogs, this feature can be accessed using""" |
911 """ the context help button in the titlebar.</p>""" | 911 """ the context help button in the titlebar.</p>""" |
912 )) | 912 )) |
913 if not self.initShortcutsOnly: | 913 if not self.initShortcutsOnly: |
914 self.whatsThisAct.triggered[()].connect(self.__whatsThis) | 914 self.whatsThisAct.triggered.connect(self.__whatsThis) |
915 self.__actions.append(self.whatsThisAct) | 915 self.__actions.append(self.whatsThisAct) |
916 | 916 |
917 self.aboutAct = E5Action( | 917 self.aboutAct = E5Action( |
918 self.tr('About'), | 918 self.tr('About'), |
919 self.tr('&About'), | 919 self.tr('&About'), |
923 self.aboutAct.setWhatsThis(self.tr( | 923 self.aboutAct.setWhatsThis(self.tr( |
924 """<b>About</b>""" | 924 """<b>About</b>""" |
925 """<p>Display some information about this software.</p>""" | 925 """<p>Display some information about this software.</p>""" |
926 )) | 926 )) |
927 if not self.initShortcutsOnly: | 927 if not self.initShortcutsOnly: |
928 self.aboutAct.triggered[()].connect(self.__about) | 928 self.aboutAct.triggered.connect(self.__about) |
929 self.__actions.append(self.aboutAct) | 929 self.__actions.append(self.aboutAct) |
930 | 930 |
931 self.aboutQtAct = E5Action( | 931 self.aboutQtAct = E5Action( |
932 self.tr('About Qt'), | 932 self.tr('About Qt'), |
933 self.tr('About &Qt'), | 933 self.tr('About &Qt'), |
937 self.aboutQtAct.setWhatsThis(self.tr( | 937 self.aboutQtAct.setWhatsThis(self.tr( |
938 """<b>About Qt</b>""" | 938 """<b>About Qt</b>""" |
939 """<p>Display some information about the Qt toolkit.</p>""" | 939 """<p>Display some information about the Qt toolkit.</p>""" |
940 )) | 940 )) |
941 if not self.initShortcutsOnly: | 941 if not self.initShortcutsOnly: |
942 self.aboutQtAct.triggered[()].connect(self.__aboutQt) | 942 self.aboutQtAct.triggered.connect(self.__aboutQt) |
943 self.__actions.append(self.aboutQtAct) | 943 self.__actions.append(self.aboutQtAct) |
944 | 944 |
945 self.zoomInAct = E5Action( | 945 self.zoomInAct = E5Action( |
946 self.tr('Zoom in'), | 946 self.tr('Zoom in'), |
947 UI.PixmapCache.getIcon("zoomIn.png"), | 947 UI.PixmapCache.getIcon("zoomIn.png"), |
953 self.zoomInAct.setWhatsThis(self.tr( | 953 self.zoomInAct.setWhatsThis(self.tr( |
954 """<b>Zoom in</b>""" | 954 """<b>Zoom in</b>""" |
955 """<p>Zoom in on the text. This makes the text bigger.</p>""" | 955 """<p>Zoom in on the text. This makes the text bigger.</p>""" |
956 )) | 956 )) |
957 if not self.initShortcutsOnly: | 957 if not self.initShortcutsOnly: |
958 self.zoomInAct.triggered[()].connect(self.__zoomIn) | 958 self.zoomInAct.triggered.connect(self.__zoomIn) |
959 self.__actions.append(self.zoomInAct) | 959 self.__actions.append(self.zoomInAct) |
960 | 960 |
961 self.zoomOutAct = E5Action( | 961 self.zoomOutAct = E5Action( |
962 self.tr('Zoom out'), | 962 self.tr('Zoom out'), |
963 UI.PixmapCache.getIcon("zoomOut.png"), | 963 UI.PixmapCache.getIcon("zoomOut.png"), |
969 self.zoomOutAct.setWhatsThis(self.tr( | 969 self.zoomOutAct.setWhatsThis(self.tr( |
970 """<b>Zoom out</b>""" | 970 """<b>Zoom out</b>""" |
971 """<p>Zoom out on the text. This makes the text smaller.</p>""" | 971 """<p>Zoom out on the text. This makes the text smaller.</p>""" |
972 )) | 972 )) |
973 if not self.initShortcutsOnly: | 973 if not self.initShortcutsOnly: |
974 self.zoomOutAct.triggered[()].connect(self.__zoomOut) | 974 self.zoomOutAct.triggered.connect(self.__zoomOut) |
975 self.__actions.append(self.zoomOutAct) | 975 self.__actions.append(self.zoomOutAct) |
976 | 976 |
977 self.zoomResetAct = E5Action( | 977 self.zoomResetAct = E5Action( |
978 self.tr('Zoom reset'), | 978 self.tr('Zoom reset'), |
979 UI.PixmapCache.getIcon("zoomReset.png"), | 979 UI.PixmapCache.getIcon("zoomReset.png"), |
986 """<b>Zoom reset</b>""" | 986 """<b>Zoom reset</b>""" |
987 """<p>Reset the zoom of the text. """ | 987 """<p>Reset the zoom of the text. """ |
988 """This sets the zoom factor to 100%.</p>""" | 988 """This sets the zoom factor to 100%.</p>""" |
989 )) | 989 )) |
990 if not self.initShortcutsOnly: | 990 if not self.initShortcutsOnly: |
991 self.zoomResetAct.triggered[()].connect(self.__zoomReset) | 991 self.zoomResetAct.triggered.connect(self.__zoomReset) |
992 self.__actions.append(self.zoomResetAct) | 992 self.__actions.append(self.zoomResetAct) |
993 | 993 |
994 if hasattr(QWebSettings, 'ZoomTextOnly'): | 994 if hasattr(QWebSettings, 'ZoomTextOnly'): |
995 self.zoomTextOnlyAct = E5Action( | 995 self.zoomTextOnlyAct = E5Action( |
996 self.tr('Zoom text only'), | 996 self.tr('Zoom text only'), |
1020 self.pageSourceAct.setWhatsThis(self.tr( | 1020 self.pageSourceAct.setWhatsThis(self.tr( |
1021 """<b>Show page source</b>""" | 1021 """<b>Show page source</b>""" |
1022 """<p>Show the page source in an editor.</p>""" | 1022 """<p>Show the page source in an editor.</p>""" |
1023 )) | 1023 )) |
1024 if not self.initShortcutsOnly: | 1024 if not self.initShortcutsOnly: |
1025 self.pageSourceAct.triggered[()].connect(self.__showPageSource) | 1025 self.pageSourceAct.triggered.connect(self.__showPageSource) |
1026 self.__actions.append(self.pageSourceAct) | 1026 self.__actions.append(self.pageSourceAct) |
1027 self.addAction(self.pageSourceAct) | 1027 self.addAction(self.pageSourceAct) |
1028 | 1028 |
1029 self.fullScreenAct = E5Action( | 1029 self.fullScreenAct = E5Action( |
1030 self.tr('Full Screen'), | 1030 self.tr('Full Screen'), |
1031 UI.PixmapCache.getIcon("windowFullscreen.png"), | 1031 UI.PixmapCache.getIcon("windowFullscreen.png"), |
1032 self.tr('&Full Screen'), | 1032 self.tr('&Full Screen'), |
1033 QKeySequence(self.tr('F11')), 0, | 1033 QKeySequence(self.tr('F11')), 0, |
1034 self, 'help_view_full_scree') | 1034 self, 'help_view_full_scree') |
1035 if not self.initShortcutsOnly: | 1035 if not self.initShortcutsOnly: |
1036 self.fullScreenAct.triggered[()].connect(self.__viewFullScreen) | 1036 self.fullScreenAct.triggered.connect(self.__viewFullScreen) |
1037 self.__actions.append(self.fullScreenAct) | 1037 self.__actions.append(self.fullScreenAct) |
1038 self.addAction(self.fullScreenAct) | 1038 self.addAction(self.fullScreenAct) |
1039 | 1039 |
1040 self.nextTabAct = E5Action( | 1040 self.nextTabAct = E5Action( |
1041 self.tr('Show next tab'), | 1041 self.tr('Show next tab'), |
1042 self.tr('Show next tab'), | 1042 self.tr('Show next tab'), |
1043 QKeySequence(self.tr('Ctrl+Alt+Tab')), 0, | 1043 QKeySequence(self.tr('Ctrl+Alt+Tab')), 0, |
1044 self, 'help_view_next_tab') | 1044 self, 'help_view_next_tab') |
1045 if not self.initShortcutsOnly: | 1045 if not self.initShortcutsOnly: |
1046 self.nextTabAct.triggered[()].connect(self.__nextTab) | 1046 self.nextTabAct.triggered.connect(self.__nextTab) |
1047 self.__actions.append(self.nextTabAct) | 1047 self.__actions.append(self.nextTabAct) |
1048 self.addAction(self.nextTabAct) | 1048 self.addAction(self.nextTabAct) |
1049 | 1049 |
1050 self.prevTabAct = E5Action( | 1050 self.prevTabAct = E5Action( |
1051 self.tr('Show previous tab'), | 1051 self.tr('Show previous tab'), |
1052 self.tr('Show previous tab'), | 1052 self.tr('Show previous tab'), |
1053 QKeySequence(self.tr('Shift+Ctrl+Alt+Tab')), 0, | 1053 QKeySequence(self.tr('Shift+Ctrl+Alt+Tab')), 0, |
1054 self, 'help_view_previous_tab') | 1054 self, 'help_view_previous_tab') |
1055 if not self.initShortcutsOnly: | 1055 if not self.initShortcutsOnly: |
1056 self.prevTabAct.triggered[()].connect(self.__prevTab) | 1056 self.prevTabAct.triggered.connect(self.__prevTab) |
1057 self.__actions.append(self.prevTabAct) | 1057 self.__actions.append(self.prevTabAct) |
1058 self.addAction(self.prevTabAct) | 1058 self.addAction(self.prevTabAct) |
1059 | 1059 |
1060 self.switchTabAct = E5Action( | 1060 self.switchTabAct = E5Action( |
1061 self.tr('Switch between tabs'), | 1061 self.tr('Switch between tabs'), |
1062 self.tr('Switch between tabs'), | 1062 self.tr('Switch between tabs'), |
1063 QKeySequence(self.tr('Ctrl+1')), 0, | 1063 QKeySequence(self.tr('Ctrl+1')), 0, |
1064 self, 'help_switch_tabs') | 1064 self, 'help_switch_tabs') |
1065 if not self.initShortcutsOnly: | 1065 if not self.initShortcutsOnly: |
1066 self.switchTabAct.triggered[()].connect(self.__switchTab) | 1066 self.switchTabAct.triggered.connect(self.__switchTab) |
1067 self.__actions.append(self.switchTabAct) | 1067 self.__actions.append(self.switchTabAct) |
1068 self.addAction(self.switchTabAct) | 1068 self.addAction(self.switchTabAct) |
1069 | 1069 |
1070 self.prefAct = E5Action( | 1070 self.prefAct = E5Action( |
1071 self.tr('Preferences'), | 1071 self.tr('Preferences'), |
1077 """<b>Preferences</b>""" | 1077 """<b>Preferences</b>""" |
1078 """<p>Set the configuration items of the application""" | 1078 """<p>Set the configuration items of the application""" |
1079 """ with your prefered values.</p>""" | 1079 """ with your prefered values.</p>""" |
1080 )) | 1080 )) |
1081 if not self.initShortcutsOnly: | 1081 if not self.initShortcutsOnly: |
1082 self.prefAct.triggered[()].connect(self.__showPreferences) | 1082 self.prefAct.triggered.connect(self.__showPreferences) |
1083 self.__actions.append(self.prefAct) | 1083 self.__actions.append(self.prefAct) |
1084 | 1084 |
1085 self.acceptedLanguagesAct = E5Action( | 1085 self.acceptedLanguagesAct = E5Action( |
1086 self.tr('Languages'), | 1086 self.tr('Languages'), |
1087 UI.PixmapCache.getIcon("flag.png"), | 1087 UI.PixmapCache.getIcon("flag.png"), |
1092 self.acceptedLanguagesAct.setWhatsThis(self.tr( | 1092 self.acceptedLanguagesAct.setWhatsThis(self.tr( |
1093 """<b>Languages</b>""" | 1093 """<b>Languages</b>""" |
1094 """<p>Configure the accepted languages for web pages.</p>""" | 1094 """<p>Configure the accepted languages for web pages.</p>""" |
1095 )) | 1095 )) |
1096 if not self.initShortcutsOnly: | 1096 if not self.initShortcutsOnly: |
1097 self.acceptedLanguagesAct.triggered[()].connect( | 1097 self.acceptedLanguagesAct.triggered.connect( |
1098 self.__showAcceptedLanguages) | 1098 self.__showAcceptedLanguages) |
1099 self.__actions.append(self.acceptedLanguagesAct) | 1099 self.__actions.append(self.acceptedLanguagesAct) |
1100 | 1100 |
1101 self.cookiesAct = E5Action( | 1101 self.cookiesAct = E5Action( |
1102 self.tr('Cookies'), | 1102 self.tr('Cookies'), |
1107 self.cookiesAct.setWhatsThis(self.tr( | 1107 self.cookiesAct.setWhatsThis(self.tr( |
1108 """<b>Cookies</b>""" | 1108 """<b>Cookies</b>""" |
1109 """<p>Configure cookies handling.</p>""" | 1109 """<p>Configure cookies handling.</p>""" |
1110 )) | 1110 )) |
1111 if not self.initShortcutsOnly: | 1111 if not self.initShortcutsOnly: |
1112 self.cookiesAct.triggered[()].connect( | 1112 self.cookiesAct.triggered.connect( |
1113 self.__showCookiesConfiguration) | 1113 self.__showCookiesConfiguration) |
1114 self.__actions.append(self.cookiesAct) | 1114 self.__actions.append(self.cookiesAct) |
1115 | 1115 |
1116 self.offlineStorageAct = E5Action( | 1116 self.offlineStorageAct = E5Action( |
1117 self.tr('Offline Storage'), | 1117 self.tr('Offline Storage'), |
1123 self.offlineStorageAct.setWhatsThis(self.tr( | 1123 self.offlineStorageAct.setWhatsThis(self.tr( |
1124 """<b>Offline Storage</b>""" | 1124 """<b>Offline Storage</b>""" |
1125 """<p>Opens a dialog to configure offline storage.</p>""" | 1125 """<p>Opens a dialog to configure offline storage.</p>""" |
1126 )) | 1126 )) |
1127 if not self.initShortcutsOnly: | 1127 if not self.initShortcutsOnly: |
1128 self.offlineStorageAct.triggered[()].connect( | 1128 self.offlineStorageAct.triggered.connect( |
1129 self.__showOfflineStorageConfiguration) | 1129 self.__showOfflineStorageConfiguration) |
1130 self.__actions.append(self.offlineStorageAct) | 1130 self.__actions.append(self.offlineStorageAct) |
1131 | 1131 |
1132 self.personalDataAct = E5Action( | 1132 self.personalDataAct = E5Action( |
1133 self.tr('Personal Information'), | 1133 self.tr('Personal Information'), |
1141 """<b>Personal Information...</b>""" | 1141 """<b>Personal Information...</b>""" |
1142 """<p>Opens a dialog to configure the personal information""" | 1142 """<p>Opens a dialog to configure the personal information""" |
1143 """ used for completing form fields.</p>""" | 1143 """ used for completing form fields.</p>""" |
1144 )) | 1144 )) |
1145 if not self.initShortcutsOnly: | 1145 if not self.initShortcutsOnly: |
1146 self.personalDataAct.triggered[()].connect( | 1146 self.personalDataAct.triggered.connect( |
1147 self.__showPersonalInformationDialog) | 1147 self.__showPersonalInformationDialog) |
1148 self.__actions.append(self.personalDataAct) | 1148 self.__actions.append(self.personalDataAct) |
1149 | 1149 |
1150 self.greaseMonkeyAct = E5Action( | 1150 self.greaseMonkeyAct = E5Action( |
1151 self.tr('GreaseMonkey Scripts'), | 1151 self.tr('GreaseMonkey Scripts'), |
1159 """<b>GreaseMonkey Scripts...</b>""" | 1159 """<b>GreaseMonkey Scripts...</b>""" |
1160 """<p>Opens a dialog to configure the available GreaseMonkey""" | 1160 """<p>Opens a dialog to configure the available GreaseMonkey""" |
1161 """ Scripts.</p>""" | 1161 """ Scripts.</p>""" |
1162 )) | 1162 )) |
1163 if not self.initShortcutsOnly: | 1163 if not self.initShortcutsOnly: |
1164 self.greaseMonkeyAct.triggered[()].connect( | 1164 self.greaseMonkeyAct.triggered.connect( |
1165 self.__showGreaseMonkeyConfigDialog) | 1165 self.__showGreaseMonkeyConfigDialog) |
1166 self.__actions.append(self.greaseMonkeyAct) | 1166 self.__actions.append(self.greaseMonkeyAct) |
1167 | 1167 |
1168 self.editMessageFilterAct = E5Action( | 1168 self.editMessageFilterAct = E5Action( |
1169 self.tr('Edit Message Filters'), | 1169 self.tr('Edit Message Filters'), |
1177 """<p>Opens a dialog to edit the message filters used to""" | 1177 """<p>Opens a dialog to edit the message filters used to""" |
1178 """ suppress unwanted messages been shown in an error""" | 1178 """ suppress unwanted messages been shown in an error""" |
1179 """ window.</p>""" | 1179 """ window.</p>""" |
1180 )) | 1180 )) |
1181 if not self.initShortcutsOnly: | 1181 if not self.initShortcutsOnly: |
1182 self.editMessageFilterAct.triggered[()].connect( | 1182 self.editMessageFilterAct.triggered.connect( |
1183 E5ErrorMessage.editMessageFilters) | 1183 E5ErrorMessage.editMessageFilters) |
1184 self.__actions.append(self.editMessageFilterAct) | 1184 self.__actions.append(self.editMessageFilterAct) |
1185 | 1185 |
1186 if self.useQtHelp or self.initShortcutsOnly: | 1186 if self.useQtHelp or self.initShortcutsOnly: |
1187 self.syncTocAct = E5Action( | 1187 self.syncTocAct = E5Action( |
1195 """<b>Sync with Table of Contents</b>""" | 1195 """<b>Sync with Table of Contents</b>""" |
1196 """<p>Synchronizes the table of contents with current""" | 1196 """<p>Synchronizes the table of contents with current""" |
1197 """ page.</p>""" | 1197 """ page.</p>""" |
1198 )) | 1198 )) |
1199 if not self.initShortcutsOnly: | 1199 if not self.initShortcutsOnly: |
1200 self.syncTocAct.triggered[()].connect(self.__syncTOC) | 1200 self.syncTocAct.triggered.connect(self.__syncTOC) |
1201 self.__actions.append(self.syncTocAct) | 1201 self.__actions.append(self.syncTocAct) |
1202 | 1202 |
1203 self.showTocAct = E5Action( | 1203 self.showTocAct = E5Action( |
1204 self.tr('Table of Contents'), | 1204 self.tr('Table of Contents'), |
1205 self.tr('Table of Contents'), | 1205 self.tr('Table of Contents'), |
1209 self.showTocAct.setWhatsThis(self.tr( | 1209 self.showTocAct.setWhatsThis(self.tr( |
1210 """<b>Table of Contents</b>""" | 1210 """<b>Table of Contents</b>""" |
1211 """<p>Shows the table of contents window.</p>""" | 1211 """<p>Shows the table of contents window.</p>""" |
1212 )) | 1212 )) |
1213 if not self.initShortcutsOnly: | 1213 if not self.initShortcutsOnly: |
1214 self.showTocAct.triggered[()].connect(self.__showTocWindow) | 1214 self.showTocAct.triggered.connect(self.__showTocWindow) |
1215 self.__actions.append(self.showTocAct) | 1215 self.__actions.append(self.showTocAct) |
1216 | 1216 |
1217 self.showIndexAct = E5Action( | 1217 self.showIndexAct = E5Action( |
1218 self.tr('Index'), | 1218 self.tr('Index'), |
1219 self.tr('Index'), | 1219 self.tr('Index'), |
1223 self.showIndexAct.setWhatsThis(self.tr( | 1223 self.showIndexAct.setWhatsThis(self.tr( |
1224 """<b>Index</b>""" | 1224 """<b>Index</b>""" |
1225 """<p>Shows the index window.</p>""" | 1225 """<p>Shows the index window.</p>""" |
1226 )) | 1226 )) |
1227 if not self.initShortcutsOnly: | 1227 if not self.initShortcutsOnly: |
1228 self.showIndexAct.triggered[()].connect(self.__showIndexWindow) | 1228 self.showIndexAct.triggered.connect(self.__showIndexWindow) |
1229 self.__actions.append(self.showIndexAct) | 1229 self.__actions.append(self.showIndexAct) |
1230 | 1230 |
1231 self.showSearchAct = E5Action( | 1231 self.showSearchAct = E5Action( |
1232 self.tr('Search'), | 1232 self.tr('Search'), |
1233 self.tr('Search'), | 1233 self.tr('Search'), |
1237 self.showSearchAct.setWhatsThis(self.tr( | 1237 self.showSearchAct.setWhatsThis(self.tr( |
1238 """<b>Search</b>""" | 1238 """<b>Search</b>""" |
1239 """<p>Shows the search window.</p>""" | 1239 """<p>Shows the search window.</p>""" |
1240 )) | 1240 )) |
1241 if not self.initShortcutsOnly: | 1241 if not self.initShortcutsOnly: |
1242 self.showSearchAct.triggered[()].connect( | 1242 self.showSearchAct.triggered.connect( |
1243 self.__showSearchWindow) | 1243 self.__showSearchWindow) |
1244 self.__actions.append(self.showSearchAct) | 1244 self.__actions.append(self.showSearchAct) |
1245 | 1245 |
1246 self.manageQtHelpDocsAct = E5Action( | 1246 self.manageQtHelpDocsAct = E5Action( |
1247 self.tr('Manage QtHelp Documents'), | 1247 self.tr('Manage QtHelp Documents'), |
1253 """<b>Manage QtHelp Documents</b>""" | 1253 """<b>Manage QtHelp Documents</b>""" |
1254 """<p>Shows a dialog to manage the QtHelp documentation""" | 1254 """<p>Shows a dialog to manage the QtHelp documentation""" |
1255 """ set.</p>""" | 1255 """ set.</p>""" |
1256 )) | 1256 )) |
1257 if not self.initShortcutsOnly: | 1257 if not self.initShortcutsOnly: |
1258 self.manageQtHelpDocsAct.triggered[()].connect( | 1258 self.manageQtHelpDocsAct.triggered.connect( |
1259 self.__manageQtHelpDocumentation) | 1259 self.__manageQtHelpDocumentation) |
1260 self.__actions.append(self.manageQtHelpDocsAct) | 1260 self.__actions.append(self.manageQtHelpDocsAct) |
1261 | 1261 |
1262 self.manageQtHelpFiltersAct = E5Action( | 1262 self.manageQtHelpFiltersAct = E5Action( |
1263 self.tr('Manage QtHelp Filters'), | 1263 self.tr('Manage QtHelp Filters'), |
1268 self.manageQtHelpFiltersAct.setWhatsThis(self.tr( | 1268 self.manageQtHelpFiltersAct.setWhatsThis(self.tr( |
1269 """<b>Manage QtHelp Filters</b>""" | 1269 """<b>Manage QtHelp Filters</b>""" |
1270 """<p>Shows a dialog to manage the QtHelp filters.</p>""" | 1270 """<p>Shows a dialog to manage the QtHelp filters.</p>""" |
1271 )) | 1271 )) |
1272 if not self.initShortcutsOnly: | 1272 if not self.initShortcutsOnly: |
1273 self.manageQtHelpFiltersAct.triggered[()].connect( | 1273 self.manageQtHelpFiltersAct.triggered.connect( |
1274 self.__manageQtHelpFilters) | 1274 self.__manageQtHelpFilters) |
1275 self.__actions.append(self.manageQtHelpFiltersAct) | 1275 self.__actions.append(self.manageQtHelpFiltersAct) |
1276 | 1276 |
1277 self.reindexDocumentationAct = E5Action( | 1277 self.reindexDocumentationAct = E5Action( |
1278 self.tr('Reindex Documentation'), | 1278 self.tr('Reindex Documentation'), |
1283 self.reindexDocumentationAct.setWhatsThis(self.tr( | 1283 self.reindexDocumentationAct.setWhatsThis(self.tr( |
1284 """<b>Reindex Documentation</b>""" | 1284 """<b>Reindex Documentation</b>""" |
1285 """<p>Reindexes the documentation set.</p>""" | 1285 """<p>Reindexes the documentation set.</p>""" |
1286 )) | 1286 )) |
1287 if not self.initShortcutsOnly: | 1287 if not self.initShortcutsOnly: |
1288 self.reindexDocumentationAct.triggered[()].connect( | 1288 self.reindexDocumentationAct.triggered.connect( |
1289 self.__searchEngine.reindexDocumentation) | 1289 self.__searchEngine.reindexDocumentation) |
1290 self.__actions.append(self.reindexDocumentationAct) | 1290 self.__actions.append(self.reindexDocumentationAct) |
1291 | 1291 |
1292 self.clearPrivateDataAct = E5Action( | 1292 self.clearPrivateDataAct = E5Action( |
1293 self.tr('Clear private data'), | 1293 self.tr('Clear private data'), |
1300 """<b>Clear private data</b>""" | 1300 """<b>Clear private data</b>""" |
1301 """<p>Clears the private data like browsing history, search""" | 1301 """<p>Clears the private data like browsing history, search""" |
1302 """ history or the favicons database.</p>""" | 1302 """ history or the favicons database.</p>""" |
1303 )) | 1303 )) |
1304 if not self.initShortcutsOnly: | 1304 if not self.initShortcutsOnly: |
1305 self.clearPrivateDataAct.triggered[()].connect( | 1305 self.clearPrivateDataAct.triggered.connect( |
1306 self.__clearPrivateData) | 1306 self.__clearPrivateData) |
1307 self.__actions.append(self.clearPrivateDataAct) | 1307 self.__actions.append(self.clearPrivateDataAct) |
1308 | 1308 |
1309 self.clearIconsAct = E5Action( | 1309 self.clearIconsAct = E5Action( |
1310 self.tr('Clear icons database'), | 1310 self.tr('Clear icons database'), |
1317 """<b>Clear icons database</b>""" | 1317 """<b>Clear icons database</b>""" |
1318 """<p>Clears the database of favicons of previously visited""" | 1318 """<p>Clears the database of favicons of previously visited""" |
1319 """ URLs.</p>""" | 1319 """ URLs.</p>""" |
1320 )) | 1320 )) |
1321 if not self.initShortcutsOnly: | 1321 if not self.initShortcutsOnly: |
1322 self.clearIconsAct.triggered[()].connect(self.__clearIconsDatabase) | 1322 self.clearIconsAct.triggered.connect(self.__clearIconsDatabase) |
1323 self.__actions.append(self.clearIconsAct) | 1323 self.__actions.append(self.clearIconsAct) |
1324 | 1324 |
1325 self.searchEnginesAct = E5Action( | 1325 self.searchEnginesAct = E5Action( |
1326 self.tr('Configure Search Engines'), | 1326 self.tr('Configure Search Engines'), |
1327 self.tr('Configure Search &Engines...'), | 1327 self.tr('Configure Search &Engines...'), |
1333 """<b>Configure Search Engines...</b>""" | 1333 """<b>Configure Search Engines...</b>""" |
1334 """<p>Opens a dialog to configure the available search""" | 1334 """<p>Opens a dialog to configure the available search""" |
1335 """ engines.</p>""" | 1335 """ engines.</p>""" |
1336 )) | 1336 )) |
1337 if not self.initShortcutsOnly: | 1337 if not self.initShortcutsOnly: |
1338 self.searchEnginesAct.triggered[()].connect( | 1338 self.searchEnginesAct.triggered.connect( |
1339 self.__showEnginesConfigurationDialog) | 1339 self.__showEnginesConfigurationDialog) |
1340 self.__actions.append(self.searchEnginesAct) | 1340 self.__actions.append(self.searchEnginesAct) |
1341 | 1341 |
1342 self.passwordsAct = E5Action( | 1342 self.passwordsAct = E5Action( |
1343 self.tr('Manage Saved Passwords'), | 1343 self.tr('Manage Saved Passwords'), |
1350 self.passwordsAct.setWhatsThis(self.tr( | 1350 self.passwordsAct.setWhatsThis(self.tr( |
1351 """<b>Manage Saved Passwords...</b>""" | 1351 """<b>Manage Saved Passwords...</b>""" |
1352 """<p>Opens a dialog to manage the saved passwords.</p>""" | 1352 """<p>Opens a dialog to manage the saved passwords.</p>""" |
1353 )) | 1353 )) |
1354 if not self.initShortcutsOnly: | 1354 if not self.initShortcutsOnly: |
1355 self.passwordsAct.triggered[()].connect(self.__showPasswordsDialog) | 1355 self.passwordsAct.triggered.connect(self.__showPasswordsDialog) |
1356 self.__actions.append(self.passwordsAct) | 1356 self.__actions.append(self.passwordsAct) |
1357 | 1357 |
1358 self.adblockAct = E5Action( | 1358 self.adblockAct = E5Action( |
1359 self.tr('Ad Block'), | 1359 self.tr('Ad Block'), |
1360 UI.PixmapCache.getIcon("adBlockPlus.png"), | 1360 UI.PixmapCache.getIcon("adBlockPlus.png"), |
1367 """<b>Ad Block...</b>""" | 1367 """<b>Ad Block...</b>""" |
1368 """<p>Opens a dialog to configure AdBlock subscriptions and""" | 1368 """<p>Opens a dialog to configure AdBlock subscriptions and""" |
1369 """ rules.</p>""" | 1369 """ rules.</p>""" |
1370 )) | 1370 )) |
1371 if not self.initShortcutsOnly: | 1371 if not self.initShortcutsOnly: |
1372 self.adblockAct.triggered[()].connect(self.__showAdBlockDialog) | 1372 self.adblockAct.triggered.connect(self.__showAdBlockDialog) |
1373 self.__actions.append(self.adblockAct) | 1373 self.__actions.append(self.adblockAct) |
1374 | 1374 |
1375 self.flashblockAct = E5Action( | 1375 self.flashblockAct = E5Action( |
1376 self.tr('ClickToFlash'), | 1376 self.tr('ClickToFlash'), |
1377 UI.PixmapCache.getIcon("flashBlock.png"), | 1377 UI.PixmapCache.getIcon("flashBlock.png"), |
1384 """<b>ClickToFlash...</b>""" | 1384 """<b>ClickToFlash...</b>""" |
1385 """<p>Opens a dialog to configure the ClickToFlash""" | 1385 """<p>Opens a dialog to configure the ClickToFlash""" |
1386 """ whitelist.</p>""" | 1386 """ whitelist.</p>""" |
1387 )) | 1387 )) |
1388 if not self.initShortcutsOnly: | 1388 if not self.initShortcutsOnly: |
1389 self.flashblockAct.triggered[()].connect( | 1389 self.flashblockAct.triggered.connect( |
1390 self.__showClickToFlashDialog) | 1390 self.__showClickToFlashDialog) |
1391 self.__actions.append(self.flashblockAct) | 1391 self.__actions.append(self.flashblockAct) |
1392 | 1392 |
1393 if SSL_AVAILABLE: | 1393 if SSL_AVAILABLE: |
1394 self.certificatesAct = E5Action( | 1394 self.certificatesAct = E5Action( |
1403 """<b>Manage SSL Certificates...</b>""" | 1403 """<b>Manage SSL Certificates...</b>""" |
1404 """<p>Opens a dialog to manage the saved SSL""" | 1404 """<p>Opens a dialog to manage the saved SSL""" |
1405 """ certificates.</p>""" | 1405 """ certificates.</p>""" |
1406 )) | 1406 )) |
1407 if not self.initShortcutsOnly: | 1407 if not self.initShortcutsOnly: |
1408 self.certificatesAct.triggered[()].connect( | 1408 self.certificatesAct.triggered.connect( |
1409 self.__showCertificatesDialog) | 1409 self.__showCertificatesDialog) |
1410 self.__actions.append(self.certificatesAct) | 1410 self.__actions.append(self.certificatesAct) |
1411 | 1411 |
1412 self.toolsMonitorAct = E5Action( | 1412 self.toolsMonitorAct = E5Action( |
1413 self.tr('Network Monitor'), | 1413 self.tr('Network Monitor'), |
1419 self.toolsMonitorAct.setWhatsThis(self.tr( | 1419 self.toolsMonitorAct.setWhatsThis(self.tr( |
1420 """<b>Network Monitor...</b>""" | 1420 """<b>Network Monitor...</b>""" |
1421 """<p>Shows the network monitor dialog.</p>""" | 1421 """<p>Shows the network monitor dialog.</p>""" |
1422 )) | 1422 )) |
1423 if not self.initShortcutsOnly: | 1423 if not self.initShortcutsOnly: |
1424 self.toolsMonitorAct.triggered[()].connect( | 1424 self.toolsMonitorAct.triggered.connect( |
1425 self.__showNetworkMonitor) | 1425 self.__showNetworkMonitor) |
1426 self.__actions.append(self.toolsMonitorAct) | 1426 self.__actions.append(self.toolsMonitorAct) |
1427 | 1427 |
1428 self.showDownloadManagerAct = E5Action( | 1428 self.showDownloadManagerAct = E5Action( |
1429 self.tr('Downloads'), | 1429 self.tr('Downloads'), |
1434 self.showDownloadManagerAct.setWhatsThis(self.tr( | 1434 self.showDownloadManagerAct.setWhatsThis(self.tr( |
1435 """<b>Downloads</b>""" | 1435 """<b>Downloads</b>""" |
1436 """<p>Shows the downloads window.</p>""" | 1436 """<p>Shows the downloads window.</p>""" |
1437 )) | 1437 )) |
1438 if not self.initShortcutsOnly: | 1438 if not self.initShortcutsOnly: |
1439 self.showDownloadManagerAct.triggered[()].connect( | 1439 self.showDownloadManagerAct.triggered.connect( |
1440 self.__showDownloadsWindow) | 1440 self.__showDownloadsWindow) |
1441 self.__actions.append(self.showDownloadManagerAct) | 1441 self.__actions.append(self.showDownloadManagerAct) |
1442 | 1442 |
1443 self.feedsManagerAct = E5Action( | 1443 self.feedsManagerAct = E5Action( |
1444 self.tr('RSS Feeds Dialog'), | 1444 self.tr('RSS Feeds Dialog'), |
1453 """<p>Open a dialog to show the configured RSS feeds.""" | 1453 """<p>Open a dialog to show the configured RSS feeds.""" |
1454 """ It can be used to mange the feeds and to show their""" | 1454 """ It can be used to mange the feeds and to show their""" |
1455 """ contents.</p>""" | 1455 """ contents.</p>""" |
1456 )) | 1456 )) |
1457 if not self.initShortcutsOnly: | 1457 if not self.initShortcutsOnly: |
1458 self.feedsManagerAct.triggered[()].connect(self.__showFeedsManager) | 1458 self.feedsManagerAct.triggered.connect(self.__showFeedsManager) |
1459 self.__actions.append(self.feedsManagerAct) | 1459 self.__actions.append(self.feedsManagerAct) |
1460 | 1460 |
1461 self.siteInfoAct = E5Action( | 1461 self.siteInfoAct = E5Action( |
1462 self.tr('Siteinfo Dialog'), | 1462 self.tr('Siteinfo Dialog'), |
1463 UI.PixmapCache.getIcon("helpAbout.png"), | 1463 UI.PixmapCache.getIcon("helpAbout.png"), |
1470 """<b>Siteinfo Dialog...</b>""" | 1470 """<b>Siteinfo Dialog...</b>""" |
1471 """<p>Opens a dialog showing some information about the current""" | 1471 """<p>Opens a dialog showing some information about the current""" |
1472 """ site.</p>""" | 1472 """ site.</p>""" |
1473 )) | 1473 )) |
1474 if not self.initShortcutsOnly: | 1474 if not self.initShortcutsOnly: |
1475 self.siteInfoAct.triggered[()].connect(self.__showSiteinfoDialog) | 1475 self.siteInfoAct.triggered.connect(self.__showSiteinfoDialog) |
1476 self.__actions.append(self.siteInfoAct) | 1476 self.__actions.append(self.siteInfoAct) |
1477 | 1477 |
1478 self.userAgentManagerAct = E5Action( | 1478 self.userAgentManagerAct = E5Action( |
1479 self.tr('Manage User Agent Settings'), | 1479 self.tr('Manage User Agent Settings'), |
1480 self.tr('Manage &User Agent Settings'), | 1480 self.tr('Manage &User Agent Settings'), |
1484 self.userAgentManagerAct.setWhatsThis(self.tr( | 1484 self.userAgentManagerAct.setWhatsThis(self.tr( |
1485 """<b>Manage User Agent Settings</b>""" | 1485 """<b>Manage User Agent Settings</b>""" |
1486 """<p>Shows a dialog to manage the User Agent settings.</p>""" | 1486 """<p>Shows a dialog to manage the User Agent settings.</p>""" |
1487 )) | 1487 )) |
1488 if not self.initShortcutsOnly: | 1488 if not self.initShortcutsOnly: |
1489 self.userAgentManagerAct.triggered[()].connect( | 1489 self.userAgentManagerAct.triggered.connect( |
1490 self.__showUserAgentsDialog) | 1490 self.__showUserAgentsDialog) |
1491 self.__actions.append(self.userAgentManagerAct) | 1491 self.__actions.append(self.userAgentManagerAct) |
1492 | 1492 |
1493 self.synchronizationAct = E5Action( | 1493 self.synchronizationAct = E5Action( |
1494 self.tr('Synchronize data'), | 1494 self.tr('Synchronize data'), |
1501 """<b>Synchronize Data...</b>""" | 1501 """<b>Synchronize Data...</b>""" |
1502 """<p>This shows a dialog to synchronize data via the""" | 1502 """<p>This shows a dialog to synchronize data via the""" |
1503 """ network.</p>""" | 1503 """ network.</p>""" |
1504 )) | 1504 )) |
1505 if not self.initShortcutsOnly: | 1505 if not self.initShortcutsOnly: |
1506 self.synchronizationAct.triggered[()].connect( | 1506 self.synchronizationAct.triggered.connect( |
1507 self.__showSyncDialog) | 1507 self.__showSyncDialog) |
1508 self.__actions.append(self.synchronizationAct) | 1508 self.__actions.append(self.synchronizationAct) |
1509 | 1509 |
1510 self.backAct.setEnabled(False) | 1510 self.backAct.setEnabled(False) |
1511 self.forwardAct.setEnabled(False) | 1511 self.forwardAct.setEnabled(False) |
1932 @param title new title (string) | 1932 @param title new title (string) |
1933 """ | 1933 """ |
1934 self.historyManager().updateHistoryEntry( | 1934 self.historyManager().updateHistoryEntry( |
1935 browser.url().toString(), title) | 1935 browser.url().toString(), title) |
1936 | 1936 |
1937 @pyqtSlot() | |
1937 def newTab(self, link=None, requestData=None, addNextTo=None): | 1938 def newTab(self, link=None, requestData=None, addNextTo=None): |
1938 """ | 1939 """ |
1939 Public slot called to open a new help window tab. | 1940 Public slot called to open a new help window tab. |
1940 | 1941 |
1941 @param link file to be displayed in the new window (string or QUrl) | 1942 @param link file to be displayed in the new window (string or QUrl) |
1947 if addNextTo: | 1948 if addNextTo: |
1948 self.tabWidget.newBrowserAfter(addNextTo, link, requestData) | 1949 self.tabWidget.newBrowserAfter(addNextTo, link, requestData) |
1949 else: | 1950 else: |
1950 self.tabWidget.newBrowser(link, requestData) | 1951 self.tabWidget.newBrowser(link, requestData) |
1951 | 1952 |
1953 @pyqtSlot() | |
1952 def newWindow(self, link=None): | 1954 def newWindow(self, link=None): |
1953 """ | 1955 """ |
1954 Public slot called to open a new help browser dialog. | 1956 Public slot called to open a new help browser dialog. |
1955 | 1957 |
1956 @param link file to be displayed in the new window (string or QUrl) | 1958 @param link file to be displayed in the new window (string or QUrl) |
2033 Private slot to save the current page. | 2035 Private slot to save the current page. |
2034 """ | 2036 """ |
2035 browser = self.currentBrowser() | 2037 browser = self.currentBrowser() |
2036 if browser is not None: | 2038 if browser is not None: |
2037 browser.saveAs() | 2039 browser.saveAs() |
2038 | 2040 |
2041 @pyqtSlot() | |
2039 def __savePageScreen(self, visibleOnly=False): | 2042 def __savePageScreen(self, visibleOnly=False): |
2040 """ | 2043 """ |
2041 Private slot to save the current page as a screen shot. | 2044 Private slot to save the current page as a screen shot. |
2042 | 2045 |
2043 @param visibleOnly flag indicating to just save the visible part | 2046 @param visibleOnly flag indicating to just save the visible part |
2341 """ | 2344 """ |
2342 QWebSettings.globalSettings().setAttribute( | 2345 QWebSettings.globalSettings().setAttribute( |
2343 QWebSettings.ZoomTextOnly, textOnly) | 2346 QWebSettings.ZoomTextOnly, textOnly) |
2344 self.zoomTextOnlyChanged.emit(textOnly) | 2347 self.zoomTextOnlyChanged.emit(textOnly) |
2345 | 2348 |
2346 def __viewFullScreen(self,): | 2349 def __viewFullScreen(self): |
2347 """ | 2350 """ |
2348 Private slot called to toggle fullscreen mode. | 2351 Private slot called to toggle fullscreen mode. |
2349 """ | 2352 """ |
2350 if self.__isFullScreen(): | 2353 if self.__isFullScreen(): |
2351 # switch back to normal | 2354 # switch back to normal |