Commit Graph

1005 Commits

Author SHA1 Message Date
Evan Welsh
0705c7a4eb js: Fix linting errors from line shifts
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2794>
2023-06-21 04:50:33 -07:00
Evan Welsh
1e9b906cbc js: Split gi imports to be on new lines to prepare for ES modules
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2794>
2023-06-21 04:50:33 -07:00
Sam Hewitt
eacabbf443 panel: Stylesheet updates and minor improvements for panel buttons
- spin out all the panel button styling into a drawing mixin
- clean up the styles generally
- make special cases for the clock and non-flat buttons
- contrast fixes for non-flat buttons, fixes #6768
- new stop icon for the screen recording/cast indicators

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2804>
2023-06-21 10:28:13 +00:00
Florian Müllner
dec26b7da2 backgroundApps: Allow activating apps
Now that we track apps instead of instances, we can make the menu
items activatable, because the corresponding action is no longer
app specific (like activating a particular tab): We can simply
activate the app, which hopefully will bring it to the foreground
again.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2790>
2023-06-06 17:16:32 +00:00
Florian Müllner
6cf0df5fb9 backgroundApps: Track apps instead of instances
The background apps menu currently tracks instances rather than
apps. That matches the behavior of `flatpak ps` and can be useful,
for example when one particular instance runs out of control.

But as we don't include any information that allows to actually
distinguish between instances, multiple instances appear simply
as duplicated app entries.

Given that a menu is too limited for detailed information, stop
representing individual instances, and track apps instead.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6654

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2790>
2023-06-06 17:16:32 +00:00
maniacx
a0fde0eed5 popupMenu: Replace ornament unicode with icons
Ported from Sam Hewett's Merge-Request.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2308#8714a3530d73823716c0f8334aceaabeaccd01b7

The CHECK ornament used in powerprofile and volume control is not very
pleasant looking, specially if system font is changed.
Replace CHECK and DOT unicode ornament with revelant icons in popupMenu.

Solves issue: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6055

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2767>
2023-05-17 17:41:10 +00:00
Florian Müllner
9711a918e7 status/bluetooth: Use 'Alias' for item labels
Unlike 'Name', the 'Alias' property can be changed by the user,
so it's more suitable for user-visible labels.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6626

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2751>
2023-04-25 14:16:42 +00:00
Florian Müllner
2815f33458 status/backgroundApps: Show spinner when closing
It can take a little while for an app to quit after the user
clicked the close button, and another for the portal to pick
up the change.

In order to provide feedback to the user that the request is
being handled, replace the close button with a spinner.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6441

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2732>
2023-04-25 09:39:52 +00:00
Florian Müllner
b8dcf85cc8 status/volume: Ignore capitalization for headphone detection
When we can't detect a headphone by form factor, we do a string
match on the port name. A match on 'Headphone' isn't less likely
to be valid than a match on 'headphone', so make sure we ignore
capitalization.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2691>
2023-04-21 18:53:00 +00:00
Automeris naranja
63d18f3ee9 powerProfiles: Rename "Power Profiles" to "Power Mode"
This changes renames the power profiles submenu title to "Power Mode",
making it consistent with the toggle title.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2697>
2023-04-04 22:09:13 +00:00
Lukáš Tyrychtr
de900af7d5 status/network: Improve a11y of wireless network items
This MR does the following:
* Allows a screen reader user to determine the currently connected network
* Allwos a screen reader to read the security status and signal strength

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2724>
2023-04-04 17:19:55 +00:00
Lukáš Tyrychtr
95c0a88fe7 status/network: Fix a11y names for VPN connection menu items
Because of an omission, the VPN menu items never got its a11y name,
so a screen reader was reporting that item only as a plain item without
any label.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2720>
2023-03-27 17:01:40 +00:00
Georges Basile Stavracas Neto
9e19f27e45 status/network: Generalize code to hide subtitle
Commit 9d75d777c7 introduced code to hide the subtitle of the
quick setting toggle when it matches the title of the toggle.
That's because NetworkManager tries to make the network names
more palatable on its own, and reports that the name of single
wired networks is "Wired" even if it may have another name.

What that commit failed to account for, however, is that there are
other circumstances where we end up with a subtitle is exactly the
same of the title. For example, when turning off Wi-Fi or mobile
broadband connections.

The behaviour of commit 9d75d777c7 is safe enough to be applied
on other device-backed connections, so do it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2682>
2023-03-21 20:52:31 +00:00
Will Thompson
ab0c795e81 status/location: Handle geoclue not being activatable
In GNOME OS, due to a misconfiguration, geoclue was configured without
systemd support. In that configuration, geoclue does not install its
systemd .service file (geoclue.service) but it (incorrectly) includes
the following line in its D-Bus service file:

    SystemdService=geoclue.service

