summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorBenjamin Poulain <benjamin.poulain@nokia.com>2010-11-20 19:05:33 +0100
committerBenjamin Poulain <benjamin.poulain@nokia.com>2010-11-20 19:10:14 +0100
commit11769558f3f9107c45457ba7c735a1991e42f625 (patch)
treeffd7057c77794364291a030aa73aa534fb0ea863 /src/mainwindow.cpp
parentRemove the destructor of MainView (diff)
parentFix markup: (diff)
downloadrekonq-11769558f3f9107c45457ba7c735a1991e42f625.tar.xz
Merge branch 'master' of git://git.kde.org/rekonq
Conflicts: src/mainview.cpp src/mainview.h src/webtab.cpp src/webtab.h
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp38
1 files changed, 36 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index d5f82d97..f662d7aa 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -72,6 +72,9 @@
#include <KStandardDirs>
#include <KToggleFullScreenAction>
+#include <KParts/Part>
+#include <KParts/BrowserExtension>
+
// Qt Includes
#include <QtCore/QTimer>
@@ -591,8 +594,8 @@ void MainWindow::openLocation()
{
setWidgetsVisible(true);
}
- m_view->urlBar()->selectAll();
- m_view->urlBar()->setFocus();
+ m_view->currentUrlBar()->selectAll();
+ m_view->currentUrlBar()->setFocus();
}
@@ -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();