summaryrefslogtreecommitdiffstats
path: root/kicker/taskbar/taskbar.cpp
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2012-03-13 11:19:54 -0500
committerDarrell Anderson <humanreadable@yahoo.com>2012-03-13 11:19:54 -0500
commit14b7d88851378ac5ee85198634a984a665668237 (patch)
tree91bc1c09f4cebedf21801fc5fca8cc0d576807e7 /kicker/taskbar/taskbar.cpp
parent9980d1a0dad4e0697a6e408c9cdadbe1318453cb (diff)
downloadtdebase-14b7d88851378ac5ee85198634a984a665668237.tar.gz
tdebase-14b7d88851378ac5ee85198634a984a665668237.zip
Add check box option to control taskbar window cycling with mouse wheel.
This closes bug report 251.
Diffstat (limited to 'kicker/taskbar/taskbar.cpp')
-rw-r--r--kicker/taskbar/taskbar.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/kicker/taskbar/taskbar.cpp b/kicker/taskbar/taskbar.cpp
index 1a156930d..ac8753caa 100644
--- a/kicker/taskbar/taskbar.cpp
+++ b/kicker/taskbar/taskbar.cpp
@@ -56,6 +56,7 @@ TaskBar::TaskBar( TQWidget *parent, const char *name )
m_currentScreen(-1),
m_showOnlyCurrentScreen(false),
m_sortByDesktop(false),
+ m_cycleWheel(false),
m_showIcon(false),
m_showOnlyIconified(false),
m_textShadowEngine(0),
@@ -233,6 +234,7 @@ void TaskBar::configure()
{
bool wasShowWindows = m_showAllWindows;
bool wasSortByDesktop = m_sortByDesktop;
+ bool wasCycleWheel = m_cycleWheel;
bool wasShowIcon = m_showIcon;
bool wasShowOnlyIconified = m_showOnlyIconified;
@@ -240,6 +242,7 @@ void TaskBar::configure()
m_sortByDesktop = m_showAllWindows && TaskBarSettings::sortByDesktop();
m_showIcon = TaskBarSettings::showIcon();
m_showOnlyIconified = TaskBarSettings::showOnlyIconified();
+ m_cycleWheel = TaskBarSettings::cycleWheel();
m_currentScreen = -1; // Show all screens or re-get our screen
m_showOnlyCurrentScreen = (TaskBarSettings::showCurrentScreenOnly() &&
@@ -262,6 +265,7 @@ void TaskBar::configure()
if (wasShowWindows != m_showAllWindows ||
wasSortByDesktop != m_sortByDesktop ||
wasShowIcon != m_showIcon ||
+ wasCycleWheel != m_cycleWheel ||
wasShowOnlyIconified != m_showOnlyIconified)
{
// relevant settings changed, update our task containers
@@ -1127,15 +1131,19 @@ void TaskBar::activateNextTask(bool forward)
void TaskBar::wheelEvent(TQWheelEvent* e)
{
- if (e->delta() > 0)
- {
- // scroll away from user, previous task
- activateNextTask(false);
- }
- else
- {
- // scroll towards user, next task
- activateNextTask(true);
+
+ if(TaskBarSettings::cycleWheel()) {
+
+ if (e->delta() > 0)
+ {
+ // scroll away from user, previous task
+ activateNextTask(false);
+ }
+ else
+ {
+ // scroll towards user, next task
+ activateNextTask(true);
+ }
}
}