Helpviewer/HelpWindow.py

changeset 453
a81097a85889
parent 383
286de4e5179c
child 454
d28d558f7484
child 455
9a7e0b7b801e
equal deleted inserted replaced
452:0bc58cbb64b2 453:a81097a85889
371 self.newTabAct.setStatusTip(self.trUtf8('Open a new help window tab')) 371 self.newTabAct.setStatusTip(self.trUtf8('Open a new help window tab'))
372 self.newTabAct.setWhatsThis(self.trUtf8( 372 self.newTabAct.setWhatsThis(self.trUtf8(
373 """<b>New Tab</b>""" 373 """<b>New Tab</b>"""
374 """<p>This opens a new help window tab.</p>""" 374 """<p>This opens a new help window tab.</p>"""
375 )) 375 ))
376 self.connect(self.newTabAct, SIGNAL('triggered()'), self.newTab) 376 self.newTabAct.triggered.connect(self.newTab)
377 self.__actions.append(self.newTabAct) 377 self.__actions.append(self.newTabAct)
378 378
379 self.newAct = E5Action(self.trUtf8('New Window'), 379 self.newAct = E5Action(self.trUtf8('New Window'),
380 UI.PixmapCache.getIcon("newWindow.png"), 380 UI.PixmapCache.getIcon("newWindow.png"),
381 self.trUtf8('New &Window'), 381 self.trUtf8('New &Window'),
384 self.newAct.setStatusTip(self.trUtf8('Open a new help browser window')) 384 self.newAct.setStatusTip(self.trUtf8('Open a new help browser window'))
385 self.newAct.setWhatsThis(self.trUtf8( 385 self.newAct.setWhatsThis(self.trUtf8(
386 """<b>New Window</b>""" 386 """<b>New Window</b>"""
387 """<p>This opens a new help browser window.</p>""" 387 """<p>This opens a new help browser window.</p>"""
388 )) 388 ))
389 self.connect(self.newAct, SIGNAL('triggered()'), self.newWindow) 389 self.newAct.triggered.connect(self.newWindow)
390 self.__actions.append(self.newAct) 390 self.__actions.append(self.newAct)
391 391
392 self.openAct = E5Action(self.trUtf8('Open File'), 392 self.openAct = E5Action(self.trUtf8('Open File'),
393 UI.PixmapCache.getIcon("open.png"), 393 UI.PixmapCache.getIcon("open.png"),
394 self.trUtf8('&Open File'), 394 self.trUtf8('&Open File'),
398 self.openAct.setWhatsThis(self.trUtf8( 398 self.openAct.setWhatsThis(self.trUtf8(
399 """<b>Open File</b>""" 399 """<b>Open File</b>"""
400 """<p>This opens a new help file for display.""" 400 """<p>This opens a new help file for display."""
401 """ It pops up a file selection dialog.</p>""" 401 """ It pops up a file selection dialog.</p>"""
402 )) 402 ))
403 self.connect(self.openAct, SIGNAL('triggered()'), self.__openFile) 403 self.openAct.triggered.connect(self.__openFile)
404 self.__actions.append(self.openAct) 404 self.__actions.append(self.openAct)
405 405
406 self.openTabAct = E5Action(self.trUtf8('Open File in New Tab'), 406 self.openTabAct = E5Action(self.trUtf8('Open File in New Tab'),
407 UI.PixmapCache.getIcon("openNewTab.png"), 407 UI.PixmapCache.getIcon("openNewTab.png"),
408 self.trUtf8('Open File in New &Tab'), 408 self.trUtf8('Open File in New &Tab'),
413 self.openTabAct.setWhatsThis(self.trUtf8( 413 self.openTabAct.setWhatsThis(self.trUtf8(
414 """<b>Open File in New Tab</b>""" 414 """<b>Open File in New Tab</b>"""
415 """<p>This opens a new help file for display in a new tab.""" 415 """<p>This opens a new help file for display in a new tab."""
416 """ It pops up a file selection dialog.</p>""" 416 """ It pops up a file selection dialog.</p>"""
417 )) 417 ))
418 self.connect(self.openTabAct, SIGNAL('triggered()'), self.__openFileNewTab) 418 self.openTabAct.triggered.connect(self.__openFileNewTab)
419 self.__actions.append(self.openTabAct) 419 self.__actions.append(self.openTabAct)
420 420
421 self.saveAsAct = E5Action(self.trUtf8('Save As '), 421 self.saveAsAct = E5Action(self.trUtf8('Save As '),
422 UI.PixmapCache.getIcon("fileSaveAs.png"), 422 UI.PixmapCache.getIcon("fileSaveAs.png"),
423 self.trUtf8('&Save As...'), 423 self.trUtf8('&Save As...'),
427 self.trUtf8('Save the current page to disk')) 427 self.trUtf8('Save the current page to disk'))
428 self.saveAsAct.setWhatsThis(self.trUtf8( 428 self.saveAsAct.setWhatsThis(self.trUtf8(
429 """<b>Save As...</b>""" 429 """<b>Save As...</b>"""
430 """<p>Saves the current page to disk.</p>""" 430 """<p>Saves the current page to disk.</p>"""
431 )) 431 ))
432 self.connect(self.saveAsAct, SIGNAL('triggered()'), self.__savePageAs) 432 self.saveAsAct.triggered.connect(self.__savePageAs)
433 self.__actions.append(self.saveAsAct) 433 self.__actions.append(self.saveAsAct)
434 434
435 bookmarksManager = self.bookmarksManager() 435 bookmarksManager = self.bookmarksManager()
436 self.importBookmarksAct = E5Action(self.trUtf8('Import Bookmarks'), 436 self.importBookmarksAct = E5Action(self.trUtf8('Import Bookmarks'),
437 self.trUtf8('&Import Bookmarks...'), 437 self.trUtf8('&Import Bookmarks...'),
440 self.trUtf8('Import bookmarks from other browsers')) 440 self.trUtf8('Import bookmarks from other browsers'))
441 self.importBookmarksAct.setWhatsThis(self.trUtf8( 441 self.importBookmarksAct.setWhatsThis(self.trUtf8(
442 """<b>Import Bookmarks</b>""" 442 """<b>Import Bookmarks</b>"""
443 """<p>Import bookmarks from other browsers.</p>""" 443 """<p>Import bookmarks from other browsers.</p>"""
444 )) 444 ))
445 self.connect(self.importBookmarksAct, SIGNAL('triggered()'), 445 self.importBookmarksAct.triggered.connect(bookmarksManager.importBookmarks)
446 bookmarksManager.importBookmarks)
447 self.__actions.append(self.importBookmarksAct) 446 self.__actions.append(self.importBookmarksAct)
448 447
449 self.exportBookmarksAct = E5Action(self.trUtf8('Export Bookmarks'), 448 self.exportBookmarksAct = E5Action(self.trUtf8('Export Bookmarks'),
450 self.trUtf8('&Export Bookmarks...'), 449 self.trUtf8('&Export Bookmarks...'),
451 0, 0, self, 'help_file_export_bookmarks') 450 0, 0, self, 'help_file_export_bookmarks')
453 self.trUtf8('Export the bookmarks into a file')) 452 self.trUtf8('Export the bookmarks into a file'))
454 self.exportBookmarksAct.setWhatsThis(self.trUtf8( 453 self.exportBookmarksAct.setWhatsThis(self.trUtf8(
455 """<b>Export Bookmarks</b>""" 454 """<b>Export Bookmarks</b>"""
456 """<p>Export the bookmarks into a file.</p>""" 455 """<p>Export the bookmarks into a file.</p>"""
457 )) 456 ))
458 self.connect(self.exportBookmarksAct, SIGNAL('triggered()'), 457 self.exportBookmarksAct.triggered.connect(bookmarksManager.exportBookmarks)
459 bookmarksManager.exportBookmarks)
460 self.__actions.append(self.exportBookmarksAct) 458 self.__actions.append(self.exportBookmarksAct)
461 459
462 self.printAct = E5Action(self.trUtf8('Print'), 460 self.printAct = E5Action(self.trUtf8('Print'),
463 UI.PixmapCache.getIcon("print.png"), 461 UI.PixmapCache.getIcon("print.png"),
464 self.trUtf8('&Print'), 462 self.trUtf8('&Print'),
467 self.printAct.setStatusTip(self.trUtf8('Print the displayed help')) 465 self.printAct.setStatusTip(self.trUtf8('Print the displayed help'))
468 self.printAct.setWhatsThis(self.trUtf8( 466 self.printAct.setWhatsThis(self.trUtf8(
469 """<b>Print</b>""" 467 """<b>Print</b>"""
470 """<p>Print the displayed help text.</p>""" 468 """<p>Print the displayed help text.</p>"""
471 )) 469 ))
472 self.connect(self.printAct, SIGNAL('triggered()'), self.__printFile) 470 self.printAct.triggered.connect(self.__printFile)
473 self.__actions.append(self.printAct) 471 self.__actions.append(self.printAct)
474 472
475 self.printPdfAct = E5Action(self.trUtf8('Print as PDF'), 473 self.printPdfAct = E5Action(self.trUtf8('Print as PDF'),
476 UI.PixmapCache.getIcon("printPdf.png"), 474 UI.PixmapCache.getIcon("printPdf.png"),
477 self.trUtf8('Print as PDF'), 475 self.trUtf8('Print as PDF'),
479 self.printPdfAct.setStatusTip(self.trUtf8('Print the displayed help as PDF')) 477 self.printPdfAct.setStatusTip(self.trUtf8('Print the displayed help as PDF'))
480 self.printPdfAct.setWhatsThis(self.trUtf8( 478 self.printPdfAct.setWhatsThis(self.trUtf8(
481 """<b>Print as PDF</b>""" 479 """<b>Print as PDF</b>"""
482 """<p>Print the displayed help text as a PDF file.</p>""" 480 """<p>Print the displayed help text as a PDF file.</p>"""
483 )) 481 ))
484 self.connect(self.printPdfAct, SIGNAL('triggered()'), self.__printFilePdf) 482 self.printPdfAct.triggered.connect(self.__printFilePdf)
485 self.__actions.append(self.printPdfAct) 483 self.__actions.append(self.printPdfAct)
486 484
487 self.printPreviewAct = E5Action(self.trUtf8('Print Preview'), 485 self.printPreviewAct = E5Action(self.trUtf8('Print Preview'),
488 UI.PixmapCache.getIcon("printPreview.png"), 486 UI.PixmapCache.getIcon("printPreview.png"),
489 self.trUtf8('Print Preview'), 487 self.trUtf8('Print Preview'),
492 'Print preview of the displayed help')) 490 'Print preview of the displayed help'))
493 self.printPreviewAct.setWhatsThis(self.trUtf8( 491 self.printPreviewAct.setWhatsThis(self.trUtf8(
494 """<b>Print Preview</b>""" 492 """<b>Print Preview</b>"""
495 """<p>Print preview of the displayed help text.</p>""" 493 """<p>Print preview of the displayed help text.</p>"""
496 )) 494 ))
497 self.connect(self.printPreviewAct, SIGNAL('triggered()'), 495 self.printPreviewAct.triggered.connect(self.__printPreviewFile)
498 self.__printPreviewFile)
499 self.__actions.append(self.printPreviewAct) 496 self.__actions.append(self.printPreviewAct)
500 497
501 self.closeAct = E5Action(self.trUtf8('Close'), 498 self.closeAct = E5Action(self.trUtf8('Close'),
502 UI.PixmapCache.getIcon("close.png"), 499 UI.PixmapCache.getIcon("close.png"),
503 self.trUtf8('&Close'), 500 self.trUtf8('&Close'),
506 self.closeAct.setStatusTip(self.trUtf8('Close the current help window')) 503 self.closeAct.setStatusTip(self.trUtf8('Close the current help window'))
507 self.closeAct.setWhatsThis(self.trUtf8( 504 self.closeAct.setWhatsThis(self.trUtf8(
508 """<b>Close</b>""" 505 """<b>Close</b>"""
509 """<p>Closes the current help window.</p>""" 506 """<p>Closes the current help window.</p>"""
510 )) 507 ))
511 self.connect(self.closeAct, SIGNAL('triggered()'), self.__close) 508 self.closeAct.triggered.connect(self.__close)
512 self.__actions.append(self.closeAct) 509 self.__actions.append(self.closeAct)
513 510
514 self.closeAllAct = E5Action(self.trUtf8('Close All'), 511 self.closeAllAct = E5Action(self.trUtf8('Close All'),
515 self.trUtf8('Close &All'), 512 self.trUtf8('Close &All'),
516 0, 0, self, 'help_file_close_all') 513 0, 0, self, 'help_file_close_all')
517 self.closeAllAct.setStatusTip(self.trUtf8('Close all help windows')) 514 self.closeAllAct.setStatusTip(self.trUtf8('Close all help windows'))
518 self.closeAllAct.setWhatsThis(self.trUtf8( 515 self.closeAllAct.setWhatsThis(self.trUtf8(
519 """<b>Close All</b>""" 516 """<b>Close All</b>"""
520 """<p>Closes all help windows except the first one.</p>""" 517 """<p>Closes all help windows except the first one.</p>"""
521 )) 518 ))
522 self.connect(self.closeAllAct, SIGNAL('triggered()'), self.__closeAll) 519 self.closeAllAct.triggered.connect(self.__closeAll)
523 self.__actions.append(self.closeAllAct) 520 self.__actions.append(self.closeAllAct)
524 521
525 self.privateBrowsingAct = E5Action(self.trUtf8('Private Browsing'), 522 self.privateBrowsingAct = E5Action(self.trUtf8('Private Browsing'),
526 UI.PixmapCache.getIcon("privateBrowsing.png"), 523 UI.PixmapCache.getIcon("privateBrowsing.png"),
527 self.trUtf8('Private &Browsing'), 524 self.trUtf8('Private &Browsing'),
530 self.privateBrowsingAct.setWhatsThis(self.trUtf8( 527 self.privateBrowsingAct.setWhatsThis(self.trUtf8(
531 """<b>Private Browsing</b>""" 528 """<b>Private Browsing</b>"""
532 """<p>Enables private browsing. In this mode no history is""" 529 """<p>Enables private browsing. In this mode no history is"""
533 """ recorded anymore.</p>""" 530 """ recorded anymore.</p>"""
534 )) 531 ))
535 self.connect(self.privateBrowsingAct, SIGNAL('triggered()'), 532 self.privateBrowsingAct.triggered.connect(self.__privateBrowsing)
536 self.__privateBrowsing)
537 self.privateBrowsingAct.setCheckable(True) 533 self.privateBrowsingAct.setCheckable(True)
538 self.__actions.append(self.privateBrowsingAct) 534 self.__actions.append(self.privateBrowsingAct)
539 535
540 self.exitAct = E5Action(self.trUtf8('Quit'), 536 self.exitAct = E5Action(self.trUtf8('Quit'),
541 UI.PixmapCache.getIcon("exit.png"), 537 UI.PixmapCache.getIcon("exit.png"),
546 self.exitAct.setWhatsThis(self.trUtf8( 542 self.exitAct.setWhatsThis(self.trUtf8(
547 """<b>Quit</b>""" 543 """<b>Quit</b>"""
548 """<p>Quit the web browser.</p>""" 544 """<p>Quit the web browser.</p>"""
549 )) 545 ))
550 if self.fromEric: 546 if self.fromEric:
551 self.connect(self.exitAct, SIGNAL('triggered()'), self, SLOT('close()')) 547 self.exitAct.triggered.connect(self, SLOT('close()'))
552 else: 548 else:
553 self.connect(self.exitAct, SIGNAL('triggered()'), 549 self.connect(self.exitAct, SIGNAL('triggered()'),
554 qApp, SLOT('closeAllWindows()')) 550 qApp, SLOT('closeAllWindows()'))
555 self.__actions.append(self.exitAct) 551 self.__actions.append(self.exitAct)
556 552
564 self.backAct.setWhatsThis(self.trUtf8( 560 self.backAct.setWhatsThis(self.trUtf8(
565 """<b>Backward</b>""" 561 """<b>Backward</b>"""
566 """<p>Moves one help screen backward. If none is""" 562 """<p>Moves one help screen backward. If none is"""
567 """ available, this action is disabled.</p>""" 563 """ available, this action is disabled.</p>"""
568 )) 564 ))
569 self.connect(self.backAct, SIGNAL('triggered()'), self.__backward) 565 self.backAct.triggered.connect(self.__backward)
570 self.__actions.append(self.backAct) 566 self.__actions.append(self.backAct)
571 567
572 self.forwardAct = E5Action(self.trUtf8('Forward'), 568 self.forwardAct = E5Action(self.trUtf8('Forward'),
573 UI.PixmapCache.getIcon("forward.png"), 569 UI.PixmapCache.getIcon("forward.png"),
574 self.trUtf8('&Forward'), 570 self.trUtf8('&Forward'),
579 self.forwardAct.setWhatsThis(self.trUtf8( 575 self.forwardAct.setWhatsThis(self.trUtf8(
580 """<b>Forward</b>""" 576 """<b>Forward</b>"""
581 """<p>Moves one help screen forward. If none is""" 577 """<p>Moves one help screen forward. If none is"""
582 """ available, this action is disabled.</p>""" 578 """ available, this action is disabled.</p>"""
583 )) 579 ))
584 self.connect(self.forwardAct, SIGNAL('triggered()'), self.__forward) 580 self.forwardAct.triggered.connect(self.__forward)
585 self.__actions.append(self.forwardAct) 581 self.__actions.append(self.forwardAct)
586 582
587 self.homeAct = E5Action(self.trUtf8('Home'), 583 self.homeAct = E5Action(self.trUtf8('Home'),
588 UI.PixmapCache.getIcon("home.png"), 584 UI.PixmapCache.getIcon("home.png"),
589 self.trUtf8('&Home'), 585 self.trUtf8('&Home'),
592 self.homeAct.setStatusTip(self.trUtf8('Move to the initial help screen')) 588 self.homeAct.setStatusTip(self.trUtf8('Move to the initial help screen'))
593 self.homeAct.setWhatsThis(self.trUtf8( 589 self.homeAct.setWhatsThis(self.trUtf8(
594 """<b>Home</b>""" 590 """<b>Home</b>"""
595 """<p>Moves to the initial help screen.</p>""" 591 """<p>Moves to the initial help screen.</p>"""
596 )) 592 ))
597 self.connect(self.homeAct, SIGNAL('triggered()'), self.__home) 593 self.homeAct.triggered.connect(self.__home)
598 self.__actions.append(self.homeAct) 594 self.__actions.append(self.homeAct)
599 595
600 self.reloadAct = E5Action(self.trUtf8('Reload'), 596 self.reloadAct = E5Action(self.trUtf8('Reload'),
601 UI.PixmapCache.getIcon("reload.png"), 597 UI.PixmapCache.getIcon("reload.png"),
602 self.trUtf8('&Reload'), 598 self.trUtf8('&Reload'),
606 self.reloadAct.setStatusTip(self.trUtf8('Reload the current help screen')) 602 self.reloadAct.setStatusTip(self.trUtf8('Reload the current help screen'))
607 self.reloadAct.setWhatsThis(self.trUtf8( 603 self.reloadAct.setWhatsThis(self.trUtf8(
608 """<b>Reload</b>""" 604 """<b>Reload</b>"""
609 """<p>Reloads the current help screen.</p>""" 605 """<p>Reloads the current help screen.</p>"""
610 )) 606 ))
611 self.connect(self.reloadAct, SIGNAL('triggered()'), self.__reload) 607 self.reloadAct.triggered.connect(self.__reload)
612 self.__actions.append(self.reloadAct) 608 self.__actions.append(self.reloadAct)
613 609
614 self.stopAct = E5Action(self.trUtf8('Stop'), 610 self.stopAct = E5Action(self.trUtf8('Stop'),
615 UI.PixmapCache.getIcon("stopLoading.png"), 611 UI.PixmapCache.getIcon("stopLoading.png"),
616 self.trUtf8('&Stop'), 612 self.trUtf8('&Stop'),
620 self.stopAct.setStatusTip(self.trUtf8('Stop loading')) 616 self.stopAct.setStatusTip(self.trUtf8('Stop loading'))
621 self.stopAct.setWhatsThis(self.trUtf8( 617 self.stopAct.setWhatsThis(self.trUtf8(
622 """<b>Stop</b>""" 618 """<b>Stop</b>"""
623 """<p>Stops loading of the current tab.</p>""" 619 """<p>Stops loading of the current tab.</p>"""
624 )) 620 ))
625 self.connect(self.stopAct, SIGNAL('triggered()'), self.__stopLoading) 621 self.stopAct.triggered.connect(self.__stopLoading)
626 self.__actions.append(self.stopAct) 622 self.__actions.append(self.stopAct)
627 623
628 self.copyAct = E5Action(self.trUtf8('Copy'), 624 self.copyAct = E5Action(self.trUtf8('Copy'),
629 UI.PixmapCache.getIcon("editCopy.png"), 625 UI.PixmapCache.getIcon("editCopy.png"),
630 self.trUtf8('&Copy'), 626 self.trUtf8('&Copy'),
633 self.copyAct.setStatusTip(self.trUtf8('Copy the selected text')) 629 self.copyAct.setStatusTip(self.trUtf8('Copy the selected text'))
634 self.copyAct.setWhatsThis(self.trUtf8( 630 self.copyAct.setWhatsThis(self.trUtf8(
635 """<b>Copy</b>""" 631 """<b>Copy</b>"""
636 """<p>Copy the selected text to the clipboard.</p>""" 632 """<p>Copy the selected text to the clipboard.</p>"""
637 )) 633 ))
638 self.connect(self.copyAct, SIGNAL('triggered()'), self.__copy) 634 self.copyAct.triggered.connect(self.__copy)
639 self.__actions.append(self.copyAct) 635 self.__actions.append(self.copyAct)
640 636
641 self.findAct = E5Action(self.trUtf8('Find...'), 637 self.findAct = E5Action(self.trUtf8('Find...'),
642 UI.PixmapCache.getIcon("find.png"), 638 UI.PixmapCache.getIcon("find.png"),
643 self.trUtf8('&Find...'), 639 self.trUtf8('&Find...'),
646 self.findAct.setStatusTip(self.trUtf8('Find text in page')) 642 self.findAct.setStatusTip(self.trUtf8('Find text in page'))
647 self.findAct.setWhatsThis(self.trUtf8( 643 self.findAct.setWhatsThis(self.trUtf8(
648 """<b>Find</b>""" 644 """<b>Find</b>"""
649 """<p>Find text in the current page.</p>""" 645 """<p>Find text in the current page.</p>"""
650 )) 646 ))
651 self.connect(self.findAct, SIGNAL('triggered()'), self.__find) 647 self.findAct.triggered.connect(self.__find)
652 self.__actions.append(self.findAct) 648 self.__actions.append(self.findAct)
653 649
654 self.findNextAct = E5Action(self.trUtf8('Find next'), 650 self.findNextAct = E5Action(self.trUtf8('Find next'),
655 UI.PixmapCache.getIcon("findNext.png"), 651 UI.PixmapCache.getIcon("findNext.png"),
656 self.trUtf8('Find &next'), 652 self.trUtf8('Find &next'),
660 self.findNextAct.setWhatsThis(self.trUtf8( 656 self.findNextAct.setWhatsThis(self.trUtf8(
661 """<b>Find next</b>""" 657 """<b>Find next</b>"""
662 """<p>Find the next occurrence of text in the current page.</p>""" 658 """<p>Find the next occurrence of text in the current page.</p>"""
663 )) 659 ))
664 if not self.initShortcutsOnly: 660 if not self.initShortcutsOnly:
665 self.connect(self.findNextAct, SIGNAL('triggered()'), self.findDlg.findNext) 661 self.findNextAct.triggered.connect(self.findDlg.findNext)
666 self.__actions.append(self.findNextAct) 662 self.__actions.append(self.findNextAct)
667 663
668 self.findPrevAct = E5Action(self.trUtf8('Find previous'), 664 self.findPrevAct = E5Action(self.trUtf8('Find previous'),
669 UI.PixmapCache.getIcon("findPrev.png"), 665 UI.PixmapCache.getIcon("findPrev.png"),
670 self.trUtf8('Find &previous'), 666 self.trUtf8('Find &previous'),
675 self.findPrevAct.setWhatsThis(self.trUtf8( 671 self.findPrevAct.setWhatsThis(self.trUtf8(
676 """<b>Find previous</b>""" 672 """<b>Find previous</b>"""
677 """<p>Find the previous occurrence of text in the current page.</p>""" 673 """<p>Find the previous occurrence of text in the current page.</p>"""
678 )) 674 ))
679 if not self.initShortcutsOnly: 675 if not self.initShortcutsOnly:
680 self.connect(self.findPrevAct, SIGNAL('triggered()'), 676 self.findPrevAct.triggered.connect(self.findDlg.findPrevious)
681 self.findDlg.findPrevious)
682 self.__actions.append(self.findPrevAct) 677 self.__actions.append(self.findPrevAct)
683 678
684 self.bookmarksManageAct = E5Action(self.trUtf8('Manage Bookmarks'), 679 self.bookmarksManageAct = E5Action(self.trUtf8('Manage Bookmarks'),
685 self.trUtf8('&Manage Bookmarks...'), 680 self.trUtf8('&Manage Bookmarks...'),
686 QKeySequence(self.trUtf8("Ctrl+Shift+B", "Help|Manage bookmarks")), 681 QKeySequence(self.trUtf8("Ctrl+Shift+B", "Help|Manage bookmarks")),
689 'Open a dialog to manage the bookmarks.')) 684 'Open a dialog to manage the bookmarks.'))
690 self.bookmarksManageAct.setWhatsThis(self.trUtf8( 685 self.bookmarksManageAct.setWhatsThis(self.trUtf8(
691 """<b>Manage Bookmarks...</b>""" 686 """<b>Manage Bookmarks...</b>"""
692 """<p>Open a dialog to manage the bookmarks.</p>""" 687 """<p>Open a dialog to manage the bookmarks.</p>"""
693 )) 688 ))
694 self.connect(self.bookmarksManageAct, SIGNAL('triggered()'), 689 self.bookmarksManageAct.triggered.connect(self.__showBookmarksDialog)
695 self.__showBookmarksDialog)
696 self.__actions.append(self.bookmarksManageAct) 690 self.__actions.append(self.bookmarksManageAct)
697 691
698 self.bookmarksAddAct = E5Action(self.trUtf8('Add Bookmark'), 692 self.bookmarksAddAct = E5Action(self.trUtf8('Add Bookmark'),
699 UI.PixmapCache.getIcon("addBookmark.png"), 693 UI.PixmapCache.getIcon("addBookmark.png"),
700 self.trUtf8('Add &Bookmark...'), 694 self.trUtf8('Add &Bookmark...'),
704 self.bookmarksAddAct.setStatusTip(self.trUtf8('Open a dialog to add a bookmark.')) 698 self.bookmarksAddAct.setStatusTip(self.trUtf8('Open a dialog to add a bookmark.'))
705 self.bookmarksAddAct.setWhatsThis(self.trUtf8( 699 self.bookmarksAddAct.setWhatsThis(self.trUtf8(
706 """<b>Add Bookmark</b>""" 700 """<b>Add Bookmark</b>"""
707 """<p>Open a dialog to add the current URL as a bookmark.</p>""" 701 """<p>Open a dialog to add the current URL as a bookmark.</p>"""
708 )) 702 ))
709 self.connect(self.bookmarksAddAct, SIGNAL('triggered()'), self.__addBookmark) 703 self.bookmarksAddAct.triggered.connect(self.__addBookmark)
710 self.__actions.append(self.bookmarksAddAct) 704 self.__actions.append(self.bookmarksAddAct)
711 705
712 self.bookmarksAddFolderAct = E5Action(self.trUtf8('Add Folder'), 706 self.bookmarksAddFolderAct = E5Action(self.trUtf8('Add Folder'),
713 self.trUtf8('Add &Folder...'), 707 self.trUtf8('Add &Folder...'),
714 0, 0, self, 'help_bookmark_show_all') 708 0, 0, self, 'help_bookmark_show_all')
716 'Open a dialog to add a new bookmarks folder.')) 710 'Open a dialog to add a new bookmarks folder.'))
717 self.bookmarksAddFolderAct.setWhatsThis(self.trUtf8( 711 self.bookmarksAddFolderAct.setWhatsThis(self.trUtf8(
718 """<b>Add Folder...</b>""" 712 """<b>Add Folder...</b>"""
719 """<p>Open a dialog to add a new bookmarks folder.</p>""" 713 """<p>Open a dialog to add a new bookmarks folder.</p>"""
720 )) 714 ))
721 self.connect(self.bookmarksAddFolderAct, SIGNAL('triggered()'), 715 self.bookmarksAddFolderAct.triggered.connect(self.__addBookmarkFolder)
722 self.__addBookmarkFolder)
723 self.__actions.append(self.bookmarksAddFolderAct) 716 self.__actions.append(self.bookmarksAddFolderAct)
724 717
725 self.bookmarksAllTabsAct = E5Action(self.trUtf8('Bookmark All Tabs'), 718 self.bookmarksAllTabsAct = E5Action(self.trUtf8('Bookmark All Tabs'),
726 self.trUtf8('Bookmark All Tabs...'), 719 self.trUtf8('Bookmark All Tabs...'),
727 0, 0, self, 'help_bookmark_all_tabs') 720 0, 0, self, 'help_bookmark_all_tabs')
730 self.bookmarksAllTabsAct.setWhatsThis(self.trUtf8( 723 self.bookmarksAllTabsAct.setWhatsThis(self.trUtf8(
731 """<b>Bookmark All Tabs...</b>""" 724 """<b>Bookmark All Tabs...</b>"""
732 """<p>Open a dialog to add a new bookmarks folder for""" 725 """<p>Open a dialog to add a new bookmarks folder for"""
733 """ all open tabs.</p>""" 726 """ all open tabs.</p>"""
734 )) 727 ))
735 self.connect(self.bookmarksAllTabsAct, SIGNAL('triggered()'), 728 self.bookmarksAllTabsAct.triggered.connect(self.__bookmarkAll)
736 self.__bookmarkAll)
737 self.__actions.append(self.bookmarksAllTabsAct) 729 self.__actions.append(self.bookmarksAllTabsAct)
738 730
739 self.whatsThisAct = E5Action(self.trUtf8('What\'s This?'), 731 self.whatsThisAct = E5Action(self.trUtf8('What\'s This?'),
740 UI.PixmapCache.getIcon("whatsThis.png"), 732 UI.PixmapCache.getIcon("whatsThis.png"),
741 self.trUtf8('&What\'s This?'), 733 self.trUtf8('&What\'s This?'),
748 """ question mark, and you can click on the interface elements to get""" 740 """ question mark, and you can click on the interface elements to get"""
749 """ a short description of what they do and how to use them. In""" 741 """ a short description of what they do and how to use them. In"""
750 """ dialogs, this feature can be accessed using the context help button""" 742 """ dialogs, this feature can be accessed using the context help button"""
751 """ in the titlebar.</p>""" 743 """ in the titlebar.</p>"""
752 )) 744 ))
753 self.connect(self.whatsThisAct, SIGNAL('triggered()'), self.__whatsThis) 745 self.whatsThisAct.triggered.connect(self.__whatsThis)
754 self.__actions.append(self.whatsThisAct) 746 self.__actions.append(self.whatsThisAct)
755 747
756 self.aboutAct = E5Action(self.trUtf8('About'), 748 self.aboutAct = E5Action(self.trUtf8('About'),
757 self.trUtf8('&About'), 749 self.trUtf8('&About'),
758 0, 0, self, 'help_help_about') 750 0, 0, self, 'help_help_about')
759 self.aboutAct.setStatusTip(self.trUtf8('Display information about this software')) 751 self.aboutAct.setStatusTip(self.trUtf8('Display information about this software'))
760 self.aboutAct.setWhatsThis(self.trUtf8( 752 self.aboutAct.setWhatsThis(self.trUtf8(
761 """<b>About</b>""" 753 """<b>About</b>"""
762 """<p>Display some information about this software.</p>""" 754 """<p>Display some information about this software.</p>"""
763 )) 755 ))
764 self.connect(self.aboutAct, SIGNAL('triggered()'), self.__about) 756 self.aboutAct.triggered.connect(self.__about)
765 self.__actions.append(self.aboutAct) 757 self.__actions.append(self.aboutAct)
766 758
767 self.aboutQtAct = E5Action(self.trUtf8('About Qt'), 759 self.aboutQtAct = E5Action(self.trUtf8('About Qt'),
768 self.trUtf8('About &Qt'), 760 self.trUtf8('About &Qt'),
769 0, 0, self, 'help_help_about_qt') 761 0, 0, self, 'help_help_about_qt')
771 self.trUtf8('Display information about the Qt toolkit')) 763 self.trUtf8('Display information about the Qt toolkit'))
772 self.aboutQtAct.setWhatsThis(self.trUtf8( 764 self.aboutQtAct.setWhatsThis(self.trUtf8(
773 """<b>About Qt</b>""" 765 """<b>About Qt</b>"""
774 """<p>Display some information about the Qt toolkit.</p>""" 766 """<p>Display some information about the Qt toolkit.</p>"""
775 )) 767 ))
776 self.connect(self.aboutQtAct, SIGNAL('triggered()'), self.__aboutQt) 768 self.aboutQtAct.triggered.connect(self.__aboutQt)
777 self.__actions.append(self.aboutQtAct) 769 self.__actions.append(self.aboutQtAct)
778 770
779 self.zoomInAct = E5Action(self.trUtf8('Zoom in'), 771 self.zoomInAct = E5Action(self.trUtf8('Zoom in'),
780 UI.PixmapCache.getIcon("zoomIn.png"), 772 UI.PixmapCache.getIcon("zoomIn.png"),
781 self.trUtf8('Zoom &in'), 773 self.trUtf8('Zoom &in'),
784 self.zoomInAct.setStatusTip(self.trUtf8('Zoom in on the text')) 776 self.zoomInAct.setStatusTip(self.trUtf8('Zoom in on the text'))
785 self.zoomInAct.setWhatsThis(self.trUtf8( 777 self.zoomInAct.setWhatsThis(self.trUtf8(
786 """<b>Zoom in</b>""" 778 """<b>Zoom in</b>"""
787 """<p>Zoom in on the text. This makes the text bigger.</p>""" 779 """<p>Zoom in on the text. This makes the text bigger.</p>"""
788 )) 780 ))
789 self.connect(self.zoomInAct, SIGNAL('triggered()'), self.__zoomIn) 781 self.zoomInAct.triggered.connect(self.__zoomIn)
790 self.__actions.append(self.zoomInAct) 782 self.__actions.append(self.zoomInAct)
791 783
792 self.zoomOutAct = E5Action(self.trUtf8('Zoom out'), 784 self.zoomOutAct = E5Action(self.trUtf8('Zoom out'),
793 UI.PixmapCache.getIcon("zoomOut.png"), 785 UI.PixmapCache.getIcon("zoomOut.png"),
794 self.trUtf8('Zoom &out'), 786 self.trUtf8('Zoom &out'),
797 self.zoomOutAct.setStatusTip(self.trUtf8('Zoom out on the text')) 789 self.zoomOutAct.setStatusTip(self.trUtf8('Zoom out on the text'))
798 self.zoomOutAct.setWhatsThis(self.trUtf8( 790 self.zoomOutAct.setWhatsThis(self.trUtf8(
799 """<b>Zoom out</b>""" 791 """<b>Zoom out</b>"""
800 """<p>Zoom out on the text. This makes the text smaller.</p>""" 792 """<p>Zoom out on the text. This makes the text smaller.</p>"""
801 )) 793 ))
802 self.connect(self.zoomOutAct, SIGNAL('triggered()'), self.__zoomOut) 794 self.zoomOutAct.triggered.connect(self.__zoomOut)
803 self.__actions.append(self.zoomOutAct) 795 self.__actions.append(self.zoomOutAct)
804 796
805 self.zoomResetAct = E5Action(self.trUtf8('Zoom reset'), 797 self.zoomResetAct = E5Action(self.trUtf8('Zoom reset'),
806 UI.PixmapCache.getIcon("zoomReset.png"), 798 UI.PixmapCache.getIcon("zoomReset.png"),
807 self.trUtf8('Zoom &reset'), 799 self.trUtf8('Zoom &reset'),
811 self.zoomResetAct.setWhatsThis(self.trUtf8( 803 self.zoomResetAct.setWhatsThis(self.trUtf8(
812 """<b>Zoom reset</b>""" 804 """<b>Zoom reset</b>"""
813 """<p>Reset the zoom of the text. """ 805 """<p>Reset the zoom of the text. """
814 """This sets the zoom factor to 100%.</p>""" 806 """This sets the zoom factor to 100%.</p>"""
815 )) 807 ))
816 self.connect(self.zoomResetAct, SIGNAL('triggered()'), self.__zoomReset) 808 self.zoomResetAct.triggered.connect(self.__zoomReset)
817 self.__actions.append(self.zoomResetAct) 809 self.__actions.append(self.zoomResetAct)
818 810
819 if hasattr(QWebSettings, 'ZoomTextOnly'): 811 if hasattr(QWebSettings, 'ZoomTextOnly'):
820 self.zoomTextOnlyAct = E5Action(self.trUtf8('Zoom text only'), 812 self.zoomTextOnlyAct = E5Action(self.trUtf8('Zoom text only'),
821 self.trUtf8('Zoom &text only'), 813 self.trUtf8('Zoom &text only'),
840 self.pageSourceAct.setStatusTip(self.trUtf8('Show the page source in an editor')) 832 self.pageSourceAct.setStatusTip(self.trUtf8('Show the page source in an editor'))
841 self.pageSourceAct.setWhatsThis(self.trUtf8( 833 self.pageSourceAct.setWhatsThis(self.trUtf8(
842 """<b>Show page source</b>""" 834 """<b>Show page source</b>"""
843 """<p>Show the page source in an editor.</p>""" 835 """<p>Show the page source in an editor.</p>"""
844 )) 836 ))
845 self.connect(self.pageSourceAct, SIGNAL('triggered()'), self.__showPageSource) 837 self.pageSourceAct.triggered.connect(self.__showPageSource)
846 self.__actions.append(self.pageSourceAct) 838 self.__actions.append(self.pageSourceAct)
847 self.addAction(self.pageSourceAct) 839 self.addAction(self.pageSourceAct)
848 840
849 self.fullScreenAct = E5Action(self.trUtf8('Full Screen'), 841 self.fullScreenAct = E5Action(self.trUtf8('Full Screen'),
850 UI.PixmapCache.getIcon("windowFullscreen.png"), 842 UI.PixmapCache.getIcon("windowFullscreen.png"),
851 self.trUtf8('&Full Screen'), 843 self.trUtf8('&Full Screen'),
852 QKeySequence(self.trUtf8('F11')), 0, 844 QKeySequence(self.trUtf8('F11')), 0,
853 self, 'help_view_full_scree') 845 self, 'help_view_full_scree')
854 self.connect(self.fullScreenAct, SIGNAL('triggered()'), self.__viewFullScreen) 846 self.fullScreenAct.triggered.connect(self.__viewFullScreen)
855 self.__actions.append(self.fullScreenAct) 847 self.__actions.append(self.fullScreenAct)
856 self.addAction(self.fullScreenAct) 848 self.addAction(self.fullScreenAct)
857 849
858 self.nextTabAct = E5Action(self.trUtf8('Show next tab'), 850 self.nextTabAct = E5Action(self.trUtf8('Show next tab'),
859 self.trUtf8('Show next tab'), 851 self.trUtf8('Show next tab'),
860 QKeySequence(self.trUtf8('Ctrl+Alt+Tab')), 0, 852 QKeySequence(self.trUtf8('Ctrl+Alt+Tab')), 0,
861 self, 'help_view_next_tab') 853 self, 'help_view_next_tab')
862 self.connect(self.nextTabAct, SIGNAL('triggered()'), self.__nextTab) 854 self.nextTabAct.triggered.connect(self.__nextTab)
863 self.__actions.append(self.nextTabAct) 855 self.__actions.append(self.nextTabAct)
864 self.addAction(self.nextTabAct) 856 self.addAction(self.nextTabAct)
865 857
866 self.prevTabAct = E5Action(self.trUtf8('Show previous tab'), 858 self.prevTabAct = E5Action(self.trUtf8('Show previous tab'),
867 self.trUtf8('Show previous tab'), 859 self.trUtf8('Show previous tab'),
868 QKeySequence(self.trUtf8('Shift+Ctrl+Alt+Tab')), 0, 860 QKeySequence(self.trUtf8('Shift+Ctrl+Alt+Tab')), 0,
869 self, 'help_view_previous_tab') 861 self, 'help_view_previous_tab')
870 self.connect(self.prevTabAct, SIGNAL('triggered()'), self.__prevTab) 862 self.prevTabAct.triggered.connect(self.__prevTab)
871 self.__actions.append(self.prevTabAct) 863 self.__actions.append(self.prevTabAct)
872 self.addAction(self.prevTabAct) 864 self.addAction(self.prevTabAct)
873 865
874 self.switchTabAct = E5Action(self.trUtf8('Switch between tabs'), 866 self.switchTabAct = E5Action(self.trUtf8('Switch between tabs'),
875 self.trUtf8('Switch between tabs'), 867 self.trUtf8('Switch between tabs'),
876 QKeySequence(self.trUtf8('Ctrl+1')), 0, 868 QKeySequence(self.trUtf8('Ctrl+1')), 0,
877 self, 'help_switch_tabs') 869 self, 'help_switch_tabs')
878 self.connect(self.switchTabAct, SIGNAL('triggered()'), self.__switchTab) 870 self.switchTabAct.triggered.connect(self.__switchTab)
879 self.__actions.append(self.switchTabAct) 871 self.__actions.append(self.switchTabAct)
880 self.addAction(self.switchTabAct) 872 self.addAction(self.switchTabAct)
881 873
882 self.prefAct = E5Action(self.trUtf8('Preferences'), 874 self.prefAct = E5Action(self.trUtf8('Preferences'),
883 UI.PixmapCache.getIcon("configure.png"), 875 UI.PixmapCache.getIcon("configure.png"),
886 self.prefAct.setWhatsThis(self.trUtf8( 878 self.prefAct.setWhatsThis(self.trUtf8(
887 """<b>Preferences</b>""" 879 """<b>Preferences</b>"""
888 """<p>Set the configuration items of the application""" 880 """<p>Set the configuration items of the application"""
889 """ with your prefered values.</p>""" 881 """ with your prefered values.</p>"""
890 )) 882 ))
891 self.connect(self.prefAct, SIGNAL('triggered()'), self.__showPreferences) 883 self.prefAct.triggered.connect(self.__showPreferences)
892 self.__actions.append(self.prefAct) 884 self.__actions.append(self.prefAct)
893 885
894 self.acceptedLanguagesAct = E5Action(self.trUtf8('Languages'), 886 self.acceptedLanguagesAct = E5Action(self.trUtf8('Languages'),
895 UI.PixmapCache.getIcon("flag.png"), 887 UI.PixmapCache.getIcon("flag.png"),
896 self.trUtf8('&Languages...'), 0, 0, self, 'help_accepted_languages') 888 self.trUtf8('&Languages...'), 0, 0, self, 'help_accepted_languages')
898 'Configure the accepted languages for web pages')) 890 'Configure the accepted languages for web pages'))
899 self.acceptedLanguagesAct.setWhatsThis(self.trUtf8( 891 self.acceptedLanguagesAct.setWhatsThis(self.trUtf8(
900 """<b>Languages</b>""" 892 """<b>Languages</b>"""
901 """<p>Configure the accepted languages for web pages.</p>""" 893 """<p>Configure the accepted languages for web pages.</p>"""
902 )) 894 ))
903 self.connect(self.acceptedLanguagesAct, SIGNAL('triggered()'), 895 self.acceptedLanguagesAct.triggered.connect(self.__showAcceptedLanguages)
904 self.__showAcceptedLanguages)
905 self.__actions.append(self.acceptedLanguagesAct) 896 self.__actions.append(self.acceptedLanguagesAct)
906 897
907 self.cookiesAct = E5Action(self.trUtf8('Cookies'), 898 self.cookiesAct = E5Action(self.trUtf8('Cookies'),
908 UI.PixmapCache.getIcon("cookie.png"), 899 UI.PixmapCache.getIcon("cookie.png"),
909 self.trUtf8('C&ookies...'), 0, 0, self, 'help_cookies') 900 self.trUtf8('C&ookies...'), 0, 0, self, 'help_cookies')
911 'Configure cookies handling')) 902 'Configure cookies handling'))
912 self.cookiesAct.setWhatsThis(self.trUtf8( 903 self.cookiesAct.setWhatsThis(self.trUtf8(
913 """<b>Cookies</b>""" 904 """<b>Cookies</b>"""
914 """<p>Configure cookies handling.</p>""" 905 """<p>Configure cookies handling.</p>"""
915 )) 906 ))
916 self.connect(self.cookiesAct, SIGNAL('triggered()'), 907 self.cookiesAct.triggered.connect(self.__showCookiesConfiguration)
917 self.__showCookiesConfiguration)
918 self.__actions.append(self.cookiesAct) 908 self.__actions.append(self.cookiesAct)
919 909
920 self.offlineStorageAct = E5Action(self.trUtf8('Offline Storage'), 910 self.offlineStorageAct = E5Action(self.trUtf8('Offline Storage'),
921 UI.PixmapCache.getIcon("preferences-html5.png"), 911 UI.PixmapCache.getIcon("preferences-html5.png"),
922 self.trUtf8('Offline &Storage...'), 0, 0, self, 'help_offline_storage') 912 self.trUtf8('Offline &Storage...'), 0, 0, self, 'help_offline_storage')
924 'Configure offline storage')) 914 'Configure offline storage'))
925 self.offlineStorageAct.setWhatsThis(self.trUtf8( 915 self.offlineStorageAct.setWhatsThis(self.trUtf8(
926 """<b>Offline Storage</b>""" 916 """<b>Offline Storage</b>"""
927 """<p>Opens a dialog to configure offline storage.</p>""" 917 """<p>Opens a dialog to configure offline storage.</p>"""
928 )) 918 ))
929 self.connect(self.offlineStorageAct, SIGNAL('triggered()'), 919 self.offlineStorageAct.triggered.connect(self.__showOfflineStorageConfiguration)
930 self.__showOfflineStorageConfiguration)
931 self.__actions.append(self.offlineStorageAct) 920 self.__actions.append(self.offlineStorageAct)
932 921
933 self.syncTocAct = E5Action(self.trUtf8('Sync with Table of Contents'), 922 self.syncTocAct = E5Action(self.trUtf8('Sync with Table of Contents'),
934 UI.PixmapCache.getIcon("syncToc.png"), 923 UI.PixmapCache.getIcon("syncToc.png"),
935 self.trUtf8('Sync with Table of Contents'), 924 self.trUtf8('Sync with Table of Contents'),
938 'Synchronizes the table of contents with current page')) 927 'Synchronizes the table of contents with current page'))
939 self.syncTocAct.setWhatsThis(self.trUtf8( 928 self.syncTocAct.setWhatsThis(self.trUtf8(
940 """<b>Sync with Table of Contents</b>""" 929 """<b>Sync with Table of Contents</b>"""
941 """<p>Synchronizes the table of contents with current page.</p>""" 930 """<p>Synchronizes the table of contents with current page.</p>"""
942 )) 931 ))
943 self.connect(self.syncTocAct, SIGNAL('triggered()'), self.__syncTOC) 932 self.syncTocAct.triggered.connect(self.__syncTOC)
944 self.__actions.append(self.syncTocAct) 933 self.__actions.append(self.syncTocAct)
945 934
946 self.showTocAct = E5Action(self.trUtf8('Table of Contents'), 935 self.showTocAct = E5Action(self.trUtf8('Table of Contents'),
947 self.trUtf8('Table of Contents'), 936 self.trUtf8('Table of Contents'),
948 0, 0, self, 'help_show_toc') 937 0, 0, self, 'help_show_toc')
950 'Shows the table of contents window')) 939 'Shows the table of contents window'))
951 self.showTocAct.setWhatsThis(self.trUtf8( 940 self.showTocAct.setWhatsThis(self.trUtf8(
952 """<b>Table of Contents</b>""" 941 """<b>Table of Contents</b>"""
953 """<p>Shows the table of contents window.</p>""" 942 """<p>Shows the table of contents window.</p>"""
954 )) 943 ))
955 self.connect(self.showTocAct, SIGNAL('triggered()'), self.__showTocWindow) 944 self.showTocAct.triggered.connect(self.__showTocWindow)
956 self.__actions.append(self.showTocAct) 945 self.__actions.append(self.showTocAct)
957 946
958 self.showIndexAct = E5Action(self.trUtf8('Index'), 947 self.showIndexAct = E5Action(self.trUtf8('Index'),
959 self.trUtf8('Index'), 948 self.trUtf8('Index'),
960 0, 0, self, 'help_show_index') 949 0, 0, self, 'help_show_index')
962 'Shows the index window')) 951 'Shows the index window'))
963 self.showIndexAct.setWhatsThis(self.trUtf8( 952 self.showIndexAct.setWhatsThis(self.trUtf8(
964 """<b>Index</b>""" 953 """<b>Index</b>"""
965 """<p>Shows the index window.</p>""" 954 """<p>Shows the index window.</p>"""
966 )) 955 ))
967 self.connect(self.showIndexAct, SIGNAL('triggered()'), self.__showIndexWindow) 956 self.showIndexAct.triggered.connect(self.__showIndexWindow)
968 self.__actions.append(self.showIndexAct) 957 self.__actions.append(self.showIndexAct)
969 958
970 self.showSearchAct = E5Action(self.trUtf8('Search'), 959 self.showSearchAct = E5Action(self.trUtf8('Search'),
971 self.trUtf8('Search'), 960 self.trUtf8('Search'),
972 0, 0, self, 'help_show_search') 961 0, 0, self, 'help_show_search')
974 'Shows the search window')) 963 'Shows the search window'))
975 self.showSearchAct.setWhatsThis(self.trUtf8( 964 self.showSearchAct.setWhatsThis(self.trUtf8(
976 """<b>Search</b>""" 965 """<b>Search</b>"""
977 """<p>Shows the search window.</p>""" 966 """<p>Shows the search window.</p>"""
978 )) 967 ))
979 self.connect(self.showSearchAct, SIGNAL('triggered()'), self.__showSearchWindow) 968 self.showSearchAct.triggered.connect(self.__showSearchWindow)
980 self.__actions.append(self.showSearchAct) 969 self.__actions.append(self.showSearchAct)
981 970
982 self.manageQtHelpDocsAct = E5Action(self.trUtf8('Manage QtHelp Documents'), 971 self.manageQtHelpDocsAct = E5Action(self.trUtf8('Manage QtHelp Documents'),
983 self.trUtf8('Manage QtHelp &Documents'), 972 self.trUtf8('Manage QtHelp &Documents'),
984 0, 0, self, 'help_qthelp_documents') 973 0, 0, self, 'help_qthelp_documents')
986 'Shows a dialog to manage the QtHelp documentation set')) 975 'Shows a dialog to manage the QtHelp documentation set'))
987 self.manageQtHelpDocsAct.setWhatsThis(self.trUtf8( 976 self.manageQtHelpDocsAct.setWhatsThis(self.trUtf8(
988 """<b>Manage QtHelp Documents</b>""" 977 """<b>Manage QtHelp Documents</b>"""
989 """<p>Shows a dialog to manage the QtHelp documentation set.</p>""" 978 """<p>Shows a dialog to manage the QtHelp documentation set.</p>"""
990 )) 979 ))
991 self.connect(self.manageQtHelpDocsAct, SIGNAL('triggered()'), 980 self.manageQtHelpDocsAct.triggered.connect(self.__manageQtHelpDocumentation)
992 self.__manageQtHelpDocumentation)
993 self.__actions.append(self.manageQtHelpDocsAct) 981 self.__actions.append(self.manageQtHelpDocsAct)
994 982
995 self.manageQtHelpFiltersAct = E5Action(self.trUtf8('Manage QtHelp Filters'), 983 self.manageQtHelpFiltersAct = E5Action(self.trUtf8('Manage QtHelp Filters'),
996 self.trUtf8('Manage QtHelp &Filters'), 984 self.trUtf8('Manage QtHelp &Filters'),
997 0, 0, self, 'help_qthelp_filters') 985 0, 0, self, 'help_qthelp_filters')
999 'Shows a dialog to manage the QtHelp filters')) 987 'Shows a dialog to manage the QtHelp filters'))
1000 self.manageQtHelpFiltersAct.setWhatsThis(self.trUtf8( 988 self.manageQtHelpFiltersAct.setWhatsThis(self.trUtf8(
1001 """<b>Manage QtHelp Filters</b>""" 989 """<b>Manage QtHelp Filters</b>"""
1002 """<p>Shows a dialog to manage the QtHelp filters.</p>""" 990 """<p>Shows a dialog to manage the QtHelp filters.</p>"""
1003 )) 991 ))
1004 self.connect(self.manageQtHelpFiltersAct, SIGNAL('triggered()'), 992 self.manageQtHelpFiltersAct.triggered.connect(self.__manageQtHelpFilters)
1005 self.__manageQtHelpFilters)
1006 self.__actions.append(self.manageQtHelpFiltersAct) 993 self.__actions.append(self.manageQtHelpFiltersAct)
1007 994
1008 self.reindexDocumentationAct = E5Action(self.trUtf8('Reindex Documentation'), 995 self.reindexDocumentationAct = E5Action(self.trUtf8('Reindex Documentation'),
1009 self.trUtf8('&Reindex Documentation'), 996 self.trUtf8('&Reindex Documentation'),
1010 0, 0, self, 'help_qthelp_reindex') 997 0, 0, self, 'help_qthelp_reindex')
1013 self.reindexDocumentationAct.setWhatsThis(self.trUtf8( 1000 self.reindexDocumentationAct.setWhatsThis(self.trUtf8(
1014 """<b>Reindex Documentation</b>""" 1001 """<b>Reindex Documentation</b>"""
1015 """<p>Reindexes the documentation set.</p>""" 1002 """<p>Reindexes the documentation set.</p>"""
1016 )) 1003 ))
1017 if not self.initShortcutsOnly: 1004 if not self.initShortcutsOnly:
1018 self.connect(self.reindexDocumentationAct, SIGNAL('triggered()'), 1005 self.reindexDocumentationAct.triggered.connect(self.__searchEngine.reindexDocumentation)
1019 self.__searchEngine.reindexDocumentation)
1020 self.__actions.append(self.reindexDocumentationAct) 1006 self.__actions.append(self.reindexDocumentationAct)
1021 1007
1022 self.clearPrivateDataAct = E5Action(self.trUtf8('Clear private data'), 1008 self.clearPrivateDataAct = E5Action(self.trUtf8('Clear private data'),
1023 self.trUtf8('&Clear private data'), 1009 self.trUtf8('&Clear private data'),
1024 0, 0, 1010 0, 0,
1027 self.clearPrivateDataAct.setWhatsThis(self.trUtf8( 1013 self.clearPrivateDataAct.setWhatsThis(self.trUtf8(
1028 """<b>Clear private data</b>""" 1014 """<b>Clear private data</b>"""
1029 """<p>Clears the private data like browsing history, search history""" 1015 """<p>Clears the private data like browsing history, search history"""
1030 """ or the favicons database.</p>""" 1016 """ or the favicons database.</p>"""
1031 )) 1017 ))
1032 self.connect(self.clearPrivateDataAct, SIGNAL('triggered()'), 1018 self.clearPrivateDataAct.triggered.connect(self.__clearPrivateData)
1033 self.__clearPrivateData)
1034 self.__actions.append(self.clearPrivateDataAct) 1019 self.__actions.append(self.clearPrivateDataAct)
1035 1020
1036 self.clearIconsAct = E5Action(self.trUtf8('Clear icons database'), 1021 self.clearIconsAct = E5Action(self.trUtf8('Clear icons database'),
1037 self.trUtf8('Clear &icons database'), 1022 self.trUtf8('Clear &icons database'),
1038 0, 0, 1023 0, 0,
1040 self.clearIconsAct.setStatusTip(self.trUtf8('Clear the database of favicons')) 1025 self.clearIconsAct.setStatusTip(self.trUtf8('Clear the database of favicons'))
1041 self.clearIconsAct.setWhatsThis(self.trUtf8( 1026 self.clearIconsAct.setWhatsThis(self.trUtf8(
1042 """<b>Clear icons database</b>""" 1027 """<b>Clear icons database</b>"""
1043 """<p>Clears the database of favicons of previously visited URLs.</p>""" 1028 """<p>Clears the database of favicons of previously visited URLs.</p>"""
1044 )) 1029 ))
1045 self.connect(self.clearIconsAct, SIGNAL('triggered()'), self.__clearIconsDatabase) 1030 self.clearIconsAct.triggered.connect(self.__clearIconsDatabase)
1046 self.__actions.append(self.clearIconsAct) 1031 self.__actions.append(self.clearIconsAct)
1047 1032
1048 self.searchEnginesAct = E5Action(self.trUtf8('Configure Search Engines'), 1033 self.searchEnginesAct = E5Action(self.trUtf8('Configure Search Engines'),
1049 self.trUtf8('Configure Search &Engines...'), 1034 self.trUtf8('Configure Search &Engines...'),
1050 0, 0, 1035 0, 0,
1053 'Configure the available search engines')) 1038 'Configure the available search engines'))
1054 self.searchEnginesAct.setWhatsThis(self.trUtf8( 1039 self.searchEnginesAct.setWhatsThis(self.trUtf8(
1055 """<b>Configure Search Engines...</b>""" 1040 """<b>Configure Search Engines...</b>"""
1056 """<p>Opens a dialog to configure the available search engines.</p>""" 1041 """<p>Opens a dialog to configure the available search engines.</p>"""
1057 )) 1042 ))
1058 self.connect(self.searchEnginesAct, SIGNAL('triggered()'), 1043 self.searchEnginesAct.triggered.connect(self.__showEnginesConfigurationDialog)
1059 self.__showEnginesConfigurationDialog)
1060 self.__actions.append(self.searchEnginesAct) 1044 self.__actions.append(self.searchEnginesAct)
1061 1045
1062 self.passwordsAct = E5Action(self.trUtf8('Manage Saved Passwords'), 1046 self.passwordsAct = E5Action(self.trUtf8('Manage Saved Passwords'),
1063 self.trUtf8('Manage Saved Passwords...'), 1047 self.trUtf8('Manage Saved Passwords...'),
1064 0, 0, 1048 0, 0,
1067 'Manage the saved passwords')) 1051 'Manage the saved passwords'))
1068 self.passwordsAct.setWhatsThis(self.trUtf8( 1052 self.passwordsAct.setWhatsThis(self.trUtf8(
1069 """<b>Manage Saved Passwords...</b>""" 1053 """<b>Manage Saved Passwords...</b>"""
1070 """<p>Opens a dialog to manage the saved passwords.</p>""" 1054 """<p>Opens a dialog to manage the saved passwords.</p>"""
1071 )) 1055 ))
1072 self.connect(self.passwordsAct, SIGNAL('triggered()'), 1056 self.passwordsAct.triggered.connect(self.__showPasswordsDialog)
1073 self.__showPasswordsDialog)
1074 self.__actions.append(self.passwordsAct) 1057 self.__actions.append(self.passwordsAct)
1075 1058
1076 self.adblockAct = E5Action(self.trUtf8('Ad Block'), 1059 self.adblockAct = E5Action(self.trUtf8('Ad Block'),
1077 self.trUtf8('&Ad Block...'), 1060 self.trUtf8('&Ad Block...'),
1078 0, 0, 1061 0, 0,
1081 'Configure AdBlock subscriptions and rules')) 1064 'Configure AdBlock subscriptions and rules'))
1082 self.adblockAct.setWhatsThis(self.trUtf8( 1065 self.adblockAct.setWhatsThis(self.trUtf8(
1083 """<b>Ad Block...</b>""" 1066 """<b>Ad Block...</b>"""
1084 """<p>Opens a dialog to configure AdBlock subscriptions and rules.</p>""" 1067 """<p>Opens a dialog to configure AdBlock subscriptions and rules.</p>"""
1085 )) 1068 ))
1086 self.connect(self.adblockAct, SIGNAL('triggered()'), 1069 self.adblockAct.triggered.connect(self.__showAdBlockDialog)
1087 self.__showAdBlockDialog)
1088 self.__actions.append(self.adblockAct) 1070 self.__actions.append(self.adblockAct)
1089 1071
1090 self.toolsMonitorAct = E5Action(self.trUtf8('Show Network Monitor'), 1072 self.toolsMonitorAct = E5Action(self.trUtf8('Show Network Monitor'),
1091 self.trUtf8('Show &Network Monitor'), 1073 self.trUtf8('Show &Network Monitor'),
1092 0, 0, 1074 0, 0,
1094 self.toolsMonitorAct.setStatusTip(self.trUtf8('Show the network monitor dialog')) 1076 self.toolsMonitorAct.setStatusTip(self.trUtf8('Show the network monitor dialog'))
1095 self.toolsMonitorAct.setWhatsThis(self.trUtf8( 1077 self.toolsMonitorAct.setWhatsThis(self.trUtf8(
1096 """<b>Show Network Monitor</b>""" 1078 """<b>Show Network Monitor</b>"""
1097 """<p>Shows the network monitor dialog.</p>""" 1079 """<p>Shows the network monitor dialog.</p>"""
1098 )) 1080 ))
1099 self.connect(self.toolsMonitorAct, SIGNAL('triggered()'), 1081 self.toolsMonitorAct.triggered.connect(self.__showNetworkMonitor)
1100 self.__showNetworkMonitor)
1101 self.__actions.append(self.toolsMonitorAct) 1082 self.__actions.append(self.toolsMonitorAct)
1102 1083
1103 self.backAct.setEnabled(False) 1084 self.backAct.setEnabled(False)
1104 self.forwardAct.setEnabled(False) 1085 self.forwardAct.setEnabled(False)
1105 1086

eric ide

mercurial