diff options
author | Weblate <noreply@weblate.org> | 2016-09-23 08:47:32 +0000 |
---|---|---|
committer | Weblate <noreply@weblate.org> | 2016-09-23 08:47:32 +0000 |
commit | 3b6320ffa0a3fd3e4385df2faa7ac4a5c5d6df0b (patch) | |
tree | 05aac860fdec6f1af2332bbf128a2bac7f27f02b /src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp | |
parent | Translated using Weblate (l_TERMINAL@sv (generated)) (diff) | |
parent | Translated using Weblate (lumina_WM@lt (generated)) (diff) | |
download | lumina-3b6320ffa0a3fd3e4385df2faa7ac4a5c5d6df0b.tar.gz lumina-3b6320ffa0a3fd3e4385df2faa7ac4a5c5d6df0b.tar.bz2 lumina-3b6320ffa0a3fd3e4385df2faa7ac4a5c5d6df0b.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp | 12 |
1 files changed, 5 insertions, 7 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 321970ed..05b7981f 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp @@ -31,9 +31,8 @@ void AppLaunchButtonPlugin::updateButtonVisuals(){ QIcon icon; QString tooltip = tr("Click to assign an application"); if(appfile.endsWith(".desktop")){ - bool ok = false; - XDGDesktop desk = LXDG::loadDesktopFile(appfile,ok); - if(ok){ + XDGDesktop desk(appfile); + if(desk.isValid()){ icon = LXDG::findIcon(desk.icon, "unknown"); tooltip = QString(tr("Launch %1")).arg(desk.name); }else{ @@ -56,13 +55,13 @@ void AppLaunchButtonPlugin::updateButtonVisuals(){ void AppLaunchButtonPlugin::AppClicked(){ if(appfile.isEmpty()){ //No App File selected - QList<XDGDesktop> apps = LSession::handle()->applicationMenu()->currentAppHash()->value("All"); + QList<XDGDesktop*> apps = LSession::handle()->applicationMenu()->currentAppHash()->value("All"); QStringList names; - for(int i=0; i<apps.length(); i++){ names << apps[i].name; } + for(int i=0; i<apps.length(); i++){ names << apps[i]->name; } bool ok = false; QString app = QInputDialog::getItem(this, tr("Select Application"), tr("Name:"), names, 0, false, &ok); if(!ok || names.indexOf(app)<0){ return; } //cancelled - appfile = apps[ names.indexOf(app) ].filePath; + appfile = apps[ names.indexOf(app) ]->filePath; //Still need to find a way to set this value persistently // --- perhaps replace the plugin in the desktop settings file with the new path? // --- "applauncher::broken---<something>" -> "applauncher::fixed---<something>" ? @@ -71,4 +70,3 @@ void AppLaunchButtonPlugin::AppClicked(){ LSession::LaunchApplication("lumina-open \""+appfile+"\""); } } - |