From aadf1ccd77d413375d66a33967e0960f156e7355 Mon Sep 17 00:00:00 2001 From: Yoann Laissus Date: Mon, 28 Nov 2011 23:45:25 +0100 Subject: =?UTF-8?q?GCI=20Task=20:=20Don't=20open=20useless=20tabs=20or=20w?= =?UTF-8?q?indows=20for=20actions=20in=20the=20new=20tab=20page=20Patch=20?= =?UTF-8?q?by=20H=C3=BCseyin=20Zengin.=20Thanks=20!=20REVIEW:=20103257?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/application.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/application.cpp') diff --git a/src/application.cpp b/src/application.cpp index 14e34686..27dca44f 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -414,18 +414,25 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type) 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("/")) + newType = Rekonq::CurrentTab; + // first, create the webview(s) to not let hangs UI.. WebTab *tab = 0; MainWindow *w = 0; - w = (type == Rekonq::NewWindow) + w = (newType == Rekonq::NewWindow) ? newMainWindow() : mainWindow(); - switch (type) + switch (newType) { case Rekonq::NewTab: if (ReKonfig::openTabNoWindow()) + { tab = w->mainView()->newWebTab(!ReKonfig::openTabsBack()); + } else { w = newMainWindow(); -- cgit v1.2.1