Commit Graph

16077 Commits

Author SHA1 Message Date
Sebastian Keller
fb313033ea screenShield: Don't unnecessarily close or recreate inhibitors
ScreenShield::_syncInhibitor() was closing (and recreating) the
inhibitor everytime it was called, even if no change was needed.
This gets called in various places, including on property changes in
the login1 dbus object. These happen by the time logind already started
suspending at which point new inhibitors can no longer be created. It is
only waiting for existing inhibitors to be closed, so closing the
inhibitor without a new inhibitor will cause the suspending to proceed
immediately if no other inhibitors are present. This can also happen
before the lock screen is shown, which will then complete after resume.

Fix this by keeping track of the expected inhibition state and only
create or close inhibitors if there was a change to that.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1927>
2021-08-16 00:28:52 +00:00
Luna Jernberg
4a3e3ee1b8 Update Swedish translation 2021-08-15 15:48:27 +00:00
Kukuh Syafaat
2724ecee05 Update Indonesian translation 2021-08-15 11:58:14 +00:00
Florian Müllner
1deb13e1aa extensionUtils: Add gettext convenience helpers
We have initTranslations() for binding an extension's
gettext domain, but nothing to help with using gettext
from an extension.

Such help would be useful though, as an extension that
calls textdomain() like a normal application would
inadvertently changes the default domain for the whole
gnome-shell process.

Instead, extensions have to use domain-specific versions
of the gettext functions:

```js
const Gettext = imports.gettext.domain('my-extension');
const _ = Gettext.gettext;
```

Make this a bit easier by adding those functions directly
to the extensions object when initTranslations() is called,
then expose helper functions for calling them.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1941>
2021-08-14 18:45:25 +00:00
Florian Müllner
b9f38f95e3 ci: Split POTFILES check between C and JS
Regex are a crude tool for analyzing whether some code *calls* a
particular function. Spidermonkey has Reflect.parse() that returns
the AST of the passed in code, which allows for a much more precise
check for javascript.

The old script is still used for C code, where i18n-affecting changes
are much rarer.

Based heavily on Philip Chimento's mozjs migration script at
https://gitlab.gnome.org/ptomato/moz60tool.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1941>
2021-08-14 18:45:25 +00:00
Alexey Rubtsov
53e623e49c Update Russian translation 2021-08-14 11:56:36 +00:00
Mohammed Sadiq
3495873c90 status/network: Use wwan settings panel for GSM/LTE Modems
GSM/UMTS/LTE modems now have better support with wwan panel in GNOME
Settings.  So, if the modem supports, open wwan panel, otherwise
fallback to opening network panel when "Mobile Broadband Settings"
item is clicked.

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/583

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1942>
2021-08-14 10:39:56 +00:00
Florian Müllner
4b4d422c1e iconGrid: Bail out when not on a monitor
There shouldn't be any code that calls zoomOutActor() without
a monitor, but throwing in an early return doesn't hurt.

CID 351285.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1950>
2021-08-13 15:16:54 +02:00
Florian Müllner
46b0d3f6cc workspacesView: Handle null return value
We are not going to process key events while updating views,
but coverity complains (CID 351269)...

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1950>
2021-08-13 15:16:54 +02:00
Florian Müllner
5b3036a6bf appDisplay: Handle null value
The value can not actually be null at that point, but it's too
hard to spot for tools like coverity:
 - before setting view, we chain up to the parent's acceptDrop()
 - that calls _canAccept(), which we override and check for the view

Still, and extra ? doesn't hurt, and hopefully will make the tooling
happy.

CID 351269

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1950>
2021-08-13 15:16:54 +02:00
Florian Müllner
941419e165 appDisplay: Fix dead error handling
gjs includes an override to turn GSettings' asserts into exceptions,
but we'll have to catch that instead of checking for a null return
value.

Spotted by coverity in CID 351268.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1950>
2021-08-13 15:16:54 +02:00
Florian Müllner
6f7df32b0e boxpointer: Fix coordinate
Eeeks. Spotted by coverity in CID 351259.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1950>
2021-08-13 15:16:54 +02:00
Florian Müllner
474fd47fc0 telepathyClient: Fix a typo
Whoops, that notifiction was never shown.

