mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
cleanup: Use method syntax
Modern javascript has a short-hand for function properties, embrace it for better readability and to prepare for an eventual port to ES6 classes. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
This commit is contained in:
parent
cff0b81f32
commit
76f09b1e49
116 changed files with 3140 additions and 3140 deletions
|
|
@ -7,7 +7,7 @@ const Lang = imports.lang;
|
|||
var CheckBox = new Lang.Class({
|
||||
Name: 'CheckBox',
|
||||
|
||||
_init: function(label) {
|
||||
_init(label) {
|
||||
let container = new St.BoxLayout();
|
||||
this.actor = new St.Button({ style_class: 'check-box',
|
||||
child: container,
|
||||
|
|
@ -30,11 +30,11 @@ var CheckBox = new Lang.Class({
|
|||
this.setLabel(label);
|
||||
},
|
||||
|
||||
setLabel: function(label) {
|
||||
setLabel(label) {
|
||||
this._label.set_text(label);
|
||||
},
|
||||
|
||||
getLabelActor: function() {
|
||||
getLabelActor() {
|
||||
return this._label;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue