Mercurial > pidgin
diff src/protocols/msn/msn.c @ 2170:c24595d3c364
[gaim-migrate @ 2180]
buddy_menu
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Mon, 27 Aug 2001 07:11:50 +0000 |
parents | b7807144bf44 |
children | 3a6fd1e8f00a |
line wrap: on
line diff
--- a/src/protocols/msn/msn.c Mon Aug 27 04:53:19 2001 +0000 +++ b/src/protocols/msn/msn.c Mon Aug 27 07:11:50 2001 +0000 @@ -1,7 +1,6 @@ #include "config.h" #include <stdlib.h> -#include <gtk/gtk.h> #include <string.h> #include <errno.h> #include <stdio.h> @@ -1321,20 +1320,24 @@ } } -static void msn_buddy_menu(GtkWidget *menu, struct gaim_connection *gc, char *who) +static GList *msn_buddy_menu(struct gaim_connection *gc, char *who) { + GList *m = NULL; + struct proto_buddy_menu *pbm; struct buddy *b = find_buddy(gc, who); - char buf[MSN_BUF_LEN]; - GtkWidget *button; + static char buf[MSN_BUF_LEN]; if (!b || !(b->uc >> 5)) - return; - - g_snprintf(buf, sizeof(buf), "Status: %s", msn_get_away_text(b->uc >> 5)); + return m; - button = gtk_menu_item_new_with_label(buf); - gtk_menu_append(GTK_MENU(menu), button); - gtk_widget_show(button); + pbm = g_new0(struct proto_buddy_menu, 1); + g_snprintf(buf, sizeof(buf), "Status: %s", msn_get_away_text(b->uc >> 5)); + pbm->label = buf; + pbm->callback = NULL; + pbm->gc = gc; + m = g_list_append(m, pbm); + + return m; } static void msn_add_buddy(struct gaim_connection *gc, char *who)