Merge lp:~jjardon/indicator-datetime/fix-775113 into lp:indicator-datetime/0.3

Proposed by Javier Jardón
Status: Merged
Merged at revision: 131
Proposed branch: lp:~jjardon/indicator-datetime/fix-775113
Merge into: lp:indicator-datetime/0.3
Diff against target: 47 lines (+9/-3)
2 files modified
configure.ac (+1/-1)
src/indicator-datetime.c (+8/-2)
To merge this branch: bzr merge lp:~jjardon/indicator-datetime/fix-775113
Reviewer Review Type Date Requested Status
Indicator Applet Developers Pending
Review via email: mp+73846@code.launchpad.net
To post a comment you must log in.
129. By Javier Jardón

configure.ac: Bump glib required version

This version of Glib supports all the strftime format specifiers
Fixes https://bugs.launchpad.net/indicator-datetime/+bug/775113

Revision history for this message
Ted Gould (ted) wrote :

No currently a new enough version of GLib in Oneiric to test. Need to circle back when that gets updated.

Revision history for this message
Javier Jardón (jjardon) wrote :

Only note that the needed version is currently available in oneiric

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2011-08-18 15:57:14 +0000
3+++ configure.ac 2011-09-05 12:10:42 +0000
4@@ -66,7 +66,7 @@
5 ICAL_REQUIRED_VERSION=0.44
6 CAIRO_REQUIRED_VERSION=1.10
7 GDK_REQUIRED_VERSION=2.22
8-GLIB_REQUIRED_VERSION=2.26
9+GLIB_REQUIRED_VERSION=2.29.19
10 GTK3_REQUIRED_VERSION=3.1.4
11 GCONF_REQUIRED_VERSION=2.31
12
13
14=== modified file 'src/indicator-datetime.c'
15--- src/indicator-datetime.c 2011-08-25 14:46:51 +0000
16+++ src/indicator-datetime.c 2011-09-05 12:10:42 +0000
17@@ -215,7 +215,7 @@
18 PROP_TIME_FORMAT,
19 g_param_spec_int(PROP_TIME_FORMAT_S,
20 "A choice of which format should be used on the panel",
21- "Chooses between letting the locale choose the time, 12-hour time, 24-time or using the custom string passed to strftime().",
22+ "Chooses between letting the locale choose the time, 12-hour time, 24-time or using the custom string passed to g_date_time_format().",
23 SETTINGS_TIME_LOCALE, /* min */
24 SETTINGS_TIME_CUSTOM, /* max */
25 SETTINGS_TIME_LOCALE, /* default */
26@@ -245,7 +245,7 @@
27 PROP_CUSTOM_TIME_FORMAT,
28 g_param_spec_string(PROP_CUSTOM_TIME_FORMAT_S,
29 "The format that is used to show the time on the panel.",
30- "A format string in the form used to pass to strftime to make a string for displaying on the panel.",
31+ "A format string in the form used to pass to g_date_time_format() to make a string for displaying on the panel.",
32 DEFAULT_TIME_FORMAT,
33 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
34
35@@ -775,6 +775,12 @@
36 }
37 else {
38 timestr = g_date_time_format(datetime_now, format);
39+ if (timestr == NULL) {
40+ g_warning ("The custom date format is not valid, check the
41+ g_date_time_format() documentation for the supported
42+ format specifiers ");
43+ timestr = g_strdup ("Date format not supported");
44+ }
45 }
46
47 gboolean use_markup = FALSE;

Subscribers

People subscribed via source and target branches