aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/service.c2
-rw-r--r--src/utils.c10
-rw-r--r--src/utils.h2
3 files changed, 11 insertions, 3 deletions
diff --git a/src/service.c b/src/service.c
index 2528f41..ee00723 100644
--- a/src/service.c
+++ b/src/service.c
@@ -498,7 +498,7 @@ create_phone_header_state (IndicatorDatetimeService * self)
/* label */
now = indicator_datetime_service_get_localtime (self);
- fmt = get_terse_time_format_string (now);
+ fmt = get_terse_header_time_format_string ();
label = g_date_time_format (now, fmt);
/* icon */
diff --git a/src/utils.c b/src/utils.c
index bbb24ac..60fd393 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -294,6 +294,13 @@ get_terse_date_format_string (date_proximity_t proximity)
return fmt;
}
+const gchar*
+get_terse_header_time_format_string (void)
+{
+ /* a strftime(3) fmt string for a H:MM 12 hour time, eg "6:59 PM" */
+ return T_("%l:%M %p");
+}
+
const gchar *
get_terse_time_format_string (GDateTime * time)
{
@@ -301,8 +308,7 @@ get_terse_time_format_string (GDateTime * time)
if (g_date_time_get_minute (time) != 0)
{
- /* a strftime(3) fmt string for a H:MM 12 hour time, eg "6:59 PM" */
- fmt = T_("%l:%M %p");
+ fmt = get_terse_header_time_format_string ();
}
else
{
diff --git a/src/utils.h b/src/utils.h
index 31a12bc..24eddb6 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -45,6 +45,8 @@ gchar* join_date_and_time_format_strings (const char * date_fmt,
const gchar * get_terse_time_format_string (GDateTime * time);
+const gchar * get_terse_header_time_format_string (void);
+
const gchar * get_full_time_format_string (GSettings * settings);
gchar * generate_terse_format_string_at_time (GDateTime * now,