diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-05-20 13:02:22 +1000 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-05-25 11:02:29 +1000 |
commit | a35ae7f145d2eacaa4c087cb9f2e72f3346e24fb (patch) | |
tree | 932e96de4b085d016c99c4f8881bcd70a07e2289 | |
parent | 3c402461dd7eb5776f81ecd6d31b6f663315bc26 (diff) | |
download | empathy-a35ae7f145d2eacaa4c087cb9f2e72f3346e24fb.tar.gz |
Add a tooltip saying when the message was edited
-rw-r--r-- | libempathy-gtk/empathy-theme-adium.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index 05758ed9d..b20b43774 100644 --- a/libempathy-gtk/empathy-theme-adium.c +++ b/libempathy-gtk/empathy-theme-adium.c @@ -650,6 +650,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) { @@ -686,8 +687,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: |