Commit Graph

8391 Commits

Author SHA1 Message Date
Andy Holmes
0a4cb82d9a extensionDownloader: Compile gsettings schemas after install
After an extension is installed, run `glib-compile-schemas` on its
`schemas` directory, if it exists.

This should avoid any endianess-related issues for extensions when
running GNOME Shell on varying architectures.

Co-authored-by: Marco Trevisan (Treviño) <mail@3v1n0.net>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2638>
2023-02-13 00:01:08 +00:00
Andy Holmes
3e3aa1f7a3 environment: Define promisify of g_query_info_async in the global scope
This is something that will be used in other places outside the
background code, so let's just define it globally without having to care
about the importing order.

Co-authored-by: Marco Trevisan (Treviño) <mail@3v1n0.net>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2638>
2023-02-13 00:01:08 +00:00
Florian Müllner
661356766b dateMenu: Use desktop action to open Evolution calendar
We include a private hidden .desktop file for evolution's calendar
component, so that we can explicitly open that component when
evolution is configured as the default calendar application.

That's because the evolution developers didn't want to ship
additional .desktop files at the time, but they have since
then included a desktop action that can be used for the same
purpose.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2479>
2023-02-12 20:14:02 +00:00
Sebastian Keller
f5d793647b overview: Skip SHOWN to SHOWN when changing from app grid to overview
Switching between the app grid and the window picker in the overview via
gestures results in _gestureEnd() getting called with endProgress !== 0
in both cases, which leads to it calling _showDone(). This then
unconditionally changes the state to SHOWN, which in this situation is
already the current state. Since the previous commit this results in a
warning, so check if we are already in the SHOWN state.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2514>
2023-02-12 16:31:04 +00:00
Sebastian Keller
a91b6439ba overview: Validate transitions of the shown state
There have been several bugs in the past that caused invalid transitions
of the `shown` state, such as going from `showing` to `showing`. These
cause consecutive emissions of the `showing` signal, which can confuse
other classes such as the search controller which connects to the stage
`key-press-event` on showing and disconnects again on `hiding`. Having
two consecutive `showing` signals will cause it to connect twice, and
only disconnect once when hiding the overview again. This will lead to
key presses getting repeated in the search until the session is
restarted. Because there is no obvious connection to how and when this
issue got triggered, this now adds some validation code that only allows
valid transitions and throws an error otherwise so we get a backtrace of
the code actually causing the problem.

This does not fix the issue(s) causing the invalid state transitions, it
only adds a way of tracking them down.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4651
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2514>
2023-02-12 16:31:04 +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
Georges Basile Stavracas Neto
055694de9d quickSettings: Remove null checks
The '_overlay' field is always set at construction to a valid actor,
so there's no need to protect against null here.

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
64962508e9 quickSettings: Fix MenuToggle clicks
With the split menu toggle, the actual clicks now happen on the
internal quick toggle, not the menu toggle as a whole where callers
expect it.

Forward the signal to fix that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2636>
2023-02-11 13:38:42 +01: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
7ee3514ddb quickSettings: Allow interactive slider icons
Before the move to quick settings, it was possible to mute the volume
by clicking to the left of the slider. In order to re-enable that
feature, allow slider icons to be interactive.

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
cf89a6d01e quickSettings: Split menu toggle
Menu toggles are currently regular toggles with an additional
arrow button. This allows for a simpler implementation, but
has downsides with regards to keyboard navigation and hover
feedback.

To make it more obvious that the two parts of the menu toggle
perform different actions, change the overall structure of the
toggle to *contain* a regular toggle and the menu button.

That way each element uses its own hover effect, and shows up
in the keynav focus chain.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2632>
2023-02-09 21:53:07 +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
4e48f94e47 layout: Add work-around for testing greeter UI in nested
Testing the greeter UI in nested has been broken for a long time
now, because the backend isn't ready yet when we try to push a
modal (via the screen shield).

As running nested is only relevant for development and testing,
working around the issue rather than fixing it properly seems
fine, so do just that and slightly delay startup when testing
the greeter UI.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2573>
2023-02-09 19:59:12 +01: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
sunflowerskater
2d00320a4b general: Rename "application" to "app"
Several places in Shell use the word "application". However,"app"
is a more common term nowadays, so update strings accordingly.

