Commit Graph

5807 Commits

Author SHA1 Message Date
Bastien Nocera
304b68eff9 portalHelper: Add security icon to titlebar
This adds a security icon (either secure or insecure) to the portal
helper's title bar. As soon as a part or all of the page and its content
is served insecurely, the icon shown will be a broken padlock.

https://bugzilla.gnome.org/show_bug.cgi?id=749197
2017-02-13 10:26:56 +01:00
Carlos Garnacho
0008ef70e1 windowManager: Use g-s-d wacom dbus helpers to update pad leds/oleds
This keeps feedback on the device itself in sync with the overall pad
state, a feature we had previously through g-s-d.

https://bugzilla.gnome.org/show_bug.cgi?id=776543
2017-02-10 23:55:04 +01:00
Carlos Garnacho
c3cdbd0dac windowManager: Handle MetaDisplay::show-osd signal
Propagate as-is to the OsdWindowManager.

https://bugzilla.gnome.org/show_bug.cgi?id=771098
2017-02-10 23:55:04 +01:00
Philip Chimento
aefd61c3db js: Avoid double declarations with let
The following code is a syntax error in ES6:

    let a = 'something';
    let a = 'other thing';

Previously GJS would silently accept this code, but in the next release the
SpiderMonkey JS engine will be more ES6-compliant.

https://bugzilla.gnome.org/show_bug.cgi?id=778425
2017-02-10 13:35:50 -08:00
Philip Chimento
f7752ac699 ibusManager: Use const correctly
Per ES6, a variable declared const should only be valid inside its lexical
scope. Previously, GJS would accept this code, but that will change in the
SpiderMonkey JS engine in the next release of GJS.

https://bugzilla.gnome.org/show_bug.cgi?id=778425
2017-02-10 13:19:08 -08:00
Robert Roth
01975b61f5 AppFavorites: order alphabetically by key 2017-02-06 09:40:43 +02:00
Rui Matos
7746f1a5c4 Make all our window clones use the MetaWindowActor as source
Using a MetaWindowActor's shaped texture as the source for window
clones means that if there are further MetaSurfaceActor children
(e.g. a wayland client using sub-surfaces) they don't get cloned.

This obviously wasn't an issue until wayland clients introduced the
possibility of having multiple MetaSurfaceActors under a
MetaWindowActor but there's no fundamental reason we can't clone the
toplevel actor.

WorkspaceThumbnail.WindowClone is the one class that was already using
the MetaWindowActor instead of the texture although it seems to have
been an unintended change in commit
8b99617513.

https://bugzilla.gnome.org/show_bug.cgi?id=756715
2017-02-02 14:28:00 +01:00
Rui Matos
b1dcea7cf1 background: Disconnect from 'prepare-for-sleep' signal
This signal connection was keeping Background instances from being
garbage collected.

https://bugzilla.gnome.org/show_bug.cgi?id=777934
2017-01-31 13:53:26 +01:00
Rui Matos
9f6f48025d background: Remove a couple of unused variables
Nothing uses these.

https://bugzilla.gnome.org/show_bug.cgi?id=777934
2017-01-31 13:48:11 +01:00
Piotr Drąg
93c66b3537 Fix a translator comment
They need to be exactly one line above a string to show up in .po files.
2017-01-28 02:01:14 +01:00
Carlos Garnacho
e0d7d28c20 windowManager: Avoid fullscreen animation if the window has no texture
There is hardly anything to animate, so just avoid the animation in this
case.

https://bugzilla.gnome.org/show_bug.cgi?id=777784
2017-01-26 17:51:39 +01:00
Carlos Garnacho
a82c564a73 windowManager: Avoid reentrancy on the ::size-changed handler
We have no guarantees on the number of ::size-changed signals that we may
receive, so the _sizeChangedWindow handler may run multiple times, which
leads to multiple calls to meta_plugin_size_change_completed(). So double
check the actor is not already being animated in the _sizeChangedWindow
handler to avoid reentrancy.

https://bugzilla.gnome.org/show_bug.cgi?id=777784
2017-01-26 17:51:39 +01:00
Bastien Nocera
49607e1313 portalHelper: Don't change the main window title
The title of the window should not be in control of a potentially
hostile hotspot provider, so only set the subtitle to be that of the
page, the main title will stay the same.

The subtitle will also be set to a URI, so that the hotspot cannot be
used to control the title shown in our UI.

Helps https://bugzilla.gnome.org/show_bug.cgi?id=749197
2017-01-24 13:36:09 +01:00
Bastien Nocera
a81f18592a portalHelper: Set a minimum window size
Even though the window is maximised when created, the window is still
resizable. This avoids making the window smaller than usable. If the
screen is smaller than the minimum window size, the maximise should make
it fullscreen and non-resizable.

https://bugzilla.gnome.org/show_bug.cgi?id=735233
2017-01-24 13:36:09 +01:00
Bastien Nocera
2ff988ef37 portalHelper: Use private data/cache directories
https://bugzilla.gnome.org/show_bug.cgi?id=775639
2017-01-24 13:36:09 +01:00
Peng Wu
f9a03f212c ibusCandidatePopup: handle mouse scroll event on candidates
When use mouse scroll button on input method candidates,
move the cursor up/down on candidates.

https://bugzilla.gnome.org/show_bug.cgi?id=776032
2017-01-19 15:18:43 +01:00
Bastien Nocera
d200fb1d14 portalHelper: Handle Ctrl+W/Ctrl+Q to close window
https://bugzilla.gnome.org/show_bug.cgi?id=764133
2017-01-19 14:04:34 +01:00
Ray Strode
2e332ffd12 Revert "objectManager: handle proxies coming and going"
This reverts commit 1ef6262139.

https://bugzilla.gnome.org/show_bug.cgi?id=772589
2017-01-09 22:34:40 -05:00
Ray Strode
1ef6262139 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-01-05 13:11:21 -05:00
Michael Catanzaro
da7db509e7 network: Avoid JS error when activating VPN connection
If the call to settings.get_connection_by_path in
ensureActiveConnectionProps returns null, we'll hit a JS error here.
Seems to happen always when activating a VPN connection. Avoid that.

Giovanni says:

"I believe this is papering over an existing bug, but it's possible for
settings.get_connection_by_path() to legitimately return null (if the
connection is owned by a different user and invisible to the current
one), so the fix is correct anyway."

https://bugzilla.gnome.org/show_bug.cgi?id=759793
2016-12-27 12:14:19 -06:00
Michael Catanzaro
cdd23d9cc7 appFavorites: add Calculator to rename list again
So far it's only the second app to be on the rename list twice, but no
doubt there will soon be more....
2016-12-12 18:48:51 -06:00
Michael Catanzaro
678670bf1b appFavorites: add Epiphany to rename list 2016-12-09 12:39:12 -06:00
Niels De Graef
04adeec8f5 appFavorites: add Geary in rename list
Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=775507
2016-12-07 14:48:46 +01:00
Florian Müllner
accd24e379 notificationDaemon: Keep source alive when replacing notification
When a GNotification has the same ID as a previous one, it should
be shown as a new notification after withdrawing the old one.
However for this to work, we must not destroy the corresponding
source if withdrawing the old notification lets the notification
count drop to zero, so make sure the source is kept alive until
the replace operation has completed.

https://bugzilla.gnome.org/show_bug.cgi?id=775149
2016-11-28 15:42:23 +01:00
Carlos Garnacho
e1e321d3a7 NotificationDaemon: create the application proxy asynchronously
Clicking on calendar notifications might block till the DBus request times
out if the application being poked happens to be non-responsive. Perform
this asynchronously so we don't block if that is the case.
2016-11-26 15:00:35 +01:00
Xiaoguang Wang
09e6bb5d56 appDisplay: Fix completion handler for empty animations
If an onComplete handler is passed to animate(), it is set to run at
the end of the animation via the icon grid's ::animation-done signal.
Currently the signal is connected after starting the animation, with
the result that the handler doesn't run when the animation completes
immediately (because there are no icons to animate). Fix this by only
starting the animation after connecting the signal.

https://bugzilla.gnome.org/show_bug.cgi?id=774381
2016-11-23 22:11:00 +01:00
Florian Müllner
e661d904de appDisplay: Use correct view for animation
We currently assume that the current view matches the 'app-picker-view'
setting. While that is usually the case, there is one notable exception:
While there isn't sufficient usage data (yet), we show all applications
instead of an empty frequent view regardless of the setting. We should
animate the actually visible icons in that case, not the (non-existent)
ones from the hidden frequent view.

https://bugzilla.gnome.org/show_bug.cgi?id=774381
2016-11-23 22:11:00 +01:00
Debarshi Ray
c4a07fad83 portalHelper: Use a constant for the host name and URI
https://bugzilla.gnome.org/show_bug.cgi?id=769940
2016-11-23 21:38:24 +01:00
Debarshi Ray
9ea8fdc1d1 portalHelper: Address intermittent TLS failures
Users are currently experiencing intermittent (and hard to debug) TLS
errors when loading the portal authentication page. This could be
caused by using http://www.gnome.org/ for our connectivity checks
because it redirects to HTTPS.

