From 39867d1e686e9bd9b0bb74e507325b5e4d40a752 Mon Sep 17 00:00:00 2001 From: mfrasca <> Date: Wed, 16 May 2007 12:53:33 +0000 Subject: [PATCH] 1719983: caratteri nazionali non supportati MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rimossa l'eccezione se un carattere non rientra fra 32 e 127. quello che succede è dipendente dall'encoding del file da cui vengono lette le stringhe. nel test case le óńł occupano due caratteri, che vengono saltati e resta quanto era stato scritto prima. forse si potrebbe prevedere una separazione "lettera"/"accento", però devo trovare il modo di definire l'accento in modo che sia sovrapponibile alla lettera, mentre quelli che ho ora le cancellerebbero. alla fine dell'alfabeto potrei aggiungere gli accenti su trasparenza... acuto (é) grave (è) tilde (ẽ) circonflesso (ê) breve (ĕ) lungo (ēħ) v (č) punto (ż) dieresi (ë) coda-destra (ę) coda-sinistra (ç) obliquo (ł) o (å) resterebbe il problema di caratteri quali ß æ œ ... --- wmdocklib/pywmhelpers.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wmdocklib/pywmhelpers.py b/wmdocklib/pywmhelpers.py index fad0af9..f90d136 100644 --- a/wmdocklib/pywmhelpers.py +++ b/wmdocklib/pywmhelpers.py @@ -92,7 +92,9 @@ def addChar(ch, x, y, xOffset, yOffset, width, height): """ if not (32 <= ord(ch) <= 127): - raise ValueError, "Unsupported Char: '%s'(%d)" % (ch, ord(ch)) + pass + #raise ValueError, "Unsupported Char: '%s'(%d)" % (ch, ord(ch)) + # linelength is the amount of bits the character set uses on each row. linelength = charset_width - (charset_width % char_width) # pos is the horizontal index of the box containing ch. @@ -380,8 +382,11 @@ def copyXPMArea(sourceX, sourceY, width, height, targetX, targetY): pywmgeneral.copyXPMArea(sourceX, sourceY, width, height, targetX, targetY) -def addMouseRegion(index, left, top, right, bottom): +def addMouseRegion(index, left, top, right=None, bottom=None, width=None, height=None): """Add a mouse region in the window.""" + if right is bottom is None: + right = left + width + bottom = top + height pywmgeneral.addMouseRegion(index, left, top, right, bottom) def checkMouseRegion(x, y):