From 0ef12d60c85f58af9052d83ce1945d71afe16cb4 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 23 Dec 2012 17:29:08 -0600 Subject: Add preliminary taskbar task state support --- kcontrol/kicker/menutab.ui | 1298 +++++++++++++++++++------------------- kcontrol/taskbar/kcmtaskbar.cpp | 20 + kcontrol/taskbar/kcmtaskbar.h | 2 + kcontrol/taskbar/kcmtaskbarui.ui | 114 ++-- 4 files changed, 745 insertions(+), 689 deletions(-) (limited to 'kcontrol') diff --git a/kcontrol/kicker/menutab.ui b/kcontrol/kicker/menutab.ui index 73130771b..49c2502b6 100644 --- a/kcontrol/kicker/menutab.ui +++ b/kcontrol/kicker/menutab.ui @@ -1,694 +1,656 @@ -MenuTabBase - - - MenuTabBase - - - - 0 - 0 - 923 - 649 - - - - - unnamed - - - 0 - - - - layout5 - - - - unnamed - - - - textLabel1 - - - Start menu style: - - - comboMenuStyle - - - - - - Kickoff - - - - - Trinity Classic - - - - m_comboMenuStyle - - - - - spacer4 - - - Horizontal - - - Expanding - - - - 40 - 20 - - - - - - - - m_kmenuGroup - - - TDE Menu - - - - unnamed - - - - layout7 - - - - unnamed - - - - m_openOnHover - - - Open menu on mouse hover - - - - - kcfg_MenuEntryFormat - - - 0 - - - Menu item format: - - - true - - - Here you can choose how menu entries are shown. - - - - unnamed - - - - m_formatSimple - - - &Name only - - - When this option is selected, items in the TDE Menu will appear with the application's name next to the icon. - - - - - m_formatNameDesc - - - Name - &Description - - - true - - - When this option is selected, items in the TDE Menu will appear with the application's name and a brief description next to the icon. - - - - - m_formatDescOnly - - - D&escription only - - - When this option is selected, items in the TDE Menu will appear with the application's brief description next to the icon. - - - - - m_formDescName - - - NoFocus - - - Des&cription (Name) - - - When this option is selected, items in the TDE Menu will appear with a brief description and the application's name in brackets next to the icon. - - - - - - - kcfg_UseSidePixmap - - - Show side ima&ge - - - true - - - <qt>When this option is selected an image will appear down the left-hand side of the TDE Menu. The image will be tinted according to your color settings. - - <p><b>Tip</b>: You can customize the image that appears in the TDE Menu by putting an image file called kside.png and a tileable image file called kside_tile.png in $TDEHOME/share/apps/kicker/pics.</qt> - - - - - spacer8 - - - Vertical - - - MinimumExpanding - - - - 20 - 0 - - - - - - kcfg_ShowKMenuText - - - Display text in TDE Menu button - - - true - - - <qt>When this option is selected the text below will be shown in the TDE Menu button. - - - - - unnamed - - - 0 - - - - kcfg_KMenuText - - - 35 - - - - - TextLabel1_3_3_2 - - - - 4 - 1 - 0 - 0 - - - - TDE Menu button icon: - - - - - btnCustomKMenuIcon - - - - 0 - 0 - 0 - 0 - - - - - 26 - 26 - - - - - 26 - 26 - - - - false - - - - - - - - TextLabel1_3_3_2 - - - - 4 - 1 - 0 - 0 - - - - Text: - - - - - TextLabel1_3_3_2 - - - - 4 - 1 - 0 - 0 - - - - Font: - - - - - kcfg_ButtonFont - - - - - spacer6 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - - spacer8 - - - Vertical - - - MinimumExpanding - - - - 20 - 0 - - - - - - - m_editKMenuButton - - - Edit &TDE Menu - - - Start the editor for the TDE Menu. Here you can add, edit, remove and hide applications. - - - - - - - - Optional Menus - - - true - - - true - - - - m_subMenus - - - - 7 - 7 - 0 - 1 - - - - - 0 - 0 - - - - true - - - This is a list of the dynamic menus that can be displayed in the TDE menu in addition to the normal applications. Use the checkboxes to add or remove menus. - - - - - + MenuTabBase + + + MenuTabBase + + + + 0 + 0 + 923 + 649 + + + unnamed 0 - - + + + + layout5 + + - m_browserGroup + unnamed - - QuickBrowser Menus + + + textLabel1 - - - unnamed + + TDE menu style: + + + comboMenuStyle + + + + + + Kickoff + + + + + Trinity Classic - + + + m_comboMenuStyle + + + + + spacer4 + + + Horizontal + + + Expanding + + + + 40 + 20 + + + + + + + + m_kmenuGroup + + + TDE Menu + + + + unnamed + + - Layout3 + layout7 - + unnamed - - - m_maxQuickBrowserItemsLabel - - - Ma&ximum number of entries: - - - kcfg_MaxEntries2 - - - When browsing directories that contain a lot of files, the QuickBrowser can sometimes hide your whole desktop. Here you can limit the number of entries shown at a time in the QuickBrowser. This is particularly useful for low screen resolutions. - + + + kcfg_MenuEntryFormat + + + 0 + + + Menu item format: + + + true + + + Here you can choose how menu entries are shown. + + + + unnamed + + + + m_formatSimple + + + &Name only + + + When this option is selected, items in the TDE Menu will appear with the application's name next to the icon. + + + + + m_formatNameDesc + + + Name - &Description + + + true + + + When this option is selected, items in the TDE Menu will appear with the application's name and a brief description next to the icon. + + + + + m_formatDescOnly + + + D&escription only + + + When this option is selected, items in the TDE Menu will appear with the application's brief description next to the icon. + + + + + m_formDescName + + + NoFocus + + + Des&cription (Name) + + + When this option is selected, items in the TDE Menu will appear with a brief description and the application's name in brackets next to the icon. + + + - - - kcfg_MaxEntries2 - - - 30 - - - 10 - - - 100 + + + m_editKMenuButton + + + Edit &TDE Menu + + + Start the editor for the TDE Menu. Here you can add, edit, remove and hide applications. + + + + + Spacer10 + + + Vertical + + + Expanding + + + + 20 + 0 + + + + + + + + + Optional Menus - - When browsing directories that contain a lot of files, the QuickBrowser can sometimes hide your whole desktop. Here you can limit the number of entries shown at a time in the QuickBrowser. This is particularly useful for low screen resolutions. + + true - - - - - - kcfg_ShowHiddenFiles - - - Show hidden fi&les - - + true - - - If this option is enabled, hidden files (i.e. files beginning with a dot) will be shown in the QuickBrowser menus. - - - + + - Spacer7 + m_subMenus - - Horizontal + + + 7 + 7 + 0 + 1 + - - Expanding - - + - 20 + 0 0 - - - - - - m_recentGroup - - - Recent Documents Menu - - + + true + + + This is a list of the dynamic menus that can be displayed in the TDE menu in addition to the normal applications. Use the checkboxes to add or remove menus. + + + - unnamed + Layout5 - - - Layout3 - - + + + + m_openOnHover + + + Open menu on mouse hover + + + + + kcfg_UseSidePixmap + + + Show side ima&ge + + + true + + + <qt>When this option is selected an image will appear down the left-hand side of the TDE Menu. The image will be tinted according to your color settings. + + <p><b>Tip</b>: You can customize the image that appears in the TDE Menu by putting an image file called kside.png and a tileable image file called kside_tile.png in $TDEHOME/share/apps/kicker/pics.</qt> + + + + + kcfg_ShowKMenuText + + + Display text in menu button + + + true + + + <qt>When this option is selected the text below will be shown in the TDE Menu button. + + + unnamed - + + 0 + + - m_maxRecentDocumentsItemsLabel + kcfg_KMenuText + + + 35 + + + + + TextLabel1_3_3_2 + + + + 4 + 1 + 0 + 0 + - Ma&ximum number of entries: + Menu button icon: - - kcfg_MaxEntries2 + + + + btnCustomKMenuIcon - - This sets the maximum number of recently accessed documents stored for fast retrieval. + + + 0 + 0 + 0 + 0 + + + + + 26 + 26 + + + + + 26 + 26 + + + + false + + + - + - maxrecentdocs + TextLabel1_3_3_2 - - 10 + + + 4 + 1 + 0 + 0 + - - 0 + + Text: - - 100 + + + + TextLabel1_3_3_2 - - This sets the maximum number of recently accessed documents stored for fast retrieval. + + + 4 + 1 + 0 + 0 + + + + Font: - - - - - Spacer7 - - - Horizontal - - - Expanding - - - - 20 - 0 - - - - + + + kcfg_ButtonFont + + + + + spacer6 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + + spacer8 + + + Vertical + + + MinimumExpanding + + + + 20 + 0 + + + + + + - - - m_pRecentOrderGroup - - - QuickStart Menu Items - - - + + unnamed - - + + + 0 + + - Layout4 + m_browserGroup + + + QuickBrowser Menus - + unnamed - + - TextLabel2 - - - Maxim&um number of entries: - - - kcfg_NumVisibleEntries - - - This option allows you to define the maximum number of applications that should be displayed in the QuickStart menu area. + Layout3 + + + unnamed + + + + m_maxQuickBrowserItemsLabel + + + Ma&ximum number of entries: + + + kcfg_MaxEntries2 + + + When browsing directories that contain a lot of files, the QuickBrowser can sometimes hide your whole desktop. Here you can limit the number of entries shown at a time in the QuickBrowser. This is particularly useful for low screen resolutions. + + + + + kcfg_MaxEntries2 + + + 30 + + + 10 + + + 100 + + + When browsing directories that contain a lot of files, the QuickBrowser can sometimes hide your whole desktop. Here you can limit the number of entries shown at a time in the QuickBrowser. This is particularly useful for low screen resolutions. + + + - + - kcfg_NumVisibleEntries + kcfg_ShowHiddenFiles - - 5 - - - 0 + + Show hidden fi&les - - 20 + + true - This option allows you to define how many applications should be displayed at most in the QuickStart menu area. + If this option is enabled, hidden files (i.e. files beginning with a dot) will be shown in the QuickBrowser menus. - - - - - kcfg_RecentVsOften - - - Show the &applications most recently used - - - true - - - When this option is selected the QuickStart menu area will be filled with the applications you have used most recently. - - - - - m_showFrequent - - - Show the applications most fre&quently used - - - When this option is selected the QuickStart menu area will be filled with the applications you use most frequently. - - - + + + Spacer7 + + + Horizontal + + + Expanding + + + + 20 + 0 + + + + + + - Spacer8 - - - Horizontal + m_recentGroup - - Expanding - - - - 20 - 0 - + + Recent Documents Menu - - - - + + + unnamed + + + + Layout3 + + + + unnamed + + + + m_maxRecentDocumentsItemsLabel + + + Ma&ximum number of entries: + + + kcfg_MaxEntries2 + + + This sets the maximum number of recently accessed documents stored for fast retrieval. + + + + + maxrecentdocs + + + 10 + + + 0 + + + 100 + + + This sets the maximum number of recently accessed documents stored for fast retrieval. + + + + + + + Spacer7 + + + Horizontal + + + Expanding + + + + 20 + 0 + + + + + + - m_pSearchGroup + m_pRecentOrderGroup - TDE Menu Search + QuickStart Menu Items - - + + unnamed - - + + + + Layout4 + + + + unnamed + + + + TextLabel2 + + + Maxim&um number of entries: + + + kcfg_NumVisibleEntries + + + This option allows you to define the maximum number of applications that should be displayed in the QuickStart menu area. + + + + + kcfg_NumVisibleEntries + + + 5 + + + 0 + + + 20 + + + This option allows you to define how many applications should be displayed at most in the QuickStart menu area. + + + + + - kcfg_UseSearchBar + kcfg_RecentVsOften - Show search field in TDE Menu + Show the &applications most recently used true - <qt>When this option is selected a text-based search field will appear in the TDE Menu.</qt> + When this option is selected the QuickStart menu area will be filled with the applications you have used most recently. + + + + + m_showFrequent + + + Show the applications most fre&quently used + + + When this option is selected the QuickStart menu area will be filled with the applications you use most frequently. - - + + Spacer8 @@ -700,40 +662,84 @@ - 20 - 0 + 20 + 0 - - - - - - - - - - m_formatSimple - m_formatNameDesc - m_formDescName - kcfg_UseSidePixmap - m_editKMenuButton - m_subMenus - kcfg_ShowHiddenFiles - kcfg_MaxEntries2 - kcfg_RecentVsOften - m_showFrequent - kcfg_NumVisibleEntries - - - klistview.h - knuminput.h - kdialog.h - - - - - klistview.h - knuminput.h - + + + + + + m_pSearchGroup + + + TDE Menu Search + + + + unnamed + + + + kcfg_UseSearchBar + + + Show search field in TDE Menu + + + true + + + <qt>When this option is selected a text-based search field will appear in the TDE Menu.</qt> + + + + + Spacer8 + + + Horizontal + + + Expanding + + + + 20 + 0 + + + + + + + + + + + + m_formatSimple + m_formatNameDesc + m_formDescName + kcfg_UseSidePixmap + m_editKMenuButton + m_subMenus + kcfg_ShowHiddenFiles + kcfg_MaxEntries2 + kcfg_RecentVsOften + m_showFrequent + kcfg_NumVisibleEntries + + + klistview.h + knuminput.h + kdialog.h + + + + + klistview.h + knuminput.h + 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. - groupTasksLabel + showTaskStatesLabel &Group similar tasks: - kcfg_GroupTasks + kcfg_ShowTaskStates + + + + + kcfg_ShowTaskStates + + + + 7 + 0 + 0 + 0 + + + + The taskbar can show and/or hide tasks based on their current process state. Select <em>Any</em> to show all tasks regardless of current state. + + + + + groupTasksLabel + + + &Show tasks with state: + + + kcfg_ShowTaskStates @@ -161,12 +188,12 @@ By default this option is selected. By default, this option is selected and all windows are shown. - + appearance - + textLabel1 @@ -177,7 +204,7 @@ By default, this option is selected and all windows are shown. appearance - + kcfg_UseCustomColors @@ -191,7 +218,7 @@ By default, this option is selected and all windows are shown. true - + layout9 @@ -199,23 +226,17 @@ By default, this option is selected and all windows are shown. unnamed - + - spacer11_2 - - - Horizontal + inactiveTaskTextColorLabel - - Expanding + + Inacti&ve task text color: - - - 191 - 20 - + + kcfg_InactiveTaskTextColor - + kcfg_InactiveTaskTextColor @@ -241,26 +262,18 @@ By default, this option is selected and all windows are shown. - + - kcfg_TaskBackgroundColor - - - - - - - - taskBackgroundColorLabel + activeTaskTextColorLabel - &Background color: + Active task te&xt color: - kcfg_TaskBackgroundColor + kcfg_ActiveTaskTextColor - + kcfg_ActiveTaskTextColor @@ -268,29 +281,43 @@ By default, this option is selected and all windows are shown. - + - inactiveTaskTextColorLabel + spacer11_2 + + + Horizontal + + + Expanding + + + + 191 + 20 + + + + + + taskBackgroundColorLabel - Inacti&ve task text color: + &Background color: - kcfg_InactiveTaskTextColor + kcfg_TaskBackgroundColor - + - activeTaskTextColorLabel + kcfg_TaskBackgroundColor - Active task te&xt color: - - - kcfg_ActiveTaskTextColor + - + spacer12 @@ -471,6 +498,7 @@ By default, this option is selected and all windows are shown. kcfg_ShowIcon kcfg_ShowWindowListBtn kcfg_GroupTasks + kcfg_ShowTaskStates appearance kcfg_UseCustomColors kcfg_InactiveTaskTextColor -- cgit v1.2.1