We can completely remove TLS from the equation by not using HTTPS.
http://nmcheck.gnome.org/ is a good choice because it doesn't redirect
to HTTPS and was created for NetworkManager's connectivity check.

https://bugzilla.gnome.org/show_bug.cgi?id=769940
2016-11-23 21:38:24 +01:00
Rui Matos
3d6bf43649 windowManager: Handle fullscreening from zero sized windows
Wayland clients can request their surfaces to be fullscreened before
commiting a buffer which means that we need to handle fullscreen
requests for which the old size is 0x0, preferably without warnings.

Since the mapping animation also runs for these windows, we can simply
bail out and ignore the fullscreen size change.

https://bugzilla.gnome.org/show_bug.cgi?id=770345
2016-11-23 18:43:11 +01:00
Rui Matos
7bc1d57ad7 windowManager: Fix fullscreen animations of wayland clients
Wayland clients are in control of their window size so the existing
mutter plugin API, which assumes size changes are synchronous, doesn't
work for them since when our size-change handler runs the MetaWindow's
size isn't final yet.

To fix this, the mutter plugin API was extended with a size-changed
vfunc that lets us know when the MetaWindow size has actually
changed. This way we can make the window snapshot and get the old
window size on the existing size-change handler and later, on the new
size-changed handler, get the new size and start the animation.

https://bugzilla.gnome.org/show_bug.cgi?id=770345
2016-11-23 18:43:07 +01:00
Florian Müllner
e5101eb407 animations: Guard against empty animations
Our animation code not only relies on the animation being loaded
(which we handle), but also on having at least one frame - otherwise
the computation of the next frame index will turn up NaN through
division by zero. Guard against this case by treating empty animations
as not loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=774805
2016-11-22 18:38:10 +01:00
Florian Müllner
d23bd4c4a6 runDialog: Mark error message as translatable
https://bugzilla.gnome.org/show_bug.cgi?id=774643
2016-11-17 22:14:30 +01:00
Florian Müllner
b6cd548186 network: Always show primary icon when connected
The top bar's network menu only supports a subset of device types
supported by NetworkManager. While not having lesser used options
in the menu itself is perfectly reasonable, not showing any network
icon at all in the top bar when the system is fully connected is
weird.

https://bugzilla.gnome.org/show_bug.cgi?id=773890
2016-11-10 14:32:07 +01:00
Florian Müllner
b3fabf11b1 network: Summarize sections with too many devices
Any network devices appear as top level items in the system status
menu, so on system with an unusually high number of devices, the
menu can end up exceeding the available screen height. While this
is a corner case, leaving important system actions unreachable is
bad. The system menu does not lend itself to scrolling, so handle
this case instead by summarizing sections ("n connections") where
the number of devices exceeds a threshold.

https://bugzilla.gnome.org/show_bug.cgi?id=773892
2016-11-10 14:32:07 +01:00
Florian Müllner
15be562fdf networkAgent: Invalidate VPN plugin cache on changes
Currently the cache is built once when the first VPN request is
handled, so plugins that are installed or uninstalled after that
aren't picked up. Fix this by invalidating the cache on changes
to the plugin directory.

https://bugzilla.gnome.org/show_bug.cgi?id=773893
2016-11-10 14:32:07 +01:00
Ray Strode
e33c68a415 popupMenu: don't handle key presses directly if there are modifiers
commit 1d58ea25ab changed the
popupMenu code to handle key presses on source actors directly.

This fixed keynav into the session gear menu at the login screen.

Unfortunately, it also causes spurious pop ups if a modifier happens
to be held down.

This commit checks for modifiers and short circuits the up front
key handling if any are found.

https://bugzilla.gnome.org/show_bug.cgi?id=740043
2016-11-07 14:01:23 -05:00
Carlos Garnacho
0b05b7a527 viewSelection: Handle touchpad 3-finger pinches
In order to show the overview, just like touchscreens do.

https://bugzilla.gnome.org/show_bug.cgi?id=765937
2016-11-04 16:35:11 +01:00
Carlos Garnacho
7e5274619a windowManager: Update API call
This function has now a more generic name, so it caters for both
swipe and pinch touchpad gestures.

https://bugzilla.gnome.org/show_bug.cgi?id=765937
2016-11-04 16:35:11 +01:00
Carlos Garnacho
e006b9b400 ui: Add PadOsd
This is an implementation of the pad OSD that's been previously
present in gnome-settings-daemon. Since things are moving closer
to the compositor, it makes sense to have this implemented as shell
UI.

https://bugzilla.gnome.org/show_bug.cgi?id=771067
2016-11-04 16:08:10 +01:00
Florian Müllner
347972e45f screenShield: Raise lightbox on blank
The lightboxes used for screen blanking are created during initialization
and shown each time the screen should blank. During the (potentially long)
time where the lightbox is hidden, any actor could be raised above the
lightbox - in particular any popup menu raises itself to the top when
opened. To not exclude those elements from screen blanking, raise the
lightbox every time it is shown.

https://bugzilla.gnome.org/show_bug.cgi?id=773875
2016-11-03 21:15:20 +01:00
Florian Müllner
ccacb5f6de background: Update animations when coming back from suspend
We currently reload animated backgrounds on timezone changes, but
there are other cases where the time can change unexpectedly and
the background no longer matches the time of day. One case we can
easily handle is when coming back from suspend, so do that.

https://bugzilla.gnome.org/show_bug.cgi?id=773265
2016-10-30 21:10:32 +01:00
Florian Müllner
205880e74e screenShield: Only allow graphs to lift shield when locked
Since commit 67615a0cbc, any printable key can be used to lift the
screen shield rather than just escape/enter/space. While this is
convenient for unlocking where the input is forwarded to the password
entry, it is potentially dangerous when the screen is inactive but
not locked: If the user types her password, the first character will
lift the shield and the remaining input will go to the focused window.
To prevent this from happening, only allow printable keys when the
screen is actually locked and restrict the key presses that lift the
shield to the original set of escape/enter/space otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=773328
2016-10-21 22:21:55 +02:00
Bastien Nocera
009d021e4f appDisplay: Add a menu item to launch on the discrete GPU
It will only show up when a discrete GPU is available (detected through
the switcheroo-control D-Bus service), and the application hasn't
alreayd been launched.

Note that this will not currently work for D-Bus activated applications,
eg. the menu item will be available, but the environment variable will
not be passed through to D-Bus to use when launching the application.

https://bugzilla.gnome.org/show_bug.cgi?id=773117
2016-10-21 19:26:49 +02:00
Bastien Nocera
39a840e2c3 shell-app: Add "discrete_gpu" option when launching apps
And adapt existing callers to the new API. This will allow us to
implement a way to launch applications on the discrete GPU for systems
where an "Optimus" system exists.

https://bugzilla.gnome.org/show_bug.cgi?id=773117
2016-10-21 19:26:49 +02:00
Florian Müllner
d769b72c43 extensionUtils: Use a unique 'subdir' to create new importers
Apparently importers for the 'same' path are shared, even when the
relative paths resolve to different absolute ones. Until this bug
is fixed properly, we can work around this by expressing the current
extension path as the UUID relative to the parent directory.

https://bugzilla.gnome.org/show_bug.cgi?id=772386
2016-10-18 19:19:32 +02:00
Philip Chimento
ed99bef458 extensionUtils: Remove ShellJS library
You can define a new importer object by importing a subdirectory in GJS.
This is undocumented, but it is likely to at least hold until the whole
thing moves to ES6 modules, after which we'll be able to do this purely
in JS with Reflect.Loader.

Since this was the only thing the ShellJS library did, we can remove it
altogether.

This allows us to discontinue use of the gjs-internals-1.0 embedder API.

https://bugzilla.gnome.org/show_bug.cgi?id=772386
2016-10-17 12:36:16 -07:00
victoryang
5b339c8371 authPrompt.js: turn off the ellipsization of pam messages
When the user gets long failure messages from pam, the authPrompt
message label will clip the message and ellipsize with '…'.

This commit turns off ellipsization from the label, so it will
properly wrap.

https://bugzilla.gnome.org/show_bug.cgi?id=764445
2016-10-14 09:28:34 -04:00
Bastien Nocera
9c6e68f3e7 bluetooth: Replace "Not In Use" status string with "On"
If Bluetooth is on but there aren't connected devices, the status in the
menu reads "Not in Use". This is potentially confusing: it's a negative
statement, even though Bluetooth is on. It also sits uneasily (and looks
even more confusing) next to the submenu item "Turn Off".

Changing the string to "On" is better.

https://bugzilla.gnome.org/show_bug.cgi?id=756432
2016-10-12 10:35:31 +02:00
Jonh Wendell
70526a8025 log(): Reimplement on top of GLib.log_structured
This allows us to pass metadata fields besides the message
to log. So, if the log() call is made from an extension,
pass the extension name and UUID to the logger.

This is useful for extension developers to debug their code
as well as to instruct their users to send debug info to them
by running something like this:

journalctl GNOME_SHELL_EXTENSION_UUID=<extension@uuid>

