summaryrefslogtreecommitdiffstats
path: root/kcontrol/taskbar
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-12-23 17:29:08 -0600
committerTimothy Pearson <[email protected]>2012-12-23 17:29:08 -0600
commit0ef12d60c85f58af9052d83ce1945d71afe16cb4 (patch)
treea82f5c57d032227ed0a520f5771ec37f10779d28 /kcontrol/taskbar
parent55c907ad0e031f2ceddb2693761b747395137ac0 (diff)
downloadtdebase-0ef12d60c85f58af9052d83ce1945d71afe16cb4.tar.gz
tdebase-0ef12d60c85f58af9052d83ce1945d71afe16cb4.zip
Add preliminary taskbar task state support
Diffstat (limited to 'kcontrol/taskbar')
-rw-r--r--kcontrol/taskbar/kcmtaskbar.cpp20
-rw-r--r--kcontrol/taskbar/kcmtaskbar.h2
-rw-r--r--kcontrol/taskbar/kcmtaskbarui.ui114
3 files changed, 93 insertions, 43 deletions
diff --git a/kcontrol/taskbar/kcmtaskbar.cpp b/kcontrol/taskbar/kcmtaskbar.cpp
index 22ec10b14..cd1c67a1d 100644
--- a/kcontrol/taskbar/kcmtaskbar.cpp
+++ b/kcontrol/taskbar/kcmtaskbar.cpp
@@ -118,6 +118,25 @@ TQStringList TaskbarConfig::i18nGroupModeList()
return i18nList;
}
+// These are the strings that are actually stored in the config file.
+const TQStringList& TaskbarConfig::showTaskStatesList()
+{
+ static TQStringList list(
+ TQStringList() << I18N_NOOP("Any") << I18N_NOOP("Only Stopped")
+ << I18N_NOOP("Only Running"));
+ return list;
+}
+
+// Get a translated version of the above string list.
+TQStringList TaskbarConfig::i18nShowTaskStatesList()
+{
+ TQStringList i18nList;
+ for( TQStringList::ConstIterator it = showTaskStatesList().begin(); it != showTaskStatesList().end(); ++it ) {
+ i18nList << i18n((*it).latin1());
+ }
+ return i18nList;
+}
+
TaskbarConfig::TaskbarConfig(TQWidget *parent, const char* name, const TQStringList&)
: KCModule(TaskBarFactory::instance(), parent, name)
{
@@ -151,6 +170,7 @@ TaskbarConfig::TaskbarConfig(TQWidget *parent, const char* name, const TQStringL
m_widget->kcfg_MiddleButtonAction->insertStringList(list);
m_widget->kcfg_RightButtonAction->insertStringList(list);
m_widget->kcfg_GroupTasks->insertStringList(i18nGroupModeList());
+ m_widget->kcfg_ShowTaskStates->insertStringList(i18nShowTaskStatesList());
connect(m_widget->kcfg_GroupTasks, TQT_SIGNAL(activated(int)),
this, TQT_SLOT(slotUpdateComboBox()));
diff --git a/kcontrol/taskbar/kcmtaskbar.h b/kcontrol/taskbar/kcmtaskbar.h
index 877f26daf..d41f5e6f0 100644
--- a/kcontrol/taskbar/kcmtaskbar.h
+++ b/kcontrol/taskbar/kcmtaskbar.h
@@ -73,6 +73,8 @@ private:
static TQStringList i18nActionList();
static const TQStringList& groupModeList();
static TQStringList i18nGroupModeList();
+ static const TQStringList& showTaskStatesList();
+ static TQStringList i18nShowTaskStatesList();
TaskbarConfigUI *m_widget;
};
diff --git a/kcontrol/taskbar/kcmtaskbarui.ui b/kcontrol/taskbar/kcmtaskbarui.ui
index 632f0c109..dd0aadb9d 100644
--- a/kcontrol/taskbar/kcmtaskbarui.ui
+++ b/kcontrol/taskbar/kcmtaskbarui.ui
@@ -107,13 +107,40 @@ By default the taskbar groups windows when it is full.</string>
</widget>
<widget class="TQLabel" row="7" column="0" rowspan="1" colspan="2">
<property name="name">
- <cstring>groupTasksLabel</cstring>
+ <cstring>showTaskStatesLabel</cstring>
</property>
<property name="text">
<string>&amp;Group similar tasks:</string>
</property>
<property name="buddy" stdset="0">
- <cstring>kcfg_GroupTasks</cstring>
+ <cstring>kcfg_ShowTaskStates</cstring>
+ </property>
+ </widget>
+ <widget class="TQComboBox" row="8" column="2">
+ <property name="name">
+ <cstring>kcfg_ShowTaskStates</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The taskbar can show and/or hide tasks based on their current process state. Select &lt;em&gt;Any&lt;/em&gt; to show all tasks regardless of current state.</string>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="8" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>groupTasksLabel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Show tasks with state:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kcfg_ShowTaskStates</cstring>
</property>
</widget>
<widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="3">
@@ -161,12 +188,12 @@ By default this option is selected.</string>
By default, this option is selected and all windows are shown.</string>
</property>
</widget>
- <widget class="TQComboBox" row="8" column="2">
+ <widget class="TQComboBox" row="9" column="2">
<property name="name">
<cstring>appearance</cstring>
</property>
</widget>
- <widget class="TQLabel" row="8" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="9" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -177,7 +204,7 @@ By default, this option is selected and all windows are shown.</string>
<cstring>appearance</cstring>
</property>
</widget>
- <widget class="TQCheckBox" row="9" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="10" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>kcfg_UseCustomColors</cstring>
</property>
@@ -191,7 +218,7 @@ By default, this option is selected and all windows are shown.</string>
<bool>true</bool>
</property>
</widget>
- <widget class="TQLayoutWidget" row="10" column="0" rowspan="1" colspan="3">
+ <widget class="TQLayoutWidget" row="11" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>layout9</cstring>
</property>
@@ -199,23 +226,17 @@ By default, this option is selected and all windows are shown.</string>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <spacer row="1" column="2">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
- <cstring>spacer11_2</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
+ <cstring>inactiveTaskTextColorLabel</cstring>
</property>
- <property name="sizeType">
- <enum>Expanding</enum>
+ <property name="text">
+ <string>Inacti&amp;ve task text color:</string>
</property>
- <property name="sizeHint">
- <size>
- <width>191</width>
- <height>20</height>
- </size>
+ <property name="buddy" stdset="0">
+ <cstring>kcfg_InactiveTaskTextColor</cstring>
</property>
- </spacer>
+ </widget>
<widget class="KColorButton" row="0" column="1">
<property name="name">
<cstring>kcfg_InactiveTaskTextColor</cstring>
@@ -241,26 +262,18 @@ By default, this option is selected and all windows are shown.</string>
</size>
</property>
</spacer>
- <widget class="KColorButton" row="2" column="1">
+ <widget class="TQLabel" row="0" column="3">
<property name="name">
- <cstring>kcfg_TaskBackgroundColor</cstring>
- </property>
- <property name="text">
- <string></string>
- </property>
- </widget>
- <widget class="TQLabel" row="2" column="0">
- <property name="name">
- <cstring>taskBackgroundColorLabel</cstring>
+ <cstring>activeTaskTextColorLabel</cstring>
</property>
<property name="text">
- <string>&amp;Background color:</string>
+ <string>Active task te&amp;xt color:</string>
</property>
<property name="buddy" stdset="0">
- <cstring>kcfg_TaskBackgroundColor</cstring>
+ <cstring>kcfg_ActiveTaskTextColor</cstring>
</property>
</widget>
- <widget class="KColorButton" row="1" column="1">
+ <widget class="KColorButton" row="0" column="4">
<property name="name">
<cstring>kcfg_ActiveTaskTextColor</cstring>
</property>
@@ -268,29 +281,43 @@ By default, this option is selected and all windows are shown.</string>
<string></string>
</property>
</widget>
- <widget class="TQLabel" row="0" column="0">
+ <spacer row="0" column="5">
<property name="name">
- <cstring>inactiveTaskTextColorLabel</cstring>
+ <cstring>spacer11_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>191</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQLabel" row="0" column="6">
+ <property name="name">
+ <cstring>taskBackgroundColorLabel</cstring>
</property>
<property name="text">
- <string>Inacti&amp;ve task text color:</string>
+ <string>&amp;Background color:</string>
</property>
<property name="buddy" stdset="0">
- <cstring>kcfg_InactiveTaskTextColor</cstring>
+ <cstring>kcfg_TaskBackgroundColor</cstring>
</property>
</widget>
- <widget class="TQLabel" row="1" column="0">
+ <widget class="KColorButton" row="0" column="7">
<property name="name">
- <cstring>activeTaskTextColorLabel</cstring>
+ <cstring>kcfg_TaskBackgroundColor</cstring>
</property>
<property name="text">
- <string>Active task te&amp;xt color:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>kcfg_ActiveTaskTextColor</cstring>
+ <string></string>
</property>
</widget>
- <spacer row="2" column="2">
+ <spacer row="0" column="8">
<property name="name">
<cstring>spacer12</cstring>
</property>
@@ -471,6 +498,7 @@ By default, this option is selected and all windows are shown.</string>
<tabstop>kcfg_ShowIcon</tabstop>
<tabstop>kcfg_ShowWindowListBtn</tabstop>
<tabstop>kcfg_GroupTasks</tabstop>
+ <tabstop>kcfg_ShowTaskStates</tabstop>
<tabstop>appearance</tabstop>
<tabstop>kcfg_UseCustomColors</tabstop>
<tabstop>kcfg_InactiveTaskTextColor</tabstop>