@@ -43,7 +43,7 @@ FocusScope {
44 property real edgeSize: units.gu(2)
44 property real edgeSize: units.gu(2)
45 property url defaultBackground: shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg"
45 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
47 readonly property real panelHeight: panel.panelHeight
47 readonly property real panelHeight: panel.panelHeight
49 property bool dashShown: dash.shown
49 property bool dashShown: dash.shown
@@ -119,6 +119,26 @@ FocusScope {
119 GSettings {
119 GSettings {
120 id: backgroundSettings
120 id: backgroundSettings
121 schema.id: "org.gnome.desktop.background"
121 schema.id: "org.gnome.desktop.background"
124+ property url gSettingsPicture: backgroundSettings.pictureUri.length > 0 ? backgroundSettings.pictureUri : shell.defaultBackground
125+ onGSettingsPictureChanged: {
126+ shell.background = gSettingsPicture
129+ // This is a dummy image that is needed to determine if the picture url
130+ // in backgroundSettings points to a valid picture file.
132+ source: shell.background
135+ sourceSize.height: 0
138+ if (status == Image.Error && source != shell.defaultBackground) {
139+ shell.background = defaultBackground
124 VolumeControl {
144 VolumeControl {
@@ -149,19 +169,8 @@ FocusScope {
149 id: backgroundImage
169 id: backgroundImage
150 objectName: "backgroundImage"
170 objectName: "backgroundImage"
152− property url gSettingsPicture: backgroundSettings.pictureUri.length > 0 ? backgroundSettings.pictureUri : defaultBackground
154 anchors.fill: parent
172 anchors.fill: parent
155−
173+ source: shell.background
156− onGSettingsPictureChanged: {
157− source = gSettingsPicture
161− if (status == Image.Error && source != defaultBackground) {
162− source = defaultBackground
167 Rectangle {
176 Rectangle {