From fc7146bbf3e067fc58ae9d5d21fa7403e1db5326 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 11 Jul 2017 14:06:50 -0400 Subject: Start adding some default keyboard shortcuts/files to Lumina 2. --- src-qt5/core/libLumina/DesktopSettings.cpp | 18 +++++++++--------- src-qt5/core/lumina-desktop-unified/LSession.cpp | 12 +++++++++++- src-qt5/core/lumina-desktop-unified/LSession.h | 3 +++ .../defaults/desktop/desktop.conf | 0 .../defaults/desktop/environment.conf | 0 .../defaults/desktop/favorites.conf | 0 .../lumina-desktop-unified/defaults/desktop/keys.conf | 8 ++++++++ .../defaults/desktop/session.conf | 0 .../lumina-desktop-unified/defaults/desktop/theme.conf | 0 src-qt5/core/lumina-desktop-unified/lumina-desktop.pro | 6 ++++-- .../src-events/LShortcutEvents.cpp | 9 +++++---- .../src-screensaver/animations/BaseAnimGroup.h | 4 ++-- 12 files changed, 42 insertions(+), 18 deletions(-) create mode 100644 src-qt5/core/lumina-desktop-unified/defaults/desktop/desktop.conf create mode 100644 src-qt5/core/lumina-desktop-unified/defaults/desktop/environment.conf create mode 100644 src-qt5/core/lumina-desktop-unified/defaults/desktop/favorites.conf create mode 100644 src-qt5/core/lumina-desktop-unified/defaults/desktop/keys.conf create mode 100644 src-qt5/core/lumina-desktop-unified/defaults/desktop/session.conf create mode 100644 src-qt5/core/lumina-desktop-unified/defaults/desktop/theme.conf 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; igr_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; isetCursor( 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 -- cgit