summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rekonq.kcfg3
-rw-r--r--src/settings/settings_tabs.ui7
-rw-r--r--src/tabwindow/tabwindow.cpp8
3 files changed, 18 insertions, 0 deletions
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 @@
<entry name="openNewTabsNextToCurrent" type="Bool">
<default>true</default>
</entry>
+ <entry name="openNewTabsInForeground" type="Bool">
+ <default>false</default>
+ </entry>
</group>
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 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QCheckBox" name="kcfg_openNewTabsInForeground">
+ <property name="text">
+ <string>Open new tabs in the foreground</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
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++;