#include <QStatusBar>
// Construct the class.
-BrowserWindow::BrowserWindow() : KXmlGuiWindow()
+BrowserWindow::BrowserWindow(bool firstWindow) : KXmlGuiWindow()
{
// Initialize the variables.
javaScriptEnabled = false;
// 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();
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
// Update the user agent label.
userAgentLabelPointer->setText(UserAgentHelper::getUserAgentFromDatabaseName(userAgentDatabaseName));
}
+
+void BrowserWindow::updateWindowTitle(const QString &title)
+{
+ // Update the window title.
+ setWindowTitle(title);
+}