Refactor: Use constructor instead of _init

This commit is contained in:
Julian 2023-01-22 15:16:56 +01:00
parent cda099be24
commit 2f9f4d1a3f
Signed by: julian
GPG Key ID: 094C2AC34192FA11
4 changed files with 8 additions and 8 deletions

View File

@ -18,8 +18,8 @@ var PrefsBoxOrderItemRow = GObject.registerClass({
"menu-button" "menu-button"
] ]
}, class PrefsBoxOrderItemRow extends Adw.ActionRow { }, class PrefsBoxOrderItemRow extends Adw.ActionRow {
_init(params = {}, scrollManager, item) { constructor(params = {}, scrollManager, item) {
super._init(params); super(params);
this._associateItem(item); this._associateItem(item);
this._configureMenu(); this._configureMenu();

View File

@ -16,8 +16,8 @@ var PrefsBoxOrderListBox = GObject.registerClass({
* @param {String} boxOrder - The box order this PrefsBoxOrderListBox is * @param {String} boxOrder - The box order this PrefsBoxOrderListBox is
* associated with. * associated with.
*/ */
_init(params = {}, boxOrder) { constructor(params = {}, boxOrder) {
super._init(params); super(params);
this._settings = ExtensionUtils.getSettings(); this._settings = ExtensionUtils.getSettings();

View File

@ -12,8 +12,8 @@ var PrefsBoxOrderListEmptyPlaceholder = GObject.registerClass({
GTypeName: "PrefsBoxOrderListEmptyPlaceholder", GTypeName: "PrefsBoxOrderListEmptyPlaceholder",
Template: Me.dir.get_child("ui").get_child("prefs-box-order-list-empty-placeholder.ui").get_uri() Template: Me.dir.get_child("ui").get_child("prefs-box-order-list-empty-placeholder.ui").get_uri()
}, class PrefsBoxOrderListEmptyPlaceholder extends Gtk.Box { }, class PrefsBoxOrderListEmptyPlaceholder extends Gtk.Box {
_init(params = {}) { constructor(params = {}) {
super._init(params); super(params);
/// Make `this` accept drops by creating a drop target and adding it to /// Make `this` accept drops by creating a drop target and adding it to
/// `this`. /// `this`.

View File

@ -22,8 +22,8 @@ var PrefsPage = GObject.registerClass({
"right-box" "right-box"
] ]
}, class PrefsPage extends Adw.PreferencesPage { }, class PrefsPage extends Adw.PreferencesPage {
_init(params = {}) { constructor(params = {}) {
super._init(params); super(params);
this._settings = ExtensionUtils.getSettings(); this._settings = ExtensionUtils.getSettings();