aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2016-09-16 19:38:14 +0000
committerWeblate <noreply@weblate.org>2016-09-16 19:38:14 +0000
commit8be77a80c4430b85dae569923c3efc6ed2384472 (patch)
treea972234c061667fcd01fb2d76220567af1abe34f /src-qt5/core
parentTranslated using Weblate (lumina_DESKTOP@fa (generated)) (diff)
parentAdd syntax highlighting for "shell" files (.sh) (diff)
downloadlumina-8be77a80c4430b85dae569923c3efc6ed2384472.tar.gz
lumina-8be77a80c4430b85dae569923c3efc6ed2384472.tar.bz2
lumina-8be77a80c4430b85dae569923c3efc6ed2384472.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/core')
-rw-r--r--src-qt5/core/libLumina/LuminaXDG.cpp11
-rwxr-xr-xsrc-qt5/core/menu-scripts/ls.json.sh5
2 files changed, 8 insertions, 8 deletions
diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp
index 8ec51530..48185a38 100644
--- a/src-qt5/core/libLumina/LuminaXDG.cpp
+++ b/src-qt5/core/libLumina/LuminaXDG.cpp
@@ -79,7 +79,7 @@ void XDGDesktopList::updateList(){
}
//If this class is automatically managing the lists, update the watched files/dirs and send out notifications
if(watcher!=0){
- qDebug() << "App List Updated:" << lastCheck << appschanged << newfiles << oldkeys;
+ //qDebug() << "App List Updated:" << lastCheck << appschanged << newfiles << oldkeys;
watcher->removePaths(QStringList() << watcher->files() << watcher->directories());
watcher->addPaths(appDirs);
if(appschanged){ emit appsUpdated(); }
@@ -511,14 +511,15 @@ QStringList LXDG::systemApplicationDirs(){
}
XDGDesktopList* LXDG::systemAppsList(){
- static XDGDesktopList sysapps(0,true); // = XDGDesktopList(0,true); //set this to automatically update as needed
- if(sysapps.lastCheck.isNull()){ sysapps.updateList(); } //catch the first time the class was used, and prompt for an update right now
- return &sysapps;
+ static XDGDesktopList *sysapps = new XDGDesktopList(0,true); //set this to automatically update as needed
+ if(sysapps->lastCheck.isNull()){ sysapps->updateList(); } //catch the first time the class was used, and prompt for an update right now
+ return sysapps;
}
QList<XDGDesktop> LXDG::systemDesktopFiles(bool showAll, bool showHidden){
//Quick overload for backwards compatibility which uses the static/global class for managing app entries
- return systemAppsList()->apps(showAll, showHidden);
+ XDGDesktopList list(0, false);
+ return list.apps(showAll, showHidden);
}
QHash<QString,QList<XDGDesktop> > LXDG::sortDesktopCats(QList<XDGDesktop> apps){
diff --git a/src-qt5/core/menu-scripts/ls.json.sh b/src-qt5/core/menu-scripts/ls.json.sh
index 626912cb..43b0ead6 100755
--- a/src-qt5/core/menu-scripts/ls.json.sh
+++ b/src-qt5/core/menu-scripts/ls.json.sh
@@ -4,12 +4,11 @@ if [ "$1" == "" ] ; then
DIR=`pwd`
fi
+OUT="${OUT} \" Open Directory\" : { \"type\" : \"item\", \"icon\":\"document-open\", \"action\" : \"xdg-open \\\"${DIR}\\\"\"}"
ls "${DIR}" > /tmp/.tmp.lines.$$
while read name
do
- if [ -n "${OUT}" ] ; then
- OUT="${OUT},"
- fi
+ OUT="${OUT},"
if [ -d "${DIR}/${name}" ] ; then
OUT="${OUT} \"${name}\" : { \"type\" : \"jsonmenu\", \"exec\" : \"${0} \\\"${DIR}/${name}\\\"\", \"icon\":\"folder\"}"
else
bgstack15