#include <QStatusBar>
// Construct the class.
-BrowserWindow::BrowserWindow() : KXmlGuiWindow()
+BrowserWindow::BrowserWindow(bool firstWindow) : KXmlGuiWindow()
{
// Initialize the variables.
javaScriptEnabled = false;
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)));
// 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);
+}