commit-gnue
[Top][All Lists]
Advanced

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

gnue common/etc/sample.gnue.conf common/src/GBa...


From: Bajusz Tamás
Subject: gnue common/etc/sample.gnue.conf common/src/GBa...
Date: Sat, 25 Jan 2003 16:41:42 -0500

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Bajusz Tamás <address@hidden>   03/01/25 16:41:41

Modified files:
        common/etc     : sample.gnue.conf 
        common/src     : GBaseApp.py GCConfig.py GObjects.py GParser.py 
        designer/src   : Designer.py 
        designer/src/base: Instance.py TemplateParser.py ToolFrame.py 
        designer/src/base/tools: DataSourceEditor.py SchemaViewer.py 
                                 TriggerEditor.py 
        forms/src      : GFConfig.py 
        forms/src/uidrivers/wx: UIdriver.py 
        reports/src/adapters/filters/Labels/labels: Adapter.py 
        reports/src/adapters/filters/MailMerge/_merge: MergeBase.py 
        reports/src/adapters/filters/SimpleTabulation/tabulator: 
                                                                 Adapter.py 
        reports/src/base: GRReport.py 
        reports/src/base/layout: ContainerElement.py 

Log message:
        * Introducing "textEncoding" into [common] section of gnue.conf
        instead of "formFontEncoding".
        * Some 'import string' for wxpython 2.4.0.2

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/etc/sample.gnue.conf.diff?tr1=1.40&tr2=1.41&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/GBaseApp.py.diff?tr1=1.31&tr2=1.32&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/GCConfig.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/GObjects.py.diff?tr1=1.52&tr2=1.53&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/GParser.py.diff?tr1=1.60&tr2=1.61&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/Designer.py.diff?tr1=1.63&tr2=1.64&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/base/Instance.py.diff?tr1=1.81&tr2=1.82&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/base/TemplateParser.py.diff?tr1=1.27&tr2=1.28&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/base/ToolFrame.py.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/base/tools/DataSourceEditor.py.diff?tr1=1.31&tr2=1.32&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/base/tools/SchemaViewer.py.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/base/tools/TriggerEditor.py.diff?tr1=1.30&tr2=1.31&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/GFConfig.py.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/wx/UIdriver.py.diff?tr1=1.226&tr2=1.227&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/reports/src/adapters/filters/Labels/labels/Adapter.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/reports/src/adapters/filters/MailMerge/_merge/MergeBase.py.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/reports/src/adapters/filters/SimpleTabulation/tabulator/Adapter.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/reports/src/base/GRReport.py.diff?tr1=1.33&tr2=1.34&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/reports/src/base/layout/ContainerElement.py.diff?tr1=1.54&tr2=1.55&r1=text&r2=text

Patches:
Index: gnue/common/etc/sample.gnue.conf
diff -c gnue/common/etc/sample.gnue.conf:1.40 
gnue/common/etc/sample.gnue.conf:1.41
*** gnue/common/etc/sample.gnue.conf:1.40       Sat Nov 23 07:06:58 2002
--- gnue/common/etc/sample.gnue.conf    Sat Jan 25 16:41:40 2003
***************
*** 24,29 ****
--- 24,35 ----
  #       location of GNUe
  
  
+ #############################################################################
+ ## Common configuration Options for GNUe                                     #
+ #############################################################################
+ [common]
+ # Encoding for XML headers and for fonts in forms.
+ #textEncoding = iso8859-1
  
  #############################################################################
  ## Configuration Options for GNUe Forms Client                              #
Index: gnue/common/src/GBaseApp.py
diff -c gnue/common/src/GBaseApp.py:1.31 gnue/common/src/GBaseApp.py:1.32
*** gnue/common/src/GBaseApp.py:1.31    Sun Jan 19 05:01:38 2003
--- gnue/common/src/GBaseApp.py Sat Jan 25 16:41:40 2003
***************
*** 226,242 ****
        # 
gettext.install('gnue',GConfig.getInstalledBase('install_prefix')+'/translations')
        # no need for LC_ALL on win2k and XP with this variant
        lang = [locale.getdefaultlocale()[0]]
!       global catalog, runtime_charset 
        catalog = 
gettext.translation('gnue',GConfig.getInstalledBase('install_prefix')+'/translations',languages=lang)
        catalog.install(unicode=1)
