X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fapp.cpp;h=b36162d0ceb125689f491d3af02c8144ca93a05c;hb=9c49d847240aeb191f3aa0e0f33fb7f56514e48e;hp=bd35bc87d177f6a0e6cba2f76d4f8265f6b719a9;hpb=6ea7e1fb3e6c78544c4d319b4338820f6559de80;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp index bd35bc8..b36162d 100644 --- a/synfig-studio/trunk/src/gtkmm/app.cpp +++ b/synfig-studio/trunk/src/gtkmm/app.cpp @@ -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; @@ -1093,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])); @@ -1105,8 +1124,8 @@ App::App(int *argc, char ***argv): gdk_rgb_init(); - // don't call thread_init() if threads are already initialised - // on some machines bonobo_init() initialised threads before we get here + // 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(); @@ -1425,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);