X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/1a58ff524a145fed39424b8fb61116f8050a684a..1f8b8040f374c36d90625d31e0fc1bef2e94f0a8:/Client/src/main.cpp?ds=sidebyside diff --git a/Client/src/main.cpp b/Client/src/main.cpp index c1dfbf5..c65d1f7 100644 --- a/Client/src/main.cpp +++ b/Client/src/main.cpp @@ -2,26 +2,28 @@ #include #include #include +#include "principal.h" int main (int argc, char **argv) { Gtk::Main client(argc, argv); + Glib::thread_init(); //Load the Glade file and instiate its widgets: Glib::RefPtr refXml; try { - refXml = Gnome::Glade::Xml::create("client.glade", "Principal"); + refXml = Gnome::Glade::Xml::create(PACKAGE_DATA_DIR"/plaqui-client/dialogs/client.glade"); } catch(const Gnome::Glade::XmlError& ex) { + std::cerr << "(main.cpp:17) : "; std::cerr << ex.what() << std::endl; return 1; } - Gtk::Window* pWindow = 0; - refXml->get_widget("Principal", pWindow); - if (pWindow) { - client.run(*pWindow); - } + Principal* pWindow = 0; + + refXml->get_widget_derived("Principal", pWindow); + client.run(*pWindow); return 0; }