Commit Graph

5778 Commits

Author SHA1 Message Date
Florian Müllner
358133e82f Initialize properties in _init()
While we've always considered it good style to initialize JS properties,
some code that relies on uninitialized properties having an implicit
value of 'undefined' has slipped in over time. The updated SpiderMonkey
version used by gjs now warns when accessing those properties, so we
should make sure that they are properly initialized to avoid log spam,
even though all warnings addressed here occur in conditionals that
produce the correct result with 'undefined'.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
Florian Müllner
526f2c8bcf loginDialog: Only highlight a single item at any time
The user list uses the same indication for hover and focus, so it
is possible for two items to be highlighted at the same time. Using
different styling would improve the situation, but only to some
extent - the user would still need to figure out which highlight
corresponds to which activation method. So instead, copy the
approach we use in popup menus and use a single property for
highlights that is updated by both focus- and hover changes.

https://bugzilla.gnome.org/show_bug.cgi?id=772284
2017-07-13 14:57:07 +02:00
Florian Müllner
79aa404c14 volume: Show OSD popup when changing volume via scroll
It is possible to use the scroll wheel to adjust the volume without
opening the system menu, but there is no feedback other than the
icon itself in that case. To provide a less coarse indication for
the volume level, display the OSD window when adjusting the volume
while the slider isn't visible.

https://bugzilla.gnome.org/show_bug.cgi?id=781028
2017-07-13 12:28:15 +02:00
Florian Müllner
2339c39ae6 system: Emulate click action button release
Since commit 2c070d38, we add a ClickAction to the visible AltSwitcher
button to track long-presses. As a result, we now have two components
that will grab and ungrab the pointer for the button, so to make sure
we don't end up with a stuck grab, we need to release the second's
component grab when the first activates.

Currently we only drop the StButton grab on long-press, we also need
to cancel any initiated long-press on click.

https://bugzilla.gnome.org/show_bug.cgi?id=781738
2017-07-13 12:27:47 +02:00
Ray Strode
a782de6e06 authPrompt: allow empty response to PAM messages
Some PAM modules say "Press enter to continue" or
whatever.  We need to support them.

This commit allows empty responses to PAM questions,
but still requires a non-empty response for username.

https://bugzilla.gnome.org/show_bug.cgi?id=784360
2017-07-10 09:23:11 -04:00
Ray Strode
0f8718287a gdmUtil: Fix auth prompt drawing over user list
If the user fails to enter their password then hits escape, we
jump back to the user list, then ask again for a password in a
garbled screen. this commit fixes that by skipping a retry if
the operation is cancelled.

https://bugzilla.gnome.org/show_bug.cgi?id=784361
2017-07-10 09:22:32 -04:00
Xiaoguang Wang
fbc5e3709e loginDialog: Disable user list when no user
https://bugzilla.gnome.org/show_bug.cgi?id=731320
2017-07-07 11:21:09 -05:00
Florian Müllner
326d5c7fb8 notificationDaemon: Fix fallback icon names
The gtk-dialog-* names are old and non-standard, and haven't been
provided by the default icon theme for quite a while ...

https://bugzilla.gnome.org/show_bug.cgi?id=784245
2017-07-05 18:40:18 +02:00
Florian Müllner
292ac413c8 panel: Consider visibility changes for solid style
We currently assume that window state changes are accompanied by an
allocation change (triggered for example by the minimize animation).
However this misses the case where a window actor is simply hidden
without any transition, as is the case with the 'show-desktop' action
for instance, so start tracking plain visibility changes as well.

https://bugzilla.gnome.org/show_bug.cgi?id=783975
2017-07-05 16:49:32 +02:00
Florian Müllner
fdf988c04d util: Force text direction of time strings
While the string returned by formatTime() should follow the locale's
text direction as a whole, the actual time part is always expected
to put hours on the left and minutes to the right. It is possible to
enforce that by inserting a left-to-right mark, but so far this is
only done by the Hebrew translation. So in order to not require all
other RTL translations to be fixed individually, just insert the
mark into the returned string ourselves like gnome-desktop's WallClock
code does[0].

[0] https://git.gnome.org/browse/gnome-desktop/tree/libgnome-desktop/gnome-wall-clock.c?h=gnome-3-24#n267

https://bugzilla.gnome.org/show_bug.cgi?id=784130
2017-07-05 16:49:04 +02:00
Michael Catanzaro
a00a186772 authPrompt: Remove stray tab character 2017-06-29 18:16:32 -05:00
Ray Strode
e3330b638a Revert "gdmUtil: Fix auth prompt drawing over user list"
This reverts commit 875a1d6159.

(this was pushed accidentally, isn't the right patch, and lacks
 a bug reference)
2017-06-28 13:16:22 -04:00
Michael Catanzaro
82e20f94f4 authPrompt: Reorder import
5b339c8371 put this in the wrong place.
2017-06-28 02:35:46 -05:00
Mario Sanchez Prada
5221744d1d workspace: Reset source IDs to zero after removing them
There were some source IDs that were not being reset to zero when
removing the associated sources, resulting on some critical errors
being dumped when _realRecalculateWindowPositions() got called
after that point, via _delayedWindowRepositioning().
2017-06-27 10:10:40 +01:00
Michael Catanzaro
293d1697fe Fix a typo 2017-06-26 13:47:19 -05:00
Ray Strode
9c8a470934 objectManager: handle proxies coming and going
Ever since commit b8e29ae8c7
(I think), start up is littered with this message:

 Gjs-WARNING **: JS ERROR: could not get remote objects for service
 org.gnome.SettingsDaemon.Smartcard path

since gnome-shell is now started before gnome-settings-daemon.

This commit addresses the problem by making the object manager code
not try to autostart its proxy, and instead wait for it to appear.

https://bugzilla.gnome.org/show_bug.cgi?id=772589
2017-06-22 14:31:19 -04:00
Ray Strode
9c4e875de4 objectManager: handle object manager sending empty array
If the service implementing the object manager returns
a 0 length array we currently throw an exception.

This commit fixes that.

https://bugzilla.gnome.org/show_bug.cgi?id=780403
2017-06-22 14:31:19 -04:00
Ray Strode
875a1d6159 gdmUtil: Fix auth prompt drawing over user list
If the user fails to enter their password then hits escape, we
jump back to the user list, then ask again for a password in a
garbled screen. this commit fixes that by guarding against the retry
if the fail counter is reset.
2017-06-22 14:31:19 -04:00
Mario Sanchez Prada
d8e7fc403b appDisplay: Add a null-check for the scrollview's fade ClutterEffect
This effect will only be created when the StScrollView actor has either
a non-zero vertical or horizontal fade offset defined, so we need to
add a null-check in these two cases before assuming it's there.

