mirror of
https://gitlab.gnome.org/julianschacher/top-bar-organizer.git
synced 2025-10-27 15:19:09 +00:00
Fix: Don't affect (or interact with) panel of unlock screen
The panel gets set to the state it should have for the unlock screen before extension disable. Because of this the extension makes icons show, which shouldn't show. So fix that by not ordering the panel, if the current session mode isn't "user". Also generally don't interact with the panel, if the current session mode isn't "user".
This commit is contained in:
parent
680c2a97af
commit
40cf8de1a8
@ -94,6 +94,11 @@ class Extension {
|
||||
* @param {string} box - The box to order.
|
||||
*/
|
||||
#orderTopBarItems(box) {
|
||||
// Only run, when in "user" session mode.
|
||||
if(Main.sessionMode.currentMode !== "user") {
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the valid box order.
|
||||
const validBoxOrder = this._boxOrderManager.createValidBoxOrder(box);
|
||||
|
||||
@ -147,6 +152,11 @@ class Extension {
|
||||
* orders the items of all top bar boxes.
|
||||
*/
|
||||
#handleNewItemsAndOrderTopBar() {
|
||||
// Only run, when in "user" session mode.
|
||||
if(Main.sessionMode.currentMode !== "user") {
|
||||
return;
|
||||
}
|
||||
|
||||
this._boxOrderManager.saveNewTopBarItems();
|
||||
this.#orderTopBarItems("left");
|
||||
this.#orderTopBarItems("center");
|
||||
|
||||
@ -184,6 +184,11 @@ var BoxOrderManager = GObject.registerClass({
|
||||
* bar to the correct box orders.
|
||||
*/
|
||||
saveNewTopBarItems() {
|
||||
// Only run, when in "user" session mode.
|
||||
if(Main.sessionMode.currentMode !== "user") {
|
||||
return;
|
||||
}
|
||||
|
||||
// Load the configured box orders from settings.
|
||||
const boxOrders = {
|
||||
left: this.#settings.get_strv("left-box-order"),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user