Mercurial > pidgin
comparison src/gtkpounce.c @ 10250:89a25444401c
[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 <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 23 Nov 2004 06:37:42 +0000 |
parents | a66cf83552dc |
children | 5879593a6a10 |
comparison
equal
deleted
inserted
replaced
10249:a7c8a8735a31 | 10250:89a25444401c |
---|---|
826 { | 826 { |
827 GtkWidget *image; | 827 GtkWidget *image; |
828 GtkWidget *item; | 828 GtkWidget *item; |
829 GdkPixbuf *pixbuf, *scale; | 829 GdkPixbuf *pixbuf, *scale; |
830 GaimPounce *pounce; | 830 GaimPounce *pounce; |
831 const char *buddy; | 831 GaimBuddy *buddy; |
832 const char *buddyname; | |
832 gboolean has_items = FALSE; | 833 gboolean has_items = FALSE; |
833 GList *bp; | 834 GList *bp; |
834 | 835 |
835 for (bp = gaim_pounces_get_all(); bp != NULL; bp = bp->next) | 836 for (bp = gaim_pounces_get_all(); bp != NULL; bp = bp->next) |
836 { | 837 { |
837 pounce = (GaimPounce *)bp->data; | 838 pounce = (GaimPounce *)bp->data; |
838 buddy = gaim_buddy_get_contact_alias(gaim_find_buddy(gaim_pounce_get_pouncer(pounce), gaim_pounce_get_pouncee(pounce))); | |
839 | 839 |
840 /* Check if account is online, if not skip it */ | 840 /* Check if account is online, if not skip it */ |
841 if (!gaim_account_is_connected(pounce->pouncer)) | 841 if (!gaim_account_is_connected(gaim_pounce_get_pouncer(pounce))) |
842 continue; | 842 continue; |
843 | 843 |
844 buddy = gaim_find_buddy(gaim_pounce_get_pouncer(pounce), gaim_pounce_get_pouncee(pounce)); | |
845 | |
846 if (buddy != NULL) | |
847 buddyname = gaim_buddy_get_contact_alias(buddy); | |
848 else | |
849 buddyname = gaim_pounce_get_pouncee(pounce); | |
850 | |
844 has_items = TRUE; | 851 has_items = TRUE; |
845 | 852 |
846 /* Build the menu item */ | 853 /* Build the menu item */ |
847 item = gtk_image_menu_item_new_with_label(buddy); | 854 item = gtk_image_menu_item_new_with_label(buddyname); |
848 | 855 |
849 /* Create a pixmap for the protocol icon. */ | 856 /* Create a pixmap for the protocol icon. */ |
850 pixbuf = create_prpl_icon(gaim_pounce_get_pouncer(pounce)); | 857 pixbuf = create_prpl_icon(gaim_pounce_get_pouncer(pounce)); |
851 if (pixbuf != NULL) | 858 if (pixbuf != NULL) |
852 { | 859 { |