im.pidgin.pidgin: 6bde7e9b90bca409befd75255faa9a53e1f3cb0f

sadrul at pidgin.im sadrul at pidgin.im
Fri Jan 18 17:35:49 EST 2008


-----------------------------------------------------------------
Revision: 6bde7e9b90bca409befd75255faa9a53e1f3cb0f
Ancestor: dc8c41e4820873421d845e86d1059d97990a256a
Author: sadrul at pidgin.im
Date: 2008-01-18T22:40:33
Branch: im.pidgin.pidgin

Modified files:
        pidgin/gtkconv.c

ChangeLog: 

Fix the bug where removing the typing notification would cause the text to
scroll *up* by 2 pixels.

I have also added a define 'RESERVE_LINE' which will always reserve a blank
line at the end (of the buffer, not of the view) for the typing notification.
We can switch to using that if people use it and like it better, (or hate it
less ;) )

-------------- next part --------------
============================================================
--- pidgin/gtkconv.c	c1e3b547ddb76e55fdd99001bc5fb6a7a26c8aad
+++ pidgin/gtkconv.c	17af45460ab72ba8a49409d377df20e6005f7c1c
@@ -3428,9 +3428,14 @@ update_typing_message(PidginConversation
 		gtk_text_buffer_delete_mark(buffer, stmark);
 		gtk_text_buffer_delete_mark(buffer, enmark);
 		gtk_text_buffer_delete(buffer, &start, &end);
-	} else if (message && *message == '\n' && !*(message + 1))
+	} else if (message && *message == '\n' && message[1] == ' ' && message[2] == '\0')
 		message = NULL;
 
+#ifdef RESERVE_LINE
+	if (!message)
+		message = "\n ";   /* The blank space is required to avoid a GTK+/Pango bug */
+#endif
+
 	if (message) {
 		GtkTextIter iter;
 		gtk_text_buffer_get_end_iter(buffer, &iter);
@@ -3458,7 +3463,11 @@ update_typing_icon(PidginConversation *g
 		return;
 
 	if (purple_conv_im_get_typing_state(im) == PURPLE_NOT_TYPING) {
-		update_typing_message(gtkconv, "\n");
+#ifdef RESERVE_LINE
+		update_typing_message(gtkconv, NULL);
+#else
+		update_typing_message(gtkconv, "\n ");
+#endif
 		return;
 	}
 


More information about the Commits mailing list