-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tklockinterface: add tklock property for rerunning when LPS is shown #1
Conversation
@@ -234,6 +237,8 @@ class Daemon : public QObject { | |||
|
|||
tmpl["battery-bar"] = "{{=" + QString::number((double)(tmpl["battery"].toDouble()*.01)) + "}}"; | |||
|
|||
tmpl["tklock"] = tklock.isLocked() ? "locked" : "unlocked"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could just be:
tmpl["tklock"] = tklock.getLockMode();
Where the implementation of TklockInterface
has:
QString lockMode() { return m_lock_mode; }
Added some comments - please have a look and if possible update the commit ( |
If we just want to update the content unconditionally every time the screen is locked (I think that's okay), then you can also remove the |
* Billboard - Low Power Mode Standby Screen for the N9 | ||
* Webpage: http://thp.io/2012/billboard/ | ||
* Copyright (C) 2012, 2013, 2014 Thomas Perl <thp.io/about> | ||
* Copyright 2015 Elliot Wolk <elliot.wolk@gmail.com> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also please note the modified copyright header on the NEW files i added. dunno what youd prefer. i dont have any particular preferences {leave it like this, modify it to make it clear that this small thing is the only thing i did, put your original header back and just add an authors/contributors, whatever}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to just have your line, as I didn't do anything in this file (yet). Also use "Copyright (C) 2015" (note the " (C)") in order to be consistent with the rest of the copyright notices.
whoops, missed that you asked for a single commit, lemme rebase |
31d5f7d
to
f933cdc
Compare
im going to add the if-isLocked to contextChanged(), and remove it if you dont like it |
563cd95
to
b24fb60
Compare
@@ -282,7 +288,9 @@ class Daemon : public QObject { | |||
} | |||
|
|||
void contextChanged() { | |||
updateTimer.start(); | |||
if (tklock.isLocked()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't check for isLocked()
here - it will break the preview in the GUI application (the screen is never locked when the user uses the GUI application).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, it looks like it ought to just call render. it doesnt break the preview it for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a more subtle issue - if Billboard is started in locked state (see other comment), then isLocked()
will never become true until the screen is unlocked and locked again. So please remove it (here and the function altogether) and let's just use the locked()
signal for doing an additional contextChanged()
.
Also, when the screen isn't locked, updating the Billboard isn't all that costly, as the screen is on and the CPU is probably running, as the user is interacting with the app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, ill do it now
You can ignore my previous comments about combining |
b24fb60
to
faca26b
Compare
faca26b
to
a1e0f9f
Compare
tklockinterface: add tklock property for rerunning when LPS is shown
Merged, thanks! |
yay, thanks! |
one feature at a time so you can critique. next feature will be adding a billboard dbus iface to trigger a rerun {or perhaps arbitrary prop setting, e.g.: qdbus io.thp.billboard / setProp "klomp-song" "Rinse the Raindrops"}