[gnome-shell] cleanup: Use (un)block_signal_handler() convenience wrapper
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] cleanup: Use (un)block_signal_handler() convenience wrapper
- Date: Wed, 30 Oct 2019 21:26:09 +0000 (UTC)
commit 284ace5b5f86990325970a94e68ef687f52f4bdf
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Oct 30 18:11:56 2019 +0100
cleanup: Use (un)block_signal_handler() convenience wrapper
We now depend on a gjs version that is guaranteed to provide those
more idiomatic wrappers, so use them instead of the clunkier static
methods.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/795
js/extensionPrefs/main.js | 4 ++--
js/ui/status/brightness.js | 4 ++--
js/ui/status/volume.js | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/js/extensionPrefs/main.js b/js/extensionPrefs/main.js
index bd696523e8..b9d34f918e 100644
--- a/js/extensionPrefs/main.js
+++ b/js/extensionPrefs/main.js
@@ -579,9 +579,9 @@ class ExtensionRow extends Gtk.ListBoxRow {
this._extension = ExtensionUtils.deserializeExtension(newState);
let state = (this._extension.state == ExtensionState.ENABLED);
- GObject.signal_handler_block(this._switch, this._notifyActiveId);
+ this._switch.block_signal_handler(this._notifyActiveId);
this._switch.state = state;
- GObject.signal_handler_unblock(this._switch, this._notifyActiveId);
+ this._switch.unblock_signal_handler(this._notifyActiveId);
this._switch.sensitive = this._canToggle();
});
diff --git a/js/ui/status/brightness.js b/js/ui/status/brightness.js
index 1abdab47e2..b6e6ef8365 100644
--- a/js/ui/status/brightness.js
+++ b/js/ui/status/brightness.js
@@ -57,9 +57,9 @@ class Indicator extends PanelMenu.SystemIndicator {
}
_changeSlider(value) {
- GObject.signal_handler_block(this._slider, this._sliderChangedId);
+ this._slider.block_signal_handler(this._sliderChangedId);
this._slider.value = value;
- GObject.signal_handler_unblock(this._slider, this._sliderChangedId);
+ this._slider.unblock_signal_handler(this._sliderChangedId);
}
_sync() {
diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js
index 9109121c49..a4c7a823fe 100644
--- a/js/ui/status/volume.js
+++ b/js/ui/status/volume.js
@@ -131,9 +131,9 @@ var StreamSlider = class {
}
_changeSlider(value) {
- GObject.signal_handler_block(this._slider, this._sliderChangedId);
+ this._slider.block_signal_handler(this._sliderChangedId);
this._slider.value = value;
- GObject.signal_handler_unblock(this._slider, this._sliderChangedId);
+ this._slider.unblock_signal_handler(this._sliderChangedId);
}
_updateVolume() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]