summaryrefslogtreecommitdiffstats
path: root/kcontrol/taskbar/kcmtaskbar.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2013-10-28 11:02:52 +0100
committerSlávek Banko <[email protected]>2013-10-28 11:04:56 +0100
commit7119c2b2688b9e7ece707a60f28028b36d1120f9 (patch)
treef2fd5d872dfe6d684ed31d5d2c24ac6ee39672aa /kcontrol/taskbar/kcmtaskbar.cpp
parentcbbc7ad02e978c5f2cb1e90338eab65996bc554e (diff)
downloadtdebase-7119c2b2688b9e7ece707a60f28028b36d1120f9.tar.gz
tdebase-7119c2b2688b9e7ece707a60f28028b36d1120f9.zip
Add option to display only icons on taskbar
This resolves Bug 360
Diffstat (limited to 'kcontrol/taskbar/kcmtaskbar.cpp')
-rw-r--r--kcontrol/taskbar/kcmtaskbar.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/kcontrol/taskbar/kcmtaskbar.cpp b/kcontrol/taskbar/kcmtaskbar.cpp
index bd98ee3f9..788187ca7 100644
--- a/kcontrol/taskbar/kcmtaskbar.cpp
+++ b/kcontrol/taskbar/kcmtaskbar.cpp
@@ -14,6 +14,12 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
+
+ --------------------------------------------------------------
+ Additional changes:
+ - 2013/10/22 Michele Calgaro
+ * added support for display mode (Icons and Text, Text only, Icons only)
+ and removed "Show application icons"
*/
#include <tqcheckbox.h>
@@ -151,6 +157,27 @@ TQStringList TaskbarConfig::i18nShowTaskStatesList()
return i18nList;
}
+// These are the strings that are actually stored in the config file.
+const TQStringList& TaskbarConfig::displayIconsNText()
+{
+ static TQStringList list(TQStringList()
+ << I18N_NOOP("Icons and Text")
+ << I18N_NOOP("Text only")
+ << I18N_NOOP("Icons only"));
+ return list;
+}
+
+// Get a translated version of the above string list.
+TQStringList TaskbarConfig::i18ndisplayIconsNText()
+{
+ TQStringList i18nList;
+ for (TQStringList::ConstIterator it = displayIconsNText().begin(); it != displayIconsNText().end(); ++it)
+ {
+ i18nList << i18n((*it).latin1());
+ }
+ return i18nList;
+}
+
TaskbarConfig::TaskbarConfig(TQWidget *parent, const char* name, const TQStringList& args)
: TDECModule(TaskBarFactory::instance(), parent, name),
m_settingsObject(NULL)
@@ -211,6 +238,7 @@ TaskbarConfig::TaskbarConfig(TQWidget *parent, const char* name, const TQStringL
m_widget->kcfg_LeftButtonAction->insertStringList(list);
m_widget->kcfg_MiddleButtonAction->insertStringList(list);
m_widget->kcfg_RightButtonAction->insertStringList(list);
+ m_widget->kcfg_DisplayIconsNText->insertStringList(i18ndisplayIconsNText());
m_widget->kcfg_GroupTasks->insertStringList(i18nGroupModeList());
m_widget->kcfg_ShowTaskStates->insertStringList(i18nShowTaskStatesList());