Mercurial > pidgin.yaz
diff src/gtkconv.c @ 12232:375f1f3817a8
[gaim-migrate @ 14534]
Displaying large logs is slow. Let's show the busy cursor whenever possible. This currently doesn't show the busy cursor over the IMHTMLs in a conversation window even though I set a busy cursor for the conversation window. I looked into fixing that, but I'm not sure exactly what the best way to deal with it is.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 27 Nov 2005 03:20:35 +0000 |
parents | 4d3119205a33 |
children | 36d3b1eaf20e |
line wrap: on
line diff
--- a/src/gtkconv.c Sun Nov 27 03:17:05 2005 +0000 +++ b/src/gtkconv.c Sun Nov 27 03:20:35 2005 +0000 @@ -949,9 +949,12 @@ GaimGtkWindow *win = data; GaimConversation *conv; GaimLogType type; + GaimGtkBuddyList *gtkblist; + GdkCursor *cursor; const char *name; GaimAccount *account; - GSList *buddies, *cur; + GSList *buddies; + GSList *cur; conv = gaim_gtk_conv_window_get_active_conversation(win); @@ -962,6 +965,15 @@ else return; + gtkblist = gaim_gtk_blist_get_default_gtk_blist(); + cursor = gdk_cursor_new(GDK_WATCH); + + gdk_window_set_cursor(gtkblist->window->window, cursor); + gdk_window_set_cursor(win->window->window, cursor); + gdk_cursor_unref(cursor); + while (gtk_events_pending()) + gtk_main_iteration(); + name = gaim_conversation_get_name(conv); account = gaim_conversation_get_account(conv); @@ -973,12 +985,17 @@ { gaim_gtk_log_show_contact((GaimContact *)node->parent); g_slist_free(buddies); + gdk_window_set_cursor(gtkblist->window->window, NULL); + gdk_window_set_cursor(win->window->window, NULL); return; } } g_slist_free(buddies); gaim_gtk_log_show(type, name, account); + + gdk_window_set_cursor(gtkblist->window->window, NULL); + gdk_window_set_cursor(win->window->window, NULL); } static void @@ -1842,7 +1859,7 @@ { if (event->keyval > '0' && event->keyval <= '9') { - int switchto = event->keyval - '1'; + guint switchto = event->keyval - '1'; if (switchto < gaim_gtk_conv_window_get_gtkconv_count(win)) gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), switchto);