summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2019-07-13 01:56:12 +0300
committerFlorian Müllner <florian.muellner@gmail.com>2019-10-16 15:26:12 +0000
commitc7e0c7eb792fcd665adb9901a1eab1fd6a5bd12d (patch)
tree5c7313064cc7aa6945db83888fbec2c1323396d6
parentff775213a5346df6d3e98f9c4d46c9b1f46abf92 (diff)
downloadgnome-shell-c7e0c7eb792fcd665adb9901a1eab1fd6a5bd12d.tar.gz
background: Rename Background 'changed' signal to 'bg-changed'
Meta.Background has already a 'changed' signal and not to confuse the source signal with the wrapper one, rename the wrapper class signal into 'bg-changed'. This will be relevant when we'll inherit from Meta.Background, as signal emissions from the base class could interfere with the wanted derived class behavior and with the the grouping of successive changes into a single ::change emission. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559
-rw-r--r--js/ui/background.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/js/ui/background.js b/js/ui/background.js
index 8432abc75..b7307e5a4 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -300,9 +300,11 @@ var Background = class Background {
this._changedIdleId = GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
this._changedIdleId = 0;
- this.emit('changed');
+ this.emit('bg-changed');
return GLib.SOURCE_REMOVE;
});
+ GLib.Source.set_name_by_id(this._changedIdleId,
+ '[gnome-shell] Background._emitChangedSignal');
}
updateResolution() {
@@ -566,7 +568,7 @@ var BackgroundSource = class BackgroundSource {
// We don't watch changes to settings here,
// instead we rely on Background to watch those
- // and emit 'changed' at the right time
+ // and emit 'bg-changed' at the right time
if (this._overrideImage != null) {
file = Gio.File.new_for_path(this._overrideImage);
@@ -595,7 +597,7 @@ var BackgroundSource = class BackgroundSource {
style: style
});
- background._changedId = background.connect('changed', () => {
+ background._changedId = background.connect('bg-changed', () => {
background.disconnect(background._changedId);
background.destroy();
delete this._backgrounds[monitorIndex];
@@ -766,7 +768,7 @@ var BackgroundManager = class BackgroundManager {
backgroundActor.lower_bottom();
}
- let changeSignalId = background.connect('changed', () => {
+ let changeSignalId = background.connect('bg-changed', () => {
background.disconnect(changeSignalId);
changeSignalId = null;
this._updateBackgroundActor();