]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Client/src/main.cpp
Mini bugfix.
[z.facultad/75.42/plaqui.git] / Client / src / main.cpp
index b9fe6301d3d05534149c7db9b4ef796a92918ec3..c65d1f733c2df3d7675f19d574d67bee9e03167f 100644 (file)
@@ -2,37 +2,27 @@
 #include <gtkmm.h>
 #include <libglademm.h>
 #include <iostream>
 #include <gtkmm.h>
 #include <libglademm.h>
 #include <iostream>
-#include "mnu_file_exit.h"
-#include "mnu_help_about.h"
+#include "principal.h"
 
 int main (int argc, char **argv)
 {
        Gtk::Main client(argc, argv);
 
 
 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 {
        //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) {
        }
        catch(const Gnome::Glade::XmlError& ex) {
-               std::cerr << "(main.cpp:18) : ";
+               std::cerr << "(main.cpp:17) : ";
                std::cerr << ex.what() << std::endl;
                return 1;
        }
 
                std::cerr << ex.what() << std::endl;
                return 1;
        }
 
-       Gtk::Window* pWindow = 0;
-       MnuFileExit *mnu_file_exit = 0;
-       MnuHelpAbout *mnu_help_about = 0;
-       Gtk::Button *bar_exit;
-       Gtk::Fixed *work_place;
+       Principal* pWindow = 0;
 
 
-       refXml->get_widget("Principal", pWindow);
-       refXml->get_widget_derived("mnu_file_exit", mnu_file_exit);
-       refXml->get_widget_derived("mnu_help_about", mnu_help_about);
-       refXml->get_widget("bar_exit", bar_exit);
-       refXml->get_widget("work_place", work_place);
-       work_place->set_size_request(10000, 10000);
-       bar_exit->signal_clicked().connect( SigC::slot(Gtk::Main::quit) );
+       refXml->get_widget_derived("Principal", pWindow);
        client.run(*pWindow);
 
        return 0;
        client.run(*pWindow);
 
        return 0;