https://bugzilla.gnome.org/show_bug.cgi?id=770717
2016-10-11 10:17:12 -03:00
Jonh Wendell
c405081d89 extensionUtils: Allow getCurrentExtension() to be called from anyone
Currently it's assumed only an extension can call this method. However
it can be useful if any part of the shell want to know if it was invoked
by an extension.

https://bugzilla.gnome.org/show_bug.cgi?id=770717
2016-10-11 10:14:23 -03:00
Dan Williams
384e01b368 network: request periodic scans while the WiFi list is open
NM upstream would like to reduce periodic scanning, and that means
that clients should request scans themselves while their WiFi list
is open.  Similar to the Windows and macOS WiFi dialogs/lists.

https://bugzilla.gnome.org/show_bug.cgi?id=767918
2016-10-11 14:43:19 +02:00
Cosimo Cecchi
f819654ec8 osdWindow: always round-up sizes when updating allocation
This fixes the OSD window flickering horizontally at certain
resolutions.

https://bugzilla.gnome.org/show_bug.cgi?id=772287
2016-10-10 17:24:52 -07:00
Cosimo Cecchi
4670db6629 osdWindow: relayout when scale factor changes
We currently rely on the "monitors-changed" signal of LayoutManager to
relayout the OSD window. That is not enough, since the scale factor also
changes the way the OSD window is sized, and that can be updated after
"monitors-changed" has been received.
The visual effect is that under some circumstances, the OSD window will
have the wrong size under HiDpi.

This commit fixes the issue by triggering another relayout when the
scale factor changes.

https://bugzilla.gnome.org/show_bug.cgi?id=772723
2016-10-10 17:24:52 -07:00
Florian Müllner
d4ce51b1b7 altTab: Consider attached modals for window order
Similar to bug 667552 for the app switcher, attached modal dialogs
can result in an unexpected window order in the window switcher:
Selecting a window with an attached dialog will focus the dialog
instead, but as the dialog itself is ignored in the window list,
its last-used timestamp is not taken into account for the position
in the MRU list. Fix this by fetching the list of all NORMAL windows
and filter out skip-taskbar windows ourselves, while making sure that
windows appear in the position of their attached modal dialog where
appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=747153
2016-10-07 14:51:15 +02:00
Florian Müllner
d0bab1f7ac network: Initialize primary and VPN connections on startup
We only connect to the corresponding property notifications after both
Client and RemoteSettings are ready, so we may miss the initial signal
emission. Make sure to pick up the connections in this case to fix the
network indicator not showing up.

https://bugzilla.gnome.org/show_bug.cgi?id=772249
2016-09-30 13:50:30 +02:00
Florian Müllner
becd29c50a altTab: Skip unminimize effect when cycling to a window
Similar to windows on another workspace, selecting a minimized window
doesn't look quite right - the selected window disappears, then animates
back in. Fix this by adding support for skipping the next effect to the
wm and use it to bypass the unminimize animation.

https://bugzilla.gnome.org/show_bug.cgi?id=771536
2016-09-18 11:00:54 +02:00
Florian Müllner
a029a35050 altTab: Improve cycling to a window on another workspace
Both 'cycle-group' and 'cycle-window' shortcuts allow cycling through
windows on all workspaces. While this works, it looks quite broken
since we started showing clones for highlighting: the selected window
vanishes (when its clone is destroyed), then slides back in with its
workspace. Instead, slide the selected window to its workspace like
we do for the 'move-to-workspace-*' shortcuts.

https://bugzilla.gnome.org/show_bug.cgi?id=771536
2016-09-18 11:00:54 +02:00
Florian Müllner
d6a78d61d1 altTab: Restore correct visibility when cycling windows
Commit 3171819c improved window cycling by using a dedicated to clone
for highlighting rather than activating all cycled windows. Original
window actors are hidden while its clone is showing, and shown again
afterwards, however the latter is wrong for actors that are not supposed
to be visible (for example where the window is minimized, or on a different
workspace). Fix this by properly syncing the actor's visibility instead
of showing it unconditionally.

https://bugzilla.gnome.org/show_bug.cgi?id=771536
2016-09-18 11:00:54 +02:00
Florian Müllner
695bfb9616 extensionPrefs: Fix extension list width
ScrolledWindow changed its allocation behavior, and the extension
list only takes up the minimum width rather than the available
width as intended. To get the previous behavior back, we need
to set the newly added :propagate-natural-width property ...

https://bugzilla.gnome.org/show_bug.cgi?id=771391
2016-09-14 09:18:23 +02:00
Michael Catanzaro
cae4d92191 loginDialog: fix cancel button in ask for username mode
If the user clicks Not Listed? to enter ask for username mode, clicks
cancel, and then attempts to log in via the user list, the user will see
"Authentication failed" after correctly typing the password, and then
will become stuck in an empty screen with just the gray noise background.

The problem is, we forgot to disconnect from the signal that's waiting
for the next button to be pressed on the username entry screen. Since
the signal handler that executes here is expecting the username to be
input, and isn't prepared for us to have switched back to user list,
various bad things happen. We try to start two gdm-password
conversations at once, for instance, one using the user's password as
the username. I stopped investigating here, because it's easy to fix by
disconnecting from the signal at the right time.

https://bugzilla.gnome.org/show_bug.cgi?id=770328
2016-09-10 16:50:53 -05:00
Florian Müllner
06d0e7d74a telepathyClient: Always clear pending messages on destroy
Since commit 82950ecea, we acknowledge pending messages when closing a
chat notification for a channel we are handling to prevent the channel
from popping up again immediately. While this isn't an issue for channels
we don't handle, the unread messages of the destroyed notification are
still considered for the messages indicator in the top bar, which is
clearly confusing (in particular when we end up showing the indicator
without any notifications in the list). As it's arguably correct to not
meddle with a channel handled by someone else, just reset the cache of
pending messages to address this issue.

https://bugzilla.gnome.org/show_bug.cgi?id=770888
2016-09-09 23:54:28 +02:00
Rui Matos
02a51bfa65 windowManager: Fix windows not getting undimmed while hidden
Mutter's plugin destroy event doesn't happen if a window is hidden
when it gets unmanaged so we also need to handle the
MetaWindow::unmanaged signal to check whether the parent should
dimmed.

https://bugzilla.gnome.org/show_bug.cgi?id=752524
2016-09-09 17:17:07 +02:00
Rui Matos
dbd04df311 windowManager: Fix windows not getting undimmed in some cases
meta_window_foreach_transient() iterates through all transients of a
window, not only direct transients. This means that simply checking if
a transient is an attached dialog isn't enough because it might be a
non-direct transient for the window we're checking, in which case we
don't want to dim the window.

In particular this fixes windows not getting undimmed when they have
more that one level of transient children and the direct transient gets
destroyed. In that case we would still find at least one non-direct
transient child and decide to keep the window dimmed.

https://bugzilla.gnome.org/show_bug.cgi?id=770163
2016-09-09 17:17:06 +02:00
Florian Müllner
3171819c36 altTab: Don't mess up MRU order while cycling windows
Commit bd6e7f14d1 reimplemented the cycle keybindings to
fix cycling between more than two windows, but the approach
of highlighting cycled windows by actually focusing them has
the drawback that cycling messes up the MRU order of windows.
To fix this, only change the window focus when the operation
finishes, and use a dedicated actor that draws a border around
a window clone for highlighting.

https://bugzilla.gnome.org/show_bug.cgi?id=771063
2016-09-08 21:32:10 +02:00
Rui Matos
e4976b535d WorkspaceSwitcherPopup: allow input events to pass through
There's no particular reason for this actor to be reactive and thus
preventing input events to reach actors underneath, e.g. quickly
clicking on something while the popup isn't yet finished animating
out.

https://bugzilla.gnome.org/show_bug.cgi?id=770382
2016-09-08 19:29:50 +02:00
Carlos Garnacho
c3e68955e3 keyboard: Implement more of the wayland caribou adapter
Have it notify properly of changes to the current input source, as
well as exposing those in get_groups().

The support for virtual keyboard events has been replaced by
ClutterVirtualInputDevice, which can be thought of as the equivalent
to the XTEST devices in X11.

https://bugzilla.gnome.org/show_bug.cgi?id=765009
2016-08-10 11:23:58 +02:00
Florian Müllner
4fc0c513af Provide org.freedesktop.impl.portal.access implementation
If a sandboxed app requests access to some system resource (camera,
microphone, location), the portal frontend needs to ask the user
for permission. In GNOME, we want this to be a system modal dialog,
so provide an org.freedesktop.impl.portal.access implementation
that exposes a generic system modal permission dialog on the bus.

https://bugzilla.gnome.org/show_bug.cgi?id=768669
2016-07-20 17:14:12 +02:00
Florian Müllner
8347152730 calendar: Do not overload :active to mark selected day
We currently use the :active pseudo class to mark the selected day
in the calendar. Whenever the selected date changes, the class is
added to the corresponding button and removed from all others.
However when the selected date doesn't change (i.e. when clicking
the already selected date), the buttons are not updated and the
use of the :active class conflicts with StButton's builtin handling
of the class - the class is removed on the button up event and the
button is deselected.
Fix this by simply using a different pseudo class.

