[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue common/src/GConfig.py forms/src/GFConfig.py
From: |
James Thompson |
Subject: |
gnue common/src/GConfig.py forms/src/GFConfig.py |
Date: |
Mon, 06 May 2002 21:13:50 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: James Thompson <address@hidden> 02/05/06 21:13:49
Modified files:
common/src : GConfig.py
forms/src : GFConfig.py
Log message:
Fixed forms so it's gnue.conf free (for real this time! (maybe.))
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/GConfig.py.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/GFConfig.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: gnue/common/src/GConfig.py
diff -c gnue/common/src/GConfig.py:1.20 gnue/common/src/GConfig.py:1.21
*** gnue/common/src/GConfig.py:1.20 Sat May 4 12:45:07 2002
--- gnue/common/src/GConfig.py Mon May 6 21:13:49 2002
***************
*** 89,110 ****
except:
print _('The file cannot be parsed. %s :: %s') % (sys.exc_type,
sys.exc_value)
raise InvalidFormatError, _('The file cannot be parsed.')
-
- if not parser.options(section):
- sys.stderr.write(_("The configuration files appear to be missing\n") + \
- _("The files should be located in one or more of the
following locations\n"))
- for location in fileLocations:
- sys.stderr.write(location+'\n')
- sys.stderr.write(_("We will bravely attempt to continue but you"+'\n')
+ \
- _("may encounter issues running the software.\n"))
-
def gConfig(self, varName, configFilename=None, section=None):
if not configFilename: configFilename = self._defaultConfigFilename
if not section: section = self._defaultSection
! return self._loadedConfigs[configFilename].get(section,varName)
!
def gConfigDict(self, configFilename=None, section=None):
if not configFilename: configFilename = self._defaultConfigFilename
--- 89,108 ----
except:
print _('The file cannot be parsed. %s :: %s') % (sys.exc_type,
sys.exc_value)
raise InvalidFormatError, _('The file cannot be parsed.')
def gConfig(self, varName, configFilename=None, section=None):
if not configFilename: configFilename = self._defaultConfigFilename
if not section: section = self._defaultSection
! # try:
! try:
! return self._loadedConfigs[configFilename].get(section,varName)
! except NoSectionError:
! self._loadedConfigs[configFilename].add_section(section)
! return self._loadedConfigs[configFilename].get(section,varName)
! # except NoOptionError:
! # return self._loadedConfigs[configFilename].get('DEFAULT',varName)
!
def gConfigDict(self, configFilename=None, section=None):
if not configFilename: configFilename = self._defaultConfigFilename
Index: gnue/forms/src/GFConfig.py
diff -c gnue/forms/src/GFConfig.py:1.4 gnue/forms/src/GFConfig.py:1.5
*** gnue/forms/src/GFConfig.py:1.4 Sat May 4 12:45:08 2002
--- gnue/forms/src/GFConfig.py Mon May 6 21:13:49 2002
***************
*** 44,49 ****
--- 44,56 ----
'Typecast' : GTypecast.boolean,
'Default' : 1 },
+ { 'Name' : 'DisableSplash',
+ 'Type' : 'Setting',
+ 'Comment' : 'Disable the startup splashscreen.',
+ 'Description': 'Disable the startup splashscreen.',
+ 'Typecast' : GTypecast.boolean,
+ 'Default' : 0 },
+
{ 'Name' : 'AllowNumericFormulas',
'Type' : 'Setting',
'Comment' : 'Remember last query entered.',
***************
*** 83,89 ****
'Comment' : 'Location of startup graphic (PNG format)',
'Description': 'Location of startup graphic (PNG format)',
'Typecast' : GTypecast.text,
! 'Default' : '%(prefix)s/shared/images/gnue-splash.png' },
#
# Toolbar Icons
--- 90,96 ----
'Comment' : 'Location of startup graphic (PNG format)',
'Description': 'Location of startup graphic (PNG format)',
'Typecast' : GTypecast.text,
! 'Default' : 'gnue-splash.png' },
#
# Toolbar Icons
***************
*** 94,154 ****
'Comment' : 'Location of "Commit" toolbar icon (PNG format)',
'Description': 'Location of "Commit" toolbar icon (PNG format)',
'Typecast' : GTypecast.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' : GTypecast.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' : GTypecast.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' : GTypecast.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' : GTypecast.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' : GTypecast.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' : GTypecast.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' : GTypecast.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' : GTypecast.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' : GTypecast.text,
! 'Default' : '%(prefix)s/shared/images/gnue.png' },
{ 'Name' : 'GEASDir',
--- 101,167 ----
'Comment' : 'Location of "Commit" toolbar icon (PNG format)',
'Description': 'Location of "Commit" toolbar icon (PNG format)',
'Typecast' : GTypecast.text,
! 'Default' : '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' : GTypecast.text,
! 'Default' : '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' : GTypecast.text,
! 'Default' : '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' : GTypecast.text,
! 'Default' : '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' : GTypecast.text,
! 'Default' : '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' : GTypecast.text,
! 'Default' : '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' : GTypecast.text,
! 'Default' : 'tb_preferences.png' },
! { 'Name' : 'tb_query',
! 'Type' : 'Setting',
! 'Comment' : 'Location of "Prepare Query" toolbar icon (PNG format)',
! 'Description': 'Location of "Prepare Query" toolbar icon (PNG format)',
! 'Typecast' : GTypecast.text,
! 'Default' : 'tb_search.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' : GTypecast.text,
! 'Default' : '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' : GTypecast.text,
! 'Default' : 'tb_help.png' },
{ 'Name' : 'SmallPNG',
'Type' : 'Setting',
'Comment' : 'Location of GNUe logo (PNG format)',
'Description': 'Location of GNUe logo (PNG format)',
'Typecast' : GTypecast.text,
! 'Default' : 'gnue.png' },
{ 'Name' : 'GEASDir',
***************
*** 184,215 ****
'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' : GTypecast.whole,
! 'Default' : 1 },
#
# Do not alter below here unless you really, really want to (and you know
what you are doing)
#
! { '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' : GTypecast.text,
! 'Default' : 'Data not saved. Commit or rollback changes.' },
!
! { 'Name' : 'DEBUG',
! 'Type' : 'Setting',
! 'Comment' : 'Message to display when data has not been saved',
! 'Description': 'Message to display when data has not been saved',
! 'Typecast' : GTypecast.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' : GTypecast.text,
! 'Default' : "This record's detail information is not saved." },
{ 'Name' : 'BorderPercentage',
'Type' : 'Setting',
--- 197,228 ----
'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' : GTypecast.whole,
! 'Default' : 14 },
#
# Do not alter below here unless you really, really want to (and you know
what you are doing)
#
! # { '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' : GTypecast.text,
! # 'Default' : 'Data not saved. Commit or rollback changes.' },
!
! # { 'Name' : 'DEBUG',
! # 'Type' : 'Setting',
! # 'Comment' : 'Message to display when data has not been saved',
! # 'Description': 'Message to display when data has not been saved',
! # 'Typecast' : GTypecast.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' : GTypecast.text,
! # 'Default' : "This record's detail information is not saved." },
{ 'Name' : 'BorderPercentage',
'Type' : 'Setting',
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue common/src/GConfig.py forms/src/GFConfig.py,
James Thompson <=