diff options
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index f242439f..ff500b4a 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -502,7 +502,9 @@ void MainWindow::setupActions() // User Agent a = new KAction(KIcon("preferences-web-browser-identification"), i18n("Browser Identification"), this); actionCollection()->addAction(QL1S("useragent"), a); - a->setMenu(rApp->userAgentManager()->userAgentMenu()); + KMenu *uaMenu = new KMenu(this); + a->setMenu(uaMenu); + connect(uaMenu, SIGNAL(aboutToShow()), this, SLOT(populateUserAgentMenu())); // Editable Page a = new KAction(KIcon("document-edit"), i18n("Set Editable"), this); @@ -1497,3 +1499,10 @@ void MainWindow::closeEvent(QCloseEvent *event) kDebug() << "CLOSING WINDOW..."; KXmlGuiWindow::closeEvent(event); } + + +void MainWindow::populateUserAgentMenu() +{ + KMenu *uaMenu = static_cast<KMenu *>(QObject::sender()); + rApp->userAgentManager()->populateUAMenuForTabUrl(uaMenu, currentTab()); +} |