aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-08-29 15:54:30 -0400
committerKen Moore <ken@ixsystems.com>2017-08-29 15:54:30 -0400
commit8a96d2ba60a30a6cb0bebace3134dd65d0268b04 (patch)
tree4b4a301bb5f43d3d10a312af073d2c64fa49eaf2 /src-qt5/core/libLumina
parentStart getting the Root context menu all moved over from Lumina 1 to 2. (diff)
downloadlumina-8a96d2ba60a30a6cb0bebace3134dd65d0268b04.tar.gz
lumina-8a96d2ba60a30a6cb0bebace3134dd65d0268b04.tar.bz2
lumina-8a96d2ba60a30a6cb0bebace3134dd65d0268b04.zip
Get a lot of the root context menu up and running. Now the application list is available and functional, plus the beginnings of the task manager plugin for the menu.
Diffstat (limited to 'src-qt5/core/libLumina')
-rw-r--r--src-qt5/core/libLumina/LuminaXDG.cpp2
-rw-r--r--src-qt5/core/libLumina/RootWindow.cpp2
-rw-r--r--src-qt5/core/libLumina/XDGMime.cpp3
3 files changed, 6 insertions, 1 deletions
diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp
index dea1938b..c1e7e199 100644
--- a/src-qt5/core/libLumina/LuminaXDG.cpp
+++ b/src-qt5/core/libLumina/LuminaXDG.cpp
@@ -445,6 +445,7 @@ bool XDGDesktop::setAutoStarted(bool autostart){
}
void XDGDesktop::addToMenu(QMenu *topmenu){
+ if(!this->isValid()){ return; }
if(actions.isEmpty()){
//Just a single entry point - no extra actions
QAction *act = new QAction(this->name, topmenu);
@@ -617,6 +618,7 @@ void XDGDesktopList::populateMenu(QMenu *topmenu, bool byCategory){
menu->setIcon(LXDG::findIcon(icon,""));
QList<XDGDesktop*> appL = APPS.value(cats[i]);
for( int a=0; a<appL.length(); a++){ appL[a]->addToMenu(menu); }
+ topmenu->addMenu(menu);
} //end loop over cats
}else{
QList<XDGDesktop*> APPS = this->apps(false, false);
diff --git a/src-qt5/core/libLumina/RootWindow.cpp b/src-qt5/core/libLumina/RootWindow.cpp
index 996b8e01..952e246b 100644
--- a/src-qt5/core/libLumina/RootWindow.cpp
+++ b/src-qt5/core/libLumina/RootWindow.cpp
@@ -10,7 +10,7 @@
#include <QScreen>
#include <QDebug>
-#define DEBUG 1
+#define DEBUG 0
// === PUBLIC ===
RootWindow::RootWindow() : QWidget(0, Qt::Window | Qt::BypassWindowManagerHint | Qt::WindowStaysOnBottomHint){
diff --git a/src-qt5/core/libLumina/XDGMime.cpp b/src-qt5/core/libLumina/XDGMime.cpp
index 3983f6b5..cbbeff75 100644
--- a/src-qt5/core/libLumina/XDGMime.cpp
+++ b/src-qt5/core/libLumina/XDGMime.cpp
@@ -12,6 +12,9 @@ static QStringList mimeglobs;
static qint64 mimechecktime;
QString XDGMime::fromFileName(QString filename){
+ if(QFile::exists(filename) && QFileInfo(filename).isDir()){
+ return "inode/directory";
+ }
//Convert a filename into a mimetype
return findAppMimeForFile(filename.section("/",-1),false);
}
bgstack15