From 6b13df746bc564a8ee72d1575315c007100262ce Mon Sep 17 00:00:00 2001 From: Danielle Madeley Date: Fri, 20 May 2011 13:02:22 +1000 Subject: Add a tooltip saying when the message was edited --- libempathy-gtk/empathy-theme-adium.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libempathy-gtk/empathy-theme-adium.c') diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index a55eff67e..14a399803 100644 --- a/libempathy-gtk/empathy-theme-adium.c +++ b/libempathy-gtk/empathy-theme-adium.c @@ -1035,6 +1035,7 @@ theme_adium_edit_message (EmpathyChatView *view, WebKitDOMDocument *doc; WebKitDOMElement *span; gchar *id, *parsed_body; + gchar *tooltip, *timestamp; GError *error = NULL; if (priv->pages_loading != 0) { @@ -1072,8 +1073,21 @@ theme_adium_edit_message (EmpathyChatView *view, if (error != NULL) { DEBUG ("Error setting new inner-HTML: %s", error->message); g_error_free (error); + goto except; } + /* set a tooltip */ + timestamp = empathy_time_to_string_local ( + empathy_message_get_timestamp (message), + "%H:%M:%S"); + tooltip = g_strdup_printf (_("Message edited at %s"), timestamp); + + webkit_dom_html_element_set_title (WEBKIT_DOM_HTML_ELEMENT (span), + tooltip); + + g_free (tooltip); + g_free (timestamp); + goto finally; except: -- cgit v1.2.3