JustPerfection extension review fixes
This commit is contained in:
+2
-2
@@ -146,14 +146,12 @@ class Extension {
|
|||||||
constructor() {
|
constructor() {
|
||||||
this._previous_y_align = BannerBin.get_y_align();
|
this._previous_y_align = BannerBin.get_y_align();
|
||||||
this._previous_x_align = BannerBin.get_x_align();
|
this._previous_x_align = BannerBin.get_x_align();
|
||||||
this._loadSettings();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_loadSettings() {
|
_loadSettings() {
|
||||||
this._settings = Prefs.SettingsSchema;
|
this._settings = Prefs.SettingsSchema;
|
||||||
this._settingsChangedId = this._settings.connect('changed',
|
this._settingsChangedId = this._settings.connect('changed',
|
||||||
Lang.bind(this, this._onSettingsChange));
|
Lang.bind(this, this._onSettingsChange));
|
||||||
|
|
||||||
this._fetchSettings();
|
this._fetchSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,6 +168,7 @@ class Extension {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enable() {
|
enable() {
|
||||||
|
this._loadSettings();
|
||||||
// generally alignment can be controller with START/CENTER/END
|
// generally alignment can be controller with START/CENTER/END
|
||||||
// but CENTER and END are problematic to implement animations with
|
// but CENTER and END are problematic to implement animations with
|
||||||
// (especially x -> END and animations from left/right)
|
// (especially x -> END and animations from left/right)
|
||||||
@@ -192,6 +191,7 @@ class Extension {
|
|||||||
BannerBin.x = 0
|
BannerBin.x = 0
|
||||||
BannerBin.y = 0
|
BannerBin.y = 0
|
||||||
this.restore()
|
this.restore()
|
||||||
|
this._settings = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,15 +43,7 @@ var Fields = {
|
|||||||
|
|
||||||
const SCHEMA_NAME = 'org.gnome.shell.extensions.notification-banner-reloaded';
|
const SCHEMA_NAME = 'org.gnome.shell.extensions.notification-banner-reloaded';
|
||||||
|
|
||||||
const getSchema = function () {
|
var SettingsSchema = ExtensionUtils.getSettings(SCHEMA_NAME);
|
||||||
let schemaDir = Me.dir.get_child('schemas').get_path();
|
|
||||||
let schemaSource = Gio.SettingsSchemaSource.new_from_directory(schemaDir, Gio.SettingsSchemaSource.get_default(), false);
|
|
||||||
let schema = schemaSource.lookup(SCHEMA_NAME, false);
|
|
||||||
|
|
||||||
return new Gio.Settings({ settings_schema: schema });
|
|
||||||
};
|
|
||||||
|
|
||||||
var SettingsSchema = getSchema();
|
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
let localeDir = Me.dir.get_child('locale');
|
let localeDir = Me.dir.get_child('locale');
|
||||||
|
|||||||
Reference in New Issue
Block a user