d588620e70bf15da29cc242e4ae8d86977e8f36a from master; fix hang if you cancel a paused...
[dcpomatic.git] / src / wx / download_certificate_dialog.cc
index abb1e61260aa7bf8ace8451317c8dcc6e822057d..a0c41fd765901e4b60067caf3ee0af55d278382e 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
 */
 
-#include <boost/bind.hpp>
-#include "download_certificate_dialog.h"
 #include "wx_util.h"
+#include "download_certificate_dialog.h"
+#include <boost/bind.hpp>
 
 using boost::function;
 
 DownloadCertificateDialog::DownloadCertificateDialog (wxWindow* parent, function<void (boost::filesystem::path)> load)
        : TableDialog (parent, _("Download certificate"), 2, true)
        , _load (load)
+       , _message (0)
+       , _download (0)
 {
 
 }
@@ -48,4 +50,16 @@ DownloadCertificateDialog::add_common_widgets ()
        _download->Enable (false);
 
        layout ();
+
+       wxButton* ok = dynamic_cast<wxButton *> (FindWindowById (wxID_OK, this));
+       ok->Enable (false);
 }
+
+void
+DownloadCertificateDialog::downloaded (bool done)
+{
+       wxButton* ok = dynamic_cast<wxButton *> (FindWindowById (wxID_OK, this));
+       ok->Enable (done);
+}
+
+