X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=src%2Fwindows%2FBrowserWindow.cpp;h=064c7eda22b7a70c4152306250e4fcd257f8bb30;hb=150a354325500a3c3f8f8f7ee0e0ee30cd631205;hp=8d2417179119626908faa1576bb8df5bd41643fd;hpb=0d23ee5e9b43b247cdda0a4cbb73f8b1a70f4500;p=PrivacyBrowserPC.git diff --git a/src/windows/BrowserWindow.cpp b/src/windows/BrowserWindow.cpp index 8d24171..064c7ed 100644 --- a/src/windows/BrowserWindow.cpp +++ b/src/windows/BrowserWindow.cpp @@ -40,7 +40,7 @@ #include // Construct the class. -BrowserWindow::BrowserWindow() : KXmlGuiWindow() +BrowserWindow::BrowserWindow(bool firstWindow) : KXmlGuiWindow() { // Initialize the variables. javaScriptEnabled = false; @@ -175,7 +175,7 @@ BrowserWindow::BrowserWindow() : KXmlGuiWindow() zoomFactorActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("zoom"))); domainSettingsActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("settings-configure"))); cookiesActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("preferences-web-browser-cookies"))); - domStorageActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("view-web-browser-dom-tree"))); + domStorageActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("code-class"))); // Update the on-the-fly menus. connect(tabWidgetPointer, SIGNAL(updateUserAgentActions(QString, bool)), this, SLOT(updateUserAgentActions(QString, bool))); @@ -247,6 +247,9 @@ BrowserWindow::BrowserWindow() : KXmlGuiWindow() // Update the URL line edit on page loads. connect(tabWidgetPointer, SIGNAL(updateUrlLineEdit(QUrl)), this, SLOT(updateUrlLineEdit(QUrl))); + // Update the window title. + connect(tabWidgetPointer, SIGNAL(updateWindowTitle(const QString)), this, SLOT(updateWindowTitle(const QString))); + // Get a handle for the status bar. QStatusBar *statusBarPointer = statusBar(); @@ -289,8 +292,9 @@ BrowserWindow::BrowserWindow() : KXmlGuiWindow() connect(f11ShortcutPointer, SIGNAL(activated()), fullScreenActionPointer, SLOT(trigger())); connect(escapeShortcutPointer, SIGNAL(activated()), this, SLOT(escape())); - // Load the initial website. - tabWidgetPointer->loadInitialWebsite(); + // Load the initial website if this is the first window. + if (firstWindow) + tabWidgetPointer->loadInitialWebsite(); } void BrowserWindow::addOrEditDomainSettings() const @@ -943,3 +947,9 @@ void BrowserWindow::updateUserAgentLabel(const QString &userAgentDatabaseName) c // Update the user agent label. userAgentLabelPointer->setText(UserAgentHelper::getUserAgentFromDatabaseName(userAgentDatabaseName)); } + +void BrowserWindow::updateWindowTitle(const QString &title) +{ + // Update the window title. + setWindowTitle(title); +}