X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fapp.cpp;h=e4b026889c591923278ba165828fbc242a2f7874;hb=d2e1ae556ea6e51fc3b75764202a2243db24fcf0;hp=5b4b54b9aab5d9241e65da003b135bce16f92922;hpb=1f59228ea073eb60029cddfb4ee1a70de7f40f3d;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp index 5b4b54b..e4b0268 100644 --- a/synfig-studio/trunk/src/gtkmm/app.cpp +++ b/synfig-studio/trunk/src/gtkmm/app.cpp @@ -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_; } @@ -262,6 +262,25 @@ void studio::App::set_max_recent_files(int x) { max_recent_files_=x; } 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; @@ -741,7 +760,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 +881,7 @@ init_ui_manager() " " " " " " +" " " " " " " " @@ -1091,7 +1112,7 @@ init_ui_manager() 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])); @@ -1103,7 +1124,10 @@ App::App(int *argc, char ***argv): 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; @@ -1420,7 +1444,7 @@ App::add_recent_file(const std::string &file_name) 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); @@ -2048,7 +2072,10 @@ App::new_instance() canvas->rend_desc().set_flags(RendDesc::PX_ASPECT|RendDesc::IM_SPAN); canvas->set_file_name(file_name); - Instance::create(canvas)->find_canvas_view(canvas)->canvas_properties.present(); + handle instance = Instance::create(canvas); + + if (!getenv("SYNFIG_DISABLE_NEW_CANVAS_EDIT_PROPERTIES")) + instance->find_canvas_view(canvas)->canvas_properties.present(); } void