diff options
author | Timothy Pearson <[email protected]> | 2013-04-13 15:00:04 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-04-13 15:00:04 -0500 |
commit | 3df12cd87674fdfbc2afa21584e1f3e558fa873b (patch) | |
tree | 43a2c84807185d598b3ed3b74b13c58e94aa7b81 /kicker/taskmanager | |
parent | a733ce41cb3edc37426e00708e49fb59eea6acd8 (diff) | |
download | tdebase-3df12cd87674fdfbc2afa21584e1f3e558fa873b.tar.gz tdebase-3df12cd87674fdfbc2afa21584e1f3e558fa873b.zip |
Add menu items to rearrange taskbar entries
Make taskbar drag and drop moving more robust
This resolves Bug 1103
Diffstat (limited to 'kicker/taskmanager')
-rw-r--r-- | kicker/taskmanager/taskrmbmenu.cpp | 11 | ||||
-rw-r--r-- | kicker/taskmanager/taskrmbmenu.h | 3 |
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 |