Commit Graph

13114 Commits

Author SHA1 Message Date
Florian Müllner
0f178c3b3d appDisplay: Skip animation when hidden
The time computation isn't just unnecessary in that case, it's likely
wrong as well: If we don't have a valid allocation, we may well end
up with a negative value, NaN or Infinity.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/654
2019-08-06 14:52:41 +02:00
Kukuh Syafaat
9aa06e3001 Update Indonesian translation 2019-08-06 10:49:56 +00:00
Georges Basile Stavracas Neto
00ec8ca989
allView: Redisplay on folder changes
Now that redisplaying is a lightweight operation that only
adds and removes what changed, we can not be concerned about
redisplaying on folder changes.

Redisplaying will be necessary when custom order in the app
grid is implemented, in order to update not only which icons
are hidden, but also their position.

Call _redisplay() in AllView when folders change.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/645
2019-08-05 21:20:31 -03:00
Georges Basile Stavracas Neto
9c6f558c9e
baseAppView: Remove unused BaseAppView.addItem
Now that BaseAppView does not allow for subclasses to add
and remove items directly, the addItem() method can be
removed.

Remove BaseAppView.addItem().

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/645
2019-08-05 21:20:31 -03:00
Georges Basile Stavracas Neto
1c172955ee
allView, folderView: Only add icons once
FolderView and AllView currently check if the item is
present in the BaseAppView._items map, in order to avoid
adding the same icon multiple times.

Now that BaseAppView._loadApps() has a different role --
it returns a list with all app icons, and BaseAppView
diffs with the current list of app icons -- checking the
BaseAppView._items map is wrong.

Make sure there are no duplicated items in the temporary
array returned by all _loadApps() implementations. Remove
the now unused BaseAppView.hasItem() method.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/645
2019-08-05 21:20:31 -03:00
Georges Basile Stavracas Neto
1d44bf7ce6
baseAppView: Only add and remove when necessary
BaseAppView currently removes all icons, and readds them, every
time the list of app icons needs to be redisplayed. In order to
allow animating app icon positions in the future, however, we
cannot destroy the actors of the app icons.

Previous commits paved the way for us to do differential loading,
i.e. add only the icons that were added, and remove only what was
removed.

Make the BaseAppView effectively implement differential loading.
The BaseAppView.removeAll() method is removed, since we do not
remove all icons anymore. BaseAppView._loadApps() now returns an
array with the new apps, instead of putting them directly at the
BaseAppView lists.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/645
2019-08-05 21:20:29 -03:00
Georges Basile Stavracas Neto
036e41621d
baseAppView: Move _loadGrid() into _redisplay()
Next commit will introduce differential loading of
app icons, and will reorganize this part of the
codebase.

When doing that, the ideal symmetry of the new code
would be:

 * Update BaseAppView._allItems array
 * Update BaseAppView._items map
 * Update BaseAppView._grid actor

Move the code in _loadGrid() into _redisplay() so that
we can check in-place which new icons need to be added.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/645
2019-08-05 21:19:26 -03:00
Georges Basile Stavracas Neto
3003e9091d
baseAppView: Call loadGrid() directly
Now that the three views follow the exact same loading routine
(remove all + load apps + load grid), we don't need each view
call loadGrid() directly anymore.

This is an important step in order to animate adding and removing
icons, since now we can diff old and new app icons properly.

Move all calls to BaseAppView.loadGrid() to a single one after
BaseAppView._loadApps(). Also add the underscore prefix, since
this is now considered a protected function.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/645
2019-08-05 21:19:25 -03:00
Georges Basile Stavracas Neto
8d9da10710
frequentView: Use BaseAppView.addItem() and loadGrid()
FrequentView is another view that is slightly not unified with how
BaseAppView expects subclasses to load app icons. Instead of using
BaseAppView.addItem() and then calling BaseAppview.loadGrid(), it
adds the app icons directly to the icon grid.

Make FrequentView add icons using BaseAppview.addItem(), and load
the icons using BaseAppView.loadGrid().

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/645
2019-08-05 21:19:25 -03:00
Georges Basile Stavracas Neto
4d23c12028
folderIcon: Move app icon loading to FolderView
Future patches will diff the old and new icons of views, in order to
animate them when necessary (e.g. adding an app icon to a folder, or
from a folder back to the app grid). In order to do that, all views
must be streamlined in how they load app icons.

Currently, FrequentView and AllView are already following the behavior
expected by BaseAppView, but FolderView isn't. Its icons are loaded by
FolderIcon, and FolderView doesn't implement BaseView._loadApps(),
which makes it impossible to diff old and new apps.

Move the app icon loading routine from FolderIcon to FolderView, by
implementing the _loadApps() method.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/645
2019-08-05 21:19:24 -03:00
Florian Müllner
476816732f cleanup: Use milliseconds for animation times
The different units - seconds for Tweener and milliseconds for
timeouts - are not a big issue currently, as there is little
overlap. However this will change when we start using Clutter's
own animation framework (which uses milliseconds as well), in
particular where constants are shared between modules.

