/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * main.cc * Copyright (C) Joel Holdsworth 2008 * * main.cc is free software. * * You may redistribute it and/or modify it under the terms of the * GNU General Public License, as published by the Free Software * Foundation; either version 2 of the License, or (at your option) * any later version. * * main.cc is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with main.cc. If not, write to: * The Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301, USA. */ #include #include #include #ifdef ENABLE_NLS # include #endif /* For testing propose use the local (not installed) glade file */ /* #define GLADE_FILE PACKAGE_DATA_DIR"/gtk-lumiera/glade/gtk-lumiera.glade" */ #define GLADE_FILE "gtk-lumiera.glade" int main (int argc, char *argv[]) { Gtk::Main kit(argc, argv); //Load the Glade file and instiate its widgets: Glib::RefPtr refXml; try { refXml = Gnome::Glade::Xml::create(GLADE_FILE); } catch(const Gnome::Glade::XmlError& ex) { std::cerr << ex.what() << std::endl; return 1; } Gtk::Window* main_win = 0; refXml->get_widget("main_window", main_win); if (main_win) { kit.run(*main_win); } return 0; }