X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fwx_util.cc;h=1a537c0875759f16cafe388a1a4f739cb46cde22;hb=6bfda50f36b35a6635e9da7a25f84319ca29d92f;hp=747d1df04c269290fc350d6cdf474dda61f0d2c9;hpb=4bef2e0b93f84ee98d7a3dccbfa5b13106f7a263;p=dcpomatic.git diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc index 747d1df04..1a537c087 100644 --- a/src/wx/wx_util.cc +++ b/src/wx/wx_util.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2018 Carl Hetherington + Copyright (C) 2012-2019 Carl Hetherington 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" @@ -157,6 +158,7 @@ message_dialog (wxWindow* parent, wxString m) d->Destroy (); } +/** @return true if the user answered "yes" */ bool confirm_dialog (wxWindow* parent, wxString m) { @@ -292,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) {