summaryrefslogtreecommitdiffstats
path: root/kcontrol/taskbar
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2013-10-28 11:02:52 +0100
committerSlávek Banko <slavek.banko@axis.cz>2013-10-28 11:04:56 +0100
commit7119c2b2688b9e7ece707a60f28028b36d1120f9 (patch)
treef2fd5d872dfe6d684ed31d5d2c24ac6ee39672aa /kcontrol/taskbar
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')
-rw-r--r--kcontrol/taskbar/kcmtaskbar.cpp28
-rw-r--r--kcontrol/taskbar/kcmtaskbar.h8
-rw-r--r--kcontrol/taskbar/kcmtaskbarui.ui39
3 files changed, 61 insertions, 14 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());
diff --git a/kcontrol/taskbar/kcmtaskbar.h b/kcontrol/taskbar/kcmtaskbar.h
index b0fe0c7ea..f14500a68 100644
--- a/kcontrol/taskbar/kcmtaskbar.h
+++ b/kcontrol/taskbar/kcmtaskbar.h
@@ -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"
*/
#ifndef __kcmtaskbar_h__
@@ -84,6 +90,8 @@ private:
static TQStringList i18nGroupModeList();
static const TQStringList& showTaskStatesList();
static TQStringList i18nShowTaskStatesList();
+ static const TQStringList& displayIconsNText();
+ static TQStringList i18ndisplayIconsNText();
TaskbarConfigUI *m_widget;
TQString m_configFileName;
TaskBarSettings* m_settingsObject;
diff --git a/kcontrol/taskbar/kcmtaskbarui.ui b/kcontrol/taskbar/kcmtaskbarui.ui
index 4d655b2a7..d136fe50e 100644
--- a/kcontrol/taskbar/kcmtaskbarui.ui
+++ b/kcontrol/taskbar/kcmtaskbarui.ui
@@ -144,7 +144,7 @@ By default, this option is selected and all windows are shown.</string>
<string>Turning this option on will allow tasks on the taskbar to be manually rearranged using drag and drop.</string>
</property>
</widget>
- <widget class="TQCheckBox" row="8" column="0" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="7" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>kcfg_ShowWindowListBtn</cstring>
</property>
@@ -180,13 +180,13 @@ By default the taskbar groups windows when it is full.</string>
</widget>
<widget class="TQLabel" row="9" column="0" rowspan="1" colspan="2">
<property name="name">
- <cstring>groupTasksLabel</cstring>
+ <cstring>groupTasksLabel</cstring>
</property>
<property name="text">
<string>&amp;Group similar tasks:</string>
</property>
<property name="buddy" stdset="0">
- <cstring>kcfg_ShowTaskStates</cstring>
+ <cstring>kcfg_GroupTasks</cstring>
</property>
</widget>
<widget class="TQComboBox" row="10" column="2">
@@ -202,7 +202,7 @@ By default the taskbar groups windows when it is full.</string>
</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>
+ <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="10" column="0" rowspan="1" colspan="2">
@@ -210,7 +210,7 @@ By default the taskbar groups windows when it is full.</string>
<cstring>showTaskStatesLabel</cstring>
</property>
<property name="text">
- <string>&amp;Show tasks with state:</string>
+ <string>&amp;Show tasks with state:</string>
</property>
<property name="buddy" stdset="0">
<cstring>kcfg_ShowTaskStates</cstring>
@@ -229,20 +229,31 @@ By default the taskbar groups windows when it is full.</string>
By default, this option is not selected and the taskbar will show all windows.</string>
</property>
</widget>
- <widget class="TQCheckBox" row="7" column="0" rowspan="1" colspan="3">
+ <widget class="TQLabel" row="8" column="0" rowspan="1" colspan="2">
<property name="name">
- <cstring>kcfg_ShowIcon</cstring>
+ <cstring>displayIconsNText</cstring>
</property>
<property name="text">
- <string>Sho&amp;w application icons</string>
+ <string>Dis&amp;play:</string>
</property>
- <property name="checked">
- <bool>true</bool>
+ <property name="buddy" stdset="0">
+ <cstring>kcfg_DisplayIconsNText</cstring>
+ </property>
+ </widget>
+ <widget class="TQComboBox" row="8" column="2">
+ <property name="name">
+ <cstring>kcfg_DisplayIconsNText</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>Select this option if you want window icons to appear along with their titles in the taskbar.
-
-By default this option is selected.</string>
+ <string>Choose taskbar display mode among &lt;strong&gt;Icons and text&lt;/strong&gt;, &lt;strong&gt;Text only&lt;/strong&gt; and &lt;strong&gt;Icons only&lt;/strong&gt;.</string>
</property>
</widget>
<widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="3">
@@ -568,8 +579,8 @@ By default, this option is selected and all windows are shown.</string>
<tabstop>showAllScreens</tabstop>
<tabstop>kcfg_SortByApp</tabstop>
<tabstop>kcfg_ShowOnlyIconified</tabstop>
- <tabstop>kcfg_ShowIcon</tabstop>
<tabstop>kcfg_ShowWindowListBtn</tabstop>
+ <tabstop>kcfg_DisplayIconsNText</tabstop>
<tabstop>kcfg_GroupTasks</tabstop>
<tabstop>kcfg_ShowTaskStates</tabstop>
<tabstop>appearance</tabstop>