mirror of
https://gitlab.gnome.org/julianschacher/top-bar-organizer.git
synced 2025-10-27 07:09:07 +00:00
Fix the following issues: 1. Let's assume we have a default (reduced) Gnome Shell top bar like this: - left box: activities, appMenu - center box: dateMenu - right box: keyboard, aggregateMenu And now assume, we changed the (reduced) configured box orders to define the top bar like this (while the extension wasn't running for this test case): - left box: activites, keyboard, appMenu - center box: dateMenu - right box: aggreateMenu Now for the old version of this extension, the following would happen: The extension would put the "keyboard" into the configured right box order on extension start, despite it being already in the configured left box order. This would happen, because the extension would look at each box individually at startup to determine if new items should be added to its box order. And therefore it would add "keyboard" to the configured right box order, leading to the (reduced) corrupted box orders looking like this: - left box: activites, keyboard, appMenu - center box: dateMenu - right box: keyboard, aggreateMenu And then, since the extension orders the top bar initially on start, the extension would put the "keyboard" item into the right box (since the right box would get ordered after the left box). (And even if the config situation were different, so that the originally configured box would have been ordered after the wrongly configured box, the configured box orders would have still been corrupted.) Fix this issue by considering all top bar boxes in `_createUpdatedBoxOrder/s`. 2. Let's assume we have the default (reduced) configured box orders like this: - left box: - center box: - right box: appindicator-kstatusnotifieritem-KeePassXC And now assume, we changed the (reduced) configured box orders to define the top bar like this (while the extension and the "KStatusNotifierItem/AppIndicator Support" extension weren't running for this test case): - left box: appindicator-kstatusnotifieritem-KeePassXC - center box: - right box: Now we would first start this extension and then the "KStatusNotifierItem/AppIndicator Support" extension. For the old version of this extension, the following would happen: The extension would have put the KeePassXC KStatusNotifierItem/AppIndicator into the configured right box order and the right box, leading to the (reduced) corrupted configured box orders looking like this: - left box: appindicator-kstatusnotifieritem-KeePassXC - center box: - right box: appindicator-kstatusnotifieritem-KeePassXC This would happen, because the logic for the `Panel._addToPanelBox` overwrite assumed that the new item should be added to the box the item addition initiator requested (even tho the item might be configured to go into another box). Fix this issue by considering all top bar boxes for the `Panel._addToPanelBox` overwrite. One can see based on those two test cases, how those two issues create problems. So fix the issues as explained above and fix them together in this one commit, since they are related.
Description
A Gnome Shell Extension for organizing your Gnome Shell top bar.
Languages
TypeScript
98.7%
Shell
0.9%
CSS
0.4%