aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-07-25 21:06:25 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-07-25 21:06:25 -0500
commit30d45a522eb83d519f1ee44ebe06a6696d2b094d (patch)
tree2a4678ee1c5b9f41ce93de6b06bdcedfb1bd563d /src/utils.c
parent7b4baac1d34ce22a570f080066856e229462f606 (diff)
downloadayatana-indicator-datetime-30d45a522eb83d519f1ee44ebe06a6696d2b094d.tar.gz
ayatana-indicator-datetime-30d45a522eb83d519f1ee44ebe06a6696d2b094d.tar.bz2
ayatana-indicator-datetime-30d45a522eb83d519f1ee44ebe06a6696d2b094d.zip
in the appointments section, only show the next instance of recurring events. If the event is daily, say so in the time format string.
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/utils.c b/src/utils.c
index fa54008..a408f68 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -154,6 +154,19 @@ T_(const char *msg)
return rv;
}
+gchar *
+join_date_and_time_format_strings (const char * date_string,
+ const char * time_string)
+{
+ /* TRANSLATORS: This is a format string passed to strftime to combine the
+ * date and the time. The value of "%s\xE2\x80\x82%s" will result in a
+ * string like this in US English 12-hour time: 'Fri Jul 16 11:50 AM'.
+ * The space in between date and time is a Unicode en space
+ * (E28082 in UTF-8 hex). */
+ return g_strdup_printf (T_("%s\xE2\x80\x82%s"), date_string, time_string);
+}
+
+
/* Tries to figure out what our format string should be. Lots
of translator comments in here. */
gchar *
@@ -218,11 +231,7 @@ generate_format_string_full (gboolean show_day, gboolean show_date)
/* Check point, we should have a date string */
g_return_val_if_fail(date_string != NULL, g_strdup(time_string));
- /* TRANSLATORS: This is a format string passed to strftime to combine the
- date and the time. The value of "%s\xE2\x80\x82%s" would result in a string like
- this in US English 12-hour time: 'Fri Jul 16 11:50 AM'.
- The space in between date and time is a Unicode en space (E28082 in UTF-8 hex). */
- return g_strdup_printf(T_("%s\xE2\x80\x82%s"), date_string, time_string);
+ return join_date_and_time_format_strings (date_string, time_string);
}
gchar *