mirror of
https://github.com/morgan9e/gnome-shell-extension-freon
synced 2026-04-15 00:44:22 +09:00
Update extension position with panel-box-index
Let the user to chose where to place the extension button within each panel box. From the left (with default orientation, otherwise from the right) as: - 0, first - 1, second - ... - -1, last Note: gschema compilation needed.
This commit is contained in:
@@ -106,6 +106,7 @@ const FreonMenuButton = GObject.registerClass(class Freon_FreonMenuButton extend
|
||||
this._addSettingChangedSignal('drive-utility', this._driveUtilityChanged.bind(this));
|
||||
this._addSettingChangedSignal('gpu-utility', this._gpuUtilityChanged.bind(this));
|
||||
this._addSettingChangedSignal('position-in-panel', this._positionInPanelChanged.bind(this));
|
||||
this._addSettingChangedSignal('panel-box-index', this._positionInPanelChanged.bind(this));
|
||||
this._addSettingChangedSignal('group-temperature', this._querySensors.bind(this))
|
||||
this._addSettingChangedSignal('group-voltage', this._rerender.bind(this))
|
||||
|
||||
@@ -161,7 +162,8 @@ const FreonMenuButton = GObject.registerClass(class Freon_FreonMenuButton extend
|
||||
};
|
||||
|
||||
let p = this.positionInPanel;
|
||||
boxes[p].insert_child_at_index(this.container, p == 'right' ? 0 : -1)
|
||||
let i = this._settings.get_int('panel-box-index');
|
||||
boxes[p].insert_child_at_index(this.container, i);
|
||||
}
|
||||
|
||||
_showIconOnPanelChanged(){
|
||||
|
||||
Reference in New Issue
Block a user