std::list< etl::handle< studio::Module > > module_list_;
bool studio::App::use_colorspace_gamma=true;
+bool studio::App::single_threaded=false;
static int max_recent_files_=25;
int studio::App::get_max_recent_files() { return max_recent_files_; }
static synfig::String app_base_path_;
namespace studio {
+
+bool
+really_delete_widget(Gtk::Widget *widget)
+{
+ synfig::info("really delete %x", (unsigned int)widget);
+ delete widget;
+ return false;
+}
+
+// nasty workaround - when we've finished with a popup menu, we want to delete it
+// attaching to the signal_hide() signal gets us here before the action on the menu has run,
+// so schedule the real delete to happen in 50ms, giving the action a chance to run
+void
+delete_widget(Gtk::Widget *widget)
+{
+ synfig::info("delete %x", (unsigned int)widget);
+ Glib::signal_timeout().connect(sigc::bind(sigc::ptr_fun(&really_delete_widget), widget), 50);
+}
+
}; // END of namespace studio
studio::StateManager* state_manager;
value=strprintf("%s",Distance::system_name(App::distance_system).c_str());
return true;
}
+ if(key=="single_threaded")
+ {
+ value=strprintf("%i",(int)App::single_threaded);
+ return true;
+ }
if(key=="auto_recover_backup_interval")
{
value=strprintf("%i",App::auto_recover->get_timeout());
App::distance_system=Distance::ident_system(value);;
return true;
}
+ if(key=="single_threaded")
+ {
+ int i(atoi(value.c_str()));
+ App::single_threaded=i;
+ return true;
+ }
return synfigapp::Settings::set_value(key,value);
}
ret.push_back("distance_system");
ret.push_back("file_history.size");
ret.push_back("use_colorspace_gamma");
+ ret.push_back("single_threaded");
ret.push_back("auto_recover_backup_interval");
return ret;
}
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"));
" <separator name='bleh04'/>"
" <menuitem action='options' />"
" <menuitem action='close' />"
+" <menuitem action='close-document' />"
" </menu>"
" <menu action='menu-edit'>"
" <menuitem action='undo'/>"
App::App(int *argc, char ***argv):
Gtk::Main(argc,argv),
- IconControler(etl::dirname((*argv)[0]))
+ IconController(etl::dirname((*argv)[0]))
{
app_base_path_=etl::dirname(etl::dirname((*argv)[0]));
gdk_rgb_init();
- Glib::thread_init();
+ // don't call thread_init() if threads are already initialized
+ // on some machines bonobo_init() initialized threads before we get here
+ if (!g_thread_supported())
+ Glib::thread_init();
distance_system=Distance::SYSTEM_UNITS;
if(basename(filename)[0]=='.')
return;
- // If we aren't an absolute path, turn outselves into one
+ // If we aren't an absolute path, turn ourselves into one
if(!is_absolute_path(filename))
filename=absolute_path(filename);
synfigapp::Main::settings().set_value("dock.dialog.2.size","1045 235");
synfigapp::Main::settings().set_value("pref.distance_system","pt");
synfigapp::Main::settings().set_value("pref.use_colorspace_gamma","1");
+ synfigapp::Main::settings().set_value("pref.single_threaded","0");
synfigapp::Main::settings().set_value("window.toolbox.pos","4 4");
}