- _copy = new wxButton (this, wxID_ANY, _("Copy..."));
- s->Add (_copy, 0, wxTOP | wxBOTTOM, 2);
- _edit = new wxButton (this, wxID_ANY, _("Edit..."));
- s->Add (_edit, 0, wxTOP | wxBOTTOM, 2);
- _remove = new wxButton (this, wxID_ANY, _("Remove"));
+ if (can_edit) {
+ _edit = new Button (this, _("Edit..."));
+ s->Add (_edit, 0, wxTOP | wxBOTTOM, 2);
+ }
+ _remove = new Button (this, _("Remove"));