As a result, when dbus-daemon tried to activate it at gnome-shell's
request, it would fail with:

    Unit geoclue.service not found

Then, GeoclueAgent._onGeoclueVanished() would be called, as the
name_vanished_handler passed to Gio.bus_watch_name(). This is consistent
with Gio.bus_watch_name()'s documentation:

> You are guaranteed that one of the handlers will be invoked after
> calling this function.

But that function assumed that this._managerProxy is defined, leading
to:

    JS ERROR: TypeError: this._managerProxy is undefined
    _onGeoclueVanished@resource:///org/gnome/shell/ui/status/location.js:163:9

Fix this by checking for nullishness of this._managerProxy. (Strictly
speaking, it's undefined rather than being null, but other code in this
file already uses the vaguer '!= null' test, which considers undefined
to be null.)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2689>
2023-03-19 12:46:50 +00:00
Sebastian Keller
e258cff264 status/bluetooth: Fix bluetooth placeholder text alignment
The padding specified for .bt-menu-placeholder was overridden by the
more specific.popup-menu-item:ltr/rtl padding. Also the ornament, was
still taking up space, as well as the spacing between the ornament and
the text.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6434
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2687>
2023-03-19 12:32:55 +00:00
Florian Müllner
83e7f94513 status/backgroundApps: Add section title
At least for the time being, the background portal's app monitor
only supports flatpak apps, which are the only apps where we can
reliably match processes to .desktop files and assume that they
belong to graphical apps.

To indicate that there may well be apps that don't appear in the
list despite running in the background, add a clarifying section
title.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6400

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2681>
2023-03-19 12:06:06 +00:00
Florian Müllner
7fdf9b8a06 Revert "status/backgroundApps: Add section title"
Unfortunately we did not get approval for the string freeze
request, so we have to bail out of the change again.

This reverts commit d6c4039f75.
2023-03-06 18:36:53 +01:00
Florian Müllner
d6c4039f75 status/backgroundApps: Add section title
At least for the time being, the background portal's app monitor
only supports flatpak apps, which are the only apps where we can
reliably match processes to .desktop files and assume that they
belong to graphical apps.

To indicate that there may well be apps that don't appear in the
list despite running in the background, add a clarifying section
title.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6400

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2660>
2023-03-03 23:06:42 +00:00
Florian Müllner
732d0980d8 status/bluetooth: Ignore devices when turned off
gnome-bluetooth clears the list of devices when the adapter goes
away, but we cannot assume that that'll happen when powered down.

We don't want to show a (potentially outdated) list of devices
that cannot be interacted with in that case, so explicitly check
for the active state when returning devices.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2658>
2023-02-24 15:46:45 +00:00
DaPigGuy
ec50381f5c status/system: Fix missing battery percentage in the top bar
The percentage label text was bound to the 'label' property, which was
renamed to 'title' in GNOME 44 with the quick settings changes. This
was missed.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2657>
2023-02-22 13:21:15 -08:00
Sebastian Keller
feb1c57dde status/network: Fix WirelessNetwork related leaks
NetworkManager frequently refreshes the list of available access points.
For some reason this often ends up removing some or all access points
only to add them back in a later refresh later. With the exception of
the currently connected access point, which is never removed.

When all access points of a WirelessNetwork have been removed, it gets
destroyed by NMWirelessDeviceItem::_removeAccessPoint(). This however
does not happen for the currently connected network due to the always
present access point. If this network now happens to consist of multiple
access points, the "unused" NMAccessPoints will get removed and added
in these refreshes, without the WirelessNetwork getting destroyed.

Whenever such an unused access point is added, due to the use of signal
tracking this leaks the NMAccessPoint and SignalTracker until the
WirelessNetwork is destroyed.

However when the NMWirelessDeviceItem is destroyed, for example due to
suspending, it stops tracking access point changes, ensuring that the
condition for the WirelessNetwork being destroyed can not occur anymore.

Even with just two access points, such as can be found in 2.4GHz+5GHz
home routers this issue leaks hundreds of NMAccessPoints and
SignalTrackers per day. As well as a small number of WirelessNetworks
which are also kept alive by the SignalTrackers.

To fix this disconnect from the access point when it gets removed and
destroy all remaining networks when the NMWirelessDeviceItem is
destroyed.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2652>
2023-02-18 21:34:56 +00:00
Florian Müllner
7e23875bc4 status/volume: Unmute to default volume when at 0
The stream can be muted by clicking the icon, or by dragging the
slider to 0. In the latter case, clicking the icon to unmute the
stream will not do anything (at least apparently).

Settings addresses this in its Sound panel by using a default
volume of 25% in that case, so do the same in the Shell.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6393

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2644>
2023-02-14 21:28:44 +00:00
Georges Basile Stavracas Neto
7604dd1103 quickSettings: Add background apps menu
Sandboxed apps that run without a window are detected by the new
background monitoring service, introduced by xdg-desktop-portal.

