From 89d4696eae6bb7b9824f4c0687fbf27b2551a0e0 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 7 Nov 2010 23:34:43 +0100 Subject: API clean up urlBar --> currentUrlBar --- src/mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index d5f82d97..5f508506 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -591,8 +591,8 @@ void MainWindow::openLocation() { setWidgetsVisible(true); } - m_view->urlBar()->selectAll(); - m_view->urlBar()->setFocus(); + m_view->currentUrlBar()->selectAll(); + m_view->currentUrlBar()->setFocus(); } -- cgit v1.2.1 From fe21365ffafb922a6b24959f3d1096e4c6171427 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 19 Nov 2010 01:32:04 +0100 Subject: Print && Find actions for the parts :) - handle print & find with different signals in mainwindow - show right tab title (moving titleChanged signal from view to tab) --- src/mainwindow.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 5f508506..f662d7aa 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -72,6 +72,9 @@ #include #include +#include +#include + // Qt Includes #include @@ -707,6 +710,25 @@ void MainWindow::printRequested(QWebFrame *frame) if (!currentTab()) return; + if(currentTab()->page()->isOnRekonqPage()) + { + // trigger print part action instead of ours.. + KParts::ReadOnlyPart *p = currentTab()->part(); + if(p) + { + KParts::BrowserExtension *ext = p->browserExtension(); + if(ext) + { + KParts::BrowserExtension::ActionSlotMap *actionSlotMap = KParts::BrowserExtension::actionSlotMapPtr(); + + connect(this, SIGNAL(triggerPartPrint()), ext, actionSlotMap->value("print")); + emit triggerPartPrint(); + + return; + } + } + } + QWebFrame *printFrame = 0; if (frame == 0) { @@ -753,6 +775,18 @@ void MainWindow::findNext() if (!currentTab()) return; + if(currentTab()->page()->isOnRekonqPage()) + { + // trigger part find action + KParts::ReadOnlyPart *p = currentTab()->part(); + if(p) + { + connect(this, SIGNAL(triggerPartFind()), p, SLOT(slotFind())); + emit triggerPartFind(); + return; + } + } + if (m_findBar->isHidden()) { QPoint previous_position = currentTab()->view()->page()->currentFrame()->scrollPosition(); -- cgit v1.2.1