https://bugzilla.gnome.org/show_bug.cgi?id=746867
2016-07-08 16:11:43 +02:00
Florian Müllner
3d77dd8f51 calendar: Refresh calendar when ignored events changes
The last patch fixed marking days in the calendar where all
events are ignored, but it doesn't pick up the change when
an event is hidden. Emit an appropriate change notification
to fix this issue.

https://bugzilla.gnome.org/show_bug.cgi?id=768538
2016-07-08 15:01:32 +02:00
Florian Müllner
82e6935281 calendar: Move handling of ignored events to event source
Ignoring events is currently implemented in the message list's
event section, which means that the calendar does not consider
ignored events when marking days with events. In order to fix
this, move the handling of ignored events to the event source,
which is shared between both components.

https://bugzilla.gnome.org/show_bug.cgi?id=768538
2016-07-08 15:01:32 +02:00
Florian Müllner
128697d6a7 osdWindow: Use a constraint to enforce ratio
Commit 9b07ce1d0d broke the code that keeps the OSD window square.
Use that opportunity to move away from the hack of setting the
min-height style property from code and adjusting the width on
allocate, and implement a proper constraint instead.

https://bugzilla.gnome.org/show_bug.cgi?id=768317
2016-07-05 20:46:57 +02:00
Florian Müllner
424fa01eca osdWindow: Fix blurry level bar
ClutterActor:width is a floating point property, so it will not be
automatically rounded to non-fractional values that properly align
to pixels. To fix the resulting blurriness, add explicit rounding.

https://bugzilla.gnome.org/show_bug.cgi?id=768317
2016-07-05 20:41:13 +02:00
Florian Müllner
775187b2e4 osdWindow: Fix level bar width
Commit 9b07ce1d0d changed the OSD window's level bar to be a regular
actor instead of a custom drawn bar. The bar actor's width depends on
both the configured level (e.g. 40%) and the available width, however
the width is currently only updated when the configured level changes.
Fix that by properly considering changes to the parent's width as well.

https://bugzilla.gnome.org/show_bug.cgi?id=768317
2016-07-05 17:47:44 +02:00
Florian Müllner
99b5e10acf overview: Move ::scroll-event signal handling (again)
Commit c39ffa111 moved the signal handling from the controls- to the
background-group to enable scrolling on non-primary monitors.
However this broke scrolling on reactive overview elements as the
workspace switcher, as they're not descendants of the background.
To fix, move scroll-event handling to the overview group itself,
which is the common ancestor of all overview elements.

https://bugzilla.gnome.org/show_bug.cgi?id=768316
2016-07-05 17:47:44 +02:00
Owen W. Taylor
61fb62f969 Restart: fix maximized windows flickering to the wrong struts
When we restart, we need to update the struts for the screen before
we enter the main loop, or maximized windows will get resized to the
size of the screen without struts, then resized back.

A workaround is needed for a Clutter bug that occurs when we get
the size of an actor before the first paint of the stage.

https://bugzilla.gnome.org/show_bug.cgi?id=761566
2016-06-30 14:17:19 -04:00
Kalev Lember
ab68360d53 endSessionDialog: Add support for system upgrades
https://bugzilla.gnome.org/show_bug.cgi?id=763611
2016-06-30 11:42:11 +02:00
Kalev Lember
58a733dc93 endSessionDialog: Use new PackageKit DBus API
https://bugzilla.gnome.org/show_bug.cgi?id=763611
2016-06-30 11:33:07 +02:00
Kalev Lember
db8f6b4848 endSessionDialog: Rename a variable
https://bugzilla.gnome.org/show_bug.cgi?id=763611
2016-06-30 11:33:06 +02:00
Hyungwon Hwang
e72d388a67 background: free MetaBackground explicitly when its MetaBackgroundActor is destroyed
The memory which MetaBackground resides is freed automatically, when its
wrapper object Background is freed by garbage collection. But because the
memory for MetaBackground is huge, changing the background or changing the
background mode repeatedly makes a lot of memory to be in use until garbage
collection runs.

This patch frees the MetaBackground object explicitly when its
MetaBackgroundActor is destroyed which is the moment that the memory in the
object is not used anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=766353

Signed-off-by: Hyungwon Hwang <hyungwon.hwang7@gmail.com>
2016-06-29 13:27:10 +02:00
Rui Matos
b5dd4d1456 screenShield: Chain up Arrow's style_changed vfunc
This makes style changes propagate to our child widget as they
should.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2016-06-28 19:53:17 +02:00
Rui Matos
a7562b4148 screenShield: Stop using an offscreen buffer for the arrow actor
This isn't a performance critical actor and the NVIDIA driver discards
offscreen buffers in some cases which would require us to go through
extra hoops to handle here which isn't worth it.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2016-06-28 19:53:17 +02:00
Rui Matos
358f64d66b main: Reload theme on video memory purge errors
The theme machinery uses FBOs in some cases (mainly for shadows) which
need to be reloaded if we get a video memory purged error.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2016-06-28 19:53:17 +02:00
Florian Müllner
21ddbf0b8f workspacesView: Consider workspaces-only-on-primary when panning
It is odd to switch workspaces on the primary monitor when panning on
a monitor without workspaces, so reject the gesture on non-primary
monitors when workspaces-only-on-primary is disabled.

https://bugzilla.gnome.org/show_bug.cgi?id=766883
2016-06-27 16:31:00 +02:00
Florian Müllner
2ad2853278 workspacesView: Consider workspaces-only-on-primary when scrolling
It is odd to switch workspaces using the scroll wheel when the pointer
is on a monitor without workspaces, so only handle scroll events on
non-primary monitors when workspaces-only-on-primary is disabled.

https://bugzilla.gnome.org/show_bug.cgi?id=766883
2016-06-27 16:31:00 +02:00
Florian Müllner
e16f63a8e4 workspacesView: Allow activating empty workspaces on any monitor
We allow activating a workspace by clicking it when we know that
the user did not try to select a window and missed (namely: the
workspace is empty). However we currently always check for an
empty workspace on the primary monitor, which doesn't make sense
when the click happened on a different monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=766883
2016-06-27 16:31:00 +02:00
Florian Müllner
c39ffa111f overview: Move overview actions and scrolling to background group
Both the Overview::scroll-event and actions added via addAction()
are meant to work anywhere in the overview, but for now only work
on the primary monitor. Move the handling to the background group
that is known to span all outputs to fix.

https://bugzilla.gnome.org/show_bug.cgi?id=766883
2016-06-27 16:31:00 +02:00
Florian Müllner
5182129196 overview: Remove stack actor
The stack was used to overlay a message indicator over the overview
group. That indicator is long gone, so there's no longer a need for
an intermediate actor in the hierarchy.

https://bugzilla.gnome.org/show_bug.cgi?id=766883
2016-06-27 16:31:00 +02:00
Florian Müllner
02bad8e92b workspacesDisplay: Cancel click when panning
When switching between workspaces via panning, we don't want to
leave the overview when we end up on an empty workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=766883
2016-06-27 16:31:00 +02:00
Rui Matos
500ea13155 workspacesView: Initialize the adjustment's upper bound
Initializing the upper bound to zero means that on panning we'd start
scrolling from the first workspace even if the current workspace when
entering the overview was different since StAdjustment clamps the
value to be inside bounds.

https://bugzilla.gnome.org/show_bug.cgi?id=766883
2016-06-27 14:43:17 +02:00
Rui Matos
408211ba73 Arrow: compute a paint volume that accounts for the shadow
Otherwise the shadow gets clipped to the actor's allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=767954
2016-06-23 18:57:05 +02:00
Rui Matos
e02467eada ScreenShield: fix setting each arrow's opacity on _animateArrows()
https://bugzilla.gnome.org/show_bug.cgi?id=767954
2016-06-23 18:57:04 +02:00
David Woodhouse
2705434955 NetworkAgent: Handle VPN service aliases
A VPN plugin can support multiple services, indicated by an 'aliases' key.

We need to be able to spawn the appropriate auth-dialog for these aliases,
as well as the base service.

Covered as an afterthought (from comment 57) in
https://bugzilla.gnome.org/show_bug.cgi?id=658484

See also https://bugzilla.gnome.org/show_bug.cgi?id=746664 and
https://bugzilla.gnome.org/show_bug.cgi?id=767197
2016-06-03 18:27:46 +01:00
Cosimo Cecchi
2ea6ae05e5 keyboard: save the MRU input sources list when switching
And restore it when reloading the current list of sources, if
appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=766826
2016-05-27 10:46:58 -07:00
Cosimo Cecchi
5c0eba7d3b keyboard: add an interactive argument to input source activation
This is useful to differentiate between a change due to user interaction
or automatic loading.

https://bugzilla.gnome.org/show_bug.cgi?id=766826
2016-05-27 10:46:58 -07:00
Cosimo Cecchi
f81887772a keyboard: split out a function to udpate the MRU list
We're going to add saving of the MRU list in the function in a later
commit.

