diff options
author | Ken Moore <ken@ixsystems.com> | 2019-02-28 18:50:34 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2019-02-28 18:55:38 -0500 |
commit | 5747f7fe96c2419f8837bafd7122ba2a1ad04497 (patch) | |
tree | 3219ad3d9bbd542c8c7fd6831bca397b4406cf07 /src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp | |
parent | Add XDG mimetype registrations for ISO and IMG files for lumina-archiver. (diff) | |
download | lumina-5747f7fe96c2419f8837bafd7122ba2a1ad04497.tar.gz lumina-5747f7fe96c2419f8837bafd7122ba2a1ad04497.tar.bz2 lumina-5747f7fe96c2419f8837bafd7122ba2a1ad04497.zip |
Two fixes for icons:
1. Fix invalid *.desktop registrations where the Icon field is a relative filename WITH an extension.
Icons from the theme are supposed to be name only (no extension), while absolute file paths are supposed to include the extension.
2. Fix up the detection/usage of non-theme icons within LFileInfo.
Also add a simple icon() function for LFileInfo to handle the 3 different types of icon file returns.
Diffstat (limited to 'src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp index d8014f4c..c2f0bea1 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp @@ -9,6 +9,9 @@ #include <LuminaXDG.h> #include <LUtils.h> //This contains the "ResizeMenu" class +//#include <LIconCache.h> + +//extern LIconCache *ICONS; LStartButtonPlugin::LStartButtonPlugin(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){ button = new QToolButton(this); @@ -64,7 +67,7 @@ void LStartButtonPlugin::updateQuickLaunch(QStringList apps){ //App still listed - update the button old << QUICKL[i]->whatsThis(); //add the list of current buttons LFileInfo info(QUICKL[i]->whatsThis()); - QUICKL[i]->setIcon( LXDG::findIcon(info.iconfile(),"unknown") ); + QUICKL[i]->setIcon( info.icon() ); if(info.isDesktopFile()){ QUICKL[i]->setToolTip( info.XDG()->name ); } else{ QUICKL[i]->setToolTip( info.fileName() ); } } @@ -76,7 +79,7 @@ void LStartButtonPlugin::updateQuickLaunch(QStringList apps){ LQuickLaunchButton *tmp = new LQuickLaunchButton(apps[i], this); QUICKL << tmp; LFileInfo info(apps[i]); - tmp->setIcon( LXDG::findIcon( info.iconfile() ) ); + tmp->setIcon( info.icon() ); if(info.isDesktopFile()){ tmp->setToolTip( info.XDG()->name ); } else{ tmp->setToolTip( info.fileName() ); } //Now add the button to the layout and connect the signal/slots |