diff options
Diffstat (limited to 'grc/src/platforms')
-rw-r--r-- | grc/src/platforms/base/Constants.py.in | 24 | ||||
-rw-r--r-- | grc/src/platforms/base/Platform.py | 4 | ||||
-rw-r--r-- | grc/src/platforms/gui/Param.py | 1 | ||||
-rw-r--r-- | grc/src/platforms/python/Platform.py | 1 |
4 files changed, 6 insertions, 24 deletions
diff --git a/grc/src/platforms/base/Constants.py.in b/grc/src/platforms/base/Constants.py.in index 4ee4278f1..6d60f2493 100644 --- a/grc/src/platforms/base/Constants.py.in +++ b/grc/src/platforms/base/Constants.py.in @@ -19,29 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA import os -##The package name. +#package and version constants PACKAGE = '@PACKAGE@' - -##The current version. VERSION = '@VERSION@' -##Location of external data files. +#setup paths DATA_DIR = '@datadir@' - -##DTD validator for saved flow graphs. FLOW_GRAPH_DTD = os.path.join(DATA_DIR, 'flow_graph.dtd') - -##The default file extension for flow graphs. -FLOW_GRAPH_FILE_EXTENSION = '.grc' - -##The default file extension for saving flow graph snap shots. -IMAGE_FILE_EXTENSION = '.png' - -##The default path for the open/save dialogs. -DEFAULT_FILE_PATH = os.getcwd() - -##The default icon for the gtk windows. -PY_GTK_ICON = os.path.join(DATA_DIR, 'grc-icon-256.png') - -##The users home directory. -HOME_DIR = os.path.expanduser('~') +BLOCK_TREE_DTD = os.path.join(DATA_DIR, 'block_tree.dtd') diff --git a/grc/src/platforms/base/Platform.py b/grc/src/platforms/base/Platform.py index 2904208cc..ee6cd3ba3 100644 --- a/grc/src/platforms/base/Platform.py +++ b/grc/src/platforms/base/Platform.py @@ -26,7 +26,7 @@ from Connection import Connection as _Connection from Block import Block as _Block from Port import Port as _Port from Param import Param as _Param -from Constants import DATA_DIR +from Constants import BLOCK_TREE_DTD class Platform(_Element): @@ -102,7 +102,7 @@ class Platform(_Element): block_tree.add_block(parent, self.get_block(block_key)) #load the block tree f = self._block_tree - try: ParseXML.validate_dtd(f, os.path.join(DATA_DIR, 'block_tree.dtd')) + try: ParseXML.validate_dtd(f, BLOCK_TREE_DTD) except ParseXML.XMLSyntaxError, e: self._exit_with_error('Block tree "%s" failed: \n\t%s'%(f, e)) #add all blocks in the tree load_category(ParseXML.from_file(f)['cat']) diff --git a/grc/src/platforms/gui/Param.py b/grc/src/platforms/gui/Param.py index a2e09172c..013a8f84f 100644 --- a/grc/src/platforms/gui/Param.py +++ b/grc/src/platforms/gui/Param.py @@ -25,6 +25,7 @@ import gtk import pango import gobject from Constants import PARAM_LABEL_FONT, PARAM_FONT +from ... gui.Constants import DEFAULT_FILE_PATH from os import path ###################################################################################################### diff --git a/grc/src/platforms/python/Platform.py b/grc/src/platforms/python/Platform.py index c31701e0e..d1c8a36a8 100644 --- a/grc/src/platforms/python/Platform.py +++ b/grc/src/platforms/python/Platform.py @@ -18,7 +18,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA """ import os -from .. base.Constants import FLOW_GRAPH_FILE_EXTENSION from .. base.Platform import Platform as _Platform from FlowGraph import FlowGraph as _FlowGraph from Connection import Connection as _Connection |