summary refs log tree commit diff stats
path: root/src/fe-gtk
diff options
context:
space:
mode:
authorDiogo Sousa <diogogsousa@gmail.com>2013-10-08 23:59:36 +0100
committerTingPing <tingping@tingping.se>2013-10-09 21:34:02 -0400
commit5ad955236528d3962e63ce486bcbda2ee6896a63 (patch)
tree660321d8b6c38b47db64307c8585c826959d3c7c /src/fe-gtk
parent111a58f1ef3948d3e15c3aff5c5cbdbb7f1a4123 (diff)
Fix messages with server-time not showing as new activity
Added a parameter to fe_print_text() to say that the message does not represent
new activity. This is used when a log from an old session is loaded. This used
to be implicit whenever the timestamp was non-zero, but with server-time this no
longer makes sense.

Fixes issue #746.
Diffstat (limited to 'src/fe-gtk')
-rw-r--r--src/fe-gtk/fe-gtk.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c
index 97067f90..af3173e1 100644
--- a/src/fe-gtk/fe-gtk.c
+++ b/src/fe-gtk/fe-gtk.c
@@ -607,12 +607,13 @@ fe_progressbar_end (server *serv)
 }
 
 void
-fe_print_text (struct session *sess, char *text, time_t stamp)
+fe_print_text (struct session *sess, char *text, time_t stamp,
+			   gboolean no_activity)
 {
 	PrintTextRaw (sess->res->buffer, (unsigned char *)text, prefs.hex_text_indent, stamp);
 
-	if (!sess->new_data && sess != current_tab &&
-		 sess->gui->is_tab && !sess->nick_said && stamp == 0)
+	if (!no_activity && !sess->new_data && sess != current_tab &&
+		sess->gui->is_tab && !sess->nick_said)
 	{
 		sess->new_data = TRUE;
 		lastact_update (sess);