diff src/gtkrequest.c @ 13434:ffd724befbf8

[gaim-migrate @ 15809] Cleanup the busy cursor handling code to eliminate a bunch of these loops: while (gtk_events_pending()) gtk_main_iteration(); They seem like a race condition waiting to happen. This code is also simpler, and more generic. This leaves only one such loop, in src/gtkblist.c's gaim_gtk_blist_expand_contact_cb(). committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Tue, 07 Mar 2006 05:48:54 +0000
parents fb178093e364
children b0df520aceea
line wrap: on
line diff
--- a/src/gtkrequest.c	Tue Mar 07 05:09:51 2006 +0000
+++ b/src/gtkrequest.c	Tue Mar 07 05:48:54 2006 +0000
@@ -81,16 +81,12 @@
 static void
 generic_response_start(GaimGtkRequestData *data)
 {
-	GdkWindow *window = GTK_WIDGET(data->dialog)->window;
 	GdkCursor *cursor;
 
+	g_return_if_fail(data != NULL);
+
 	/* Tell the user we're doing something. */
-	cursor = gdk_cursor_new(GDK_WATCH);
-	gdk_window_set_cursor(window, cursor);
-	gdk_cursor_unref(cursor);
-	while (gtk_events_pending())
-		gtk_main_iteration();
-
+	gaim_gtk_set_cursor(GTK_WIDGET(data->dialog), GDK_WATCH);
 }
 
 static void
@@ -1396,7 +1392,7 @@
 			((GaimRequestFileCb)data->cbs[1])(data->user_data, data->u.file.name);
 		gaim_request_close(data->type, data);
 	} else {
-		gdk_window_set_cursor(GTK_WIDGET(data->dialog)->window, NULL);
+		gaim_gtk_clear_cursor(GTK_WIDGET(data->dialog));
 	}
 }