aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-05-20 11:02:22 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2011-06-14 00:04:03 +0800
commit6b13df746bc564a8ee72d1575315c007100262ce (patch)
tree7bba3132f98cabce7b7e6fe6b840fb66d6fb8b52
parentb87566f46243257310b6d3b5e9b8fc25a0f6954d (diff)
downloadgsoc2013-empathy-6b13df746bc564a8ee72d1575315c007100262ce.tar
gsoc2013-empathy-6b13df746bc564a8ee72d1575315c007100262ce.tar.gz
gsoc2013-empathy-6b13df746bc564a8ee72d1575315c007100262ce.tar.bz2
gsoc2013-empathy-6b13df746bc564a8ee72d1575315c007100262ce.tar.lz
gsoc2013-empathy-6b13df746bc564a8ee72d1575315c007100262ce.tar.xz
gsoc2013-empathy-6b13df746bc564a8ee72d1575315c007100262ce.tar.zst
gsoc2013-empathy-6b13df746bc564a8ee72d1575315c007100262ce.zip
Add a tooltip saying when the message was edited
-rw-r--r--libempathy-gtk/empathy-theme-adium.c14
1 files changed, 14 insertions, 0 deletions
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: