From 3df12cd87674fdfbc2afa21584e1f3e558fa873b Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 13 Apr 2013 15:00:04 -0500 Subject: Add menu items to rearrange taskbar entries Make taskbar drag and drop moving more robust This resolves Bug 1103 --- kicker/taskmanager/taskrmbmenu.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'kicker/taskmanager/taskrmbmenu.cpp') 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)); } -- cgit v1.2.1