143 Commits

Author SHA1 Message Date
June
114e1335d1
refactor: remove unneces. check for empty array in #getResolvedBoxOrder
Remove unnecessary check for empty array in #getResolvedBoxOrder as
nothing happens when the array is empty anyway.
2025-06-12 01:30:43 +02:00
June
1e87992081
refactor: directly create set of indicator cont. in getValidBoxOrder
Skip the unecessary intermediate variable and directly create a set.
Also remove the "ToDo: simplify" comment as I don't see how this logic
can be simplified more really.
2025-06-12 01:26:44 +02:00
June
5a09b1a2c8
refactor: switch to TypeScript
Aside from introducing a bunch of type annotations and other code
adjustments, also add explicit type checking where necessary.

Inline #associateItem into the constructor in PrefsBoxOrderItemRow as
the method sets this.item and:
> Note that the field needs to be initialized in the constructor itself.
> TypeScript does not analyze methods you invoke from the constructor to
> detect initializations, because a derived class might override those
> methods and fail to initialize the members.
https://www.typescriptlang.org/docs/handbook/2/classes.html

Explicitly ensure we actually have a Gdk.Drag in #setupDNDScroll in
PrefsPage and explicitly only scroll when a DND operation is properly
set up. Even tho previously not having a Gdk.Drag in #setupDNDScroll
would probably just error out the callback and probably be just fine
then, handling this explicitly is at least nicer.

Also see the guide on using TypeScript for GNOME Shell Extensions, which
was followed for this work to some degree:
https://gjs.guide/extensions/development/typescript.html
2025-06-12 00:56:10 +02:00
June
ff75debabc
fix: have onDrop handler methods correctly return booleans
Have the onDrop methods, used as handlers for Gtk.DropTarget drop
signals, return booleans as required by Gtk.DropTarget.
https://docs.gtk.org/gtk4/signal.DropTarget.drop.html
This change doesn't seem to have a practical impact, but its good to
follow the API correctly anyway.
2025-06-11 00:55:10 +02:00
June
979e770057
update: properly handle top bar items of Task Up UltraLite extension
Since the Task Up UltraLite extension creates a bunch of top bar items
as part of its functionality, the Top Bar Organizer settings would get
spammed with items, making them hard to navigate and making it
practically impossible to manage the top bar items of the Task Up
UltraLite extension itself. Therefore introduce functionality for
properly handling the Task Up UltraLite top bar items, by grouping them
internally and just exposing a single Top Bar Organizer settings item
for all the Task Up UltraLite items, which then allows to manage the
Task Up UltraLite top bar items nicely.

This fixes #25:
https://gitlab.gnome.org/june/top-bar-organizer/-/issues/25

