356 [self.tr("Appearance"), "preferences-styles.png", |
356 [self.tr("Appearance"), "preferences-styles.png", |
357 "WebBrowserAppearancePage", "0webBrowserPage", None], |
357 "WebBrowserAppearancePage", "0webBrowserPage", None], |
358 "webBrowserPage": |
358 "webBrowserPage": |
359 [self.tr("eric6 Web Browser"), "ericWeb.png", |
359 [self.tr("eric6 Web Browser"), "ericWeb.png", |
360 "WebBrowserPage", "0webBrowserPage", None], |
360 "WebBrowserPage", "0webBrowserPage", None], |
361 "helpFlashCookieManagerPage": |
361 "webBrowserFlashCookieManagerPage": |
362 [self.tr("Flash Cookie Manager"), |
362 [self.tr("Flash Cookie Manager"), |
363 "flashCookie16.png", |
363 "flashCookie16.png", |
364 "HelpFlashCookieManagerPage", "0webBrowserPage", None], |
364 "WebBrowserFlashCookieManagerPage", "0webBrowserPage", |
|
365 None], |
365 "webBrowserVirusTotalPage": |
366 "webBrowserVirusTotalPage": |
366 [self.tr("VirusTotal Interface"), "virustotal.png", |
367 [self.tr("VirusTotal Interface"), "virustotal.png", |
367 "WebBrowserVirusTotalPage", "0webBrowserPage", None], |
368 "WebBrowserVirusTotalPage", "0webBrowserPage", None], |
368 }) |
369 }) |
369 if qVersionTuple() >= (5, 8, 0) and PYQT_VERSION >= 0x50800: |
370 if qVersionTuple() >= (5, 8, 0) and PYQT_VERSION >= 0x50800: |
372 [self.tr("Spell checking"), |
373 [self.tr("Spell checking"), |
373 "preferences-spellchecking.png", |
374 "preferences-spellchecking.png", |
374 "WebBrowserSpellCheckingPage", "0webBrowserPage", |
375 "WebBrowserSpellCheckingPage", "0webBrowserPage", |
375 None], |
376 None], |
376 }) |
377 }) |
377 else: |
|
378 try: |
|
379 from PyQt5 import QtWebKit # __IGNORE_WARNING__ |
|
380 self.configItems.update({ |
|
381 "0helpBrowserPage": |
|
382 [self.tr("Web Browser"), "ericWeb.png", |
|
383 None, None, None], |
|
384 "helpAppearancePage": |
|
385 [self.tr("Appearance"), "preferences-styles.png", |
|
386 "HelpAppearancePage", "0helpBrowserPage", None], |
|
387 "helpWebBrowserPage": |
|
388 [self.tr("eric6 Web Browser"), "ericWeb.png", |
|
389 "HelpWebBrowserPage", "0helpBrowserPage", None], |
|
390 "helpFlashCookieManagerPage": |
|
391 [self.tr("Flash Cookie Manager"), |
|
392 "flashCookie16.png", |
|
393 "HelpFlashCookieManagerPage", "0helpBrowserPage", |
|
394 None], |
|
395 "helpVirusTotalPage": |
|
396 [self.tr("VirusTotal Interface"), "virustotal.png", |
|
397 "HelpVirusTotalPage", "0helpBrowserPage", None], |
|
398 }) |
|
399 except ImportError: |
|
400 pass |
|
401 |
378 |
402 self.configItems.update( |
379 self.configItems.update( |
403 e5App().getObject("PluginManager").getPluginConfigData()) |
380 e5App().getObject("PluginManager").getPluginConfigData()) |
404 |
|
405 elif displayMode == ConfigurationWidget.HelpBrowserMode: |
|
406 self.configItems = { |
|
407 # key : [display string, pixmap name, dialog module name or |
|
408 # page creation function, parent key, |
|
409 # reference to configuration page (must always be last)] |
|
410 # The dialog module must have the module function 'create' to |
|
411 # create the configuration page. This must have the method |
|
412 # 'save' to save the settings. |
|
413 "interfacePage": |
|
414 [self.tr("Interface"), "preferences-interface.png", |
|
415 "HelpInterfacePage", None, None], |
|
416 "networkPage": |
|
417 [self.tr("Network"), "preferences-network.png", |
|
418 "NetworkPage", None, None], |
|
419 "printerPage": |
|
420 [self.tr("Printer"), "preferences-printer.png", |
|
421 "PrinterPage", None, None], |
|
422 "securityPage": |
|
423 [self.tr("Security"), "preferences-security.png", |
|
424 "SecurityPage", None, None], |
|
425 |
|
426 "helpDocumentationPage": |
|
427 [self.tr("Help Documentation"), |
|
428 "preferences-helpdocumentation.png", |
|
429 "HelpDocumentationPage", None, None], |
|
430 } |
|
431 try: |
|
432 from PyQt5 import QtWebKit # __IGNORE_WARNING__ |
|
433 self.configItems.update({ |
|
434 "helpAppearancePage": |
|
435 [self.tr("Appearance"), "preferences-styles.png", |
|
436 "HelpAppearancePage", None, None], |
|
437 "helpFlashCookieManagerPage": |
|
438 [self.tr("Flash Cookie Manager"), |
|
439 "flashCookie16.png", |
|
440 "HelpFlashCookieManagerPage", None, None], |
|
441 "helpVirusTotalPage": |
|
442 [self.tr("VirusTotal Interface"), "virustotal.png", |
|
443 "HelpVirusTotalPage", None, None], |
|
444 "helpWebBrowserPage": |
|
445 [self.tr("eric6 Web Browser"), "ericWeb.png", |
|
446 "HelpWebBrowserPage", None, None], |
|
447 }) |
|
448 except ImportError: |
|
449 pass |
|
450 |
381 |
451 elif displayMode == ConfigurationWidget.WebBrowserMode: |
382 elif displayMode == ConfigurationWidget.WebBrowserMode: |
452 self.configItems = { |
383 self.configItems = { |
453 # key : [display string, pixmap name, dialog module name or |
384 # key : [display string, pixmap name, dialog module name or |
454 # page creation function, parent key, |
385 # page creation function, parent key, |
479 "WebBrowserAppearancePage", None, None], |
410 "WebBrowserAppearancePage", None, None], |
480 "webBrowserPage": |
411 "webBrowserPage": |
481 [self.tr("eric6 Web Browser"), "ericWeb.png", |
412 [self.tr("eric6 Web Browser"), "ericWeb.png", |
482 "WebBrowserPage", None, None], |
413 "WebBrowserPage", None, None], |
483 |
414 |
484 "helpFlashCookieManagerPage": |
415 "webBrowserFlashCookieManagerPage": |
485 [self.tr("Flash Cookie Manager"), |
416 [self.tr("Flash Cookie Manager"), |
486 "flashCookie16.png", |
417 "flashCookie16.png", |
487 "HelpFlashCookieManagerPage", None, None], |
418 "WebBrowserFlashCookieManagerPage", None, None], |
488 "webBrowserVirusTotalPage": |
419 "webBrowserVirusTotalPage": |
489 [self.tr("VirusTotal Interface"), "virustotal.png", |
420 [self.tr("VirusTotal Interface"), "virustotal.png", |
490 "WebBrowserVirusTotalPage", None, None], |
421 "WebBrowserVirusTotalPage", None, None], |
491 } |
422 } |
492 |
423 |