diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-03-31 14:04:43 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-03-31 14:04:43 +0100 |
| commit | 8f9c5e06afd3c0255ed484a495b1ddad7fd83205 (patch) | |
| tree | 9882905856c2a47822d79623d340d8e858645697 /src | |
| parent | e4726e282a56477a662be0ff1f8f964ba9411fa7 (diff) | |
A few KDM dialog fixes.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/internet.cc | 1 | ||||
| -rw-r--r-- | src/wx/doremi_certificate_dialog.cc | 14 | ||||
| -rw-r--r-- | src/wx/doremi_certificate_dialog.h | 1 | ||||
| -rw-r--r-- | src/wx/kdm_dialog.cc | 2 |
4 files changed, 15 insertions, 3 deletions
diff --git a/src/lib/internet.cc b/src/lib/internet.cc index 16fd67244..c3f9dce65 100644 --- a/src/lib/internet.cc +++ b/src/lib/internet.cc @@ -55,6 +55,7 @@ get_from_zip_url (string url, string file, function<void (boost::filesystem::pat FILE* f = temp_zip.open ("wb"); curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, get_from_zip_url_data); curl_easy_setopt (curl, CURLOPT_WRITEDATA, f); + curl_easy_setopt (curl, CURLOPT_FTP_USE_EPSV, 0); CURLcode const cr = curl_easy_perform (curl); diff --git a/src/wx/doremi_certificate_dialog.cc b/src/wx/doremi_certificate_dialog.cc index 8509c97d1..766318990 100644 --- a/src/wx/doremi_certificate_dialog.cc +++ b/src/wx/doremi_certificate_dialog.cc @@ -33,7 +33,9 @@ DoremiCertificateDialog::DoremiCertificateDialog (wxWindow* parent, function<voi : DownloadCertificateDialog (parent, load) { add (_("Server serial number"), true); - _serial = add (new wxTextCtrl (this, wxID_ANY)); + _serial = add (new wxTextCtrl (this, wxID_ANY, wxT (""), wxDefaultPosition, wxSize (300, -1))); + + _serial->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&DoremiCertificateDialog::set_sensitivity, this)); add_common_widgets (); } @@ -48,6 +50,7 @@ DoremiCertificateDialog::download () } _message->SetLabel (_("Downloading certificate")); + run_gui_loop (); optional<string> error = get_from_zip_url ( String::compose ( @@ -61,6 +64,13 @@ DoremiCertificateDialog::download () if (error) { error_dialog (this, std_to_wx (error.get ())); } else { - _message->SetLabel (wxT ("")); + _message->SetLabel (wxT ("Certificate downloaded")); } } + +void +DoremiCertificateDialog::set_sensitivity () +{ + _download->Enable (!_serial->IsEmpty ()); +} + diff --git a/src/wx/doremi_certificate_dialog.h b/src/wx/doremi_certificate_dialog.h index c2cb15dfd..281184726 100644 --- a/src/wx/doremi_certificate_dialog.h +++ b/src/wx/doremi_certificate_dialog.h @@ -26,6 +26,7 @@ public: private: void download (); + void set_sensitivity (); wxTextCtrl* _serial; }; diff --git a/src/wx/kdm_dialog.cc b/src/wx/kdm_dialog.cc index cc643c8ef..295287f42 100644 --- a/src/wx/kdm_dialog.cc +++ b/src/wx/kdm_dialog.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington <cth@carlh.net> + Copyright (C) 2012-2014 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 |