In order to prepare for the transition, define all animation times
as milliseconds and adjust them when passing them to Tweener.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/663
2019-08-05 21:55:20 +00:00
Benjamin Berg
31968ea53c meson: Avoid using relative paths to po directory
Replace the relative path to the po directory with a toplevel definition
of po_dir and use that instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/507
2019-08-05 21:38:51 +00:00
Benjamin Berg
7e00d22bfa data: Update systemd units
The existing units were never used as the corresponding support was
never merged into gnome-session.

This commits updates units to be usable with the newer gnome-session
unit definitions. Also added is appropriate failure/restart logic
including the ability to disable extensions. Note that extensions will
only be disabled if a failure happens in the first two minutes after
login.

https://gitlab.gnome.org/GNOME/gnome-session/merge_requests/13
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/507
2019-08-05 21:38:51 +00:00
Benjamin Berg
50055004f5 data: Flag in desktop file that gnome-shell can be started using systemd
As gnome-shell is a required component for GNOME sessions, gnome-session
will currently always try to autostart it. However as we are moving towards
using systemd's user instance for session startup, gnome-session should only
be responsible for launching the shell when either not running under systemd
or when we were built without systemd support.

gnome-session can detect the former but not the latter, so communicate this
via the newly added X-GNOME-HiddenUnderSystemd key in the .desktop file.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/507
https://gitlab.gnome.org/GNOME/gnome-session/merge_requests/13
2019-08-05 21:38:51 +00:00
Anders Jonsson
abe2f07779 Update Swedish translation 2019-08-05 20:41:06 +00:00
Daniel Șerbănescu
277f0d77f3 Update Romanian translation 2019-08-04 13:09:14 +00:00
Daniel Mustieles
01d2ad760a Updated Spanish translation 2019-08-02 09:14:52 +02:00
Jor Teron
25f118bf2c Update Karbi translation 2019-08-02 07:12:56 +00:00
Florian Müllner
12b8fb15b1 st: Move slow-down-factor into settings
Now that we have a Settings singleton, we have a better place for the
slow-down-factor than an awkward extern variable.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/656
2019-08-01 21:13:28 +00:00
Florian Müllner
5295866eff st: Fix property type
Commit 8f3554ff accidentally changed the type of the StWidget:track-hover
property from boolean to object.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1482
2019-08-01 12:44:33 +02:00
Florian Müllner
02b47f4640 weather: Fix property name
It's g-*name*-owner. As the condition covers the unlikely case where
Weather is running before gnome-shell, this slipped through.
2019-08-01 01:50:13 +02:00
Marco Trevisan (Treviño)
108ac7cf20 ci: Make eslint wrapper script usable outside gitlab's CI
The eslint wrapper script is useful for development as well, but it currently
fails on systems where bash is not installed in /usr/bin.

Make it useful there as well by changing the shebang to use /usr/bin/env

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/655
2019-07-31 23:28:43 +02:00
Florian Müllner
933c037c6e weather: Stop accessing app settings directly
Our current Weather integration depends on poking around the app's
settings, which we cannot do when the app is sandboxed (as its
filesystem is "hidden away" in a container in that case).

So instead, use our own GSettings schema for the settings, and sync
it with GNOME Weather via a custom D-Bus interface.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1158
2019-07-31 19:04:41 +00:00
Niels De Graef
8f3554ff3e st: Use g_object_notify_by_pspec()
`g_object_notify()` actually takes a global lock to look up the property
by its name, which means there is a performance hit (albeit tiny) every
time this function is called. For this reason, always try to use
`g_object_notify_by_pspec()` instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/652
2019-07-31 17:35:03 +00:00
Marco Trevisan (Treviño)
668128f8c9 lightbox: Remove previously added tweens from target
Since commit 007d30573 we use an actor effect to apply the radial effect and
we pass the effect to the tweener in order to animate it.

However, we always still remove the previously added tween from the actor,
instead that from the actual target.

So, depending the radial effect state, remove the tweens from the proper target

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/653
2019-07-31 19:19:28 +02:00
Niels De Graef
28ab1f4af4 Ensure G_PARAM_STATIC_STRINGS for all properties
In `st`, we can do this by using `ST_PARAM_*`. In the other code files,
just use `G_PARAM_STATIC_STRINGS` directly.

This is just a minor convenience to prevent a few unnecessary string
copies.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/646
2019-07-30 13:58:44 +00:00
Niels De Graef
d360114226 st: Cleanup ST_PARAM_* and add WRITABLE version
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/646
2019-07-30 13:58:44 +00:00
Florian Müllner
5fc456d9d9 userWidget: Handle non-square icons gracefully
We currently assume that user icons are square, which is the case when
set by the users settings panel, but not enforced by AccountsService.

