diff options
author | Ken Moore <ken@ixsystems.com> | 2017-01-30 12:52:29 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-01-30 12:52:29 -0500 |
commit | d282a7d95a7c4ebd53928b39844d33c08364476d (patch) | |
tree | 6638c5bfd3c5b22d9f453d0781ad38dcd97776b6 /src-qt5/core/lumina-desktop-unified/LSession.cpp | |
parent | Fix up the saving of the user's default icon via lumina-config. (diff) | |
download | lumina-d282a7d95a7c4ebd53928b39844d33c08364476d.tar.gz lumina-d282a7d95a7c4ebd53928b39844d33c08364476d.tar.bz2 lumina-d282a7d95a7c4ebd53928b39844d33c08364476d.zip |
Get the next phase of Lumina2 working: The context menu for the desktop itself.
While not fully up to where the current contextmenu for Lumina is yet, it can be used for logging out, locking the screen, and launching commands (so far - will gradually add back in the other plugins/functionality later after these steps are used for more testing of other components).
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/LSession.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop-unified/LSession.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/LSession.cpp b/src-qt5/core/lumina-desktop-unified/LSession.cpp index 156029ee..cb0144d5 100644 --- a/src-qt5/core/lumina-desktop-unified/LSession.cpp +++ b/src-qt5/core/lumina-desktop-unified/LSession.cpp @@ -7,6 +7,8 @@ #include "LSession.h" #include "global-objects.h" +#include "src-desktop/ContextMenu.h" + #include "BootSplash.h" #ifndef DEBUG #define DEBUG 1 @@ -51,7 +53,12 @@ LSession::LSession(int &argc, char ** argv) : LSingleApplication(argc, argv, "lu Lumina::APPLIST = new XDGDesktopList(0, true); //keep this list up to date Lumina::SHORTCUTS = new LShortcutEvents(); //this can be moved to it's own thread eventually as well + //Setup the basic connections between the shortcuts class and the session itself + connect(Lumina::SHORTCUTS, SIGNAL(StartLogout()), this, SLOT(StartLogout()) ); + connect(Lumina::SHORTCUTS, SIGNAL(StartReboot()), this, SLOT(StartReboot()) ); + connect(Lumina::SHORTCUTS, SIGNAL(StartShutdown()), this, SLOT(StartShutdown()) ); //Setup the various connections between the global classes + // NOTE: Most of these connections will only become "active" as the global objects get started during the setupSession routine connect(Lumina::ROOTWIN, SIGNAL(RegisterVirtualRoot(WId)), Lumina::EFILTER, SLOT(RegisterVirtualRoot(WId)) ); } //end check for primary process @@ -136,6 +143,10 @@ void LSession::setupSession(){ Lumina::ROOTWIN->ChangeWallpaper(scrns[i]->name(), RootWindow::Stretch, LOS::LuminaShare()+"desktop-background.jpg"); } Lumina::ROOTWIN->start(); + DesktopContextMenu *cmenu = new DesktopContextMenu(Lumina::ROOTWIN); + connect(cmenu, SIGNAL(showLeaveDialog()), this, SLOT(StartLogout()) ); + cmenu->start(); + //desktopFiles = QDir(QDir::homePath()+"/Desktop").entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs, QDir::Name | QDir::IgnoreCase | QDir::DirsFirst); //updateDesktops(); //for(int i=0; i<6; i++){ LSession::processEvents(); } //Run through this a few times so the interface systems get up and running @@ -171,7 +182,7 @@ void LSession::setupSession(){ splash.close(); LSession::processEvents(); //DEBUG: Wait a bit then close down the session - QTimer::singleShot(15000, this, SLOT(StartLogout()) ); + //QTimer::singleShot(15000, this, SLOT(StartLogout()) ); } //================ |