Distributed under the GPL
*/
+#include <gtkmm/separator.h>
#include <msp/net/resolve.h>
#include <msp/time/units.h>
#include "remote.h"
delete addr;
window.signal_hide().connect(sigc::bind(sigc::mem_fun(this, &Remote::exit), 0));
+ window.set_default_size(300, 200);
window.set_border_width(5);
+
train_box = new Gtk::VBox(false, 5);
window.add(*manage(train_box));
+
window.show_all();
}
void Remote::train_added(Marklin::NetTrain &t)
{
- TrainPanel *panel = new TrainPanel(t);
- train_box->add(*manage(panel));
+ TrainPanel *panel = new TrainPanel(client, t);
+ if(!train_panels.empty())
+ {
+ Gtk::HSeparator *sep = new Gtk::HSeparator;
+ train_box->pack_start(*manage(sep), false, true);
+ sep->show();
+ }
+ train_box->pack_start(*manage(panel), false, true);
+ train_panels.push_back(panel);
}