# HG changeset patch # User Sadrul Habib Chowdhury # Date 1165967340 0 # Node ID fc4d6f704d465b1e493293c7c1965142d2267824 # Parent b94956393b631bce87c6605afeb7ba29d140ad2a [gaim-migrate @ 17977] Make sure the typing notification shows up just once in the conversation window. committer: Tailor Script diff -r b94956393b63 -r fc4d6f704d46 console/gntconv.c --- a/console/gntconv.c Tue Dec 12 22:44:33 2006 +0000 +++ b/console/gntconv.c Tue Dec 12 23:49:00 2006 +0000 @@ -244,8 +244,10 @@ scroll = gnt_text_view_get_lines_below(GNT_TEXT_VIEW(ggc->tv)); str = g_strdup_printf(_("\n%s is typing..."), gaim_conversation_get_name(conv)); - gnt_text_view_append_text_with_tag(GNT_TEXT_VIEW(ggc->tv), - str, GNT_TEXT_FLAG_DIM, "typing"); + /* Update an existing notification if there's one. */ + if (gnt_text_view_tag_change(GNT_TEXT_VIEW(ggc->tv), "typing", str, TRUE) == 0) + gnt_text_view_append_text_with_tag(GNT_TEXT_VIEW(ggc->tv), + str, GNT_TEXT_FLAG_DIM, "typing"); g_free(str); if (scroll <= 1) gnt_text_view_scroll(GNT_TEXT_VIEW(ggc->tv), 0);