summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDimitrios Christidis <dchristidis@ceid.upatras.gr>2013-02-10 13:01:47 +0200
committerAndrea Diamantini <adjam7@gmail.com>2013-02-12 09:25:04 +0100
commit20bb3a65bb4aa199a22f126266af836c4e2ec592 (patch)
treec9ad604837a9d325272e74ca34b5e7293224dad3 /src
parentSVN_SILENT made messages (.desktop file) (diff)
downloadrekonq-20bb3a65bb4aa199a22f126266af836c4e2ec592.tar.xz
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 <adjam7@gmail.com>
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++;