Support the new `banner-message-path` and `banner-message-source`
settings, which allows loading the banner message from a path
instead of GSettings. This is mainly useful for `/etc/motd` and
similar mechanisms, to show the same message for both graphical
and non-graphical logins.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3558>
Our D-Bus services don't make sense outside a GNOME session, so
they shut down automatically when gnome-shell is not on the bus.
However this does not only apply when activating a service from
a non-GNOME session, but also when restarting gnome-shell on Xorg.
This is particularly problematic for services that shut down
automatically, as they lose all tracking state, even when
re-activated.
Address this by queuing a shutdown check instead of shutting down
immediately, so that the service can pick up the new shell name
provided it appears before the timeout (i.e. two seconds).
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7843
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3463>
The service implementation already has to resolve the shell's
unique name to exclude it from sender tracking.
It can just as well take care of watching the shell D-Bus name,
which simplifies the code and will allow for more flexibility
when handling the shell disappearing from the bus.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3463>
Section visibility has become less complex when moving events
out of the message list. We no longer need different behavior
in different sections, so we can instead control the visibility
of the entire list in a single place.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3429>
The `Notification` object is destroyed before the `Message` widget so
during the removal animation the user still could click on the `Message`
and activate the notification. This ensures we don't warn about it.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3429>
And change the `close` signal on `Message` to run the default handler
last, which allows other signal handers to stop the signal emission
chain.
This change shouldn't have much effect on existing code but will be
needed for by-source notification grouping.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3429>
Since we have now the `notification-removed` signal on
`MessageTray.Source` we can use it instead of connecting to the
`destroy()` signal for each single notification in the
`MessageListSection`.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3429>
The widgets `NotificationMessage` and `NotificationSection` in `calendar.js`
aren't used only by the calendar.
Move the two widget to messageList.js since once we add by-source grouping for
messages (which will happen in a future commit) we need a much tighter
coupling between them and the rest of the MessageList. In future the
`NotificationSection` will need to be removed to make expanding of
groups work.
This also removes a circular import of files: `calender.js` imports
`messageTray.js` and it imports `calender.js`.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3429>
The following happens when processing an `@import()` rule:
1. `_st_theme_resolve_url()` to resolve file
2. `insert_stylesheet()` to track file/sheet
a. take ownership of file/sheet (ref)
b. use file as key in `stylesheets_by_file` hash table
c. use file as value in `files_by_stylesheet` hash table
3. release reference to file
This leads to a refcount error when importing a file that
was already parsed before:
1. file start with refcount 1
2. `insert_stylesheet()`
a. increases refcount to 2
b. inserting into `stylesheets_by_file` *decreases* the
passed-in key if the key already exists
c. `files_by_stylesheet` now tracks a file with recount 1
3. releases the last reference to file
The file object tracked in `files_by_stylesheet` is now invalid,
and accessing it results in a crash.
Avoid this issue by reusing existing stylesheets, so we don't insert
a stylesheet that's already tracked.
As a side-effect, this also saves us from re-parsing the same file
unnecessarily.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7306
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3619>
Since commit eeddf49371, the menu button in toggles is separated
by an actual widget rather than just CSS borders.
However the menu button can be hidden, in which case the menu toggle
acts as a regular quick toggle. The separator shouldn't be visible
either in that case, so hide it.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8159
Fixes: eeddf49371 ("style: Improve the styles for the separation in quick setting buttons")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3621>
There are two instances where we set the deprecated `vertical`
property with a `{vertical}` shorthand that escaped previous
greps; move those to the new `orientation` property too.
Fixes: b75b4abaf0 ("js: Set BoxLayout orientation")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3618>
Since `Spinner` is no longer a subclass of `Animation`/`AnimatedIcon`,
the latter are now unused. Apparently that's not only true for
gnome-shell itself, but also extensions, so there's little reason
for keeping the former base classes around.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3612>
gjs_context_eval_module_file() is a convenience method for
- register the module (load and parse)
- evaluate the module (run)
The first can fail, but has no notion of status code; the
second will always set a valid code if provided (either as
returned by the module, or set by gjs itself).
Doing those two steps separately allows us to explicitly
handle failures to register the module, so that we can then
return the original status code from evaluating the module.
That means that if evaluating the module "fails" with a
`GJS_ERROR_SYSTEM_EXIT` error (because it was terminated
with `System.exit()`), we now return the correct status
code instead of `EXIT_FAILURE`.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3599>
The gjs API is slightly odd, in that explicit calls to `System.exit()`
are treated as errors, regardless of the passed status code.
Before addressing this, split out the module evaluation code into
a separate function to separate it from the main logic.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3599>
Unlike `StBoxLayout` which is ubiquious, `StScrollBar` is hightly unlikely
to be used outside of `StScrollView`. It therefore seems unnecessary to
deprecate the `vertical` property before removing it, so do just that.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3614>