background: Don't wait for gdk-pixbuf to fail before loading animations
We don't have any better way of determining whether something is a slideshow animation, so discriminate on the .xml filename instead of waiting for gdk-pixbuf to determine whether it can load a file or not. https://bugzilla.gnome.org/show_bug.cgi?id=719803
This commit is contained in:
parent
dbdc884c96
commit
eb1c85f3f5
@ -536,24 +536,25 @@ const Background = new Lang.Class({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
_loadFile: function(filename) {
|
_loadImage: function(filename) {
|
||||||
this._cache.getImageContent({ monitorIndex: this._monitorIndex,
|
this._cache.getImageContent({ monitorIndex: this._monitorIndex,
|
||||||
effects: this._effects,
|
effects: this._effects,
|
||||||
style: this._style,
|
style: this._style,
|
||||||
filename: filename,
|
filename: filename,
|
||||||
cancellable: this._cancellable,
|
cancellable: this._cancellable,
|
||||||
onFinished: Lang.bind(this, function(content) {
|
onFinished: Lang.bind(this, function(content) {
|
||||||
if (!content) {
|
if (content)
|
||||||
if (!this._cancellable.is_cancelled())
|
|
||||||
this._loadAnimation(filename);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._addImage(content, 0, filename);
|
this._addImage(content, 0, filename);
|
||||||
this._setLoaded();
|
this._setLoaded();
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
_loadFile: function(filename) {
|
||||||
|
if (filename.endsWith('.xml'))
|
||||||
|
this._loadAnimation(filename);
|
||||||
|
else
|
||||||
|
this._loadImage(filename);
|
||||||
},
|
},
|
||||||
|
|
||||||
_load: function () {
|
_load: function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user