On Saturday 12 February 2005 20:36, Chris Cannam wrote:
> On Saturday 12 Feb 2005 11:47, Pedro Lopez-Cabanillas wrote:
> > When RG GUI is initialized, it has already POSIX or C locale, so the
> > workaround proposed by William doesn't help. When NoteFontMap()
> > constructor is reached, the program has changed to es_ES locale. But
> > there isn't a single call to setLocale() in RG code.
>
> Perhaps, since we always want to use '.' as decimal point when reading
> from our own XML files, we ought in any case to be avoiding a function
> whose interpretation might depend on the locale.

Or avoid data files depending on English/American locale conventions.

> Since we don't care about exponents or bases or anything much else here,
> we can easily throw in a crappy reimplementation of atof to do the work
> here, and perhaps we should do that anyway.  Unless you can suggest an
> alternative library function that's guaranteed to be i18n-free.

I had detected two problems in this pre-release:
- Wrong position of clef elements, and wrong line thickness on other elements 
in notation window. Caused by QString.toDouble() working on a locale 
environment not matching the data files.
- Print preview and PDF printing problems. Root cause remains unknown.

> > The big question remains. Why should it differ between cvs-01/19 and
> > 02/09? Research continues.
>
> Of course, I'd still like to know this.

I've found that CVS before Jan/24 is OK: no printing problems, nor staff 
positioning problems. Attached is a simple patch as a workaround that solves 
my problems for current CVS. 

I'm not going to commit the fix without your approval, but this 
QUERY_PLUGINS_FROM_GUI thing seems a feature to me, not a bug fix. I'm not 
opposed at all, but I must to note that we are at a feature freeze stage, 
days before a 1.0 release, and it broken something. Shouldn't be better to 
open an experimental branch for things like this? 

This is not the end of the joy with this bug. I still don't know why 
enumerating plugins changes the locale. Research continues.

Regards,
Pedro

--- gui/sequencemanager.h.old	2005-02-12 19:51:56.000000000 +0100
+++ gui/sequencemanager.h	2005-02-12 19:52:55.000000000 +0100
@@ -37,7 +37,7 @@
 
 #include <ctime>
 
-#define QUERY_PLUGINS_FROM_GUI 1
+//#define QUERY_PLUGINS_FROM_GUI 1
 
 // SequenceManager is a helper class that wraps the sequencing
 // functionality at the GUI level.  The sequencer still communicates

Reply via email to