[GNC] First Day of the Week
Michael Hendry
hendry.michael at gmail.com
Tue Aug 13 04:49:52 EDT 2019
> On 13 Aug 2019, at 09:13, Adrien Monteleone <adrien.monteleone at lusfiber.net> wrote:
>
> I spoke too soon.
>
> It turns out that GIMP has a date picker when editing meta data.
>
> It also does not honor the first day of week setting in MacOS preferences.
>
> So this is a problem with GTK, not just GnuCash.
>
> The question is then, can a proper locale file be stored by the user to override the default that will be seen and honored by GTK?
>
> After that, the question would be “Why are there so many locale files in GnuCash.app but only a few are selectable from within GnuCash and then apparently the obvious ones don’t have first_weekday set to ‘2’?"
>
> Regards,
> Adrien
>
>> On Aug 13, 2019, at 3:04 AM, Adrien Monteleone <adrien.monteleone at lusfiber.net> wrote:
>>
>> But I don’t think GnuCash is doing that. (telling the widget to draw a calendar with first_weekday set to ‘Monday’) It is calling GtkCalendar() and that widget doesn’t have a setting for defining the first day. Now, since it seems to work on Ubuntu as another user reported, maybe the widget is looking at the system locale, but something on MacOS is preventing that. (or it isn’t even aware of the locale since it might have its own default)
>>
>> This is where I was headed when I tried to copy this custom locale file to my user profile’s gtk-3.0 folder.
>>
>> However, I see now that GnuCash.app has a locale folder but the files there seem to be encoded somehow and not plain text. I’ll have to check the sources out to see what is really there. It could be those locale files are not set to have first_weekday be ‘2’ and they are taking precedence.
>>
>> And yes, testing a different GTK app on a Mac would shed some light on if it is possible. Unfortunately, I don’t think my other GTK apps have date pickers or calendar widgets in use. Maybe someone else has such an app to try.
>>
>> Regards,
>> Adrien
>>
>>> On Aug 12, 2019, at 10:01 PM, John Morris <johnjeff at editide.us> wrote:
>>>
>>> Hi Frank,
>>> Thank you for thinking about my little problem.
>>>
>>> I don't understand why we would assume this is a bug in GTK. If GnuCash tells GTK to create a calendar with Sundays as the first day of the week, it should obey. The problem is that some code is not looking at the locale setting on my computer. Since this is a completely new test build, I think I can rule out a corrupted operating system. Also, other date-aware applications are correctly picking the first day of the week.
>>>
>>> I guess a real test would be to find some other application that uses GTK to display calendars and see if it picks the correct first day of the week on my system. I'm not aware of any I could try.
>>>
>>> Best,
>>> John
>
When I bring up the date-picker on GC 3.6 on my Mac OS X High Sierra, I get a calendar widget with Monday as the first day of the week.
This is my preference, but I’m not sure if I ever set it up as such, other than selecting UK in my locale options on the Mac.
Looking at the Mac Calendar App’s preferences, I see that that is set up as Monday-first.
In System Preferences —> Language & Region, I also have “First day of week: Monday”.
Gnucash —> Preferences doesn’t appear to have a first-day setting, but it picks up the correct date format from Locale.
HTH
Michael
More information about the gnucash-user
mailing list