aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-09-15 09:29:54 -0500
committerTed Gould <ted@gould.cx>2011-09-15 09:29:54 -0500
commit19191707718ca3714caf815cfaa492997596eb67 (patch)
treeebaf452aef8f82113bf7e5b056e8d61ee8e69961
parentee90397388175fd7155901ea12c6629bb27125ff (diff)
parent5638139a6c8d0eab6f2e994f84b8a26ffabc294a (diff)
downloadayatana-indicator-datetime-19191707718ca3714caf815cfaa492997596eb67.tar.gz
ayatana-indicator-datetime-19191707718ca3714caf815cfaa492997596eb67.tar.bz2
ayatana-indicator-datetime-19191707718ca3714caf815cfaa492997596eb67.zip
Update comments to discuss the new format options in glib
-rw-r--r--configure.ac2
-rw-r--r--src/indicator-datetime.c10
2 files changed, 9 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 4dec84c..a713c6f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,7 +67,7 @@ EDS_REQUIRED_VERSION=2.30
ICAL_REQUIRED_VERSION=0.44
CAIRO_REQUIRED_VERSION=1.10
GDK_REQUIRED_VERSION=2.22
-GLIB_REQUIRED_VERSION=2.26
+GLIB_REQUIRED_VERSION=2.29.19
GTK3_REQUIRED_VERSION=3.1.4
GCONF_REQUIRED_VERSION=2.31
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c
index a9c8469..339ea2f 100644
--- a/src/indicator-datetime.c
+++ b/src/indicator-datetime.c
@@ -212,7 +212,7 @@ indicator_datetime_class_init (IndicatorDatetimeClass *klass)
PROP_TIME_FORMAT,
g_param_spec_int(PROP_TIME_FORMAT_S,
"A choice of which format should be used on the panel",
- "Chooses between letting the locale choose the time, 12-hour time, 24-time or using the custom string passed to strftime().",
+ "Chooses between letting the locale choose the time, 12-hour time, 24-time or using the custom string passed to g_date_time_format().",
SETTINGS_TIME_LOCALE, /* min */
SETTINGS_TIME_CUSTOM, /* max */
SETTINGS_TIME_LOCALE, /* default */
@@ -242,7 +242,7 @@ indicator_datetime_class_init (IndicatorDatetimeClass *klass)
PROP_CUSTOM_TIME_FORMAT,
g_param_spec_string(PROP_CUSTOM_TIME_FORMAT_S,
"The format that is used to show the time on the panel.",
- "A format string in the form used to pass to strftime to make a string for displaying on the panel.",
+ "A format string in the form used to pass to g_date_time_format() to make a string for displaying on the panel.",
DEFAULT_TIME_FORMAT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
@@ -774,6 +774,12 @@ set_label_to_time_in_zone (IndicatorDatetime * self, GtkLabel * label,
}
else {
timestr = g_date_time_format(datetime_now, format);
+ if (timestr == NULL) {
+ g_warning ("The custom date format is not valid, check the\n"
+ "g_date_time_format() documentation for the supported\n"
+ "format specifiers ");
+ timestr = g_strdup ("Date format not supported");
+ }
}
gboolean use_markup = FALSE;