Merge lp:~laney/ubuntu-system-settings/background-toggle into lp:ubuntu-system-settings

Proposed by Iain Lane
Status: Merged
Approved by: Ken VanDine
Approved revision: 731
Merged at revision: 727
Proposed branch: lp:~laney/ubuntu-system-settings/background-toggle
Merge into: lp:ubuntu-system-settings
Prerequisite: lp:~mterry/ubuntu-system-settings/split-bg
Diff against target: 50 lines (+16/-18)
1 file modified
plugins/background/MainPage.qml (+16/-18)
To merge this branch: bzr merge lp:~laney/ubuntu-system-settings/background-toggle
Reviewer Review Type Date Requested Status
Ken VanDine Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+222298@code.launchpad.net

This proposal supersedes a proposal from 2014-06-06.

Commit message

Inline setUpImages(), otherwise the function call doesn't do anything.

Description of the change

Inline setUpImages(), otherwise the function call doesn't do anything.

No, I don't know why this helps. QML :(

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:731
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~laney/ubuntu-system-settings/background-toggle/+merge/222298/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-ci/864/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/716
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/662
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-amd64-ci/56
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/56
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-armhf-ci/56/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-system-settings-utopic-i386-ci/56
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1142
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1353
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1353/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/8165
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/589
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/801
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/801/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-system-settings-ci/864/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Looks good, i tested on mako and confirmed a background selected from the gallery does show on the greeter.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/background/MainPage.qml'
2--- plugins/background/MainPage.qml 2014-02-18 14:18:27 +0000
3+++ plugins/background/MainPage.qml 2014-06-06 09:37:21 +0000
4@@ -248,30 +248,28 @@
5 }
6
7 function setUpImages() {
8- var mostRecent = (systemSettingsSettings.backgroundSetLast === "home") ?
9- testHomeImage : testWelcomeImage;
10- var leastRecent = (mostRecent === testHomeImage) ?
11- testWelcomeImage : testHomeImage;
12-
13- if (systemSettingsSettings.backgroundDuplicate) { //same
14- /* save value of least recently changed to restore later */
15- systemSettingsSettings.backgroundPreviouslySetValue =
16- leastRecent.source;
17- /* copy most recently changed to least recently changed */
18- leastRecent.update(mostRecent.source);
19- } else { // different
20- /* restore least recently changed to previous value */
21- leastRecent.update(
22- systemSettingsSettings.backgroundPreviouslySetValue);
23- }
24 }
25
26 GSettings {
27 id: systemSettingsSettings
28 schema.id: "com.ubuntu.touch.system-settings"
29 onChanged: {
30- if (key == "backgroundDuplicate")
31- setUpImages();
32+ if (key == "backgroundDuplicate") {
33+ var mostRecent = (backgroundSetLast === "home")
34+ ? testHomeImage : testWelcomeImage;
35+ var leastRecent = (mostRecent === testHomeImage) ?
36+ testWelcomeImage : testHomeImage;
37+
38+ if (backgroundDuplicate) { //same
39+ /* save value of least recently changed to restore later */
40+ backgroundPreviouslySetValue = leastRecent.source;
41+ /* copy most recently changed to least recently changed */
42+ leastRecent.update(mostRecent.source);
43+ } else { // different
44+ /* restore least recently changed to previous value */
45+ leastRecent.update(backgroundPreviouslySetValue);
46+ }
47+ }
48 }
49 Component.onCompleted: {
50 if (systemSettingsSettings.backgroundDuplicate)

Subscribers

People subscribed via source and target branches