summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2013-10-19 18:29:05 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-10-19 19:17:13 +0200
commit6ad5175eaa9e2807193d009572ca1a997f14f480 (patch)
tree875cb3db7b8f27a1df6eddbf8f645b3cf70412b8
parent2a5554c07cb144d1df794427863ce19bbfa59155 (diff)
downloadtdebase-6ad5175eaa9e2807193d009572ca1a997f14f480.tar.gz
tdebase-6ad5175eaa9e2807193d009572ca1a997f14f480.zip
Add check box to control tabbar mouse wheel in konsole
This resolves Bug 909
-rw-r--r--kcontrol/konsole/kcmkonsoledialog.ui14
-rw-r--r--konsole/konsole/konsole.cpp23
-rw-r--r--konsole/konsole/konsole.h7
3 files changed, 30 insertions, 14 deletions
diff --git a/kcontrol/konsole/kcmkonsoledialog.ui b/kcontrol/konsole/kcmkonsoledialog.ui
index 0a47950de..30a7c12b0 100644
--- a/kcontrol/konsole/kcmkonsoledialog.ui
+++ b/kcontrol/konsole/kcmkonsoledialog.ui
@@ -174,7 +174,7 @@
<string>Use Ctrl+S/Ctrl+Q flow control</string>
</property>
</widget>
- <spacer row="11" column="3">
+ <spacer row="12" column="3">
<property name="name">
<cstring>Spacer3</cstring>
</property>
@@ -199,7 +199,7 @@
<string>Enable bidirectional text rendering</string>
</property>
</widget>
- <widget class="TQLabel" row="11" column="0">
+ <widget class="TQLabel" row="12" column="0">
<property name="name">
<cstring>SilenceLabel</cstring>
</property>
@@ -218,7 +218,7 @@
<cstring>silence_secondsSB</cstring>
</property>
</widget>
- <widget class="KIntNumInput" row="11" column="1" rowspan="1" colspan="2">
+ <widget class="KIntNumInput" row="12" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>silence_secondsSB</cstring>
</property>
@@ -234,7 +234,7 @@
<number>1</number>
</property>
</widget>
- <widget class="KIntNumInput" row="10" column="2">
+ <widget class="KIntNumInput" row="11" column="2">
<property name="name">
<cstring>line_spacingSB</cstring>
</property>
@@ -253,7 +253,7 @@
<number>8</number>
</property>
</widget>
- <widget class="TQLabel" row="10" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="11" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>TextLabel1_4</cstring>
</property>
@@ -272,7 +272,7 @@
<cstring>line_spacingSB</cstring>
</property>
</widget>
- <spacer row="10" column="3">
+ <spacer row="11" column="3">
<property name="name">
<cstring>Spacer2</cstring>
</property>
@@ -297,7 +297,7 @@
<string>Set tab title to match window title</string>
</property>
</widget>
- <widget class="TQCheckBox" row="12" column="0" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="10" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>tabsCycleWheel</cstring>
</property>
diff --git a/konsole/konsole/konsole.cpp b/konsole/konsole/konsole.cpp
index 25d9d65be..e187d51e4 100644
--- a/konsole/konsole/konsole.cpp
+++ b/konsole/konsole/konsole.cpp
@@ -17,6 +17,12 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
+
+ --------------------------------------------------------------
+ Additional changes:
+ - 2013/10/14 Michele Calgaro
+ add "scroll tabs on mouse wheel event" functionality
+
*/
/* The material contained in here more or less directly orginates from */
/* kvt, which is copyright (c) 1996 by Matthias Ettrich <ettrich@kde.org> */
@@ -910,8 +916,9 @@ void Konsole::makeTabWidget()
{
tabwidget = new KTabWidget(this);
tabwidget->setTabReorderingEnabled(true);
- tabwidget->setAutomaticResizeTabs( b_autoResizeTabs );
- tabwidget->setTabCloseActivatePrevious( true );
+ tabwidget->setAutomaticResizeTabs(b_autoResizeTabs);
+ tabwidget->setTabCloseActivatePrevious(true);
+ tabwidget->setMouseWheelScroll(b_mouseWheelScroll);
if (n_tabbar==TabTop)
tabwidget->setTabPosition(TQTabWidget::Top);
@@ -923,10 +930,10 @@ void Konsole::makeTabWidget()
connect(tabwidget, TQT_SIGNAL(movedTab(int,int)), TQT_SLOT(slotMovedTab(int,int)));
connect(tabwidget, TQT_SIGNAL(mouseDoubleClick(TQWidget*)), TQT_SLOT(slotRenameSession()));
connect(tabwidget, TQT_SIGNAL(currentChanged(TQWidget*)), TQT_SLOT(activateSession(TQWidget*)));
- connect( tabwidget, TQT_SIGNAL(contextMenu(TQWidget*, const TQPoint &)),
- TQT_SLOT(slotTabContextMenu(TQWidget*, const TQPoint &)));
- connect( tabwidget, TQT_SIGNAL(contextMenu(const TQPoint &)),
- TQT_SLOT(slotTabbarContextMenu(const TQPoint &)));
+ connect(tabwidget, TQT_SIGNAL(contextMenu(TQWidget*, const TQPoint &)),
+ TQT_SLOT(slotTabContextMenu(TQWidget*, const TQPoint &)));
+ connect(tabwidget, TQT_SIGNAL(contextMenu(const TQPoint &)),
+ TQT_SLOT(slotTabbarContextMenu(const TQPoint &)));
if (kapp->authorize("shell_access")) {
connect(tabwidget, TQT_SIGNAL(mouseDoubleClick()), TQT_SLOT(newSession()));
@@ -1566,7 +1573,6 @@ void Konsole::readProperties(TDEConfig* config)
// konsoles are being read.
void Konsole::readProperties(TDEConfig* config, const TQString &schema, bool globalConfigOnly)
{
-
if (config==TDEGlobal::config())
{
config->setDesktopGroup();
@@ -1593,6 +1599,7 @@ void Konsole::readProperties(TDEConfig* config, const TQString &schema, bool glo
b_xonXoff = config->readBoolEntry("XonXoff",false);
b_matchTabWinTitle = config->readBoolEntry("MatchTabWinTitle",false);
+ b_mouseWheelScroll = config->readBoolEntry("TabsCycleWheel",false);
config->setGroup("UTMP");
b_addToUtmp = config->readBoolEntry("AddToUtmp",true);
config->setDesktopGroup();
@@ -2146,6 +2153,8 @@ void Konsole::reparseConfiguration()
setSchema(s,_se->widget());
}
}
+
+ tabwidget->setMouseWheelScroll(b_mouseWheelScroll);
}
// Called via emulation via session
diff --git a/konsole/konsole/konsole.h b/konsole/konsole/konsole.h
index 468764e2f..35b169230 100644
--- a/konsole/konsole/konsole.h
+++ b/konsole/konsole/konsole.h
@@ -17,6 +17,12 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
+
+ --------------------------------------------------------------
+ Additional changes:
+ - 2013/10/14 Michele Calgaro
+ add "scroll tabs on mouse wheel event" functionality
+
*/
/* The material contained in here more or less directly orginates from */
/* kvt, which is copyright (c) 1996 by Matthias Ettrich <ettrich@kde.org> */
@@ -426,6 +432,7 @@ private:
bool b_sessionShortcutsEnabled:1;
bool b_sessionShortcutsMapped:1;
bool b_matchTabWinTitle:1;
+ bool b_mouseWheelScroll:1;
unsigned int m_histSize;
int m_separator_id;