diff options
-rw-r--r-- | libindicate/indicator.c | 11 | ||||
-rw-r--r-- | libindicate/indicator.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/libindicate/indicator.c b/libindicate/indicator.c index c6df80a..3b6581b 100644 --- a/libindicate/indicator.c +++ b/libindicate/indicator.c @@ -244,6 +244,17 @@ indicate_indicator_set_property_icon (IndicateIndicator * indicator, const gchar } +void +indicate_indicator_set_property_time (IndicateIndicator * indicator, const gchar * key, GTimeVal * time) +{ + gchar * timestr = g_time_val_to_iso8601(time); + if (timestr != NULL) { + indicate_indicator_set_property(indicator, key, timestr); + g_free(timestr); + } + return; +} + const gchar * indicate_indicator_get_property (IndicateIndicator * indicator, const gchar * key) { diff --git a/libindicate/indicator.h b/libindicate/indicator.h index 5423247..5faea3c 100644 --- a/libindicate/indicator.h +++ b/libindicate/indicator.h @@ -99,6 +99,7 @@ void indicate_indicator_user_display (IndicateIndicator * indicator); /* Properties handling */ void indicate_indicator_set_property (IndicateIndicator * indicator, const gchar * key, const gchar * data); void indicate_indicator_set_property_icon (IndicateIndicator * indicator, const gchar * key, const GdkPixbuf * data); +void indicate_indicator_set_property_time (IndicateIndicator * indicator, const gchar * key, GTimeVal * time); const gchar * indicate_indicator_get_property (IndicateIndicator * indicator, const gchar * key); GPtrArray * indicate_indicator_list_properties (IndicateIndicator * indicator); |