https://bugzilla.gnome.org/show_bug.cgi?id=766826
2016-05-27 10:46:58 -07:00
Cosimo Cecchi
9aa3d864dc keyboard: split out a function
We're going to use this in a later commit.

https://bugzilla.gnome.org/show_bug.cgi?id=766826
2016-05-27 10:46:58 -07:00
Florian Müllner
2425b11df6 system: Do not disable suspend action when locked
gnome-settings-daemon now allows the corresponding keybinding, so
for consistency it makes sense to show the button as well.

https://bugzilla.gnome.org/show_bug.cgi?id=725960
2016-05-27 17:04:47 +02:00
Florian Müllner
1cb644529f loginManager: Extend canSuspend() callback
The underlying logind API does not only indicate whether suspend is
available, but also whether the user is eligible for executing the
operation without further authentication. This information can be
relevant, so pass it to the callback.

https://bugzilla.gnome.org/show_bug.cgi?id=725960
2016-05-27 17:04:46 +02:00
Florian Müllner
437256e0f1 location: Update for PermissionStore DBus API changes
As xdg-app has been renamed to Flatpak, the permission store's
bus name and interface name have been changes as well.

https://bugzilla.gnome.org/show_bug.cgi?id=766598
2016-05-27 15:31:50 +02:00
Florian Müllner
841e0132e9 network: Improve labels for Bluetooth devices
Bluetooth is not "Mobile Broadband", so rename the settings link
accordingly. Also use a more assertive connect label.

https://bugzilla.gnome.org/show_bug.cgi?id=757019
2016-05-27 01:03:25 +02:00
Michele Gaio
1545596c7e AppIconMenu: properly destroy on source destroy.
If the source actor is destroyed while the popupMenu is shown -- this
can happen if a non favorite application was closing or crashes -- the
menu actor is improperly destroyed.

This makes the popupMenu close first and does a clean ungrab instead.

https://bugzilla.gnome.org/show_bug.cgi?id=757556
2016-05-27 01:03:25 +02:00
Iain Lane
38406e070c Use the org.gnome.desktop.calendar schema instead of our own
This setting is now shared by Shell and Calendar.

https://bugzilla.gnome.org/show_bug.cgi?id=766318
2016-05-26 23:05:24 +02:00
Cosimo Cecchi
9b07ce1d0d osdWindow: don't use custom cairo drawing
We can just set the width on a regular actor inside the StBin.

https://bugzilla.gnome.org/show_bug.cgi?id=758471
2016-05-20 17:28:06 -07:00
Florian Müllner
bf8d30603e windowManager: Avoid code duplication
The various switcher keybindings are handled identically, except for
the popup that is shown; update the code to reflect that instead of
duplicating the code again and again.

https://bugzilla.gnome.org/show_bug.cgi?id=730739
2016-05-19 17:34:00 +02:00
Florian Müllner
bd6e7f14d1 altTab: Take over cycle-windows/cycle-group keybindings
The code to handle cycling through windows without showing a popup
was removed from mutter a while ago, which left the corresponding
keybindings mostly broken (i.e. they now only switch between two
windows). With the various switch-foo keybindings handled by the
shell, it is now easier to take over the cycle-foo keybindings as
well.

https://bugzilla.gnome.org/show_bug.cgi?id=730739
2016-05-19 17:34:00 +02:00
Victor Toso
ddea54a539 ScreenShield: set LockedHint property from systemd
Logind recently got support for a hint property in Session Object to
inform if session is Locked or not. It is up to desktop environments
to keep this property up to date.

https://bugzilla.gnome.org/show_bug.cgi?id=764773
2016-05-12 15:24:06 +02:00
Marek Chalupa
1883df2927 dnd: Cancel the animation on drag actor destruction
If the drag actor is destroyed before the animation
callback is called, the callback is never called and
we're sticked with dnd grabing the events after we
dropped the target.

https://bugzilla.gnome.org/show_bug.cgi?id=757676
2016-04-27 18:22:00 +02:00
Florian Müllner
9c483dd9a6 system: Only show rotation lock when a builtin output is present
We currently show the orientation lock button when an accelerometer
is present, however gnome-settings-daemon's xrandr plugin only applies
rotation when a builtin monitor is present. Update the button's
visibility to match gnome-settings-daemon.

https://bugzilla.gnome.org/show_bug.cgi?id=765267
2016-04-21 21:16:50 +02:00
Florian Müllner
8fd6e93fbe workspaceThumbnail: Fix size request signatures
ClutterLayoutManager's size request methods have an additional container
argument before the for-width/height parameters compared to ClutterActor.

https://bugzilla.gnome.org/show_bug.cgi?id=763068
2016-04-21 16:04:04 +02:00
Heiher
a23b293fe2 modalDialog: Fix invalid argument 'timestamp' for pushModal
https://bugzilla.gnome.org/show_bug.cgi?id=722752
2016-04-14 11:10:51 +02:00
Florian Müllner
82950ecea0 telepathyClient: Acknowledge messages before closing
While a channel has pending messages, it will pop up again when
dismissed. That is clearly not what users expect, so clear them
out first before closing a channel.

https://bugzilla.gnome.org/show_bug.cgi?id=747991
2016-03-16 18:59:44 +01:00
Florian Müllner
75ba75900c extensionPrefs: Stop using custom CSS
GTK+ now has a documented CSS class for circular buttons that we can
use for the preference buttons instead of custom CSS.
2016-03-10 18:16:33 +01:00
Zeeshan Ali (Khattak)
ff19e411a2 location: Style reason label
https://bugzilla.gnome.org/show_bug.cgi?id=762480
2016-03-10 15:24:21 +00:00
Zeeshan Ali (Khattak)
64741e41df location: Replace description w/ privacy note
https://bugzilla.gnome.org/show_bug.cgi?id=762480
2016-03-10 14:51:32 +00:00
Florian Müllner
be483c4137 legacyTray: Style the slider's child, not the slider
This avoids jiggling when showing/hiding the tray. Based on a
suggestion from maxnevesnunes@gmail.com in bug 750022.

https://bugzilla.gnome.org/show_bug.cgi?id=747957
2016-03-03 17:09:47 +01:00
Zeeshan Ali (Khattak)
3492121c3f location: Only ask user once
Let's make it really simple and ask user interactively, once. This
simplifies things for:

* Privacy panel of gnome-control-center as it doesn't have to filter
  applications.

* Apps: If they are denied access, they can simply point users to
  privacy panel of gnome-control-center since they can be sure location
  access for the app can be enabled in there.

Also it's less annoying to user. Before this patch, if they denied
access to application, they had to keep doing that at least each time
they launched the application.

https://bugzilla.gnome.org/show_bug.cgi?id=762559
2016-03-03 16:06:20 +00:00
Zeeshan Ali (Khattak)
4eb6c0c4ee location: Put app permission in GNOME table
Alex told me that since it's not geoclue but rather GNOME-components
storing/accessing app permissions, it's better if we put it under
'gnome' rather than generic 'desktop' table.
2016-02-22 22:55:09 +00:00
Florian Müllner
d8960b396b windowManager: Only animate dimming changes when necessary
Now that we no longer skip dimming/undimming windows while showing
the overview, we can still save a bit of work by changing the dimming
without animation while the window is hidden.

https://bugzilla.gnome.org/show_bug.cgi?id=762475
2016-02-22 19:42:57 +01:00
Florian Müllner
4c29604e1e windowManager: Always check dimming when an attached modal opens/closes
We skip window animations while the overview is shown (and the window
group is hidden) to avoid unnecessary work. However when an attached
modal dialog is opened or closed, this involves checking whether the
parent window should be dimmed - skipping that test means that we can
simply fail to dim or undim a window altogether, so do that check
unconditionally.

https://bugzilla.gnome.org/show_bug.cgi?id=762475
2016-02-22 19:42:57 +01:00
Florian Müllner
ede0bf2d88 messageList: Add missing import
We lost that when code was split out from calendar.js ...
2016-02-22 19:33:17 +01:00
Florian Müllner
0edbdc529e location: Add translator comments
https://bugzilla.gnome.org/show_bug.cgi?id=762270
2016-02-18 17:37:29 +01:00
Zeeshan Ali (Khattak)
a1e8c79d38 location: Ask user to authorize applications
While we could have implemented this already a while ago, this would
have been a completely false security mechanism since we had no way of
reliably identifying applications. Since now with xdg-app, we can at least
reliably identify bundled applications, let's give users a choice of
which applications in particular they are OK with giving location data
to.

While we still can't reliably identify system (non-xdg-app) applications,
it seems extremely unlikely we'll ever be able to do that (at least not
in the near future) so we'll have to trust them to not lie about their
IDs.

Next release of geoclue will take the ID of bundled application directly
from corresponding xdg-app metadata so bundled applications can't simply
lie about their IDs.

https://bugzilla.gnome.org/show_bug.cgi?id=762119
2016-02-18 15:11:11 +00:00
Zeeshan Ali (Khattak)
34fc454764 location: Add AppAuthorizer class
This class will be responsible for authorizing applications that try to
access location information. Since this is mainly targetted for xdg-app
applications, we make use of xdg-app's D-Bus API to store
per-application authorization.