!       runtime_charset = gConfig('formFontEncoding')
!       
        if not catalog.charset():
          raise InvalidFormatError, "Translation file is badly formatted for 
unicode operation"
        
        def translate(msg):
          global catalog  
!         return catalog.ugettext(msg).encode(runtime_charset)
      
        import __builtin__  
        __builtin__.__dict__['_'] = translate
--- 226,241 ----
        # 
gettext.install('gnue',GConfig.getInstalledBase('install_prefix')+'/translations')
        # no need for LC_ALL on win2k and XP with this variant
        lang = [locale.getdefaultlocale()[0]]
!       global catalog, textEncoding 
        catalog = 
gettext.translation('gnue',GConfig.getInstalledBase('install_prefix')+'/translations',languages=lang)
        catalog.install(unicode=1)
!       textEncoding = gConfig('textEncoding')
        if not catalog.charset():
          raise InvalidFormatError, "Translation file is badly formatted for 
unicode operation"
        
        def translate(msg):
          global catalog  
!         return catalog.ugettext(msg).encode(textEncoding)
      
        import __builtin__  
        __builtin__.__dict__['_'] = translate
Index: gnue/common/src/GCConfig.py
diff -c gnue/common/src/GCConfig.py:1.2 gnue/common/src/GCConfig.py:1.3
*** gnue/common/src/GCConfig.py:1.2     Wed Jan  1 19:45:41 2003
--- gnue/common/src/GCConfig.py Sat Jan 25 16:41:40 2003
***************
*** 43,47 ****
--- 43,54 ----
      'Description': 'If set to true, then store trigger definitions in 
<![CDATA[ .. ]]> blocks, instead of encoding with &lt; etc.',
      'Typecast'   : GTypecast.boolean,
      'Default'    : 1 },
+ 
+   { 'Name'       : 'textEncoding',
+     'Type'       : 'Setting',
+     'Comment'    : 'Encoding for XML headers and for fonts in forms. Like 
iso8859-1, iso8859-13.',
+     'Description': 'Encoding for XML headers and for fonts in forms. Like 
iso8859-1, iso8859-13.',
+     'Typecast'   : GTypecast.text,
+     'Default'    : 'iso8859-1' },
    )
  
Index: gnue/common/src/GObjects.py
diff -c gnue/common/src/GObjects.py:1.52 gnue/common/src/GObjects.py:1.53
*** gnue/common/src/GObjects.py:1.52    Thu Jan  9 20:30:52 2003
--- gnue/common/src/GObjects.py Sat Jan 25 16:41:40 2003
***************
*** 35,40 ****
--- 35,41 ----
  from GParserHelpers import GContent, ParserObj
  import GTypecast
  from GTriggerCore import GTriggerCore
+ import types
  
  #
  # Class GObj
***************
*** 232,241 ****
              else:
                addl = ' %s="N"' % (attribute)
            elif typecast == GTypecast.names:
!             addl = ' %s="%s"' % \
!                 (attribute, string.join(val,','))
            else:
!             addl = ' %s="%s"' % (attribute, saxutils.escape('%s' % val))
            if len(addl) + pos > 78:
              xmlString += "\n" + " " * indent + addl
              pos = indent
--- 233,247 ----
              else:
                addl = ' %s="N"' % (attribute)
            elif typecast == GTypecast.names:
!             if type(val) == types.StringType:
!               addl = ' %s="%s"' % (attribute, 
string.join(val.decode(gConfig('textEncoding')),','))
!             else:
!               addl = ' %s="%s"' % (attribute, string.join(val,','))
            else:
!             if type(val) == types.StringType:
!               addl = ' %s="%s"' % (attribute, saxutils.escape('%s' % 
val.decode(gConfig('textEncoding'))))
!             else:
!               addl = ' %s="%s"' % (attribute, saxutils.escape('%s' % val))
            if len(addl) + pos > 78:
              xmlString += "\n" + " " * indent + addl
              pos = indent
***************
*** 244,250 ****
              pos += len(addl)
        if attribute.find('__') > 0 and attribute.split('__')[0] in 
xmlnamespaces.keys():
          if val != None:
!           addl = ' %s="%s"' % (attribute.replace('__',':'), 
saxutils.escape('%s' % val))
            if len(addl) + pos > 78:
              xmlString += "\n" + " " * indent + addl
              pos = indent
