/usr/share/cinnamon/js/ui/slideshowManager.js is in cinnamon-common 2.8.6-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | // -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*-
const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
const Lang = imports.lang;
const dbusIFace =
'<node> \
<interface name="org.Cinnamon.Slideshow"> \
<method name="begin" /> \
<method name="end" /> \
<method name="getNextImage" /> \
</interface> \
</node>';
const proxy = Gio.DBusProxy.makeProxyWrapper(dbusIFace);
function SlideshowManager() {
this._init();
}
SlideshowManager.prototype = {
_init: function() {
this.proxy = null;
this._slideshowSettings = new Gio.Settings({ schema_id: "org.cinnamon.desktop.background.slideshow" });
this._slideshowSettings.connect("changed::slideshow-enabled", Lang.bind(this, this._onSlideshowEnabledChanged));
if (this._slideshowSettings.get_boolean("slideshow-enabled")) {
this.begin();
}
},
_onSlideshowEnabledChanged: function() {
if (this._slideshowSettings.get_boolean("slideshow-enabled"))
this.begin();
else
this.end();
},
ensureProxy: function() {
if (!this.proxy)
this.proxy = new proxy(Gio.DBus.session, 'org.Cinnamon.Slideshow', '/org/Cinnamon/Slideshow');
},
begin: function() {
this.ensureProxy();
this.proxy.beginRemote();
},
end: function() {
this.ensureProxy();
this.proxy.endRemote();
},
getNextImage: function() {
this.ensureProxy();
this.proxy.getNextImageRemote();
}
};
|