X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fapp.cpp;h=e4b026889c591923278ba165828fbc242a2f7874;hb=d2e1ae556ea6e51fc3b75764202a2243db24fcf0;hp=1b65585464af62942b3d1f1b478f07d1693ec003;hpb=58a0ab96e7f766ca8a705d449ef7575eca837a64;p=synfig.git
diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp
index 1b65585..e4b0268 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;
@@ -352,7 +373,7 @@ public:
}
virtual bool
- amount_complete(int current, int total)
+ amount_complete(int /*current*/, int /*total*/)
{
while(studio::App::events_pending())studio::App::iteration(false);
return true;
@@ -458,7 +479,15 @@ int v_key_check(const char* key, U32* serial, U32 appid)
}
+#ifdef _WIN32
+# ifdef LICENSE_KEY_REQUIRED
int check_license(String basedir)
+# else
+int check_license(String /*basedir*/)
+# endif
+#else
+int check_license(String /*basedir*/)
+#endif
{
#ifdef LICENSE_KEY_REQUIRED
String key;
@@ -592,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());
@@ -647,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);
}
@@ -659,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;
}
@@ -719,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"));
@@ -749,7 +791,7 @@ init_ui_manager()
DEFINE_ACTION("quality-09", _("Use Quality Level 9"));
DEFINE_ACTION("quality-10", _("Use Quality Level 10"));
DEFINE_ACTION("play", _("Play"));
- DEFINE_ACTION("pause", _("Pause"));
+ // DEFINE_ACTION("pause", _("Pause"));
DEFINE_ACTION("stop", _("Stop"));
DEFINE_ACTION("toggle-grid-show", _("Toggle Grid Show"));
DEFINE_ACTION("toggle-grid-snap", _("Toggle Grid Snap"));
@@ -839,6 +881,7 @@ init_ui_manager()
" "
" "
" "
+" "
" "
"
"
" "
" "
-" "
+//" "
" "
" "
" "
@@ -906,8 +949,6 @@ init_ui_manager()
" "
" "
" "
@@ -920,6 +961,8 @@ init_ui_manager()
//" "
//" "
" "
+" "
+" "
" "
"