https://bugzilla.gnome.org/show_bug.cgi?id=762119
2016-02-18 15:11:11 +00:00
Zeeshan Ali (Khattak)
e98a434ede location: Add dialog to ask for location data access
Add a dialog that is used in a following patch, to ask user if they want
a requesting application to gain access to their location.

Co-author: Florian Müllner <fmuellner@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=762119
2016-02-18 15:11:10 +00:00
Rui Matos
1bf27b1f18 ibusCandidatePopup: Handle relative cursor signal absence gracefully
Only recent IBus versions have support for this signal
which is used for wayland clients. In order to work
with older IBus versions we can silently ignore the
signal's absence.

https://bugzilla.gnome.org/show_bug.cgi?id=753476
2016-02-17 18:01:02 +01:00
Florian Müllner
3ecdfaffd2 calendar: Add Media section
We lost media controls outside of notification banners when
implementing the new notification designs. Reimplement this
functionality as a dedicated "Media" section in the message
list based on MPRIS.

https://bugzilla.gnome.org/show_bug.cgi?id=756491
2016-02-17 15:15:16 +01:00
Florian Müllner
ee8fd1e613 calendar: Split out message list base classes
Currently both the base classes for messages/sections and the message
list itself that instantiates the available sections are located in
the same module. As a result, it isn't possible to define sections
in a different module without introducing circular dependencies. The
Calendar module is already unwieldily large, so split it up a bit to
avoid it growing even bigger in the future.

https://bugzilla.gnome.org/show_bug.cgi?id=756491
2016-02-17 14:56:52 +01:00
Zeeshan Ali (Khattak)
ccfd5e35d6 location: Better name for a field
_proxy -> _managerProxy.

https://bugzilla.gnome.org/show_bug.cgi?id=762119
2016-02-17 13:04:16 +00:00
Florian Müllner
30c7545ff3 audioDeviceSelection: Add audio device selection dialog
It is not always possible to determine the type of audio device that
got plugged in. Add a system modal dialog to query the user in that
case and export in on the bus to gnome-settings-daemon.

https://bugzilla.gnome.org/show_bug.cgi?id=760284
2016-02-16 17:02:00 +01:00
Rui Matos
a13357c2a8 ibusCandidatePopup: Add support for relative cursor positioning
IBus now provides a new method for cursor positioning where the
coordinates are relative to the focused window. This is useful for
wayland clients which don't have access to their global coordinates.

https://bugzilla.gnome.org/show_bug.cgi?id=753476
2016-02-15 18:06:53 +01:00
Michael Catanzaro
75dc5c16c8 appFavorites: Update Nibbles in rename list 2016-02-12 20:17:02 -06:00
Jakub Steiner
acd5d70209 theme: use update icon for app grid
https://bugzilla.gnome.org/show_bug.cgi?id=761772
2016-02-12 12:12:02 +01:00
Florian Müllner
669d20bcf0 extensionPrefs: Fix prefs button 2016-02-11 15:01:53 +01:00
Mario Sanchez Prada
779b1ae8e5 slider: Emit a 'drag-begin' signal when starting to drag
We are already emitting a 'drag-end' signal when no more dragging
is happening, so it makes sense to emit a 'drag-begin' too when
starting, so that apps interested in implementing different logic
between those two events can easily do it without needing to deal
with the underlying 'button-press-event' signal for the actor.

https://bugzilla.gnome.org/show_bug.cgi?id=761208
2016-01-27 22:35:11 +00:00
Michael Catanzaro
c65a9c4d2e authPrompt: Do not allow bypassing disabled Sign In button
The Next and Sign In buttons are disabled when the username/password
field is empty. However, the user can still bypass this button by
pressing the enter key, leading to some odd glitches with the log in
for 'Not Listed?' users.

This is easy to fix by simply not progressing to the next screen when
the button is disabled.

https://bugzilla.gnome.org/show_bug.cgi?id=746180
2016-01-07 17:19:04 -06:00
Marek Černocký
0085a94706 Add flag no-javascript-format for date string 2016-01-04 19:41:49 +01:00
Florian Müllner
a36686a6aa extensionSystem: Fix updating extension list on session update
Before reenabling all extensions, we update the list of enabled extensions
to catch any changes that happened while extensions were enabled. However
this is currently broken as onEnabledExtensionsChanged() is a nop while
disabled, so just call getEnabledExtensions() directly.
2015-12-16 23:50:42 +01:00
Carlos Garnacho
9d203ddc0f workspace: Keep track of the dragging touch sequence
draggable.startDrag() is called directly here (i.e. manualMode is not set),
we must keep track of the touch event and pass it to startDrag() then.

https://bugzilla.gnome.org/show_bug.cgi?id=756748
2015-12-04 12:16:56 +01:00
Carlos Garnacho
508a13ae72 dnd: Implement touch event support
We need to keep track of the pointer emulating touch sequence. In order
to have events properly redirected on touch devices, the
Clutter.grab_pointer and ungrab_pointer() have been replaced by the grab()
and grab_sequence() ClutterInputDevice methods, one or the other is used
depending on the device triggering DnD.

An extra "sequence" argument has been added to startDrag, passing null here
will resort to pointer grabs.

This is enough to make thumbnails in the WorkspaceBox draggable through
touch.

https://bugzilla.gnome.org/show_bug.cgi?id=756748
2015-12-04 11:50:13 +01:00
Carlos Garnacho
c0b50cbdf2 workspaceThumbnail: Enable activation of thumbnails in the WorkspaceBox
We need a separate handler for TOUCH_BEGIN/END events.

https://bugzilla.gnome.org/show_bug.cgi?id=756748
2015-12-04 11:50:13 +01:00
Carlos Garnacho
06f78549bd workspaceThumbnail: Enable activation of window clones on touch
We must handle the TOUCH_END event separately for the evdev input
backend.

https://bugzilla.gnome.org/show_bug.cgi?id=756748
2015-12-04 11:50:13 +01:00
Carlos Garnacho
67afd7a6d8 popupMenu: Fix touch handling of PopupSubMenuMenuItem
It overrides ::button-release-event in order to implement the
hidden/shown toggling, it must do the same on TOUCH_END, otherwise
menus stay shown on touch.

https://bugzilla.gnome.org/show_bug.cgi?id=756748
2015-12-04 11:50:13 +01:00
Carlos Garnacho
ffa8c2f2b1 workspacesView: Return from overview when tapping on an empty workspace
This works for pointers and touch on X11, there is however no pointer
emulation on evdev, so touch triggers ::clicked with button==0 which
is ignored.

https://bugzilla.gnome.org/show_bug.cgi?id=756748
2015-12-04 11:50:12 +01:00
Michael Catanzaro
3803a880e8 loginDialog: Reconsider user for user list when user changes
Generally a user-changed operation will be uninteresting, but if the
user is currently in the user list and the account changes to locked, we
want to remove it from the list, or if the user is not in the list and
the account changed to unlocked, we want to add it to the list. This
fixes the case where a new user account created in gnome-control-center
does not appear in the user list. The password mode is set in the new
account immediately after it is created, but the operations are not
atomic, so the login dialog considers the new user account when it is
still locked and rejects it from being displayed, then immediately
afterwards the account is unlocked. This commit causes the login dialog
to show the account when this occurs.

The containsUser() check here is not strictly necessary, but reduces
spurious calls to addUser() and removeUser(), since there's no easy way
to check if the locked status of the account has changed (as it's much
easier to connect to one signal on the UserManager than to
notify::locked on each User object).

https://bugzilla.gnome.org/show_bug.cgi?id=758568
2015-12-02 18:23:36 +01:00
Florian Müllner
965aedb0bb background: Reload animation on timezone changes
Animated backgrounds are based on a start time in local time - in case
of a timezone change, that time is no longer accurate. To fix, we need
to either make BGSlideShow aware of timezone changes (and notify us to
update the animation), or just reload the animation - timezone changes
should be a rare event, so go with the simpler second option.

https://bugzilla.gnome.org/show_bug.cgi?id=758939
2015-12-02 17:18:39 +01:00
Florian Müllner
80911535a7 altTab: Fix window-switcher on HiDPI displays
We need to take the scale factor into account to avoid tiny window
previews on HiDPI.

https://bugzilla.gnome.org/show_bug.cgi?id=758676
2015-12-02 10:31:36 +01:00
Michael Catanzaro
e1e08f0a68 loginDialog: Fix TypeError when user is deleted
LoginDialog has a private _user, but UserListItem has a public user.
Easy to get wrong since _user would be the right thing to type in 90% of
this file.
2015-11-23 17:44:49 -06:00
Bastien Nocera
31201d9618 power: Add battery percentage label
An oft requested feature, available in 4 separate extensions to
gnome-shell, and in most mobile OSes.

https://bugzilla.gnome.org/show_bug.cgi?id=735771
2015-11-19 14:04:22 +01:00
Michael Biebl
d7401c8646 Revert "power: Stop making time estimates"
This reverts commit 6c08799c7b.

