mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
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
1 changed files with 8 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue