diff options
author | Dimitrios Christidis <dchristidis@ceid.upatras.gr> | 2013-02-10 13:01:47 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2013-02-12 09:25:04 +0100 |
commit | 20bb3a65bb4aa199a22f126266af836c4e2ec592 (patch) | |
tree | c9ad604837a9d325272e74ca34b5e7293224dad3 | |
parent | SVN_SILENT made messages (.desktop file) (diff) | |
download | rekonq-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>
-rw-r--r-- | src/rekonq.kcfg | 3 | ||||
-rw-r--r-- | src/settings/settings_tabs.ui | 7 | ||||
-rw-r--r-- | src/tabwindow/tabwindow.cpp | 8 |
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++; |