Commit Graph

12845 Commits

Author SHA1 Message Date
Jonas Dreßler
02c76695e5 tests: Stop using global grabs
Global grabs are being removed from Clutter in favour of input device
grabs.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/495
2019-07-02 01:18:15 +00:00
Jonas Dreßler
d5a1a888d9 st: Replace global grabs with input device grabs
Global grabs are being removed from Clutter in favour of input device
grabs, so only grab the input device instead and replace priv->grabbed
with checks for priv->grab_device.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/495
2019-07-02 01:18:15 +00:00
Jonas Dreßler
6c33aff6d1 lookingGlass: Replace global grabs with input device grabs
Global grabs are being removed from Clutter in favour of input device
grabs.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/495
2019-07-02 01:18:15 +00:00
Sonny Piers
61f86cbc54 keyboard: Remove unused keyboard gsetting schema
Since commit 7fd8fa34, the schema is no longer used.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/604
2019-07-02 02:56:48 +02:00
Florian Müllner
4c5206954a style: Use camelCase for variable names
Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
2019-07-01 23:44:11 +02:00
Florian Müllner
8fda3116f0 style: Fix brace style
Opening braces should be on the same line as the associated statement,
and only be omitted if both surrounding blocks are one-liners.

Partially spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
2019-07-01 23:44:11 +02:00
Florian Müllner
7ac35c644e style: Fix stray/missing spaces
Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
2019-07-01 23:44:11 +02:00
Florian Müllner
29b04fcbf2 style: Fix stray/missing semi-colons
Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
2019-07-01 23:44:11 +02:00
Florian Müllner
55235c2552 style: Avoid trailing commas in array destructuring
When destructuring multiple return values, we often use trailing commas
to indicate that there are additional elements that we are ignoring.

There isn't anything inherently wrong with that, but it's a style that's
too confusing for eslint - on the one hand we require a space after a
comma, on the other hand we require no space before closing brackets.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
2019-07-01 23:44:11 +02:00
Florian Müllner
f250643385 style: Use space after catch
We are currently inconsistent with whether or not to put a space
after catch clauses. While the predominant style is to omit it,
that's inconsistent with the style we use for any other statement.
There's not really a good reason to stick with it, so switch to
the style gjs/eslint default to.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
2019-07-01 23:44:11 +02:00
Florian Müllner
d008c6c5c5 cleanup: Avoid variable declarations in case clauses
While allowed by the syntax, they are problematic because the
variable is in the scope of the switch() statement, but only
valid if a particular case clause is reached.

Add braces to limit the variables' scope to the corresponding
case clause to avoid that problem.

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
2019-07-01 23:44:11 +02:00
Florian Müllner
e2e02c9a2f cleanup: Avoid implicit coercion
Converting a variable to a particular type can be done explicitly (with
functions like Number() or toString()) or implicitly by relying on type
coercion (like concatenating a variable to the empty string to force
a string, or multiplying it with 1 to force a number).

As those tend to be less readable and clear, they are best avoided. So
replace the cases of string coercion we use with template strings, and
clarify the places that can be confused with number coercion.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
2019-07-01 23:44:11 +02:00
Florian Müllner
e56d7f5021 cleanup: Remove unused variables
Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
2019-07-01 23:44:10 +02:00
Florian Müllner
e7d44bb349 cleanup: Remove unneeded escapes in regex
. and ) lose their special meaning in character sets, so they don't
need escaping. The same applies to - when it isn't part of a range.

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
2019-07-01 23:44:10 +02:00
Florian Müllner
321730fcb9 cleanup: Use rest operator to handle overly long argument lists
The existing indentation is bonkers, but there's no good replacement
with that many arguments. So switch to using the rest operator and
array destructuring as an alternative.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
2019-07-01 23:44:10 +02:00
Florian Müllner
fe83cd91bb cleanup: Use rest parameters instead of arguments
Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
2019-07-01 23:44:10 +02:00
Florian Müllner
0b08ee54bb cleanup: Clean up unused imports
Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
2019-07-01 23:44:10 +02:00
Florian Müllner
f6b4b96737 cleanup: Use Array.includes() to check for element existence
We can use that newer method where we don't care about the actual position
of an element inside the array.

