From 20bb3a65bb4aa199a22f126266af836c4e2ec592 Mon Sep 17 00:00:00 2001 From: Dimitrios Christidis Date: Sun, 10 Feb 2013 13:01:47 +0200 Subject: Open new tabs in the foreground. Adds a new configuration option (disabled by default) to open links in new tabs in the foreground. BUG: 313794 REVIEW: 108801 Signed-off-by: Andrea Diamantini --- src/rekonq.kcfg | 3 +++ src/settings/settings_tabs.ui | 7 +++++++ src/tabwindow/tabwindow.cpp | 8 ++++++++ 3 files changed, 18 insertions(+) (limited to 'src') diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg index 6303dcde..3cb7989c 100644 --- a/src/rekonq.kcfg +++ b/src/rekonq.kcfg @@ -122,6 +122,9 @@ true + + false + diff --git a/src/settings/settings_tabs.ui b/src/settings/settings_tabs.ui index 5b367a8d..27e68238 100644 --- a/src/settings/settings_tabs.ui +++ b/src/settings/settings_tabs.ui @@ -222,6 +222,13 @@ + + + + Open new tabs in the foreground + + + diff --git a/src/tabwindow/tabwindow.cpp b/src/tabwindow/tabwindow.cpp index d0e6dbce..3910467b 100644 --- a/src/tabwindow/tabwindow.cpp +++ b/src/tabwindow/tabwindow.cpp @@ -266,6 +266,14 @@ void TabWindow::loadUrl(const KUrl &url, Rekonq::OpenType type, TabHistory *hist switch (type) { case Rekonq::NewTab: + tab = prepareNewTab(); + _openedTabsCounter++; + insertTab(currentIndex() + _openedTabsCounter, tab, i18n("new tab")); + if (ReKonfig::openNewTabsInForeground()) + { + setCurrentWidget(tab); + } + break; case Rekonq::NewBackGroundTab: tab = prepareNewTab(); _openedTabsCounter++; -- cgit v1.2.1