Helpviewer/HelpWindow.py

changeset 3034
7ce719013078
parent 3022
57179e4cdadd
child 3035
36e9f388958b
equal deleted inserted replaced
3033:58fe260e7469 3034:7ce719013078
349 Utilities.getConfigDir(), "browser", "webdatabases") 349 Utilities.getConfigDir(), "browser", "webdatabases")
350 if not os.path.exists(webDatabaseDir): 350 if not os.path.exists(webDatabaseDir):
351 os.makedirs(webDatabaseDir) 351 os.makedirs(webDatabaseDir)
352 settings.setOfflineStoragePath(webDatabaseDir) 352 settings.setOfflineStoragePath(webDatabaseDir)
353 settings.setOfflineStorageDefaultQuota( 353 settings.setOfflineStorageDefaultQuota(
354 Preferences.getHelp("OfflineStorageDatabaseQuota") * \ 354 Preferences.getHelp("OfflineStorageDatabaseQuota") *
355 1024 * 1024) 355 1024 * 1024)
356 356
357 if hasattr(QWebSettings, "OfflineWebApplicationCacheEnabled"): 357 if hasattr(QWebSettings, "OfflineWebApplicationCacheEnabled"):
358 settings.setAttribute( 358 settings.setAttribute(
359 QWebSettings.OfflineWebApplicationCacheEnabled, 359 QWebSettings.OfflineWebApplicationCacheEnabled,
362 Utilities.getConfigDir(), "browser", "webappcaches") 362 Utilities.getConfigDir(), "browser", "webappcaches")
363 if not os.path.exists(appCacheDir): 363 if not os.path.exists(appCacheDir):
364 os.makedirs(appCacheDir) 364 os.makedirs(appCacheDir)
365 settings.setOfflineWebApplicationCachePath(appCacheDir) 365 settings.setOfflineWebApplicationCachePath(appCacheDir)
366 settings.setOfflineWebApplicationCacheQuota( 366 settings.setOfflineWebApplicationCacheQuota(
367 Preferences.getHelp("OfflineWebApplicationCacheQuota") * \ 367 Preferences.getHelp("OfflineWebApplicationCacheQuota") *
368 1024 * 1024) 368 1024 * 1024)
369 369
370 if hasattr(QWebSettings, "LocalStorageEnabled"): 370 if hasattr(QWebSettings, "LocalStorageEnabled"):
371 settings.setAttribute( 371 settings.setAttribute(
372 QWebSettings.LocalStorageEnabled, 372 QWebSettings.LocalStorageEnabled,
3565 Private slot to react upon changes of the VirusTotal search text. 3565 Private slot to react upon changes of the VirusTotal search text.
3566 3566
3567 @param txt contents of the search (string) 3567 @param txt contents of the search (string)
3568 """ 3568 """
3569 self.virustotalSearchAct.setEnabled( 3569 self.virustotalSearchAct.setEnabled(
3570 txt != "" and \ 3570 txt != "" and
3571 Preferences.getHelp("VirusTotalEnabled") and \ 3571 Preferences.getHelp("VirusTotalEnabled") and
3572 Preferences.getHelp("VirusTotalServiceKey") != "") 3572 Preferences.getHelp("VirusTotalServiceKey") != "")
3573 3573
3574 def __virusTotalSearch(self): 3574 def __virusTotalSearch(self):
3575 """ 3575 """
3576 Private slot to search VirusTotal for a given entry. 3576 Private slot to search VirusTotal for a given entry.

eric ide

mercurial