Use constructor in GObject classes
This commit is contained in:
@@ -194,8 +194,8 @@ Signals.addSignalMethods(TimerOndemand.prototype);
|
||||
|
||||
var NtsPanelMenuButton = GObject.registerClass(
|
||||
class NtsPanelMenuButton extends PanelMenuButton {
|
||||
_init() {
|
||||
super._init(0.0);
|
||||
constructor() {
|
||||
super(0.0);
|
||||
this.icon = new St.Icon({
|
||||
style_class: 'system-status-icon',
|
||||
});
|
||||
@@ -213,8 +213,8 @@ var NtsPanelMenuButton = GObject.registerClass(
|
||||
|
||||
var NtsPopupMenuItem = GObject.registerClass(
|
||||
class NtsPopupMenuItem extends PopupBaseMenuItem {
|
||||
_init(params) {
|
||||
super._init(params);
|
||||
constructor(params) {
|
||||
super(params);
|
||||
this.icon = new St.Icon({
|
||||
style_class: 'popup-menu-icon',
|
||||
x_align: Clutter.ActorAlign.END,
|
||||
|
||||
@@ -15,8 +15,8 @@ var BackgroundsPage = GObject.registerClass({
|
||||
'night_button',
|
||||
],
|
||||
}, class BackgroundsPage extends Adw.PreferencesPage {
|
||||
_init(props = {}) {
|
||||
super._init(props);
|
||||
constructor(props = {}) {
|
||||
super(props);
|
||||
const settings = new Gio.Settings({ schema: 'org.gnome.desktop.background' });
|
||||
|
||||
settings.bind('picture-uri', this._day_button, 'path', Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
@@ -18,8 +18,8 @@ var CommandsPage = GObject.registerClass({
|
||||
'sunset_entry',
|
||||
],
|
||||
}, class CommandsPage extends Adw.PreferencesPage {
|
||||
_init(props = {}) {
|
||||
super._init(props);
|
||||
constructor(props = {}) {
|
||||
super(props);
|
||||
const settings = extensionUtils.getSettings(utils.getSettingsSchema('commands'));
|
||||
|
||||
settings.bind('enabled', this._enabled_switch, 'active', Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
@@ -29,8 +29,8 @@ var SchedulePage = GObject.registerClass({
|
||||
'ondemand_preferences_group',
|
||||
],
|
||||
}, class SchedulePage extends Adw.PreferencesPage {
|
||||
_init(props = {}) {
|
||||
super._init(props);
|
||||
constructor(props = {}) {
|
||||
super(props);
|
||||
const settings = extensionUtils.getSettings(utils.getSettingsSchema('time'));
|
||||
const colorSettings = new Gio.Settings({ schema: 'org.gnome.settings-daemon.plugins.color' });
|
||||
const locationSettings = new Gio.Settings({ schema: 'org.gnome.system.location' });
|
||||
|
||||
@@ -30,8 +30,8 @@ var ThemesPage = GObject.registerClass({
|
||||
'cursor_night_variant_combo_row',
|
||||
],
|
||||
}, class ThemesPage extends Adw.PreferencesPage {
|
||||
_init(props = {}) {
|
||||
super._init(props);
|
||||
constructor(props = {}) {
|
||||
super(props);
|
||||
const gtkSettings = extensionUtils.getSettings(utils.getSettingsSchema('gtk-variants'));
|
||||
const shellSettings = extensionUtils.getSettings(utils.getSettingsSchema('shell-variants'));
|
||||
const iconSettings = extensionUtils.getSettings(utils.getSettingsSchema('icon-variants'));
|
||||
|
||||
Reference in New Issue
Block a user