js: Use gjs-defined GObject accessors where possible
Nowadays gjs allows to omit get/set accessors for read-write properties, and will define reasonable defaults in that case. In many cases we don't need anything more than the default handling, let gjs handle those props. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1611>
This commit is contained in:
@ -369,7 +369,6 @@ var Notification = GObject.registerClass({
|
||||
this.isTransient = false;
|
||||
this.privacyScope = PrivacyScope.USER;
|
||||
this.forFeedback = false;
|
||||
this._acknowledged = false;
|
||||
this.bannerBodyText = null;
|
||||
this.bannerBodyMarkup = false;
|
||||
this._soundName = null;
|
||||
@ -438,17 +437,6 @@ var Notification = GObject.registerClass({
|
||||
this.actions.push({ label, callback });
|
||||
}
|
||||
|
||||
get acknowledged() {
|
||||
return this._acknowledged;
|
||||
}
|
||||
|
||||
set acknowledged(v) {
|
||||
if (this._acknowledged == v)
|
||||
return;
|
||||
this._acknowledged = v;
|
||||
this.notify('acknowledged');
|
||||
}
|
||||
|
||||
setUrgency(urgency) {
|
||||
this.urgency = urgency;
|
||||
}
|
||||
|
Reference in New Issue
Block a user