[gnome-boxes/vnc-notify-auth-failure: 3/3] vnc-display, machine: Notify when authentication failed
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/vnc-notify-auth-failure: 3/3] vnc-display, machine: Notify when authentication failed
- Date: Mon, 16 Dec 2019 14:48:50 +0000 (UTC)
commit afd93151dcdec6a1e8defe339d3f514163f9e499
Author: Felipe Borges <felipeborges gnome org>
Date: Mon Dec 16 15:43:27 2019 +0100
vnc-display, machine: Notify when authentication failed
Fixes #446
src/display.vala | 2 +-
src/machine.vala | 7 ++++++-
src/vnc-display.vala | 4 ++--
3 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/display.vala b/src/display.vala
index 31fc1ed9..cddf640b 100644
--- a/src/display.vala
+++ b/src/display.vala
@@ -20,7 +20,7 @@
public signal void hide (int display_id);
public signal void disconnected (bool connection_failed);
public signal void got_error (string message);
- public signal void auth_failed ();
+ public signal void auth_failed (string? message = null);
public delegate int OpenFDFunc ();
diff --git a/src/machine.vala b/src/machine.vala
index 9ec28537..50c2644b 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -212,7 +212,12 @@ protected void show_display () {
got_error (message);
});
- auth_failed_id = _display.auth_failed.connect (() => { delete_auth_credentials.begin (); });
+ auth_failed_id = _display.auth_failed.connect ((message) => {
+ delete_auth_credentials.begin ();
+
+ window.set_state (Boxes.UIState.COLLECTION);
+ window.notificationbar.display_error (_("Authentication failed: %s").printf (message));
+ });
disconnected_id = _display.disconnected.connect ((failed) => {
message (@"display $name disconnected");
diff --git a/src/vnc-display.vala b/src/vnc-display.vala
index 98585d23..55244a1a 100644
--- a/src/vnc-display.vala
+++ b/src/vnc-display.vala
@@ -40,13 +40,13 @@
disconnected (true);
});
- display.vnc_auth_failure.connect (() => {
+ display.vnc_auth_failure.connect ((message) => {
debug ("auth failure");
need_password = (password != null);
need_username = (username != null);
- auth_failed ();
+ auth_failed (message);
});
display.vnc_auth_unsupported.connect (() => {
debug ("auth unsupported");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]