# HG changeset patch # User Luke Schierer # Date 1042213313 0 # Node ID 12d3ca8f5b5fb624df329cae1bad892fcc4cbf42 # Parent 32fcf4cf5f80d0983f69f981810534b87965bcca [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 diff -r 32fcf4cf5f80 -r 12d3ca8f5b5f src/buddy_chat.c --- 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); diff -r 32fcf4cf5f80 -r 12d3ca8f5b5f src/conversation.c --- 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);