3 #include <libglademm.h>
5 #include "mnu_file_exit.h"
7 int main (int argc, char **argv)
9 Gtk::Main client(argc, argv);
11 //Load the Glade file and instiate its widgets:
12 Glib::RefPtr<Gnome::Glade::Xml> refXml;
14 refXml = Gnome::Glade::Xml::create("client.glade", "Principal");
16 catch(const Gnome::Glade::XmlError& ex) {
17 std::cerr << ex.what() << std::endl;
21 Gtk::Window* pWindow = 0;
22 MnuFileExit *mnu_file_exit = 0;
23 Gtk::Button *bar_exit;
24 refXml->get_widget("Principal", pWindow);
25 refXml->get_widget_derived("mnu_file_exit", mnu_file_exit);
26 refXml->get_widget("bar_exit", bar_exit);
27 bar_exit->signal_clicked().connect( SigC::slot(Gtk::Main::quit) );