diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-12-23 17:29:08 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-12-23 17:29:08 -0600 |
commit | 0ef12d60c85f58af9052d83ce1945d71afe16cb4 (patch) | |
tree | a82f5c57d032227ed0a520f5771ec37f10779d28 | |
parent | 55c907ad0e031f2ceddb2693761b747395137ac0 (diff) | |
download | tdebase-0ef12d60c85f58af9052d83ce1945d71afe16cb4.tar.gz tdebase-0ef12d60c85f58af9052d83ce1945d71afe16cb4.zip |
Add preliminary taskbar task state support
-rw-r--r-- | kcontrol/kicker/menutab.ui | 1298 | ||||
-rw-r--r-- | kcontrol/taskbar/kcmtaskbar.cpp | 20 | ||||
-rw-r--r-- | kcontrol/taskbar/kcmtaskbar.h | 2 | ||||
-rw-r--r-- | kcontrol/taskbar/kcmtaskbarui.ui | 114 | ||||
-rw-r--r-- | kicker/taskbar/taskbar.cpp | 24 | ||||
-rw-r--r-- | kicker/taskbar/taskbar.h | 11 | ||||
-rw-r--r-- | kicker/taskbar/taskbar.kcfg | 16 | ||||
-rw-r--r-- | kicker/taskbar/taskcontainer.cpp | 118 | ||||
-rw-r--r-- | kicker/taskbar/taskcontainer.h | 1 | ||||
-rw-r--r-- | twin/KWinInterface.h | 1 | ||||
-rw-r--r-- | twin/workspace.cpp | 31 | ||||
-rw-r--r-- | twin/workspace.h | 7 |
12 files changed, 939 insertions, 704 deletions
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 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> -<class>MenuTabBase</class> -<widget class="TQWidget"> - <property name="name"> - <cstring>MenuTabBase</cstring> - </property> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>923</width> - <height>649</height> - </rect> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>layout5</cstring> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="TQLabel"> - <property name="name"> - <cstring>textLabel1</cstring> - </property> - <property name="text"> - <string>Start menu style:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>comboMenuStyle</cstring> - </property> - </widget> - <widget class="TQComboBox"> - <item> - <property name="text"> - <string>Kickoff</string> - </property> - </item> - <item> - <property name="text"> - <string>Trinity Classic</string> - </property> - </item> - <property name="name"> - <cstring>m_comboMenuStyle</cstring> - </property> - </widget> - <spacer> - <property name="name"> - <cstring>spacer4</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </hbox> - </widget> - <widget class="TQGroupBox"> - <property name="name"> - <cstring>m_kmenuGroup</cstring> - </property> - <property name="title"> - <string>TDE Menu</string> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>layout7</cstring> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="TQCheckBox" row="0" column="0"> - <property name="name"> - <cstring>m_openOnHover</cstring> - </property> - <property name="text"> - <string>Open menu on mouse hover</string> - </property> - </widget> - <widget class="TQButtonGroup"> - <property name="name"> - <cstring>kcfg_MenuEntryFormat</cstring> - </property> - <property name="lineWidth"> - <number>0</number> - </property> - <property name="title"> - <string>Menu item format:</string> - </property> - <property name="flat"> - <bool>true</bool> - </property> - <property name="whatsThis" stdset="0"> - <string>Here you can choose how menu entries are shown.</string> - </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="TQRadioButton" row="1" column="1"> - <property name="name"> - <cstring>m_formatSimple</cstring> - </property> - <property name="text"> - <string>&Name only</string> - </property> - <property name="whatsThis" stdset="0"> - <string>When this option is selected, items in the TDE Menu will appear with the application's name next to the icon.</string> - </property> - </widget> - <widget class="TQRadioButton" row="2" column="1"> - <property name="name"> - <cstring>m_formatNameDesc</cstring> - </property> - <property name="text"> - <string>Name - &Description</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - <property name="whatsThis" stdset="0"> - <string>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.</string> - </property> - </widget> - <widget class="TQRadioButton" row="3" column="1"> - <property name="name"> - <cstring>m_formatDescOnly</cstring> - </property> - <property name="text"> - <string>D&escription only</string> - </property> - <property name="whatsThis" stdset="0"> - <string>When this option is selected, items in the TDE Menu will appear with the application's brief description next to the icon.</string> - </property> - </widget> - <widget class="TQRadioButton" row="4" column="1"> - <property name="name"> - <cstring>m_formDescName</cstring> - </property> - <property name="focusPolicy"> - <enum>NoFocus</enum> - </property> - <property name="text"> - <string>Des&cription (Name)</string> - </property> - <property name="whatsThis" stdset="0"> - <string>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.</string> - </property> - </widget> - </grid> - </widget> - <widget class="TQCheckBox"> - <property name="name"> - <cstring>kcfg_UseSidePixmap</cstring> - </property> - <property name="text"> - <string>Show side ima&ge</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - <property name="whatsThis" stdset="0"> - <string><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></string> - </property> - </widget> - <spacer> - <property name="name"> - <cstring>spacer8</cstring> - </property> - <property name="orientation"> - <enum>Vertical</enum> - </property> - <property name="sizeType"> - <enum>MinimumExpanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>20</width> - <height>0</height> - </size> - </property> - </spacer> - <widget class="TQCheckBox" row="0" column="0" colspan="2"> - <property name="name"> - <cstring>kcfg_ShowKMenuText</cstring> - </property> - <property name="text"> - <string>Display text in TDE Menu button</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - <property name="whatsThis" stdset="0"> - <string><qt>When this option is selected the text below will be shown in the TDE Menu button.</string> - </property> - </widget> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <widget class="TQLineEdit" row="0" column="1" colspan="3"> - <property name="name"> - <cstring>kcfg_KMenuText</cstring> - </property> - <property name="maxLength"> - <number>35</number> - </property> - </widget> - <widget class="TQLabel" row="3" column="0" colspan="2"> - <property name="name"> - <cstring>TextLabel1_3_3_2</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>4</hsizetype> - <vsizetype>1</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>TDE Menu button icon:</string> - </property> - </widget> - <widget class="KPushButton" row="3" column="3" colspan="2"> - <property name="name"> - <cstring>btnCustomKMenuIcon</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>0</hsizetype> - <vsizetype>0</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>26</width> - <height>26</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>26</width> - <height>26</height> - </size> - </property> - <property name="acceptDrops"> - <bool>false</bool> - </property> - <property name="text"> - <string></string> - </property> - </widget> - <widget class="TQLabel" row="0" column="0"> - <property name="name"> - <cstring>TextLabel1_3_3_2</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>4</hsizetype> - <vsizetype>1</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Text:</string> - </property> - </widget> - <widget class="TQLabel" row="2" column="0"> - <property name="name"> - <cstring>TextLabel1_3_3_2</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>4</hsizetype> - <vsizetype>1</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Font:</string> - </property> - </widget> - <widget class="KFontRequester" row="2" column="1" rowspan="1" colspan="3"> - <property name="name"> - <cstring>kcfg_ButtonFont</cstring> - </property> - </widget> - <spacer row="3" column="3"> - <property name="name"> - <cstring>spacer6</cstring> - </property> - <property name="orientation"> - <enum>Vertical</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - </grid> - <spacer> - <property name="name"> - <cstring>spacer8</cstring> - </property> - <property name="orientation"> - <enum>Vertical</enum> - </property> - <property name="sizeType"> - <enum>MinimumExpanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>20</width> - <height>0</height> - </size> - </property> - </spacer> - - <widget class="TQPushButton"> - <property name="name"> - <cstring>m_editKMenuButton</cstring> - </property> - <property name="text"> - <string>Edit &TDE Menu</string> - </property> - <property name="whatsThis" stdset="0"> - <string>Start the editor for the TDE Menu. Here you can add, edit, remove and hide applications.</string> - </property> - </widget> - </vbox> - </widget> - <widget class="KListView"> - <column> - <property name="text"> - <string>Optional Menus</string> - </property> - <property name="clickable"> - <bool>true</bool> - </property> - <property name="resizable"> - <bool>true</bool> - </property> - </column> - <property name="name"> - <cstring>m_subMenus</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>7</hsizetype> - <vsizetype>7</vsizetype> - <horstretch>0</horstretch> - <verstretch>1</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="fullWidth"> - <bool>true</bool> - </property> - <property name="whatsThis" stdset="0"> - <string>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.</string> - </property> - </widget> - </hbox> - </widget> - <grid> + <class>MenuTabBase</class> + <widget class="TQWidget"> + <property name="name"> + <cstring>MenuTabBase</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>923</width> + <height>649</height> + </rect> + </property> + <vbox> <property name="name"> <cstring>unnamed</cstring> </property> <property name="margin"> <number>0</number> - </property> - <widget class="TQGroupBox" row="0" column="0"> + </property> + <widget class="TQLayoutWidget"> + <property name="name"> + <cstring>layout5</cstring> + </property> + <hbox> <property name="name"> - <cstring>m_browserGroup</cstring> + <cstring>unnamed</cstring> </property> - <property name="title"> - <string>QuickBrowser Menus</string> + <widget class="TQLabel"> + <property name="name"> + <cstring>textLabel1</cstring> </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> + <property name="text"> + <string>TDE menu style:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>comboMenuStyle</cstring> + </property> + </widget> + <widget class="TQComboBox"> + <item> + <property name="text"> + <string>Kickoff</string> + </property> + </item> + <item> + <property name="text"> + <string>Trinity Classic</string> </property> - <widget class="TQLayoutWidget" row="1" column="0"> + </item> + <property name="name"> + <cstring>m_comboMenuStyle</cstring> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>spacer4</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </hbox> + </widget> + <widget class="TQGroupBox"> + <property name="name"> + <cstring>m_kmenuGroup</cstring> + </property> + <property name="title"> + <string>TDE Menu</string> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>Layout3</cstring> + <cstring>layout7</cstring> </property> - <hbox> + <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="TQLabel"> - <property name="name"> - <cstring>m_maxQuickBrowserItemsLabel</cstring> - </property> - <property name="text"> - <string>Ma&ximum number of entries:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>kcfg_MaxEntries2</cstring> - </property> - <property name="whatsThis" stdset="0"> - <string>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.</string> - </property> + <widget class="TQButtonGroup"> + <property name="name"> + <cstring>kcfg_MenuEntryFormat</cstring> + </property> + <property name="lineWidth"> + <number>0</number> + </property> + <property name="title"> + <string>Menu item format:</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + <property name="whatsThis" stdset="0"> + <string>Here you can choose how menu entries are shown.</string> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="TQRadioButton" row="1" column="1"> + <property name="name"> + <cstring>m_formatSimple</cstring> + </property> + <property name="text"> + <string>&Name only</string> + </property> + <property name="whatsThis" stdset="0"> + <string>When this option is selected, items in the TDE Menu will appear with the application's name next to the icon.</string> + </property> + </widget> + <widget class="TQRadioButton" row="2" column="1"> + <property name="name"> + <cstring>m_formatNameDesc</cstring> + </property> + <property name="text"> + <string>Name - &Description</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + <property name="whatsThis" stdset="0"> + <string>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.</string> + </property> + </widget> + <widget class="TQRadioButton" row="3" column="1"> + <property name="name"> + <cstring>m_formatDescOnly</cstring> + </property> + <property name="text"> + <string>D&escription only</string> + </property> + <property name="whatsThis" stdset="0"> + <string>When this option is selected, items in the TDE Menu will appear with the application's brief description next to the icon.</string> + </property> + </widget> + <widget class="TQRadioButton" row="4" column="1"> + <property name="name"> + <cstring>m_formDescName</cstring> + </property> + <property name="focusPolicy"> + <enum>NoFocus</enum> + </property> + <property name="text"> + <string>Des&cription (Name)</string> + </property> + <property name="whatsThis" stdset="0"> + <string>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.</string> + </property> + </widget> + </grid> </widget> - <widget class="KIntNumInput"> - <property name="name"> - <cstring>kcfg_MaxEntries2</cstring> - </property> - <property name="value"> - <number>30</number> - </property> - <property name="minValue"> - <number>10</number> - </property> - <property name="maxValue"> - <number>100</number> + <widget class="TQPushButton" colspan="4"> + <property name="name"> + <cstring>m_editKMenuButton</cstring> + </property> + <property name="text"> + <string>Edit &TDE Menu</string> + </property> + <property name="whatsThis" stdset="0"> + <string>Start the editor for the TDE Menu. Here you can add, edit, remove and hide applications.</string> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>Spacer10</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + </spacer> + </vbox> + </widget> + <widget class="KListView"> + <column> + <property name="text"> + <string>Optional Menus</string> </property> - <property name="whatsThis" stdset="0"> - <string>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.</string> + <property name="clickable"> + <bool>true</bool> </property> - </widget> - </hbox> - </widget> - <widget class="TQCheckBox" row="0" column="0"> - <property name="name"> - <cstring>kcfg_ShowHiddenFiles</cstring> - </property> - <property name="text"> - <string>Show hidden fi&les</string> - </property> - <property name="checked"> + <property name="resizable"> <bool>true</bool> - </property> - <property name="whatsThis" stdset="0"> - <string>If this option is enabled, hidden files (i.e. files beginning with a dot) will be shown in the QuickBrowser menus.</string> - </property> - </widget> - <spacer row="0" column="1" rowspan="2" colspan="1"> + </property> + </column> <property name="name"> - <cstring>Spacer7</cstring> + <cstring>m_subMenus</cstring> </property> - <property name="orientation"> - <enum>Horizontal</enum> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>7</hsizetype> + <vsizetype>7</vsizetype> + <horstretch>0</horstretch> + <verstretch>1</verstretch> + </sizepolicy> </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> + <property name="minimumSize"> <size> - <width>20</width> + <width>0</width> <height>0</height> </size> </property> - </spacer> - </grid> - </widget> - <widget class="TQGroupBox" row="1" column="0"> - <property name="name"> - <cstring>m_recentGroup</cstring> - </property> - <property name="title"> - <string>Recent Documents Menu</string> - </property> - <grid> + <property name="fullWidth"> + <bool>true</bool> + </property> + <property name="whatsThis" stdset="0"> + <string>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.</string> + </property> + </widget> + <widget class="TQLayoutWidget" row="2" column="0" colspan="2"> <property name="name"> - <cstring>unnamed</cstring> + <cstring>Layout5</cstring> </property> - <widget class="TQLayoutWidget" row="1" column="0"> - <property name="name"> - <cstring>Layout3</cstring> - </property> - <hbox> + <vbox> + <widget class="TQCheckBox"> + <property name="name"> + <cstring>m_openOnHover</cstring> + </property> + <property name="text"> + <string>Open menu on mouse hover</string> + </property> + </widget> + <widget class="TQCheckBox"> + <property name="name"> + <cstring>kcfg_UseSidePixmap</cstring> + </property> + <property name="text"> + <string>Show side ima&ge</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + <property name="whatsThis" stdset="0"> + <string><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></string> + </property> + </widget> + <widget class="TQCheckBox"> + <property name="name"> + <cstring>kcfg_ShowKMenuText</cstring> + </property> + <property name="text"> + <string>Display text in menu button</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + <property name="whatsThis" stdset="0"> + <string><qt>When this option is selected the text below will be shown in the TDE Menu button.</string> + </property> + </widget> + <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="TQLabel"> + <property name="margin"> + <number>0</number> + </property> + <widget class="TQLineEdit" row="0" column="1" colspan="3"> <property name="name"> - <cstring>m_maxRecentDocumentsItemsLabel</cstring> + <cstring>kcfg_KMenuText</cstring> + </property> + <property name="maxLength"> + <number>35</number> + </property> + </widget> + <widget class="TQLabel" row="3" column="0" colspan="2"> + <property name="name"> + <cstring>TextLabel1_3_3_2</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>1</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> </property> <property name="text"> - <string>Ma&ximum number of entries:</string> + <string>Menu button icon:</string> </property> - <property name="buddy" stdset="0"> - <cstring>kcfg_MaxEntries2</cstring> + </widget> + <widget class="KPushButton" row="3" column="3" colspan="1"> + <property name="name"> + <cstring>btnCustomKMenuIcon</cstring> </property> - <property name="whatsThis" stdset="0"> - <string>This sets the maximum number of recently accessed documents stored for fast retrieval.</string> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>0</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>26</width> + <height>26</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>26</width> + <height>26</height> + </size> + </property> + <property name="acceptDrops"> + <bool>false</bool> + </property> + <property name="text"> + <string></string> </property> </widget> - <widget class="KIntNumInput"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> - <cstring>maxrecentdocs</cstring> + <cstring>TextLabel1_3_3_2</cstring> </property> - <property name="value"> - <number>10</number> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>1</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> </property> - <property name="minValue"> - <number>0</number> + <property name="text"> + <string>Text:</string> </property> - <property name="maxValue"> - <number>100</number> + </widget> + <widget class="TQLabel" row="2" column="0"> + <property name="name"> + <cstring>TextLabel1_3_3_2</cstring> </property> - <property name="whatsThis" stdset="0"> - <string>This sets the maximum number of recently accessed documents stored for fast retrieval.</string> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>1</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Font:</string> </property> </widget> - </hbox> - </widget> - <spacer row="0" column="1" rowspan="2" colspan="1"> - <property name="name"> - <cstring>Spacer7</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>20</width> - <height>0</height> - </size> - </property> - </spacer> - </grid> + <widget class="KFontRequester" row="2" column="1" rowspan="1" colspan="3"> + <property name="name"> + <cstring>kcfg_ButtonFont</cstring> + </property> + </widget> + <spacer row="4" column="3"> + <property name="name"> + <cstring>spacer6</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </grid> + <spacer> + <property name="name"> + <cstring>spacer8</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>MinimumExpanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + </spacer> + </vbox> + </widget> + </hbox> </widget> - <widget class="TQButtonGroup" row="0" column="1" rowspan="1"> - <property name="name"> - <cstring>m_pRecentOrderGroup</cstring> - </property> - <property name="title"> - <string>QuickStart Menu Items</string> - </property> - <grid> - <property name="name"> + <grid> + <property name="name"> <cstring>unnamed</cstring> - </property> - <widget class="TQLayoutWidget" row="2" column="0"> + </property> + <property name="margin"> + <number>0</number> + </property> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> - <cstring>Layout4</cstring> + <cstring>m_browserGroup</cstring> + </property> + <property name="title"> + <string>QuickBrowser Menus</string> </property> - <hbox> + <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="TQLabel"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>TextLabel2</cstring> - </property> - <property name="text"> - <string>Maxim&um number of entries:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>kcfg_NumVisibleEntries</cstring> - </property> - <property name="whatsThis" stdset="0"> - <string>This option allows you to define the maximum number of applications that should be displayed in the QuickStart menu area.</string> + <cstring>Layout3</cstring> </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="TQLabel"> + <property name="name"> + <cstring>m_maxQuickBrowserItemsLabel</cstring> + </property> + <property name="text"> + <string>Ma&ximum number of entries:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>kcfg_MaxEntries2</cstring> + </property> + <property name="whatsThis" stdset="0"> + <string>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.</string> + </property> + </widget> + <widget class="KIntNumInput"> + <property name="name"> + <cstring>kcfg_MaxEntries2</cstring> + </property> + <property name="value"> + <number>30</number> + </property> + <property name="minValue"> + <number>10</number> + </property> + <property name="maxValue"> + <number>100</number> + </property> + <property name="whatsThis" stdset="0"> + <string>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.</string> + </property> + </widget> + </hbox> </widget> - <widget class="KIntNumInput"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> - <cstring>kcfg_NumVisibleEntries</cstring> + <cstring>kcfg_ShowHiddenFiles</cstring> </property> - <property name="value"> - <number>5</number> - </property> - <property name="minValue"> - <number>0</number> + <property name="text"> + <string>Show hidden fi&les</string> </property> - <property name="maxValue"> - <number>20</number> + <property name="checked"> + <bool>true</bool> </property> <property name="whatsThis" stdset="0"> - <string>This option allows you to define how many applications should be displayed at most in the QuickStart menu area.</string> + <string>If this option is enabled, hidden files (i.e. files beginning with a dot) will be shown in the QuickBrowser menus.</string> </property> </widget> - </hbox> - </widget> - <widget class="TQRadioButton" row="0" column="0"> - <property name="name"> - <cstring>kcfg_RecentVsOften</cstring> - </property> - <property name="text"> - <string>Show the &applications most recently used</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - <property name="whatsThis" stdset="0"> - <string>When this option is selected the QuickStart menu area will be filled with the applications you have used most recently.</string> - </property> - </widget> - <widget class="TQRadioButton" row="1" column="0"> - <property name="name"> - <cstring>m_showFrequent</cstring> - </property> - <property name="text"> - <string>Show the applications most fre&quently used</string> - </property> - <property name="whatsThis" stdset="0"> - <string>When this option is selected the QuickStart menu area will be filled with the applications you use most frequently.</string> - </property> - </widget> - <spacer row="0" column="1" rowspan="3" colspan="1"> + <spacer row="0" column="1" rowspan="2" colspan="1"> + <property name="name"> + <cstring>Spacer7</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + </spacer> + </grid> + </widget> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> - <cstring>Spacer8</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> + <cstring>m_recentGroup</cstring> </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>20</width> - <height>0</height> - </size> + <property name="title"> + <string>Recent Documents Menu</string> </property> - </spacer> - </grid> - </widget> - <widget class="TQButtonGroup" row="1" column="1" rowspan="1"> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="TQLayoutWidget" row="1" column="0"> + <property name="name"> + <cstring>Layout3</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="TQLabel"> + <property name="name"> + <cstring>m_maxRecentDocumentsItemsLabel</cstring> + </property> + <property name="text"> + <string>Ma&ximum number of entries:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>kcfg_MaxEntries2</cstring> + </property> + <property name="whatsThis" stdset="0"> + <string>This sets the maximum number of recently accessed documents stored for fast retrieval.</string> + </property> + </widget> + <widget class="KIntNumInput"> + <property name="name"> + <cstring>maxrecentdocs</cstring> + </property> + <property name="value"> + <number>10</number> + </property> + <property name="minValue"> + <number>0</number> + </property> + <property name="maxValue"> + <number>100</number> + </property> + <property name="whatsThis" stdset="0"> + <string>This sets the maximum number of recently accessed documents stored for fast retrieval.</string> + </property> + </widget> + </hbox> + </widget> + <spacer row="0" column="1" rowspan="2" colspan="1"> + <property name="name"> + <cstring>Spacer7</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + </spacer> + </grid> + </widget> + <widget class="TQButtonGroup" row="0" column="1" rowspan="1"> <property name="name"> - <cstring>m_pSearchGroup</cstring> + <cstring>m_pRecentOrderGroup</cstring> </property> <property name="title"> - <string>TDE Menu Search</string> + <string>QuickStart Menu Items</string> </property> - <grid> - <property name="name"> + <grid> + <property name="name"> <cstring>unnamed</cstring> - </property> - <widget class="TQCheckBox"> + </property> + <widget class="TQLayoutWidget" row="2" column="0"> + <property name="name"> + <cstring>Layout4</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="TQLabel"> + <property name="name"> + <cstring>TextLabel2</cstring> + </property> + <property name="text"> + <string>Maxim&um number of entries:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>kcfg_NumVisibleEntries</cstring> + </property> + <property name="whatsThis" stdset="0"> + <string>This option allows you to define the maximum number of applications that should be displayed in the QuickStart menu area.</string> + </property> + </widget> + <widget class="KIntNumInput"> + <property name="name"> + <cstring>kcfg_NumVisibleEntries</cstring> + </property> + <property name="value"> + <number>5</number> + </property> + <property name="minValue"> + <number>0</number> + </property> + <property name="maxValue"> + <number>20</number> + </property> + <property name="whatsThis" stdset="0"> + <string>This option allows you to define how many applications should be displayed at most in the QuickStart menu area.</string> + </property> + </widget> + </hbox> + </widget> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> - <cstring>kcfg_UseSearchBar</cstring> + <cstring>kcfg_RecentVsOften</cstring> </property> <property name="text"> - <string>Show search field in TDE Menu</string> + <string>Show the &applications most recently used</string> </property> <property name="checked"> <bool>true</bool> </property> <property name="whatsThis" stdset="0"> - <string><qt>When this option is selected a text-based search field will appear in the TDE Menu.</qt></string> + <string>When this option is selected the QuickStart menu area will be filled with the applications you have used most recently.</string> + </property> + </widget> + <widget class="TQRadioButton" row="1" column="0"> + <property name="name"> + <cstring>m_showFrequent</cstring> + </property> + <property name="text"> + <string>Show the applications most fre&quently used</string> + </property> + <property name="whatsThis" stdset="0"> + <string>When this option is selected the QuickStart menu area will be filled with the applications you use most frequently.</string> </property> - </widget> - <spacer row="0" column="1" rowspan="3" colspan="1"> + </widget> + <spacer row="0" column="1" rowspan="3" colspan="1"> <property name="name"> <cstring>Spacer8</cstring> </property> @@ -700,40 +662,84 @@ </property> <property name="sizeHint"> <size> - <width>20</width> - <height>0</height> + <width>20</width> + <height>0</height> </size> </property> - </spacer> - </grid> - </widget> - </grid> - </vbox> -</widget> -<customwidgets> -</customwidgets> -<tabstops> - <tabstop>m_formatSimple</tabstop> - <tabstop>m_formatNameDesc</tabstop> - <tabstop>m_formDescName</tabstop> - <tabstop>kcfg_UseSidePixmap</tabstop> - <tabstop>m_editKMenuButton</tabstop> - <tabstop>m_subMenus</tabstop> - <tabstop>kcfg_ShowHiddenFiles</tabstop> - <tabstop>kcfg_MaxEntries2</tabstop> - <tabstop>kcfg_RecentVsOften</tabstop> - <tabstop>m_showFrequent</tabstop> - <tabstop>kcfg_NumVisibleEntries</tabstop> -</tabstops> -<includes> - <include location="global" impldecl="in implementation">klistview.h</include> - <include location="global" impldecl="in implementation">knuminput.h</include> - <include location="local" impldecl="in implementation">kdialog.h</include> -</includes> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> -<includehints> - <includehint>klistview.h</includehint> - <includehint>knuminput.h</includehint> -</includehints> + </spacer> + </grid> + </widget> + <widget class="TQButtonGroup" row="1" column="1" rowspan="1"> + <property name="name"> + <cstring>m_pSearchGroup</cstring> + </property> + <property name="title"> + <string>TDE Menu Search</string> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="TQCheckBox"> + <property name="name"> + <cstring>kcfg_UseSearchBar</cstring> + </property> + <property name="text"> + <string>Show search field in TDE Menu</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + <property name="whatsThis" stdset="0"> + <string><qt>When this option is selected a text-based search field will appear in the TDE Menu.</qt></string> + </property> + </widget> + <spacer row="0" column="1" rowspan="3" colspan="1"> + <property name="name"> + <cstring>Spacer8</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + </spacer> + </grid> + </widget> + </grid> + </vbox> + </widget> + <customwidgets> + </customwidgets> + <tabstops> + <tabstop>m_formatSimple</tabstop> + <tabstop>m_formatNameDesc</tabstop> + <tabstop>m_formDescName</tabstop> + <tabstop>kcfg_UseSidePixmap</tabstop> + <tabstop>m_editKMenuButton</tabstop> + <tabstop>m_subMenus</tabstop> + <tabstop>kcfg_ShowHiddenFiles</tabstop> + <tabstop>kcfg_MaxEntries2</tabstop> + <tabstop>kcfg_RecentVsOften</tabstop> + <tabstop>m_showFrequent</tabstop> + <tabstop>kcfg_NumVisibleEntries</tabstop> + </tabstops> + <includes> + <include location="global" impldecl="in implementation">klistview.h</include> + <include location="global" impldecl="in implementation">knuminput.h</include> + <include location="local" impldecl="in implementation">kdialog.h</include> + </includes> + <layoutdefaults spacing="6" margin="11"/> + <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> + <includehints> + <includehint>klistview.h</includehint> + <includehint>knuminput.h</includehint> + </includehints> </UI> 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>&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 <em>Any</em> 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>&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&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>&Background color:</string> + <string>Active task te&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&ve task text color:</string> + <string>&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&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> diff --git a/kicker/taskbar/taskbar.cpp b/kicker/taskbar/taskbar.cpp index ac8753caa..dd66c22b2 100644 --- a/kicker/taskbar/taskbar.cpp +++ b/kicker/taskbar/taskbar.cpp @@ -53,12 +53,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. TaskBar::TaskBar( TQWidget *parent, const char *name ) : Panner( parent, name ), m_showAllWindows(false), + m_cycleWheel(false), m_currentScreen(-1), m_showOnlyCurrentScreen(false), m_sortByDesktop(false), - m_cycleWheel(false), m_showIcon(false), m_showOnlyIconified(false), + m_showTaskStates(0), m_textShadowEngine(0), m_ignoreUpdates(false), m_relayoutTimer(0, "TaskBar::m_relayoutTimer") @@ -237,12 +238,14 @@ void TaskBar::configure() bool wasCycleWheel = m_cycleWheel; bool wasShowIcon = m_showIcon; bool wasShowOnlyIconified = m_showOnlyIconified; + int wasShowTaskStates = m_showTaskStates; m_showAllWindows = TaskBarSettings::showAllWindows(); m_sortByDesktop = m_showAllWindows && TaskBarSettings::sortByDesktop(); m_showIcon = TaskBarSettings::showIcon(); m_showOnlyIconified = TaskBarSettings::showOnlyIconified(); m_cycleWheel = TaskBarSettings::cycleWheel(); + m_showTaskStates = TaskBarSettings::showTaskStates(); m_currentScreen = -1; // Show all screens or re-get our screen m_showOnlyCurrentScreen = (TaskBarSettings::showCurrentScreenOnly() && @@ -266,7 +269,8 @@ void TaskBar::configure() wasSortByDesktop != m_sortByDesktop || wasShowIcon != m_showIcon || wasCycleWheel != m_cycleWheel || - wasShowOnlyIconified != m_showOnlyIconified) + wasShowOnlyIconified != m_showOnlyIconified || + wasShowTaskStates != m_showTaskStates) { // relevant settings changed, update our task containers for (TaskContainer::Iterator it = containers.begin(); @@ -597,7 +601,8 @@ void TaskBar::windowChanged(Task::Ptr task) if (!container || (!m_showAllWindows && !container->onCurrentDesktop() && - !container->isVisibleTo(this))) + !container->isVisibleTo(this)) || + container->isHidden()) { return; } @@ -927,7 +932,10 @@ int TaskBar::containerCount() const if ((m_showAllWindows || (*it)->onCurrentDesktop()) && ((showScreen() == -1) || ((*it)->isOnScreen()))) { - i++; + if (!(*it)->isHidden()) + { + i++; + } } } @@ -945,7 +953,10 @@ int TaskBar::taskCount() const if ((m_showAllWindows || (*it)->onCurrentDesktop()) && ((showScreen() == -1) || ((*it)->isOnScreen()))) { - i += (*it)->filteredTaskCount(); + if (!(*it)->isHidden()) + { + i += (*it)->filteredTaskCount(); + } } } @@ -1048,7 +1059,8 @@ TaskContainer::List TaskBar::filteredContainers() TaskContainer* c = *it; if ((m_showAllWindows || c->onCurrentDesktop()) && (!m_showOnlyIconified || c->isIconified()) && - ((showScreen() == -1) || c->isOnScreen())) + ((showScreen() == -1) || c->isOnScreen()) && + (!c->isHidden())) { list.append(c); c->show(); diff --git a/kicker/taskbar/taskbar.h b/kicker/taskbar/taskbar.h index bb4167166..dc75fab9c 100644 --- a/kicker/taskbar/taskbar.h +++ b/kicker/taskbar/taskbar.h @@ -110,13 +110,14 @@ private: bool blocklayout; bool m_showAllWindows; - bool m_cycleWheel; + bool m_cycleWheel; // The screen to show, -1 for all screens int m_currentScreen; bool m_showOnlyCurrentScreen; bool m_sortByDesktop; bool m_showIcon; bool m_showOnlyIconified; + int m_showTaskStates; ArrowType arrowType; TaskContainer::List containers; TaskContainer::List m_hiddenContainers; @@ -127,10 +128,10 @@ private: bool isGrouping; void reGroup(); KGlobalAccel* keys; - KTextShadowEngine* m_textShadowEngine; - TQTimer m_relayoutTimer; - bool m_ignoreUpdates; - TQImage m_blendGradient; + KTextShadowEngine* m_textShadowEngine; + bool m_ignoreUpdates; + TQTimer m_relayoutTimer; + TQImage m_blendGradient; }; #endif diff --git a/kicker/taskbar/taskbar.kcfg b/kicker/taskbar/taskbar.kcfg index 0d11b4a60..1ac6dadbf 100644 --- a/kicker/taskbar/taskbar.kcfg +++ b/kicker/taskbar/taskbar.kcfg @@ -37,6 +37,22 @@ <label>Group similar tasks:</label> <whatsthis>The taskbar can group similar windows into single buttons. When one of these window group buttons are clicked on a menu appears showing all the windows in that group. This can be especially useful with the <em>Show all windows</em> option.\n\nYou can set the taskbar to <strong>Never</strong> group windows, to <strong>Always</strong> group windows or to group windows only <strong>When the Taskbar is Full</strong>.\n\nBy default the taskbar groups windows when it is full.</whatsthis> </entry> + <entry key="ShowTaskStates" type="Enum" > + <choices> + <choice name="ShowAll"> + <label>Any</label> + </choice> + <choice name="ShowStopped"> + <label>Only Stopped</label> + </choice> + <choice name="ShowRunning"> + <label>Only Running</label> + </choice> + </choices> + <default>ShowAll</default> + <label>Show tasks with state:</label> + <whatsthis>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.</whatsthis> + </entry> <entry key="SortByDesktop" type="Bool" > <default>true</default> <label>Sort windows by desktop</label> diff --git a/kicker/taskbar/taskcontainer.cpp b/kicker/taskbar/taskcontainer.cpp index ae50dc6cd..79aca98e8 100644 --- a/kicker/taskbar/taskcontainer.cpp +++ b/kicker/taskbar/taskcontainer.cpp @@ -34,6 +34,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tqstyle.h> #include <tqstylesheet.h> #include <tqtooltip.h> +#include <tqfile.h> #include <kapplication.h> #include <kdebug.h> @@ -43,6 +44,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <kiconloader.h> #include <kimageeffect.h> +#ifdef Q_WS_X11 +#include <X11/Xlib.h> +#include <netwm.h> +#include <fixx11h.h> +#endif + #include "global.h" #include "kickerSettings.h" #include "paneldrag.h" @@ -54,6 +61,57 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "taskcontainer.h" #include "taskcontainer.moc" +static Bool netwm_atoms_created = False; +static Atom net_wm_pid = 0; + +static const int netAtomCount = 1; +static void create_atoms(Display *d) { + static const char * const names[netAtomCount] = + { + "_NET_WM_PID" + }; + + Atom atoms[netAtomCount], *atomsp[netAtomCount] = + { + &net_wm_pid + }; + + assert( !netwm_atoms_created ); + + int i = netAtomCount; + while (i--) + atoms[i] = 0; + + XInternAtoms(d, (char **) names, netAtomCount, False, atoms); + + i = netAtomCount; + while (i--) + *atomsp[i] = atoms[i]; + + netwm_atoms_created = True; +} + +bool is_process_resumable(pid_t pid) { + TQFile procStatFile(TQString("/proc/%1/stat").arg(pid)); + if (procStatFile.open(IO_ReadOnly)) { + TQByteArray statRaw = procStatFile.readAll(); + procStatFile.close(); + TQString statString(statRaw); + TQStringList statFields = TQStringList::split(" ", statString, TRUE); + TQString tcomm = statFields[1]; + TQString state = statFields[2]; + if( state == "T" ) { + return true; + } + else { + return false; + } + } + else { + return false; + } +} + TaskContainer::TaskContainer(Task::Ptr task, TaskBar* bar, TQWidget *parent, const char *name) : TQToolButton(parent, name), @@ -117,6 +175,8 @@ TaskContainer::TaskContainer(Startup::Ptr startup, PixmapList& startupFrames, void TaskContainer::init() { + if (!netwm_atoms_created) create_atoms(TQPaintDevice::x11AppDisplay()); + setWFlags(TQt::WNoAutoErase); setBackgroundMode(NoBackground); animBg = TQPixmap(16, 16); @@ -432,6 +492,11 @@ bool TaskContainer::isEmpty() return (tasks.isEmpty() && !m_startup); } +bool TaskContainer::isHidden() +{ + return ((m_filteredTasks.count() < 1) && !m_startup); +} + TQString TaskContainer::id() { return sid; @@ -1477,7 +1542,58 @@ void TaskContainer::updateFilteredTaskList() if ((taskBar->showAllWindows() || t->isOnCurrentDesktop()) && (!TaskBarSettings::showOnlyIconified() || t->isIconified())) { - m_filteredTasks.append(t); + pid_t pid = 0; +#ifdef Q_WS_X11 + Atom type_ret; + int format_ret; + unsigned long nitems_ret = 0, unused = 0; + unsigned char *data_ret = 0; + if (XGetWindowProperty(TQPaintDevice::x11AppDisplay(), t->window(), net_wm_pid, 0l, 1l, + False, XA_CARDINAL, &type_ret, &format_ret, + &nitems_ret, &unused, &data_ret) == Success) { + if (type_ret == XA_CARDINAL && format_ret == 32 && nitems_ret == 1) { + pid = *((long *) data_ret); + } + if ( data_ret ) + XFree(data_ret); + } +#endif + if (pid < 0) { + m_filteredTasks.append(t); + } + else if (TaskBarSettings::showTaskStates() != TaskBarSettings::ShowAll) { + if (is_process_resumable(pid)) { + if (TaskBarSettings::showTaskStates() == TaskBarSettings::ShowAll) { + m_filteredTasks.append(t); + } + else if (TaskBarSettings::showTaskStates() == TaskBarSettings::ShowStopped) { + m_filteredTasks.append(t); + } + else if (TaskBarSettings::showTaskStates() == TaskBarSettings::ShowRunning) { + t->publishIconGeometry( TQRect()); + } + else { + m_filteredTasks.append(t); + } + } + else { + if (TaskBarSettings::showTaskStates() == TaskBarSettings::ShowAll) { + m_filteredTasks.append(t); + } + else if (TaskBarSettings::showTaskStates() == TaskBarSettings::ShowStopped) { + t->publishIconGeometry( TQRect()); + } + else if (TaskBarSettings::showTaskStates() == TaskBarSettings::ShowRunning) { + m_filteredTasks.append(t); + } + else { + m_filteredTasks.append(t); + } + } + } + else { + m_filteredTasks.append(t); + } } else { diff --git a/kicker/taskbar/taskcontainer.h b/kicker/taskbar/taskcontainer.h index 8dfdf6d2d..766d37639 100644 --- a/kicker/taskbar/taskcontainer.h +++ b/kicker/taskbar/taskcontainer.h @@ -65,6 +65,7 @@ public: bool onCurrentDesktop(); bool isIconified(); bool isOnScreen(); + bool isHidden(); TQString id(); int desktop(); diff --git a/twin/KWinInterface.h b/twin/KWinInterface.h index 445e42fe9..dbc132888 100644 --- a/twin/KWinInterface.h +++ b/twin/KWinInterface.h @@ -15,6 +15,7 @@ class KWinInterface : virtual public DCOPObject virtual ASYNC killWindowId(unsigned long winId) = 0; virtual ASYNC suspendWindowId(unsigned long winId) = 0; virtual ASYNC resumeWindowId(unsigned long winId) = 0; + virtual bool isResumeableWindowID(unsigned long winId) = 0; virtual void refresh() = 0; virtual void doNotManage(TQString)= 0; virtual void showWindowMenuAt(unsigned long winId, int x, int y)= 0; diff --git a/twin/workspace.cpp b/twin/workspace.cpp index 643395e88..cc109918c 100644 --- a/twin/workspace.cpp +++ b/twin/workspace.cpp @@ -1974,6 +1974,37 @@ void Workspace::resumeWindowId( Window window_to_resume ) } +bool Workspace::isResumeableWindowID( Window window_to_check ) + { + if( window_to_check == None ) + return false; + Window window = window_to_check; + Client* client = NULL; + for(;;) + { + client = findClient( FrameIdMatchPredicate( window )); + if( client != NULL ) // found the client + break; + Window parent = NULL; + Window root = NULL; + Window* children = NULL; + unsigned int children_count; + XQueryTree( tqt_xdisplay(), window, &root, &parent, &children, &children_count ); + if( children != NULL ) + XFree( children ); + if( window == root ) // we didn't find the client, probably an override-redirect window + break; + window = parent; // go up + if( window == NULL ) + break; + } + if( client != NULL ) + return client->isResumeable(); + else + return false; + } + + void Workspace::sendPingToWindow( Window window, Time timestamp ) { rootInfo->sendPing( window, timestamp ); diff --git a/twin/workspace.h b/twin/workspace.h index f1f7dc97e..0f019cbbf 100644 --- a/twin/workspace.h +++ b/twin/workspace.h @@ -96,9 +96,10 @@ class Workspace : public TQObject, public KWinInterface, public KDecorationDefin /** * @internal */ - void killWindowId( Window window); - void suspendWindowId( Window window); - void resumeWindowId( Window window); + void killWindowId( Window window ); + void suspendWindowId( Window window ); + void resumeWindowId( Window window ); + bool isResumeableWindowID( Window window ); void killWindow() { slotKillWindow(); } void suspendWindow() { slotSuspendWindow(); } |