1 #include <msp/core/maputils.h>
2 #include <msp/net/inet.h>
3 #include <msp/net/resolve.h>
4 #include "connectdialog.h"
9 ConnectDialog::ConnectDialog(Client &c):
12 Loader::WidgetMap widgets;
13 DataFile::load(*this, "data/remote/connectdialog.ui", widgets);
15 ent_host = dynamic_cast<GLtk::Entry *>(get_item(widgets, "ent_host"));
16 ent_port = dynamic_cast<GLtk::Entry *>(get_item(widgets, "ent_port"));
17 ent_port->set_text("8315");
20 void ConnectDialog::on_response(int)
22 Net::SockAddr *addr = Net::resolve(ent_host->get_text(), ent_port->get_text(), Net::INET);
23 client.connect(*addr);