- Temporarily disabled template-based singleton system because of a crash virtually surely caused by it

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@648 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
elvez 2006-06-21 20:24:36 +00:00
parent 167f9ad437
commit 0a2f37345f
8 changed files with 60 additions and 11 deletions

View file

@ -23,6 +23,8 @@
using namespace sgpem;
GlobalPreferences* GlobalPreferences::_instance = NULL;
GlobalPreferences::GlobalPreferences()
: _mod_dirs(1, PLUGDIR), _pol_dirs(1, POLDIR)
{}
@ -69,3 +71,10 @@ GlobalPreferences::add_policies_dir(const Glib::ustring& poldir)
_pol_dirs.insert(_pol_dirs.begin(), poldir);
}
GlobalPreferences&
GlobalPreferences::get_instance()
{
if(_instance == NULL)
_instance = new GlobalPreferences();
return *_instance;
}