-/* $Id$
-
-This file is part of R²C²
-Copyright © 2009-2010 Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
#include <gtkmm/box.h>
#include <gtkmm/liststore.h>
#include "remote.h"
Gtk::HBox *hbox = new Gtk::HBox(false, 5);
vbox->add(*manage(hbox));
- hbox->add(*manage(scl_speed = new Gtk::HScale));
+ hbox->pack_start(*manage(scl_speed = new Gtk::HScale), true, true);
scl_speed->set_digits(0);
scl_speed->set_range(0, 200);
scl_speed->set_increments(5, 5);
scl_speed->set_size_request(210, -1);
scl_speed->signal_value_changed().connect(sigc::mem_fun(this, &TrainPanel::ui_speed_changed));
- hbox->add(*manage(chk_reverse = new Gtk::CheckButton("Rev")));
+ hbox->pack_start(*manage(chk_reverse = new Gtk::CheckButton("Rev")), false, true);
chk_reverse->signal_toggled().connect(sigc::mem_fun(this, &TrainPanel::ui_reverse_changed));
Gtk::HBox *func_box = new Gtk::HBox(false, 5);
vbox->add(*manage(func_box));
- const std::map<unsigned, string> &funcs = train.get_loco_type().get_functions();
- for(std::map<unsigned, string>::const_iterator i=funcs.begin(); i!=funcs.end(); ++i)
+ const R2C2::VehicleType::FunctionMap &funcs = train.get_loco_type().get_functions();
+ for(R2C2::VehicleType::FunctionMap::const_iterator i=funcs.begin(); i!=funcs.end(); ++i)
{
Gtk::CheckButton *&chk = chk_funcs[i->first];
chk = new Gtk::CheckButton(i->second);
}
Glib::RefPtr<Gtk::ListStore> route_store = Gtk::ListStore::create(route_columns);
- vbox->add(*manage(cmb_route = new Gtk::ComboBox(route_store)));
+ vbox->add(*manage(cmb_route = new Gtk::ComboBox(static_cast<const Glib::RefPtr<Gtk::TreeModel> &>(route_store))));
cmb_route->pack_start(route_columns.name);
route_store->append();
const list<string> &routes = client.get_routes();