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
=== modified file 'plugins/background/MainPage.qml'
--- plugins/background/MainPage.qml 2014-02-18 14:18:27 +0000
+++ plugins/background/MainPage.qml 2014-06-06 09:37:21 +0000
@@ -248,30 +248,28 @@
248 }248 }
249249
250 function setUpImages() {250 function setUpImages() {
251 var mostRecent = (systemSettingsSettings.backgroundSetLast === "home") ?
252 testHomeImage : testWelcomeImage;
253 var leastRecent = (mostRecent === testHomeImage) ?
254 testWelcomeImage : testHomeImage;
255
256 if (systemSettingsSettings.backgroundDuplicate) { //same
257 /* save value of least recently changed to restore later */
258 systemSettingsSettings.backgroundPreviouslySetValue =
259 leastRecent.source;
260 /* copy most recently changed to least recently changed */
261 leastRecent.update(mostRecent.source);
262 } else { // different
263 /* restore least recently changed to previous value */
264 leastRecent.update(
265 systemSettingsSettings.backgroundPreviouslySetValue);
266 }
267 }251 }
268252
269 GSettings {253 GSettings {
270 id: systemSettingsSettings254 id: systemSettingsSettings
271 schema.id: "com.ubuntu.touch.system-settings"255 schema.id: "com.ubuntu.touch.system-settings"
272 onChanged: {256 onChanged: {
273 if (key == "backgroundDuplicate")257 if (key == "backgroundDuplicate") {
274 setUpImages();258 var mostRecent = (backgroundSetLast === "home")
259 ? testHomeImage : testWelcomeImage;
260 var leastRecent = (mostRecent === testHomeImage) ?
261 testWelcomeImage : testHomeImage;
262
263 if (backgroundDuplicate) { //same
264 /* save value of least recently changed to restore later */
265 backgroundPreviouslySetValue = leastRecent.source;
266 /* copy most recently changed to least recently changed */
267 leastRecent.update(mostRecent.source);
268 } else { // different
269 /* restore least recently changed to previous value */
270 leastRecent.update(backgroundPreviouslySetValue);
271 }
272 }
275 }273 }
276 Component.onCompleted: {274 Component.onCompleted: {
277 if (systemSettingsSettings.backgroundDuplicate)275 if (systemSettingsSettings.backgroundDuplicate)

Subscribers

People subscribed via source and target branches