11 Commits

Author SHA1 Message Date
39face9957
Fix: Also interact with the panel, if the parent session mode is "user"
Top Bar Organizer used to only interact with the panel, when the current
session mode is "user". However Ubuntu uses "ubuntu" as its session
mode, which made Top Bar Organizer not work.
Fix this by also interacting with the panel, if the parent session mode
is "user".

See here for some docs on session modes:
https://gjs.guide/extensions/topics/session-modes.html
2023-02-07 12:52:03 +01:00
40846915e7
Fix: Check, if signal handler is connected for handler id, before dc.
Do this to hopefully fix "No signal connection XX found" errors.
2023-01-30 15:28:58 +01:00
40cf8de1a8
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".
2023-01-30 14:46:56 +01:00
c61776d8d4
Other: Remove unused typedef BoxOrders 2023-01-28 23:56:40 +01:00
58a078c15c
Refactor: Use private fields instead of pref. with _, where suitable 2023-01-28 23:51:43 +01:00
cedb54ed64
Other: Disallow omitting curly braces and enforce one true brace style
Do this by updating the ESLint config accordingly and also fix new
complaints.
2023-01-28 23:34:15 +01:00
8de94d6b01
Other: Add whitespace rules from GJS Style Guide and fix complaints
Add whitespace rules from GJS Style Guide to ESLint config and fix new
complaints.
See here for the GJS Style guide whitespace section:
https://gjs.guide/guides/gjs/style-guide.html#whitespace
2023-01-28 23:13:46 +01:00
843c5f0e1c
Fix: Support AppIndicator/KStatusNotifierItem item addition again
Do this by not acting upon a new AppIndicator/KStatusNotifierItem item
immediately (as in trying to position it properly and maybe saving it to
settings), but rather act once the app indicators "ready" signal emits
by simply saving new items to settings and ordering the top bar boxes.
2023-01-28 08:38:27 +01:00
644656d93a
Refactor: Merge AppIndi.KStat.ItemManager code into BoxOrderManager
Let `BoxOrderManager` do the relevant work itself and get rid of
`AppIndicatorKStatusNotifierItemManager`.
This is also in preparation to make the addition of
AppIndicator/KStatusNotifierItem items work again.
2023-01-28 08:27:45 +01:00
59d5665661
Refactor: Simplify #overwritePanelAddToPanelBox heavily
Simplify `#overwritePanelAddToPanelBox` heavily by just calling the
original function in the overwrite and ordering the top bar and handling
new items afterwards.
Note that AppIndicator/KStatusNotifierItems are still not supported with
this refactor.
2023-01-28 00:20:43 +01:00
d51703eb4e
Refactor: Introduce BoxOrderManager
Introduce new `BoxOrderManager` to basically act as a heavy wrapper
around the box orders stored in settings, so that the other extension
code has easy methods to get, set and interact with box orders.
Refactor most of the code initially with it in mind.
Note that `#overwritePanelAddToPanelBox` needs more refactoring to
properly make use of that new idea (and it also needs refactoring in
general).
2023-01-27 23:48:23 +01:00