diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-11-04 13:03:43 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-11-04 13:03:43 +0100 |
commit | 4341fcacd4987b16ebcfa0db176c0ccf287268c4 (patch) | |
tree | cddebffab2588473c1466f0ab46e6b3ec5d0f223 | |
parent | a62b5759a2d9352ce6c972c35027071ec5c9bf41 (diff) | |
download | tigervnc-4341fcacd4987b16ebcfa0db176c0ccf287268c4.tar.gz tigervnc-4341fcacd4987b16ebcfa0db176c0ccf287268c4.zip |
Keep saved username/password between connects
The UserDialog object is now only created for a single connection at a
time, which means we need to make sure the cached username and password
survive until the subsequent object.
-rw-r--r-- | vncviewer/UserDialog.cxx | 3 | ||||
-rw-r--r-- | vncviewer/UserDialog.h | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/vncviewer/UserDialog.cxx b/vncviewer/UserDialog.cxx index b3840d62..ed75a53c 100644 --- a/vncviewer/UserDialog.cxx +++ b/vncviewer/UserDialog.cxx @@ -57,6 +57,9 @@ using namespace rfb; static Fl_Pixmap secure_icon(secure); static Fl_Pixmap insecure_icon(insecure); +std::string UserDialog::savedUsername; +std::string UserDialog::savedPassword; + static long ret_val = 0; static void button_cb(Fl_Widget *widget, long val) { diff --git a/vncviewer/UserDialog.h b/vncviewer/UserDialog.h index c16923c1..ddafbc3c 100644 --- a/vncviewer/UserDialog.h +++ b/vncviewer/UserDialog.h @@ -38,8 +38,8 @@ public: void resetPassword(); private: - std::string savedUsername; - std::string savedPassword; + static std::string savedUsername; + static std::string savedPassword; }; #endif |