summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainwindow.cpp6
-rw-r--r--src/rekonq.kcfg3
-rw-r--r--src/settings/settings_tabs.ui10
3 files changed, 19 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index d413e217..b4174191 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -511,6 +511,12 @@ void MainWindow::updateConfiguration()
// ============== General ==================
m_view->updateTabBar();
+ // ============== Tabs ==================
+ if (ReKonfig::closeTabSelectPrevious())
+ m_view->tabBar()->setSelectionBehaviorOnRemove(QTabBar::SelectPreviousTab);
+ else
+ m_view->tabBar()->setSelectionBehaviorOnRemove(QTabBar::SelectRightTab);
+
// =========== Fonts ==============
QWebSettings *defaultSettings = QWebSettings::globalSettings();
diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg
index d6fde9e8..6b926552 100644
--- a/src/rekonq.kcfg
+++ b/src/rekonq.kcfg
@@ -57,6 +57,9 @@
<entry name="alwaysShowTabPreviews" type="Bool">
<default>true</default>
</entry>
+ <entry name="closeTabSelectPrevious" type="Bool">
+ <default>false</default>
+ </entry>
</group>
diff --git a/src/settings/settings_tabs.ui b/src/settings/settings_tabs.ui
index ba903ff4..9104843a 100644
--- a/src/settings/settings_tabs.ui
+++ b/src/settings/settings_tabs.ui
@@ -58,6 +58,16 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QCheckBox" name="kcfg_closeTabSelectPrevious">
+ <property name="text">
+ <string>Activate previously used tab when closing the current one</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>