Don't crash if the user clicks 'halt render' when the render has already been stopped.
[synfig.git] / synfig-studio / trunk / src / gtkmm / app.cpp
index 5b4b54b..bd35bc8 100644 (file)
@@ -253,7 +253,7 @@ studio::Dock_Curves* dock_curves;
 std::list< etl::handle< studio::Module > > module_list_;
 
 bool studio::App::use_colorspace_gamma=true;
-bool studio::App::single_threaded=true;
+bool studio::App::single_threaded=false;
 
 static int max_recent_files_=25;
 int studio::App::get_max_recent_files() { return max_recent_files_; }
@@ -741,7 +741,8 @@ init_ui_manager()
        DEFINE_ACTION("dialog-flipbook", _("Preview Dialog"));
        DEFINE_ACTION("sound", _("Sound File"));
        DEFINE_ACTION("options", _("Options"));
-       DEFINE_ACTION("close", _("Close"));
+       DEFINE_ACTION("close", _("Close View"));
+       DEFINE_ACTION("close-document", _("Close Document"));
 
 
        DEFINE_ACTION("undo", Gtk::StockID("gtk-undo"));
@@ -861,6 +862,7 @@ init_ui_manager()
 "              <separator name='bleh04'/>"
 "              <menuitem action='options' />"
 "              <menuitem action='close' />"
+"              <menuitem action='close-document' />"
 "      </menu>"
 "      <menu action='menu-edit'>"
 "              <menuitem action='undo'/>"
@@ -1103,7 +1105,10 @@ App::App(int *argc, char ***argv):
 
        gdk_rgb_init();
 
-       Glib::thread_init();
+       // don't call thread_init() if threads are already initialised
+       // on some machines bonobo_init() initialised threads before we get here
+       if (!g_thread_supported())
+               Glib::thread_init();
 
        distance_system=Distance::SYSTEM_UNITS;