# HG changeset patch # User Mark Doliner # Date 1101191862 0 # Node ID 89a25444401c9f5b0c835e55ffcea1b97af0a79d # Parent a7c8a8735a31ce1873fec832cd722308ae09cbd9 [gaim-migrate @ 11390] Minor changes to the creation of the list of pounces in the blist: 1. If the account is not online then don't attempt to lookup the buddy or get the buddy's alias 2. If the buddy does not exist in your buddy list then don't attempt to get the buddy's alias--just use the screen name committer: Tailor Script diff -r a7c8a8735a31 -r 89a25444401c src/gtkpounce.c --- a/src/gtkpounce.c Tue Nov 23 06:28:01 2004 +0000 +++ b/src/gtkpounce.c Tue Nov 23 06:37:42 2004 +0000 @@ -828,23 +828,30 @@ GtkWidget *item; GdkPixbuf *pixbuf, *scale; GaimPounce *pounce; - const char *buddy; + GaimBuddy *buddy; + const char *buddyname; gboolean has_items = FALSE; GList *bp; for (bp = gaim_pounces_get_all(); bp != NULL; bp = bp->next) { pounce = (GaimPounce *)bp->data; - buddy = gaim_buddy_get_contact_alias(gaim_find_buddy(gaim_pounce_get_pouncer(pounce), gaim_pounce_get_pouncee(pounce))); /* Check if account is online, if not skip it */ - if (!gaim_account_is_connected(pounce->pouncer)) + if (!gaim_account_is_connected(gaim_pounce_get_pouncer(pounce))) continue; + buddy = gaim_find_buddy(gaim_pounce_get_pouncer(pounce), gaim_pounce_get_pouncee(pounce)); + + if (buddy != NULL) + buddyname = gaim_buddy_get_contact_alias(buddy); + else + buddyname = gaim_pounce_get_pouncee(pounce); + has_items = TRUE; /* Build the menu item */ - item = gtk_image_menu_item_new_with_label(buddy); + item = gtk_image_menu_item_new_with_label(buddyname); /* Create a pixmap for the protocol icon. */ pixbuf = create_prpl_icon(gaim_pounce_get_pouncer(pounce));