Spotted by coverity in CID 351223.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1950>
2021-08-13 15:16:54 +02:00
Florian Müllner
f719ea8d69 st/scroll-bar: Remove pointless condition
Both branches are identical (which is correct - orientation or
text direction is irrelevant for the trough).

Spotted by coverity in CID 351261.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1950>
2021-08-13 15:16:54 +02:00
Florian Müllner
506001ebc2 src/shell: Plug some small leaks
Spotted by coverity in CID 351284 and 351288.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1950>
2021-08-13 15:16:54 +02:00
Hugo Carvalho
2fcb7cf3de Update Portuguese translation 2021-08-13 10:08:22 +00:00
Florian Müllner
c6b72ccd15 status/location: Change permission table
There is now a location portal that provides a similar role
as our agent. Settings supports that portal in its application
panel, which allows users to revisit their choice later.

Unfortunately it uses a different permission store table, so
any permissions granted (or denied) through our agent won't
show up there.

To change that, switch to the same table as the portal/Settings.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1945>
2021-08-12 22:39:45 +00:00
Quentin PAGÈS
f313eb08ac Update Occitan translation 2021-08-12 21:19:06 +00:00
Florian Müllner
508442cef2 ci: Update mutter image
Mutter now requires a development version of glib, so bump the
image to satisfy the dependency.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1947>
2021-08-12 21:01:01 +02:00
Jakub Steiner
7af01939eb theme: Adjust focus ring for entries
Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4527

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1936>
2021-08-11 16:13:39 +00:00
Daniel van Vugt
cc2af75fb4 workspace: Remove skip-taskbar windows while the overview is shown
On startup desktop-icons-ng Wayland windows have skip-taskbar==FALSE so
initially pass `_isOverviewWindow` and they get added to the overview,
which is confusing to users. However almost immediately after that they
get `meta_wayland_client_hide_from_window_list` and are removed from
future overviews. So now we respond to `notify::skip-taskbar` immediately
and prevent desktop-icons-ng appearing in the startup overview too.

This is messy and ideally we'd like to know the window type immediately
on creation, but that option only exists in X11 and not Wayland.

https://gitlab.com/rastersoft/desktop-icons-ng/-/issues/137
https://bugs.launchpad.net/bugs/1936643

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1925>
2021-08-11 15:15:03 +00:00
Fionn Kelleher
a8f1722a9f readme: Change "GNOME 3" to "GNOME"
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1944>
2021-08-11 14:41:15 +00:00
Rafael Fontenelle
4649bb008c Update Brazilian Portuguese translation 2021-08-10 12:41:06 +00:00
Boyuan Yang
9fa31d83c8 Update Chinese (China) translation 2021-08-09 19:48:23 +00:00
Matej Urbančič
58dd335b18 Update Slovenian translation 2021-08-09 19:14:19 +00:00
Yuri Chornoivan
9b7181d706 Update Ukrainian translation 2021-08-09 14:40:03 +00:00
Florian Müllner
26dc0fcd32 appDisplay: Avoid a warning
At least the last stable release of gjs has an issue with async
handlers for custom (i.e. defined in JS) GObject signals.

The handler still works, but evoking it prints the following warning:

  JS ERROR: Error: Could not guess unspecified GValue type

We can avoid the warning by using the addAction() convenience
method, which makes for a small nice cleanup anyway.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1938>
2021-08-09 14:08:09 +00:00
Florian Müllner
19fc6ef5dd powerProfiles: Tweak profile names
After some more discussion, we settled on slightly different
profile names.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1939>
2021-08-09 13:50:13 +00:00
Kukuh Syafaat
d28ed122a8 Update Indonesian translation 2021-08-08 13:27:17 +00:00
Yaron Shahrabani
ee632fb2d5 Update Hebrew translation 2021-08-07 16:07:08 +00:00
Danial Behzadi
957d5595de Update Persian translation 2021-08-07 14:52:19 +00:00
Emin Tufan Çetin
e49d8162a9 Update Turkish translation 2021-08-06 20:35:27 +00:00
Tjipke van der Heide
9cfc48c0a8 Update Frisian translation 2021-08-05 12:40:30 +00:00
Florian Müllner
6e629c0f10 st/icon: Only get resource-scale after peeking theme node
If an actor is not on any stage view, then it doesn't have a valid
resource scale, which will hit an assert later.

