Revision: 2173
http://synfig.svn.sourceforge.net/synfig/?rev=2173&view=rev
Author: dooglus
Date: 2008-11-09 17:24:01 +0000 (Sun, 09 Nov 2008)
Log Message:
-----------
Four of the modules provide features available from the tools in the main
toolbox. If any of these four modules fails to load, refuse to start studio.
Modified Paths:
--------------
synfig-core/trunk/src/synfig/main.cpp
synfig-core/trunk/src/synfig/module.cpp
synfig-core/trunk/src/synfig/module.h
Modified: synfig-core/trunk/src/synfig/main.cpp
===================================================================
--- synfig-core/trunk/src/synfig/main.cpp 2008-11-09 17:23:41 UTC (rev
2172)
+++ synfig-core/trunk/src/synfig/main.cpp 2008-11-09 17:24:01 UTC (rev
2173)
@@ -308,6 +308,8 @@
std::list<String>::iterator iter;
+ Module::register_default_modules(cb);
+
for(i=0,iter=modules_to_load.begin();iter!=modules_to_load.end();++iter,i++)
{
Module::Register(*iter,cb);
Modified: synfig-core/trunk/src/synfig/module.cpp
===================================================================
--- synfig-core/trunk/src/synfig/module.cpp 2008-11-09 17:23:41 UTC (rev
2172)
+++ synfig-core/trunk/src/synfig/module.cpp 2008-11-09 17:24:01 UTC (rev
2173)
@@ -95,10 +95,15 @@
return true;
}
-bool
-register_default_modules()
+void
+Module::register_default_modules(ProgressCallback *callback)
{
- return true;
+ #define REGISTER_MODULE(module) if (!Register(module, callback)) \
+
throw std::runtime_error(strprintf(_("Unable to load module '%s'"), module))
+ REGISTER_MODULE("lyr_freetype");
+ REGISTER_MODULE("mod_geometry");
+ REGISTER_MODULE("mod_gradient");
+ REGISTER_MODULE("mod_particle");
}
Module::Book&
@@ -184,5 +189,5 @@
if(callback)callback->task(strprintf(_("Success for
\"%s\""),module_name.c_str()));
#endif
- return false;
+ return true;
}
Modified: synfig-core/trunk/src/synfig/module.h
===================================================================
--- synfig-core/trunk/src/synfig/module.h 2008-11-09 17:23:41 UTC (rev
2172)
+++ synfig-core/trunk/src/synfig/module.h 2008-11-09 17:24:01 UTC (rev
2173)
@@ -182,7 +182,7 @@
static bool subsys_init(const String &prefix);
static bool subsys_stop();
- static bool register_default_modules();
+ static void register_default_modules(ProgressCallback *cb=NULL);
static void Register(Handle mod);
static bool Register(const String &module_name, ProgressCallback
*cb=NULL);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl