[nemiver/better-variable-format: 3/4] Centralize conf keys decls/defs to src/confmgr



commit 61501a67b04372894a4b59da7899473ee502019f
Author: Dodji Seketeli <dodji gnome org>
Date:   Sat Sep 11 17:25:18 2010 +0200

    Centralize conf keys decls/defs to src/confmgr
    
    	* src/confmgr/nmv-conf-keys.h: Moved
    	src/persp/dbgperspective/nmv-conf-keys.h here.
    	* src/confmgr/nmv-conf-keys.cc: New.
    	* src/confmgr/Makefile.am: Add src/confmgr/nmv-conf-keys.[h,cc] to the
    	build system here.
    	* src/persp/dbgperspective/Makefile.am: Remove
    	src/persp/dbgperspective/nmv-conf-keys.h from the build sytem here.
    	* src/common/nmv-env.cc: Move definition of CONF_KEY_GDB_BINARY and
    	CONF_KEY_FOLLOW_FORK_MODE in src/confmgr/nmv-conf-keys.cc.
    	* src/persp/dbgperspective/nmv-dbg-perspective.cc: Move
    	definitions of CONF_KEY_NEMIVER_SOURCE_DIRS,
    	CONF_KEY_SHOW_DBG_ERROR_DIALOGS,
    	CONF_KEY_SHOW_SOURCE_LINE_NUMBERS,
    	CONF_KEY_CONFIRM_BEFORE_RELOAD_SOURCE,
    	CONF_KEY_ALLOW_AUTO_RELOAD_SOURCE, CONF_KEY_HIGHLIGHT_SOURCE_CODE,
    	CONF_KEY_SOURCE_FILE_ENCODING_LIST, CONF_KEY_USE_SYSTEM_FONT,
    	CONF_KEY_CUSTOM_FONT_NAME, CONF_KEY_SYSTEM_FONT_NAME,
    	CONF_KEY_USE_LAUNCH_TERMINAL,
    	CONF_KEY_STATUS_WIDGET_MINIMUM_WIDTH,
    	CONF_KEY_STATUS_WIDGET_MINIMUM_HEIGHT,
    	CONF_KEY_STATUS_PANE_LOCATION,
    	CONF_KEY_DEBUGGER_ENGINE_DYNMOD_NAME,
    	CONF_KEY_EDITOR_STYLE_SCHEME, CONF_KEY_ASM_STYLE_PURE,
    	CONF_KEY_DEFAULT_NUM_ASM_INSTRS, CONF_KEY_CONTEXT_PANE_LOCATION
    	into src/confmgr/nmv-conf-keys.cc.

 src/common/nmv-env.cc                              |    5 --
 src/confmgr/Makefile.am                            |    8 ++-
 src/confmgr/nmv-conf-keys.cc                       |   71 ++++++++++++++++++++
 .../dbgperspective => confmgr}/nmv-conf-keys.h     |    3 +
 src/persp/dbgperspective/Makefile.am               |    1 -
 src/persp/dbgperspective/nmv-dbg-perspective.cc    |   39 +-----------
 6 files changed, 80 insertions(+), 47 deletions(-)
---
diff --git a/src/common/nmv-env.cc b/src/common/nmv-env.cc
index 6e3571a..6a0b569 100644
--- a/src/common/nmv-env.cc
+++ b/src/common/nmv-env.cc
@@ -42,11 +42,6 @@ using namespace std;
 
 
 NEMIVER_BEGIN_NAMESPACE (nemiver)
-
-const char *CONF_KEY_GDB_BINARY = "/apps/nemiver/dbgperspective/gdb-binary";
-const char *CONF_KEY_FOLLOW_FORK_MODE = "/apps/nemiver/dbgperspective"
-                                        "/follow-fork-mode";
-
 NEMIVER_BEGIN_NAMESPACE (common)
 NEMIVER_BEGIN_NAMESPACE (env)
 
diff --git a/src/confmgr/Makefile.am b/src/confmgr/Makefile.am
index 27a8044..6c4961e 100644
--- a/src/confmgr/Makefile.am
+++ b/src/confmgr/Makefile.am
@@ -1,13 +1,15 @@
 gconfmgrmod_LTLIBRARIES=libgconfmgrmod.la
 gconfmgrmoddir= NEMIVER_MODULES_DIR@
 
-headers= nmv-i-conf-mgr.h
+public_headers=nmv-i-conf-mgr.h
+private_headers=nmv-conf-keys.h
+headers= $(public_headers) $(private_headers)
 
 libgconfmgrmod_la_SOURCES= \
 $(headers) \
-nmv-gconf-mgr.cc
+nmv-gconf-mgr.cc nmv-conf-keys.cc
 
-publicheaders_DATA=$(headers)
+publicheaders_DATA=$(public_headers)
 publicheadersdir=$(NEMIVER_INCLUDE_DIR)/dynmods
 
 libgconfmgrmod_la_LDFLAGS=-module -avoid-version -Wl,--as-needed
