diff options
Diffstat (limited to 'src-qt5')
12 files changed, 42 insertions, 18 deletions
diff --git a/src-qt5/core/libLumina/DesktopSettings.cpp b/src-qt5/core/libLumina/DesktopSettings.cpp index bd0325ec..47dc29de 100644 --- a/src-qt5/core/libLumina/DesktopSettings.cpp +++ b/src-qt5/core/libLumina/DesktopSettings.cpp @@ -121,7 +121,7 @@ void DesktopSettings::parseSystemSettings(){ //Now determine the runmode for this user struct passwd *pw = getpwuid(getuid()); - if(pw!=0){ + if(pw!=0){ QString cuser = QString(pw->pw_name); free(pw); //done with this structure if( settings[path]->value("fulluser_users", QStringList()).toStringList().contains(cuser) ){ runmode = DesktopSettings::UserFull; } @@ -133,10 +133,10 @@ void DesktopSettings::parseSystemSettings(){ gid_t grpList[100]; int grpSize = 100; if( getgrouplist(cuser.toLocal8Bit(), getgid(), grpList, &grpSize) > 0 ){ - QStringList groups; - for(int i=0; i<grpSize; i++){ + QStringList groups; + for(int i=0; i<grpSize; i++){ struct group *g = getgrgid(grpList[i]); - if(g!=0){ + if(g!=0){ groups << QString(g->gr_name); free(g); } @@ -146,18 +146,18 @@ void DesktopSettings::parseSystemSettings(){ if( (fromfile+groups).removeDuplicates() > 0 ){ runmode = DesktopSettings::UserFull; } else{ fromfile = settings[path]->value("fullsystem_groups", QStringList()).toStringList(); - fromfile.removeDuplicates(); + fromfile.removeDuplicates(); if((fromfile+groups).removeDuplicates() > 0 ){ runmode = DesktopSettings::SystemFull; } else{ fromfile = settings[path]->value("staticinterface_groups", QStringList()).toStringList(); - fromfile.removeDuplicates(); + fromfile.removeDuplicates(); if((fromfile+groups).removeDuplicates() > 0 ){ runmode = DesktopSettings::SystemInterface; } } } - } //end group list read + } //end group list read } }else{ - runmode = DesktopSettings::SystemFull; //could not read user name - assume system files only + runmode = DesktopSettings::SystemFull; //could not read user name - assume system files only } break; //found this file - go ahead and stop now (no hierarchy for this special file) @@ -256,7 +256,7 @@ void DesktopSettings::fileChanged(QString file){ QList< DesktopSettings::File > types = files.keys(); for(int i=0; i<types.length(); i++){ if(files[types[i]].contains(file)){ - emit FileModified(types[i]); + emit FileModified(types[i]); break; } } diff --git a/src-qt5/core/lumina-desktop-unified/LSession.cpp b/src-qt5/core/lumina-desktop-unified/LSession.cpp index 2155a8b7..bcbeeeb4 100644 --- a/src-qt5/core/lumina-desktop-unified/LSession.cpp +++ b/src-qt5/core/lumina-desktop-unified/LSession.cpp @@ -222,7 +222,9 @@ void LSession::setupGlobalConnections(){ connect(Lumina::SHORTCUTS, SIGNAL(StartLogout()), this, SLOT(StartLogout()) ); connect(Lumina::SHORTCUTS, SIGNAL(StartReboot()), this, SLOT(StartReboot()) ); connect(Lumina::SHORTCUTS, SIGNAL(StartShutdown()), this, SLOT(StartShutdown()) ); - + connect(Lumina::SHORTCUTS, SIGNAL(LaunchApplication(QString), this, SLOT(LaunchApplication(QString)) ); + connect(Lumina::SHORTCUTS, SIGNAL(LaunchStandardApplication(QString)), this, SLOT(LaunchStandardApplication(QString)) ); + connect(Lumina::SHORTCUTS, SIGNAL(LockSession()), Lumina::SS, SLOT(LockScreenNow()) ); //Root window connections connect(Lumina::ROOTWIN, SIGNAL(RegisterVirtualRoot(WId)), Lumina::NWS, SLOT(RegisterVirtualRoot(WId)) ); connect(Lumina::ROOTWIN, SIGNAL(RootResized(QRect)), Lumina::NWS, SLOT(setRoot_desktopGeometry(QRect)) ); @@ -381,6 +383,14 @@ void LSession::StartReboot(bool skipupdates){ QCoreApplication::exit(0); } +void LSession::LaunchApplication(QString app){ + +} + +void LSession::LaunchStandardApplication(QString app){ + +} + void LSession::reloadIconTheme(){ //Wait a moment for things to settle before sending out the signal to the interfaces QApplication::processEvents(); diff --git a/src-qt5/core/lumina-desktop-unified/LSession.h b/src-qt5/core/lumina-desktop-unified/LSession.h index dd32d22a..0d666bfa 100644 --- a/src-qt5/core/lumina-desktop-unified/LSession.h +++ b/src-qt5/core/lumina-desktop-unified/LSession.h @@ -28,9 +28,12 @@ private: public slots: void setupSession(); //called during startup only + //Slots for public access/usage void StartLogout(); void StartShutdown(bool skipupdates = false); void StartReboot(bool skipupdates = false); + void LaunchApplication(QString app); + void LaunchStandardApplication(QString app); void reloadIconTheme(); //will emit the IconThemeChanged signal when ready void switchLocale(QString localeCode); //will emit the LocaleChanged signal when ready diff --git a/src-qt5/core/lumina-desktop-unified/defaults/desktop/desktop.conf b/src-qt5/core/lumina-desktop-unified/defaults/desktop/desktop.conf new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/defaults/desktop/desktop.conf diff --git a/src-qt5/core/lumina-desktop-unified/defaults/desktop/environment.conf b/src-qt5/core/lumina-desktop-unified/defaults/desktop/environment.conf new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/defaults/desktop/environment.conf diff --git a/src-qt5/core/lumina-desktop-unified/defaults/desktop/favorites.conf b/src-qt5/core/lumina-desktop-unified/defaults/desktop/favorites.conf new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/defaults/desktop/favorites.conf diff --git a/src-qt5/core/lumina-desktop-unified/defaults/desktop/keys.conf b/src-qt5/core/lumina-desktop-unified/defaults/desktop/keys.conf new file mode 100644 index 00000000..c1417b85 --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/defaults/desktop/keys.conf @@ -0,0 +1,8 @@ +[strict] +Ctrl+Alt+Backspace=Logout +Pause=Lockscreen +Alt+L=Lockscreen + +[desktop] +Alt+F1=Launch: terminal +Print=Launch: screenshot diff --git a/src-qt5/core/lumina-desktop-unified/defaults/desktop/session.conf b/src-qt5/core/lumina-desktop-unified/defaults/desktop/session.conf new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/defaults/desktop/session.conf diff --git a/src-qt5/core/lumina-desktop-unified/defaults/desktop/theme.conf b/src-qt5/core/lumina-desktop-unified/defaults/desktop/theme.conf new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/defaults/desktop/theme.conf diff --git a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro index a4e9867b..defa66f4 100644 --- a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro +++ b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro @@ -44,10 +44,12 @@ FORMS += BootSplash.ui #include(panel-plugins/panel-plugins.pri) #include(desktop-plugins/desktop-plugins.pri) - +# Install all the various files for the desktop itself desktop.path = $${L_SESSDIR} desktop.files = lumina-desktop.desktop +defaults.path = $${L_SHAREDIR}/lumina-desktop +defaults.files = defaults/* TRANSLATIONS = i18n/lumina-desktop_af.ts \ i18n/lumina-desktop_ar.ts \ @@ -115,7 +117,7 @@ TRANSLATIONS = i18n/lumina-desktop_af.ts \ dotrans.path=$${L_SHAREDIR}/lumina-desktop/i18n/ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/ -INSTALLS += target desktop +INSTALLS += target desktop defaults WITH_I18N{ INSTALLS += dotrans diff --git a/src-qt5/core/lumina-desktop-unified/src-events/LShortcutEvents.cpp b/src-qt5/core/lumina-desktop-unified/src-events/LShortcutEvents.cpp index 1b78da21..3d50112c 100644 --- a/src-qt5/core/lumina-desktop-unified/src-events/LShortcutEvents.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-events/LShortcutEvents.cpp @@ -139,11 +139,11 @@ QString LShortcutEvents::keylistToString(){ void LShortcutEvents::evaluateShortcutAction(QString action){ qDebug() << "Found Shortcut Action:" << action; evaluated = true; - if(action.startsWith("Exec=")){ - emit LaunchApplication(action.section("=",1,-1)); + if(action.startsWith("Exec:")){ + emit LaunchApplication(action.section(":",1,-1)); return; - }else if(action.startsWith("Launch=")){ - emit LaunchStandardApplication(action.section("=",1,-1)); + }else if(action.startsWith("Launch:")){ + emit LaunchStandardApplication(action.section(":",1,-1)); } //Specific Internal actions action = action.toLower(); @@ -152,6 +152,7 @@ void LShortcutEvents::evaluateShortcutAction(QString action){ else if(action=="reboot"){ emit StartReboot(); } else if(action=="shutdown"){ emit StartShutdown(); } else if(action=="show_leave_options"){ emit OpenLeaveDialog(); } + else if(action=="lockscreen"){ emit LockSession(); } } diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.h index 8798577f..b1324e78 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.h @@ -26,13 +26,13 @@ public: canvas->setCursor( QCursor(Qt::BlankCursor) ); } ~BaseAnimGroup(){} - + //============================== // PLUGIN LOADING/LISTING (Change in the .cpp file) //============================== static BaseAnimGroup* NewAnimation(QString type, QWidget *parent, QSettings *set); static QStringList KnownAnimations(); - + }; #endif |