Mercurial > pidgin
comparison src/gtkblist.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 | df0e16ecfb2a |
children | 36d3b1eaf20e |
comparison
equal
deleted
inserted
replaced
12231:c342eb6e8cd3 | 12232:375f1f3817a8 |
---|---|
343 gaim_gtk_pounce_editor_show(b->account, b->name, NULL); | 343 gaim_gtk_pounce_editor_show(b->account, b->name, NULL); |
344 } | 344 } |
345 | 345 |
346 static void gtk_blist_menu_showlog_cb(GtkWidget *w, GaimBlistNode *node) | 346 static void gtk_blist_menu_showlog_cb(GtkWidget *w, GaimBlistNode *node) |
347 { | 347 { |
348 GdkCursor *cursor = gdk_cursor_new(GDK_WATCH); | |
348 GaimLogType type; | 349 GaimLogType type; |
349 GaimAccount *account; | 350 GaimAccount *account; |
350 char *name = NULL; | 351 char *name = NULL; |
352 | |
353 gdk_window_set_cursor(gtkblist->window->window, cursor); | |
354 gdk_cursor_unref(cursor); | |
355 while (gtk_events_pending()) | |
356 gtk_main_iteration(); | |
351 | 357 |
352 if (GAIM_BLIST_NODE_IS_BUDDY(node)) { | 358 if (GAIM_BLIST_NODE_IS_BUDDY(node)) { |
353 GaimBuddy *b = (GaimBuddy*) node; | 359 GaimBuddy *b = (GaimBuddy*) node; |
354 type = GAIM_LOG_IM; | 360 type = GAIM_LOG_IM; |
355 name = g_strdup(b->name); | 361 name = g_strdup(b->name); |
363 if (prpl_info && prpl_info->get_chat_name) { | 369 if (prpl_info && prpl_info->get_chat_name) { |
364 name = prpl_info->get_chat_name(c->components); | 370 name = prpl_info->get_chat_name(c->components); |
365 } | 371 } |
366 } else if (GAIM_BLIST_NODE_IS_CONTACT(node)) { | 372 } else if (GAIM_BLIST_NODE_IS_CONTACT(node)) { |
367 gaim_gtk_log_show_contact((GaimContact *)node); | 373 gaim_gtk_log_show_contact((GaimContact *)node); |
374 gdk_window_set_cursor(gtkblist->window->window, NULL); | |
368 return; | 375 return; |
369 } else | 376 } else { |
370 return; | 377 gdk_window_set_cursor(gtkblist->window->window, NULL); |
378 | |
379 /* This callback should not have been registered for a node | |
380 * that doesn't match the type of one of the blocks above. */ | |
381 g_return_if_reached(); | |
382 } | |
371 | 383 |
372 if (name && account) { | 384 if (name && account) { |
373 gaim_gtk_log_show(type, name, account); | 385 gaim_gtk_log_show(type, name, account); |
374 g_free(name); | 386 g_free(name); |
387 | |
388 gdk_window_set_cursor(gtkblist->window->window, NULL); | |
375 } | 389 } |
376 } | 390 } |
377 | 391 |
378 static void gtk_blist_show_systemlog_cb() | 392 static void gtk_blist_show_systemlog_cb() |
379 { | 393 { |
1370 | 1384 |
1371 gaim_prefs_set_bool("/gaim/gtk/blist/show_offline_buddies", | 1385 gaim_prefs_set_bool("/gaim/gtk/blist/show_offline_buddies", |
1372 gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(checkitem))); | 1386 gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(checkitem))); |
1373 | 1387 |
1374 if(gtkblist->window->window) { | 1388 if(gtkblist->window->window) { |
1375 GdkCursor *cursor = gdk_cursor_new(GDK_LEFT_PTR); | 1389 gdk_window_set_cursor(gtkblist->window->window, NULL); |
1376 gdk_window_set_cursor(gtkblist->window->window, cursor); | |
1377 gdk_cursor_unref(cursor); | |
1378 } | 1390 } |
1379 } | 1391 } |
1380 | 1392 |
1381 static void gaim_gtk_blist_mute_sounds_cb(gpointer data, guint action, GtkWidget *item) | 1393 static void gaim_gtk_blist_mute_sounds_cb(gpointer data, guint action, GtkWidget *item) |
1382 { | 1394 { |