changeset 4277:12d3ca8f5b5f

[gaim-migrate @ 4528] Benjamin Tegarden (tegarden) writes: "This patch fixes some problems with the timestamp handling code. Namely, unchecking the "Show timestamp on messages" or pressing F2 would not disable timestamp status. Main problem: ->comments should be ->show_comments Smaller problem: Some functions make bad assumptions about the incoming state of ->show_comments. Change to put else's with some if's to reduce our number of unnecessary assumptions. Result: Preferences checkbox works correctly. F2 works correctly. " committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Fri, 10 Jan 2003 15:41:53 +0000
parents 32fcf4cf5f80
children fd33fa2bc9da
files src/buddy_chat.c src/conversation.c
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/buddy_chat.c	Fri Jan 10 15:36:48 2003 +0000
+++ b/src/buddy_chat.c	Fri Jan 10 15:41:53 2003 +0000
@@ -1315,6 +1315,8 @@
 	gtk_container_add(GTK_CONTAINER(sw), text);
 	if (convo_options & OPT_CONVO_SHOW_TIME)
 		gtk_imhtml_show_comments(GTK_IMHTML(text), TRUE);
+	else
+		gtk_imhtml_show_comments(GTK_IMHTML(text), FALSE);
 	gaim_setup_imhtml(text);
 	gtk_widget_show(text);
 
--- a/src/conversation.c	Fri Jan 10 15:36:48 2003 +0000
+++ b/src/conversation.c	Fri Jan 10 15:41:53 2003 +0000
@@ -692,7 +692,7 @@
 		if(!(event->state & GDK_CONTROL_MASK))
 			gtk_imhtml_page_down(GTK_IMHTML(c->text));
 	} else if ((event->keyval == GDK_F2) && (convo_options & OPT_CONVO_F2_TOGGLES)) {
-		gtk_imhtml_show_comments(GTK_IMHTML(c->text), !GTK_IMHTML(c->text)->comments);
+		gtk_imhtml_show_comments(GTK_IMHTML(c->text), !GTK_IMHTML(c->text)->show_comments);
 	} else if ((event->keyval == GDK_Return) || (event->keyval == GDK_KP_Enter)) {
 		if ((event->state & GDK_CONTROL_MASK) && (convo_options & OPT_CONVO_CTL_ENTER)) {
 			send_callback(NULL, c);
@@ -2681,6 +2681,8 @@
 	gtk_container_add(GTK_CONTAINER(sw), text);
 	if (convo_options & OPT_CONVO_SHOW_TIME)
 		gtk_imhtml_show_comments(GTK_IMHTML(text), TRUE);
+	else
+		gtk_imhtml_show_comments(GTK_IMHTML(text), FALSE);
 	gaim_setup_imhtml(text);
 	gtk_widget_show(text);