summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-05-09 22:42:59 +0100
committerCarl Hetherington <cth@carlh.net>2015-05-09 22:42:59 +0100
commitbf12d3841c020d2b0664cd04c1bfb3302651b6b6 (patch)
tree074d4c8676e6625002ec065c1034e91d02da0516 /src
parent855d20f06f918d5b9dd2f144a51962de1c2f838d (diff)
711c36c150f3efffd64875399ada94baafb87cb1 from master; ok button disabling in downloade dialogs.
Diffstat (limited to 'src')
-rw-r--r--src/wx/dolby_certificate_dialog.cc4
-rw-r--r--src/wx/doremi_certificate_dialog.cc4
-rw-r--r--src/wx/download_certificate_dialog.cc16
-rw-r--r--src/wx/download_certificate_dialog.h1
4 files changed, 21 insertions, 4 deletions
diff --git a/src/wx/dolby_certificate_dialog.cc b/src/wx/dolby_certificate_dialog.cc
index 5e094844d..15551a424 100644
--- a/src/wx/dolby_certificate_dialog.cc
+++ b/src/wx/dolby_certificate_dialog.cc
@@ -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
@@ -154,6 +154,7 @@ DolbyCertificateDialog::serial_selected ()
void
DolbyCertificateDialog::download ()
{
+ downloaded (false);
_message->SetLabel (_("Downloading certificate"));
#ifdef DCPOMATIC_OSX
@@ -189,5 +190,6 @@ DolbyCertificateDialog::finish_download ()
_message->SetLabel (std_to_wx (error.get ()));
} else {
_message->SetLabel (_("Certificate downloaded"));
+ downloaded (true);
}
}
diff --git a/src/wx/doremi_certificate_dialog.cc b/src/wx/doremi_certificate_dialog.cc
index 4b5d58b37..105555da9 100644
--- a/src/wx/doremi_certificate_dialog.cc
+++ b/src/wx/doremi_certificate_dialog.cc
@@ -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
@@ -51,6 +51,7 @@ DoremiCertificateDialog::download ()
return;
}
+ downloaded (false);
_message->SetLabel (_("Downloading certificate"));
#ifdef DCPOMATIC_OSX
@@ -101,6 +102,7 @@ DoremiCertificateDialog::finish_download (string serial)
error_dialog (this, std_to_wx (error.get ()));
} else {
_message->SetLabel (_("Certificate downloaded"));
+ downloaded (true);
}
}
diff --git a/src/wx/download_certificate_dialog.cc b/src/wx/download_certificate_dialog.cc
index a8a712334..a0c41fd76 100644
--- a/src/wx/download_certificate_dialog.cc
+++ b/src/wx/download_certificate_dialog.cc
@@ -17,9 +17,9 @@
*/
-#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;
@@ -50,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);
+}
+
+
diff --git a/src/wx/download_certificate_dialog.h b/src/wx/download_certificate_dialog.h
index 804c0c762..40e11de45 100644
--- a/src/wx/download_certificate_dialog.h
+++ b/src/wx/download_certificate_dialog.h
@@ -32,6 +32,7 @@ public:
protected:
void add_common_widgets ();
+ void downloaded (bool done);
boost::function<void (boost::filesystem::path)> _load;
wxStaticText* _message;