@@ -43,7 +43,7 @@ FocusScope {
4343
4444 property real edgeSize: units.gu(2)
4545 property url defaultBackground: shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg"
46− readonly property alias background: backgroundImage.source
46+ property url background
4747 readonly property real panelHeight: panel.panelHeight
4848
4949 property bool dashShown: dash.shown
@@ -119,6 +119,26 @@ FocusScope {
119119 GSettings {
120120 id: backgroundSettings
121121 schema.id: "org.gnome.desktop.background"
122+
123+ }
124+ property url gSettingsPicture: backgroundSettings.pictureUri.length > 0 ? backgroundSettings.pictureUri : shell.defaultBackground
125+ onGSettingsPictureChanged: {
126+ shell.background = gSettingsPicture
127+ }
128+
129+ // This is a dummy image that is needed to determine if the picture url
130+ // in backgroundSettings points to a valid picture file.
131+ Image {
132+ source: shell.background
133+ height: 0
134+ width: 0
135+ sourceSize.height: 0
136+ sourceSize.width: 0
137+ onStatusChanged: {
138+ if (status == Image.Error && source != shell.defaultBackground) {
139+ shell.background = defaultBackground
140+ }
141+ }
122142 }
123143
124144 VolumeControl {
@@ -149,19 +169,8 @@ FocusScope {
149169 id: backgroundImage
150170 objectName: "backgroundImage"
151171
152− property url gSettingsPicture: backgroundSettings.pictureUri.length > 0 ? backgroundSettings.pictureUri : defaultBackground
153−
154172 anchors.fill: parent
155−
156− onGSettingsPictureChanged: {
157− source = gSettingsPicture
158− }
159−
160− onStatusChanged: {
161− if (status == Image.Error && source != defaultBackground) {
162− source = defaultBackground
163− }
164− }
173+ source: shell.background
165174 }
166175
167176 Rectangle {