X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/c054bed95537d9af309db002e64bfec4bc72051f..ffc9f02ea0544d4b1aa86e29afe12a2b4bace953:/Client/src/main.cpp?ds=sidebyside diff --git a/Client/src/main.cpp b/Client/src/main.cpp index f7ca2a1..c65d1f7 100644 --- a/Client/src/main.cpp +++ b/Client/src/main.cpp @@ -2,29 +2,27 @@ #include #include #include -#include "mnu_file_exit.h" +#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; - MnuFileExit *mnu_file_exit = 0; - Gtk::Button *bar_exit; - refXml->get_widget("Principal", pWindow); - refXml->get_widget_derived("mnu_file_exit", mnu_file_exit); - refXml->get_widget("bar_exit", bar_exit); - bar_exit->signal_clicked().connect( SigC::slot(Gtk::Main::quit) ); + Principal* pWindow = 0; + + refXml->get_widget_derived("Principal", pWindow); client.run(*pWindow); return 0;