@@ -51,7 +51,7 @@ Item {
52 property real edgeSize: units.gu(2)
52 property real edgeSize: units.gu(2)
53 property url defaultBackground: Qt.resolvedUrl(shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg")
53 property url defaultBackground: Qt.resolvedUrl(shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg")
54− property url background
54+ property url background: AccountsService.backgroundFile != undefined && AccountsService.backgroundFile.length > 0 ? AccountsService.backgroundFile : defaultBackground
55 readonly property real panelHeight: panel.panelHeight
55 readonly property real panelHeight: panel.panelHeight
57 readonly property bool locked: LightDM.Greeter.active && !LightDM.Greeter.authenticated && !forcedUnlock
57 readonly property bool locked: LightDM.Greeter.active && !LightDM.Greeter.authenticated && !forcedUnlock
@@ -99,6 +99,21 @@ Item {
99 shell.activateApplication(app)
99 shell.activateApplication(app)
102+ // This is a dummy image to detect if the custom set wallpaper
103+ // loads successfully. If it doesn't fall back to the defaultBackground.
105+ source: shell.background
108+ sourceSize.height: 0
111+ if (status == Image.Error && source != shell.defaultBackground) {
112+ shell.background = shell.defaultBackground
102 Binding {
117 Binding {
103 target: LauncherModel
118 target: LauncherModel
104 property: "applicationManager"
119 property: "applicationManager"
@@ -115,15 +130,6 @@ Item {
119− id: backgroundSettings
120− schema.id: "org.gnome.desktop.background"
122− property url gSettingsPicture: backgroundSettings.pictureUri != undefined && backgroundSettings.pictureUri.length > 0 ? backgroundSettings.pictureUri : shell.defaultBackground
123− onGSettingsPictureChanged: {
124− shell.background = gSettingsPicture
127 VolumeControl {
133 VolumeControl {
128 id: volumeControl
134 id: volumeControl
@@ -524,7 +530,7 @@ Item {
525 locked: shell.locked
531 locked: shell.locked
527− defaultBackground: shell.background
533+ background: shell.background
529 width: parent.width
535 width: parent.width
530 height: parent.height
536 height: parent.height