summaryrefslogtreecommitdiffstats
path: root/kicker/taskmanager
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2022-10-11 20:11:09 +0300
committerMavridis Philippe <mavridisf@gmail.com>2022-10-12 16:55:42 +0300
commit9f16a312faa2652a1c226ec305c345013f096018 (patch)
tree3177f3f49b44c7d3d07a4131476b53c902d78ae1 /kicker/taskmanager
parente0f5bc13db4e4d7441bdec351d9b051286a707ea (diff)
downloadtdebase-9f16a312faa2652a1c226ec305c345013f096018.tar.gz
tdebase-9f16a312faa2652a1c226ec305c345013f096018.zip
Add "Move Task Button" action to group tasks
This resolves issue TDE/tde#98. Also contains some identation fixes. Signed-off-by: Mavridis Philippe <mavridisf@gmail.com> (cherry picked from commit 7b7f96164495137d79b57f16257e915f64cc68b5)
Diffstat (limited to 'kicker/taskmanager')
-rw-r--r--kicker/taskmanager/taskrmbmenu.cpp77
1 files changed, 42 insertions, 35 deletions
diff --git a/kicker/taskmanager/taskrmbmenu.cpp b/kicker/taskmanager/taskrmbmenu.cpp
index 55db3a6b7..cdc6e4532 100644
--- a/kicker/taskmanager/taskrmbmenu.cpp
+++ b/kicker/taskmanager/taskrmbmenu.cpp
@@ -121,22 +121,22 @@ void TaskRMBMenu::fillMenu(Task::Ptr t)
void TaskRMBMenu::fillMenu()
{
- int id;
- setCheckable( true );
+ int id;
+ setCheckable( true );
Task::List::iterator itEnd = tasks.end();
for (Task::List::iterator it = tasks.begin(); it != itEnd; ++it)
{
- Task::Ptr t = (*it);
+ Task::Ptr t = (*it);
- id = insertItem( TQIconSet( t->pixmap() ),
- t->visibleNameWithState(),
- new TaskRMBMenu(t, this) );
- setItemChecked( id, t->isActive() );
- connectItem( id, t, TQT_SLOT( activateRaiseOrIconify() ) );
- }
+ id = insertItem( TQIconSet( t->pixmap() ),
+ t->visibleNameWithState(),
+ new TaskRMBMenu(t, this) );
+ setItemChecked( id, t->isActive() );
+ connectItem( id, t, TQT_SLOT( activateRaiseOrIconify() ) );
+ }
- insertSeparator();
+ insertSeparator();
bool enable = false;
@@ -159,48 +159,55 @@ void TaskRMBMenu::fillMenu()
enable = false;
- id = insertItem( i18n( "Mi&nimize All" ), this, TQT_SLOT( slotMinimizeAll() ) );
+ id = insertItem( i18n( "Mi&nimize All" ), this, TQT_SLOT( slotMinimizeAll() ) );
itEnd = tasks.end();
for (Task::List::iterator it = tasks.begin(); it != itEnd; ++it)
{
- if( !(*it)->isIconified() ) {
- enable = true;
- break;
- }
- }
- setItemEnabled( id, enable );
+ if( !(*it)->isIconified() ) {
+ enable = true;
+ break;
+ }
+ }
+ setItemEnabled( id, enable );
- enable = false;
+ enable = false;
- id = insertItem( i18n( "Ma&ximize All" ), this, TQT_SLOT( slotMaximizeAll() ) );
+ id = insertItem( i18n( "Ma&ximize All" ), this, TQT_SLOT( slotMaximizeAll() ) );
itEnd = tasks.end();
for (Task::List::iterator it = tasks.begin(); it != itEnd; ++it)
{
if( !(*it)->isMaximized() ) {
- enable = true;
- break;
- }
- }
- setItemEnabled( id, enable );
+ enable = true;
+ break;
+ }
+ }
+ setItemEnabled( id, enable );
- enable = false;
+ enable = false;
- id = insertItem( i18n( "&Restore All" ), this, TQT_SLOT( slotRestoreAll() ) );
+ id = insertItem( i18n( "&Restore All" ), this, TQT_SLOT( slotRestoreAll() ) );
itEnd = tasks.end();
for (Task::List::iterator it = tasks.begin(); it != itEnd; ++it)
{
- if( (*it)->isIconified() || (*it)->isMaximized() ) {
- enable = true;
- break;
- }
- }
- setItemEnabled( id, enable );
+ if( (*it)->isIconified() || (*it)->isMaximized() ) {
+ enable = true;
+ break;
+ }
+ }
+ setItemEnabled( id, enable );
+
+ insertSeparator();
+
+ enable = false;
- insertSeparator();
+ if (taskMoveMenu) {
+ taskMoveMenu->reparent(this, taskMoveMenu->getWFlags(), taskMoveMenu->geometry().topLeft(), FALSE);
+ insertItem(i18n("Move Task Button"), taskMoveMenu);
- enable = false;
+ insertSeparator();
+ }
- insertItem( SmallIcon( "window-close" ), i18n( "&Close All" ), this, TQT_SLOT( slotCloseAll() ) );
+ insertItem( SmallIcon( "window-close" ), i18n( "&Close All" ), this, TQT_SLOT( slotCloseAll() ) );
}
TQPopupMenu* TaskRMBMenu::makeAdvancedMenu(Task::Ptr t)