We have an opportunity to improve the predictability of the desktop
and ensure that application state in transparently reported to users
by showing these apps, and allowing them to closed.

Add a new background apps menu to the quick settings, that is always
added at the bottom of the popover, and has a slightly custom, flat
style applied to it.

Show background-running apps in this menu, and allow closing them
by first attempting to execute the 'quit' action through D-Bus, and
if that fails, sending SIGKILL to the process.

See https://gitlab.gnome.org/Teams/Design/os-mockups/-/issues/191

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2624>
2023-02-12 16:16:36 +00:00
Florian Müllner
600b921246 status/bluetooth: Add device menu
The new quick toggle gives us a good place for exposing connected
and connectable devices. This was part of the original mockups,
but didn't make the cut for GNOME 43 due to time constraints.

https://gitlab.gnome.org/Teams/Design/os-mockups/-/issues/178

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2501>
2023-02-11 20:44:07 +00:00
Florian Müllner
b7c3a7f6ed status/bluetooth: Show connected devices in subtitle
Now that quick toggles support subtitles, use it to indicate connected
devices.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2501>
2023-02-11 20:44:07 +00:00
Florian Müllner
10b5808f25 status/volume: Mute/unmute when clicking icon
This behavior was lost with the move to quick settings. Now that
we allow slider icons to be interactive, we can easily restore
the feature (and even in a less-Easter-eggy way)

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5974

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2630>
2023-02-10 16:27:28 +00:00
Florian Müllner
2aa30f5a96 status/volume: Use same icon for slider/top bar
Currently the icon in the top bar indicates the volume level, while
the icon next to the slider indicates the type of output (speaker
or headphone). The speaker- and volume icons are quite similar,
but different enough to feel inconsistent, so use the volume one
in both cases.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5940

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2505>
2023-02-09 19:34:55 +00:00
Florian Müllner
b286a8f55e status/network: Tweak connection items
Always use the plain name as label, and indicate the "(dis)connect"
action in a subtitle.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2631>
2023-02-09 17:42:09 +00:00
two
6cd39f829f status/system: Use a better icon in screenshot button
The screenshot button could be mistaken for one that opens a
program for taking photos and videos. Change it to one that
is less ambiguous.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5993

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2553>
2023-02-09 17:26:25 +01:00
sunflowerskater
f1c75c28fb a11y menu: Add "All Accessibility Settings" entry
Unlike other top bar menus, the accessibility menu doesn't provide
quick access to the corresponding settings. It's still useful, given
that not all settings are exposed in the menu, so add a settings entry.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6058

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2615>
2023-02-07 14:59:58 +00:00
Georges Basile Stavracas Neto
9d75d777c7 status/network: Only show custom wired names
Thanks to NetworkManager's connection name disambiguation, it's
pretty common for single wired connections to be named "Wired". This
is fine and what we want almost all times, but in the specific case
of quick settings, we already have a "Wired" string set as title of
the quick settings toggle, so having that as subtitle is reduntant.

Hide the subtitle label (by returning null) when the subtitle of
a wired network matches the title.

Fixes ab10b95d2d
Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6369

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2627>
2023-02-06 08:22:48 -03:00
Georges Basile Stavracas Neto
2d4521be3b status/network: Title mobile connections as "Mobile"
As per the latest mockups, modem network connections are labeled
"Mobile". Override _getDefaultName in NMModemToggle and always
return "Mobile" as title.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2619>
2023-02-04 20:34:11 -03:00
Georges Basile Stavracas Neto
e0408faf71 status/network: Title bluetooth connections as "Tether"
As per the latest mockups, Bluetooth network connections are simply
labeled "Tether". Override _getDefaultName in NMBluetoothToggle
and always return "Tether" as title.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2619>
2023-02-04 20:31:58 -03:00
Georges Basile Stavracas Neto
01a89bc29a status/network: Improve network toggle subtitles
If there is a single connection for a given NMToggle subclass,
use the connection name; otherwise, transform that into '%d
connected'. This is better than the current "Device (counter)"
template, e.g. "VPN (2)", which would give us a quick toggle
with:

   VPN
   VPN (2)

Change that to e.g.:

  VPN
  2 connected

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2619>
2023-02-04 18:10:22 -03:00
Georges Basile Stavracas Neto
707ce2955b status/network: Set default name for toggle title
Following the previous commits where we left the quick toggle title
open for the new title scheme, set the titles for all network pills
to what currently is the "default" name.

That means, we pull the device name from Network Manager for devices,
through the disambiguate function, and hardcode 'VPN' for VPN
connections.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2619>
2023-02-04 18:09:44 -03:00
Georges Basile Stavracas Neto
ab10b95d2d status/network: Bind subtitle
Instead of map the currently active items - for whatever they are -
into the quick toggle title, bind it to the subtitle.

