From c1d104dba800a10ef948e66ec129e18aef4d014b Mon Sep 17 00:00:00 2001 From: tchernobog Date: Thu, 6 Jul 2006 12:36:05 +0000 Subject: [PATCH] - Small changes: no need to use assert, since libGlade already does print a warning for us on error - Fix Makefile git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@740 3ecf2c5c-341e-0410-92b4-d18e462d057c --- Makefile.am | 4 ++-- src/gui_builder.cc | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Makefile.am b/Makefile.am index cce4d0f..2a4bc76 100644 --- a/Makefile.am +++ b/Makefile.am @@ -264,18 +264,19 @@ sgpemv2_LDADD = \ # Please keep this in sorted order: sgpemv2_SOURCES = \ src/graphical_terminal_io.cc \ + src/gui_builder.cc \ src/main.cc \ src/main_window.cc \ src/observer.cc \ src/parse_opts.cc \ src/simulation.cc \ src/standard_io.cc \ - src/start_gui.cc \ src/text_simulation.cc noinst_HEADERS += \ src/graphical_simulation.hh \ src/graphical_terminal_io.hh \ + src/gui_builder.hh \ src/io_manager.hh \ src/main.hh \ src/main_window.hh \ @@ -283,7 +284,6 @@ noinst_HEADERS += \ src/parse_opts.hh \ src/simulation.hh \ src/standard_io.hh \ - src/start_gui.hh \ src/text_simulation.hh # ---------- glade files ----------- diff --git a/src/gui_builder.cc b/src/gui_builder.cc index 25b8766..57e0704 100644 --- a/src/gui_builder.cc +++ b/src/gui_builder.cc @@ -28,7 +28,6 @@ #include #include -#include #include using namespace sgpem; @@ -47,19 +46,14 @@ GuiBuilder::GuiBuilder(const std::string& gladefile) // Glade::Xml::get_widget_derived -- better --) MenuItem* file_quit = NULL; _refXml->get_widget("MenuItem.File.Quit", file_quit); - assert(file_quit != NULL); file_quit->signal_activate().connect(sigc::ptr_fun(&Main::quit)); // About dialog MenuItem* help_about = NULL; _refXml->get_widget("MenuItem.Help.About", help_about); - assert(help_about != NULL); AboutDialog* about_dialog = NULL; _refXml->get_widget("AboutDialog", about_dialog); - assert(about_dialog != NULL); help_about->signal_activate().connect(sigc::mem_fun(*about_dialog, &Window::show)); - - // main_window.show_all_children(); } @@ -73,7 +67,6 @@ GuiBuilder::get_initial_window() const { Gtk::Window* main_window = NULL; _refXml->get_widget("MainWindow", main_window); - assert(main_window != NULL); return *main_window; }