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 #define UI_FILE RESDIR "/eclipsedebuggergui/eclipsedebuggergui.ui"
31 
32 /** This is the main program of the Eclipse debugger starter.
33  */
34 int
35 main(int argc, char **argv)
36 {
37  Gtk::Main gtk_main(argc, argv);
38 #ifdef HAVE_GCONFMM
39  Gnome::Conf::init();
40 #endif
41 
42  try {
43  Glib::RefPtr<Gtk::Builder> builder = Gtk::Builder::create_from_file(UI_FILE);
44 
45  EclipseDebugger *window = NULL;
46  builder->get_widget_derived("wnd_eclipsedebuggergui", window);
47 
48  Gtk::Main::run(*window);
49 
50  delete window;
51  } catch (Gtk::BuilderError &e) {
52  printf("Failed to instantiate window: %s\n", e.what().c_str());
53  return 1;
54  } catch (Glib::Exception &e) {
55  printf("%s\n", e.what().c_str());
56  return 1;
57  }
58 
59  return 0;
60 }
EclipseDebugger
Definition: eclipse_debugger.h:36