aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop-unified
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-07-11 14:06:50 -0400
committerKen Moore <ken@ixsystems.com>2017-07-11 14:07:25 -0400
commitfc7146bbf3e067fc58ae9d5d21fa7403e1db5326 (patch)
treec3c9db4d53c9788538ec60cbce8ec29fad3fa051 /src-qt5/core/lumina-desktop-unified
parentAdded more key support for Lumina 2.0 (diff)
downloadlumina-fc7146bbf3e067fc58ae9d5d21fa7403e1db5326.tar.gz
lumina-fc7146bbf3e067fc58ae9d5d21fa7403e1db5326.tar.bz2
lumina-fc7146bbf3e067fc58ae9d5d21fa7403e1db5326.zip
Start adding some default keyboard shortcuts/files to Lumina 2.
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified')
-rw-r--r--src-qt5/core/lumina-desktop-unified/LSession.cpp12
-rw-r--r--src-qt5/core/lumina-desktop-unified/LSession.h3
-rw-r--r--src-qt5/core/lumina-desktop-unified/defaults/desktop/desktop.conf0
-rw-r--r--src-qt5/core/lumina-desktop-unified/defaults/desktop/environment.conf0
-rw-r--r--src-qt5/core/lumina-desktop-unified/defaults/desktop/favorites.conf0
-rw-r--r--src-qt5/core/lumina-desktop-unified/defaults/desktop/keys.conf8
-rw-r--r--src-qt5/core/lumina-desktop-unified/defaults/desktop/session.conf0
-rw-r--r--src-qt5/core/lumina-desktop-unified/defaults/desktop/theme.conf0
-rw-r--r--src-qt5/core/lumina-desktop-unified/lumina-desktop.pro6
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-events/LShortcutEvents.cpp9
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.h4
11 files changed, 33 insertions, 9 deletions
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
bgstack15