X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserPC.git;a=blobdiff_plain;f=src%2Fwindows%2FBrowserWindow.cpp;h=6df64f3ee95c558882c20d54f33dd1848712ae3b;hp=716f2e0c58f57dea8d676a00c660ebf697ac58c1;hb=b516206c4d278640374cbfe244a5510e5ac70b54;hpb=aa9a6b20db5e2c808b390b62704f28bd649e283c diff --git a/src/windows/BrowserWindow.cpp b/src/windows/BrowserWindow.cpp index 716f2e0..6df64f3 100644 --- a/src/windows/BrowserWindow.cpp +++ b/src/windows/BrowserWindow.cpp @@ -351,6 +351,14 @@ BrowserWindow::BrowserWindow(bool firstWindow) : KXmlGuiWindow() connect(f11ShortcutPointer, SIGNAL(activated()), fullScreenActionPointer, SLOT(trigger())); connect(escapeShortcutPointer, SIGNAL(activated()), this, SLOT(escape())); + // Populate the UI. + // This must be done here, because otherwise, if a URL is loaded, like a local file, that does not trigger a call to TabWidget::applyDomainSettings, the UI will not be fully populated. + updateJavaScriptAction(Settings::javaScriptEnabled()); + updateLocalStorageAction(Settings::localStorageEnabled()); + updateDomStorageAction(Settings::domStorageEnabled()); + updateUserAgentActions(UserAgentHelper::getUserAgentFromDatabaseName(Settings::userAgent()), true); + updateZoomFactorAction(Settings::zoomFactor()); + // Load the initial website if this is the first window. if (firstWindow) tabWidgetPointer->loadInitialWebsite(); @@ -1018,6 +1026,7 @@ void BrowserWindow::updateUserAgentActions(const QString &userAgent, const bool } // Update the custom user agent enabled boolean. + // This is not done when the current user agent is a custom one but it is temporarially being changed via on-the-fly settings so that the user can switch back to the custom user agent. if (updateCustomUserAgentStatus) customUserAgentEnabled = customUserAgent;