Re: Locale definitions, dots and commas

2008-03-13 Thread Ernie Wright
[EMAIL PROTECTED] wrote: > Dave Howorth wrote: >> Martin (OpenGeoMap) wrote: >> >>> you can input in a entry for example (22m, 22 m, 220cm,...) and >>> internally you have a double always in meters. >> >> How do you deal with precision? 22 m is not the same as 22.000 m > > Bad example. 22 can be

GtkTextView tags and insertion at begin/end

2008-03-13 Thread Steve Splonskowski
Hello, I have a GtkTextView that I am using in my app - the contents of it are setup from text and style runs that I convert into the necessary tags corresponding to the tags - all works as expected. The only problem I am experiencing is that when text is inserted (by typing or pasting) eit

Re: Locale definitions, dots and commas

2008-03-13 Thread Carlos Pereira
Andrew W. Nosenko wrote: > On Thu, Mar 13, 2008 at 5:12 PM, Carlos Pereira > <[EMAIL PROTECTED]> wrote: > >> Andrew W. Nosenko wrote: >> > What you need to do indeed: >> > 1. use locale-dependent formatting in the UI (both for input and output) >> > 2. use locale-INDEPENDENT formatting when y

ICCCM protocol and selection-request-events without paste

2008-03-13 Thread Xavier Toth
I'm working on a secure selection manager based on glipper. What it needs to be able to do is intervene and make a security determination when a paste is requested. 'glipper' currently monitors clipboard ownership changes at which time is gets the clipboard contents. I've modified glipper to become

Re: Locale definitions, dots and commas

2008-03-13 Thread wallace . owen
On Thu, 2008-03-13 at 16:46 +, Dave Howorth wrote: > Martin (OpenGeoMap) wrote: > > > Yes 22 m is the same as 22.000 m > > No, they are not the same. The second one says that something is known > to within a mm. The first does not. > > > PERL Regular expresions are great in C also, but bette

Re: Locale definitions, dots and commas

2008-03-13 Thread Dave Howorth
Martin (OpenGeoMap) wrote: > Yes 22 m is the same as 22.000 m No, they are not the same. The second one says that something is known to within a mm. The first does not. > PERL Regular expresions are great in C also, but better in perl and > Ruby 8-) > To learn a little about regular expresion

Re: Locale definitions, dots and commas

2008-03-13 Thread Martin (OpenGeoMap)
> > /(\d+\.?\*)(\s*m)/ > If you have "22.000 m" > in PERL you have $1="22.000" and $2="m" > > sorry it was wrong: /(\d+\.?\d*)(\s*m)/ :-[ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-

Re: Locale definitions, dots and commas

2008-03-13 Thread Martin (OpenGeoMap)
[EMAIL PROTECTED] escribió: > On Thu, 2008-03-13 at 15:48 +, Dave Howorth wrote: > >> Martin (OpenGeoMap) wrote: >> >>> I am building an intermediate unit system for engineeres in Gobject and >>> i hope publish this library soon. >>> With this system you always work in lineal measures

Re: Locale definitions, dots and commas

2008-03-13 Thread Andrew W. Nosenko
On Thu, Mar 13, 2008 at 5:12 PM, Carlos Pereira <[EMAIL PROTECTED]> wrote: > Andrew W. Nosenko wrote: > > What you need to do indeed: > > 1. use locale-dependent formatting in the UI (both for input and output) > > 2. use locale-INDEPENDENT formatting when you read and save your data > files. >

Re: Locale definitions, dots and commas

2008-03-13 Thread wallace . owen
On Thu, 2008-03-13 at 15:48 +, Dave Howorth wrote: > Martin (OpenGeoMap) wrote: > > I am building an intermediate unit system for engineeres in Gobject and > > i hope publish this library soon. > > With this system you always work in lineal measures in meters (double), > > and you can input

Re: Locale definitions, dots and commas

2008-03-13 Thread Martin (OpenGeoMap)
Dave Howorth escribió: > Martin (OpenGeoMap) wrote: > >> I am building an intermediate unit system for engineeres in Gobject and >> i hope publish this library soon. >> With this system you always work in lineal measures in meters (double), >> and you can input others (inches, centimeters) >>

Re: Locale definitions, dots and commas

2008-03-13 Thread Dave Howorth
Martin (OpenGeoMap) wrote: > I am building an intermediate unit system for engineeres in Gobject and > i hope publish this library soon. > With this system you always work in lineal measures in meters (double), > and you can input others (inches, centimeters) > > input system - intermediate sys

Re: Locale definitions, dots and commas

2008-03-13 Thread Martin (OpenGeoMap)
Hi: > > If I follow Martin's suggestion, inserting gtk_disable_setlocale () > before gtk_init (), everything is consistent and works fine, XML > importing/exporting, GTK interfaces, etc. I just tested it. > > Unfortunately this means always using dot-based decimals. I always > use dots myself, so

Re: Locale definitions, dots and commas

2008-03-13 Thread Carlos Pereira
Andrew W. Nosenko wrote: > What you need to do indeed: > 1. use locale-dependent formatting in the UI (both for input and output) > 2. use locale-INDEPENDENT formatting when you read and save your data files. So you are saying that interfaces should use dots, commas, whatever is locally defined, bu

Re: Locale definitions, dots and commas

2008-03-13 Thread Andrew W. Nosenko
On Wed, Mar 12, 2008 at 10:28 PM, Carlos Pereira <[EMAIL PROTECTED]> wrote: > > Andrew W. Nosenko wrote: > > On Wed, Mar 12, 2008 at 6:09 PM, Carlos Pereira > > <[EMAIL PROTECTED]> wrote: > > > >> Thanks for your answers, I realize this is not Gtk stuff, > >> but certainly affects every GTK