dialog: Use GObject.set() over Object.assign()

gjs has provided that as a more idiomatic replacement for a while.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/600
This commit is contained in:
Florian Müllner 2019-06-26 19:16:41 +02:00
parent b143869d5d
commit 68e580e394

View File

@ -214,7 +214,10 @@ var MessageDialogContent = GObject.registerClass({
}
set icon(icon) {
Object.assign(this._icon, { gicon: icon, visible: icon != null });
this._icon.set({
gicon: icon,
visible: icon != null
});
this.notify('icon');
}
@ -231,7 +234,10 @@ var MessageDialogContent = GObject.registerClass({
}
_setLabel(label, prop, value) {
Object.assign(label, { text: value || '', visible: value != null });
label.set({
text: value || '',
visible: value != null
});
this.notify(prop);
}