[Patch] set time format



I am sending patch (in attachment(1375 bytes), doc.patch for doc subdirectory, src.patch for src subdirectory), where user can have it's own timeformat (in directory listings, etc ....), if you add timeformat (in strftime format) to [Misc] section in the 'ini' file as:
 timeformat_recent=<timeformat>
 timeformat_old=<timeformat>
MC will use these as timeformat, if either or both are missing, mc
will use default (will behave like before the patch)
(I coded it because I dislike 'Jun 18 20:20', i prefer rather '%d.%m.%y %H:%M')
I have not done any gui to change the value (maybe add it to options/layout in menu?
Or add even some 'options/advanced' and put there also all other options that are not settable directly in mc? like old_esc_mode, mouse_repeat_rate, torben_fj_mode, etc...)
If you find any bugs in the patch (or if you think I can do something in it better), please let me know, I can fix it.
I have put these settings in the english docs (mc.1.in), but not in other languages (cause i don't speak them)
Also I have MAX_I18NTIMELENGTH raised to 20 (so you can use even format
like '%H:%M:%S %d.%m.%Y' and have enough space - since my preferred format needs 15 and current value is 14). Should not make any problems (except people with long dateformat will have wide date column...)
I tested the patch on my system and it works as expected
I give all my rights to this patch to F.S.F., so you can include it in MC

Martin Petricek

--------------------
Jeden z největších letních open air festivalů v České republice. 3. - 6. 7. 2003, Český Brod. Těšit se můžete na téměř 130 umělců, kapel a DJs.
http://user.centrum.cz/redir.php?url=http://www.rockforpeople.cz




Attachment: dateformatpatch.tgz
Description: GNU Zip compressed data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]