Re: Allowing the user to select the currency symbol

2013-09-25 Thread Derek Atkins
Frédéric Perrin  writes:

> Yes. OTOH, beyond the locale currency, we can't decide for the user what
> is meant by $ or £. Do you think this is too much trouble for something
> users won't bother to configure ?

Possibly, yes.

> I guess we can decide to use $ for USD, £ for GBP and for the other
> currencies, invent some qualifier. CAD already has C$, but e.g. Brunei
> and Bahamain both have B$. How do we resolve this ambiguity ?

Maybe.  Maybe not..  One possibility would be to have defaults in the
iso-4217-currencies and a flag (which the user can set) for whether to
display it.

>> worse, GConf editing is really only simple on Linux, so you're leaving
>> out users of Mac and Windows.
>
> Editing GConf was only for development, if the idea is sound we'd
> hopefully also get a GUI editor (new tab in the Pref dialog ?).

While interesting, this would be a lot of effort!  :)
But go ahead if this is your plan.
You could start with built-in defaults and let the user change them;
perhaps on a per-datafile setting?  (That would indeed be easiest).  Or
I guess it could go into the user's "global" settings.  Hard to say
what's the Right Thing here.

-derek

-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   warl...@mit.eduPGP key available

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


[r23191]Fix leaking Gtkosxapplication objects.

2013-09-25 Thread Norbert Holze
Hello!

With this change I have this (Ubuntu 13.10):

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../src/gnome-utils
-I../.. -I../../../src/core-utils -I../../../src/gnc-module
-I../../../src/engine -I../../../src/backend/xml
-I../../../src/app-utils -I../../../src -I../../src -I../../../lib/libc
-I../../../src/libqof/qof -pthread -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread
-I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0
-I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/harfbuzz
-pthread -I/usr/include/gconf/2 -I/usr/include/dbus-1.0
-I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include
-I/usr/include/gnome-keyring-1 -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread
-I/usr/include/guile/2.0 -I../../src/libqof/qof
-I../../../src/libqof/qof -I/usr/include/libxml2
-DG_LOG_DOMAIN=\"gnc.gui\" -Wdeclaration-after-statement -g -O2 -Wall
-Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused -MT
gnc-main-window.lo -MD -MP -MF .deps/gnc-main-window.Tpo -c
../../../src/gnome-utils/gnc-main-window.c  -fPIC -DPIC -o
.libs/gnc-main-window.o
../../../src/gnome-utils/gnc-main-window.c: In function
'gnc_main_window_show_all_windows':
../../../src/gnome-utils/gnc-main-window.c:4368:21: error: 'theApp'
undeclared (first use in this function)
 g_object_unref (theApp);
 ^
../../../src/gnome-utils/gnc-main-window.c:4368:21: note: each
undeclared identifier is reported only once for each function it appears in
make[3]: *** [gnc-main-window.lo] Fehler 1


Regrads,

Norbert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Allowing the user to select the currency symbol

2013-09-25 Thread David Carlson
On 9/25/2013 10:02 AM, Derek Atkins wrote:
> Frédéric Perrin  writes:
>
>> Yes. OTOH, beyond the locale currency, we can't decide for the user what
>> is meant by $ or £. Do you think this is too much trouble for something
>> users won't bother to configure ?
> Possibly, yes.
>
>> I guess we can decide to use $ for USD, £ for GBP and for the other
>> currencies, invent some qualifier. CAD already has C$, but e.g. Brunei
>> and Bahamain both have B$. How do we resolve this ambiguity ?
> Maybe.  Maybe not..  One possibility would be to have defaults in the
> iso-4217-currencies and a flag (which the user can set) for whether to
> display it.
>
>>> worse, GConf editing is really only simple on Linux, so you're leaving
>>> out users of Mac and Windows.
>> Editing GConf was only for development, if the idea is sound we'd
>> hopefully also get a GUI editor (new tab in the Pref dialog ?).
> While interesting, this would be a lot of effort!  :)
> But go ahead if this is your plan.
> You could start with built-in defaults and let the user change them;
> perhaps on a per-datafile setting?  (That would indeed be easiest).  Or
> I guess it could go into the user's "global" settings.  Hard to say
> what's the Right Thing here.
>
> -derek
>
As another user I would suggest per data file.  One user may want
different settings in another file.

David C


0xDC7C8BF3.asc
Description: application/pgp-keys
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Allowing the user to select the currency symbol

2013-09-25 Thread Geert Janssens
On Wednesday 25 September 2013 11:11:21 David Carlson wrote:
> On 9/25/2013 10:02 AM, Derek Atkins wrote:
> > Frédéric Perrin  writes:
> >> Yes. OTOH, beyond the locale currency, we can't decide for the user
> >> what is meant by $ or £. Do you think this is too much trouble for
> >> something users won't bother to configure ?
> > 
> > Possibly, yes.
> > 
> >> I guess we can decide to use $ for USD, £ for GBP and for the other
> >> currencies, invent some qualifier. CAD already has C$, but e.g.
> >> Brunei and Bahamain both have B$. How do we resolve this ambiguity
> >> ?> 
> > Maybe.  Maybe not..  One possibility would be to have defaults in
> > the
> > iso-4217-currencies and a flag (which the user can set) for whether
> > to display it.
> > 
> >>> worse, GConf editing is really only simple on Linux, so you're
> >>> leaving out users of Mac and Windows.
> >> 
> >> Editing GConf was only for development, if the idea is sound we'd
> >> hopefully also get a GUI editor (new tab in the Pref dialog ?).
> > 
> > While interesting, this would be a lot of effort!  :)
> > But go ahead if this is your plan.
> > You could start with built-in defaults and let the user change them;
> > perhaps on a per-datafile setting?  (That would indeed be easiest). 
> > Or I guess it could go into the user's "global" settings.  Hard to
> > say what's the Right Thing here.
> > 
> > -derek
> 
> As another user I would suggest per data file.  One user may want
> different settings in another file.
> 
> David C

I would rather see it per data file as well.

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 
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... I'm just thinking out loud 
how what you 
want to achieve can do much more with some additional effort.

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Allowing the user to select the currency symbol

2013-09-25 Thread Frédéric Perrin
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@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Allowing the user to select the currency symbol

2013-09-25 Thread David T.
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 
To: Geert Janssens  
Cc: gnucash-devel@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@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: r23191 - gnucash/trunk/src/gnome-utils - Fix leaking Gtkosxapplication objects.

2013-09-25 Thread Alex Aycinena
John,

Doesn't build on Fedora 18 or 19:

In function 'gnc_main_window_show_all_windows':
/home/gnucash-dev/svncheckouts/gnucash-clean/src/gnome-utils/gnc-main-window.c:4368:21:
error: 'theApp' undeclared (first use in this function)
/home/gnucash-dev/svncheckouts/gnucash-clean/src/gnome-utils/gnc-main-window.c:4368:21:
note: each undeclared identifier is reported only once for each function it
appears in
make[4]: *** [gnc-main-window.lo] Error 1
make[4]: Leaving directory
`/home/gnucash-dev/svncheckouts/gnucash-clean-build/src/gnome-utils'


Regards,

Alex


On Tue, Sep 24, 2013 at 1:11 PM, John Ralls  wrote:

> Author: jralls
> Date: 2013-09-24 16:11:11 -0400 (Tue, 24 Sep 2013)
> New Revision: 23191
> Trac: http://svn.gnucash.org/trac/changeset/23191
>
> Modified:
>gnucash/trunk/src/gnome-utils/gnc-main-window.c
> Log:
> Fix leaking Gtkosxapplication objects.
>
> ___
> gnucash-patches mailing list
> gnucash-patc...@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-patches
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [r23191]Fix leaking Gtkosxapplication objects.

2013-09-25 Thread John Ralls

On Sep 25, 2013, at 9:09 AM, Norbert Holze  wrote:

> Hello!
> 
> With this change I have this (Ubuntu 13.10):
[SNIP]
> ../../../src/gnome-utils/gnc-main-window.c: In function
> 'gnc_main_window_show_all_windows':
> ../../../src/gnome-utils/gnc-main-window.c:4368:21: error: 'theApp'
> undeclared (first use in this function)
> g_object_unref (theApp);
> ^
> ../../../src/gnome-utils/gnc-main-window.c:4368:21: note: each
> undeclared identifier is reported only once for each function it appears in
> make[3]: *** [gnc-main-window.lo] Fehler 1

On Sep 25, 2013, at 6:15 PM, Alex Aycinena  wrote:

> John,
> 
> Doesn't build on Fedora 18 or 19:
> 
> In function 'gnc_main_window_show_all_windows':
> /home/gnucash-dev/svncheckouts/gnucash-clean/src/gnome-utils/gnc-main-window.c:4368:21:
> error: 'theApp' undeclared (first use in this function)
> /home/gnucash-dev/svncheckouts/gnucash-clean/src/gnome-utils/gnc-main-window.c:4368:21:
> note: each undeclared identifier is reported only once for each function it
> appears in
> make[4]: *** [gnc-main-window.lo] Error 1
> make[4]: Leaving directory
> `/home/gnucash-dev/svncheckouts/gnucash-clean-build/src/gnome-utils'

Sorry, got the g_object_unref on the wrong side of the #endif. Fixed in 
r23197/8.

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel