Skip to content

Commit

Permalink
gui: use wxCredentialEntryDialog over custom implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
bk138 committed Jan 6, 2025
1 parent 2dea779 commit 3a7f5ee
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 118 deletions.
2 changes: 0 additions & 2 deletions src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ SET(MultiVNCgui_SRCS
DialogSettings.h
MyDialogSettings.cpp
MyDialogSettings.h
DialogLogin.cpp
DialogLogin.h
evtids.h
bitmapFromMem.h
res/multivnc.xpm
Expand Down
71 changes: 0 additions & 71 deletions src/gui/DialogLogin.cpp

This file was deleted.

40 changes: 0 additions & 40 deletions src/gui/DialogLogin.h

This file was deleted.

11 changes: 6 additions & 5 deletions src/gui/MyFrameMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include "gui/evtids.h"
#include <fstream>
#include <wx/aboutdlg.h>
#include <wx/textctrl.h>
#include <wx/creddlg.h>
#include <wx/socket.h>
#include <wx/clipbrd.h>
#include <wx/imaglist.h>
Expand All @@ -12,7 +14,6 @@

#include "MyFrameMain.h"
#include "MyDialogSettings.h"
#include "DialogLogin.h"
#include "../dfltcfg.h"
#include "../MultiVNCApp.h"

Expand Down Expand Up @@ -734,13 +735,13 @@ void MyFrameMain::onVNCConnGetCredentialsNotify(wxCommandEvent &event)
#endif
} else {
// with user prompt
DialogLogin formLogin(0, wxID_ANY, _("Credentials required..."));
wxCredentialEntryDialog formLogin(this, wxEmptyString, _("Credentials required..."));
if (formLogin.ShowModal() == wxID_OK) {
conn->setUserName(formLogin.getUserName());
conn->setUserName(formLogin.GetCredentials().GetUser());
#if wxUSE_SECRETSTORE
conn->setPassword(wxSecretValue(formLogin.getPassword()));
conn->setPassword(formLogin.GetCredentials().GetPassword());
#else
conn->setPassword(formLogin.getPassword());
conn->setPassword(formLogin.GetCredentials().GetPassword().GetAsString());
#endif
} else {
// canceled
Expand Down

0 comments on commit 3a7f5ee

Please sign in to comment.