on xenial help sign in
Read background from GSettings
5eb6bceAndrea Cimitan
Shell.qml+21
@@ -15,6 +15,7 @@
15 */
15 */
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18+import GSettings 1.0
18import Ubuntu.Application 0.1
19import Ubuntu.Application 0.1
19import Ubuntu.Components 0.1
20import Ubuntu.Components 0.1
20import Ubuntu.Gestures 0.1
21import Ubuntu.Gestures 0.1
@@ -112,6 +113,26 @@ FocusScope {
112 }
113 }
113 }
114 }
114
115
116+ GSettings {
117+ id: backgroundSettings
118+ schema: "org.gnome.desktop.background"
119+ }
120+
121+ function updateImage() {
122+ if (testImage.status == Image.Ready) {
123+ shell.background = testImage.source
124+ } else if (testImage.status == Image.Error) {
125+ shell.background = shell.default_background
126+ }
127+ }
128+
129+ Image {
130+ id: testImage
131+ source: backgroundSettings.pictureUri
132+ visible: false
133+ onStatusChanged: updateImage()
134+ }
135+
115 VolumeControl {
136 VolumeControl {
116 id: volumeControl
137 id: volumeControl
117 }
138 }
debian/control+2
@@ -4,6 +4,7 @@ Priority: optional
4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5Build-Depends: cmake,
5Build-Depends: cmake,
6 debhelper (>= 9),
6 debhelper (>= 9),
7+ gsettings-desktop-schemas,
7 libdee-qt5-dev (>= 3.0),
8 libdee-qt5-dev (>= 3.0),
8 libgl1-mesa-dev[!armhf] | libgl-dev[!armhf],
9 libgl1-mesa-dev[!armhf] | libgl-dev[!armhf],
9 libgl1-mesa-dri,
10 libgl1-mesa-dri,
@@ -30,6 +31,7 @@ Build-Depends: cmake,
30 qtbase5-private-dev,
31 qtbase5-private-dev,
31 qtdeclarative5-dev,
32 qtdeclarative5-dev,
32 qtdeclarative5-dev-tools,
33 qtdeclarative5-dev-tools,
34+ qtdeclarative5-gsettings1.0,
33 qtdeclarative5-private-dev,
35 qtdeclarative5-private-dev,
34 qtdeclarative5-qtquick2-plugin,
36 qtdeclarative5-qtquick2-plugin,
35 qtdeclarative5-test-plugin,
37 qtdeclarative5-test-plugin,