[Pidgin] #11667: Add 12 hour timestamps to Message Timestamp Formats plugin

Pidgin trac at pidgin.im
Sun Apr 11 15:56:55 EDT 2010


#11667: Add 12 hour timestamps to Message Timestamp Formats plugin
--------------------+-------------------------------------------------------
Reporter:  jemaltz  |        Type:  patch                        
  Status:  new      |   Component:  plugins                      
 Version:  2.6.6    |    Keywords:  timestamp format 12hr 12 hour
--------------------+-------------------------------------------------------
 This patch to the "Message Timestamp Formats" plugin adds the ability to
 force 12 hour timestamps in addition to 24 hour timestamps.  I've been
 using some variation of this for a while on my Mac, which curiously uses
 24 hour timestamps by default despite regional settings to the contrary,
 so I decided to formalize it a bit and submit it to the community.

 To (neatly) accommodate the additional option, I changed the name and
 datatype of the force flag.  The patch does not preserve the user's pre-
 patch selection, so users who are already utilizing this plugin to force
 24 hour timestamps will need to reselect that option after updating.  (The
 default /could/ be to force 24 hour timestamps by changing the default
 value from 0 to 1, but I opted to use Pidgin's default as the plugin's
 default.)

 The 12 hour format I used is the digits 1-12, as opposed to 01-12.  As
 there is no formatting option in purple_utf8_strftime (or strftime) that
 returns hours less than 10 as a single digit, there is code that calls
 strftime and then trims the leading character for times 1-9.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/11667>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list