See https://bugzilla.gnome.org/show_bug.cgi?id=708472#c87
2015-11-17 13:16:45 +01:00
Bastien Nocera
a456d5eb19 bluetooth: Remove unused imports
https://bugzilla.gnome.org/show_bug.cgi?id=758220
2015-11-17 11:25:02 +01:00
Florian Müllner
6c08799c7b power: Stop making time estimates
Any time estimates we can come up with are notoriously unreliable;
even on devices that report correct (dis)charging rates, any change
in workload, screen brightness etc. can throw our estimate off by
a huge amount. This is further compounded by bad firmware and battery
firmware which reports inaccurate data as neither Windows nor Android do
not use that data.

So instead, limit ourselves to only showing the current percentage
and leave its interpretation to the user.

As an added bonus, we end up with shorter strings that are less likely
to cause problems with ellipsization when translated.

https://bugzilla.gnome.org/show_bug.cgi?id=708472
2015-11-17 10:58:45 +01:00
Florian Müllner
8d7bb6496c autorunManager: Follow Files' notification policy
Builtin chat and network notifications already follow the notification
policy of appropriate applications, it makes sense to do the same for
autorun notifications to give users control over hotplug notifications
in Settings.
2015-11-17 00:00:31 +01:00
Bastien Nocera
78db025b10 appFavorites: Add gnome-terminal to the rename list
https://bugzilla.gnome.org/show_bug.cgi?id=745626
2015-11-14 19:53:41 +01:00
Bastien Nocera
9ba399bf18 power: Add thin space between digits and percentage sign
As mentioned by Matthias Clasen on IRC, we should have a thin space
between the percentage digits and the sign itself.

https://bugzilla.gnome.org/show_bug.cgi?id=757816
2015-11-12 16:19:30 +01:00
Bastien Nocera
8ceae3b054 bluetooth: Show the Bluetooth menu when there were setup devices
If we detected that Bluetooth devices were setup, show the Bluetooth
menu so that users can easily turn Bluetooth back on.

This is a bit of a hack, as we cannot detect whether there is a
Bluetooth adapter at all when it's disabled, so we cannot tell whether
there were any Bluetooth devices setup, at some point. This state is
saved in the gnome-shell GSettings in the had-bluetooth-devices-setup
key.

Checking whether we saw Bluetooth devices at one point is a good
enough guess of whether there will be some in the future.

https://bugzilla.gnome.org/show_bug.cgi?id=723848
2015-10-28 11:51:07 +01:00
Bastien Nocera
3e602b1765 calendar: Fix number formatting in some languages
Some languages require using a conversion modifier to display the day
number in a translated shape. fa_IR is affected for example.

https://bugzilla.gnome.org/show_bug.cgi?id=673235
2015-10-26 17:48:40 +01:00
Rui Matos
0c72d1fcbd ActivitiesButton: fix overview being toggled while still animating
Adds the missing checks for whether we should toggle the overview, on
button and key release.

https://bugzilla.gnome.org/show_bug.cgi?id=756925
2015-10-23 13:44:27 +02:00
Florian Müllner
0b9e68e305 runDialog: Reload resource on 'rt'
Moving the default theme to a resource broke the 'rt' command;
reload the resource before the theme to fix it.

https://bugzilla.gnome.org/show_bug.cgi?id=738942
2015-10-21 20:54:30 +02:00
Ray Strode
5b7a052e18 animation: do spinner animation with low priority
It's very unexpected that a spinner animation would
preempt idles from running.

This commit runs the spinner animation with a low
priority to ensure it doesn't take over the main
loop.

https://bugzilla.gnome.org/show_bug.cgi?id=754814
2015-10-20 17:10:06 -04:00
Ray Strode
6f26e39082 animation: Run every 16ms not ever 14ms
Right now the spinner animation updates every 14ms.
60 frames per second would be one frame per 16.667ms,
so we're waking up more frequently than we need to.

This commit changes the wakeup to happen after 16ms.

https://bugzilla.gnome.org/show_bug.cgi?id=754814
2015-10-20 17:10:06 -04:00
Ray Strode
489b96a310 gdm: don't emit start-session-when-ready from idle function
There's no point in delaying the emission.  We should do it
right away.

