mirror of
https://github.com/zoriya/fairy.git
synced 2026-05-31 02:05:36 +00:00
Fix settings signal issue
This commit is contained in:
+2
-2
@@ -38,7 +38,7 @@ var BorderManager = GObject.registerClass(
|
||||
});
|
||||
if (global.window_group) global.window_group.add_child(this._border);
|
||||
|
||||
this._settings.connect("changed", () => {
|
||||
this._settingsSignal = this._settings.connect("changed", () => {
|
||||
this.settings = {
|
||||
show: this._settings.get_boolean("focus-border"),
|
||||
color: this._settings.get_string("focus-border-color"),
|
||||
@@ -50,7 +50,7 @@ var BorderManager = GObject.registerClass(
|
||||
|
||||
disable() {
|
||||
log("Removing the border");
|
||||
this._settings.disconnect("changed");
|
||||
this._settings.disconnect(this._settingsSignal);
|
||||
this._border.destroy();
|
||||
this._border = null;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,9 @@ var Indicator = GObject.registerClass(
|
||||
this._destroyed = false;
|
||||
this.update();
|
||||
|
||||
this._settings.connect("changed", () => this.update());
|
||||
this._settingsSignal = this._settings.connect("changed", () =>
|
||||
this.update()
|
||||
);
|
||||
}
|
||||
|
||||
disable() {
|
||||
@@ -132,7 +134,7 @@ var Indicator = GObject.registerClass(
|
||||
this._layoutIndicator = null;
|
||||
this._icon = null;
|
||||
|
||||
this._settings.disconnect("changed");
|
||||
this._settings.disconnect(this._settingsSignal);
|
||||
}
|
||||
|
||||
update() {
|
||||
@@ -184,8 +186,7 @@ var Indicator = GObject.registerClass(
|
||||
this._windowCount.set_text(windowCount.toString());
|
||||
if (state.layout === "monocle" || state.layout === "deck")
|
||||
this._windowCount.show();
|
||||
else
|
||||
this._windowCount.hide();
|
||||
else this._windowCount.hide();
|
||||
for (const [key, value] of Object.entries(this._layoutPanelItems)) {
|
||||
value.setOrnament(
|
||||
key === state.layout
|
||||
|
||||
+4
-2
@@ -43,8 +43,10 @@ var Renderer = GObject.registerClass(
|
||||
this.warpEnabled = this._settings.get_boolean("warp-cursor");
|
||||
this._state.singleTagset = this._settings.get_boolean("single-tagset");
|
||||
|
||||
log("Enabling with state:", JSON.stringify(this._state.windows));
|
||||
for (const window of global.display.list_all_windows())
|
||||
this.trackWindow(window);
|
||||
log("Enabling with state after tracking:", JSON.stringify(this._state.windows));
|
||||
|
||||
const workspace = global.display
|
||||
.get_workspace_manager()
|
||||
@@ -139,7 +141,7 @@ var Renderer = GObject.registerClass(
|
||||
}
|
||||
// We do not remove the state's windows array, we want to keep tags when the user suspend the systme.
|
||||
|
||||
this._settings.disconnect("changed");
|
||||
this._settings.disconnect(this._settingsSignal);
|
||||
}
|
||||
|
||||
_bindSignals() {
|
||||
@@ -219,7 +221,7 @@ var Renderer = GObject.registerClass(
|
||||
}),
|
||||
];
|
||||
|
||||
this._settings.connect("changed", (_, key) => {
|
||||
this._settingsSignal = this._settings.connect("changed", (_, key) => {
|
||||
log("Proprety changed", key);
|
||||
switch (key) {
|
||||
case "gap-size":
|
||||
|
||||
Reference in New Issue
Block a user