Configuration::Configuration() {
	if(!m_conf_client) {
		std::cout << "Gnome::Conf::init()" << std::endl;
		Gnome::Conf::init();
		m_conf_client = Gnome::Conf::Client::get_default_client();
	}

	m_conf_client->add_dir("/apps/aeskulap/preferences");
	m_conf_client->add_dir("/apps/aeskulap/presets");
	m_conf_client->add_dir("/apps/aeskulap/presets/windowlevel");

	if(!m_conf_client->dir_exists("/apps/aeskulap/presets/windowlevel/CT")) {
		add_default_presets_ct();
	}
}
bool Configuration::set_windowlevel(const WindowLevel& w) {
	Glib::ustring base = "/apps/aeskulap/presets/windowlevel/"+w.modality+"/"+w.description;

	if(!m_conf_client->dir_exists(base)) {
		m_conf_client->add_dir(base);
	}

	m_conf_client->set(base+"/center", w.center);
	m_conf_client->set(base+"/width", w.width);
	
	return true;
}