23 #include <core/exception.h>
24 #include <tools/config_editor/config_editor.h>
27 #if GTK_VERSION_GE(3,0)
28 # define UI_FILE RESDIR"/guis/config_editor/config_editor.ui"
30 # define UI_FILE RESDIR"/guis/config_editor/config_editor_gtk2.ui"
35 int main(
int argc,
char** argv)
37 std::locale::global( std::locale(
"" ) );
41 Gtk::Main kit(argc, argv);
42 #ifdef GLIBMM_EXCEPTIONS_ENABLED
43 Glib::RefPtr<Gtk::Builder> builder =
44 Gtk::Builder::create_from_file(UI_FILE);
46 std::auto_ptr<Gtk::BuilderError> error;
47 Glib::RefPtr<Gtk::Builder> builder =
48 Gtk::Builder::create_from_file(UI_FILE, error);
50 printf(
"Failed to load UI file: %s", error->what().c_str());
57 kit.run(fce.get_window());
59 catch (Gtk::BuilderError &e)
61 printf(
"Failed to instantiate window: %s\n", e.what().c_str());
63 catch (
const std::exception& e)
65 cerr <<
"Error: " << e.what() << endl;