+static void
+map_view_contacts_update_label (ChamplainMarker *marker)
+{
+ const gchar *name;
+ gchar *date;
+ gchar *label;
+ GValue *gtime;
+ time_t loctime;
+ GHashTable *location;
+ EmpathyContact *contact;
+
+ contact = g_object_get_data (G_OBJECT (marker), "contact");
+ location = empathy_contact_get_location (contact);
+ name = empathy_contact_get_name (contact);
+ gtime = g_hash_table_lookup (location, EMPATHY_LOCATION_TIMESTAMP);
+
+ if (gtime != NULL)
+ {
+ time_t now;
+
+ loctime = g_value_get_int64 (gtime);
+ date = empathy_time_to_string_relative (loctime);
+ label = g_strconcat ("<b>", name, "</b>\n<small>", date, "</small>", NULL);
+ g_free (date);
+
+ now = time (NULL);
+
+ /* if location is older than a week */
+ if (now - loctime > (60 * 60 * 24 * 7))
+ clutter_actor_set_opacity (CLUTTER_ACTOR (marker), 0.75 * 255);
+ }
+ else
+ {
+ label = g_strconcat ("<b>", name, "</b>\n", NULL);
+ }
+
+ champlain_marker_set_use_markup (CHAMPLAIN_MARKER (marker), TRUE);
+ champlain_marker_set_text (CHAMPLAIN_MARKER (marker), label);
+
+ g_free (label);
+}
+