From 5747f7fe96c2419f8837bafd7122ba2a1ad04497 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 28 Feb 2019 18:50:34 -0500 Subject: 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. --- .../core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp') 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 #include //This contains the "ResizeMenu" class +//#include + +//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 -- cgit