Payable Aging Report Totals column produces error

Charles Day cedayiv at gmail.com
Mon Jun 23 19:14:24 EDT 2008


How about a slightly different approach: define a C function called
gnc_strftime() that substitutes %#d for %e if G_OS_WIN32 is defined. Then
make all the reports call gnc-strftime instead of strftime. What do you
think? Seems safer, since the user may manually change the setting and could
type in %e at any time, resulting in a crash.

-Charles


On Wed, Jun 11, 2008 at 9:57 AM, Derek Atkins <warlord at mit.edu> wrote:

> Quoting Charles Day <cedayiv at gmail.com>:
>
>  On Wed, Jun 11, 2008 at 9:29 AM, Derek Atkins <warlord at mit.edu> wrote:
>>
>>  Charles,
>>> What we really need here is the following C Code:
>>>
>>> const char* gnc_default_strftime_date_format =
>>> #ifdef G_OS_WIN32
>>>  N_("%B %#d, %Y")
>>> #else
>>>  N_("%B %e, %Y")
>>> #endif
>>>  ;
>>>
>>>
>> What C file does this belong in?
>>
>
> I don't know.  Something core.  maybe qof-date.c?
>
>  Then we need to export gnc_default_strftime_format into Scheme and
>>> use that exported string in the option generator as the default
>>> option value.
>>>
>>>
>> I think you've lost me here a little... could you make this change, or
>> explain the option generator bit in a little more detail?
>>
>
> Okay, there are two things that need to happen from the scheme side:
>
> 1) we need to export gnc_default_strftime_format.  This would mean
> swigifying
>  the C symbol and exporting it to the Scheme environment.  Let's say the
>  scheme variable is gnc-default-strftime-format.
> 2) We need to go through every report and replace "%B %e, %Y" with
>  (_ gnc-default-strftime-format) in all the report option generators.
>
> I was sorta hoping I could convince you to make these changes ;)
>
>  But I guess you can't test since you are not using Windows... I at least
>> can
>> do that part if you tell me which report I need to run. However, bear in
>> mind that I don't have any business data to work with.
>>
>
> No, I cannot test this on windows.
>
>  At least we will have Scheme backtraces logged now. Should make report
>> debugging a bit easier starting with 2.2.6. :)
>>
>
> Yes indeed!   Thanks!
>
>
>  -Charles
>>
>
> -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
>      warlord at MIT.EDU                        PGP key available
>
>


More information about the gnucash-user mailing list