- add(*(btn=new GLtk::Button(res, "OK")));
- btn->set_style("green");
- btn->set_geometry(GLtk::Geometry(geom.w-40, 10, 30, 25));
- btn->signal_clicked.connect(sigc::mem_fun(this, &TrainProperties::ok_clicked));
+ const map<unsigned, LocoType *> &locos = engineer.get_catalogue().get_locomotives();
+ unsigned n = 0;
+ for(map<unsigned, LocoType *>::const_iterator i=locos.begin(); i!=locos.end(); ++i, ++n)
+ {
+ drp_type->append(format("%d %s", i->second->get_article_number(), i->second->get_name()));
+ if(train && i->second==&train->get_locomotive_type())
+ drp_type->set_selected_index(n);
+ }