summaryrefslogtreecommitdiff
path: root/src/wx/wx_util.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-03-19 22:30:05 +0000
committerCarl Hetherington <cth@carlh.net>2019-05-10 23:43:42 +0100
commitc4e20995d4638c2d7575dcf12a917e27387078de (patch)
treec89805cb065ab065ce5f5e6771bc2a8460135d5e /src/wx/wx_util.cc
parentf3c36d5d12e15b749d928580c29e4f6cda23e873 (diff)
Hide passwords in text fields.
Diffstat (limited to 'src/wx/wx_util.cc')
-rw-r--r--src/wx/wx_util.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc
index 747d1df04..bfc7c3069 100644
--- a/src/wx/wx_util.cc
+++ b/src/wx/wx_util.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2019 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -25,6 +25,7 @@
#include "wx_util.h"
#include "file_picker_ctrl.h"
#include "static_text.h"
+#include "password_entry.h"
#include "lib/config.h"
#include "lib/job_manager.h"
#include "lib/util.h"
@@ -293,6 +294,14 @@ checked_set (wxTextCtrl* widget, string value)
}
void
+checked_set (PasswordEntry* entry, string value)
+{
+ if (entry->get() != value) {
+ entry->set(value);
+ }
+}
+
+void
checked_set (wxTextCtrl* widget, wxString value)
{
if (widget->GetValue() != value) {