Mercurial > pidgin
comparison src/gtkplugin.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 | 71fbe885c50b |
| children | 5f6d2b22c18e |
comparison
equal
deleted
inserted
replaced
| 13433:7ef6a2d0d9da | 13434:ffd724befbf8 |
|---|---|
| 253 return; | 253 return; |
| 254 } | 254 } |
| 255 | 255 |
| 256 if (!gaim_plugin_is_loaded(plug)) | 256 if (!gaim_plugin_is_loaded(plug)) |
| 257 { | 257 { |
| 258 GdkCursor *wait = gdk_cursor_new (GDK_WATCH); | 258 gaim_gtk_set_cursor(plugin_dialog, GDK_WATCH); |
| 259 gdk_window_set_cursor(plugin_dialog->window, wait); | |
| 260 gdk_cursor_unref(wait); | |
| 261 | 259 |
| 262 gaim_plugin_load(plug); | 260 gaim_plugin_load(plug); |
| 263 plugin_toggled_stage_two(plug, model, iter, FALSE); | 261 plugin_toggled_stage_two(plug, model, iter, FALSE); |
| 264 | 262 |
| 265 gdk_window_set_cursor(plugin_dialog->window, NULL); | 263 gaim_gtk_clear_cursor(plugin_dialog); |
| 266 } | 264 } |
| 267 else | 265 else |
| 268 { | 266 { |
| 269 if (plugin_pref_dialogs != NULL && | 267 if (plugin_pref_dialogs != NULL && |
| 270 (dialog = g_hash_table_lookup(plugin_pref_dialogs, plug))) | 268 (dialog = g_hash_table_lookup(plugin_pref_dialogs, plug))) |
| 307 gchar *name = NULL; | 305 gchar *name = NULL; |
| 308 gchar *description = NULL; | 306 gchar *description = NULL; |
| 309 | 307 |
| 310 if (unload) | 308 if (unload) |
| 311 { | 309 { |
| 312 GdkCursor *wait = gdk_cursor_new (GDK_WATCH); | 310 gaim_gtk_set_cursor(plugin_dialog, GDK_WATCH); |
| 313 gdk_window_set_cursor(plugin_dialog->window, wait); | |
| 314 gdk_cursor_unref(wait); | |
| 315 | 311 |
| 316 gaim_plugin_unload(plug); | 312 gaim_plugin_unload(plug); |
| 317 | 313 |
| 318 gdk_window_set_cursor(plugin_dialog->window, NULL); | 314 gaim_gtk_clear_cursor(plugin_dialog); |
| 319 } | 315 } |
| 320 | 316 |
| 321 gtk_widget_set_sensitive(pref_button, | 317 gtk_widget_set_sensitive(pref_button, |
| 322 gaim_plugin_is_loaded(plug) | 318 gaim_plugin_is_loaded(plug) |
| 323 && ((GAIM_IS_GTK_PLUGIN(plug) && plug->info->ui_info | 319 && ((GAIM_IS_GTK_PLUGIN(plug) && plug->info->ui_info |
