5227 homeUrl = QUrl(home) |
5227 homeUrl = QUrl(home) |
5228 if not homeUrl.scheme(): |
5228 if not homeUrl.scheme(): |
5229 home = QUrl.fromLocalFile(home).toString() |
5229 home = QUrl.fromLocalFile(home).toString() |
5230 |
5230 |
5231 if WEBENGINE_AVAILABLE or WEBKIT_AVAILABLE: |
5231 if WEBENGINE_AVAILABLE or WEBKIT_AVAILABLE: |
5232 if not (useSingle or Preferences.getHelp("SingleHelpWindow")) or \ |
5232 single = useSingle |
5233 self.helpWindow is None: |
5233 if WEBENGINE_AVAILABLE: |
|
5234 single = single or \ |
|
5235 Preferences.getWebBrowser("SingleWebBrowserWindow") |
|
5236 elif WEBKIT_AVAILABLE: |
|
5237 single = single or Preferences.getHelp("SingleHelpWindow") |
|
5238 if not single or self.helpWindow is None: |
5234 if WEBENGINE_AVAILABLE: |
5239 if WEBENGINE_AVAILABLE: |
5235 from WebBrowser.WebBrowserWindow import WebBrowserWindow |
5240 from WebBrowser.WebBrowserWindow import WebBrowserWindow |
5236 help = WebBrowserWindow(home, '.', None, 'web_browser', |
5241 help = WebBrowserWindow(home, '.', None, 'web_browser', |
5237 True, searchWord=searchWord) |
5242 True, searchWord=searchWord) |
5238 elif WEBKIT_AVAILABLE: |
5243 elif WEBKIT_AVAILABLE: |
5244 QApplication.desktop().height() > 500: |
5249 QApplication.desktop().height() > 500: |
5245 help.show() |
5250 help.show() |
5246 else: |
5251 else: |
5247 help.showMaximized() |
5252 help.showMaximized() |
5248 |
5253 |
5249 if useSingle or Preferences.getHelp("SingleHelpWindow"): |
5254 if single: |
5250 self.helpWindow = help |
5255 self.helpWindow = help |
5251 try: |
5256 try: |
5252 self.helpWindow.webBrowserClosed.connect(self.__helpClosed) |
5257 self.helpWindow.webBrowserClosed.connect( |
|
5258 self.__helpClosed) |
5253 except AttributeError: |
5259 except AttributeError: |
5254 self.helpWindow.helpClosed.connect(self.__helpClosed) |
5260 self.helpWindow.helpClosed.connect(self.__helpClosed) |
5255 self.preferencesChanged.connect( |
5261 self.preferencesChanged.connect( |
5256 self.helpWindow.preferencesChanged) |
5262 self.helpWindow.preferencesChanged) |
5257 self.masterPasswordChanged.connect( |
5263 self.masterPasswordChanged.connect( |
5267 |
5273 |
5268 def __helpClosed(self): |
5274 def __helpClosed(self): |
5269 """ |
5275 """ |
5270 Private slot to handle the helpClosed signal of the help window. |
5276 Private slot to handle the helpClosed signal of the help window. |
5271 """ |
5277 """ |
5272 if Preferences.getHelp("SingleHelpWindow"): |
5278 if WEBENGINE_AVAILABLE: |
|
5279 single = Preferences.getWebBrowser("SingleWebBrowserWindow") |
|
5280 elif WEBKIT_AVAILABLE: |
|
5281 single = Preferences.getHelp("SingleHelpWindow") |
|
5282 if single: |
5273 self.preferencesChanged.disconnect( |
5283 self.preferencesChanged.disconnect( |
5274 self.helpWindow.preferencesChanged) |
5284 self.helpWindow.preferencesChanged) |
5275 self.masterPasswordChanged.disconnect( |
5285 self.masterPasswordChanged.disconnect( |
5276 self.helpWindow.masterPasswordChanged) |
5286 self.helpWindow.masterPasswordChanged) |
5277 self.helpWindow = None |
5287 self.helpWindow = None |
5325 """ |
5335 """ |
5326 from Preferences.ConfigurationDialog import ConfigurationDialog |
5336 from Preferences.ConfigurationDialog import ConfigurationDialog |
5327 dlg = ConfigurationDialog( |
5337 dlg = ConfigurationDialog( |
5328 self, 'Configuration', |
5338 self, 'Configuration', |
5329 expandedEntries=self.__expandedConfigurationEntries, |
5339 expandedEntries=self.__expandedConfigurationEntries, |
|
5340 webEngine=WEBENGINE_AVAILABLE, |
5330 ) |
5341 ) |
5331 dlg.preferencesChanged.connect(self.__preferencesChanged) |
5342 dlg.preferencesChanged.connect(self.__preferencesChanged) |
5332 dlg.masterPasswordChanged.connect(self.__masterPasswordChanged) |
5343 dlg.masterPasswordChanged.connect(self.__masterPasswordChanged) |
5333 dlg.show() |
5344 dlg.show() |
5334 if pageName is not None: |
5345 if pageName is not None: |