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

Proposed by Iain Lane
Status: Rejected
Rejected by: Sebastien Bacher
Proposed branch: lp:~laney/ubuntu-system-settings/reset-background
Merge into: lp:ubuntu-system-settings
Prerequisite: lp:~laney/ubuntu-system-settings/reset-api
Diff against target: 18 lines (+9/-0)
1 file modified
plugins/background/MainPage.qml (+9/-0)
To merge this branch: bzr merge lp:~laney/ubuntu-system-settings/reset-background
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ubuntu Touch System Settings Pending
Review via email: mp+210261@code.launchpad.net

Commit message

[background] Support resetting to default

Description of the change

I wanted to show that we can start adding reset support to plugins now.

It's a little bit hard to test this because content hub is broken when you launch from the command line and the reset plugin is hidden by default. I suggest you hack reset.settings to make it shown by default.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sebastien Bacher (seb128) wrote :

setting as rejected since the panel got refactored since the changes were submitted

Unmerged revisions

505. By Iain Lane

Reset support for the background plugin

504. By Iain Lane

merge trunk

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-03-10 17:28:22 +0000
4@@ -41,6 +41,15 @@
5 property real thumbWidth: mainPage.width * 0.43
6 property real thumbHeight: mainPage.height * 0.4
7
8+ function reset() {
9+ background.schema.reset("pictureUri")
10+ // We can't get the default value in Qt
11+ backgroundPanel.backgroundFile = background.pictureUri
12+ systemSettingsSettings.schema.reset("backgroundDuplicate")
13+ systemSettingsSettings.schema.reset("previouslySetValue")
14+ systemSettingsSettings.schema.reset("backgroundDuplicate")
15+ }
16+
17 UbuntuBackgroundPanel {
18 id: backgroundPanel
19

Subscribers

People subscribed via source and target branches