Commit Graph

12363 Commits

Author SHA1 Message Date
verdre
193e4ae31e workspace: Use globals for delays and animation times
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/346
2019-01-31 17:36:25 +00:00
Christopher Davis
409a27c3b8 weather: Change Weather app ID
As of 9f7f5a68d4 Weather uses
org.gnome.Weather everywhere instead of org.gnome.Weather.Application.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/379
2019-01-31 12:33:10 -05:00
Florian Müllner
ba97e8da7a magnifier: Add missing import
This was missing from commit a7bb8ee639.
2019-01-31 14:10:30 +01:00
Florian Müllner
c47e672eea a11y: Don't set WM theme
We've been using GTK to draw server-side decorations according to the
GTK theme for a long time, so no need to configure the HighContrast
theme for a setting we don't use.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/377
2019-01-31 08:29:15 +01:00
Florian Müllner
43a19739ab extensionPrefs: Improve error UI
Currently when a preference widget fails to load, we throw a raw
backtrace at the user. While that is undoubtedly useful information
for extension developers and bug reports, it is gibberish to most
users and hardly the first thing they should be exposed to.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/193
2019-01-31 00:38:19 +01:00
Florian Müllner
36f9147b21 extensionPrefs: Add blank state
We currently show a big white window in case no extensions are
installed, which clearly isn't helpful. Add a small blank state
that explains what's going on.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/193
2019-01-31 00:38:19 +01:00
Carlos Garnacho
8647922df9 st: Use StSettings for primary-paste setting
If middle-click happens, check whether the setting is enabled
and paste primary selection if so.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 23:18:53 +01:00
Carlos Garnacho
df3068d9ca st: Use StSettings for enable-animations check
Keep a statically allocated one so all widgets will use a single
object.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 23:18:53 +01:00
Carlos Garnacho
036e67049b st-texture-cache: Use GtkIconTheme separate from GTK+
Using the default icon theme just has automatic theme updates as an added
value. We can do that ourselves, and stop relying on XSettings internally.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 23:18:53 +01:00
Carlos Garnacho
f02033acb7 main: Use StSettings instead of GtkSettings
Cut a middle man by listening to dconf settings directly, and stop relying
on XSettings for it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 23:18:53 +01:00
Carlos Garnacho
91d73d65c3 tweener: Use StSettings instead of GtkSettings
Cut a middle man by listening to dconf settings directly, and stop relying
on XSettings for it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 23:18:53 +01:00
Carlos Garnacho
81c4c23016 dnd: Use StSettings instead of GtkSettings
Cut a middle man by listening to dconf settings directly, and stop relying
on XSettings for it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 23:18:53 +01:00
Carlos Garnacho
fef2bac8ab st: Add StSettings object
This is a GtkSettings lookalike, so the shell can fetch the relevant
settings.
2019-01-30 23:18:53 +01:00
Carlos Garnacho
c59c5eb893 st: Add StDirectionType enum
In order to replace GTK+'s GtkDirectionType. It's bit-compatible with it,
too. All callers have been updated to use it.

This is a purely accessory change in terms of X11 Display usage cleanup,
but helps see better what is left.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 22:50:01 +01:00
Carlos Garnacho
a977c1388a st: Add StPolicyType enum
In order to replace GTK+'s GtkPolicyType. It's bit-compatible with it, too.
All callers have been updated to use it.

This is a purely accessory change in terms of X11 Display usage cleanup,
but helps see better what is left.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 22:50:01 +01:00
Carlos Garnacho
0f799ae313 environment: No need to set Gdk version
The Gdk module is no longer used.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 22:50:01 +01:00
Carlos Garnacho
23c3f3fdea overview: Do not warp pointer to fake crossing event
This is actually papering over bugs in toolkits. On X11 the Xserver will
send crossing events when the stage input shape changes. As those go
end up ignored in GTK+, this warp call aims (and randomly manages) to send
a motion event that wouldn't go unlistened by the drag source window (the
one holding the grab).

This bug actually manifests in other ways, eg. by changing the window
beneath the pointer with alt-tab while DnDing. This should be fixed
altogether in the client side.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 22:50:01 +01:00
Carlos Garnacho
82c7090e9e modalDialog: Do not sync display here
This gdk_display_sync() call was added in commit a40daa3c22 so the alt-f2
dialog is able to spawn commands that trigger grabs on startup (eg. xmag/
xkill).

