#include <gtkmm/separator.h>
#include <msp/net/resolve.h>
#include <msp/time/units.h>
+#include "mainpanel.h"
#include "remote.h"
#include "trainpanel.h"
window.add(*manage(scroll));
scroll->set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
- train_box = new Gtk::VBox(false, 5);
- scroll->add(*manage(train_box));
+ panel_box = new Gtk::VBox(false, 5);
+ scroll->add(*manage(panel_box));
+
+ main_panel = new MainPanel(*this, client);
+ panel_box->pack_start(*manage(main_panel), false, true);
window.show_all();
}
void Remote::train_added(R2C2::NetTrain &t)
{
+ Gtk::HSeparator *sep = new Gtk::HSeparator;
+ panel_box->pack_start(*manage(sep), false, true);
+ sep->show();
+
TrainPanel *panel = new TrainPanel(*this, 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);
+ panel_box->pack_start(*manage(panel), false, true);
train_panels.push_back(panel);
}