GAIM Proposal # 2

Ben Miller
December 7, 2000


My second idea that I also later discovered was not original was to add buddy pounce to gaim. Buddy pounce is a feature that gives users the capability to send a message to a user as soon as they sign on. The buddy ounce is only saved for the current session then it is removed. There are two additions that could be added to this feature. One is to have the ability to save buddy pounces and the other is to allow users to also send sounds as pounces rather than just text. First I will show you the implementation of buddy pounce.

GList *buddy_pounces = NULL;

In aim.c

#include "pixmaps/pounce_small.xpm"
void rem_bp(GtkWidget *w, struct buddy_pounce *b)
buddy_pounces = g_list_remove(buddy_pounces, b);

void do_pounce(char *name)
struct buddy_pounce *b;
GList *bp = buddy_pounces;
b = (struct buddy_pounce *)bp->data;
struct buddy_pounce *b;
GList *bp = buddy_pounces;
b = (struct buddy_pounce *)bp->data
; bp = buddy_pounces;
b = (struct buddy_pounce *)bp->data;
gaim_new_item_with_pixmap(menu, _("Join A Chat"), pounce_small_xpm, GTK_SIGNAL_FUNC(chat_callback));
menuitem = gaim_new_item_with_pixmap(menu, _("Buddy Pounce"), pounce_small_xpm, NULL);

In buddy.c

/* The dialog for new buddy pounces */
struct buddy_pounce *bp = g_new0(struct buddy_pounce, 1);
buddy_pounces = g_list_append(buddy_pounces, bp);

In dialogs.c

struct buddy_pounce {
extern GList *buddy_pounces;
extern void do_pounce(char *);

In gaim.h

} else if (!strcmp(tag, "pounce")) {
static void gaimrc_read_pounce(FILE *f)
struct buddy_pounce *b;
b = g_new0(struct buddy_pounce, 1);
buddy_pounces = g_list_append(buddy_pounces, b);
static void gaimrc_write_pounce(FILE *f)
GList *pnc = buddy_pounces;
struct buddy_pounce *b;
fprintf(f, "pounce {\n");
b = (struct buddy_pounce *)pnc->data;
gaimrc_read_pounce(f);
gaimrc_write_pounce(f);

In gaimrc.c

do_pounce(b->name);