[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r5270 - trunk/gnue-forms/src/uidrivers/wx
From: |
jan |
Subject: |
r5270 - trunk/gnue-forms/src/uidrivers/wx |
Date: |
Mon, 8 Mar 2004 14:52:05 -0600 (CST) |
Author: jan
Date: 2004-03-08 14:52:04 -0600 (Mon, 08 Mar 2004)
New Revision: 5270
Modified:
trunk/gnue-forms/src/uidrivers/wx/common.py
Log:
return keyboard input as unicode
Modified: trunk/gnue-forms/src/uidrivers/wx/common.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx/common.py 2004-03-08 20:40:49 UTC (rev
5269)
+++ trunk/gnue-forms/src/uidrivers/wx/common.py 2004-03-08 20:52:04 UTC (rev
5270)
@@ -30,7 +30,7 @@
#
import string
-from types import UnicodeType
+from types import UnicodeType, StringType
from wxPython.wx import *
from gnue.common import events
from gnue.common.apps import GDebug
@@ -109,6 +109,11 @@
else:
return u_string
+def wxDecode(string):
+ if type(string)==StringType:
+ return unicode(string, gConfig('textEncoding'))
+ else:
+ return string
#####################################################################
##
@@ -253,8 +258,8 @@
char = chr(keycode)
if char in string.printable or char == "\n" or \
128 <= keycode <= 255:
- action = events.Event('requestKEYPRESS', char,
- text=char,
+ action = events.Event('requestKEYPRESS', wxDecode(char),
+ text=wxDecode(char),
code=keycode)
except ValueError:
pass
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r5270 - trunk/gnue-forms/src/uidrivers/wx,
jan <=