https://gitlab.gnome.org/Teams/Design/initiatives/-/issues/123
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6202

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2614>
2023-02-07 14:46:28 +00:00
Jonas Ådahl
d116256e83 main: Call init() in perf modules if it exists
This is meant to let perf tests initialize themselves earlier than they
would otherwise run.

This allows them to setup the necessary dependencies, e.g. create
test monitors or similar actions.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2623>
2023-02-06 18:10:01 +00:00
Jonas Ådahl
73e0f02b1d overviewControls: Don't hide destroyed child widget on unmap
When we unmap, the child widgets have already been destroyed, so we
shouldn't try to. To detect this, delete the references we keep to them
on destroy, and null-check the hide call.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2623>
2023-02-06 18:10:01 +00:00
Jonas Ådahl
ed2a11ba57 overviewControls: Update work area also on monitors-changed
The cached work area, which is the work area of the primary monitor,
effectively depends on two properties - the (global) work area and the
primary monitor - and we are only tracking changes to one of them. Also
track monitor changes to also cover the second case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2623>
2023-02-06 18:10:01 +00:00
Jonas Ådahl
def50c38da layout: Explicitly destroy hot corners on shutdown
This won't be handled by our existing actor destruction path as the
ripple actors are added directly to the stage and not the uiGroup.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2623>
2023-02-06 18:10:01 +00:00
Jonas Ådahl
7f7ec2a866 layout: Disconnect 'monitors-changed' handler on shutdown
Doing it ourselves in the shutdown handler in layout.js means we won't
risk reacting to monitor changes that happen after gnome-shell prepares
to shutdown and the signal handler would disconnect itself in case we
used `connectObject(..)`.

This will currently never happen, but in the future perf tests will be
able to create virtual monitors for testing purposes, and they might get
destroyed during the shutdown procedures, causing us to react to them
when we shouldn't.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2623>
2023-02-06 18:10:01 +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
Florian Müllner
f0b4dd648c workspacesView: Remove obsolete cleanup
Since commit a9f11b1f5a, we no longer set up a later on
parent-set, so there's nothing to clean up.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2626>
2023-02-04 23:54:42 +00: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
1619b8f95d quickSettings: Add 'subtitle' property
Add a subtitle label to QuickToggle, with a less prominent font.
Make the subtitle invisible when no text is present.

This new property will be used by next commits to implement quick
settings with a static title, and a changing subtitle.

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
Balló György
266a19f05c shellMountOperation: Don't read unavailable desktop file
If gnome-disk-utility is not installed on the system, its desktop file is
unavailable, so we can't get the application's name. In this case hide
the launcher button.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2621>
2023-02-02 19:33:10 +01:00
Jonas Dreßler
7d7b99e2d3 appDisplay: Simplify loading Folder apps a bit
Instead of plugging into _redisplay(), we can use _loadApps() for this.
It's actually exactly what _loadApps() is meant for...

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2348>
2023-02-01 12:56:28 +00:00
Jonas Dreßler
2566f938e6 appDisplay: Move findBestPageToAppend() behavior to IconGrid
This behavior makes more sense to have in the iconGrid itself: When a
page is filled up with items, the new item should never go to the start
of the next page, but always to next empty slot.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2348>
2023-02-01 12:56:28 +00:00
Jonas Dreßler
245137ff35 appDisplay: Fix multi-page dragging behavior in folders
Folders reflow across pages because they don't set
allow_incomplete_pages to true. This means we want the nudging of items
to happen slightly differently when dragging an item across pages:

- When dragging from lower page index to a higher one, always reflow
towards the start of the grid (because there's now an empty slot on the
old page and items on the new page will force-reflow towards that)
- When dragging from a higher page index to a lower one, we can reflow to
the end as we usually do

