Open jtojnar opened 4 years ago
Perhaps it would be a good idea to convert all the listeners and emits to GObject properties connected together with GBinding
. Hopefully, GLib is smart enough to not cycle.
Unfortunately, the data flows throughout almost all the modules so we would need to duplicate the properties everywhere.
I tried the following but apparently G_MINDOUBLE
is not exposed to JavaScript.
var PopupSliderMenuItem = GObject.registerClass({
Properties: {
'value': GObject.ParamSpec.double(
'value', 'value', 'value',
GObject.ParamFlags.READWRITE,
GLib.MINDOUBLE, GLib.MAXDOUBLE, 0,
},
}, class PopupSliderMenuItem extends PopupMenu.PopupBaseMenuItem {
…
this.slider.bind_property_full(
'value',
this,
'value',
GObject.BindingFlags.BIDIRECTIONAL,
(value) => deNormalizeRange(value, this.min, this.max, this.step),
(value) => normalizeRange(value, this.min, this.max, this.step)
);
I can now use the extension successfully on GNOME 3.34. There are still some bugs to work out, though:
Does anyone have an idea how to solve these?
What has been done
I had to accomodate the following GNOME Shell changes:
Additionally: