Allowing the user to select the currency symbol

David T. sunfish62 at yahoo.com
Wed Sep 25 17:28:53 EDT 2013


Jumping in at the tail end of this as another end user...

It seems to me that it would be great from a user perspective to have a default currency symbol for each currency. This symbol doesn't actually have to be globally unique; a duplicated symbol (as for example the "$", which can apply to many currencies) is only a problem when the context is unclear. As end user, I will know whether the "$" represents the US Dollar or Mexican Peso. If perchance I should need it, I should be allowed to change the default using some simple settings dialog box where I put in my own symbols.


David



________________________________
 From: Frédéric Perrin <fred at fperrin.net>
To: Geert Janssens <janssens-geert at telenet.be> 
Cc: gnucash-devel at gnucash.org 
Sent: Wednesday, September 25, 2013 1:21 PM
Subject: Re: Allowing the user to select the currency symbol
 

Le mercredi 25 à 19:25, Geert Janssens a écrit :
> On Wednesday 25 September 2013 11:11:21 David Carlson wrote:
>> As another user I would suggest per data file. One user may want
>> different settings in another file.
>
> I would rather see it per data file as well.

Okay, I guess I can try and see how to store that info in the data file
then. Can't promise a timeframe, as even though that's conceptually
pretty simple, this is my first dabbling in Gnucash code...

> And if you are going to do a GUI to edit this, how about making it a
> currency editor, something like the commodity editor now, but then for
> currencies ? 

The way I see it (and what would be sufficient for my own use), the
interface to set the user symbol would look like :

foreach (currency in book->used_currencies)
        r = create_row()
        r.col1 = label(currency.code)
        r.col2 = label(currency.description)
        r.col3 = editable_text(currency.user_symbol
                if currency.user_symbol else currency.code)
        r.col3.on_update = lambda: new_user_symbol -> currency.set_user_symbol(new_user_symbol)

Well, the equivalent GTK code, but you get the idea.

>              The iso-4217-currencies can serve as preset currencies,
> which the user can edit, or even add custom currencies (think Bitcoin
> and friends). Perhaps that's too wide a scope though... 

Isn't user-defined currencies something that's been asked a couple of
times ? I mean, googling for "gnucash bitcoin site:lists.gnucash.org"
reveals quite a few past discussions (without, evidently, happy
conclusions or we would have BTC by now).

And the complexity of "I'll store in (GConf|the data file) one
user-defined field per currency" seems much lower than "I'll store
enough data to recreate the entire currency at data-file load time" ; I
don't think I can acheive the second.

-- 
Fred

_______________________________________________
gnucash-devel mailing list
gnucash-devel at gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


More information about the gnucash-devel mailing list