X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserPC.git;a=blobdiff_plain;f=src%2Fwindows%2FBrowserWindow.cpp;fp=src%2Fwindows%2FBrowserWindow.cpp;h=064c7eda22b7a70c4152306250e4fcd257f8bb30;hp=acf72db504019702db450969a89e17523b0a0681;hb=6acd73c4148bac2a8c2f637e70080a43b12fd14e;hpb=8689d74c8a97cbeb81b69bed8e195ed68bca2ee1 diff --git a/src/windows/BrowserWindow.cpp b/src/windows/BrowserWindow.cpp index acf72db..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; @@ -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); +}