commit-gnue
[Top][All Lists]
Advanced

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

gnue gnue-common/doc/GCommSpecifications.txt gn...


From: Jason Cater
Subject: gnue gnue-common/doc/GCommSpecifications.txt gn...
Date: Thu, 27 Sep 2001 00:32:52 -0400

CVSROOT:        /home/cvs
Module name:    gnue
Changes by:     Jason Cater <address@hidden>    01/09/27 00:32:52

Modified files:
        gnue-common/doc: GCommSpecifications.txt 
        gnue-common/src: GBaseApp.py GClientApp.py GServerApp.py 
        gnuef/src      : GFConfig.py GFForm.py 

Log message:
        Synching machines

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/doc/GCommSpecifications.txt.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/GBaseApp.py.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/GClientApp.py.diff?cvsroot=OldCVS&tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/GServerApp.py.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFConfig.py.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFForm.py.diff?cvsroot=OldCVS&tr1=1.120&tr2=1.121&r1=text&r2=text

Patches:
Index: gnue/gnue-common/doc/GCommSpecifications.txt
diff -u gnue/gnue-common/doc/GCommSpecifications.txt:1.1 
gnue/gnue-common/doc/GCommSpecifications.txt:1.2
--- gnue/gnue-common/doc/GCommSpecifications.txt:1.1    Fri Sep 21 15:44:26 2001
+++ gnue/gnue-common/doc/GCommSpecifications.txt        Thu Sep 27 00:32:52 2001
@@ -1,3 +1,83 @@
-Please add your ideas here. 
+Objective
+=========
 
-Thanks.
+
+Motivation
+==========
+
+Several GNUe tools require a platform- and implementation-independent means
+of communicating with other GNUe tools:
+
+   * GNUe Forms (client)
+   * GNUe Reports (server/client)
+   * GEAS (server/client) (?)
+   * GNUe Integrator (server/client)
+   * GNUe Security Server (server/client)???
+
+Each of these tools will need to communicate with the world via several
+protocols:
+
+   * Sockets
+   * Corba
+   * XML-RPC
+   * SOAP
+   * Local Instance (?)
+
+The goal of GComm is to abstract inter-tool communications so that all tools
+can share a common code base.  This also allows new mechanisms to be added
+via plug-ins that will work with all tools.  For example, as soon as an
+XML-RPC driver is implemented, all the tools using GComm can utilite XML-RPC.
+Likewise, as soon as new encryption techniques are implemented, all the
+GComm tools will support the new encryption model.
+
+
+Pitfalls
+========
+
+
+
+
+Design Considerations
+=====================
+
+The main considerations are (in no particular order as all are critical):
+
+   * Reusability
+       GComm must meet the communication needs of all the GNUe
+       GNUe clients and servers.  Where practical, this is not
+       limited to the communication between the clients and
+       servers, but also between the clients/servers and other
+       non-GNUe sources (i.e., if a server exports a CORBA
+       interface, this interface should be usable by GNUe and
+       non-GNUe clients. Likewise, if a GNUe client needs to
+       connect to a non-GNUe service, GComm should provide the
+       basis for this connectivity.
+
+   * Security
+       GComm must securely pass through whatever security
+       mechanisms are in place.  If simple username/password
+       mechanisms are used, then this must be passed along.
+       Likewise, if a session-ticketing mechanism is used,
+       this "ticket" should be passed.
+
+       GComm drivers should support some sort of encryption
+       if the communications medium doesn't directly support
+       such.
+
+   * Modularity
+       GComm should support a plug-in based driver mechanism
+       so that new communication channels can easily be added
+       to the system.  This will help ensure the long-term
+       viability of our system as new communication methods
+       can be added as they become popular.
+
+   * Portability
+       The GComm interface should be abstracted to be platform
+       and communication medium independent.
+
+       Individual drivers for OS-specific communications media
+       can, of course, be OS-specific. (e.g, if someone really
+       wanted an AppleTalk client, the plug-in driver could be
+       Mac specific if necessary.)
+
+
Index: gnue/gnue-common/src/GBaseApp.py
diff -u gnue/gnue-common/src/GBaseApp.py:1.1 
gnue/gnue-common/src/GBaseApp.py:1.2
--- gnue/gnue-common/src/GBaseApp.py:1.1        Sun Sep  9 19:24:04 2001
+++ gnue/gnue-common/src/GBaseApp.py    Thu Sep 27 00:32:52 2001
@@ -22,11 +22,11 @@
 # GBaseApp.py
 #
 # DESCRIPTION:
-# Class that provides a basis for GNUe applications. 
+# Class that provides a basis for GNUe applications.
 #
 # NOTES:
 # Typically, this class will not be called; rather, a tool will
-# be a GClientApp or GServerApp. 
+# be a GClientApp or GServerApp.
 #
 # HISTORY:
 #
@@ -34,25 +34,25 @@
 import GDebug
 import getopt
 import sys
-import string 
+import string
 import os
 import GConnections
 import GConfig
 
-class GBaseApp:  
+class GBaseApp:
 
   # Attributes to be overwritten by subclasses
   VERSION = "0.0.0"
-  NAME = "GNUe Client Application"
+  NAME = "GNUe Application"
   COMMAND_OPTIONS = []  # Should be in same format as _base_options below
   SUMMARY = "A brief summary of the program goes here."
-  COMMAND = "client"
+  COMMAND = app"
   USAGE = "%s [options] file"
 
 
   #  Run the program
   #  Should be overwritten by subclasses
-  def run(self): 
+  def run(self):
     pass
 
 
@@ -64,21 +64,21 @@
 
 
 
-  def __init__(self, connections=None, application=None): 
-    # format of COMMAND_OPTIONS and _base_options: 
-    #  [option, option] where option is: 
-    #       [dictionary key name, short option, long option, 
-    #        argument follows option?, argument name, help message] 
+  def __init__(self, connections=None, application=None):
+    # format of COMMAND_OPTIONS and _base_options:
+    #  [option, option] where option is:
+    #       [dictionary key name, short option, long option,
+    #        argument follows option?, argument name, help message]
     self._base_options = [
          [ 'version','v','version',0,0, None,
-           'Displays the version information for this program.' ], 
+           'Displays the version information for this program.' ],
          [ 'debug_level','d','debug_level',1,0, "level",
            'Enables debugging messages.  Argument specifies the ' + \
            'level of messages to display (e.g., "-d5" displays ' + \
-           'all debugging messages at level 5 or below.)' ], 
+           'all debugging messages at level 5 or below.)' ],
          [ 'debug_file','D','debug_file',1,None, "file",
            'Sends all debugging messages to a specified file ' + \
-           '(e.g., "-D trace.log" sends all output to "trace.log")' ], 
+           '(e.g., "-D trace.log" sends all output to "trace.log")' ],
          [ 'connections', 'f', 'connections', 1, None, "loc",
            'Specifies the location of the connection definition file. ' + \
            '<loc> may specify a file name ' + \
@@ -86,15 +86,15 @@
            'or a URL location ' + \
            '(http://localhost/connections.conf). '+ \
            'If this option is not specified, the environent variable ' + \
-           'GNUE_CONNECTIONS is checked.' ], 
+           'GNUE_CONNECTIONS is checked.' ],
          [ 'help', 'h', 'help', 0, None, None,
-           'Displays this help screen.' ], 
+           'Displays this help screen.' ],
          [ 'profile', 'p', 'profile', 0, None, None,
            "Run Python's built-in profiler and display the resulting " + \
-           "run statistics." ], 
+           "run statistics." ],
     ]
 
