comparison 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
comparison
equal deleted inserted replaced
13433:7ef6a2d0d9da 13434:ffd724befbf8
79 } GaimGtkRequestData; 79 } GaimGtkRequestData;
80 80
81 static void 81 static void
82 generic_response_start(GaimGtkRequestData *data) 82 generic_response_start(GaimGtkRequestData *data)
83 { 83 {
84 GdkWindow *window = GTK_WIDGET(data->dialog)->window;
85 GdkCursor *cursor; 84 GdkCursor *cursor;
86 85
86 g_return_if_fail(data != NULL);
87
87 /* Tell the user we're doing something. */ 88 /* Tell the user we're doing something. */
88 cursor = gdk_cursor_new(GDK_WATCH); 89 gaim_gtk_set_cursor(GTK_WIDGET(data->dialog), GDK_WATCH);
89 gdk_window_set_cursor(window, cursor);
90 gdk_cursor_unref(cursor);
91 while (gtk_events_pending())
92 gtk_main_iteration();
93
94 } 90 }
95 91
96 static void 92 static void
97 input_response_cb(GtkDialog *dialog, gint id, GaimGtkRequestData *data) 93 input_response_cb(GtkDialog *dialog, gint id, GaimGtkRequestData *data)
98 { 94 {
1394 if (id == 1) { 1390 if (id == 1) {
1395 if (data->cbs[1] != NULL) 1391 if (data->cbs[1] != NULL)
1396 ((GaimRequestFileCb)data->cbs[1])(data->user_data, data->u.file.name); 1392 ((GaimRequestFileCb)data->cbs[1])(data->user_data, data->u.file.name);
1397 gaim_request_close(data->type, data); 1393 gaim_request_close(data->type, data);
1398 } else { 1394 } else {
1399 gdk_window_set_cursor(GTK_WIDGET(data->dialog)->window, NULL); 1395 gaim_gtk_clear_cursor(GTK_WIDGET(data->dialog));
1400 } 1396 }
1401 } 1397 }
1402 1398
1403 #if GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */ 1399 #if GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */
1404 static void 1400 static void