To archive this, factor out the selection of "reflow direction" into a
separate variable that always defaults to "end" (because empty space is
always at the end of the grid). Set it to "start" when the item created an
empty slot on the current page or (and this is new:) on a previous page in
the folder case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2348>
2023-02-01 12:56:28 +00:00
Jonas Dreßler
4cf372b890 iconGrid: Also consider left/right empty space as drop targets
Make it a bit easier to drag items to the start of pages by also taking
the left and right empty space into account, instead of considering it
an invalid target.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2348>
2023-02-01 12:56:28 +00:00
Jonas Dreßler
40bd48068f appDisplay: Consider drag events during page-switching as invalid
While there's an ongoing animation to switch pages, we should ignore all
drag events as those will end up moving the drag item to an unwanted
position.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2348>
2023-02-01 12:56:28 +00:00
Jonas Dreßler
a69d99527d appDisplay: Consider drop targets on !currentPage as invalid
The iconGrid's getDropTarget() API supports dropping items to adjacent
pages just fine, but in the AppDisplay, we clip the grid and don't show
those adjacent pages. That doesn't stop getDropTarget() from picking
drop targets which are on adjacent pages though, so we need to filter
those out in the layer above.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2348>
2023-02-01 12:56:28 +00:00
Jonas Dreßler
2e6fd8b730 iconGrid: Return page and position for drop targets instead of items
Returning a page and a position for the drop target seems more
straightforward than returning an actual grid item in getDropTarget().

With the next commit, this will allow us to throw away drop targets that
are not on the current page.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2348>
2023-02-01 12:56:28 +00:00
Jonas Dreßler
b781b3e9fd appDisplay: Get linear index using item instead of page and position
_getLinearPosition() is a function that converts a page and position
index to the "accumulated" index that includes all pages before the
page. The function is used by _addItem() and _moveItem() for getting the
new index of an item inside the _orderedItems array.

Now when passing -1 as position to _addItem() or _moveItem(), this means
the item should be appended to the page. Right now _getLinearPosition()
returns the last item index on the page when passed -1, inserting the
item into _orderedItems at this index will actually not append it, but
insert it between the second last and last item.

To fix it, let's make the whole thing more robust by explicitly passing
an item to _getLinearPosition(). This means we simply no longer have to
assume what "-1" means. Moving the call to _getLinearPosition() to
happen after addItem() and moveItem() ensures that the new item position
is used and not the old one.

This fixes issues where the _orderedItems array gets out of order when
moving or adding items.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2348>
2023-02-01 12:56:28 +00:00
Carlos Garnacho
a30661d33e windowManager: Drop grab-op-begin signal connection
This is	done just to "reset" the gesture when a grab operation
begins.	With grab ops being based on ClutterGrab now, the gesture
will be	implicitly reset when these happen. This is unnecessary	now.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2526>
2023-01-30 12:19:22 +00:00
Carlos Garnacho
a2a5d7682f swipeTracker: Drop grab-op-begin signal connection
This is	done just to "reset" the gesture when a grab operation
begins.	With grab ops being based on ClutterGrab now, the gesture
will be	implicitly reset when these happen. This is unnecessary	now.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2526>
2023-01-30 12:19:22 +00:00
Carlos Garnacho
fe8201e1d2 edgeDragAction: Drop grab-op-begin signal connection
This is done just to "reset" the gesture when a grab operation
begins. With grab ops being based on ClutterGrab now, the gesture
will be implicitly reset when these happen. This is unnecessary now.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2526>
2023-01-30 12:19:22 +00:00
Carlos Garnacho
4acc9f1a0f backgroundMenu: Drop grab-op-begin signal connection
This is done just to "reset" the click action when a grab operation
begins. With grab ops being based on ClutterGrab now, the action
will be implicitly reset when these happen. This is unnecessary now.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2526>
2023-01-30 12:19:22 +00:00
Carlos Garnacho
05de06f5c2 panel,windowMenu: Update to meta_window_begin_grab_op() API change
Add device/sequence parameters.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2526>
2023-01-30 12:19:22 +00:00
Carlos Garnacho
0e969cab91 windowMenu: Update for removal of frame_action argument
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2526>
2023-01-30 12:19:22 +00:00
Carlos Garnacho
f32ffbf19b panel: Update for removal of frame_action argument
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2526>
2023-01-30 12:19:22 +00:00