(Array.includes() and Array.indexOf() do behave differently in edge cases,
for example in the handling of NaN, but those don't matter to us)

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/152
2019-07-01 21:28:52 +00:00
Florian Müllner
b87455c089 keyboard: Remove unnecessary boolean cast
In contexts where a statement (like if or while) expects a condition,
any expression will be implicitly cast to boolean already without
C-isms like double negation.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/606
2019-07-01 21:09:49 +00:00
Florian Müllner
2c1a81f448 runDialog: Don't return from finally block
Control flow statements like return, break or continue are considered
unsafe in finally blocks, as they take precendence over any control
flow statement in the try and catch blocks, which may be unexpected.

This isn't the case here as the statement in the finally block is the
only one, but we can just as well avoid the finally block altogether
and use a regular return statement.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/606
2019-07-01 21:09:49 +00:00
Florian Müllner
b3736f45e6 popupMenu: Use regular method style
We don't define methods on a single line anywhere else, so don't do
that here either for consistency.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/606
2019-07-01 21:09:49 +00:00
Florian Müllner
3c382c4bbe popupMenu: Use consistent registerClass() style
We don't add a line break between parameters and class elsewhere,
so be consistent with that.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/606
2019-07-01 21:09:49 +00:00
Florian Müllner
5f3bad9c94 locatePointer: Use constant for GSettings key
The constant is defined, so use it.

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/606
2019-07-01 21:09:49 +00:00
Florian Müllner
6970f43e66 ripples: Remove unreachable return statements
Throwing an exception stops execution of the current function,
so the following return statements are both unnecessary and
unreachable.

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/606
2019-07-01 21:09:49 +00:00
Florian Müllner
9476aa598a telepathyClient: Don't redeclare N_()
It is already defined globally via environment.js.

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/606
2019-07-01 21:09:49 +00:00
Florian Müllner
69725e5d41 locatePointer: Capitalize class name
... according to our coding style.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/606
2019-07-01 21:09:49 +00:00
Florian Müllner
42dabef8c7 loginDialog: Return consistently from arrow function
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/606
2019-07-01 21:09:49 +00:00
Florian Müllner
e10a768ddb shellMountOperation: Remove unused functions
Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/606
2019-07-01 21:09:49 +00:00
Florian Müllner
a8f0787c91 batch: Add missing import
Commit 88697add1b missed adding the necessary import.

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/606
2019-07-01 21:09:49 +00:00
Jonas Dreßler
074129682b altTab: Remove get_preferred_width override of AppIcon
This vfunc override has been introduced to ensure app icons are always
squared, but since the container of the AppIcon gets a square allocation
anyway if the 'square' property of the SwitcherButton is set, there's
no need to return a special width here.

Without the override we can also stop setting the size of the iconBin
manually. And since shell_app_create_icon_texture() uses logical pixels
but clutter_actor_set_size() uses screen pixels, that means we now no
longer set the size of the icon back to the unscaled value after it was
already correct.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1325
2019-07-01 20:46:26 +02:00
Jonas Dreßler
c67460a1e3 altTab: Fix a wrong variable name
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/587
2019-07-01 20:05:16 +02:00
Jonas Dreßler
eab320dab5 altTab: Ensure style of this._list before calculating icon sizes
We're calculating icon sizes for the alt tab switcher early and at a
point where the style attributes of this._list are not loaded yet. To
make sure the value of this._list.spacing is correct, call
ensure_style() on this._list before accessing the spacing.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/587
2019-07-01 20:05:16 +02:00
Jordi Mas
04c7cb6fbe Do use padding 0 for week and day numbers 2019-07-01 08:53:46 +02:00
Florian Müllner
d4582491f5 system: Drop custom styling of user submenu icon
The default style we get from .popup-menu-icon actually works better,
as it ensures consistency with all the other submenu icons used in
the aggregate menu.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/591
2019-06-29 20:01:52 +00:00
Ray Strode
0641b1e279 animation: fix unintentional loop while polkit dialog is active
The polkit password dialog has a spinner that gets displayed
while the users password is being verified.

Unfortunately, the spinner stop method unintentionally calls
back into itself after the stop fade out animation is complete.
The stop method is called at startup, so the looping begins as
soon as the dialog is visible and continues until the dialog is
dismissed.

This commit fixes the loop by having the stop method cease
calling itself, and instead having it call the stop method on the
superclass.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/602
2019-06-27 14:54:36 -04:00
Ray Strode
ae0450b68e Revert "animation: fix unintentional loop while polkit dialog is active"
This reverts commit cb0a5de83b.
2019-06-27 14:47:13 -04:00
Ray Strode
cb0a5de83b animation: fix unintentional loop while polkit dialog is active
The polkit password dialog has a spinner that gets displayed
while the users password is being verified.

Unfortunately, the spinner stop method unintentionally calls
back into itself after the stop fade out animation is complete.
The stop method is called at startup, so the looping begins as
soon as the dialog is visible and continues until the dialog is
dismissed.

This commit fixes the loop by having the stop method cease
calling itself, and instead having it call the stop method on the
superclass.
2019-06-27 14:27:34 -04:00
Florian Müllner
2f5086efaf extensionDownloader: Use common message dialog layout
While the confirmation dialog for extension installation is simpler
than - say - authentication dialogs, it still makes sense to re-use
the common content layout instead of duplicating it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/600
2019-06-26 20:49:46 +02:00
Florian Müllner
68e580e394 dialog: Use GObject.set() over Object.assign()
gjs has provided that as a more idiomatic replacement for a while.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/600
2019-06-26 20:49:46 +02:00
Jonas Dreßler
b143869d5d main: Fix some typos and style inconsistencies in comments
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/599
2019-06-26 16:39:36 +00:00
Jonas Dreßler
6a477be874 windowManager: Use own variables for each gesture
Using one variable to initialize all gestures will update the address of
the "gesture" pointer with every newly initialized object. This means
that event handlers which also use the "gesture" pointer like the
'keyboard-visible-changed' handler will update a different gesture as
soon as the pointer is changed.

This lead to a bug where the handler of 'keyboard-visible-changed'
wrongly nabled the unfullscreen gesture. Fix that by assigning each
gesture its own variable.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/598
2019-06-26 18:18:28 +02:00
Jakub Steiner
03bb8cdcbd theme: darken sliders to match gtk
- match gtk a bit more closely, but avoid the gradients (change will
  happen on gtk side for this one).
2019-06-26 12:34:42 +02:00
Florian Müllner
8864816b94 Bump version to 3.33.3
Update NEWS.
2019-06-24 19:19:04 +02:00
Christian Hergert
751cd2f1c1 main: setup GJS profiler when GJS_TRACE_FD is set
This is the same environment variable that will be used in GJS to auto-
connect Sysprof to the GJS profiler when the gjs binary is used.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/573
2019-06-24 15:05:46 +00:00
Jakub Steiner
6f6b6fb9d6 Merge branch 'wip/jimmac/sync-with-adwaita' 2019-06-24 15:39:26 +02:00
Jordi Mas
fe346b89f0 Update Catalan translation 2019-06-23 09:48:21 +02:00
Goran Vidović
0744c6af2e Update Croatian translation 2019-06-21 23:56:14 +00:00
Florian Müllner
2e070ab834 panel: Center-align menu arrows
Center alignment looks more balanced and makes it more likely that
the menu opens below the pointer position.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1351
2019-06-21 21:09:56 +00:00
Jonas Dreßler
00f9b7bf69 layout: Use addChrome instead of addTopChrome for screenShieldGroup
Make sure the panel is visible above the login and screen shield actors
by adding the screenShieldGroup to the uiGroup underneath the panelBox.

This fixes a regression introduced with 2bd80579ed

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

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/571
2019-06-21 20:57:23 +00:00
Will Thompson
94ba52af0c
network: don't assume NMActiveConnection has a device
In practice this has been seen to fail:

    JS ERROR: TypeError: active.get_devices(...)[0] is undefined
    ensureActiveConnectionProps@resource:///org/gnome/shell/ui/status/network.js:73:22
    _getMainConnection@resource:///org/gnome/shell/ui/status/network.js:1791:13
    _syncMainConnection@resource:///org/gnome/shell/ui/status/network.js:1809:32

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1406
2019-06-21 11:26:53 +01:00