changeset 8913:d729311f6352

[gaim-migrate @ 9683] a pair of bug fixes from marv committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 10 May 2004 04:01:46 +0000
parents 40ebc5ecf86a
children 73649ee7f687
files ChangeLog plugins/history.c src/gtkutils.c
diffstat 3 files changed, 20 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun May 09 20:01:13 2004 +0000
+++ b/ChangeLog	Mon May 10 04:01:46 2004 +0000
@@ -27,6 +27,7 @@
 	* Novell prpl works on big endian machines (Novell)
 	* Zephyr works on 64 bit machines (Arun A Tharuvai)
 	* Print Gadu-Gadu messages to the debug window instead of the console
+	* New tabs should scroll correctly again (Tim Ringenbach)
 
 	Preference Changes:
 	* Added a "none" smiley theme to replace the "Show graphical
--- a/plugins/history.c	Sun May 09 20:01:13 2004 +0000
+++ b/plugins/history.c	Mon May 10 04:01:46 2004 +0000
@@ -18,6 +18,14 @@
 
 #define HISTORY_SIZE (4 * 1024)
 
+static gboolean _scroll_imhtml_to_end(gpointer data)
+{
+	GtkIMHtml *imhtml = data;
+	gtk_imhtml_scroll_to_end(GTK_IMHTML(imhtml));
+	g_object_unref(G_OBJECT(imhtml));
+	return FALSE;
+}
+
 static void historize(GaimConversation *c)
 {
 	GaimGtkConversation *gtkconv;
@@ -44,7 +52,8 @@
 		options |= GTK_IMHTML_NO_NEWLINE;
 	gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), history, options);
 	gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), "<hr>", options);
-	gtk_imhtml_scroll_to_end(GTK_IMHTML(gtkconv->imhtml));
+	g_object_ref(G_OBJECT(gtkconv->imhtml));
+	g_idle_add(_scroll_imhtml_to_end, gtkconv->imhtml);
 	g_free(history);
 
 	while (logs) {
--- a/src/gtkutils.c	Sun May 09 20:01:13 2004 +0000
+++ b/src/gtkutils.c	Mon May 10 04:01:46 2004 +0000
@@ -56,10 +56,18 @@
 
 guint accels_save_timer = 0;
 
+static gboolean
+url_clicked_idle_cb(gpointer data)
+{
+	gaim_notify_uri(NULL, data);
+	g_free(data);
+	return FALSE;
+}
+
 static void
 url_clicked_cb(GtkWidget *w, const char *uri)
 {
-	gaim_notify_uri(NULL, uri);
+	g_idle_add(url_clicked_idle_cb, g_strdup(uri));
 }
 
 void