summaryrefslogtreecommitdiffstats
path: root/kicker/taskmanager
diff options
context:
space:
mode:
Diffstat (limited to 'kicker/taskmanager')
-rw-r--r--kicker/taskmanager/taskrmbmenu.cpp11
-rw-r--r--kicker/taskmanager/taskrmbmenu.h3
2 files changed, 12 insertions, 2 deletions
diff --git a/kicker/taskmanager/taskrmbmenu.cpp b/kicker/taskmanager/taskrmbmenu.cpp
index c910c5f9d..f92719f47 100644
--- a/kicker/taskmanager/taskrmbmenu.cpp
+++ b/kicker/taskmanager/taskrmbmenu.cpp
@@ -38,10 +38,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "taskrmbmenu.h"
#include "taskrmbmenu.moc"
-TaskRMBMenu::TaskRMBMenu(const Task::List& theTasks, bool show, TQWidget *parent, const char *name)
+TaskRMBMenu::TaskRMBMenu(const Task::List& theTasks, bool show, TQPopupMenu* moveMenu, TQWidget *parent, const char *name)
: TQPopupMenu( parent, name )
, tasks( theTasks )
, showAll( show )
+ , taskMoveMenu( moveMenu )
{
assert(tasks.count() > 0);
if (tasks.count() == 1)
@@ -57,6 +58,7 @@ TaskRMBMenu::TaskRMBMenu(const Task::List& theTasks, bool show, TQWidget *parent
TaskRMBMenu::TaskRMBMenu(Task::Ptr task, bool show, TQWidget *parent, const char *name)
: TQPopupMenu( parent, name )
, showAll( show )
+ , taskMoveMenu( NULL )
{
fillMenu(task);
}
@@ -106,6 +108,13 @@ void TaskRMBMenu::fillMenu(Task::Ptr t)
insertSeparator();
+ if (taskMoveMenu) {
+ taskMoveMenu->reparent(this, taskMoveMenu->getWFlags(), taskMoveMenu->geometry().topLeft(), FALSE);
+ insertItem(i18n("Move Task Button"), taskMoveMenu);
+
+ insertSeparator();
+ }
+
id = insertItem(SmallIcon("fileclose"), i18n("&Close"), t, TQT_SLOT(close()));
setItemEnabled(id, !checkActions || t->info().actionSupported(NET::ActionClose));
}
diff --git a/kicker/taskmanager/taskrmbmenu.h b/kicker/taskmanager/taskrmbmenu.h
index d95230f9b..76b209ca7 100644
--- a/kicker/taskmanager/taskrmbmenu.h
+++ b/kicker/taskmanager/taskrmbmenu.h
@@ -32,7 +32,7 @@ class KDE_EXPORT TaskRMBMenu : public TQPopupMenu
Q_OBJECT
public:
- TaskRMBMenu(const Task::List&, bool showAll = true, TQWidget *parent = 0, const char *name = 0);
+ TaskRMBMenu(const Task::List&, bool showAll = true, TQPopupMenu* moveMenu = NULL, TQWidget *parent = 0, const char *name = 0);
TaskRMBMenu(Task::Ptr, bool showAll = true, TQWidget *parent = 0, const char *name = 0);
private:
@@ -54,6 +54,7 @@ private slots:
private:
Task::List tasks;
bool showAll;
+ TQPopupMenu* taskMoveMenu;
};
#endif