Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
glacier-home
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NemoMobile
glacier-home
Commits
ab5bb3aa
Commit
ab5bb3aa
authored
Oct 24, 2017
by
m2ko
Committed by
eekkelund
Feb 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Latest tries
parent
05dfe712
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
48 deletions
+35
-48
glacierauthenticationinput.cpp
src/glacierauthenticationinput.cpp
+0
-7
glacierauthenticationinput.h
src/glacierauthenticationinput.h
+0
-15
main.cpp
src/main.cpp
+0
-2
DeviceLockUI.qml
src/qml/DeviceLockUI.qml
+18
-15
Lockscreen.qml
src/qml/Lockscreen.qml
+15
-4
src.pro
src/src.pro
+2
-5
No files found.
src/glacierauthenticationinput.cpp
deleted
100644 → 0
View file @
05dfe712
#include "glacierauthenticationinput.h"
/*GlacierAuthenticationInput::GlacierAuthenticationInput()
{
}
*/
src/glacierauthenticationinput.h
deleted
100644 → 0
View file @
05dfe712
#ifndef GLACIERAUTHENTICATIONINPUT_H
#define GLACIERAUTHENTICATIONINPUT_H
#include <nemo-devicelock/authenticationinput.h>
class
GlacierAuthenticationInput
:
public
NemoDeviceLock
::
AuthenticationInput
{
Q_OBJECT
public:
explicit
GlacierAuthenticationInput
(
QObject
*
parent
=
nullptr
)
:
NemoDeviceLock
::
AuthenticationInput
(
DeviceLock
,
parent
)
{
}
};
#endif // GLACIERAUTHENTICATIONINPUT_H
src/main.cpp
View file @
ab5bb3aa
...
...
@@ -29,7 +29,6 @@
#include <QQmlContext>
#include "glacierwindowmodel.h"
#include <QScreen>
#include "glacierauthenticationinput.h"
int
main
(
int
argc
,
char
**
argv
)
...
...
@@ -62,7 +61,6 @@ int main(int argc, char **argv)
nativeOrientation
=
app
.
primaryScreen
()
->
primaryOrientation
();
app
.
engine
()
->
rootContext
()
->
setContextProperty
(
"nativeOrientation"
,
nativeOrientation
);
qmlRegisterType
<
GlacierWindowModel
>
(
"org.nemomobile.glacier"
,
1
,
0
,
"GlacierWindowModel"
);
qmlRegisterType
<
GlacierAuthenticationInput
>
(
"org.nemomobile.glacierauthentication"
,
1
,
0
,
"GlacierAuthenticationInput"
);
app
.
setQmlPath
(
"/usr/share/lipstick-glacier-home-qt5/qml/MainScreen.qml"
);
// Give these to the environment inside the lipstick homescreen
// Fixes a bug where some applications wouldn't launch, eg. terminal or browser
...
...
src/qml/DeviceLockUI.qml
View file @
ab5bb3aa
...
...
@@ -4,9 +4,9 @@ import QtQuick.Controls.Nemo 1.0
import
QtQuick
.
Controls
.
Styles
.
Nemo
1.0
import
QtQuick
.
Layouts
1.0
import
org
.
nemomobile
.
glacierauthentication
1.0
import
org
.
nemomobile
.
lipstick
0.1
import
org
.
nemomobile
.
devicelock
1.0
import
org
.
nemomobile
.
dbus
1.0
import
"
scripts/desktop.js
"
as
Desktop
...
...
@@ -20,7 +20,7 @@ Item {
onShouldAuthenticateChanged
:
{
if
(
shouldAuthenticate
)
{
//console.log("Requesting security code "
+ authenticationInput.status)
console
.
log
(
"
Requesting security code
"
+
JSON
.
stringify
(
authenticationInput
))
//
+ authenticationInput.status)
//authenticationInput.requestSecurityCode()
//DeviceLock.authorization.requestChallenge()
}
else
{
...
...
@@ -42,18 +42,20 @@ Item {
DeviceLock.authorization.allowedMethods)
}
}*/
/*authenticationInput.onAuthenticationUnavailable: {
console.log("Authentication unavailable: "+error)
}
authenticationInput.onFeedback: {
console.log("Feedback: "+feedback)
}
Authenticator
{
id
:
auth
Component.onCompleted
:
{
console
.
log
(
"
Requesting challenge
"
)
Authorization
.
requestChallege
()
}
onAuthenticated
:
{
console
.
log
(
"
Authenticated:
"
+
DeviceLock
.
state
)
}
authenticationInput.onAuthenticationStarted: {
console.log("Authentication started")
}
authenticationInput.onAuthenticationEnded: {
console.log("Ended "+confirmed)
}*/
ColumnLayout
{
anchors.fill
:
parent
...
...
@@ -108,11 +110,12 @@ Item {
if
(
numLabel
.
text
!==
"
Ca
"
&&
numLabel
.
text
!==
"
OK
"
)
{
//console.log(authenticationInput.Status)
lockCodeField
.
insert
(
lockCodeField
.
cursorPosition
,
numLabel
.
text
)
authenticationInput
.
requestSecurityCode
()
}
else
{
if
(
numLabel
.
text
===
"
OK
"
)
{
console
.
log
(
"
DeviceLockUI:
"
+
auth
.
availableMethods
)
auth
.
authenticate
(
Authorization
.
challengeCode
,
auth
.
availableMethods
)
//
authenticationInput.enterSecurityCode(lockCodeField.text)
console
.
log
(
"
DeviceLockUI:
"
+
JSON
.
stringify
(
authenticationInput
)
)
//
auth.authenticate(Authorization.challengeCode, auth.availableMethods)
authenticationInput
.
enterSecurityCode
(
lockCodeField
.
text
)
//codeEntered(lockCodeField.text)
lockCodeField
.
text
=
""
}
else
if
(
numLabel
.
text
===
"
Ca
"
){
...
...
src/qml/Lockscreen.qml
View file @
ab5bb3aa
...
...
@@ -3,7 +3,6 @@ import QtQuick 2.6
import
org
.
nemomobile
.
lipstick
0.1
import
org
.
nemomobile
.
devicelock
1.0
import
org
.
nemomobile
.
configuration
1.0
import
org
.
nemomobile
.
glacierauthentication
1.0
import
"
notifications
"
...
...
@@ -185,15 +184,27 @@ Image {
console
.
log
(
"
Security code entered:
"
+
authenticationInput
.
minimumCodeLength
)
}
authenticationInput
:
GlacierAuthenticationInput
{
property
bool
unlocked
:
DeviceLock
.
state
>=
DeviceLock
.
Locked
authenticationInput
:
DeviceLockAuthenticationInput
{
//property bool unlocked: DeviceLock.state >= DeviceLock.Locked
readonly
property
bool
unlocking
:
registered
&&
DeviceLock
.
state
>=
DeviceLock
.
Locked
&&
DeviceLock
.
state
<
DeviceLock
.
Undefined
registered
:
true
active
:
true
//active: lockscreenVisible()
onUnlockedChanged
:
console
.
log
(
"
Unlock
"
)
//
onUnlockedChanged: console.log("Unlock")
onStatusChanged
:
{
console
.
log
(
"
Status changed
"
)
}
onUnlockingChanged
:
{
console
.
log
(
"
Unlock
"
)
if
(
unlocking
)
{
DeviceLock
.
unlock
()
}
else
{
DeviceLock
.
cancel
()
}
}
onAuthenticationUnavailable
:
{
console
.
log
(
"
Authentication unavailable:
"
+
error
)
}
...
...
src/src.pro
View file @
ab5bb3aa
...
...
@@ -99,17 +99,14 @@ CONFIG += qt link_pkgconfig
QT += quick compositor
DEFINES += QT_COMPOSITOR_QUICK
HEADERS += \
glacierwindowmodel.h \
glacierauthenticationinput.h
glacierwindowmodel.h
QT += dbus
LIBS += -lnemodevicelock
MOC_DIR = .moc
SOURCES += \
main.cpp \
glacierwindowmodel.cpp \
glacierauthenticationinput.cpp
glacierwindowmodel.cpp
PKGCONFIG += lipstick-qt5 \
nemodevicelock
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment