711c36c150f3efffd64875399ada94baafb87cb1 from master; ok button disabling in download...
authorCarl Hetherington <cth@carlh.net>
Sat, 9 May 2015 21:42:59 +0000 (22:42 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 9 May 2015 21:42:59 +0000 (22:42 +0100)
ChangeLog
TO_PORT
src/wx/dolby_certificate_dialog.cc
src/wx/doremi_certificate_dialog.cc
src/wx/download_certificate_dialog.cc
src/wx/download_certificate_dialog.h

index 6d740423933dcf647b631ceba271fdd5cbb41063..9972399c81a3f8873cb580211ed63a24609e88f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-09  Carl Hetherington  <cth@carlh.net>
+
+       * Disable OK until a download succeeds in the certificate
+       downloader (#404).
+
 2015-05-07  Carl Hetherington  <cth@carlh.net>
 
        * Version 2.0.43 released.
 2015-05-07  Carl Hetherington  <cth@carlh.net>
 
        * Version 2.0.43 released.
diff --git a/TO_PORT b/TO_PORT
index 100665a2c21c0c985ad010ae1e7d788f4daa93a3..8db0f7a2687ca82d3fbb26180f11d0cd8d3d5e13 100644 (file)
--- a/TO_PORT
+++ b/TO_PORT
@@ -1,4 +1,3 @@
-add9a03356d3d392e234354df4800b9042e0f426
 01919a9e691375de4eb0069bc8cf179bee4dd7b6
 1d63d0309d071254fcf4da65d3710e94fadd38e8
 0c0211871d0be5b3409adfc88d2979ca5b439b0a
 01919a9e691375de4eb0069bc8cf179bee4dd7b6
 1d63d0309d071254fcf4da65d3710e94fadd38e8
 0c0211871d0be5b3409adfc88d2979ca5b439b0a
index 5e094844de59697771c0af68827733ceddebf983..15551a424a6971dfa0c7419c0a8b9c561a85579d 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
 
     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 ()
 {
 void
 DolbyCertificateDialog::download ()
 {
+       downloaded (false);
        _message->SetLabel (_("Downloading certificate"));
 
 #ifdef DCPOMATIC_OSX
        _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"));
                _message->SetLabel (std_to_wx (error.get ()));
        } else {
                _message->SetLabel (_("Certificate downloaded"));
+               downloaded (true);
        }
 }
        }
 }
index 4b5d58b375536c475a26c6612e03bd0ae4c26351..105555da986bb8f8db862dfbdaf88722d0decfeb 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
 
     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;
        }
 
                return;
        }
 
+       downloaded (false);
        _message->SetLabel (_("Downloading certificate"));
 
 #ifdef DCPOMATIC_OSX   
        _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"));
                error_dialog (this, std_to_wx (error.get ()));
        } else {
                _message->SetLabel (_("Certificate downloaded"));
+               downloaded (true);
        }
 }
 
        }
 }
 
index a8a71233494c35b163bd42b1932d3f99266c9115..a0c41fd765901e4b60067caf3ee0af55d278382e 100644 (file)
@@ -17,9 +17,9 @@
 
 */
 
 
 */
 
-#include <boost/bind.hpp>
-#include "download_certificate_dialog.h"
 #include "wx_util.h"
 #include "wx_util.h"
+#include "download_certificate_dialog.h"
+#include <boost/bind.hpp>
 
 using boost::function;
 
 
 using boost::function;
 
@@ -50,4 +50,16 @@ DownloadCertificateDialog::add_common_widgets ()
        _download->Enable (false);
 
        layout ();
        _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);
+}
+
+       
index 804c0c762556f7af2b0d600a35e3a043b80858dc..40e11de45619bbaec1b8b960c77316a50fd1688d 100644 (file)
@@ -32,6 +32,7 @@ public:
 
 protected:
        void add_common_widgets ();
 
 protected:
        void add_common_widgets ();
+       void downloaded (bool done);
        
        boost::function<void (boost::filesystem::path)> _load;
        wxStaticText* _message;
        
        boost::function<void (boost::filesystem::path)> _load;
        wxStaticText* _message;