_sizer->Add (_trusted_device_list, wxGBPosition (r, 0), wxGBSpan (1, 3), wxEXPAND);
++r;
+ _name->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&ScreenDialog::setup_sensitivity, this));
_get_recipient_from_file->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ScreenDialog::get_recipient_from_file, this));
_download_recipient->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&ScreenDialog::download_recipient, this));
- setup_sensitivity ();
-
overall_sizer->Add (_sizer, 1, wxEXPAND | wxALL, DCPOMATIC_DIALOG_BORDER);
wxSizer* buttons = CreateSeparatedButtonSizer (wxOK | wxCANCEL);
overall_sizer->Layout ();
overall_sizer->SetSizeHints (this);
+
+ setup_sensitivity ();
}
string
{
wxButton* ok = dynamic_cast<wxButton*> (FindWindowById (wxID_OK, this));
if (ok) {
- ok->Enable (static_cast<bool>(_recipient));
+ ok->Enable (static_cast<bool>(_recipient) && !_name->GetValue().IsEmpty());
}
}