diff options
author | Ken Moore <moorekou@gmail.com> | 2015-11-23 17:00:39 -0500 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-11-23 17:00:39 -0500 |
commit | 486597f6247748a6aa6c30129b2156922b869a8c (patch) | |
tree | ed6b68bd07cb65cc135b227da448027454e3235b | |
parent | Merge branch 'master' of github.com:pcbsd/lumina (diff) | |
download | lumina-486597f6247748a6aa6c30129b2156922b869a8c.tar.gz lumina-486597f6247748a6aa6c30129b2156922b869a8c.tar.bz2 lumina-486597f6247748a6aa6c30129b2156922b869a8c.zip |
Adjust the start menu to show the "genericName" instead of the comment underneath an app name, and use the comment as the tooltip. Also adjust the panel re-focus routine a bit to make it smarter about which window gets activation after leaving the panel if the previously active window was closed/minimized.
-rw-r--r-- | lumina-desktop/LSession.cpp | 6 | ||||
-rw-r--r-- | lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp index aa3fa923..b7ccbbe5 100644 --- a/lumina-desktop/LSession.cpp +++ b/lumina-desktop/LSession.cpp @@ -677,7 +677,11 @@ WId LSession::activeWindow(){ //qDebug() << "Check Active Window:" << active << lastActiveWin; if(RunningApps.contains(active)){ lastActiveWin = active; } else if(RunningApps.contains(lastActiveWin) && XCB->WindowState(lastActiveWin) >= LXCB::VISIBLE){} //no change needed - else{ + else if(RunningApps.contains(lastActiveWin) && RunningApps.length()>1){ + int start = RunningApps.indexOf(lastActiveWin); + if(start<1){ lastActiveWin = RunningApps.length()-1; } //wrap around to the last item + else{ lastActiveWin = RunningApps[start-1]; } + }else{ //Need to change the last active window - find the first one which is visible lastActiveWin = 0; //fallback value - nothing active for(int i=0; i<RunningApps.length(); i++){ diff --git a/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp b/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp index 8c0fae09..bdd13b18 100644 --- a/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp +++ b/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp @@ -22,8 +22,9 @@ ItemWidget::ItemWidget(QWidget *parent, QString itemPath, QString type, bool gob icon->setPixmap( LXDG::findIcon(item.icon, "preferences-system-windows-actions").pixmap(32,32) ); iconPath = item.icon; text = item.name; - if(!item.comment.isEmpty()){ text.append("<br><i> -- "+item.comment+"</i>"); } + if(!item.genericName.isEmpty() && item.name!=item.genericName){ text.append("<br><i> -- "+item.genericName+"</i>"); } name->setText(text); + name->setToolTip(item.comment); setupActions(item); }else{ gooditem = false; @@ -79,7 +80,7 @@ ItemWidget::ItemWidget(QWidget *parent, QString itemPath, QString type, bool gob }else{ isShortcut = false; } - if(isShortcut){ + if(isShortcut && name->toolTip().isEmpty()){ name->setToolTip(icon->whatsThis()); //also allow the user to see the full shortcut path } //Now setup the button appropriately @@ -104,8 +105,9 @@ ItemWidget::ItemWidget(QWidget *parent, XDGDesktop item) : QFrame(parent){ //Now fill it appropriately icon->setPixmap( LXDG::findIcon(item.icon,"preferences-system-windows-actions").pixmap(64,64) ); text = item.name; - if(!item.comment.isEmpty()){ text.append("<br><i> -- "+item.comment+"</i>"); } + if(!item.genericName.isEmpty() && item.name!=item.genericName){ text.append("<br><i> -- "+item.genericName+"</i>"); } name->setText(text); + name->setToolTip(item.comment); this->setWhatsThis(item.name); icon->setWhatsThis(item.filePath); iconPath = item.icon; |