-    # 
+    #
     # Get all command line options and arguments
     #
     shortoptions = ""
@@ -121,12 +121,12 @@
       if len(o[1]):
         self.OPTIONS[lookup[o[0]]] = o[1] 
       else:
-        self.OPTIONS[lookup[o[0]]] = 1 
+        self.OPTIONS[lookup[o[0]]] = 1
 
-    if self.OPTIONS['help']: 
+    if self.OPTIONS['help']:
       self.printHelp()
       sys.exit()
-    elif self.OPTIONS['version']: 
+    elif self.OPTIONS['version']:
       self.printVersion()
       sys.exit()
 
@@ -189,7 +189,7 @@
   #
   def printVersion(self): 
     print "\n%s\nVersion %s\n" % (self.NAME, self.VERSION)
-    
+
   #
   #  Display version information for this program
   #
@@ -243,49 +243,25 @@
 
 
   #
-  #  Display a startup error and exit gracefully with a message on 
+  #  Display a startup error and exit gracefully with a message on
   #  how to get help
   #
   def handleStartupError(self, msg):
       self.printVersion()
 
       # if msg is multiline, then surround with dashes to set it apart
-      if string.find(msg, "\n") + 1: 
+      if string.find(msg, "\n") + 1:
         print '-' * 60
       print "Error: %s" % msg
-      if string.find(msg, "\n") + 1: 
+      if string.find(msg, "\n") + 1:
         print '-' * 60
       print "\nFor help, type:\n   %s --help\n" % (self.COMMAND)
       sys.exit()
 
-  # 
-  #  Set the login handler for this session
-  #
-  def setLoginHandler(self, loginHandler): 
-    if self.connections:
-      self.connections.loginHandler = loginHandler
-
-
-  # 
-  #  Get the login handler for this session
-  #
-  def getLoginHandler(self): 
-    if self.connections and self.connections.loginHandler:
-      return self.connections.loginHandler
-    else: 
-      return None
-
-
-  # 
-  #  Set the login handler for this session
-  #
-  def getConnectionManager(self): 
-    return self.connections
-
   #
-  #  Used when profiling 
+  #  Used when profiling
   #
-  def _profile(self): 
+  def _profile(self):
 
     import profile
     prof = profile.Profile()
Index: gnue/gnue-common/src/GClientApp.py
diff -u gnue/gnue-common/src/GClientApp.py:1.11 
gnue/gnue-common/src/GClientApp.py:1.12
--- gnue/gnue-common/src/GClientApp.py:1.11     Sun Sep  9 19:24:04 2001
+++ gnue/gnue-common/src/GClientApp.py  Thu Sep 27 00:32:52 2001
@@ -26,7 +26,7 @@
 #
 # NOTES:
 # This will eventually have features only needed by "client"