When that is the case (for example when running headless), we expect
that there is no valid theme node (yet) either, so simply moving
the clutter_actor_get_resource_scale() call after peeking at the
theme node is enough to avoid the crash.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1935>
2021-08-05 10:03:51 +00:00
Rafael Fontenelle
4bf5f7bdb1 Update Brazilian Portuguese translation 2021-08-04 23:20:16 +00:00
Hugo Carvalho
c58c86e01d Update Portuguese translation 2021-08-04 17:06:45 +00:00
Alexey Rubtsov
99199b1379 Update Russian translation 2021-08-03 20:46:35 +00:00
Yuri Chornoivan
717a2d30cb Update Ukrainian translation 2021-08-02 16:36:57 +00:00
Florian Müllner
f1320bd250 status/powerProfiles: Add power mode selection
Settings' power panel gained support for switchable power profiles
in GNOME 40. It's useful to have that functionality more readily
available, so expose it in the system status menu as well.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1907>
2021-08-02 16:41:06 +02:00
Tjipke van der Heide
770f15207c Add Frisian translation 2021-08-02 10:46:04 +00:00
Florian Müllner
8f42053b5f magnifier: Small cleanup
Use an early return instead of a big if() block to cut down on
indentation.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1932>
2021-07-31 17:18:08 +00:00
Florian Müllner
77b175e763 magnifier: Remove unused return value
Before the introduction of PointerWatcher, the method was used as
a timeout handler. That hasn't been the case since 2012, so drop
the return value.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1932>
2021-07-31 17:18:08 +00:00
Florian Müllner
1ea4d72fe5 magnifier: Don't query pointer unless necessary
The PointerWatcher passes the current pointer position to every watch,
so we don't have to query the pointer again scrollToMousePos() is used
as watch callback.

While that should be the only use, be conservative and still query the
pointer when called without arguments.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1932>
2021-07-31 17:18:08 +00:00
Quentin PAGÈS
3fa5e5963c Update Occitan translation 2021-07-31 13:46:06 +00:00
Quentin PAGÈS
09cb9cd461 Update Occitan translation
(cherry picked from commit 668dcdf3221632d69eee86fb5aaf35dd1a705e31)
2021-07-31 13:42:06 +00:00
Ray Strode
a4123887c1 shellEntry: Don't show "Show Password" menu if entry icon is disabled
Right now the Show Password menu is shown unconditionally for password
entries, ignoring the org.gnome.desktop.lockdown disable-show-password
key.

StShellEntry now honors that key for its peek icon, and there's little
reason for the peek icon and the menu to ever be out of sync.

This commit forces the menu and the icon to always be in sync, and
so makes the menu lock down work automatically, too.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/687>
2021-07-30 14:17:07 +00:00
Ray Strode
8721c5db37 st/password-entry: Honor disable-show-password key
StPasswordEntry provides an optional icon for the user to
show their password in clear text.

This commit disables that icon if password showing is locked
down.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/687>
2021-07-30 14:17:07 +00:00
Ray Strode
162d694d9a st/settings: Add new disable-show-password setting
There's now a setting

org.gnome.desktop.lockdown disable-show-password

that ostensibly lets admins prevent from users from
showing their password in password dialogs.

gnome-shell currently ignores this key.

As a first step, this commit adds the setting to StSettings.

Future commits will use the new setting.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/687>
2021-07-30 14:17:07 +00:00
Ray Strode
4ae06a2879 st/settings: Fix indentation on settings keys
Most of the keys are aligned, but "screen-magnifier-enabled" isn't.

This commit lines all the keys up, giving a little more breathing
room for future keys that have longer names.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/687>
2021-07-30 14:17:07 +00:00
Jonas Dreßler
ba428ed6b0 st/scroll-bar: Remove unneeded style-changed handler
Same reasoning as the last commit, this is already handled in the
default vfunc override of StWidget.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/953>
2021-07-30 13:59:18 +00:00