X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fremote%2Fremote.cpp;h=21689867a8f58c02a908537e919e883b30bfc123;hb=fadc35133b1ebbd98af948c1fa529dcde6fddcfd;hp=c53bddda1c2f08c4578b09cca3e05bf93c66ca5f;hpb=1efb7d0debe9e6e9b480eb16381c1b90d0fb7d17;p=r2c2.git diff --git a/source/remote/remote.cpp b/source/remote/remote.cpp index c53bddd..2168986 100644 --- a/source/remote/remote.cpp +++ b/source/remote/remote.cpp @@ -9,6 +9,7 @@ Distributed under the GPL #include #include #include +#include "mainpanel.h" #include "remote.h" #include "trainpanel.h" @@ -43,8 +44,11 @@ Remote::Remote(int argc, char **argv): 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(); } @@ -57,13 +61,11 @@ void Remote::tick() 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); }