summaryrefslogtreecommitdiffstats
path: root/kicker/taskbar/taskbar.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-12-23 17:29:08 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-12-23 17:29:08 -0600
commit0ef12d60c85f58af9052d83ce1945d71afe16cb4 (patch)
treea82f5c57d032227ed0a520f5771ec37f10779d28 /kicker/taskbar/taskbar.cpp
parent55c907ad0e031f2ceddb2693761b747395137ac0 (diff)
downloadtdebase-0ef12d60c85f58af9052d83ce1945d71afe16cb4.tar.gz
tdebase-0ef12d60c85f58af9052d83ce1945d71afe16cb4.zip
Add preliminary taskbar task state support
Diffstat (limited to 'kicker/taskbar/taskbar.cpp')
-rw-r--r--kicker/taskbar/taskbar.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/kicker/taskbar/taskbar.cpp b/kicker/taskbar/taskbar.cpp
index ac8753caa..dd66c22b2 100644
--- a/kicker/taskbar/taskbar.cpp
+++ b/kicker/taskbar/taskbar.cpp
@@ -53,12 +53,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
TaskBar::TaskBar( TQWidget *parent, const char *name )
: Panner( parent, name ),
m_showAllWindows(false),
+ m_cycleWheel(false),
m_currentScreen(-1),
m_showOnlyCurrentScreen(false),
m_sortByDesktop(false),
- m_cycleWheel(false),
m_showIcon(false),
m_showOnlyIconified(false),
+ m_showTaskStates(0),
m_textShadowEngine(0),
m_ignoreUpdates(false),
m_relayoutTimer(0, "TaskBar::m_relayoutTimer")
@@ -237,12 +238,14 @@ void TaskBar::configure()
bool wasCycleWheel = m_cycleWheel;
bool wasShowIcon = m_showIcon;
bool wasShowOnlyIconified = m_showOnlyIconified;
+ int wasShowTaskStates = m_showTaskStates;
m_showAllWindows = TaskBarSettings::showAllWindows();
m_sortByDesktop = m_showAllWindows && TaskBarSettings::sortByDesktop();
m_showIcon = TaskBarSettings::showIcon();
m_showOnlyIconified = TaskBarSettings::showOnlyIconified();
m_cycleWheel = TaskBarSettings::cycleWheel();
+ m_showTaskStates = TaskBarSettings::showTaskStates();
m_currentScreen = -1; // Show all screens or re-get our screen
m_showOnlyCurrentScreen = (TaskBarSettings::showCurrentScreenOnly() &&
@@ -266,7 +269,8 @@ void TaskBar::configure()
wasSortByDesktop != m_sortByDesktop ||
wasShowIcon != m_showIcon ||
wasCycleWheel != m_cycleWheel ||
- wasShowOnlyIconified != m_showOnlyIconified)
+ wasShowOnlyIconified != m_showOnlyIconified ||
+ wasShowTaskStates != m_showTaskStates)
{
// relevant settings changed, update our task containers
for (TaskContainer::Iterator it = containers.begin();
@@ -597,7 +601,8 @@ void TaskBar::windowChanged(Task::Ptr task)
if (!container ||
(!m_showAllWindows &&
!container->onCurrentDesktop() &&
- !container->isVisibleTo(this)))
+ !container->isVisibleTo(this)) ||
+ container->isHidden())
{
return;
}
@@ -927,7 +932,10 @@ int TaskBar::containerCount() const
if ((m_showAllWindows || (*it)->onCurrentDesktop()) &&
((showScreen() == -1) || ((*it)->isOnScreen())))
{
- i++;
+ if (!(*it)->isHidden())
+ {
+ i++;
+ }
}
}
@@ -945,7 +953,10 @@ int TaskBar::taskCount() const
if ((m_showAllWindows || (*it)->onCurrentDesktop()) &&
((showScreen() == -1) || ((*it)->isOnScreen())))
{
- i += (*it)->filteredTaskCount();
+ if (!(*it)->isHidden())
+ {
+ i += (*it)->filteredTaskCount();
+ }
}
}
@@ -1048,7 +1059,8 @@ TaskContainer::List TaskBar::filteredContainers()
TaskContainer* c = *it;
if ((m_showAllWindows || c->onCurrentDesktop()) &&
(!m_showOnlyIconified || c->isIconified()) &&
- ((showScreen() == -1) || c->isOnScreen()))
+ ((showScreen() == -1) || c->isOnScreen()) &&
+ (!c->isHidden()))
{
list.append(c);
c->show();