comparison libpurple/protocols/novell/novell.c @ 15462:0b6f337a46d5

Emblems in the blist
author Sean Egan <seanegan@gmail.com>
date Tue, 30 Jan 2007 06:53:23 +0000
parents 5fe8042783c1
children 32c366eeeb99
comparison
equal deleted inserted replaced
15461:e9c12873fae0 15462:0b6f337a46d5
2781 _check_for_disconnect(user, rc); 2781 _check_for_disconnect(user, rc);
2782 } 2782 }
2783 } 2783 }
2784 } 2784 }
2785 2785
2786 static void
2787 novell_list_emblems(GaimBuddy * buddy, const char **se, const char **sw, const char **nw, const char **ne)
2788 {
2789 NMUserRecord *user_record = NULL;
2790 GaimConnection *gc;
2791 NMUser *user;
2792 int status = 0;
2793
2794 gc = gaim_account_get_connection(buddy->account);
2795
2796 if (gc == NULL || (user = gc->proto_data) == NULL)
2797 return;
2798
2799 user_record = nm_find_user_record(user, buddy->name);
2800
2801 if (user_record)
2802 status = nm_user_record_get_status(user_record);
2803
2804 switch (status) {
2805 case NM_STATUS_AVAILABLE:
2806 *se = "";
2807 break;
2808 case NM_STATUS_AWAY:
2809 *se = "away";
2810 break;
2811 case NM_STATUS_BUSY:
2812 *se = "occupied";
2813 break;
2814 case NM_STATUS_UNKNOWN:
2815 *se = "error";
2816 break;
2817 }
2818 }
2819
2820 static const char * 2786 static const char *
2821 novell_list_icon(GaimAccount * account, GaimBuddy * buddy) 2787 novell_list_icon(GaimAccount * account, GaimBuddy * buddy)
2822 { 2788 {
2823 return "novell"; 2789 return "novell";
2824 } 2790 }
3470 0, 3436 0,
3471 NULL, /* user_splits */ 3437 NULL, /* user_splits */
3472 NULL, /* protocol_options */ 3438 NULL, /* protocol_options */
3473 NO_BUDDY_ICONS, /* icon_spec */ 3439 NO_BUDDY_ICONS, /* icon_spec */
3474 novell_list_icon, /* list_icon */ 3440 novell_list_icon, /* list_icon */
3475 novell_list_emblems, /* list_emblems */ 3441 NULL, /* list_emblems */
3476 novell_status_text, /* status_text */ 3442 novell_status_text, /* status_text */
3477 novell_tooltip_text, /* tooltip_text */ 3443 novell_tooltip_text, /* tooltip_text */
3478 novell_status_types, /* status_types */ 3444 novell_status_types, /* status_types */
3479 novell_blist_node_menu, /* blist_node_menu */ 3445 novell_blist_node_menu, /* blist_node_menu */
3480 NULL, /* chat_info */ 3446 NULL, /* chat_info */