This seems worthwhile to do only on the X11 backend, and handling it in
mutter backend code seems cleaner.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 22:50:01 +01:00
Carlos Garnacho
0fdfebdb67 shell: Drop some unused headers and Gdk variables
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 22:50:01 +01:00
Carlos Garnacho
208c551787 js: Drop unused Gdk/Gtk imports
There's nothing from those modules used in those JS files.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 22:50:01 +01:00
Carlos Garnacho
b10606e884 keyboard: Drop GDK API usage
Use the misnamed but equivalent Clutter function.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 22:50:01 +01:00
Florian Müllner
f4a64f77f2 util: Use (thread-safe) uselocale()
Our helper method to translate a string according to the LC_TIME
setting uses the no-thread-safe setlocale(). While that's not an
issue in practice given that all JS code shares a single thread,
I was pointed to a better alternative when adopting the same
handling in gnome-desktop's wallclock[0].

[0] https://gitlab.gnome.org/GNOME/gnome-desktop/merge_requests/17

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/292
2019-01-30 20:35:04 +01:00
Philip Withnall
e92477a752 screenShield: Show detailed notification data if notifications hint it
Allow notifications to set a x-gnome-privacy-scope hint, with values in
['system', 'user']. If all the notifications in a particular source hint
that their privacy scope is ‘system’, don’t hide the notification
details on the lock screen.

This is aimed at fixing the particular case of power notifications: they
contain information which is not private to the user (it relates to the
system: battery state or AC state, which is obvious to anyone who can
see the machine), so hiding the details of a power management
notification when the screen is locked is pointless.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/gnome-shell/issues/726
2019-01-30 19:14:40 +00:00
Florian Müllner
37e0a73c8f iconGrid: Remove unreachable code
Throwing an exception already aborts a function, so there's no need
for a return statement in that case.

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/375
2019-01-30 16:13:17 +00:00
Florian Müllner
4f76e05058 keyboard: Fix undefined variable in fall-through message
Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/375
2019-01-30 16:13:17 +00:00
Florian Müllner
3134222d27 keyboard: Add back constructor parameter
This was accidentally dropped in commit bacfdbbb03.

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/375
2019-01-30 16:13:17 +00:00
Florian Müllner
a9ed128dce ibusCandidatePopup: Clarify assignment in condition
Most often it is a bug if the condition part of a for-loop contains the
assignment operator rather than the comparison one, so tools rightfully
emit a warning.

Clarify that the assignment is intentional in this case by adding
parentheses.

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/375
2019-01-30 16:13:16 +00:00
Florian Müllner
c264cc4131 objectManager: Fix undefined variable
Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/375
2019-01-30 16:13:16 +00:00
Florian Müllner
a7943ff934 iconGrid: Fix nonsense condition
Just like the "in" operator in the previous patch, "instanceof" has
a lower precedence than negation, resulting in the nonsense condition
of "true instanceof BaseIcon".

Add parentheses to get the intended behavior.

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/375
2019-01-30 16:13:16 +00:00
Florian Müllner
c353914dd0 appFavorites: Fix nonsense condition
The "in" operator has a lower precedence than negation, so we are
actually testing whether the favorites map contains "false".

Add parentheses to get the intended behavior.

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/375
2019-01-30 16:13:16 +00:00
Florian Müllner
91319e3963 networkAgent: Fix mobile broadband notifications
Currently their body message is assigned to an undefined variable
that isn't used for anything later.

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/375
2019-01-30 16:13:16 +00:00
Florian Müllner
dc4ff941bd networkAgent: Fix showing the WPS message
The message was introduced in commit dfa0750ffd, but added to a
non-existent container, whoops.

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/375
2019-01-30 16:13:16 +00:00
Carlos Garnacho
b597d5faf0 shell-global: Use MetaLaunchContext instead of GdkLaunchContext
Is functionally the same, without requiring the MetaX11Display.
2019-01-30 13:11:29 +01:00
verdre
f6da36ad3a workspaceThumbnail: Clean up porthole/workarea setting and updating
Instead of unnecessarily updating the porthole on every call to the
layout vfuncs and returning widths and heights of 0 when the overview is
hidden, only update it on actual workarea changes.

Also use the stage size for the porthole in case no monitor is available
to make sure we don't try to allocate a 0-sized box.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/892, https://gitlab.gnome.org/GNOME/gnome-shell/issues/517

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/343
2019-01-30 10:07:14 +01:00
verdre
5f4e2749a2 overview: Remove unneeded check if primary monitor exists
This check is no longer needed because we're using the stage size
instead of the monitor size here.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/374
2019-01-30 00:33:46 +00:00
Georges Basile Stavracas Neto
69b1fb699f
app: Replace ClutterTexture by ClutterActor
It apparently uses no ClutterTexture specifics, and instead
only tries to match what StTextureCache used to return.