https://bugzilla.gnome.org/show_bug.cgi?id=754814
2015-10-20 17:10:06 -04:00
Rui Matos
9c74e22313 windowMenu: Ensure the source actor isn't sized 0x0
If the source actor is sized 0x0, the grabHelper will close the menu
on button release if the menu ends up flipped because in that case the
release event happens when the pointer is neither over the source
actor (since it's 0x0) or over the menu actor. A zero sized source
actor works for the non-flipped menu case because the menu's actor
itself ends up underneath the pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=756605
2015-10-20 15:00:33 +02:00
Cosimo Cecchi
83e7f6f496 windowManager: fix fullscreen clone being left around
If we get another effect on the same actor, we should make sure to
remove the clone through the "overwrite" methods provided by Tweener, or
there will be a race that might end up with a stray clone being left
around.

https://bugzilla.gnome.org/show_bug.cgi?id=756714
2015-10-16 13:47:14 -07:00
Florian Müllner
1c3ea1649f windowManager: Fix fullscreen animations on dualscreen
The translation should describe the difference between the fullscreened
and unfullscreened position of the window - however we are currently
assuming a fullscreen position of (0, 0) instead of the monitor's origin,
which causes glitches on dualscreen setups.

https://bugzilla.gnome.org/show_bug.cgi?id=756697
2015-10-16 15:50:39 +02:00
Florian Müllner
f8e5e3e435 aggregateMenu: Ignore ellipsizable items in width-request
Some labels in the system status menu - namely network names - are out
of our control, and may thus grow the width "infinitively" unless we
restrict the menu width. So far we have been doing this by setting a
fixed width or max-width, but any value we put there might end up
being too restrictive in some locales. Instead, request a width that
fits all the labels we want to show unellipsized and use that instead
of an arbitrary limit.

https://bugzilla.gnome.org/show_bug.cgi?id=708472
2015-10-15 19:56:03 +02:00
Cosimo Cecchi
207c847762 windowManager: add animations for fullscreen and unfullscreen
We use the newly introduced feature from Mutter to hook up our own
fullscreen and unfullscreen animations.
To give the illusion of a transition as smooth as possible, we create a
snapshot of the current contents of the actor before its state is
changed, and crossfade between the two states while the size changes.

https://bugzilla.gnome.org/show_bug.cgi?id=707248
2015-10-14 12:10:58 -04:00
Michael Catanzaro
50b59e0ca6 batch: Add old commit message as comment at top of file
This is a lightly-edited version of Ray's commit message in
4902a600d5.
2015-10-13 14:43:39 -05:00
Florian Müllner
14c52bb00a dash: Ensure style for icon size computation
StIcon will skip loading the texture when its theme node is unset (which
may happen on style changes while the widget is hidden). While our size
request to compute the dash icon size will create the icon's theme node
if necessary (and of all its parents), a missing texture can still throw
off our computation.
Make sure this doesn't happen by ensuring the icon's style first, so the
texture is updated in response to StWidget::style-changed if necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=745649
2015-10-13 20:21:44 +02:00
Florian Müllner
9720b32987 dash: Revert mislead cleanup
When adjusting dash icon sizes, we compute the icon padding by subtracting
the configured icon size from the first icon actor's preferred size. To
make sure that the preferred size correctly corresponds to the current
dash icon size even while the icon is animating, we enforce the size
before the size request. For that we used to temporarily manipulate
the icon texture size directly, but commit e92d204d42 cleaned this
up to use the setIconSize() method instead.
This does not work however, as the icon actor's iconSize property will
always match the dash iconSize property, making the method a noop. So
go back to the original approach of enforcing the texture size to make
sure we always base our computations on correct values.

https://bugzilla.gnome.org/show_bug.cgi?id=745649
2015-10-13 20:21:44 +02:00
Florian Müllner
31f1e9ff0a autorunManager: Do not mark the notification CRITICAL
There is nothing particularly critical about this notification, it
was only marked as such to get certain behavior like auto-expanding
and sticking-around to be acknowledged by the user (as it offers
more actions than the summary notification, so it is frustrating
when it goes away because it was missed).
As all notifications will now stay visible until we are sure the
users has seen them, the latter reasoning no longer applies.
Auto-expansion doesn't appear too important and may even be considered
annoying by users, so remove the CRITICAL hint now.

https://bugzilla.gnome.org/show_bug.cgi?id=657923
2015-10-09 15:55:40 +02:00
Rui Matos
d6c049a8c9 altTab: Don't error out if we don't have windows for an app
We are currently erroring out when the tab chain doesn't contain at
least one window for an app which might happen for windows that don't
take focus like xeyes. This leaves us in a state where we can't show
the switcher at all. Let's just ignore these apps instead of looking
broken.
2015-10-08 18:27:07 +02:00
Florian Müllner
36ee4e6c3b panel: Hide app menu when disabled by settings
While the GtkSettings::gtk-shell-shows-app-menu property is meant to
reflect a desktop capability (i.e. in the GNOME case: the app menu is
shown in the top bar), it is possible for users to overwrite it.
Respect the setting and actually hide the menu in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=745919
2015-10-05 14:08:20 +02:00
Ekaterina Gerasimova
f6cd3fa5ed panel: improve string for system menu, bug 755755
Refer to the system menu in the top bar as "System" rather than "Settings" as
it contains more than just settings and "Settings" is already used for the
settings panel. "System" is also used elsewhere, so include context for
translators.
2015-09-28 16:29:12 -04:00
Florian Müllner
3bbe74d1c1 popupMenu: Set ImageMenuItem's label-actor
While we don't use image menu items ourselves, extensions might,
so make sure they are accessible out of the box.
Spotted by Jay Strict.
2015-09-23 14:20:38 +02:00
Carlos Garnacho
409f6718b8 calendar: Disconnect all Notification signals on NotificationMessage destruction
The destroy signal handler is kept connected despite the NotificationMessage
being destroyed, which leaves dangling NotificationMessage objects that will
be mass destroyed when the Notification object these depend upon is finally
destroyed.

Depending on the amount of accumulated NotificationMessages, this may lead
to temporary freezes or other more funky issues when recursion limits are
hit.

https://bugzilla.gnome.org/show_bug.cgi?id=755425
2015-09-22 18:16:16 +02:00
Josselin Mouette
8a4c862633 background: fix a race condition when loading several animations
When loading several animations at the same time, the last call
overrides the result for all of them.

This commit caches all animations separately based on the source's
schemas.

https://bugzilla.gnome.org/show_bug.cgi?id=741453
2015-09-07 06:51:42 +02:00
Michael Biebl
785c90f4b8 background: fix indentation 2015-09-07 06:49:55 +02:00
Florian Müllner
09dbe17da0 loginDialog: Limit user list to the available height
We currently will always allocate the user list's preferred size, so it
will grow indefinitely and never scroll; limit the height instead to
get the desired scrolling behavior when necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=754525
2015-09-03 15:45:39 +02:00
Rui Matos
f2d4aa0822 authPrompt: hide/stop spinner after verfiication completes
When the user successfully types their password, we should hide
the spinner from the button well right away, so it doesn't
consume resources until reset (which may happen significantly later
if the user is vt switched away)

https://bugzilla.gnome.org/show_bug.cgi?id=753891
2015-08-31 15:24:27 -04:00
Ray Strode
030a22d795 authPrompt: stop spinner after its hidden
The code previously tried to stop spinner after it was hidden, but
due to an incorrect check was only stoppig it after it was shown.

Also, it was only stopping after hiding due to an animation, and
failing to stop it in the non-animated case.

This left the spinner hidden and running while VT switched away
from the login screen, only stopping when the auth prompt was
reset when switching back.

https://bugzilla.gnome.org/show_bug.cgi?id=753891
2015-08-31 15:19:26 -04:00
Piotr Drąg
a0df3e7d1e network: Unify capitalization in newly changed strings
After fa0e54edbb some strings were inconsistent.
2015-08-20 17:07:46 +02:00
Florian Müllner
fa0e54edbb status: Refine system status menu
* switch to a one-column layout (and adjust strings/widths
   accordingly
 * remove separator before system menu
 * add link to account settings to user submenu for consistency

https://bugzilla.gnome.org/show_bug.cgi?id=751377
2015-08-20 13:53:36 +02:00
Rui Matos
ac0213a516 viewSelector: Make the compose key focus the search entry
This way composed characters can be used to start searches.

https://bugzilla.gnome.org/show_bug.cgi?id=753320
2015-08-07 15:34:34 +02:00
Rui Matos
45a6e2c305 viewSelector: Make backspace focus the search entry
Commit fb0cf64536 regressed this because
there's no unicode character for backspace.

https://bugzilla.gnome.org/show_bug.cgi?id=753319
2015-08-07 15:34:34 +02:00
Florian Müllner
11cbd396c0 calendar: Tweak message list style
* make icons smaller
 * use small font size in body
 * add some spacing between secondary item and title

https://bugzilla.gnome.org/show_bug.cgi?id=749958
2015-08-05 17:34:11 +02:00
Florian Müllner
a343445cd2 calendar: Vertically center message icon rather than top-align it
... as requested by the designers.

https://bugzilla.gnome.org/show_bug.cgi?id=749958
2015-08-05 17:33:19 +02:00
Florian Müllner
be3d62487c calendar: Minor cleanup
Add a constant for the icon size used in message list entries rather
than hardcoding it twice.

https://bugzilla.gnome.org/show_bug.cgi?id=749958
2015-08-05 17:33:19 +02:00
Florian Müllner
58905bd01a telepathyClient: Use protocol-specific policy
Since commit 79c04c93e4, we launch Polari instead of Empathy when
activating a chat notification for an IRC channel. It therefore makes
sense to follow Polari's notification policy for those notifications
rather than Empathy's.

https://bugzilla.gnome.org/show_bug.cgi?id=752881
2015-08-05 17:22:10 +02:00
Ray Strode
08506eac2d gdm: clear user verifier when finished with it
We only need the user verifier for the purpose of user verification.
Once it's complete we should clear it so it doesn't get in the way
later.

This fixes a bug introduced in commit 3c8c5a5570 that leads to the
user session crashing when the login screen is reactivated.

https://bugzilla.gnome.org/show_bug.cgi?id=753181
2015-08-05 09:40:17 -04:00
Ray Strode
02c6b0374d gdm: make user list fade-in on vt switch more reliable
We fade out the authentication prompt when a user successfully
logs into a user session. We reset it and fade it back in when
the user switches back to the login screen VT.

The problem is, we only fade it back in if the auth prompt status is
VERIFICATION_SUCCEEDED.  It's possible for it to be NOT_VERIFYING
if the authprompt gets reset for some other reason in the interim.

This commit changes the check to be more precise. We now only skip
the fade-in, if we're already faded in, and we only skip the reset if
we're already reset.

https://bugzilla.gnome.org/show_bug.cgi?id=753181
2015-08-05 09:40:15 -04:00
Carlos Soriano
0722c06275 modalDialog: Match gtk+ buttons style
Follow the design we have in gtk+ for buttons dialogs,
which are at the bottom and they expand full width, having
the same amount of space for each one.

Also, since this removes any space for non-button widgets
in the button area, move the spinner present in the auth prompt
dialog next to the password entry.

https://bugzilla.gnome.org/show_bug.cgi?id=746108
2015-08-05 14:44:47 +02:00
Jakub Steiner
27a7194634 spinner: use a 60fps spinner
- sync with gtk+ and provide a fluid spinner

https://bugzilla.gnome.org/show_bug.cgi?id=753064
2015-08-05 13:44:32 +02:00
Florian Müllner
fed79ce4e6 appDisplay: Handle non-UTF8 filename encodings more gracefully
It may be 2015, but users still stumble upon the occasional .desktop
file that uses a filename encoding other than UTF-8. We currently
fail quite spectacularly in that case by not displaying any apps at
all - handle this case more gracefully, by only filtering out the
offending apps.

https://bugzilla.gnome.org/show_bug.cgi?id=651503
2015-07-31 16:52:42 +02:00
Florian Müllner
fc45cf03bf windowMenu: Use CHECK ornament rather than DOT
The dot suggests a radio action, while the items are actually toggles;
in the app menu we use checkmarks in that case, so do the same here.
2015-07-30 18:11:43 +02:00
Rui Matos
f5865e895e magnifier: Avoid caret/focus viewport changes while the pointer moves
If there's a caret or focus move we should delay it until the pointer
is stationary for a little while so as to avoid jittery and spurious
viewport movements.

https://bugzilla.gnome.org/show_bug.cgi?id=752138
2015-07-27 18:04:44 +02:00
Ray Strode
778ad49ab4 authPrompt: allow cancellation before verification starts
The user should be allowed to cancel if verification hasn't
started yet and they're typing in their username. This
commit changes the authPrompt cancel function to not
ignore such requests.

https://bugzilla.gnome.org/show_bug.cgi?id=752739
2015-07-24 09:44:24 -04:00
Ray Strode
fe7dd1305f authPrompt: don't allow next if entry is empty
Normally the user isn't allowed to proceed passed
the username question until they've filled it in.
To ensure this, the authprompt code desensitizes
the next button when the number of characters change to
zero.

Unfortunately it fails to desensitize the next button
up front when the entry starts out empty.

This commit addresses that bug.

https://bugzilla.gnome.org/show_bug.cgi?id=752739
2015-07-24 09:44:23 -04:00
Ray Strode
378a3df5ea authPrompt: set next button to next when asking for username
If the next button ever gets set to Sign In, it won't
get reset to next until the next question asked by pam.

This commit ensures it gets reset to Next when asking
for the username.

https://bugzilla.gnome.org/show_bug.cgi?id=752739
2015-07-24 09:44:21 -04:00
Bastien Nocera
e63b81d69c keyboard: Don't watch D-Bus services we won't use
ff1b76f4c7 made gnome-shell stop looking
at the org.gnome.SettingsDaemon.Cursor service's property values, but we
still monitored the service itself.

https://bugzilla.gnome.org/show_bug.cgi?id=752779
2015-07-23 15:07:10 +02:00