#include <gtkmm.h>
#include <libglademm.h>
#include <iostream>
+#include "principal.h"
int main (int argc, char **argv)
{
//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("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;
}