-# applications, such as abstracted client RPC calls via 
+# applications, such as abstracted client RPC calls via
 # CORBA, RPC-XML, SOAP, etc. 
 #
 # HISTORY:
@@ -35,5 +35,29 @@
 from GBaseApp import GBaseApp
 
 class GClientApp(GBaseApp): 
-  pass
-  
+
+  #
+  #  Set the login handler for this session
+  #
+  def setLoginHandler(self, loginHandler):
+    if self.connections:
+      self.connections.loginHandler = loginHandler
+
+
+  #
+  #  Get the login handler for this session
+  #
+  def getLoginHandler(self):
+    if self.connections and self.connections.loginHandler:
+      return self.connections.loginHandler
+    else:
+      return None
+
+
+  #
+  #  Set the connection manager for this session
+  #
+  def getConnectionManager(self):
+    return self.connections
+
+
Index: gnue/gnue-common/src/GServerApp.py
diff -u gnue/gnue-common/src/GServerApp.py:1.1 
gnue/gnue-common/src/GServerApp.py:1.2
--- gnue/gnue-common/src/GServerApp.py:1.1      Sun Sep  9 19:24:04 2001
+++ gnue/gnue-common/src/GServerApp.py  Thu Sep 27 00:32:52 2001
@@ -6,14 +6,14 @@
 # License as published by the Free Software Foundation; either 
 # version 2, or (at your option) any later version.
 #
-# GNU Enterprise 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 
+# GNU Enterprise 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 program; see the file COPYING. If not, 
-# write to the Free Software Foundation, Inc., 59 Temple Place 
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
 # - Suite 330, Boston, MA 02111-1307, USA.
 #
 # Copyright 2000, 2001 Free Software Foundation
@@ -22,22 +22,34 @@
 # GServerApp.py
 #
 # DESCRIPTION:
-# Class that provides a basis for GNUe server applications. 
+# Class that provides a basis for GNUe server applications.
 #
 # NOTES:
-# This will eventually have features only needed by "client"
-# applications, such as abstracted client RPC calls via 
-# CORBA, RPC-XML, SOAP, etc. 
+# This will eventually have features only needed by "server"
+# applications, such as abstracted client RPC calls via
+# CORBA, RPC-XML, SOAP, etc and daemon/forking/threading. 
 #
-# HISTORY:
-#
 
 from GBaseApp import GBaseApp
 
 # TODO: Implement RPC abstraction layer
 # TODO: Implement spawning/daemon support
 # TODO: Implement either multi-threading or asynchronous IO support
+
+class GServerApp(GBaseApp):
+
+
+  # This can be overwritten by code necessary
+  # for startup.  If overwritten, do not first
+  # call the original GServerApp.run(self) as
+  # this would send to background immediately.
+  # Instead, call the original GServerApp.run(self)
+  # after you are sure you are finished with
+  # startup code and are ready to go to server
+  # mode.
+  def run(self):
+
+    # TODO: Fork(?) and send to background
+    pass
+
 
-class GServerApp(GBaseApp): 
-  pass
-  
Index: gnue/gnuef/src/GFConfig.py
diff -u gnue/gnuef/src/GFConfig.py:1.1 gnue/gnuef/src/GFConfig.py:1.2
--- gnue/gnuef/src/GFConfig.py:1.1      Wed Sep 26 21:20:35 2001
+++ gnue/gnuef/src/GFConfig.py  Thu Sep 27 00:32:52 2001
@@ -1,95 +1,69 @@
 #
-# Options for GNUe
+# Copyright 2001 Free Software Foundation
 #
-# Copyright 2000,2001 Free Software Foundation
-#
 # This file is part of GNU Enterprise.
 #
-# GNU Enterprise 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 
+# GNU Enterprise 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.
 #
-# GNU Enterprise 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 
+# GNU Enterprise 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 program; see the file COPYING. If not, 
-# write to the Free Software Foundation, Inc., 59 Temple Place 
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
 # - Suite 330, Boston, MA 02111-1307, USA.
-
-
-[global]
+#
+# FILE:
+# GFConfig.py
+#
+# DESCRIPTION:
+#
+# NOTES:
+#
 
