Commit Graph

16953 Commits

Author SHA1 Message Date
Danial Behzadi
e6ca0e439e Update Persian translation 2022-08-06 23:41:23 +00:00
Alessandro Bono
32248e8226 authPrompt: Don't propagate serviceName to setMessage
There isn't always a serviceName when we set a message. Furthermore we
are passing the serviceName only to decide if we want to wiggle or not.
Pass the wiggle parameters instead. If they are missing, we don't want
to wiggle.

This fixes the following error:
JS ERROR: Exception in callback for signal: login-format-changed: Error: Wrong type number; string expected
setMessage@resource:///org/gnome/shell/gdm/authPrompt.js:542:13
_showRealmLoginHint@resource:///org/gnome/shell/gdm/loginDialog.js:931:26
_emit@resource:///org/gnome/gjs/modules/core/_signals.js:114:47
_updateLoginFormat@resource:///org/gnome/shell/gdm/realmd.js:85:18
_reloadRealm@resource:///org/gnome/shell/gdm/realmd.js:57:14
_onRealmLoaded@resource:///org/gnome/shell/gdm/realmd.js:64:14
_makeProxyWrapper/</<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:245:34

Fallout from 526f0711f1.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5547
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2404>
2022-08-06 23:30:55 +00:00
Danial Behzadi
7950f4d93e Update Persian translation 2022-08-06 22:52:02 +00:00
Florian Müllner
0fdca0d21a quickSettings: Bind menu arrow's reactivity to parent
When a QuickMenuToggle is made insensitive, then it is unexpected
that its menu can still be opened despite the appearance.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2405>
2022-08-06 21:27:15 +00:00
Quentin PAGÈS
d160804009 Update Occitan translation 2022-08-06 17:13:32 +00:00
Aleksandr Melman
4174168af3 Update Russian translation 2022-08-06 14:44:02 +00:00
Yosef Or Boczko
edf6de07ae Update Hebrew translation 2022-08-05 06:48:05 +00:00
Florian Müllner
71d503dc6e st/theme-node-transition: Guard against 0-sized offscreen box
We know beforehand that setting up the framebuffers will fail in
that case, so we can avoid cluttering the log with warnings.

(Although the warning would likely indicate a stylesheet bug)

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/289

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2326>
2022-08-04 18:12:31 +00:00
Alessandro Bono
77d0471bc4 st/settings: Connect to mouse settings
This is likely a typo.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2402>
2022-08-04 16:59:33 +00:00
Sebastian Keller
1c7eb13caf git: Always use libgnome-volume-control submodule from GNOME group
Otherwise CI will fail for anyone who does not have a fork of it in
their personal projects.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2403>
2022-08-04 18:31:16 +02:00
Alexander Shopov
9be136adc0 Update Bulgarian translation 2022-08-03 14:59:56 +00:00
Alexander Shopov
e8ac0b73bf Update Bulgarian translation 2022-08-03 14:57:29 +00:00
Florian Müllner
ce19849c09 status/power: Merge with system indicator
Now that the old system menu has been ported over, we can move
the power toggle to its intended place. The main difference to
the stand-alone toggle is that the button now uses its natural
size rather than the fixed size of regular quick items.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2393>
2022-08-03 12:41:05 +00:00
Florian Müllner
ea00da7fd7 status/system: Port to quick settings
This port is a bit messier than the previous ones, because the
existing menu section translates less directly to the new UI,
which uses a row of individual toggles for settings, lock and
shutdown.

In order to not complicate the grid layout further by supporting
rows with a different number of columns than the overall grid and
children at their natural size, create a custom, non-reactive
SystemItem item that spans an entire row, and contains the individual
toggles.

This works quite well, even with the shutdown item that uses a menu
for the various actions.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2393>
2022-08-03 12:41:05 +00:00
Florian Müllner
62c62eced0 status/volume: Port to quick settings
Thanks to the preparations and QuickSlider, this is again
straight-forward.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2393>
2022-08-03 12:41:05 +00:00
Florian Müllner
7bbd59838a status/brightness: Port to quick settings
Using QuickSlider, this is another easy port.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2393>
2022-08-03 12:41:05 +00:00
Florian Müllner
1f178e83d3 status/powerProfiles: Port to quick settings
With menu support in place, this is now a straight-forward port:
Just add the existing profiles section to a QuickToggleMenu instead
of a submenu item.

The toggle itself now switches between 'balanced' and the last used
non-default profile.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2393>
2022-08-03 12:41:05 +00:00
Florian Müllner
c2e8f41bdf quickSettings: Add QuickSlider
Between input/output volume and brightness, we have enough use
cases for a common slider QuickSettingsItem, in particular as
the items can have a menu.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2393>
2022-08-03 12:41:05 +00:00
Florian Müllner
4b9dcb3f89 quickSettings: Add QuickMenuToggle
This is a convenience subclass for a quick toggle with a menu.

