]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Client/src/main.cpp
Se agrega docs de instalaciĆ³n.
[z.facultad/75.42/plaqui.git] / Client / src / main.cpp
index c1dfbf5a31590d809437a3f112e0f34c1df9bd8f..c65d1f733c2df3d7675f19d574d67bee9e03167f 100644 (file)
@@ -2,26 +2,28 @@
 #include <gtkmm.h>
 #include <libglademm.h>
 #include <iostream>
+#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<Gnome::Glade::Xml> 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;
 }