--- 250,259 ----
              pos += len(addl)
        if attribute.find('__') > 0 and attribute.split('__')[0] in 
xmlnamespaces.keys():
          if val != None:
!           if type(val) == types.StringType:
!             addl = ' %s="%s"' % (attribute.replace('__',':'), 
saxutils.escape('%s' % val.decode(gConfig('textEncoding'))))
!           else:
!             addl = ' %s="%s"' % (attribute.replace('__',':'), 
saxutils.escape('%s' % val))
            if len(addl) + pos > 78:
              xmlString += "\n" + " " * indent + addl
              pos = indent
Index: gnue/common/src/GParser.py
diff -c gnue/common/src/GParser.py:1.60 gnue/common/src/GParser.py:1.61
*** gnue/common/src/GParser.py:1.60     Tue Jan  7 11:49:42 2003
--- gnue/common/src/GParser.py  Sat Jan 25 16:41:40 2003
***************
*** 258,271 ****
        for qattr in saxattrs.keys():
          attrns, attr = qattr
  
-         encoding= sys.getdefaultencoding()
-         if encoding == 'ascii':
-           encoding = 'iso8859-1'  # TODO: fix this when we have [common] 
section
-         try:                    #       in gnue.conf
-           encoding = gConfig('formFontEncoding')
-         except:
-           pass
- 
          if attrns:
            if not self.xmlNamespaceAttributesAsPrefixes:
              tmsg = _("Unexpected namespace on attribute")
--- 258,263 ----
***************
*** 278,284 ****
  
            # Typecasting, anyone?  If attribute should be int, make it an int
            try:
