Author Topic: Patch for projectfileoptionsdlg.cpp  (Read 6497 times)

Offline GeO

  • Multiple posting newcomer
  • *
  • Posts: 51
Patch for projectfileoptionsdlg.cpp
« on: March 27, 2010, 09:11:02 pm »
Just some optical improvements:
 -Layout the Dialog after inserting values
 -Better formatting of date and time
 -added bytes to the filelength (18456 bytes)

[attachment deleted by admin]
« Last Edit: March 27, 2010, 09:20:26 pm by GeO »

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Patch for projectfileoptionsdlg.cpp
« Reply #1 on: March 27, 2010, 10:03:58 pm »
According to the patch the date is shown using the current locale. That means those of us who have configured the system to show it as dd/mm/yyyy would get it like that. That was my concern.

Patch looks good to me. I have NOT applied it, though.

Offline GeO

  • Multiple posting newcomer
  • *
  • Posts: 51
Re: Patch for projectfileoptionsdlg.cpp
« Reply #2 on: March 27, 2010, 10:32:23 pm »
Here is an update:
i reverted my date formating changes, but i changed the format string, so that the values will be filled with 0 if they are less then 10.

old format string:
Code
"%ld/%ld/%ld %ld:%ld:%ld"

new format string:
Code
"%02ld/%02ld/%ld %02ld:%02ld:%02ld"

[attachment deleted by admin]

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: Patch for projectfileoptionsdlg.cpp
« Reply #3 on: March 28, 2010, 12:06:39 am »
great, but I think the %ld Bytes should be _() since the word bytes could be translated into other languages.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: Patch for projectfileoptionsdlg.cpp
« Reply #4 on: March 28, 2010, 09:33:18 am »
On my OpenSuse 10.3 box (aged distribution ;-)  ), I get the following for a timestamp (exiting CB code, the patch not applied yet) :

21/3/2010 14:140733193388067:22



Offline GeO

  • Multiple posting newcomer
  • *
  • Posts: 51
Re: Patch for projectfileoptionsdlg.cpp
« Reply #5 on: March 28, 2010, 11:20:02 am »
great, but I think the %ld Bytes should be _() since the word bytes could be translated into other languages.
Yes your are right. I changed it.

for the other problem, i think the reason is, that we use ld, which means long int or unsigned long int.
instead we should use hd, wich means short int or unsigned short int, because wxDateTime_t is defined as:

Code
typedef unsigned short wxDateTime_t;


[attachment deleted by admin]

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: Patch for projectfileoptionsdlg.cpp
« Reply #6 on: March 28, 2010, 02:58:40 pm »
applied, and on my OpenSuse 10.3 box, I now get normal time stamps :-)

Offline GeO

  • Multiple posting newcomer
  • *
  • Posts: 51
Re: Patch for projectfileoptionsdlg.cpp
« Reply #7 on: April 03, 2010, 07:09:08 pm »
btw,
this patch solved bug 16288 on berlios
https://developer.berlios.de/bugs/?func=detailbug&bug_id=16288&group_id=5358
so it could be closed

greets GeO

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: Patch for projectfileoptionsdlg.cpp
« Reply #8 on: April 05, 2010, 07:02:37 pm »
done. Thanks for pointing this out.