summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2022-10-11 20:11:09 +0300
committerMavridis Philippe <mavridisf@gmail.com>2022-10-11 20:15:34 +0300
commit7b7f96164495137d79b57f16257e915f64cc68b5 (patch)
tree41be8e1d0905e9cf228bea724b5041c8205f901f
parent254e464ce900d6ee3c4d8587c8adc0b9dc59a392 (diff)
downloadtdebase-7b7f96164495137d79b57f16257e915f64cc68b5.tar.gz
tdebase-7b7f96164495137d79b57f16257e915f64cc68b5.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>
-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)