mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
cleanup: Use inheritance for Actor classes instead of composition
Remove the `this.actor = ...` and `this.actor._delegate = this` patterns in most of classes, by inheriting all the actor container classes. Uses interfaces when needed for making sure that multiple classes will implement some required methods or to avoid redefining the same code multiple times. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559
This commit is contained in:
parent
f67b409fc1
commit
c4c5c4fd5c
58 changed files with 2000 additions and 1757 deletions
|
|
@ -56,8 +56,8 @@ class AccessDialog extends ModalDialog.ModalDialog {
|
|||
|
||||
let check = new CheckBox.CheckBox();
|
||||
check.getLabelActor().text = name;
|
||||
check.actor.checked = selected == "true";
|
||||
content.insertBeforeBody(check.actor);
|
||||
check.checked = selected == "true";
|
||||
content.insertBeforeBody(check);
|
||||
|
||||
this._choices.set(id, check);
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@ class AccessDialog extends ModalDialog.ModalDialog {
|
|||
let results = {};
|
||||
if (response == DialogResponse.OK) {
|
||||
for (let [id, check] of this._choices) {
|
||||
let checked = check.actor.checked ? 'true' : 'false';
|
||||
let checked = check.checked ? 'true' : 'false';
|
||||
results[id] = new GLib.Variant('s', checked);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue