cleanup: Port GObject classes to ES6 classes
GJS added API for defining GObject classes with ES6 class syntax last cycle, use it to port the remaining Lang.Class classes to the new syntax. Fixes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/30
This commit is contained in:
@@ -16,13 +16,10 @@ function init() {
|
||||
Convenience.initTranslations();
|
||||
}
|
||||
|
||||
const ExamplePrefsWidget = new GObject.Class({
|
||||
Name: 'Example.Prefs.Widget',
|
||||
GTypeName: 'ExamplePrefsWidget',
|
||||
Extends: Gtk.Grid,
|
||||
|
||||
const ExamplePrefsWidget = GObject.registerClass(
|
||||
class ExamplePrefsWidget extends Gtk.Grid {
|
||||
_init(params) {
|
||||
this.parent(params);
|
||||
super._init(params);
|
||||
this.margin = 12;
|
||||
this.row_spacing = this.column_spacing = 6;
|
||||
this.set_orientation(Gtk.Orientation.VERTICAL);
|
||||
|
||||
Reference in New Issue
Block a user