https://bugzilla.gnome.org/show_bug.cgi?id=783823
2017-06-15 15:01:51 +01:00
Florian Müllner
3d6fdc8ae2 sessionMode: Drop unused import 2017-06-15 15:52:37 +02:00
Florian Müllner
ce262b36d4 autorunManager: Remove unused import 2017-06-09 16:58:15 +02:00
Bastien Nocera
50d37e74a3 portalHelper: Fix auth URI not being passed to window
Gjs-Message: JS WARNING: [resource:///org/gnome/shell/portalHelper/main.js 360]: reference to undefined property top.uri
is caused by the URI variable actually being called "url".

https://bugzilla.gnome.org/show_bug.cgi?id=783286
2017-05-31 16:51:05 +02:00
Bastien Nocera
c22287b517 portalHelper: Don't go through proxies for captive portals
When using an SSH tunnel (through a SOCKS proxy) to funnel all
the outgoing traffic, we need the captive portal to not go through that
proxy, otherwise we can't go through the proxy because we're not
connected to the Internet and we can't go through the portal because
we're not connected through the proxy.

This fixes a blank captive portal window and no error reporting in that
particular configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=769692
2017-05-31 16:03:11 +02:00
Florian Müllner
e02d6e5285 panel: Update .solid style on session mode changes
The .solid style isn't supposed to apply for modes that don't support
windows, but for this to work we have to update the style on session
mode changes.

https://bugzilla.gnome.org/show_bug.cgi?id=783202
2017-05-30 11:41:35 +02:00
Florian Müllner
7e7e3ec016 lookingGlass: Use standard icon names for GC icon
Commit b929320d4 added a toolbar item to force garbage collection,
however it won't be visible for most users, as it uses a non-standard
legacy icon name (the default icon theme dropped it as far back as 2009).

https://bugzilla.gnome.org/show_bug.cgi?id=782982
2017-05-24 23:39:51 +02:00
Alessandro Bono
83fb34608c windowManager: Add animations for maximize and unmaximize
The fullscreen animation code is now generic enough to handle any
size change animations, so stop limiting it to (un)fullscreen to
get animations on (un)maximize as well.

https://bugzilla.gnome.org/show_bug.cgi?id=766685
2017-05-24 21:10:28 +02:00
Alessandro Bono
a72f0604dc windowManager: Rename functions and variables
Stop using the word 'fullscreen' since the code is also
going to be used for maximize and tile actions.

https://bugzilla.gnome.org/show_bug.cgi?id=766685
2017-05-24 21:10:28 +02:00
Alessandro Bono
4dfad536a3 windowManager: Use sourceRect for consistency
Now that we always pass the old frame rect, we can use that
instead of picking up the dimensions of the clone actor.

https://bugzilla.gnome.org/show_bug.cgi?id=766685
2017-05-24 21:10:28 +02:00
Alessandro Bono
0dca5e513b windowManager: Generalize translation values
Currently, the translation values are set with the assumption that
one of the actors represents a fullscreen window. In order to
generalize it for any size change transition, we can simply swap
the monitor rect with the source or target rect as appropriate,
and translate the actor from the target to the source position by
subtracting the former and adding the latter.

https://bugzilla.gnome.org/show_bug.cgi?id=766685
2017-05-24 21:10:28 +02:00
Alessandro Bono
7090592477 windowManager: Rename variable
Since there is already targetRect that represents where the
window is going to move, rename oldRect to sourceRect to
represent from where the window is moving.

https://bugzilla.gnome.org/show_bug.cgi?id=766685
2017-05-24 21:10:28 +02:00
Carlos Garnacho
e94de67bd2 switcherPopup: Ignore implicit enter events when the popup is mapped
If the popup happens to be mapped beneath the pointer, mutter will now
emit an implicit enter notify event (i.e. not caused by pointer motion).
In this case the switcherPopup still goes and selects the item, which
results in too sensitive alt-tab menus if the pointer happens to be in
the wrong place.

Make highlighting rely on motion events instead, so it always involves
user interaction when triggered by the pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=755164
2017-05-23 18:38:35 +02:00
Florian Müllner
817ff52414 util: Always use 12h format if requested
Whether we show times in 12h format currently depends on:
 - the 'clock-format' desktop setting
 - the locale support for AM/PM

This was consist with other GNOME components, however both the
WallClock[0] and the Date+Time Settings panel[1] dropped the
second check after GDateTime started supporting AM/PM independently
from the locale, so we should follow suite.

[0] https://git.gnome.org/browse/gnome-desktop/commit?id=226fe725ef2cb2
[1] https://git.gnome.org/browse/gnome-control-center/commit?id=85cd910af

https://bugzilla.gnome.org/show_bug.cgi?id=782930
2017-05-22 15:41:29 +02:00
Alessandro Bono
447bf55e45 panel: Add transparency when free-floating
The solid black top bar we currently use works well for maximized
or tiled windows, as it puts focus on the application content by
blending into the monitor bezel. However it also visually reduces
the screen space, which is particularly noticeable when no window
is located nearby. Having the top bar blend with the background is
a better option in that case, so track window positions and add
some transparency when the top bar is free-floating.

https://bugzilla.gnome.org/show_bug.cgi?id=747163
2017-05-19 18:58:40 +02:00
Carlos Garnacho
41baf0fc74 keyboard: Drop dbus naming semantics from Set[Entry|Cursor]Location
Those functions don't proxy dbus method calls anymore, so just drop the
uppercase 'S'.

https://bugzilla.gnome.org/show_bug.cgi?id=777342
2017-05-15 14:50:02 +02:00
Carlos Garnacho
c324395ee6 keyboard: Remove Show/Hide calls
And merge with the "internal" show/hide() ones. Those functions don't
proxy dbus method calls anymore, so it makes no sense to expose these.
Also, the timestamp is no longer needed as there is a single source for
these events.

https://bugzilla.gnome.org/show_bug.cgi?id=777342
2017-05-15 14:50:02 +02:00
Carlos Garnacho
aecd1c126a keyboard: Avoid runtime dependency on the Caribou daemon
The caribou daemon only gives us focus tracking, which is almost 1:1 with
our own FocusCaretTracker implementation. This means we can entirely
replace the Caribou daemon inside gnome-shell, reducing the Caribou
dependency to just libcaribou, and more specifically the
CaribouKeyboardModel we pull the keyboard models from.

As we still need underneath a CaribouDisplayAdapter to drive the keyboard,
reuse the wayland one, which has been renamed to make it look generic, plus
it will use the virtual input device API from mutter/clutter.

https://bugzilla.gnome.org/show_bug.cgi?id=777342
2017-05-15 14:50:02 +02:00
Florian Müllner
6362b3d057 dateMenu: Fix a runtime warning
GJS now warns about excess parameters, so wrap the queue_relayout()
into an anonymous function instead of using it directly as signal
handler.
2017-05-11 15:20:10 +02:00
Daiki Ueno
0142fae742 search: copy result to clipboard if requested
Some search providers such as GNOME Characters want to copy search
results to clipboard.  However, on Wayland, clipboards are only
accessible from applications that have a visible surface on display.

This patch allows a search provider to request the shell to copy a
search result to clipboard when 'clipboardText' is included in the meta
of the result.

https://bugzilla.gnome.org/show_bug.cgi?id=775099
2017-05-11 11:11:22 +02:00
Mario Sanchez Prada
73680e2433 popupMenu: Change the position of the icon in PopupImageMenuItem
We are moving the icon to be added before the text instead of after,
which is consistent with other menu items in other popup menus, such
as the ones in the system indicator's popup menu.

https://bugzilla.gnome.org/show_bug.cgi?id=782166
2017-05-09 18:32:23 +01:00
Mario Sanchez Prada
e38c26894b popupMenu: Allow specifying an icon on PopupMenuBase.addAction()
This allows passing an optional icon parameter to addAction()
so that a PopupImageMenuItem instance is created instead of a
PopupMenuItem if an icon is specified.

https://bugzilla.gnome.org/show_bug.cgi?id=782166
2017-05-09 18:32:23 +01:00
Mario Sanchez Prada
28ca96064b popupMenu: Accept either an icon name or a GIcon on PopupImageMenuItem
Add an extra check to setIcon() so that either a GIcon or an string
with the icon's name is handlded, so that we can create menu items
in different ways (e.g. by passing a GIcon created from a resource).

https://bugzilla.gnome.org/show_bug.cgi?id=782166
2017-05-09 18:32:23 +01:00
Emilio Pozuelo Monfort
ff425d1db7 extensionSystem: handle reloading broken extensions
Some extensions out there may fail to reload. When that happens,
we need to catch any exceptions so that we don't leave things in
a broken state that could lead to leaving extensions enabled in
the screen shield.

https://bugzilla.gnome.org/show_bug.cgi?id=781728
2017-04-25 17:47:08 +02:00
Florian Müllner
06fdf2fdc8 extensionPrefs: Avoid a runtime warning
Since 5b3fb024be, the main window is only shown when not launched
with a valid UUID. As GtkDialog isn't meant to be used standalone,
we currently trigger a (harmless but annoying) warning in case
the main window isn't shown; we can avoid the warning by setting
up the preference dialog manually instead of using the GtkDialog
convenience class.

https://bugzilla.gnome.org/show_bug.cgi?id=781545
2017-04-20 19:18:23 +02:00
Florian Müllner
7a20683728 extensionPrefs: Fix enum member name 2017-04-20 17:35:35 +02:00
raresvis
8e443a2aff WeatherClient: set enabled providers after setting a valid location
So far, the GWeatherInfo was given the enabled weather providers
as a parameter, at construction time. Because of the way in
which libgweather was designed, setting the providers right from
the beginning enabled libgweather to use them internally in order
to update its state. Updating the internal state is only relevant
when there is a valid location set, which is not guaranteed at the
time when the GWeatherInfo object is constructed.

In order to fix this, enable no providers at construction time and
only set valid providers after setting a valid location.

https://bugzilla.gnome.org/show_bug.cgi?id=780404
2017-04-19 20:41:35 +03:00
Xiaoguang Wang
fcbb942e24 loginDialog: Fix session button can be clicked
When session menu button is hidden, button can be clicked and show popup
menu.

https://bugzilla.gnome.org/show_bug.cgi?id=781482
2017-04-19 10:27:41 -04:00
Florian Müllner
243dae14ea background: Fix file check
The _animationFile property was removed in commit 8a4c862633 ...
2017-04-11 02:43:07 +02:00
Carlos Soriano
2cce1b9ea0 appFavorites: Rename gnome-music.desktop
Recently Music gained a flatpak manifest inside the repo in bug 779905.
However that requires the desktop file to be properly named like
DBUS addresses are.

This patch renames the old Music desktop file to the new one.

https://bugzilla.gnome.org/show_bug.cgi?id=780157
2017-04-09 11:04:40 +02:00
Jonas Ådahl
4cd4678194 Add ShowMonitorLabels2 D-Bus API
Add a new D-Bus method for setting the monitor labels. This new method
takes connector names instead of output ids for associating with actual
monitors.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-04-07 22:30:35 +08:00
Cosimo Cecchi
cad5e06041 panelMenu: consider scale factor when setting max-height
Since the workarea and margins are both in pysical pixels dimensions (we
fetch margins from Clutter, not from the theme), but the CSS expects
logical (scaled) pixels, unless we consider the scale factor when
setting max-height, it won't work on a HiDpi display.

This fixes missing scrollbars when the calendar popup is full on HiDpi
displays.

https://bugzilla.gnome.org/show_bug.cgi?id=753305
2017-04-06 18:32:04 -07:00