Since StTextureCache now returns ClutterActor, also use a
ClutterActor on ShellApp.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/373
2019-01-29 17:11:13 -02:00
Georges Basile Stavracas Neto
259f90bbf6
texture-cache: Fix documentation error
It now returns a ClutterActor, not a ClutterTexture.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/371
2019-01-29 16:38:04 -02:00
Georges Basile Stavracas Neto
8665045326
st: Check for ClutterImage when creating shadow pipelines
_st_create_shadow_pipeline_from_actor creates shadow pipelines
from actors. This function special-cases ClutterTexture as a
small performance improvement, since we can have access to the
CoglTexture easily with it. However, recent commits removed all
usage of ClutterTexture from GNOME Shell, rendering this optimization
useless. Instead, actors now may have a ClutterImage set as
their content, that can be used instead.

Replace the check for ClutterTexture with a check for ClutterImage,
and use the texture of the image when it is available.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/371
2019-01-29 16:38:04 -02:00
Georges Basile Stavracas Neto
a7bb8ee639
magnifier: Use a ClutterContent to render mouse sprite
The Magnifier class uses a small subtree of actors to track the
current cursor's position and sprite. Specifically, it uses the
deprecated ClutterTexture to paint the cursor sprites.

Add a new, very simple ClutterContent implementation to track the
cursor sprite, and replace the ClutterTexture by a ClutterActor.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/371
2019-01-29 16:31:57 -02:00
Florian Müllner
8f732e4f45 messageTray: Disconnect signals when resetting notification
Just like we did for the parent class in commit b57832716a, we should
disconnect any notification signals when the notification is reset
to null to avoid warnings later.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/942
2019-01-29 16:49:48 +00:00
Carlos Garnacho
95a31b0c31 st: Use ClutterKeymap to detect caps lock state changes
This drops usage of Gtk/X11, replacing it with code that is dependent
of the Clutter backend in use. Another positive side effect is that
the keymap state will now be correct on wayland, since there were no
guarantees that X11 key state would reflect the current reality.

https://bugzilla.gnome.org/show_bug.cgi?id=762881
2019-01-29 16:03:22 +00:00
Florian Müllner
36b9f45368 ci: Add minimal continuous integration
Building gnome-shell is tricky due to the tight coupling with mutter,
but until we figure out the best way forward, we can at least perform
some basic syntax checking on the javascript bits.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/367
2019-01-28 17:29:35 +00:00
Florian Müllner
46575804cc perf: Stop using legacy generator functions
This was a non-standard Mozilla extension that is no longer supported.
Simply switch to the standardized generator syntax to fix.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/367
2019-01-28 17:29:35 +00:00
Carlos Garnacho
86a00b6872 shell-global: Make saving of persistent state asynchronous
This is an expensive operation that is best avoided in the main loop. Given
the call doesn't care much about returning error or status, it can just
be made async within.

Every operation on a given file will be destructive wrt previous
operations on the same file, so we just cancel any pending operation on
it before batching the current one.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/815
2019-01-28 14:56:08 +00:00
Georges Basile Stavracas Neto
23d6d13d80
st-shadow: Add a CoglFramebuffer argument
The last patch in the series, this one adapts StShadowHelper
to received a CoglFramebuffer. This is where we first touch
JavaScript with Cogl types, and as such, it depends on the
latest Mutter. Earlier versions of Mutter didn't have its
Mutter-Clutter GIR to generate types for various Cogl types.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/283
2019-01-28 12:35:54 -02:00
Georges Basile Stavracas Neto
09addfc87c
st-private: Receive a CoglFramebuffer
Same case of the previous patch; _st_paint_shadow_with_opacity()
uses cogl_get_draw_framebuffer(), and this patch makes it receive
a CoglFramebuffer as a parameter instead.

The cautious reader might notice that this commit apparently goes
against the long-term goal, for it introduces more instances of
cogl_get_draw_framebuffer(). This is not wrong, but these introduced
ones will be removed later on, when ClutterActor.paint() receives
a CoglFramebuffer as a parameter instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/283
2019-01-28 12:35:51 -02:00
Georges Basile Stavracas Neto
a2f27a9409
theme-node-transition: Receive a CoglFramebuffer
This is in preparation for a future where only explicit frambuffer
APIs are available, i.e., cogl_get_draw_framebuffer() does not
exist.

There is absolutely no functional changes in this patch (nor the
following ones in this series), only rearrangements so that various
functions receive a CoglFramebuffer instead of using the draw
framebuffer.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/283
2019-01-28 12:35:41 -02:00
Daniel Mustieles
412003efbf Updated Spanish translation 2019-01-28 13:08:55 +01:00
Pascal Nowack
582b3aacf4 dnd: Fix syntax error which led into g-s not starting anymore
With the recent port to JS6 classes, the trailing
comma after functions in the syntax of classes has
been removed.
However commit c2961f21 accidentally reintroduces
one trailing comma after a newly created function,
leading into g-s throwing an exception and not
starting anymore.

Therefore, remove this trailing comma to solve
this problem.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/366
2019-01-28 01:44:07 +01:00
A S Alam
1af0b54c1e Update Punjabi translation 2019-01-27 22:17:11 +00:00