aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2016-12-19 15:03:45 -0500
committerKen Moore <ken@ixsystems.com>2016-12-19 15:03:45 -0500
commitecacdf3fbd80627a6da3e44a077ef3e308688c10 (patch)
treef7c72f5861377d0c6e83355fc0227b27f82f45b6 /src-qt5/core/lumina-desktop
parentMerge branch 'master' of github.com:trueos/lumina (diff)
downloadlumina-ecacdf3fbd80627a6da3e44a077ef3e308688c10.tar.gz
lumina-ecacdf3fbd80627a6da3e44a077ef3e308688c10.tar.bz2
lumina-ecacdf3fbd80627a6da3e44a077ef3e308688c10.zip
Update the applauncher panel plugin to be able to auto-complete paths to .desktop files.
Diffstat (limited to 'src-qt5/core/lumina-desktop')
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp7
1 files changed, 6 insertions, 1 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 05b7981f..1fd819b5 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp
@@ -8,13 +8,18 @@
#include "../../LSession.h"
#include <LuminaXDG.h>
+#include <LUtils.h>
#include <QInputDialog>
AppLaunchButtonPlugin::AppLaunchButtonPlugin(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){
button = new QToolButton(this);
button->setAutoRaise(true);
button->setToolButtonStyle(Qt::ToolButtonIconOnly);
- appfile = id.section("---",0,0).section("::",1,1);
+ appfile = id.section("---",0,0).section("::",1,1);
+ if(!QFile::exists(appfile) && appfile.endsWith(".desktop")){
+ //might be a relative path - try to find the file
+ appfile = LUtils::AppToAbsolute(appfile.section("/",-1) );
+ }
if(!QFile::exists(appfile)){ appfile.clear(); }
connect(button, SIGNAL(clicked()), this, SLOT(AppClicked()));
this->layout()->setContentsMargins(0,0,0,0);
bgstack15