summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2013-03-16 14:46:38 +0100
committerAndrea Diamantini <adjam7@gmail.com>2013-03-16 14:46:38 +0100
commit8242b29dcf4465216f9b87e6e0dbe44087ff49c1 (patch)
treedd6e8b0655a7d709322075aec6594bd6a38393c5
parentcmake: push deps to 2.8.9 to fully support KDE 4.10 (basically, nepomuk) (diff)
downloadrekonq-8242b29dcf4465216f9b87e6e0dbe44087ff49c1.tar.xz
open url as webapp option
-rw-r--r--src/application.cpp12
-rw-r--r--src/rekonq_defines.h3
-rw-r--r--src/tabwindow/rekonqwindow.cpp1
3 files changed, 12 insertions, 4 deletions
diff --git a/src/application.cpp b/src/application.cpp
index a2d428d7..7fe23f20 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -150,9 +150,7 @@ int Application::newInstance()
}
kDebug() << "URL: " << u;
- WebTab *tab = newWebApp();
- connect(tab->page(), SIGNAL(pageCreated(WebPage*)), this, SLOT(pageCreated(WebPage*)));
- tab->view()->load(u);
+ loadUrl(u, Rekonq::WebApp);
if (isFirstLoad)
{
@@ -525,6 +523,14 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type)
return;
}
+ if (type == Rekonq::WebApp)
+ {
+ WebTab *tab = newWebApp();
+ connect(tab->page(), SIGNAL(pageCreated(WebPage*)), this, SLOT(pageCreated(WebPage*)));
+ tab->view()->load(url);
+ return;
+ }
+
Rekonq::OpenType newType = type;
// Don't open useless tabs or windows for actions in about: pages
if (url.url().contains("about:") && url.url().contains("/"))
diff --git a/src/rekonq_defines.h b/src/rekonq_defines.h
index a97fe24d..814e7599 100644
--- a/src/rekonq_defines.h
+++ b/src/rekonq_defines.h
@@ -78,7 +78,8 @@ enum OpenType
NewFocusedTab, ///< open url in new tab and focus it
NewBackGroundTab, ///< open url in new background tab
NewWindow, ///< open url in new window
- NewPrivateWindow ///< open url in new private window
+ NewPrivateWindow, ///< open url in new private window
+ WebApp ///< open url in a web app window
};
/**
diff --git a/src/tabwindow/rekonqwindow.cpp b/src/tabwindow/rekonqwindow.cpp
index 9d0b0e23..0e4dfd03 100644
--- a/src/tabwindow/rekonqwindow.cpp
+++ b/src/tabwindow/rekonqwindow.cpp
@@ -134,6 +134,7 @@ void RekonqWindow::loadUrl(const KUrl &url, Rekonq::OpenType type, TabHistory *h
{
case Rekonq::NewWindow:
case Rekonq::NewPrivateWindow:
+ case Rekonq::WebApp:
rApp->loadUrl(url, type);
return;