- Renamed GlobalSettings to GlobalPreferences
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@621 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
65ed285807
commit
1706119e4d
|
@ -140,7 +140,7 @@ src_backend_libbackend_la_LDFLAGS = \
|
||||||
|
|
||||||
# Please keep this in sorted order:
|
# Please keep this in sorted order:
|
||||||
src_backend_libbackend_la_SOURCES = \
|
src_backend_libbackend_la_SOURCES = \
|
||||||
src/backend/global_settings.cc \
|
src/backend/global_preferences.cc \
|
||||||
src/backend/history.cc \
|
src/backend/history.cc \
|
||||||
src/backend/observed_subject.cc \
|
src/backend/observed_subject.cc \
|
||||||
src/backend/policies_gatekeeper.cc \
|
src/backend/policies_gatekeeper.cc \
|
||||||
|
@ -158,7 +158,7 @@ src_backend_libbackend_la_SOURCES = \
|
||||||
|
|
||||||
pkginclude_HEADERS = \
|
pkginclude_HEADERS = \
|
||||||
config.h \
|
config.h \
|
||||||
src/backend/global_settings.hh \
|
src/backend/global_preferences.hh \
|
||||||
src/backend/history.hh \
|
src/backend/history.hh \
|
||||||
src/backend/observed_subject.hh \
|
src/backend/observed_subject.hh \
|
||||||
src/backend/plugin.hh \
|
src/backend/plugin.hh \
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
#include "python_policy_manager.hh"
|
#include "python_policy_manager.hh"
|
||||||
#include "global_settings.hh"
|
#include "global_preferences.hh"
|
||||||
|
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
#include <glibmm/ustring.h>
|
#include <glibmm/ustring.h>
|
||||||
|
@ -108,8 +108,8 @@ PythonPolicyManager::init()
|
||||||
|
|
||||||
Glib::ustring importdirs = "import sys\n"
|
Glib::ustring importdirs = "import sys\n"
|
||||||
"sys.path[:0] = [ ";
|
"sys.path[:0] = [ ";
|
||||||
for_each(GlobalSettings::instance().policies_dir_begin(),
|
for_each(GlobalPreferences::instance().policies_dir_begin(),
|
||||||
GlobalSettings::instance().policies_dir_end(),
|
GlobalPreferences::instance().policies_dir_end(),
|
||||||
pol_dirs_concat(importdirs));
|
pol_dirs_concat(importdirs));
|
||||||
importdirs += " '" SHAREDIR "' ]\n";
|
importdirs += " '" SHAREDIR "' ]\n";
|
||||||
|
|
||||||
|
@ -130,8 +130,8 @@ PythonPolicyManager::get_avail_policies()
|
||||||
void
|
void
|
||||||
PythonPolicyManager::collect_policies()
|
PythonPolicyManager::collect_policies()
|
||||||
{
|
{
|
||||||
GlobalSettings::dir_iterator dir_it = GlobalSettings::instance().policies_dir_begin();
|
GlobalPreferences::dir_iterator dir_it = GlobalPreferences::instance().policies_dir_begin();
|
||||||
GlobalSettings::dir_iterator dir_end = GlobalSettings::instance().policies_dir_end();
|
GlobalPreferences::dir_iterator dir_end = GlobalPreferences::instance().policies_dir_end();
|
||||||
|
|
||||||
for(; dir_it != dir_end; ++dir_it)
|
for(; dir_it != dir_end; ++dir_it)
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#include "../python_policy_manager.hh"
|
#include "../python_policy_manager.hh"
|
||||||
#include "../python_policy.hh"
|
#include "../python_policy.hh"
|
||||||
#include "global_settings.hh"
|
#include "global_preferences.hh"
|
||||||
#include "schedulable_queue.hh"
|
#include "schedulable_queue.hh"
|
||||||
#include "scheduler.hh"
|
#include "scheduler.hh"
|
||||||
#include "user_interrupt_exception.hh"
|
#include "user_interrupt_exception.hh"
|
||||||
|
@ -62,7 +62,7 @@ main(int argc, char** argv) {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
// Add argv[1] as the directory to search for uninstalled policies
|
// Add argv[1] as the directory to search for uninstalled policies
|
||||||
sgpem::GlobalSettings::instance().add_policies_dir(argv[1]);
|
sgpem::GlobalPreferences::instance().add_policies_dir(argv[1]);
|
||||||
|
|
||||||
// Self-register itself to Scheduler, however we don't care about it
|
// Self-register itself to Scheduler, however we don't care about it
|
||||||
TestPythonPolicyManager polman;
|
TestPythonPolicyManager polman;
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include "backend/process.hh"
|
#include "backend/process.hh"
|
||||||
#include "backend/policy.hh"
|
#include "backend/policy.hh"
|
||||||
#include "backend/policy_parameters.hh"
|
#include "backend/policy_parameters.hh"
|
||||||
#include "backend/global_settings.hh"
|
#include "backend/global_preferences.hh"
|
||||||
#include "standard_io.hh"
|
#include "standard_io.hh"
|
||||||
#include "text_simulation.hh"
|
#include "text_simulation.hh"
|
||||||
|
|
||||||
|
@ -63,8 +63,8 @@ static void load_pyloader_plugin() {
|
||||||
// Leaks willingly:
|
// Leaks willingly:
|
||||||
Module* pyloader = 0;
|
Module* pyloader = 0;
|
||||||
|
|
||||||
GlobalSettings::dir_iterator it = GlobalSettings::instance().modules_dir_begin();
|
GlobalPreferences::dir_iterator it = GlobalPreferences::instance().modules_dir_begin();
|
||||||
while(it != GlobalSettings::instance().modules_dir_end()) {
|
while(it != GlobalPreferences::instance().modules_dir_end()) {
|
||||||
std::string pyloader_path = Module::build_path(*it, "pyloader");
|
std::string pyloader_path = Module::build_path(*it, "pyloader");
|
||||||
pyloader = new Module(pyloader_path);
|
pyloader = new Module(pyloader_path);
|
||||||
if(*pyloader) break;
|
if(*pyloader) break;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
|
|
||||||
#include "backend/global_settings.hh"
|
#include "backend/global_preferences.hh"
|
||||||
#include "parse_opts.hh"
|
#include "parse_opts.hh"
|
||||||
|
|
||||||
#ifdef _GNU_SOURCE
|
#ifdef _GNU_SOURCE
|
||||||
|
@ -39,7 +39,7 @@ static void display_help();
|
||||||
void
|
void
|
||||||
parse_options(int& argc, char**& argv)
|
parse_options(int& argc, char**& argv)
|
||||||
{
|
{
|
||||||
using sgpem::GlobalSettings;
|
using sgpem::GlobalPreferences;
|
||||||
|
|
||||||
print_license();
|
print_license();
|
||||||
|
|
||||||
|
@ -80,10 +80,10 @@ parse_options(int& argc, char**& argv)
|
||||||
// FIXME : to be written!
|
// FIXME : to be written!
|
||||||
break;
|
break;
|
||||||
case 'P':
|
case 'P':
|
||||||
GlobalSettings::instance().add_policies_dir(optarg);
|
GlobalPreferences::instance().add_policies_dir(optarg);
|
||||||
break;
|
break;
|
||||||
case 'M':
|
case 'M':
|
||||||
GlobalSettings::instance().add_modules_dir(optarg);
|
GlobalPreferences::instance().add_modules_dir(optarg);
|
||||||
break;
|
break;
|
||||||
case ':':
|
case ':':
|
||||||
printf(_("[EE] Wrong number of parameters. Please see \n"
|
printf(_("[EE] Wrong number of parameters. Please see \n"
|
||||||
|
|
Loading…
Reference in New Issue