!             attrs[attr] = 
baseAttrs[attr].get('Typecast',GTypecast.text)(saxattrs[qattr].encode(encoding))
 # default(baseAttrs[attr],'Typecast',GTypecast.text)(saxattrs[qattr])
              loadedxmlattrs[attr] = attrs[attr]
            except KeyError:
              tmsg = _('Error processing <%s> tag [I do not recognize the "%s" 
attribute')\
--- 270,276 ----
  
            # Typecasting, anyone?  If attribute should be int, make it an int
            try:
!             attrs[attr] = 
baseAttrs[attr].get('Typecast',GTypecast.text)(saxattrs[qattr].encode(gConfig('textEncoding')))
              loadedxmlattrs[attr] = attrs[attr]
            except KeyError:
              tmsg = _('Error processing <%s> tag [I do not recognize the "%s" 
attribute')\
Index: gnue/designer/src/Designer.py
diff -c gnue/designer/src/Designer.py:1.63 gnue/designer/src/Designer.py:1.64
*** gnue/designer/src/Designer.py:1.63  Sat Jan  4 00:54:44 2003
--- gnue/designer/src/Designer.py       Sat Jan 25 16:41:40 2003
***************
*** 25,31 ****
  #
  # NOTES:
  
! import sys, os
  from gnue.common import RuntimeSettings
  
  ######################
--- 25,31 ----
  #
  # NOTES:
  
! import sys, os, string
  from gnue.common import RuntimeSettings
  
  ######################
Index: gnue/designer/src/base/Instance.py
diff -c gnue/designer/src/base/Instance.py:1.81 
gnue/designer/src/base/Instance.py:1.82
*** gnue/designer/src/base/Instance.py:1.81     Wed Jan  1 19:45:46 2003
--- gnue/designer/src/base/Instance.py  Sat Jan 25 16:41:40 2003
***************
*** 28,34 ****
  # NOTES:
  #
  
! import sys, os, time, dircache
  from wxPython.wx import *
  from gnue.common import GDebug
  from gnue.designer.base.MenuBar import MainMenuBar
--- 28,34 ----
  # NOTES:
  #
  
! import sys, os, time, dircache, string
  from wxPython.wx import *
  from gnue.common import GDebug
  from gnue.designer.base.MenuBar import MainMenuBar
***************
*** 554,569 ****
      self._makeBackup = 0
  
      fileHandle = open(location,'w')
!     if sys.getdefaultencoding() == 'ascii':
!       fileHandle.write('<?xml version="1.0"?>\n\n')
!     else:
!       fileHandle.write('<?xml version="1.0" encoding="%s"?>\n\n' % \
!            (sys.getdefaultencoding()))
  
      fileHandle.write('<!--  %s (%s)\n      Saved on: %s  -->\n\n' \
         % (TITLE, VERSION, \
            time.strftime("%Y-%m-%d %H:%M:%S",time.localtime(time.time()))))
!     fileHandle.write(self.rootObject.dumpXML(treeDump=1))
      fileHandle.close()
  
      self.makeClean()
--- 554,567 ----
      self._makeBackup = 0
  
      fileHandle = open(location,'w')
! 
!     fileHandle.write('<?xml version="1.0" encoding="%s"?>\n\n' % \
!            gConfig('textEncoding'))
  
      fileHandle.write('<!--  %s (%s)\n      Saved on: %s  -->\n\n' \
         % (TITLE, VERSION, \
            time.strftime("%Y-%m-%d %H:%M:%S",time.localtime(time.time()))))
!     
fileHandle.write(self.rootObject.dumpXML(treeDump=1).encode(gConfig('textEncoding')))
      fileHandle.close()
  
      self.makeClean()
Index: gnue/designer/src/base/TemplateParser.py
diff -c gnue/designer/src/base/TemplateParser.py:1.27 
gnue/designer/src/base/TemplateParser.py:1.28
*** gnue/designer/src/base/TemplateParser.py:1.27       Wed Jan  1 19:45:46 2003
--- gnue/designer/src/base/TemplateParser.py    Sat Jan 25 16:41:40 2003
***************
*** 26,31 ****
--- 26,32 ----
  #
  # NOTES:
  
+ import string
  from wxPython.wx import *
  from gnue.designer.base import TemplateBase
  from gnue.common.FileUtils import dyn_import
Index: gnue/designer/src/base/ToolFrame.py
diff -c gnue/designer/src/base/ToolFrame.py:1.15 
gnue/designer/src/base/ToolFrame.py:1.16
*** gnue/designer/src/base/ToolFrame.py:1.15    Wed Jan  1 19:45:46 2003
--- gnue/designer/src/base/ToolFrame.py Sat Jan 25 16:41:40 2003
***************
*** 26,32 ****
  # NOTES:
  #
  
! import os, sys
  from gnue.common import RuntimeSettings
  from wxPython.wx import *
  from gnue.common import GDebug
--- 26,32 ----
  # NOTES:
  #
  
! import os, sys, string
  from gnue.common import RuntimeSettings
  from wxPython.wx import *
  from gnue.common import GDebug
Index: gnue/designer/src/base/tools/DataSourceEditor.py
diff -c gnue/designer/src/base/tools/DataSourceEditor.py:1.31 
gnue/designer/src/base/tools/DataSourceEditor.py:1.32
*** gnue/designer/src/base/tools/DataSourceEditor.py:1.31       Wed Jan  1 
19:45:46 2003
--- gnue/designer/src/base/tools/DataSourceEditor.py    Sat Jan 25 16:41:41 2003
***************
*** 27,33 ****
  # NOTES:
  #
  
! import sys, os, cPickle, traceback, StringIO
  from wxPython.wx import *
  from gnue.common import GDebug, GDataSource, GConfig
  from gnue.common import RuntimeSettings, events
--- 27,33 ----
  # NOTES:
  #
  
! import sys, os, cPickle, traceback, StringIO, string
  from wxPython.wx import *
  from gnue.common import GDebug, GDataSource, GConfig
  from gnue.common import RuntimeSettings, events
Index: gnue/designer/src/base/tools/SchemaViewer.py
diff -c gnue/designer/src/base/tools/SchemaViewer.py:1.11 
gnue/designer/src/base/tools/SchemaViewer.py:1.12
*** gnue/designer/src/base/tools/SchemaViewer.py:1.11   Wed Jan  1 19:45:46 2003
--- gnue/designer/src/base/tools/SchemaViewer.py        Sat Jan 25 16:41:41 2003
***************
*** 27,33 ****
  # NOTES:
  #
  
! import sys, os, cPickle, traceback, StringIO
  from wxPython.wx import *
  from gnue.common import GDebug, GDataSource
  from gnue.common import RuntimeSettings, events
--- 27,33 ----
  # NOTES:
  #
  
! import sys, os, cPickle, traceback, StringIO, string
  from wxPython.wx import *
  from gnue.common import GDebug, GDataSource
  from gnue.common import RuntimeSettings, events
Index: gnue/designer/src/base/tools/TriggerEditor.py
diff -c gnue/designer/src/base/tools/TriggerEditor.py:1.30 
gnue/designer/src/base/tools/TriggerEditor.py:1.31
*** gnue/designer/src/base/tools/TriggerEditor.py:1.30  Sat Jan 18 13:19:19 2003
--- gnue/designer/src/base/tools/TriggerEditor.py       Sat Jan 25 16:41:41 2003
***************
*** 30,36 ****
  from wxPython.wx import *
  from gnue.common import GDebug, GParserHelpers, GTrigger
  from gnue.designer.base.ToolPanel import *
! import keyword
  
  
  
--- 30,36 ----
  from wxPython.wx import *
  from gnue.common import GDebug, GParserHelpers, GTrigger
  from gnue.designer.base.ToolPanel import *
! import keyword, string
  
  
  
Index: gnue/forms/src/GFConfig.py
diff -c gnue/forms/src/GFConfig.py:1.19 gnue/forms/src/GFConfig.py:1.20
*** gnue/forms/src/GFConfig.py:1.19     Wed Jan  1 19:45:47 2003
--- gnue/forms/src/GFConfig.py  Sat Jan 25 16:41:41 2003
***************
*** 194,200 ****
  
    { 'Name'       : 'formFontEncoding',
      'Type'       : 'Setting',
!     'Comment'    : 'Font in forms encoding. Like iso8859-1, iso8859-13.',
      'Description': 'Font in forms encoding. Like iso8859-1, iso8859-13.',
      'Typecast'   : GTypecast.text,
      'Default'    : 'iso8859-1' },
--- 194,200 ----
  
    { 'Name'       : 'formFontEncoding',
      'Type'       : 'Setting',
!     'Comment'    : 'Deprecated, use "textEncoding" in [common] section 
instead.',
      'Description': 'Font in forms encoding. Like iso8859-1, iso8859-13.',
      'Typecast'   : GTypecast.text,
      'Default'    : 'iso8859-1' },
Index: gnue/forms/src/uidrivers/wx/UIdriver.py
diff -c gnue/forms/src/uidrivers/wx/UIdriver.py:1.226 
gnue/forms/src/uidrivers/wx/UIdriver.py:1.227
*** gnue/forms/src/uidrivers/wx/UIdriver.py:1.226       Wed Jan  1 19:45:48 2003
--- gnue/forms/src/uidrivers/wx/UIdriver.py     Sat Jan 25 16:41:41 2003
***************
*** 56,61 ****
--- 56,62 ----
  
  _disabledColour = wxLIGHT_GREY
  
+ 
  # Shortcut
  images_dir = GConfig.getInstalledBase('forms_images','common_images') + '/'
  
***************
*** 97,103 ****
  def initFont(widget, affectsLayout=1):
    if int(gConfigForms('fixedWidthFont')):
      widget.SetFont(wxFont(int(gConfigForms('pointSize')),wxMODERN,wxNORMAL,\
!       wxNORMAL,FALSE,'',encodings[gConfigForms('formFontEncoding')]))
  
  #
  # GFUserInterface
--- 98,104 ----
  def initFont(widget, affectsLayout=1):
    if int(gConfigForms('fixedWidthFont')):
      widget.SetFont(wxFont(int(gConfigForms('pointSize')),wxMODERN,wxNORMAL,\
!       wxNORMAL,FALSE,'',encodings[gConfig('textEncoding')]))
  
  #
  # GFUserInterface
Index: gnue/reports/src/adapters/filters/Labels/labels/Adapter.py
diff -c gnue/reports/src/adapters/filters/Labels/labels/Adapter.py:1.5 
gnue/reports/src/adapters/filters/Labels/labels/Adapter.py:1.6
*** gnue/reports/src/adapters/filters/Labels/labels/Adapter.py:1.5      Wed Jan 
 1 21:36:52 2003
--- gnue/reports/src/adapters/filters/Labels/labels/Adapter.py  Sat Jan 25 
16:41:41 2003
***************
*** 138,144 ****
      self._text = ""
  
    def characters(self, text):
!     self._text += text
  
    def endElement(self, name):
      if name == "labels":
--- 138,144 ----
      self._text = ""
  
    def characters(self, text):
!     self._text += text.encode(gConfig('textEncoding'))
  
    def endElement(self, name):
      if name == "labels":
Index: gnue/reports/src/adapters/filters/MailMerge/_merge/MergeBase.py
diff -c gnue/reports/src/adapters/filters/MailMerge/_merge/MergeBase.py:1.9 
gnue/reports/src/adapters/filters/MailMerge/_merge/MergeBase.py:1.10
*** gnue/reports/src/adapters/filters/MailMerge/_merge/MergeBase.py:1.9 Wed Jan 
 1 21:36:52 2003
--- gnue/reports/src/adapters/filters/MailMerge/_merge/MergeBase.py     Sat Jan 
25 16:41:41 2003
***************
*** 180,186 ****
      self._text = ""
  
    def characters(self, text):
!     self._text += text
  
    def endElement(self, name):
      if name == "field":
--- 180,186 ----
      self._text = ""
  
    def characters(self, text):
!     self._text += text.encode(gConfig('textEncoding'))
  
    def endElement(self, name):
      if name == "field":
Index: gnue/reports/src/adapters/filters/SimpleTabulation/tabulator/Adapter.py
diff -c 
gnue/reports/src/adapters/filters/SimpleTabulation/tabulator/Adapter.py:1.4 
gnue/reports/src/adapters/filters/SimpleTabulation/tabulator/Adapter.py:1.5
*** gnue/reports/src/adapters/filters/SimpleTabulation/tabulator/Adapter.py:1.4 
Wed Jan  1 21:36:52 2003
--- gnue/reports/src/adapters/filters/SimpleTabulation/tabulator/Adapter.py     
Sat Jan 25 16:41:41 2003
***************
*** 135,141 ****
  
  
    def characters(self, text):
!     self._text += text
  
  
    def endElement(self, name):
--- 135,141 ----
  
  
    def characters(self, text):
!     self._text += text.encode(gConfig('textEncoding'))
  
  
    def endElement(self, name):
Index: gnue/reports/src/base/GRReport.py
diff -c gnue/reports/src/base/GRReport.py:1.33 
gnue/reports/src/base/GRReport.py:1.34
*** gnue/reports/src/base/GRReport.py:1.33      Wed Jan  1 21:06:23 2003
--- gnue/reports/src/base/GRReport.py   Sat Jan 25 16:41:41 2003
***************
*** 130,145 ****
        else:
          ns = ""
  
!       # TODO: other encodings???
!       encoding= sys.getdefaultencoding()
!       if encoding == 'ascii':
!         #encoding = 'iso8859-1'   # TODO: salbotron had issues with this
!         encoding = 'iso-8859-1'  # TODO: fix this when we have [common] 
section
!       try:                    #       in gnue.conf
!         encoding = gConfig('formFontEncoding')
!       except:
!         pass
!       dest.write ('<?xml version="1.0" encoding="%s"?>\n'%encoding)
  
        #TODO: (?) dest.write ('<!DOCTYPE ... >\n')
        dest.write ('<gnue:report-output xmlns:gnue="GNUe:Reports:Base"%s>\n' % 
ns)
--- 130,136 ----
        else:
          ns = ""
  
!       dest.write ('<?xml version="1.0" 
encoding="%s"?>\n'%gConfig('textEncoding'))
  
        #TODO: (?) dest.write ('<!DOCTYPE ... >\n')
        dest.write ('<gnue:report-output xmlns:gnue="GNUe:Reports:Base"%s>\n' % 
ns)
Index: gnue/reports/src/base/layout/ContainerElement.py
diff -c gnue/reports/src/base/layout/ContainerElement.py:1.54 
gnue/reports/src/base/layout/ContainerElement.py:1.55
*** gnue/reports/src/base/layout/ContainerElement.py:1.54       Sun Jan 12 
13:55:45 2003
--- gnue/reports/src/base/layout/ContainerElement.py    Sat Jan 25 16:41:41 2003
***************
*** 60,68 ****
          self.processTrigger('On-Process')
  
        for child in self._children:
-         
          if child._type == "_content_":
!           dest.write(child.getContent())
          elif isinstance(child, GRLayoutElement) and child._enabled:
            # Handle GRSections specially as
            # they require extra logic
--- 60,67 ----
          self.processTrigger('On-Process')
  
        for child in self._children:
          if child._type == "_content_":
!           dest.write(child.getContent().encode(gConfig('textEncoding')))
          elif isinstance(child, GRLayoutElement) and child._enabled:
            # Handle GRSections specially as
            # they require extra logic




reply via email to

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