diff options
m--------- | admin | 0 | ||||
-rw-r--r-- | kcontrol/taskbar/kcmtaskbarui.ui | 11 | ||||
-rw-r--r-- | kicker/taskbar/taskbar.cpp | 26 | ||||
-rw-r--r-- | kicker/taskbar/taskbar.h | 1 | ||||
-rw-r--r-- | kicker/taskbar/taskbar.kcfg | 5 |
5 files changed, 34 insertions, 9 deletions
diff --git a/admin b/admin -Subproject eb886af35eccf31b370f56bd3d901e9804859e0 +Subproject 1e5f9378a47b7a809f3027ae8f39ef506282575 diff --git a/kcontrol/taskbar/kcmtaskbarui.ui b/kcontrol/taskbar/kcmtaskbarui.ui index 4dab10765..632f0c109 100644 --- a/kcontrol/taskbar/kcmtaskbarui.ui +++ b/kcontrol/taskbar/kcmtaskbarui.ui @@ -337,6 +337,17 @@ By default, this option is selected and all windows are shown.</string> <bool>true</bool> </property> </widget> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="3"> + <property name="name"> + <cstring>kcfg_CycleWheel</cstring> + </property> + <property name="text"> + <string>Cycle through windows with mouse wheel</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> </grid> </widget> <widget class="TQGroupBox"> 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); + } } } diff --git a/kicker/taskbar/taskbar.h b/kicker/taskbar/taskbar.h index 9f56565e3..bb4167166 100644 --- a/kicker/taskbar/taskbar.h +++ b/kicker/taskbar/taskbar.h @@ -110,6 +110,7 @@ private: bool blocklayout; bool m_showAllWindows; + bool m_cycleWheel; // The screen to show, -1 for all screens int m_currentScreen; bool m_showOnlyCurrentScreen; diff --git a/kicker/taskbar/taskbar.kcfg b/kicker/taskbar/taskbar.kcfg index 173e5b8ec..0d11b4a60 100644 --- a/kicker/taskbar/taskbar.kcfg +++ b/kicker/taskbar/taskbar.kcfg @@ -11,6 +11,11 @@ <label>Show windows from all desktops</label> <whatsthis>Turning this option off will cause the taskbar to display <b>only</b> the windows on the current desktop. \n\nBy default, this option is selected and all windows are shown.</whatsthis> </entry> + <entry key="CycleWheel" type="Bool" > + <default>true</default> + <label>Cycle through windows with mouse wheel</label> + <whatsthis>Enabling this option causes the taskbar to cycle through the current list of windows when using the mouse wheel</whatsthis> + </entry> <entry key="ShowOnlyIconified" type="Bool" > <default>false</default> <label>Show only minimized windows</label> |