diff options
author | Timothy Pearson <[email protected]> | 2012-12-23 17:29:08 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-12-23 17:29:08 -0600 |
commit | 0ef12d60c85f58af9052d83ce1945d71afe16cb4 (patch) | |
tree | a82f5c57d032227ed0a520f5771ec37f10779d28 /kcontrol/taskbar/kcmtaskbar.cpp | |
parent | 55c907ad0e031f2ceddb2693761b747395137ac0 (diff) | |
download | tdebase-0ef12d60c85f58af9052d83ce1945d71afe16cb4.tar.gz tdebase-0ef12d60c85f58af9052d83ce1945d71afe16cb4.zip |
Add preliminary taskbar task state support
Diffstat (limited to 'kcontrol/taskbar/kcmtaskbar.cpp')
-rw-r--r-- | kcontrol/taskbar/kcmtaskbar.cpp | 20 |
1 files changed, 20 insertions, 0 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())); |