00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include <core/exception.h>
00024 #include <tools/config_editor/config_editor.h>
00025 #include <libglademm/xml.h>
00026 #include <iostream>
00027
00028 using namespace std;
00029
00030 int main(int argc, char** argv)
00031 {
00032 std::locale::global( std::locale( "" ) );
00033
00034 try
00035 {
00036 Gtk::Main kit(argc, argv);
00037 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00038 Glib::RefPtr<Gnome::Glade::Xml> ref_xml = Gnome::Glade::Xml::create(RESDIR"/guis/config_editor/config_editor.glade");
00039 #else
00040 std::auto_ptr<Gnome::Glade::XmlError> error;
00041 Glib::RefPtr<Gnome::Glade::Xml> ref_xml = Gnome::Glade::Xml::create(RESDIR"/guis/config_editor/config_editor.glade", "", "", error);
00042 if (error.get()) {
00043 throw fawkes::Exception("Failed to load Glade file: %s", error->what().c_str());
00044 }
00045 #endif
00046
00047 FawkesConfigEditor fce(ref_xml);
00048
00049 kit.run( fce.get_window() );
00050 }
00051 catch (const std::exception& e)
00052 {
00053 cerr << "Error: " << e.what() << endl;
00054 }
00055
00056 return 0;
00057 }