diff options
author | Ken Moore <ken@ixsystems.com> | 2019-01-27 16:11:00 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2019-01-27 16:11:00 -0500 |
commit | 9ca1d49ef773adae2a26758a61c9db3b029d93b1 (patch) | |
tree | c8247a14c15f855a74e7b7e7a2bb639ba0b4d713 /src-qt5/core/lumina-desktop/panel-plugins | |
parent | Add shortcut Ctrl+F4 for closing the current tab (diff) | |
download | lumina-9ca1d49ef773adae2a26758a61c9db3b029d93b1.tar.gz lumina-9ca1d49ef773adae2a26758a61c9db3b029d93b1.tar.bz2 lumina-9ca1d49ef773adae2a26758a61c9db3b029d93b1.zip |
Make sure the applauncher panel plugin uses the same LFileInfo class as other tools.
Diffstat (limited to 'src-qt5/core/lumina-desktop/panel-plugins')
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp b/src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp index 98770f18..46a5c338 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp @@ -35,20 +35,15 @@ AppLaunchButtonPlugin::~AppLaunchButtonPlugin(){ void AppLaunchButtonPlugin::updateButtonVisuals(){ QIcon icon; QString tooltip = tr("Click to assign an application"); - if(appfile.endsWith(".desktop")){ - XDGDesktop desk(appfile); - if(desk.isValid()){ - icon = LXDG::findIcon(desk.icon, "unknown"); - tooltip = QString(tr("Launch %1")).arg(desk.name); - }else{ - icon = LXDG::findIcon("task-attention",""); - appfile.clear(); - } - }else if(QFile::exists(appfile)){ - icon = LXDG::findMimeIcon(appfile.section("/",-1)); + LFileInfo info(appfile); + if(info.isDesktopFile()){ + icon = LXDG::findIcon(info.iconfile(), "unknown"); + tooltip = QString(tr("Launch %1")).arg(info.XDG()->name); + }else if(info.exists()){ + icon = LXDG::findIcon(info.iconfile(), "unknown"); tooltip = QString(tr("Open %1")).arg(appfile.section("/",-1)); }else{ - icon = LXDG::findIcon("task-attention", ""); + icon = LXDG::findIcon("task-attention", ""); } button->setIcon( icon ); button->setToolTip(tooltip); |