-#################################################################
-#################################################################
-##
-##  Global runtime settings for GNUe Tools
-##  (changes to this could affect all GNUe Tools)
-##
-#################################################################
-#################################################################
-
-prefix = /usr/local/gnue
-
-
-[forms]
-
-#################################################################
-#################################################################
-##
-##  Runtime settings for GNUe Forms Client
-##  (changes to this section only affects GNUe Forms Client)
-##
-#################################################################
-#################################################################
-
-(
-  { 'Name'       : 'prefix', 
-    'Dependency' : 'OS', 
-    'Type'       : 'Setting', 
-    'Comment'    : 
-       {'ENG_US' : 'Base location for GNUe Tools'}, 
-    'Description': 
-       {'ENG_US' : 'Base location for GNUe Tools.'}, 
-    'Typecast'   : text, 
-    'Default'    : 
-       {'POSIX'  : '/usr/local/gnue', 
-        'WIN32'  : 'c:\gnue'} }, 
-  { 'Name'       : 'FormDir', 
-    'Type'       : 'Setting', 
-    'Comment'    : 
-       {'ENG_US' : 'Default location for GNUe Forms .GFD files'}, 
-    'Description': 
-       {'ENG_US' : 'Default location for GNUe Forms .GFD files.'}, 
-    'Typecast'   : text, 
-    'Default'    : '%(prefix)s/forms' }, 
-  { 'Name'       : 'AutoCreate', 
-    'Type'       : 'Setting', 
-    'Comment'    : 
-       {'ENG_US' : 'Create new records in blocks automagically when you hit 
the bottom'}, 
-    'Description': 
-       {'ENG_US' : 'Create new records in blocks automagically when you hit 
the bottom.'}, 
-    'Typecast'   : boolean, 
-    'Default'    : 1 }, 
-  { 'Name'       : 'RememberLastQuery', 
-    'Type'       : 'Setting', 
-    'Comment'    : 
-       {'ENG_US' : 'Remember last query entered.'}, 
-    'Description': 
-       {'ENG_US' : 'Remember last query entered. (If enabled, then the '
+ConfigOptions = (
+  { 'Name'       : 'prefix',
+    'Dependency' : 'OS',
+    'Type'       : 'Setting',
+    'Comment'    : 'Base location for GNUe Tools',
+    'Description': 'Base location for GNUe Tools.',
+    'Typecast'   : text,
+    'Default'    :
+       {'POSIX'  : '/usr/local/gnue',
+        'WIN32'  : 'c:\gnue'} },
+
+  { 'Name'       : 'FormDir',
+    'Type'       : 'Setting',
+    'Comment'    : 'Default location for GNUe Forms .GFD files',
+    'Description': 'Default location for GNUe Forms .GFD files.',
+    'Typecast'   : text,
+    'Default'    : '%(prefix)s/forms' },
+
+  { 'Name'       : 'AutoCreate',
+    'Type'       : 'Setting',
+    'Comment'    : 'Create new records in blocks automagically when you hit 
the bottom',
+    'Description': 'Create new records in blocks automagically when you hit 
the bottom.',
+    'Typecast'   : boolean,
+    'Default'    : 1 },
+
+  { 'Name'       : 'RememberLastQuery',
+    'Type'       : 'Setting',
+    'Comment'    : 'Remember last query entered.',
+    'Description': 'Remember last query entered. (If enabled, then the '
                  + 'last values entered for a query can be retrieved by '
-                 + 'doing an Enter-Query twice)'}, 
-    'Typecast'   : boolean, 
-    'Default'    : 1 }, 
-  { 'Name'       : 'CacheDetailRecords', 
-    'Type'       : 'Setting', 
-    'Comment'    : 
-       {'ENG_US' : 'Enable caching of detail data'}, 
-    'Description': 
-       {'ENG_US' : 'Enable caching of detail data\n'
+                 + 'doing an Enter-Query twice)',
+    'Typecast'   : boolean,
+    'Default'    : 1 },
+
+  { 'Name'       : 'CacheDetailRecords',
+    'Type'       : 'Setting',
+    'Comment'    : 'Enable caching of detail data',
+    'Description': 'Enable caching of detail data\n'
                  + 'If set to true (default), then always cache '
                  + 'detail data in a master/detail set. The benefits '
                  + 'of this method is performance. The downsize to '
@@ -100,145 +74,264 @@
                  + 'it has unposted changes. The benefits of this '
                  + 'method are that if another user modifies data '
                  + 'and saves, then it will be available to your '
-                 + 'form much quicker.'}, 
-    'Typecast'   : boolean, 
-    'Default'    : 1 }, 
-  { 'Name'       : 'Encoding', 
-    'Type'       : 'Setting', 
-    'Comment'    : 
-       {'ENG_US' : 'Hack for db encoding'}, 
-    'Description': 
-       {'ENG_US' : 'Hack for db encoding.'}, 
-    'Typecast'   : text, 
-    'Default'    : 'DEFAULT' }, 
-  { 'Name'       : 'SplashScreenPNG', 
-    'Type'       : 'Setting', 
-    'Comment'    : 
-       {'ENG_US' : 'Location of startup graphic (PNG format)'}, 
-    'Description': 
-       {'ENG_US' : 'Location of startup graphic (PNG format)'}, 
-    'Typecast'   : text, 
-    'Default'    : '%(prefix)s/shared/images/gnue-splash.png' }, 
-  { 'Name'       : 'tb_commit', 
-    'Type'       : 'Setting', 
-    'Comment'    : 
-       {'ENG_US' : 'Location of "Commit" toolbar icon (PNG format)'}, 
-    'Description': 
-       {'ENG_US' : 'Location of "Commit" toolbar icon (PNG format)'}, 
-    'Typecast'   : text, 
-    'Default'    : '%(prefix)s/shared/images/tb_save.png' }, 
-  { 'Name'       : 'tb_insert', 
-    'Type'       : 'Setting', 
-    'Comment'    : 
-       {'ENG_US' : 'Location of "Insert" toolbar icon (PNG format)'}, 
-    'Description': 
-       {'ENG_US' : 'Location of "Insert" toolbar icon (PNG format)'}, 
-    'Typecast'   : text, 
-    'Default'    : '%(prefix)s/shared/images/tb_new.png' }, 
-  { 'Name'       : 'tb_rollback', 
-    'Type'       : 'Setting', 
-    'Comment'    : 
-       {'ENG_US' : 'Location of "Rollback" toolbar icon (PNG format)'}, 
-    'Description': 
-       {'ENG_US' : 'Location of "Rollback" toolbar icon (PNG format)'}, 
-    'Typecast'   : text, 
-    'Default'    : '%(prefix)s/shared/images/tb_undo.png' }, 
-  { 'Name'       : 'tb_delete', 
-    'Type'       : 'Setting', 
-    'Comment'    : 
-       {'ENG_US' : 'Location of "Delete" toolbar icon (PNG format)'}, 
-    'Description': 
-       {'ENG_US' : 'Location of "Delete" toolbar icon (PNG format)'}, 
-    'Typecast'   : text, 
-    'Default'    : '%(prefix)s/shared/images/tb_trash.png' }, 
-  { 'Name'       : 'tb_previous', 
-    'Type'       : 'Setting', 
-    'Comment'    : 
-       {'ENG_US' : 'Location of "Previous Record" toolbar icon (PNG format)'}, 
-    'Description': 
-       {'ENG_US' : 'Location of "Previous Record" toolbar icon (PNG format)'}, 
-    'Typecast'   : text, 
-    'Default'    : '%(prefix)s/shared/images/tb_left_arrow.png' }, 
-  { 'Name'       : 'tb_next', 
-    'Type'       : 'Setting', 
-    'Comment'    : 
-       {'ENG_US' : 'Location of "Next Record" toolbar icon (PNG format)'}, 
-    'Description': 
-       {'ENG_US' : 'Location of "Next Record" toolbar icon (PNG format)'}, 
-    'Typecast'   : text, 
-    'Default'    : '%(prefix)s/shared/images/tb_right_arrow.png' }, 
-  { 'Name'       : 'tb_query_prep', 
-    'Type'       : 'Setting', 
-    'Comment'    : 
-       {'ENG_US' : 'Location of "Prepare Query" toolbar icon (PNG format)'}, 
-    'Description': 
-       {'ENG_US' : 'Location of "Prepare Query" toolbar icon (PNG format)'}, 
-    'Typecast'   : text, 
-    'Default'    : '%(prefix)s/shared/images/tb_preferences.png' }, 
-  { 'Name'       : 'tb_insert', 
-    'Type'       : 'Setting', 
-    'Comment'    : 
-       {'ENG_US' : 'Location of "Execute Query" toolbar icon (PNG format)'}, 
-    'Description': 
-       {'ENG_US' : 'Location of "Execute Query" toolbar icon (PNG format)'}, 
-    'Typecast'   : text, 
-    'Default'    : '%(prefix)s/shared/images/tb_search.png' }, 
-  { 'Name'       : 'tb_help', 
-    'Type'       : 'Setting', 
-    'Comment'    : 
-       {'ENG_US' : 'Location of "Help" toolbar icon (PNG format)'}, 
-    'Description': 
-       {'ENG_US' : 'Location of "Help" toolbar icon (PNG format)'}, 
-    'Typecast'   : text, 
-    'Default'    : '%(prefix)s/shared/images/tb_help.png' }, 
+                 + 'form much quicker.',
+    'Typecast'   : boolean,
+    'Default'    : 1 },
+
+  { 'Name'       : 'Encoding',
+    'Type'       : 'Setting',
+    'Comment'    : 'Hack for db encoding',
+    'Description': 'Hack for db encoding.',
+    'Typecast'   : text,
+    'Default'    : 'DEFAULT' },
+
+  { 'Name'       : 'SplashScreenPNG',
+    'Type'       : 'Setting',
+    'Comment'    : 'Location of startup graphic (PNG format)',
+    'Description': 'Location of startup graphic (PNG format)',
+    'Typecast'   : text,
+    'Default'    : '%(prefix)s/shared/images/gnue-splash.png' },
+
+  #
+  # Toolbar Icons
+  #
+
+  { 'Name'       : 'tb_commit',
+    'Type'       : 'Setting',
+    'Comment'    : 'Location of "Commit" toolbar icon (PNG format)',
+    'Description': 'Location of "Commit" toolbar icon (PNG format)',
+    'Typecast'   : text,
+    'Default'    : '%(prefix)s/shared/images/tb_save.png' },
+  { 'Name'       : 'tb_insert',
+    'Type'       : 'Setting',
+    'Comment'    : 'Location of "Insert" toolbar icon (PNG format)',
+    'Description': 'Location of "Insert" toolbar icon (PNG format)',
+    'Typecast'   : text,
+    'Default'    : '%(prefix)s/shared/images/tb_new.png' },
+  { 'Name'       : 'tb_rollback',
+    'Type'       : 'Setting',
+    'Comment'    : 'Location of "Rollback" toolbar icon (PNG format)',
+    'Description': 'Location of "Rollback" toolbar icon (PNG format)',
+    'Typecast'   : text,
+    'Default'    : '%(prefix)s/shared/images/tb_undo.png' },
+  { 'Name'       : 'tb_delete',
+    'Type'       : 'Setting',
+    'Comment'    : 'Location of "Delete" toolbar icon (PNG format)',
+    'Description': 'Location of "Delete" toolbar icon (PNG format)',
+    'Typecast'   : text,
+    'Default'    : '%(prefix)s/shared/images/tb_trash.png' },
+  { 'Name'       : 'tb_previous',
+    'Type'       : 'Setting',
+    'Comment'    : 'Location of "Previous Record" toolbar icon (PNG format)',
+    'Description': 'Location of "Previous Record" toolbar icon (PNG format)',
+    'Typecast'   : text,
+    'Default'    : '%(prefix)s/shared/images/tb_left_arrow.png' },
+  { 'Name'       : 'tb_next',
+    'Type'       : 'Setting',
+    'Comment'    : 'Location of "Next Record" toolbar icon (PNG format)',
+    'Description': 'Location of "Next Record" toolbar icon (PNG format)',
+    'Typecast'   : text,
+    'Default'    : '%(prefix)s/shared/images/tb_right_arrow.png' },
+  { 'Name'       : 'tb_query_prep',
+    'Type'       : 'Setting',
+    'Comment'    : 'Location of "Prepare Query" toolbar icon (PNG format)',
+    'Description': 'Location of "Prepare Query" toolbar icon (PNG format)',
+    'Typecast'   : text,
+    'Default'    : '%(prefix)s/shared/images/tb_preferences.png' },
+  { 'Name'       : 'tb_insert',
+    'Type'       : 'Setting',
+    'Comment'    : 'Location of "Execute Query" toolbar icon (PNG format)',
+    'Description': 'Location of "Execute Query" toolbar icon (PNG format)',
+    'Typecast'   : text,
+    'Default'    : '%(prefix)s/shared/images/tb_search.png' },
+  { 'Name'       : 'tb_help',
+    'Type'       : 'Setting',
+    'Comment'    : 'Location of "Help" toolbar icon (PNG format)',
+    'Description': 'Location of "Help" toolbar icon (PNG format)',
+    'Typecast'   : text,
+    'Default'    : '%(prefix)s/shared/images/tb_help.png' },
+  { 'Name'       : 'SmallPNG',
+    'Type'       : 'Setting',
+    'Comment'    : 'Location of GNUe logo (PNG format)',
+    'Description': 'Location of GNUe logo (PNG format)',
+    'Typecast'   : text,
+    'Default'    : '%(prefix)s/shared/images/gnue.png' },
+
+
+  { 'Name'       : 'GEASDir',
+    'Type'       : 'Setting',
+    'Comment'    : 'Base location of GEAS files',
+    'Description': 'Base location of GEAS files',
+    'Typecast'   : text,
+    'Default'    : '/usr/local/' },
+
+  { 'Name'       : 'widgetHeight',
+    'Type'       : 'Setting',
+    'Comment'    : 'The default height of widgets for widgets that don't 
specify height in .gfd file',
+    'Description': 'The default height of widgets for widgets that don't 
specify height in .gfd file',
+    'Typecast'   : whole,
+    'Default'    : 1 },
+
+  { 'Name'       : 'widgetWidth',
+    'Type'       : 'Setting',
+    'Comment'    : 'The default width of widgets for widgets that don't 
specify width in .gfd file',
+    'Description': 'The default width of widgets for widgets that don't 
specify width in .gfd file',
+    'Typecast'   : whole,
+    'Default'    : 10 },
+
+  { 'Name'       : 'fixedWidthFont',
+    'Type'       : 'Setting',
+    'Comment'    : 'Set to true if wxWindows clients should use a fixed width 
font',
+    'Description': 'Set to true if wxWindows clients should use a fixed width 
font',
+    'Typecast'   : boolean,
+    'Default'    : 1 },
+
+  { 'Name'       : 'pointSize',
+    'Type'       : 'Setting',
+    'Comment'    : 'If fixedWidthFont is set to true, then this is the point 
size used for fonts.',
+    'Description': 'If fixedWidthFont is set to true, then this is the point 
size used for fonts.',
+    'Typecast'   : whole,
+    'Default'    : 1 },
+
+  #
+  # Do not alter below here unless you really, really want to (and you know 
what you are doing)
+  #
+
+  { 'Name'       : 'DEBUG',
+    'Type'       : 'Setting',
+    'Comment'    : 'Enable debugging mode',
+    'Description': 'Enable debugging mode',
+    'Typecast'   : boolean,
+    'Default'    : 1 },
+
+  { 'Name'       : '_msgNOTSAVED',
+    'Type'       : 'Setting',
+    'Comment'    : 'Message to display when data has not been saved',
+    'Description': 'Message to display when data has not been saved',
+    'Typecast'   : text,
+    'Default'    : 'Data not saved. Commit or rollback changes.' },
+
+  { 'Name'       : '_msgDETAILNOTSAVED',
+    'Type'       : 'Setting',
+    'Comment'    : 'Message to display when detail data has not been saved',
+    'Description': 'Message to display when detail data has not been saved',
+    'Typecast'   : text,
+    'Default'    : 'This record's detail information is not saved.' },
+
+  { 'Name'       : 'BorderPercentage',
+    'Type'       : 'Setting',
+    'Comment'    : 'Fudge factor for altering widget size',
+    'Description': 'Fudge factor for altering widget size',
+    'Typecast'   : number,
+    'Default'    : 100.0 },
+
+  { 'Name'       : 'TextPercentage',
+    'Type'       : 'Setting',
+    'Comment'    : 'Fudge factor for altering text size',
+    'Description': 'Fudge factor for altering text size',
+    'Typecast'   : number,
+    'Default'    : 100.0 },
+
+  #
+  # GNUe Menu/Toolbar Status Bar Messages
+  #
+
+  { 'Name'       : 'msg_commit',
+    'Type'       : 'Setting',
+    'Comment'    : 'Status bar message for the msg_commit event',
+    'Description': 'Status bar message for the msg_commit event',
+    'Typecast'   : text,
+    'Default'    : 'Save all changes to database.' },
+
+  { 'Name'       : 'msg_rollback',
+    'Type'       : 'Setting',
+    'Comment'    : 'Status bar message for the msg_rollback event',
+    'Description': 'Status bar message for the msg_rollback event',
+    'Typecast'   : text,
+    'Default'    : 'Discard all changes.' },
+
+  { 'Name'       : 'msg_exit',
+    'Type'       : 'Setting',
+    'Comment'    : 'Status bar message for the msg_exit event',
+    'Description': 'Status bar message for the msg_exit event',
+    'Typecast'   : text,
+    'Default'    : 'Leave the application.' },
+
+  { 'Name'       : 'msg_next',
+    'Type'       : 'Setting',
+    'Comment'    : 'Status bar message for the msg_next event',
+    'Description': 'Status bar message for the msg_next event',
+    'Typecast'   : text,
+    'Default'    : 'Navigate to next record in memory.' },
+
+  { 'Name'       : 'msg_previous',
+    'Type'       : 'Setting',
+    'Comment'    : 'Status bar message for the msg_previous event',
+    'Description': 'Status bar message for the msg_previous event',
+    'Typecast'   : text,
+    'Default'    : 'Navigate to previous record in memory.' },
+
+  { 'Name'       : 'msg_insert',
+    'Type'       : 'Setting',
+    'Comment'    : 'Status bar message for the msg_insert event',
+    'Description': 'Status bar message for the msg_insert event',
+    'Typecast'   : text,
+    'Default'    : 'Create a new record for data input.' },
+
+  { 'Name'       : 'msg_delete',
+    'Type'       : 'Setting',
+    'Comment'    : 'Status bar message for the msg_delete event',
+    'Description': 'Status bar message for the msg_delete event',
+    'Typecast'   : text,
+    'Default'    : 'Mark record for removal at next commit.' },
+
+  { 'Name'       : 'msg_next_block',
+    'Type'       : 'Setting',
+    'Comment'    : 'Status bar message for the msg_next_block event',
+    'Description': 'Status bar message for the msg_next_block event',
+    'Typecast'   : text,
+    'Default'    : 'Navigate to next data block.' },
+
+  { 'Name'       : 'msg_previous_block',
+    'Type'       : 'Setting',
+    'Comment'    : 'Status bar message for the msg_previous_block event',
+    'Description': 'Status bar message for the msg_previous_block event',
+    'Typecast'   : text,
+    'Default'    : 'Navigate to previous data block.' },
+
+  { 'Name'       : 'msg_query_prep',
+    'Type'       : 'Setting',
+    'Comment'    : 'Status bar message for the msg_query_prep event',
+    'Description': 'Status bar message for the msg_query_prep event',
+    'Typecast'   : text,
+    'Default'    : 'Switch to input query mask mode.' },
+
+  { 'Name'       : 'msg_query',
+    'Type'       : 'Setting',
+    'Comment'    : 'Status bar message for the msg_query event',
+    'Description': 'Status bar message for the msg_query event',
+    'Typecast'   : text,
+    'Default'    : 'Execute query using current mask.' },
+
+  { 'Name'       : 'msg_help',
+    'Type'       : 'Setting',
+    'Comment'    : 'Status bar message for the msg_help event',
+    'Description': 'Status bar message for the msg_help event',
+    'Typecast'   : text,
+    'Default'    : 'Display info about GNUe Forms.' },
+
+  { 'Name'       : 'msg_jump',
+    'Type'       : 'Setting',
+    'Comment'    : 'Status bar message for the msg_jump event',
+    'Description': 'Status bar message for the msg_jump event',
+    'Typecast'   : text,
+    'Default'    : 'Prompts for a record number to which the system should 
jump.' },
+
+  { 'Name'       : 'msg_print',
+    'Type'       : 'Setting',
+    'Comment'    : 'Status bar message for the msg_print event',
+    'Description': 'Status bar message for the msg_print event',
+    'Typecast'   : text,
+    'Default'    : 'Perform print routine for this form' },
 
 )
-
-GEASDir=/usr/local/
-
-# GNUe logo
-SmallPNG=%(prefix)s/shared/images/gnue.png
-
-# Might need altered but I doubt it
-# The default height of widgets for widgets that don't specify height in .gfd 
file
-widgetHeight=1 
-# The default width of widgets for widgets that don't specify width in .gfd 
file
-WidgetWidth =10
-
-# The next 2 options are only used by the wxPython clients
-# Normally, default font style and size is used, according to the active theme
-# Set this to 1 if you want fixed width fonts
-FixedWidthFont = 1
-
-# Font size if fixedWidthFont = 1 (ignored otherwise)
-PointSize = 14
-
-# Do not alter below here unless you really, really want to (and you know what 
you are doing)
-
-DEBUG = 0
-
-_msgNOTSAVED = Data not saved. Commit or rollback changes.
-_msgDETAILNOTSAVED = This record's detail information is not saved.
-
-# Fudge factor for altering widget size - should no longer be needed
-BorderPercentage = 100
-TextPercentage = 100
-
-# Version
-VERSION = pre-0.0.8
-
-#GNUe Menu/Toolbar Status Bar Messages
-msg_commit=Save all changes to database.
-msg_rollback=Discard all changes.
-msg_exit=Leave the application.
-msg_next=Navigate to next record in memory.
-msg_previous=Navigate to previous record in memory.
-msg_insert=Create a new record for data input.
-msg_delete=Mark record for removal at next commit.
-msg_next_block=Navigate to next data block.
-msg_previous_block=Navigate to previous data block.
-msg_query_prep=Switch to input query mask mode.
-msg_query=Execute query using current mask.
-msg_help=Display info about GNUe Forms. 
-msg_jump=Prompts for a record number to which the system should jump.
-msg_print=Perform print routine for this form
Index: gnue/gnuef/src/GFForm.py
diff -u gnue/gnuef/src/GFForm.py:1.120 gnue/gnuef/src/GFForm.py:1.121
--- gnue/gnuef/src/GFForm.py:1.120      Wed Sep 19 01:27:44 2001
+++ gnue/gnuef/src/GFForm.py    Thu Sep 27 00:32:52 2001
@@ -155,7 +155,7 @@
       try:
         self._triggerns[object.name] = GFTrigger.GFTriggerHelper( object )
       except AttributeError: pass
-      
+
       object.name = string.lower(object.name)
       self._datasourceDictionary[object.name]=object
 
@@ -172,8 +172,8 @@
          not object.hidden:
       self._currentEntry = object
 
-  def initImportedObjects(self, object): 
-    if isinstance(object, GFLibrary.GFImport): 
+  def initImportedObjects(self, object):
+    if isinstance(object, GFLibrary.GFImport):
       importAllDataSources = object.datasources == "*"
       importAllPages = object.pages == "*"
       importAllTriggers = object.triggers == "*"
@@ -181,24 +181,24 @@
       importPages = string.split(string.replace(object.pages,' ',''),',')
       importTriggers = string.split(string.replace(object.triggers,' ',''),',')
 
-      handle = openResource(object.library) 
-      form = GFParser.loadForm(handle, self._app, initialize=0) 
+      handle = openResource(object.library)
+      form = GFParser.loadForm(handle, self._app, initialize=0)
       handle.close()
 
-      if importAllDataSources or len(importDataSources): 
-        for child in form._children: 
+      if importAllDataSources or len(importDataSources):
+        for child in form._children:
           if isinstance(child, GFDataSource) and \
-             (importAllDataSources or child.name in importDataSources):  
-            child._parent = object 
+             (importAllDataSources or child.name in importDataSources):
+            child._parent = object
             child._IMPORTED = 1
-            object._children.append(child) 
+            object._children.append(child)
             child._buildObject()
 
       if importAllPages or len(importPages):
         for child in form._children:
           if isinstance(child, GFPage) and \
              (importAllPages or child.name in importPages):
-            child._parent = object 
+            child._parent = object
             child._IMPORTED = 1
             object._children.append(child)
             child._buildObject()
@@ -207,13 +207,13 @@
         for child in form._children:
           if isinstance(child, GFTrigger.GFTrigger) and \
              (importAllTriggers or child.name in importTriggers):
-            child._parent = object 
+            child._parent = object
             child._IMPORTED = 1
             object._children.append(child)
             child._buildObject()
+
 
- 
-    elif isinstance(object, GFLibrary.GFImportItem): 
+    elif isinstance(object, GFLibrary.GFImportItem):
 
       handle = openResource(object.library)
       form = GFParser.loadForm(handle, self._app, initialize=0)
@@ -246,7 +246,7 @@
           break
       return rv
     else: 
-      return None 
+      return None
 
   #
   # end of routines made for walking
@@ -276,7 +276,7 @@
   def deleteRecord(self):
     if not self.readonly:
       self._currentBlock.deleteRecord()
-      
+
   def isSaved(self):
     saved = 1
     for block in self._blockList:
@@ -291,13 +291,13 @@
       if not block.isSaved():
         message = GConfig.get('_msgNOTSAVED')
         return message
-     
+
     for block in self._blockList:
       block.processRollback()
       for entry in block._entryList:
-       if hasattr(entry,'queryDefault'):
-         GDebug.printMesg(1, "%s will be set to %s" % (entry.name, 
entry.queryDefault))
-         entry.setValue(entry.queryDefault)      
+        if hasattr(entry,'queryDefault'):
+          GDebug.printMesg(1, "%s will be set to %s" % (entry.name, 
entry.queryDefault))
+          entry.setValue(entry.queryDefault)
     self._currentBlock.initQuery()
     return message
     



reply via email to

[Prev in Thread] Current Thread [Next in Thread]