// This program is free software; you can 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. // This program 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 this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA . // Copyright 2003 Liam Girdwood #include #include #include #include #include "nova_app.hh" #include "splash.hh" #if defined __GNUC__ && __GNUC__ < 3 #error This program will crash if compiled with g++ 2.x see the dynamic_cast bug in the gtkmm FAQ #endif /*! \fn int main(int argc, char **argv) * \param argc argument count * \param argv arguments * * Nova application entry point */ int main(int argc, char **argv) { // init thread support Glib::thread_init(); // parse command line Gnome::Main m(PACKAGE, VERSION, Gnome::UI::module_info_get(), argc, argv); // splash and load default catalogs GUI::Splash* splash = new GUI::Splash(); Glib::signal_idle().connect( SigC::bind_return(SigC::slot(*splash, &GUI::Splash::init_import), false)); m.run(*splash); bool init_ok = splash->import_status(); delete splash; if (!init_ok) { Gtk::MessageDialog dlg("Error: Could not load default catalog.\nPlease install the Sky2000 catalog with the same --prefix as Nova", Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); dlg.run(); exit(0); } // start Nova app GUI::NovaApp* nova_app = new class GUI::NovaApp(); m.run(*nova_app); // finished delete nova_app; return 0; }