X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fapp.cpp;h=b36162d0ceb125689f491d3af02c8144ca93a05c;hb=f401ad576b8230fe1da72661ce8c7e4465b9754b;hp=e99a21d152a77f07f17fc035f06462b9f4e9a171;hpb=2609f3f9572f7beaeaf35c2bd4b021b0d96fce1d;p=synfig.git
diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp
index e99a21d..b36162d 100644
--- a/synfig-studio/trunk/src/gtkmm/app.cpp
+++ b/synfig-studio/trunk/src/gtkmm/app.cpp
@@ -6,6 +6,7 @@
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2007 Chris Moore
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
@@ -252,6 +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=false;
static int max_recent_files_=25;
int studio::App::get_max_recent_files() { return max_recent_files_; }
@@ -260,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;
@@ -600,6 +621,11 @@ public:
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());
@@ -655,6 +681,12 @@ public:
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);
}
@@ -667,6 +699,7 @@ public:
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;
}
@@ -727,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"));
@@ -847,6 +881,7 @@ init_ui_manager()
"