Handle that case by moving the pixel size back to the actor and using
an appropriate background-size style property of 'cover' (which means
the smallest dimension of the image is scaled to fit the desired size).

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1144
2019-07-29 16:16:22 +00:00
Florian Müllner
007d305736 shell: Actually make GLSLEffect an effect
A generic, introspectable Shader effect is not only more flexible
than a shader actor, it will also make it much easier to turn
Lightbox into an actor subclass and replace Tweener with Clutter's
own animation support.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/651
2019-07-29 17:51:14 +02:00
Florian Müllner
ae7ec648b2 shell: Properly rename type
This is just a find-and-replace name change to make the actual code
changes in the follow-up commit more apparent.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/651
2019-07-29 17:51:14 +02:00
Florian Müllner
99a2fad311 shell: Rename GLSLQuad to GLSLEffect
You can guess where this is going ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/651
2019-07-29 17:51:14 +02:00
Florian Müllner
82d466598c lightbox: Remove unnecessary params
Actors have a default origin of (0, 0), so there's no need of
setting those explicitly.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/651
2019-07-29 17:51:14 +02:00
Jonas Dreßler
3a748fe737 theme: Fix focus style of icons in the calendar popup
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1474
2019-07-28 15:43:56 +00:00
Jonas Dreßler
89ce53e3ff shellDBus: Use floats instead of percentages for OSD levels
Due to typecasting being done when converting floats to integers in
gnome-settings-daemon, a volume of 0.9% in g-s-d will end up as 0% in
gnome-shell. This can lead to a mismatch of icons between the volume OSD
(the icon to use is determined by g-s-d itself) and the shells own
volume indicator (the icon to use is determined by the shell using the
volume received from g-s-d).

To fix this, simply get rid of the conversion from float to percentage
in g-s-d and back to floats in the shell and just send a float/double
value on DBus.

https://gitlab.gnome.org/GNOME/gnome-settings-daemon/merge_requests/78
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/385
2019-07-28 17:27:53 +02:00
verdre
2f29081667 osdWindow: Remove LevelBar and use BarLevel directly
LevelBar is not really used, all the checks are implemented inside
BarLevel as well and the accessible name is wrong because the osdWindow
doesn't only show the volume, but also the brightness and other things.

The workaround for updating the bars width is also no longer needed now
that we have BarLevel.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/385
2019-07-28 17:27:53 +02:00
verdre
cb0d28770f osdWindow: Use float values as input for osdWindow
Using the same type/interval as BarLevel means we can cut out the intermediate
LevelBar class in a follow-up cleanup.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/385
2019-07-28 17:27:53 +02:00
verdre
86c3909908 barLevel: Return when trying to set value to already used value
There are some cases (for example when tweening value changes), where
the level will be set to the same value it already is at. Avoid those
unnecessary repaints by checking whether the value is already used and
returning if it is.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/385
2019-07-28 17:27:53 +02:00
Florian Müllner
b970ee7293 barLevel: Use setters instead of methods
Switching to getters/setters make the code suitable for using
with Tweener and as GObject properties, both of which we'll
do soon enough.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/385
2019-07-28 17:27:53 +02:00
verdre
5545e84430 volume: Remove unused method
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/385
2019-07-28 17:27:53 +02:00
Fabio Tomat
85d9f39417 Update Friulian translation 2019-07-28 07:37:16 +00:00
Jordi Mas
a81450df17 Update Catalan translation 2019-07-28 00:49:20 +02:00
Kukuh Syafaat
a7c94b2cd2 Update Indonesian translation 2019-07-26 11:24:57 +00:00
Florian Müllner
9d65c8b2ec ci: Remove path limitation of js60 check
The check is supposed to run for all merge requests that touch javascript
files, but for some reason I see it's skipped quite often. Better have
the test run unnecessarily some times than let bugs through, so remove
the limitation.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/647
2019-07-25 22:37:22 +02:00
Florian Müllner
1b7ff76092 ci: Fix identifying commits in MR
When a MR uses a private namespace, "origin" refers to that, and its
master branch may be outdated with regard to upstream master.

We are really only interested in checking the line changes from the commits
in the MR, so figure out the correct branch point instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/647
2019-07-25 22:31:31 +02:00
Bastien Nocera
17e32bf16d docs: Fix interface prefix for D-Bus docs
The --interface-prefix= gtk-doc argument was being passed a stringified
array instead of a simple string.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/644
2019-07-25 15:56:20 +02:00
Asier Sarasua Garmendia
74905f3edc Update Basque translation 2019-07-25 06:43:46 +00:00
Georges Basile Stavracas Neto
8e1b13ca96 appDisplay: Trivial code style improvement
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/643
2019-07-24 18:55:50 -03:00
Georges Basile Stavracas Neto
c0e90807e0 baseIcon: Align labels to the center
Ensure icon labels are aligned to the center, both
vertically and horizontally. This will be required
for using BaseIcons as drag actors.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/643
2019-07-24 18:55:50 -03:00
Georges Basile Stavracas Neto
3db1058c2c appIcon: End running drag operations on destroy
AppIcon makes itself draggable, and handles the various DnD
routines such as 'drag-begin' and 'drag-end' by making the
Overview emit the appropriate signals.

However, when destroyed, the AppIcon does not try to finish
any drag operations that started. That causes the event
blocker in AllView not to be updated correctly when dragging
icons to outside folders.

Make AppIcon emit 'item-drag-end' when a drag operation
started and it's destroyed.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/643
2019-07-24 18:11:25 -03:00
Jor Teron
a57c4c580e Update Karbi translation 2019-07-24 18:42:40 +00:00