diff options
author | Ken Moore <ken@ixsystems.com> | 2017-11-16 16:15:29 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-11-16 16:15:29 -0500 |
commit | 60559aa7165835d15e87480b3db6774f77f7a081 (patch) | |
tree | 70066c861e2b79295b0af523d480f517c279cd23 /src-qt5/core | |
parent | Get the Iteration over objects working for Lumina 2 (wallpapers). (diff) | |
download | lumina-60559aa7165835d15e87480b3db6774f77f7a081.tar.gz lumina-60559aa7165835d15e87480b3db6774f77f7a081.tar.bz2 lumina-60559aa7165835d15e87480b3db6774f77f7a081.zip |
Get more of the new QML interface working for Lumina 2.
* simple context menu is now functional (lock/logout)
* Screensaver is now working again (default setting was wrong)
* Unlock functionality is working again (using the more secure temporary file method)
Diffstat (limited to 'src-qt5/core')
6 files changed, 20 insertions, 13 deletions
diff --git a/src-qt5/core/lumina-checkpass/main.c b/src-qt5/core/lumina-checkpass/main.c index 2f54c8e6..70caf396 100644 --- a/src-qt5/core/lumina-checkpass/main.c +++ b/src-qt5/core/lumina-checkpass/main.c @@ -64,6 +64,8 @@ int main(int argc, char** argv){ fclose(fp); } if(pass == 0){ puts("Could not read password!!"); return 1; } //error in reading password + //puts("Read Password:"); + //puts(pass); //Validate current user (make sure current UID matches the logged-in user, char* cUser = getlogin(); struct passwd *pwd = 0; diff --git a/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf b/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf index 89f4e488..b4bfec59 100644 --- a/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf +++ b/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf @@ -1,3 +1,3 @@ [General] -default_plugin="fireflies" -plugin_VGA-0="fireflies" +default_plugin="random" +plugin_VGA-0="random" diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml index 7360d81f..ad584f76 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml @@ -12,7 +12,7 @@ import Lumina.Backend.RootDesktopObject 2.0 Menu { id: contextMenu - closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside + //closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside MenuItem { text: "Lock Screen" onTriggered: { @@ -23,12 +23,12 @@ Menu { MenuItem { text: "Logout" //iconName: "system-log-out" - indicator: Image{ + /*indicator: Image{ asynchronous: true //autoTransform: true //source: "image://theme/system-logout" source: "file:///usr/local/share/icons/material-design-light/scalable/actions/system-log-out.svg" - } + }*/ onTriggered: { RootObject.logout() } diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml index 9db05c45..e0381e23 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml @@ -29,13 +29,14 @@ Rectangle { color: "black" //Setup the right-click context menu - /*MouseArea { + MouseArea { anchors.fill: rootCanvas acceptedButtons: Qt.RightButton onClicked: { - contextMenu.x = mouseX + /*contextMenu.x = mouseX contextMenu.y = mouseY - contextMenu.open() + contextMenu.open() */ + contextMenu.popup() } onPositionChanged: { RootObject.mousePositionChanged() @@ -43,7 +44,7 @@ Rectangle { } //Create the context menu itself - QML.ContextMenu { id: contextMenu }*/ + QML.ContextMenu { id: contextMenu } //Setup the wallpapers Repeater{ diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp index b791ffd2..95b70e54 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp @@ -83,10 +83,14 @@ void LLockScreen::TryUnlock(){ bool ok = false; if( TF->open() ){ QTextStream in(TF); - in << pass; - in.flush(); //make sure we push it to the file **right now** since we need to keep the file open - ok = (LUtils::runCmd("lumina-checkpass", QStringList() << "-f" << TF->fileName() ) == 0); + in << pass.toUtf8()+"\0"; //make sure it is null-terminated + //in.flush(); //make sure we push it to the file **right now** since we need to keep the file open TF->close(); + //qDebug() << "Trying to unlock session:" << TF->fileName() << LUtils::readFile(TF->fileName()); + //qDebug() << "UserName:" << getlogin(); + LUtils::runCommand(ok, "lumina-checkpass",QStringList() << "-f" << TF->fileName() ); + //ok = (LUtils::runCmd("lumina-checkpass", QStringList() << "-f" << TF->fileName() ) == 0); + //TF->close(); } delete TF; if(ok){ diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp index 122307b3..7c098887 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp @@ -7,7 +7,7 @@ #include "SSBaseWidget.h" -#define DEBUG 1 +#define DEBUG 0 // ======== // PUBLIC |