diff options
Diffstat (limited to 'lumina-desktop')
-rw-r--r-- | lumina-desktop/lumina-desktop.pro | 2 | ||||
-rw-r--r-- | lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp | 19 |
2 files changed, 10 insertions, 11 deletions
diff --git a/lumina-desktop/lumina-desktop.pro b/lumina-desktop/lumina-desktop.pro index e3a2001e..885e914c 100644 --- a/lumina-desktop/lumina-desktop.pro +++ b/lumina-desktop/lumina-desktop.pro @@ -5,7 +5,7 @@ TARGET = Lumina-DE target.path = /usr/local/bin LIBS += -L../libLumina -lLuminaUtils -lXdamage -lX11 -LIBPATH = ../libLumina +QMAKE_LIBDIR = ../libLumina DEPENDPATH += ../libLumina TEMPLATE = app diff --git a/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp b/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp index 80600488..a605ae86 100644 --- a/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp +++ b/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp @@ -100,7 +100,8 @@ void LTaskButton::UpdateButton(){ noicon = false; } } - winMenu->addAction( WINLIST[i].icon(), WINLIST[i].text() ); + QAction *tmp = winMenu->addAction( WINLIST[i].icon(), WINLIST[i].text() ); + tmp->setData(i); //save which number in the WINLIST this entry is for Lumina::STATES stat = WINLIST[i].status(); if(stat==Lumina::NOTIFICATION){ showstate = stat; } //highest priority else if( stat==Lumina::ACTIVE && showstate != Lumina::NOTIFICATION){ showstate = stat; } //next priority @@ -171,10 +172,9 @@ void LTaskButton::triggerWindow(){ void LTaskButton::winClicked(QAction* act){ //Get the window from the action - QString txt = act->text(); - for(int i=0; i<WINLIST.length(); i++){ - if(WINLIST[i].text() == txt){ cWin = WINLIST[i]; } - } + if(act->data().toInt() < WINLIST.length()){ + cWin = WINLIST[act->data().toInt()]; + }else{ cWin = LWinInfo(); } //clear it //Now trigger the window triggerWindow(); } @@ -183,11 +183,10 @@ void LTaskButton::openActionMenu(){ //Get the Window the mouse is currently over QAction *act = winMenu->actionAt(QCursor::pos()); if( act != 0 && winMenu->isVisible() ){ - //get the window from the action - QString txt = act->text(); - for(int i=0; i<WINLIST.length(); i++){ - if(WINLIST[i].text() == txt){ cWin = WINLIST[i]; } - } + //Get the window from the action + if(act->data().toInt() < WINLIST.length()){ + cWin = WINLIST[act->data().toInt()]; + }else{ cWin = LWinInfo(); } //clear it } //Now show the action menu actMenu->popup(QCursor::pos()); |