diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mainwindow.cpp | 20 | ||||
-rw-r--r-- | src/webpage.cpp | 19 | ||||
-rw-r--r-- | src/webpage.h | 5 | ||||
-rw-r--r-- | src/webpluginfactory.cpp | 8 | ||||
-rw-r--r-- | src/webpluginfactory.h | 1 |
5 files changed, 35 insertions, 18 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 867d2a32..6efd58ed 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1011,12 +1011,19 @@ void MainWindow::openPrevious(Qt::MouseButtons btn) QWebHistory *history = currentTab()->view()->history(); if (history->canGoBack()) { - KUrl back = history->backItem().url(); if(btn == Qt::MidButton) + { + KUrl back = history->backItem().url(); Application::instance()->loadUrl(back, Rekonq::SettingOpenTab); + } else - Application::instance()->loadUrl(back); + { + history->goToItem(history->backItem()); + } + + updateActions(); } + } @@ -1025,11 +1032,16 @@ void MainWindow::openNext(Qt::MouseButtons btn) QWebHistory *history = currentTab()->view()->history(); if (history->canGoForward()) { - KUrl next = history->forwardItem().url(); if(btn == Qt::MidButton) + { + KUrl next = history->forwardItem().url(); Application::instance()->loadUrl(next, Rekonq::SettingOpenTab); + } else - Application::instance()->loadUrl(next); + { + history->goToItem(history->forwardItem()); + } + updateActions(); } } diff --git a/src/webpage.cpp b/src/webpage.cpp index 06e733b0..71cc8be4 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -271,9 +271,22 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) } } // case KParts::BrowserRun::Embed - KUrl::List list; - list.append(url); - KRun::run(*offer,url,0); + QString html; + html += "<html>"; + html += "<head>"; + html += "<title>"; + html += url.pathOrUrl(); + html += "</title>"; + html += "<style type=\"text/css\">"; + html += "* { border: 0; padding: 0; margin: 0; }"; + html += "</style>"; + html += "</head>"; + html += "<body>"; + html += "<embed src=\"" + url.pathOrUrl() + "\" width=\"100%\" height=\"100%\" />"; + html += "</body>"; + html += "</html>"; + + mainFrame()->setHtml(html, url); } } diff --git a/src/webpage.h b/src/webpage.h index 42d5f586..abc9833c 100644 --- a/src/webpage.h +++ b/src/webpage.h @@ -61,7 +61,6 @@ public: void showSSLInfo(); public slots: - void manageNetworkErrors(QNetworkReply *reply); virtual void downloadRequest(const QNetworkRequest &request); void downloadAllContentsWithKGet(); @@ -76,13 +75,13 @@ protected Q_SLOTS: virtual void handleUnsupportedContent(QNetworkReply *reply); private slots: + void manageNetworkErrors(QNetworkReply *reply); void loadFinished(bool); private: QString errorPage(QNetworkReply *); - + ProtocolHandler _protHandler; - WebSslInfo _sslInfo; }; diff --git a/src/webpluginfactory.cpp b/src/webpluginfactory.cpp index 9e4b8ba3..79a36aa0 100644 --- a/src/webpluginfactory.cpp +++ b/src/webpluginfactory.cpp @@ -47,12 +47,6 @@ WebPluginFactory::WebPluginFactory(QObject *parent) } -WebPluginFactory::~WebPluginFactory() -{ -} - - - void WebPluginFactory::setLoadClickToFlash(bool load) { _loadClickToFlash = load; @@ -69,7 +63,7 @@ QObject *WebPluginFactory::create(const QString &mimeType, switch( ReKonfig::pluginsEnabled() ) { case 0: - kDebug() << "No plugins found for" << mimeType << ". Falling back to QtWebKit ones..."; + kDebug() << "No plugins found for" << mimeType << ". Falling back to KDEWebKit ones..."; return KWebPluginFactory::create(mimeType, url, argumentNames, argumentValues); case 1: diff --git a/src/webpluginfactory.h b/src/webpluginfactory.h index 9e5028b2..85122d56 100644 --- a/src/webpluginfactory.h +++ b/src/webpluginfactory.h @@ -46,7 +46,6 @@ Q_OBJECT public: WebPluginFactory(QObject *parent); - ~WebPluginFactory(); virtual QObject *create(const QString &mimeType, const QUrl &url, |