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:
Marco Trevisan (Treviño)
2019-07-16 11:24:13 +02:00
committed by Florian Müllner
parent f67b409fc1
commit c4c5c4fd5c
58 changed files with 2000 additions and 1757 deletions

View File

@ -17,7 +17,7 @@ function test() {
// Calendar can only be imported after Environment.init()
const Calendar = imports.ui.calendar;
let calendar = new Calendar.Calendar();
vbox.add(calendar.actor,
vbox.add(calendar,
{ expand: true,
x_fill: false, x_align: St.Align.MIDDLE,
y_fill: false, y_align: St.Align.START });