This leaves room for setting static titles for device-backed
networks, such as Wi-Fi, Wired, Bluetooth, etc.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2619>
2023-02-04 17:46:54 -03:00
Georges Basile Stavracas Neto
ec397cf604 status/powerProfiles: Set profile name as subtitle
Just like with network names, set the name of the power profile as
the subtitle of the quick settings pill. This allows more of the
power profile name to be visible, and reduces chances of ellipsing
the name.

Rename the 'title' variable to 'name', to be more semantic and
better represent what it is now.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5770
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2619>
2023-02-04 14:50:36 -03:00
Georges Basile Stavracas Neto
2d2172da32 quickSettings: Rename 'label' property to 'title'
We'll soon add a subtitle, so rename the label property to something
that is a bit more semantic.Add a warning when trying to set the old
'label' property.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2619>
2023-02-04 14:50:36 -03:00
Florian Müllner
3de828cc60 Revert "status/volume: Clear device menus when unsetting stream"
Device additions/removals are tracked by GvcMixerControl, which
doesn't change when unsetting the stream. So clearing the menu
manually was a workaround, not a fix.

It's also worth noting that I failed to reproduce the original
issue again, so it's possible that we were working around a
pipewire bug that has since been fixed.

This reverts commit 1b62b7ea0a.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2616>
2023-01-27 12:53:33 +00:00
Heiko Hösch
35e2ac7a2a status/network: Work around xgettext ignoring translated strings
xgettext quits parsing, when the "<"-operator follows the "++"-operator
directly.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5820
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2613>
2023-01-24 18:20:35 +00:00
sunflowerskater
1c1b3e5e6e quickSettings: Add separator before the "Power Settings" entry
There is no separator before the "Power Settings" entry in the "Power Profiles" menu,
unlike all other quick settings menus.

Add that separator for consistency.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2559#note_1641102

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2602>
2023-01-13 21:29:38 -03:00
sunflowerskater
37c0906755 quickSettings: Add a "Power Settings" entry to the Power Profiles submenu
This change adds the shortcut so it can be accessible by devices without a battery and to keep consistency with other submenus like the Wi-Fi submenu and the upcoming Bluetooth submenu (Teams/Design/os-mockups#178).

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6111

Part of <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2559>

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2559>
2023-01-13 18:16:29 +00:00
sunflowerskater
ed364e4e41 keyboard: Add "Keyboard Settings" menu entry
The keyboard popover doesn't have a shortcut to open the Keyboard panel from the Settings app.

This commit adds this menu entry to improve usability.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2600>
2023-01-13 16:05:25 +00:00
Jonas Ådahl
8d68bdaaa1 js: Queue 'later' via MetaLaters
This replaces the meta_later_add() API which used now removed global
singletons under the hood.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2557>
2022-12-16 22:12:59 +01:00
Carlos Garnacho
2e8e1fe8fc status/keyboard: Ignore purpose hint changes while keymap switcher is shown
If we are getting purpose hint changes while the language switcher is popped
up, this likely means the purpose hint was actually triggered by the key
focus change induced by the language switcher popping up.

In this case, we on one hand would like to preserve the state that applied
before thise focus change, and on the other we very much want to avoid the
keymap change that would forget about the keys being pressed.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6066
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2534>
2022-12-05 14:50:33 +00:00
Florian Müllner
1b62b7ea0a status/volume: Clear device menus when unsetting stream
Otherwise we end up accumulating devices when pipewire crashes or
is restarted.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6142

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2558>
2022-11-28 00:00:21 +00:00
Florian Müllner
d0740d605e status/remoteAccess: Don't override existing style classes
The indicator needs special styling for the color, but we still
want it to pick shared 'system-status-icon' styling like the
icon size.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6008

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2547>
2022-11-18 18:50:43 +01:00
Florian Müllner
14f061ffab status/network: Fix handling portal result
Commit 637ee7386e accidentally dropped all parameters from the
method invocation when changing a .bind() handler to an arrow
function.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2545>
2022-11-17 22:05:52 +01:00
Florian Müllner
b2ff25b31d status/network: Fix name of initially hidden devices
We assign (disambiguated) device names every time a device is added
or removed, and store the name on the corresponding menu item.

However menu items are only created when the device should be shown,
not necessarily when it is added (unplugged ethernet cable, ongoing
initialization, ...).

Fix this by tracking device names separately from device items, and
set the name on newly created items.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6040

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2529>
2022-11-17 11:09:27 +00:00
Cassidy James Blaede
092a069214 darkMode: Update string to "Dark Style"
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2499>
2022-11-04 14:31:29 +00:00