- Do things in a more C++ style

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@739 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-07-06 12:23:29 +00:00
parent 483cf2815d
commit f84c7bbf40
3 changed files with 62 additions and 35 deletions

View file

@ -23,8 +23,8 @@
#include "backend/global_preferences.hh"
#include "backend/plugin_manager.hh"
#include "gui_builder.hh"
#include "parse_opts.hh"
#include "start_gui.hh"
#include <glibmm/optioncontext.h>
#include <gtkmm/main.h>
@ -121,12 +121,11 @@ parse_options(int argc, char** argv)
}
else
{
Gtk::Window* main_window;
GuiBuilder* gui = new GuiBuilder();
if(fnames.begin() != fnames.end())
main_window = start_gui(*fnames.begin());
else
main_window = start_gui("");
main_loop.run(*main_window);
gui->open_file(*fnames.begin());
main_loop.run(gui->get_initial_window());
delete gui;
}
} // ~ try
catch(Glib::OptionError e)
@ -150,5 +149,3 @@ print_license()
"see file COPYING contained in the source package. \n"
<< std::endl;
}