aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-02-12 08:17:37 -0600
committerTed Gould <ted@canonical.com>2009-02-12 08:17:37 -0600
commit184a04a0f101e4005794ea72217dda0f452ae97d (patch)
tree38c82f34a46073fee46336fefeb2c8bc21d81cc0
parent2717850d777c3d8874f2ff0090c56018aef23b75 (diff)
downloadlibayatana-indicator-184a04a0f101e4005794ea72217dda0f452ae97d.tar.gz
libayatana-indicator-184a04a0f101e4005794ea72217dda0f452ae97d.tar.bz2
libayatana-indicator-184a04a0f101e4005794ea72217dda0f452ae97d.zip
Adding in a time property function
-rw-r--r--libindicate/indicator.c11
-rw-r--r--libindicate/indicator.h1
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);