150 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
4be693a134
Docs: Add README with screenshot, extension desc. and installation notes 2023-01-30 18:10:52 +01:00
6bc40441a7
Other: Bump version to 6 v6 2023-01-30 15:33:14 +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
680c2a97af
Other: Bump version to 5 v5 2023-01-29 03:41:02 +01:00
1b5ba38617
Refactor: Rename this.settings to this._settings
Do this to indicate that this is a "private" field.
2023-01-29 03:24:17 +01:00
8586f095fc
Refactor: Reorder enable code and comment it, to make it more clear 2023-01-29 00:41:46 +01:00
d01fb434ee
Other: Remove unused typedef PositionAndBoxOverwrite 2023-01-29 00:34:53 +01:00
6e61014331
Refactor: Introduce #handleNewItemsAndOrderTopBar method
Introducing this method cleans up code, which did pretty much the same
thing, by replacing it with a call to this method.
2023-01-29 00:34:44 +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
0401790fed
Refactor: Don't add ScrollManag. inst. to this, since thats not needed 2023-01-28 22:46:10 +01:00
4ba00915e0
Update: Don't have the not ready app indicators at the far right
Make sure unaccounted-for indicator containers (like the not ready app
indicator indicator containers) in the right panel box are on the left
of it, since the right panel box is logically right-to-left and to avoid
unnecessary shifting should they become accounted for.
2023-01-28 09:39:04 +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
ba373e9e49
Other: Mark AppIndicator/KStatusNotifierItem addition as broken 2023-01-27 21:44:59 +01:00
7b1c030325
Fix: Don't use globalThis, since it won't get g.c. on window close
Don't use `globalThis`, since it won't get garbage collected on window
close.

See here for the relevant review:
https://extensions.gnome.org/review/38364
And for the relevant documentation:
https://gjs.guide/extensions/review-guidelines/review-guidelines.html#only-use-init-for-initialization
2023-01-26 03:42:56 +01:00
2ef16f310c
Fix: Null out this.settings on extension disable
See here for the relevant review:
https://extensions.gnome.org/review/38364
And for the relevant documentation:
https://gjs.guide/extensions/review-guidelines/review-guidelines.html#destroy-all-objects
2023-01-25 20:40:16 +01:00
93ec247cd3
Other: Bump version to 4 v4 2023-01-25 18:56:59 +01:00
97d8f86372
Feature: Support GNOME version 43 2023-01-25 18:55:08 +01:00
c6fb9a8b8d
Docs: Add newer, cut down and commented panel.js from Gnome Shell 43.2 2023-01-24 20:40:24 +01:00
7970a7c643
Other: Add docs panel code files to .eslintignore 2023-01-24 19:39:07 +01:00
dc7ad73db4
Other: Handle ESLint complaints 2023-01-24 19:33:11 +01:00
062bc9ae26
Other: Allow underscore-prefixed unused arguments in ESLint config 2023-01-24 19:26:08 +01:00
2e5bcd4e81
Other: Move "use strict"; before ESLint config comment everywhere 2023-01-24 19:24:14 +01:00
17d7bd23b4
Other: Set ecmaVersion to 2022 for ESLint to sup. priv. class feat. 2023-01-24 19:12:38 +01:00
7c96867182
Other: Upgrade ESLint to new major version and run npm update 2023-01-24 19:00:48 +01:00
268b9b5c5e
Other: Run npm update 2023-01-24 18:42:34 +01:00
d7ec1156e2
Refactor: Setup and handle all of DND scroll. in #setupDNDScroll func.
Also handle drag events in this function so connecting to "drag-end" in
widgets with "GtkDragSource" and a `globalThis` `ScrollManager` instance
aren't needed.
2023-01-24 18:33:15 +01:00
398793d1a0
Refactor: Simplify box order save code in PrefsBOLEmptyPlaceholder
Do this by simply using the `saveBoxOrderToSettings` method of
`PrefsBoxOrderListBox`.
2023-01-22 21:18:58 +01:00
f7309e7f65
Refactor: Simplify PrefsPage UI file and get rid of InternalChildren 2023-01-22 21:12:05 +01:00
503fdcb90d
Refactor: Build Menu in UI file 2023-01-22 21:02:58 +01:00
e07411f9fd
Refactor: Use private instance methods instead of prefixing with _ 2023-01-22 20:35:13 +01:00
cc118d7796
Refactor: Remove empty constructor 2023-01-22 20:27:57 +01:00
596c8d3cdc
Refactor: Setup Drag Source and Drop Targets in UI files 2023-01-22 20:06:02 +01:00
5362629f94
Refactor: Add PrefsBoxOrderListBoxes via UI file a. let them self-init
Add the `PrefsBoxOrderListBox`es to the `PrefsPage` via the
`PrefsPage`es UI file.
Also let the `PrefsBoxOrderListBox`es initialize themselves based on the
given box order.
2023-01-22 19:28:55 +01:00
c54e24c151
Refactor: Add ScrollManager instance to globalThis
Do this so that we don't have to pass the `ScrollManager` instance to
each `PrefsBoxOrderItemRow` instance. This is useful for future
refactors.
2023-01-22 19:28:49 +01:00
34ba8a58cd
Refactor: Add settings to globalThis
Do this so that we don't have to get them in each class individually.
2023-01-22 15:48:35 +01:00
2f9f4d1a3f
Refactor: Use constructor instead of _init 2023-01-22 15:16:56 +01:00
cda099be24
Refactor: Move PrefsPage class into own file (PrefsPage.js) 2023-01-22 15:10:43 +01:00
7ed9329f2d
Refactor: Move UI files and gschema file to more standard locations 2023-01-22 14:59:40 +01:00
ddd0297868
Build: Use gnome-extensions pack for creating extension zip/bundle 2023-01-15 23:35:36 +01:00
d383908d5f
Other: Remove license notice, since its unnecessary and annoying 2023-01-04 23:57:21 +01:00
3299686041
Update: Show drag icon when reordering PrefsBoxOrderItemRows using DND
The following code from GNOME/gnome-control-center was used as a
reference to make this code work:
- ab7d752de9/panels/search/cc-search-panel-row.c (L96)
- ab7d752de9/panels/search/cc-search-panel-row.c (L84)
2022-10-24 01:07:24 +02:00
249f3554d5
Breaking: Make preferences usable again and support Gnome Shell 42
Make the preferences usable again (and look good) by using an
`AdwPreferencesPage` as well as various other libadwaita features (like
`AdwPreferencesGroup`, style classes, ...).
Also get rid of some code, which now doesn't seem to be necessary
anymore (making sure no horizontal scrollbar shows and setting a default
size for the preferences window).

This change is marked as "Breaking", since I assume `AdwPreferencesPage`
doesn't work in Gnome Shell 40 and because I changed the supported Gnome
Shell version to 42 accordingly.
2022-10-23 22:10:36 +02:00