src: ensure auth entry fields are cleared

If authentication fails we reshow the same authentication dialog box
again. Rather than leaving the previous incorrect information in the
text entry boxes we need to clear them.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2021-04-27 11:28:57 +01:00
parent f48b17e4d0
commit 73f567ea94

View File

@ -114,6 +114,8 @@ virt_viewer_auth_collect_credentials(VirtViewerAuth *self,
int response;
char *message;
gtk_entry_set_text(GTK_ENTRY(self->credUsername), "");
gtk_entry_set_text(GTK_ENTRY(self->credPassword), "");
if (username) {
gtk_widget_show(self->credUsername);
gtk_widget_show(self->promptUsername);