Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
12231:c342eb6e8cd3 | 12232:375f1f3817a8 |
---|---|
947 menu_view_log_cb(gpointer data, guint action, GtkWidget *widget) | 947 menu_view_log_cb(gpointer data, guint action, GtkWidget *widget) |
948 { | 948 { |
949 GaimGtkWindow *win = data; | 949 GaimGtkWindow *win = data; |
950 GaimConversation *conv; | 950 GaimConversation *conv; |
951 GaimLogType type; | 951 GaimLogType type; |
952 GaimGtkBuddyList *gtkblist; | |
953 GdkCursor *cursor; | |
952 const char *name; | 954 const char *name; |
953 GaimAccount *account; | 955 GaimAccount *account; |
954 GSList *buddies, *cur; | 956 GSList *buddies; |
957 GSList *cur; | |
955 | 958 |
956 conv = gaim_gtk_conv_window_get_active_conversation(win); | 959 conv = gaim_gtk_conv_window_get_active_conversation(win); |
957 | 960 |
958 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) | 961 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) |
959 type = GAIM_LOG_IM; | 962 type = GAIM_LOG_IM; |
960 else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) | 963 else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) |
961 type = GAIM_LOG_CHAT; | 964 type = GAIM_LOG_CHAT; |
962 else | 965 else |
963 return; | 966 return; |
967 | |
968 gtkblist = gaim_gtk_blist_get_default_gtk_blist(); | |
969 cursor = gdk_cursor_new(GDK_WATCH); | |
970 | |
971 gdk_window_set_cursor(gtkblist->window->window, cursor); | |
972 gdk_window_set_cursor(win->window->window, cursor); | |
973 gdk_cursor_unref(cursor); | |
974 while (gtk_events_pending()) | |
975 gtk_main_iteration(); | |
964 | 976 |
965 name = gaim_conversation_get_name(conv); | 977 name = gaim_conversation_get_name(conv); |
966 account = gaim_conversation_get_account(conv); | 978 account = gaim_conversation_get_account(conv); |
967 | 979 |
968 buddies = gaim_find_buddies(account, name); | 980 buddies = gaim_find_buddies(account, name); |
971 GaimBlistNode *node = cur->data; | 983 GaimBlistNode *node = cur->data; |
972 if ((node != NULL) && ((node->prev != NULL) || (node->next != NULL))) | 984 if ((node != NULL) && ((node->prev != NULL) || (node->next != NULL))) |
973 { | 985 { |
974 gaim_gtk_log_show_contact((GaimContact *)node->parent); | 986 gaim_gtk_log_show_contact((GaimContact *)node->parent); |
975 g_slist_free(buddies); | 987 g_slist_free(buddies); |
988 gdk_window_set_cursor(gtkblist->window->window, NULL); | |
989 gdk_window_set_cursor(win->window->window, NULL); | |
976 return; | 990 return; |
977 } | 991 } |
978 } | 992 } |
979 g_slist_free(buddies); | 993 g_slist_free(buddies); |
980 | 994 |
981 gaim_gtk_log_show(type, name, account); | 995 gaim_gtk_log_show(type, name, account); |
996 | |
997 gdk_window_set_cursor(gtkblist->window->window, NULL); | |
998 gdk_window_set_cursor(win->window->window, NULL); | |
982 } | 999 } |
983 | 1000 |
984 static void | 1001 static void |
985 menu_clear_cb(gpointer data, guint action, GtkWidget *widget) | 1002 menu_clear_cb(gpointer data, guint action, GtkWidget *widget) |
986 { | 1003 { |
1840 /* If ALT (or whatever) was held down... */ | 1857 /* If ALT (or whatever) was held down... */ |
1841 else if (event->state & GDK_MOD1_MASK) | 1858 else if (event->state & GDK_MOD1_MASK) |
1842 { | 1859 { |
1843 if (event->keyval > '0' && event->keyval <= '9') | 1860 if (event->keyval > '0' && event->keyval <= '9') |
1844 { | 1861 { |
1845 int switchto = event->keyval - '1'; | 1862 guint switchto = event->keyval - '1'; |
1846 if (switchto < gaim_gtk_conv_window_get_gtkconv_count(win)) | 1863 if (switchto < gaim_gtk_conv_window_get_gtkconv_count(win)) |
1847 gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), switchto); | 1864 gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), switchto); |
1848 | 1865 |
1849 return TRUE; | 1866 return TRUE; |
1850 } | 1867 } |