diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-03-26 16:43:34 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-03-26 16:43:34 +0000 |
| commit | 41b7a04cf3dedaa93aaf3c050db7a693281417f7 (patch) | |
| tree | 9d5a2bf36e65dea84f105d5c96e705474020cf26 /src/wx/download_certificate_dialog.cc | |
| parent | 5dc5a43bf61847cf863b29ef47d0046a9d4fdef0 (diff) | |
Cleanup of various dialogs by inherting TableDialog.
Diffstat (limited to 'src/wx/download_certificate_dialog.cc')
| -rw-r--r-- | src/wx/download_certificate_dialog.cc | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/wx/download_certificate_dialog.cc b/src/wx/download_certificate_dialog.cc index 44a366bfa..bd3841f19 100644 --- a/src/wx/download_certificate_dialog.cc +++ b/src/wx/download_certificate_dialog.cc @@ -24,31 +24,26 @@ using boost::function; DownloadCertificateDialog::DownloadCertificateDialog (wxWindow* parent, function<void (boost::filesystem::path)> load) - : wxDialog (parent, wxID_ANY, _("Download certificate")) + : TableDialog (parent, _("Download certificate"), 2, true) , _load (load) { - _overall_sizer = new wxBoxSizer (wxVERTICAL); + } void DownloadCertificateDialog::add_common_widgets () { - _download = new wxButton (this, wxID_ANY, _("Download")); - _overall_sizer->Add (_download, 0, wxEXPAND | wxALL, DCPOMATIC_SIZER_X_GAP); - _gauge = new wxGauge (this, wxID_ANY, 100); - _overall_sizer->Add (_gauge, 0, wxEXPAND | wxALL, DCPOMATIC_SIZER_X_GAP); - _message = new wxStaticText (this, wxID_ANY, wxT ("")); - _overall_sizer->Add (_message, 0, wxEXPAND | wxALL, DCPOMATIC_SIZER_X_GAP); - - wxSizer* buttons = CreateSeparatedButtonSizer (wxOK | wxCANCEL); - if (buttons) { - _overall_sizer->Add (buttons, wxSizerFlags().Expand().DoubleBorder()); - } + add_spacer (); + _download = add (new wxButton (this, wxID_ANY, _("Download"))); - SetSizer (_overall_sizer); - _overall_sizer->Layout (); - _overall_sizer->SetSizeHints (this); + add_spacer (); + _gauge = add (new wxGauge (this, wxID_ANY, 100)); + add_spacer (); + _message = add (new wxStaticText (this, wxID_ANY, wxT (""))); + _download->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&DownloadCertificateDialog::download, this)); _download->Enable (false); + + layout (); } |
