Commit f3b5b027 authored by Fabien Parent's avatar Fabien Parent Committed by Dodji Seketeli
Browse files

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
......@@ -64,6 +64,10 @@ CPPUNIT_VERSION=1.10.0
AC_SUBST([CPPUNIT_VERSION])
GTKHEX_VERSION=2.21.4
AC_SUBST([GTKHEX_VERSION])
LIBGIOMM_WITH_GSETTINGS_VERSION=2.25.1
AC_SUBST([GIOMM_WITH_GSETTINGS_VERSION])
GSETTINGS_DESKTOP_SCHEMAS=0.0.1
AC_SUBST([GSETTINGS_DESKTOP_SCHEMAS])
dnl *********************
dnl Checks for programs.
......@@ -195,6 +199,28 @@ AC_ARG_ENABLE(symsvis,
ENABLE_GCC_SYMBOLS_VISIBILITY=$enableval,
ENABLE_GCC_SYMBOLS_VISIBILITY=no)
ENABLE_GSETTINGS=auto
AC_ARG_ENABLE(gsettings,
AS_HELP_STRING([--enable-gsettings=yes|no],
[use gsettings instead of gconf (default is auto)]),
ENABLE_GSETTINGS=$enableval,
AC_CHECK_PROG([HAS_DCONF], [dconf], [yes], [no])
[PKG_CHECK_EXISTS([giomm-2.4 >= $LIBGIOMM_WITH_GSETTINGS_VERSION gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS], [HAS_GSETTINGS=yes], [HAS_GSETTINGS=no])])
if test x$ENABLE_GSETTINGS = xyes || (test x$ENABLE_GSETTINGS = xauto \
&& test x$HAS_GSETTINGS = xyes \
&& test x$HAS_DCONF = xyes); then
AC_DEFINE([WITH_GSETTINGS], 1, [build with gsettings instead of gconf])
AC_DEFINE([CONFIG_MGR_MODULE_NAME], ["gsettingsmgr"], [configuration manager to use])
CONF_MGR=gsettings
ENABLE_GSETTINGS=yes
else
AC_DEFINE([CONFIG_MGR_MODULE_NAME], ["gconfmgr"], [configuration manager to use])
CONF_MGR=gconf
ENABLE_GSETTINGS=no
fi
AM_CONDITIONAL(BUILD_GSETTINGS, test x$ENABLE_GSETTINGS = xyes)
dnl *******************************
dnl checking for libraries we use
dnl *******************************
......@@ -206,7 +232,6 @@ AC_CHECK_HEADERS([boost/variant.hpp],
#dnl checking for non-aggregated lib
PKG_CHECK_MODULES(SQLITE3, [sqlite3 >= $SQLITE3_VERSION])
PKG_CHECK_MODULES(GCONF,[gconf-2.0 >= $GCONF_VERSION])
#######################################################
#boost build system sucks no end.
......@@ -242,11 +267,31 @@ if test x$ENABLE_MEMORYVIEW = xyes ; then
fi
dnl *******************
dnl gconf
dnl Configuration Manager
dnl *******************
AC_PATH_PROG(GCONFTOOL, gconftool-2)
AM_GCONF_SOURCE_2
AC_SUBST(GCONFTOOL)
if test x$CONF_MGR = xgsettings ; then
AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL],[0])
dnl library dependencies for the nemiver gsettings plugin
DEP_GSETTINGS="giomm-2.4 >= $LIBGIOMM_WITH_GSETTINGS_VERSION \
gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS"
PKG_CHECK_MODULES(NEMIVERGSETTINGS, $DEP_GSETTINGS)
AC_SUBST(NEMIVERGSETTINGS_LIBS)
AC_SUBST(NEMIVERGSETTINGS_CFLAGS)
GLIB_GSETTINGS
elif test x$CONF_MGR = xgconf ; then
PKG_CHECK_MODULES(GCONF,[gconf-2.0 >= $GCONF_VERSION])
AC_PATH_PROG(GCONFTOOL, gconftool-2)
AC_SUBST(GCONFTOOL)
AM_GCONF_SOURCE_2
else
AC_MSG_ERROR([Configuration Manager undetermined. Abort...])
fi
dnl library dependencies for libnemivercommon and the IDebugger libraries
DEP_COMMON="gmodule-2.0 >= $LIBGMODULE_VERSION \
......@@ -395,10 +440,10 @@ src/Makefile
src/dbgengine/varlistwalker.conf
src/confmgr/Makefile
src/confmgr/gconfmgr.conf
src/confmgr/gsettingsmgr.conf
src/uicommon/Makefile
src/workbench/Makefile
src/workbench/workbench.conf
src/workbench/schemas/Makefile
src/persp/Makefile
src/persp/dbgperspective/Makefile
src/persp/dbgperspective/dbgperspective.conf
......@@ -407,7 +452,6 @@ src/Makefile
src/persp/dbgperspective/icons/Makefile
src/persp/dbgperspective/sqlscripts/Makefile
src/persp/dbgperspective/sqlscripts/sqlite/Makefile
src/persp/dbgperspective/schemas/Makefile
data/Makefile
data/icons/Makefile
data/icons/16x16/Makefile
......@@ -416,6 +460,9 @@ data/Makefile
data/icons/32x32/Makefile
data/icons/48x48/Makefile
data/icons/scalable/Makefile
data/schemas/Makefile
data/schemas/gconf/Makefile
data/schemas/gsettings/Makefile
ui/Makefile
menus/Makefile
tests/Makefile
......@@ -447,6 +494,7 @@ AC_MSG_NOTICE([
Enable verbose debug messages : ${ENABLE_DEBUG}
Enable workbench : ${ENABLE_WORKBENCH}
Enable memory view : ${ENABLE_MEMORYVIEW} (requires gtkhex > $GTKHEX_VERSION)
Configuration Manager : ${CONF_MGR}
Enable symbols visibility ctrl : ${ENABLE_GCC_SYMBOLS_VISIBILITY}
Maintainer mode : ${USER_MAINTAINER_MODE}
......
SUBDIRS=icons
SUBDIRS=icons schemas
desktopdir = $(datadir)/applications
desktop_in_files = nemiver.desktop.in
......
if BUILD_GSETTINGS
SUBDIRS=gsettings
else
SUBDIRS=gconf
endif
files=nemiver-dbgperspective.schemas
files=nemiver-dbgperspective.schemas nemiver-workbench.schemas
schemasdir = $(GCONF_SCHEMA_FILE_DIR)
schemas_DATA = $(files)
GCONFTOOL=@GCONFTOOL@
export GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE)
export files
install-data-local: install-schemas
uninstall-local: uninstall-schemas
install-schemas:
if GCONF_SCHEMAS_INSTALL
if test -z "$(DESTDIR)" ; then \
for s in `echo $$files | tr ' ' '\n'` ; do \
$(GCONFTOOL) --makefile-install-rule $(top_srcdir)/src/persp/dbgperspective/schemas/$$s ; \
done ; \
gconfpid=`pidof gconfd-2` ; \
if test x$$gconfpid != x ; then \
for s in `echo $$files | tr ' ' '\n'` ; do \
$(GCONFTOOL) --makefile-install-rule $(top_srcdir)/data/schemas/gconf/$$s ; \
done ; \
gconfpid=`pidof gconfd-2` ; \
if test x$$gconfpid != x ; then \
kill -HUP $$gconfpid ; \
echo "gconf $$gconfpid reloaded its config" ;\
fi \
fi \
fi
endif
endif # GCONF_SCHEMAS_INSTALL
uninstall-schemas:
if GCONF_SCHEMAS_INSTALL
if test -z "$(DESTDIR)" ; then \
for s in `echo $$files | tr ' ' '\n'` ; do $(GCONFTOOL) --makefile-uninstall-rule $(top_srcdir)/src/persp/dbgperspective/schemas/$$s ; done \
for s in `echo $$files | tr ' ' '\n'` ; do $(GCONFTOOL) --makefile-uninstall-rule $(top_srcdir)/data/schemas/gconf/$$s ; done \
fi
endif
endif # GCONF_SCHEMAS_INSTALL
EXTRA_DIST=$(files)
files=org.nemiver.gschema.xml
gsettingsschema_DATA = $(files)
export files
install-data-local: install-schemas
uninstall-local: uninstall-schemas
install-schemas: install-gsettingsschemaDATA
$(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
uninstall-schemas: uninstall-gsettingsschemaDATA
$(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
EXTRA_DIST=$(files)
<schemalist>
<schema id="org.nemiver" path="/apps/nemiver/">
<key name="source-search-dirs" type="s">
<default>'.'</default>
<summary>source directory dirs</summary>
<description>The list of directories where to search for source files.
This is used only when there is not enough information in the binary to
locate the file.</description>
</key>
<key name="show-dbg-error-dialogs" type="b">
<default>false</default>
<summary>Show or don't show errors coming from the debugger engine</summary>
<description>If set to yes, popups error message dialogs showing errors
coming from the underlying debugger engine.</description>
</key>
<key name="show-source-line-numbers" type="b">
<default>true</default>
<summary>Show or don't show source lines numbers</summary>
<description>If set to yes, show the source code line number on the left
hand side of each line.</description>
</key>
<key name="confirm-before-reload-source" type="b">
<default>true</default>
<summary>Ask the user before reloading a source file</summary>
<description>When a source file needs to be reloaded, if this key is set
to yes, ask the user before reloading.</description>
</key>
<key name="allow-auto-reload-source" type="b">
<default>true</default>
<summary>Do not automatically reload the source file</summary>
<description>If the user chooses not to be asked about re-loading changed
source files and if this key is set to true, re-load the source file
automatically.</description>
</key>
<key name="highlight-source-code" type="b">
<default>true</default>
<summary>Highlight source code</summary>
<description>If set to yes, highlight source code.</description>
</key>
<key name="use-system-font" type="b">
<default>true</default>
<summary>Whether to use the system font for the source editor</summary>
<description>Whether to use the system font for the source editor.</description>
</key>
<key name="custom-font-name" type="s">
<default>'monospace 12'</default>
<summary>The custom font to use if we're not using the system font</summary>
<description>The custom font to use for the source editor if we're not
using the system font.</description>
</key>
<key name="use-launch-terminal" type="b">
<default>false</default>
<summary>Whether to use the terminal we were launched from</summary>
<description>Whether to use the terminal we were launched from as
the debuggee's terminal, or to use our own embedded terminal.</description>
</key>
<key name="editor-style-scheme" type="s">
<default>'classic'</default>
<summary>The style of the source editor</summary>
<description>The name of the source editor color scheme.</description>
</key>
<key name="status-widget-minimum-width" type="i">
<default>100</default>
<summary>The minimum width of the status widget</summary>
<description>The minimum width of the status widget.</description>
</key>
<key name="status-widget-minimum-height" type="i">
<default>70</default>
<summary>The minimum height of the status widget</summary>
<description>The minimum height of the status widget.</description>
</key>
<key name="status-pane-location" type="i">
<default>-1</default>
<summary>The location of the status pane</summary>
<description>The location of the status pane.</description>
</key>
<key name="debugger-engine-dynmod" type="s">
<default>'gdbengine'</default>
<summary>The underlying debugger engine management module</summary>
<description>The name of the debugger engine management module used.</description>
</key>
<key name="gdb-binary" type="s">
<default>'default-gdb-binary'</default>
<summary>The underlying debugger engine</summary>
<description>The name of the debugger engine management module used.</description>
</key>
<key name="asm-style-pure" type="b">
<default>false</default>
<summary>Show the assembly in pure form</summary>
<description>If set to yes, pure assembly code is shown when switching
to assembly view. Otherwise, source code mixed with assembly code is
shown.</description>
</key>
<key name="default-num-asm-instrs" type="i">
<default>25</default>
<summary>The number of assembly instructions to show by default</summary>
<description>The number of instructions that are disassembled by default.</description>
</key>
<key name="context-pane-location" type="i">
<default>-1</default>
<summary>The position of the splitter in the debug context tab</summary>
<description>The position of the splitter in the debug context tab.
This is saved by the UI automatically.</description>
</key>
<key name="follow-fork-mode" type="s">
<default>'parent'</default>
<summary>Which process to follow upon a fork</summary>
<description>If a fork happen, follow the parent parent process if the
key is set to 'parent', or follow the child process if the key is set to
'child'.</description>
</key>
<key name="callstack-expansion-chunk" type="i">
<default>25</default>
<summary>The size of the call stack to display</summary>
<description>Do not automatically display call stack wider than this
value.</description>
</key>
<key name="source-file-encoding-list" type="as">
<default>['UTF-8','ISO-8859','ISO-8859-1','ISO-8859-15']</default>
<summary>The list of of file encodings supported by nemiver</summary>
<description>When nemiver opens a file, it will assume the encoding of the
file is one of the encodings listed here. Please bear in mind that
Nemiver works internally with files in the UTF-8 encoding. So when it
loads a file, it must convert the file encoding into UTF-8. Therefore,
Nemiver needs to know the possible set of encodings of the source files
it has to open.</description>
</key>
<key name="window-width" type="i">
<default>800</default>
<summary>window width</summary>
<description>The width of the workbench window.</description>
</key>
<key name="window-height" type="i">
<default>600</default>
<summary>window height</summary>
<description>The height of the workbench window.</description>
</key>
<key name="window-position-x" type="i">
<default>10</default>
<summary>window x position</summary>
<description>The X coordinate of the workbench window.</description>
</key>
<key name="window-position-y" type="i">
<default>10</default>
<summary>window y position</summary>
<description>The Y coordinate of the workbench window.</description>
</key>
<key name="window-maximized" type="b">
<default>false</default>
<summary>window maximization</summary>
<description>Whether the workbench window is maximized.</description>
</key>
<key name="window-minimum-width" type="i">
<default>700</default>
<summary>window minim width</summary>
<description>The workbench main window minium width.</description>
</key>
<key name="window-minimum-height" type="i">
<default>500</default>
<summary>window minimum height</summary>
<description>The workbench main window minium height.</description>
</key>
</schema>
</schemalist>
gconfmgrmod_LTLIBRARIES=libgconfmgrmod.la
gconfmgrmoddir=@NEMIVER_MODULES_DIR@
h=$(abs_srcdir)
public_headers=$(h)/nmv-i-conf-mgr.h
private_headers=$(h)/nmv-conf-keys.h
headers= $(public_headers) $(private_headers)
libgconfmgrmod_la_SOURCES= \
$(headers) \
$(h)/nmv-gconf-mgr.cc \
$(h)/nmv-conf-keys.cc
publicheaders_DATA=$(public_headers)
publicheadersdir=$(NEMIVER_INCLUDE_DIR)/dynmods
libgconfmgrmod_la_LDFLAGS=-module -avoid-version -Wl,--as-needed
libgconfmgrmod_la_LIBADD=@NEMIVERCOMMON_LIBS@ @GCONF_LIBS@ \
$(abs_top_builddir)/src/common/libnemivercommon.la
config_DATA=gconfmgr.conf
configdir=@NEMIVER_SYSTEM_CONFIG_DIR@
INCLUDES=@NEMIVERCOMMON_CFLAGS@ @GCONF_CFLAGS@ -DENABLE_NLS=1 -DDATADIR=\"${datadir}\" \
INCLUDES=@NEMIVERCOMMON_CFLAGS@ -DENABLE_NLS=1 -DDATADIR=\"${datadir}\" \
-I$(abs_top_srcdir)/src
EXTRA_DIST=gconfmgr.conf.in
if BUILD_GSETTINGS
libgsettingsmgrmod_la_SOURCES=$(headers) $(h)/nmv-gsettings-mgr.cc\
$(h)/nmv-gsettings-keys-defs.cc
libgsettingsmgrmod_la_LDFLAGS=-module -avoid-version -Wl,--as-needed
libgsettingsmgrmod_la_LIBADD=@NEMIVERCOMMON_LIBS@ @NEMIVERGSETTINGS_LIBS@ \
$(abs_top_builddir)/src/common/libnemivercommon.la
gsettingsmgrmod_LTLIBRARIES=libgsettingsmgrmod.la
gsettingsmgrmoddir=@NEMIVER_MODULES_DIR@
config_DATA=gsettingsmgr.conf
INCLUDES+= @NEMIVERGSETTINGS_CFLAGS@
else
libgconfmgrmod_la_SOURCES=$(headers) $(h)/nmv-gconf-mgr.cc\
$(h)/nmv-gconf-keys-defs.cc
libgconfmgrmod_la_LDFLAGS=-module -avoid-version -Wl,--as-needed
libgconfmgrmod_la_LIBADD=@NEMIVERCOMMON_LIBS@ @GCONF_LIBS@ \
$(abs_top_builddir)/src/common/libnemivercommon.la
gconfmgrmod_LTLIBRARIES=libgconfmgrmod.la
gconfmgrmoddir=@NEMIVER_MODULES_DIR@
config_DATA=gconfmgr.conf
INCLUDES+= @GCONF_CFLAGS@
endif
EXTRA_DIST=gconfmgr.conf.in gsettingsmgr.conf.in
<moduleconfig>
<module>
<name>gsettingsmgr</name>
<!-- Remember, Interface name is IConfMgr-->
<libraryname>gsettingsmgrmod</libraryname>
</module>
<customsearchpaths>
<path>@NEMIVER_LIBDIR@/nemiver/modules</path>
</customsearchpaths>
</moduleconfig>
......@@ -30,6 +30,12 @@
NEMIVER_BEGIN_NAMESPACE (nemiver)
extern const char* CONF_NAMESPACE_NEMIVER;
extern const char* CONF_NAMESPACE_DESKTOP_INTERFACE;
extern const char* CONF_KEY_SYSTEM_FONT_NAME;
extern const char* CONF_KEY_NEMIVER_SOURCE_DIRS;
extern const char* CONF_KEY_SHOW_DBG_ERROR_DIALOGS;
extern const char* CONF_KEY_SHOW_SOURCE_LINE_NUMBERS;
......@@ -39,7 +45,6 @@ extern const char* CONF_KEY_HIGHLIGHT_SOURCE_CODE;
extern const char* CONF_KEY_SOURCE_FILE_ENCODING_LIST;
extern const char* CONF_KEY_USE_SYSTEM_FONT;
extern const char* CONF_KEY_CUSTOM_FONT_NAME;
extern const char* CONF_KEY_SYSTEM_FONT_NAME;
extern const char* CONF_KEY_USE_LAUNCH_TERMINAL;
extern const char* CONF_KEY_STATUS_WIDGET_MINIMUM_WIDTH;
extern const char* CONF_KEY_STATUS_WIDGET_MINIMUM_HEIGHT;
......@@ -51,6 +56,15 @@ extern const char* CONF_KEY_GDB_BINARY;
extern const char* CONF_KEY_DEFAULT_NUM_ASM_INSTRS;
extern const char* CONF_KEY_FOLLOW_FORK_MODE;
extern const char* CONF_KEY_CONTEXT_PANE_LOCATION;
extern const char* CONF_KEY_NEMIVER_CALLSTACK_EXPANSION_CHUNK;
extern const char* CONF_KEY_NEMIVER_WINDOW_WIDTH;
extern const char* CONF_KEY_NEMIVER_WINDOW_HEIGHT;
extern const char* CONF_KEY_NEMIVER_WINDOW_POSITION_X;
extern const char* CONF_KEY_NEMIVER_WINDOW_POSITION_Y;
extern const char* CONF_KEY_NEMIVER_WINDOW_MAXIMIZED;
extern const char* CONF_KEY_NEMIVER_WINDOW_MINIMUM_WIDTH;
extern const char* CONF_KEY_NEMIVER_WINDOW_MINIMUM_HEIGHT;
NEMIVER_END_NAMESPACE (nemiver)
......
// Author: Dodji Seketeli
// Author: Fabien Parent
/*
*This file is part of the Nemiver project
*
......@@ -27,6 +27,15 @@
NEMIVER_BEGIN_NAMESPACE (nemiver)
const char* CONF_NAMESPACE_NEMIVER = "/apps/nemiver";
const char* CONF_NAMESPACE_DESKTOP_INTERFACE = "/desktop/gnome/interface";
const char* CONF_KEY_SYSTEM_FONT_NAME =
"/desktop/gnome/interface/monospace_font_name";
/* dbgperspective */
const char* CONF_KEY_NEMIVER_SOURCE_DIRS =
"/apps/nemiver/dbgperspective/source-search-dirs";
const char* CONF_KEY_SHOW_DBG_ERROR_DIALOGS =
......@@ -43,17 +52,15 @@ const char* CONF_KEY_SOURCE_FILE_ENCODING_LIST =
"/apps/nemiver/dbgperspective/source-file-encoding-list";
const char* CONF_KEY_USE_SYSTEM_FONT =
"/apps/nemiver/dbgperspective/use-system-font";
const char* CONF_KEY_CUSTOM_FONT_NAME=
const char* CONF_KEY_CUSTOM_FONT_NAME =
"/apps/nemiver/dbgperspective/custom-font-name";
const char* CONF_KEY_SYSTEM_FONT_NAME=
"/desktop/gnome/interface/monospace_font_name";
const char* CONF_KEY_USE_LAUNCH_TERMINAL =
"/apps/nemiver/dbgperspective/use-launch-terminal";
const char* CONF_KEY_STATUS_WIDGET_MINIMUM_WIDTH=
const char* CONF_KEY_STATUS_WIDGET_MINIMUM_WIDTH =
"/apps/nemiver/dbgperspective/status-widget-minimum-width";
const char* CONF_KEY_STATUS_WIDGET_MINIMUM_HEIGHT=
const char* CONF_KEY_STATUS_WIDGET_MINIMUM_HEIGHT =
"/apps/nemiver/dbgperspective/status-widget-minimum-height";
const char* CONF_KEY_STATUS_PANE_LOCATION=
const char* CONF_KEY_STATUS_PANE_LOCATION =
"/apps/nemiver/dbgperspective/status-pane-location";
const char* CONF_KEY_DEBUGGER_ENGINE_DYNMOD_NAME =
"/apps/nemiver/dbgperspective/debugger-engine-dynmod";
......@@ -63,9 +70,30 @@ const char* CONF_KEY_ASM_STYLE_PURE =
"/apps/nemiver/dbgperspective/asm-style-pure";
const char* CONF_KEY_DEFAULT_NUM_ASM_INSTRS =
"/apps/nemiver/dbgperspective/default-num-asm-instrs";
const char *CONF_KEY_GDB_BINARY = "/apps/nemiver/dbgperspective/gdb-binary";
const char *CONF_KEY_FOLLOW_FORK_MODE = "/apps/nemiver/dbgperspective"
"/follow-fork-mode";
const char* CONF_KEY_GDB_BINARY =
"/apps/nemiver/dbgperspective/gdb-binary";
const char* CONF_KEY_FOLLOW_FORK_MODE =
"/apps/nemiver/dbgperspective/follow-fork-mode";
const char* CONF_KEY_CONTEXT_PANE_LOCATION =
"/apps/nemiver/dbgperspective/context-pane-location";
const char* CONF_KEY_NEMIVER_CALLSTACK_EXPANSION_CHUNK =
"/apps/nemiver/dbgperspective/callstack-expansion-chunk";
/* Workbench */
const char* CONF_KEY_NEMIVER_WINDOW_WIDTH =
"/apps/nemiver/workbench/window-width";
const char* CONF_KEY_NEMIVER_WINDOW_HEIGHT =
"/apps/nemiver/workbench/window-height";
const char* CONF_KEY_NEMIVER_WINDOW_POSITION_X =
"/apps/nemiver/workbench/window-position-x";
const char* CONF_KEY_NEMIVER_WINDOW_POSITION_Y =
"/apps/nemiver/workbench/window-position-y";
const char* CONF_KEY_NEMIVER_WINDOW_MAXIMIZED =
"/apps/nemiver/workbench/window-maximized";
const char* CONF_KEY_NEMIVER_WINDOW_MINIMUM_WIDTH =
"/apps/nemiver/workbench/window-minimum-width";
const char* CONF_KEY_NEMIVER_WINDOW_MINIMUM_HEIGHT =
"/apps/nemiver/workbench/window-minimum-height";
NEMIVER_END_NAMESPACE (nemiver)
<
......@@ -27,6 +27,7 @@
#include "common/nmv-ustring.h"
#include "common/nmv-exception.h"
#include "common/nmv-safe-ptr-utils.h"
#include "nmv-conf-keys.h"
NEMIVER_BEGIN_NAMESPACE (nemiver)
......@@ -37,34 +38,55 @@ class GConfMgr : public IConfMgr {
GConfMgr& operator= (const GConfMgr &);
GConfClient *m_gconf_client;
sigc::signal<void, const UString&, IConfMgr::Value&> m_value_changed_signal;
sigc::signal<void, const UString&, const UString&> m_value_changed_signal;
public:
GConfMgr (DynamicModule *a_dynmod);
virtual ~GConfMgr ();
void set_key_dir_to_notify (const UString &a_key_dir);
void add_key_to_notify (const UString &a_key);
const UString& get_default_namespace () const;
bool get_key_value (const UString &a_key, UString &a_value);
void set_key_value (const UString &a_key, const UString &a_value);
void register_namespace (const UString &a_name);
bool get_key_value (const UString &a_key, bool &a_value);
void set_key_value (const UString &a_key, bool a_value);
bool get_key_value (const UString &a_key,
UString &a_value,
const UString &a_namespace);
void set_key_value (const UString &a_key,
const UString &a_value,
const UString &a_namespace);
bool get_key_value (const UString &a_key, int &a_value);
void set_key_value (const UString &a_key, int a_value);
bool get_key_value (const UString &a_key,
bool &a_value,
const UString &a_namespace);