Add a GSettings implementation for IConfMgr
* configure.ac: Auto-detect gsettings dependencies. Add a --enable-gsettings. By default, switch to gsettings if all its dependencies are present; switch to gconf otherwise. Define preprocessor macros WITH_GSETTINGS and CONFIG_MGR_MODULE_NAME. * data/Makefile.am: Declare a new schema sub-directory. * data/schemas/gconf/Makefile.am: New file. * data/schemas/gconf/nemiver-dbgperspective.schemas: Moved src/persp/dbgperspective/schemas/nemiver-dbgperspective.schemas into this. * data/schemas/gconf/nemiver-workbench.schemas: Moved src/workbench/schemas/nemiver-workbench.schemas into this. * data/schemas/gsettings/Makefile.am: New file. * data/schemas/gsettings/org.nemiver.gschema.xml: Likewise. * src/confmgr/Makefile.am: Build either the gsettings backend or the gconf one. * src/confmgr/gsettingsmgr.conf.in: New file. * src/confmgr/nmv-conf-keys.h (CONF_NAMESPACE_NEMIVER) (CONF_NAMESPACE_DESKTOP_INTERFACE): Declare new keys. (CONF_KEY_NEMIVER_CALLSTACK_EXPANSION_CHUNK): Moved this here from nmv-call-stack.cc. (CONF_KEY_NEMIVER_WINDOW_WIDTH) (CONF_KEY_NEMIVER_WINDOW_HEIGHT) (CONF_KEY_NEMIVER_WINDOW_POSITION_X) (CONF_KEY_NEMIVER_WINDOW_POSITION_Y) (CONF_KEY_NEMIVER_WINDOW_MAXIMIZED) (CONF_KEY_NEMIVER_WINDOW_MINIMUM_WIDTH) (CONF_KEY_NEMIVER_WINDOW_MINIMUM_HEIGHT): Move these declarations here from nmv-workbench.cc. * src/confmgr/nmv-gconf-keys-defs.cc: Renamed this from src/confmgr/nmv-conf-keys.cc. (CONF_NAMESPACE_NEMIVER) (CONF_NAMESPACE_DESKTOP_INTERFACE): Define these new keys. (CONF_KEY_NEMIVER_WINDOW_WIDTH) (CONF_KEY_NEMIVER_WINDOW_HEIGHT) (CONF_KEY_NEMIVER_WINDOW_POSITION_X) (CONF_KEY_NEMIVER_WINDOW_POSITION_Y) (CONF_KEY_NEMIVER_WINDOW_MAXIMIZED) (CONF_KEY_NEMIVER_WINDOW_MINIMUM_WIDTH) (CONF_KEY_NEMIVER_WINDOW_MINIMUM_HEIGHT): Move these definitions here from nmv-workbench.cc. * src/confmgr/nmv-gconf-mgr.cc: Include nmv-conf-keys.h. (GConfMgr::m_value_changed_signal): Adjust the type of this signal. (GConfMgr::set_key_dir_to_notify, GConfMgr::add_key_to_notify): Remove. (GConfMgr::get_default_namespace, GConfMgr::register_namespace): New functions. (GConfMgr::{set,get}_key_value): Add a namespace parameter. (GConfMgr::value_changed_signal): Remove the Value parameter. Add a namespace parameter. Ignore the namespace parameter in the definition. (client_notify_func): Don't pass any value argument to GConfMgr::value_change_signal anymore. * src/confmgr/nmv-gsettings-keys-defs.cc: New file. * src/confmgr/nmv-gsettings-mgr.cc: Likewise. * src/confmgr/nmv-i-conf-mgr.h: Include config.h. (IConfMgr::Value): Remove typedef. (IConfMgr::set_key_dir_to_notify, IConfMgr::add_key_to_notify): Remove functions. (IConfMgr::get_default_namespace): New function. (IConfMgr::{get,set}_key_value): Add a namespace parameter, with a default argument "". (load_iface_and_confmgr): New function template. * src/dbgengine/nmv-debugger-utils.cc (load_debugger_iface_with_confmgr): Renamed load_debugger_iface_with_gconf into this. Use the new load_iface_and_confmgr instead of loading the gconf backend of IConfMgr systematically. Use the new IConfMgr::register_namespace. * src/dbgengine/nmv-debugger-utils.h (load_debugger_iface_with_confmgr): Renamed load_debugger_iface_with_gconf into this. * src/dbgengine/nmv-gdb-engine.cc (GDBEngine::Priv::on_conf_key_changed_signal): Adjust signature. Get the configuration value from the conf_mgr as it's not passed by parameter anymore. * src/main.cc: Include nmv-i-conf-mgr.h (main): Use the new load_iface_and_confmgr to load the workbench. * src/persp/dbgperspective/Makefile.am: There is no more schema sub-directory to take care about as it got moved under data/. * src/persp/dbgperspective/nmv-call-stack.cc: Include nmv-conf-keys.h. (CONF_KEY_NEMIVER_CALLSTACK_EXPANSION_CHUNK): Moved declaration into into nmv-conf-keys.h and the definition into the IConfMgr backends. (CallStack::Priv::conf_mgr): New member to cache the conf mgr here. (CallStack::Priv::init_conf): Cache the conf mgr into the new memver conf_mgr. Don't call conf_mgr->add_key_to_notify anymore. (CallStack::Priv::on_config_value_changed_signal): Adjust signature. Get the key from conf_mgr as it's no more passed as a parameter. * src/persp/dbgperspective/nmv-dbg-perspective.cc (DBGPerspective::on_conf_key_changed_signal): Likewise. (DBGPerspective::read_default_config): Pass CONF_NAMESPACE_DESKTOP_INTERFACE argument to the namespace of IConfMgr::get_key_value as necessary. * src/persp/dbgperspective/schemas/Makefile.am: Moved to under data/. * src/persp/dbgperspective/schemas/nemiver-dbgperspective.schemas: Likewise. * src/workbench/Makefile.am: Don't handle schema (un)install as schemas got moved under data/ * src/workbench/nmv-workbench.cc: Include nmv-conf-keys.h. (Workbench::get_configuration_manager): Use DynamicModuleManager::load_iface_with_default_manager to load the conf mgr. Use the new IConfMgr::register_namespace API instead of the former IConfMgr::set_key_dir_to_notify and IConfMgr::add_key_to_notify. * src/workbench/schemas/Makefile.am: Moved under data/. * src/workbench/schemas/nemiver-workbench.schemas: Likewise. * tests/test-breakpoint.cc (test_main): Use the new debugger_utils::load_debugger_iface_with_confmgr * tests/test-cpptrait.cc: Likewise. * tests/test-deref.cc: Likewise. * tests/test-disassemble.cc: Likewise. * tests/test-global-variables.cc: Likewise. * tests/test-local-vars-list.cc: Likewise. * tests/test-overloads.cc: Likewise. * tests/test-types.cc: Likewise: * tests/test-var-list.cc: Likewise. * tests/test-var-path-expr.cc: Likewise. * tests/test-var-walker.cc: Likewise. * tests/test-varobj-walker.cc: Likewise. * tests/test-vars.cc: Likewise. * tests/test-watchpoint.cc: Likewise.
parent
36cd46bb
Please register or sign in to comment