[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r5919 - in trunk/gnue-forms/src: . uidrivers/wx
From: |
btami |
Subject: |
r5919 - in trunk/gnue-forms/src: . uidrivers/wx |
Date: |
Wed, 7 Jul 2004 17:13:58 -0500 (CDT) |
Author: btami
Date: 2004-06-18 17:11:34 -0500 (Fri, 18 Jun 2004)
New Revision: 5919
Modified:
trunk/gnue-forms/src/GFConfig.py
trunk/gnue-forms/src/uidrivers/wx/common.py
Log:
added faceName config option for better font selection
Modified: trunk/gnue-forms/src/GFConfig.py
===================================================================
--- trunk/gnue-forms/src/GFConfig.py 2004-06-16 13:27:01 UTC (rev 5918)
+++ trunk/gnue-forms/src/GFConfig.py 2004-06-18 22:11:34 UTC (rev 5919)
@@ -333,6 +333,13 @@
'Typecast' : GTypecast.whole,
'Default' : 14 },
+ { 'Name' : 'faceName',
+ 'Type' : 'Setting',
+ 'Comment' : 'If fixedWidthFont is set to true, then this is the face
name used for fonts.',
+ 'Description': 'If fixedWidthFont is set to true, then this is the face
name used for fonts.',
+ 'Typecast' : GTypecast.text,
+ 'Default' : '' },
+
{ 'Name' : 'checkboxTrue',
'Type' : 'Setting',
'Comment' : 'The default value stored in the database for True values',
Modified: trunk/gnue-forms/src/uidrivers/wx/common.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx/common.py 2004-06-16 13:27:01 UTC (rev
5918)
+++ trunk/gnue-forms/src/uidrivers/wx/common.py 2004-06-18 22:11:34 UTC (rev
5919)
@@ -82,6 +82,7 @@
# TODO: Not completed
#
_pointSize = 0
+_faceName = ''
def getPointSize():
return _pointSize or setPointSize(gConfigForms('pointSize'))
@@ -91,16 +92,24 @@
_pointSize = size
return size
+def getFaceName():
+ return _faceName or setFaceName(gConfigForms('faceName'))
+
+def setFaceName(name):
+ global _faceName
+ _faceName = name
+ return name
+
def initFont(widget, affectsLayout=1):
- if gConfigForms('fixedWidthFont'):
- try:
- enc=encodings[gConfigForms('textEncoding')]
- except:
- GDebug.printMesg(1,_('Encoding %s is not supported by the wx UI
driver') %\
- gConfigForms('textEncoding'))
- enc=encodings['iso8859-1']
- widget.SetFont(wxFont(getPointSize(),wxMODERN,wxNORMAL,\
- wxNORMAL,FALSE,'',enc))
+ if gConfigForms('fixedWidthFont'):
+ try:
+ enc=encodings[gConfigForms('textEncoding')]
+ except:
+ GDebug.printMesg(1,_('Encoding %s is not supported by the wx UI driver')
%\
+ gConfigForms('textEncoding'))
+ enc=encodings['iso8859-1']
+ widget.SetFont(wxFont(getPointSize(),wxMODERN,wxNORMAL,\
+ wxNORMAL,FALSE,getFaceName(),enc))
def wxEncode(u_string):
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r5919 - in trunk/gnue-forms/src: . uidrivers/wx,
btami <=