gnome-shell/js
Jonas Dreßler 45ebb94b33 polkitAgent: Cancel session after disconnecting signal handlers
When cancelling the PolkitAgent session before disconnecting the signal
handlers, we receive a "completed" signal where `gained_authorization`
is set to FALSE, which means we show an error message inside
`_onSessionCompleted()`.

This in turn means we show an error message every time we cancel a
session. In practice this wasn't really relevant so far since we only
destroyed the session when an actual error occurred before. Now that the
dialog supports empty passwords, we also call `_destroySession()` when
the user changes and no longer has a password set, and in this case we
want to cancel the current session without showing an error message.

So to fix this, disconnect the signal handlers before cancelling the
session, which makes sure we don't receive the last "completed" signal
in case we cancelled the session ourselves. This change also allows
removing `this._wasDismissed`.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/829
2019-11-16 12:09:25 +01:00
..
extensionPrefs cleanup: Avoid unnecessary parentheses 2019-11-11 19:25:14 +00:00
gdm style: Allow lonely ifs where appropriate 2019-11-11 23:51:17 +00:00
misc style: Allow lonely ifs where appropriate 2019-11-11 23:51:17 +00:00
perf cleanup: Require "dangling" commas 2019-11-11 19:25:14 +00:00
portalHelper cleanup: Require "dangling" commas 2019-11-11 19:25:14 +00:00
ui polkitAgent: Cancel session after disconnecting signal handlers 2019-11-16 12:09:25 +01:00
js-resources.gresource.xml accessibility: Add pointer accessibility support 2019-06-06 09:13:29 +02:00
meson.build build: Use dedicated resources for helper programs 2018-08-14 17:28:04 +00:00
portal-resources.gresource.xml build: Include params.js in portal-helper gresources 2018-10-23 15:38:31 +00:00
prefs-resources.gresource.xml build: Use dedicated resources for helper programs 2018-08-14 17:28:04 +00:00