Merge lp:~charlesk/indicator-datetime/lp-1234483 into lp:~indicator-applet-developers/indicator-datetime/trunk.13.10

Proposed by Charles Kerr
Status: Merged
Approved by: Ted Gould
Approved revision: 263
Merged at revision: 262
Proposed branch: lp:~charlesk/indicator-datetime/lp-1234483
Merge into: lp:~indicator-applet-developers/indicator-datetime/trunk.13.10
Diff against target: 37 lines (+8/-8)
2 files modified
src/utils.c (+2/-2)
tests/test-utils.cc (+6/-6)
To merge this branch: bzr merge lp:~charlesk/indicator-datetime/lp-1234483
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Ted Gould (community) Approve
Review via email: mp+189071@code.launchpad.net

Commit message

Change the tablet time format string to remove leading zeroes from the hour component of the time format (ie, H:MM rather than HH:MM)

Description of the change

Change the tablet time format string to remove leading zeroes from the hour component of the time format (ie, H:MM rather than HH:MM)

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ted Gould (ted) wrote :

Jenkins hickup.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ted Gould (ted) wrote :

Okay, that's a real test failure.

263. By Charles Kerr

sync unit tests to not look for the leading zero

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/utils.c'
2--- src/utils.c 2013-09-09 16:50:22 +0000
3+++ src/utils.c 2013-10-03 14:36:49 +0000
4@@ -301,8 +301,8 @@
5
6 if (g_date_time_get_minute (time) != 0)
7 {
8- /* a strftime(3) fmt string for a HH:MM 12 hour time, eg "06:59 PM" */
9- fmt = T_("%I:%M %p");
10+ /* a strftime(3) fmt string for a H:MM 12 hour time, eg "6:59 PM" */
11+ fmt = T_("%l:%M %p");
12 }
13 else
14 {
15
16=== modified file 'tests/test-utils.cc'
17--- tests/test-utils.cc 2013-09-07 14:39:38 +0000
18+++ tests/test-utils.cc 2013-10-03 14:36:49 +0000
19@@ -78,12 +78,12 @@
20 GDateTime * time;
21 const char * expected_format_string;
22 } test_cases[] = {
23- { g_date_time_ref(arbitrary_day), g_date_time_ref(arbitrary_day), "%I:%M %p" }, /* identical time */
24- { g_date_time_ref(arbitrary_day), g_date_time_add_hours(arbitrary_day,1), "%I:%M %p" }, /* later today */
25- { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,1), "Tomorrow" EM_SPACE "%I:%M %p" }, /* tomorrow */
26- { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,2), "%a" EM_SPACE "%I:%M %p" },
27- { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,6), "%a" EM_SPACE "%I:%M %p" },
28- { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,7), "%d %b" EM_SPACE "%I:%M %p" }, /* over one week away */
29+ { g_date_time_ref(arbitrary_day), g_date_time_ref(arbitrary_day), "%l:%M %p" }, /* identical time */
30+ { g_date_time_ref(arbitrary_day), g_date_time_add_hours(arbitrary_day,1), "%l:%M %p" }, /* later today */
31+ { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,1), "Tomorrow" EM_SPACE "%l:%M %p" }, /* tomorrow */
32+ { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,2), "%a" EM_SPACE "%l:%M %p" },
33+ { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,6), "%a" EM_SPACE "%l:%M %p" },
34+ { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,7), "%d %b" EM_SPACE "%l:%M %p" }, /* over one week away */
35
36 { g_date_time_ref(on_the_hour), g_date_time_ref(on_the_hour), "%l %p" }, /* identical time */
37 { g_date_time_ref(on_the_hour), g_date_time_add_hours(on_the_hour,1), "%l %p" }, /* later today */

Subscribers

People subscribed via source and target branches