From 05a6097dc659e6567e2d081061a44a585ddc5f67 Mon Sep 17 00:00:00 2001 From: TingPing Date: Sun, 30 Nov 2014 22:33:30 -0500 Subject: [PATCH] Fix copying timestamp with server-time and indent nicks off --- src/fe-gtk/rawlog.c | 2 +- src/fe-gtk/textgui.c | 4 ++-- src/fe-gtk/xtext.c | 6 +++--- src/fe-gtk/xtext.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/fe-gtk/rawlog.c b/src/fe-gtk/rawlog.c index f2527492..24ebf041 100644 --- a/src/fe-gtk/rawlog.c +++ b/src/fe-gtk/rawlog.c @@ -163,7 +163,7 @@ fe_add_rawlog (server *serv, char *text, int len, int outbound) else new_text = g_strconcat ("\0033>>\017 ", split_text[i], NULL); - gtk_xtext_append (GTK_XTEXT (serv->gui->rawlog_textlist)->buffer, new_text, strlen (new_text)); + gtk_xtext_append (GTK_XTEXT (serv->gui->rawlog_textlist)->buffer, new_text, strlen (new_text), 0); g_free (new_text); } diff --git a/src/fe-gtk/textgui.c b/src/fe-gtk/textgui.c index 9956e9c6..556cca0c 100644 --- a/src/fe-gtk/textgui.c +++ b/src/fe-gtk/textgui.c @@ -85,10 +85,10 @@ PrintTextLine (xtext_buffer *xtbuf, unsigned char *text, int len, int indent, ti memcpy (new_text, stamp, stamp_size); g_free (stamp); memcpy (new_text + stamp_size, text, len); - gtk_xtext_append (xtbuf, new_text, len + stamp_size); + gtk_xtext_append (xtbuf, new_text, len + stamp_size, timet); free (new_text); } else - gtk_xtext_append (xtbuf, text, len); + gtk_xtext_append (xtbuf, text, len, timet); return; } diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index 2de852f1..f7ddbde2 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -4685,7 +4685,7 @@ gtk_xtext_append_indent (xtext_buffer *buf, } void -gtk_xtext_append (xtext_buffer *buf, unsigned char *text, int len) +gtk_xtext_append (xtext_buffer *buf, unsigned char *text, int len, time_t stamp) { textentry *ent; @@ -4707,7 +4707,7 @@ gtk_xtext_append (xtext_buffer *buf, unsigned char *text, int len) ent->indent = 0; ent->left_len = -1; - gtk_xtext_append_entry (buf, ent, 0); + gtk_xtext_append_entry (buf, ent, stamp); } gboolean @@ -4742,7 +4742,7 @@ gtk_xtext_lastlog (xtext_buffer *out, xtext_buffer *search_area) } else { - gtk_xtext_append (out, ent->str, ent->str_len); + gtk_xtext_append (out, ent->str, ent->str_len, 0); } out->text_last->stamp = ent->stamp; diff --git a/src/fe-gtk/xtext.h b/src/fe-gtk/xtext.h index 73f5b52d..d6853f9f 100644 --- a/src/fe-gtk/xtext.h +++ b/src/fe-gtk/xtext.h @@ -252,7 +252,7 @@ struct _GtkXTextClass }; GtkWidget *gtk_xtext_new (GdkColor palette[], int separator); -void gtk_xtext_append (xtext_buffer *buf, unsigned char *text, int len); +void gtk_xtext_append (xtext_buffer *buf, unsigned char *text, int len, time_t stamp); void gtk_xtext_append_indent (xtext_buffer *buf, unsigned char *left_text, int left_len, unsigned char *right_text, int right_len,