Task Up UltraLite extension:
https://extensions.gnome.org/extension/7700/task-up-ultralite/
2025-06-10 03:54:30 +02:00
June
185a48c857
fix: use row title to make settings window not break for long item names
Use the title of the PrefsBoxOrderItemRow (AdwActionRow) for the item
name instead of a label in the prefix. Aside from generally being more
correct, item names now wrap correctly, avoiding the settings window
breaking (being cut off by default to the right with even the close
button not showing, until resizing) with long item names.
2025-06-09 19:53:12 +02:00
June
a58ddc6146
other: add GNOME 48.2 panel source code file to .eslintignore 2025-06-09 18:33:10 +02:00
June
b17a805035
other: bump version to 13 v13 2025-06-09 00:24:02 +02:00
June
9c847c0988
feature: support GNOME Shell version 48
Checked the source of 48.2 and tested in Fedora 42 and there don't seem
to be any changes relevant to the functionality of this extension.
2025-06-09 00:22:48 +02:00
June
57e7fc51ea
docs: add newer, cut down and commented panel.js from GNOME Shell 48.2 2025-06-08 20:57:58 +02:00
June
f619ce4fa7
feature: make it possible to (forcefully) hide or show top bar items
This is only the core extension logic for now, settings UI still needs
to follow.
The logic only acts on the indicator container, not the indicator
itself, meaning that e.g. a screen recording indicator, which is hidden
on the indicator level, can be forcefully hidden, but not forcefully
shown. Because of that and because forcefully hiding it breaks controls
for screen recording, a potential settings implementation should exclude
visiblity controls for some elements like e.g. the screen recording
indicator.
2024-09-27 03:24:47 +02:00
June
80f394d2d4
refactor: move logic for loading and saving box orders to priv. methods
Move logic for loading and saving box orders from/to settings to private
methods to have more readable code.
2024-09-26 02:52:15 +02:00
June
cc088f443c
refactor: clearly dist. betw. an items role and the id used in settings
Clearly distinguish between an items role, which is present in GNOME
Shells top bar, call that a role, and the thing that is stored in the
settings for an item, call that an items settings identifier.
Refactor the code with these new names in mind to make it clearer.
Also make the comments clearer.
And finally simplify the code handling AppIndicator items by simply
using the items settings identifier as the key in the roles map and with
that getting rid of the confusing concept of a placeholder role, which
is only relevant for the box order stored in settings. Just declaring it
as an items settings identifier, which it is, is much clearer.
2024-09-26 02:23:28 +02:00
June
23baa41225
other: bump version to 12 v12 2024-09-12 22:56:02 +02:00
June
07355dcf19
feature: support GNOME Shell version 47
Checked the source of 47.rc and tested in GNOME OS and there don't seem
to be any changes relevant to the functionality of this extension.
2024-09-12 22:55:05 +02:00
June
62fd014146
docs: add newer, cut down and commented panel.js from GNOME Shell 47.rc 2024-09-12 21:44:26 +02:00
June
b762d6db22
docs: fix description of release-ZIP upload process
The release-ZIP needs to be uploaded in the release notes section, not
in the release assets section (as that's apparently not possible).
2024-09-11 04:09:29 +02:00
June
b358d2046d
other: bump version to 11 v11 2024-09-11 03:58:32 +02:00
June
ea3942057f
docs: enhance the git annotated tag and release notes templates
- Give them a better general structure by having a "Relevant and/or
  Breaking Changes" and an "Other Changes" section.
- Use more minimal markup in the git annotated tag template as that
  works better for annotated tags.
- Use nicer and more useful placeholder values.
- Get rid of unnecessary descriptions.
2024-09-11 03:58:32 +02:00
June
8fb92d1bb1
docs: exp. docs on creat. a new tag to cover how to create a new release
Also generally fix up the docs and the git_annotated_tag_template a bit,
make the tag template not include the shortlog anymore (as that doesn't
make that much sense) and also provide a release_notes_template.md.
2024-09-11 03:40:01 +02:00
June
1870a9510a
other: update my name 2024-09-11 03:16:46 +02:00
June
e04ac8a3ee
feature: support GNOME Shell version 46
There don't seem to be any changes relevant to the functionality of this
extension.
2024-09-11 03:02:02 +02:00
June
d88034f345
docs: add newer, cut down and commented panel.js from GNOME Shell 46.4 2024-09-11 02:51:20 +02:00
June
e374ad85b1
other: change commit msg format to use lowercase tags and desc. start 2024-09-11 02:51:20 +02:00
126ebfa9db
Other: Bump version to 10 v10 2023-10-05 15:21:39 +02:00
c25f24b72f
Other: Make ESLint ignore unused import 2023-10-05 15:06:47 +02:00
7f86e92e85
Refactor: Clean up unused import 2023-10-05 14:59:46 +02:00
b98f047d22
Other: Add new version 45 panel source code to .eslintignore 2023-10-05 14:58:16 +02:00
d903274d73
Other: Require trailing commas for multiline for most
Require trailing commas for multiline for arrays, objects, imports and
exports and disallow trailing commas for functions.
Do this by updating the ESLint config and fixing new complaints.

The reason for this change are the resulting future cleaner version
diffs.

Also see:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Trailing_commas
https://eslint.org/docs/latest/rules/comma-dangle
2023-10-05 14:50:36 +02:00
88e510d54e
Other: Upgrade ESLint to latest version and run npm update 2023-10-05 14:18:11 +02:00
5ea8f4aabe
Refactor: Move GObject.registerClass calls into static init. blocks
Do that since it standardizes the code and also is just cleaner.
2023-10-04 03:58:21 +02:00
a77c6d2f2b
Refactor: Install forget action using install_action as well 2023-10-04 03:58:10 +02:00
9b7ab0614c
Feature: Add move up and down buttons to make the prefs keyboard access.
Don't use CONSTRUCT_ONLY anymore to be able to use private properties
(or any properties at all it seems).
2023-10-04 03:57:42 +02:00
a1188d5684
Breaking: Migrate extension to the new ESM system of GNOME 45
Migrate with the help of, among others, the following resources:
https://blogs.gnome.org/shell-dev/2023/09/02/extensions-in-gnome-45/
https://gjs.guide/extensions/upgrading/gnome-shell-45.html

Only support GNOME Shell version 45, since only 45 is compatible with
the new ESM system.

Since panel._originalAddToPanelBox is no longer valid, just overwrite
using the prototype on disable.

Add "sourceType": "module" to eslintrc.yml to get rid of:
"Parsing error: 'import' and 'export' may appear only with 'sourceType:
module'"
See here:
https://eslint.org/docs/latest/use/configure/language-options#specifying-parser-options
2023-10-04 03:57:35 +02:00
62e9609b2d
Docs: Add newer, cut down and commented panel.js from GNOME Shell 45.0 2023-09-26 23:25:06 +02:00
5d0aec5438
Docs: Mention community-maintained AUR package in README 2023-05-12 17:47:23 +02:00
ed10e7a14b
Other: Bump version to 9 v9 2023-04-21 00:56:12 +02:00
0b3aff665a
Fix: Move provider add. to more correct place and remove prov. on dest.
See here for the relevant review:
https://extensions.gnome.org/review/40563
2023-04-21 00:46:59 +02:00
bf598f2a15
Other: Bump version to 8 v8 2023-04-20 23:19:02 +02:00
51a89aec60
Feature: Support GNOME version 44 2023-04-20 23:17:06 +02:00
5c8523322b
Update: Improve drag handle styling by using GNOME Settings style
This also finally makes the style `<class name="drag-handle"/>` in
`prefs-box-order-item-row.ui` actually do something.
2023-04-20 12:33:30 +02:00
fa379607ee
Other: Bump version to 7 v7 2023-02-07 12:52:03 +01:00
470ebf761d
Fix: Keep hidden items hidden 2023-02-07 12:52:03 +01:00
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