diff --git a/src/confmgr/nmv-conf-keys.cc b/src/confmgr/nmv-conf-keys.cc
new file mode 100644
index 0000000..b3f13b5
--- /dev/null
+++ b/src/confmgr/nmv-conf-keys.cc
@@ -0,0 +1,71 @@
+// Author: Dodji Seketeli
+/*
+ *This file is part of the Nemiver project
+ *
+ *Nemiver is free software; you can redistribute
+ *it and/or modify it under the terms of
+ *the GNU General Public License as published by the
+ *Free Software Foundation; either version 2,
+ *or (at your option) any later version.
+ *
+ *Nemiver is distributed in the hope that it will
+ *be useful, but WITHOUT ANY WARRANTY;
+ *without even the implied warranty of
+ *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *See the GNU General Public License for more details.
+ *
+ *You should have received a copy of the
+ *GNU General Public License along with Nemiver;
+ *see the file COPYING.
+ *If not, write to the Free Software Foundation,
+ *Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *See COPYRIGHT file copyright information.
+ */
+#include "config.h"
+#include "nmv-conf-keys.h"
+
+NEMIVER_BEGIN_NAMESPACE (nemiver)
+
+const char* CONF_KEY_NEMIVER_SOURCE_DIRS =
+                "/apps/nemiver/dbgperspective/source-search-dirs";
+const char* CONF_KEY_SHOW_DBG_ERROR_DIALOGS =
+                "/apps/nemiver/dbgperspective/show-dbg-error-dialogs";
+const char* CONF_KEY_SHOW_SOURCE_LINE_NUMBERS =
+                "/apps/nemiver/dbgperspective/show-source-line-numbers";
+const char* CONF_KEY_CONFIRM_BEFORE_RELOAD_SOURCE =
+                "/apps/nemiver/dbgperspective/confirm-before-reload-source";
+const char* CONF_KEY_ALLOW_AUTO_RELOAD_SOURCE =
+                "/apps/nemiver/dbgperspective/allow-auto-reload-source";
+const char* CONF_KEY_HIGHLIGHT_SOURCE_CODE =
+                "/apps/nemiver/dbgperspective/highlight-source-code";
+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=
+                "/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=
+                "/apps/nemiver/dbgperspective/status-widget-minimum-width";
+const char* CONF_KEY_STATUS_WIDGET_MINIMUM_HEIGHT=
+                "/apps/nemiver/dbgperspective/status-widget-minimum-height";
+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";
+const char* CONF_KEY_EDITOR_STYLE_SCHEME =
+                "/apps/nemiver/dbgperspective/editor-style-scheme";
+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_CONTEXT_PANE_LOCATION =
+                "/apps/nemiver/dbgperspective/context-pane-location";
+NEMIVER_END_NAMESPACE (nemiver)
diff --git a/src/persp/dbgperspective/nmv-conf-keys.h b/src/confmgr/nmv-conf-keys.h
similarity index 95%
rename from src/persp/dbgperspective/nmv-conf-keys.h
rename to src/confmgr/nmv-conf-keys.h
index acd965b..68c29cb 100644
--- a/src/persp/dbgperspective/nmv-conf-keys.h
+++ b/src/confmgr/nmv-conf-keys.h
@@ -26,6 +26,8 @@
 #ifndef __NMV_CONF_KEYS_H__
 #define __NMV_CONF_KEYS_H__
 
+#include "common/nmv-namespace.h"
+
 NEMIVER_BEGIN_NAMESPACE (nemiver)
 
 extern const char* CONF_KEY_NEMIVER_SOURCE_DIRS;
@@ -48,6 +50,7 @@ extern const char* CONF_KEY_ASM_STYLE_PURE;
 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;
 
 NEMIVER_END_NAMESPACE (nemiver)
 
diff --git a/src/persp/dbgperspective/Makefile.am b/src/persp/dbgperspective/Makefile.am
index b7f6271..fd7643c 100644
--- a/src/persp/dbgperspective/Makefile.am
+++ b/src/persp/dbgperspective/Makefile.am
@@ -68,7 +68,6 @@ nmv-choose-overloads-dialog.cc \
 nmv-choose-overloads-dialog.h \
 nmv-remote-target-dialog.cc \
 nmv-remote-target-dialog.h \
-nmv-conf-keys.h \
 nmv-dbg-perspective.cc \
 nmv-dbg-perspective.h \
 nmv-vars-treeview.h \
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc
index bf64279..ddf34dc 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -132,44 +132,7 @@ const char *DISASSEMBLY_TITLE = "<Disassembly>";
 
 static const int NUM_INSTR_TO_DISASSEMBLE = 20;
 
-const char* CONF_KEY_NEMIVER_SOURCE_DIRS =
-                "/apps/nemiver/dbgperspective/source-search-dirs";
-const char* CONF_KEY_SHOW_DBG_ERROR_DIALOGS =
-                "/apps/nemiver/dbgperspective/show-dbg-error-dialogs";
-const char* CONF_KEY_SHOW_SOURCE_LINE_NUMBERS =
-                "/apps/nemiver/dbgperspective/show-source-line-numbers";
-const char* CONF_KEY_CONFIRM_BEFORE_RELOAD_SOURCE =
-                "/apps/nemiver/dbgperspective/confirm-before-reload-source";
-const char* CONF_KEY_ALLOW_AUTO_RELOAD_SOURCE =
-                "/apps/nemiver/dbgperspective/allow-auto-reload-source";
-const char* CONF_KEY_HIGHLIGHT_SOURCE_CODE =
-                "/apps/nemiver/dbgperspective/highlight-source-code";
-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=
-                "/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=
-                "/apps/nemiver/dbgperspective/status-widget-minimum-width";
-const char* CONF_KEY_STATUS_WIDGET_MINIMUM_HEIGHT=
-                "/apps/nemiver/dbgperspective/status-widget-minimum-height";
-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";
-const char* CONF_KEY_EDITOR_STYLE_SCHEME =
-                "/apps/nemiver/dbgperspective/editor-style-scheme";
-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_CONTEXT_PANE_LOCATION =
-                "/apps/nemiver/dbgperspective/context-pane-location";
+
 
 const Gtk::StockID STOCK_SET_BREAKPOINT (SET_BREAKPOINT);
 const Gtk::StockID STOCK_LINE_POINTER (LINE_POINTER);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]