Fawkes API  Fawkes Development Version
main.cpp
1 
2 /***************************************************************************
3  * main.cpp - Eclipse Debugger Tool main
4  *
5  * Created: Mon Feb 25 14:22:00 2013
6  * Copyright 2013 Gesche Gierse
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL file in the doc directory.
21  */
22 
23 #include "eclipse_debugger.h"
24 
25 #include <glibmm/exception.h>
26 #ifdef HAVE_GCONFMM
27 #include <gui_utils/service_chooser_dialog.h>
28 #endif
29 
30 
31 # define UI_FILE RESDIR"/eclipsedebuggergui/eclipsedebuggergui.ui"
32 
33 
34 /** This is the main program of the Eclipse debugger starter.
35  */
36 int
37 main(int argc, char **argv) {
38  Gtk::Main gtk_main(argc, argv);
39 #ifdef HAVE_GCONFMM
40  Gnome::Conf::init();
41 #endif
42 
43  try {
44  Glib::RefPtr<Gtk::Builder> builder =
45  Gtk::Builder::create_from_file(UI_FILE);
46 
47  EclipseDebugger *window = NULL;
48  builder->get_widget_derived("wnd_eclipsedebuggergui", window);
49 
50  Gtk::Main::run(*window);
51 
52  delete window;
53  } catch (Gtk::BuilderError &e) {
54  printf("Failed to instantiate window: %s\n", e.what().c_str());
55  return 1;
56  } catch (Glib::Exception &e) {
57  printf("%s\n", e.what().c_str());
58  return 1;
59  }
60 
61  return 0;
62 }
ECLiPSe-clp Debugger GUI Wrapper.