The menu can be disabled dynamically and if enabled, an arrow
is displayed that allows opening the menu.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2393>
2022-08-03 12:41:05 +00:00
Florian Müllner
3ce3034fdd quickSettings: Color header icon if checked
... as requested by the design team.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2393>
2022-08-03 12:41:05 +00:00
Florian Müllner
a0436d4b48 quickSettings: Add header to QuickToggleMenu
All menus in the mockups spot a header, and as we are using a
custom menu type anyway, just add some API there.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2393>
2022-08-03 12:41:05 +00:00
Florian Müllner
e0c61f53f1 quickSettings: Add menu support to items
Now that the QuickSettingsMenu supports child menus, it is time
to add menu support to quick toggles.

Do that by introducing a QuickSettingsItem parent class with a
construct-only :has-menu property, as that will allow including
menus in items that aren't following the standard icon+label
pattern of QuickToggle (yes, we'll have some of those).

A common parent class also allows us to control the type of
menu that is created. That's important, as we need another
custom menu type to

- constrain the menu's y position to place it underneath
  the source actor

- use open/close animations taylored for this use case

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2393>
2022-08-03 12:41:05 +00:00
Florian Müllner
24e842c52e quickSettings: Support child menus in QuickSettingsMenu
This is where it gets hairy.

Some quick settings items will have an associated menu. When
opened, the main menu should grow to make room for the child
menu, as it would do if it contained the child.

At the same time, the child menu will attach to its parent, and
block all input there while it is open.

Menu-modal menus so to speak.

Implement this as follows:

 - change the QuickSettingsMenu actor to a stack that holds
   - the boxpointer (a.k.a. the actual menu)
   - an overlay actor to hold child menus

 - use constraints to bind the overlay's position and width
   to the boxpointer; the y position is offset to align the
   overlay with the grid inside the actual menu

 - add a placeholder actor to the main grid, whose height is
   bound to the overlay height; using a "clone" instead of
   the actual overlay means that layout changes are not triggered
   from outside the grid hierarchy, which would be prone to
   allocation warnings

 - update the layout manager to not allocate the placeholder as
   a regular grid child, but instead include its height in the
   space underneath the row with an open menu

 - apply a dim effect to the boxpointer when a child menu is
   open, to indicate that input is blocked

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2393>
2022-08-03 12:41:05 +00:00
Ivan Molodetskikh
83564e59b3 workspace: Port WorkspaceBackground allocate to C
WorkspaceBackground's allocate is a hot function called every frame
during overview animations. Port it to C.

While we're at it, cache the work area and the monitor geometry, which
do not need to be re-fetched on every allocation.

This reduces the average WorkspaceBackground allocation time from
0.134 ms to 0.017 ms. With four workspaces, scrolling the overview sees
an average WorkspacesView allocation time improvement from
1.104 ms to 0.678 ms.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2394>
2022-08-03 12:30:31 +00:00
Ivan Molodetskikh
1fd08e80ed Add shell_global_get_workspace_manager ()
It will be used in the subsequent commit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2394>
2022-08-03 12:30:31 +00:00
Hugo Carvalho
e3d6876f01 Update Portuguese translation 2022-08-03 09:46:32 +00:00
Yuri Chornoivan
687b2631a4 Update Ukrainian translation 2022-08-03 06:09:31 +00:00
Florian Müllner
d87950da55 style: Add generic .icon-button class
The class is meant for buttons that only contain an icon, as
found in many GTK apps.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2397>
2022-08-02 18:00:08 +00:00
Milan Crha
5c935af7d3 build: Port to gcr4
The gcr4 is going to replace gcr3. As only base functions are used,
the port to gcr4 is trivial.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2386>
2022-08-02 16:13:54 +00:00
Florian Müllner
a3a886f185 status/darkMode: Add dark mode toggle
The aggregate menu with its submenus isn't well-suited for simple
on-off actions, so we didn't expose the global color-scheme support
that was introduced last cycle.

Quick settings on the other hand are a natural fit for actions like
this, so add a corresponding toggle.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>
2022-08-02 16:05:28 +00:00
Florian Müllner
4d931c2c41 status/autoRotate: Port to quick settings
On devices where auto-rotation is supported, (un)locking the
orientation is a common enough action to not bury it in a menu.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>
2022-08-02 16:05:28 +00:00
Florian Müllner
80d1f68c77 status/power: Port to quick settings
The power indicator should not be a regular quick toggle, but
instead be part of a "system area" row at the top of the menu.

But as in the end it is still a simple button, we can do the
port to quick settings now, and move it later when the system
row is implemented.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>
2022-08-02 16:05:28 +00:00
Florian Müllner
2ebdb6e318 status/bluetooth: Port to quick settings
For now, this is another simple toggle. The icon, state and
visibility reflect what the old menu did, and the top bar
icon is still only shown when devices are currently connected.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>
2022-08-02 16:05:28 +00:00
Florian Müllner
49eaa29f22 status/rfkill: Port to quick settings
Another simple toggle. Unlike the old menu, it is always shown
if airplane mode is supported, not just while airplane mode is
active.

We still only show the top bar icon while airplane mode is on.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>
2022-08-02 16:05:28 +00:00
Florian Müllner
1459173bc9 status/nightLight: Port to quick settings
Night-light is now a simple, always visible toggle that directly
controls the underlying setting. No change to the top bar icon,
which is still only shown while night-light is active (read: at night).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>
2022-08-02 16:05:28 +00:00
Florian Müllner
0f1f5bb174 status/remoteAccess: Move to quick settings
And there goes the last icon-only indicator. From now on, some
actual work will be involved 😱️

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>
2022-08-02 16:05:28 +00:00
Florian Müllner
b8cb5c6acd status/thunderbolt: Move to quick settings
... and another icon-only indicator that can be just moved.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>
2022-08-02 16:05:28 +00:00
Florian Müllner
c9a9e1ef52 status/location: Move to quick settings
Another icon-only indicator, so another plain move.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>
2022-08-02 16:05:28 +00:00
Florian Müllner
a8142d1dc2 panel: Move unsafe-mode indicator to quick settings
As the inicator doesn't have any UI besides the top bar icon,
the move is trivial.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>
2022-08-02 16:05:28 +00:00
Florian Müllner
de989b1fe8 popupMenu: Close quick settings when activating settings action
Like the overview, the quick settings menu should be closed when
a launcher action is activated.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>
2022-08-02 16:05:28 +00:00
Florian Müllner
7834372acb panel: Add closeQuickSettings() method
Like the aggregate menu currently, the quick settings menu will
eventually contain some items that should dismiss the menu. And
as those items may appear in child menus or otherwise be nested,
a public method on a global object is more convenient than handing
the main menu down the hierarchy.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>
2022-08-02 16:05:28 +00:00
Florian Müllner
84a62cc868 panel: Add quick settings indicator
The new indicator will eventually expose all the system status
items that are currently provided by the aggregate menu, but in
a more accessible form than the current submenu-heavy menu.

Right now this just adds the new empty indicator to the top bar,
alongside the existing aggregate menu.

We can then move items over one-by-one.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>
2022-08-02 16:05:28 +00:00
Florian Müllner
f18d103f83 quickSettings: Add SystemIndicator
This serves the exact same purpose as the existing SystemIndicator
class from PanelMenu, except that it exposes a quickSettingsItems
array instead of a menu.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>
2022-08-02 16:05:28 +00:00
Florian Müllner
e5d4984c1b quickSettings: Add QuickToggle
Most quick settings items are just buttons with icon, label, and
a particular style. While that's easy enough, a dedicated class
with corresponding properties is more convenient.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>
2022-08-02 16:05:28 +00:00
Florian Müllner
47cb354e6c quickSettings: Introduce QuickSettingsMenu
The quick settings menu is a popover that arranges items in a
reflowing, homogeneous grid. Grid children may span multiple
columns, but not rows.

For now the QuickSettingsMenu that contains the grid is just a
convenience wrapper around the layout manager that does the heavy
lifting. The two will become more intertwined when we add support
for menu toggles though, so the custom menu type is unfortunately
needed.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2392>
2022-08-02 16:05:28 +00:00
Florian Müllner
9f8ab60100 ci: Bump mutter image
Mutter bumped its wayland-protocols dependency, so we need to
pull in an image that includes the new version.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2396>
2022-08-02 15:56:38 +00:00
Yuri Chornoivan
20a875ffa7 Update Ukrainian translation 2022-08-02 11:38:39 +00:00
Florian Müllner
0c68c33826 loginManager: Return objects instead of multiple booleans
Multiple booleans - both in arguments and return values - are almost
always problematic API, because people have to memorize (or more likely
look up) the meaning of each position.

Instead, return a JS object so each value has a name attached to it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2370>
2022-08-01 20:58:37 +02:00
Florian Müllner
637ee7386e js: Use async D-Bus wrappers
After porting the more complex cases - in particular those that
affect a module's API - we are left with straight-forward D-Bus
method calls that can be moved to promise-based wrappers in one
go.

For consistency, this also switches from Remote to Async where
the call result is ignored.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2344>
2022-08-01 18:51:14 +00:00
Florian Müllner
a3db909383 loginManager: Make API promise-based
The LoginManager abstraction is still mostly callback-based, not
least because the methods are thin wrappers around logind D-Bus
calls.

However as gjs' dbus wrapper now generates promised-based wrappers
as well, we can implement a proper async API just as naturally.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2344>
2022-08-01 18:51:14 +00:00