- 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:
parent
483cf2815d
commit
f84c7bbf40
3 changed files with 62 additions and 35 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue