aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorNicolò Chieffo <yelo3@gmail.com>2010-08-02 18:40:52 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-02 18:40:52 +0800
commitbf773817f5ea14ac8566171153e2df793aeb03aa (patch)
tree456af450772f0a2056cf4b8442ac6fad2b046774 /libempathy-gtk
parentf8f4c3a9dc1e21df9e78dafb259112a9a5ac4b46 (diff)
downloadgsoc2013-empathy-bf773817f5ea14ac8566171153e2df793aeb03aa.tar
gsoc2013-empathy-bf773817f5ea14ac8566171153e2df793aeb03aa.tar.gz
gsoc2013-empathy-bf773817f5ea14ac8566171153e2df793aeb03aa.tar.bz2
gsoc2013-empathy-bf773817f5ea14ac8566171153e2df793aeb03aa.tar.lz
gsoc2013-empathy-bf773817f5ea14ac8566171153e2df793aeb03aa.tar.xz
gsoc2013-empathy-bf773817f5ea14ac8566171153e2df793aeb03aa.tar.zst
gsoc2013-empathy-bf773817f5ea14ac8566171153e2df793aeb03aa.zip
show the date in messages coming from history (#624599)
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-log-window.c2
-rw-r--r--libempathy-gtk/empathy-theme-adium.c16
2 files changed, 12 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 986a3af2c..fcbc6e22a 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -525,7 +525,7 @@ log_manager_searched_new_cb (GObject *manager,
}
g_date_strftime (date_readable, sizeof (date_readable),
- EMPATHY_TIME_FORMAT_DISPLAY_LONG, hit->date);
+ EMPATHY_DATE_FORMAT_DISPLAY_SHORT, hit->date);
g_date_strftime (tmp, sizeof (tmp),
"%Y%m%d", hit->date);
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index 53c78c18a..8c6301ee9 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -324,7 +324,8 @@ theme_adium_append_html (EmpathyThemeAdium *theme,
const gchar *contact_id,
const gchar *service_name,
const gchar *message_classes,
- time_t timestamp)
+ time_t timestamp,
+ gboolean is_backlog)
{
GString *string;
const gchar *cur = NULL;
@@ -380,8 +381,13 @@ theme_adium_append_html (EmpathyThemeAdium *theme,
cur++;
}
- dup_replace = empathy_time_to_string_local (timestamp,
- format ? format : EMPATHY_TIME_FORMAT_DISPLAY_SHORT);
+ if (is_backlog) {
+ dup_replace = empathy_time_to_string_local (timestamp,
+ format ? format : EMPATHY_TIME_DATE_FORMAT_DISPLAY_SHORT);
+ } else {
+ dup_replace = empathy_time_to_string_local (timestamp,
+ format ? format : EMPATHY_TIME_FORMAT_DISPLAY_SHORT);
+ }
replace = dup_replace;
g_free (format);
} else {
@@ -412,7 +418,7 @@ theme_adium_append_event_escaped (EmpathyChatView *view,
priv->data->status_html,
priv->data->status_len,
escaped, NULL, NULL, NULL, NULL,
- "event", empathy_time_get_current ());
+ "event", empathy_time_get_current (), FALSE);
}
/* There is no last contact */
@@ -596,7 +602,7 @@ theme_adium_append_message (EmpathyChatView *view,
theme_adium_append_html (theme, func, html, len, body_escaped,
avatar_filename, name, contact_id,
service_name, message_classes->str,
- timestamp);
+ timestamp, is_backlog);
} else {
DEBUG ("Couldn't find HTML file for this message");
}