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:
parent
b143869d5d
commit
68e580e394
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user