[gaim-migrate @ 4528]

Fri, 10 Jan 2003 15:41:53 +0000

author
Benjamin Tegarden
date
Fri, 10 Jan 2003 15:41:53 +0000
changeset 4277
14659e241487
parent 4276
d1652a291840
child 4278
fe687aea6abe

[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: Luke Schierer <lschiere@pidgin.im>

src/buddy_chat.c file | annotate | diff | comparison | revisions
src/conversation.c file | annotate | diff | comparison | revisions
--- 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);
 

mercurial