comparison src/buddy.c @ 94:9f6ce50ffb78

[gaim-migrate @ 104] Woohoo, the landing of the plugins. Nearly everything necessary is here. The only thing missing is that you can't load a plugin without signing on first (at least, not without some trickery). committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sun, 09 Apr 2000 11:18:25 +0000
parents f5b305c0d974
children 55faf2e3a134
comparison
equal deleted inserted replaced
93:5ca21b68eb29 94:9f6ce50ffb78
302 302
303 extern enum gaim_user_states MRI_user_status; 303 extern enum gaim_user_states MRI_user_status;
304 void signoff() 304 void signoff()
305 { 305 {
306 GList *mem; 306 GList *mem;
307
308 #ifdef GAIM_PLUGINS
309 GList *c = callbacks;
310 struct gaim_callback *g;
311 void (*function)(void *);
312 while (c) {
313 g = (struct gaim_callback *)c->data;
314 if (g->event == event_signoff && g->function != NULL) {
315 function = g->function;
316 (*function)(g->data);
317 }
318 c = c->next;
319 }
320 #endif
321
307 while(groups) { 322 while(groups) {
308 mem = ((struct group *)groups->data)->members; 323 mem = ((struct group *)groups->data)->members;
309 while(mem) { 324 while(mem) {
310 g_free(mem->data); 325 g_free(mem->data);
311 mem = g_list_remove(mem, mem->data); 326 mem = g_list_remove(mem, mem->data);
1357 g_free(itime); 1372 g_free(itime);
1358 1373
1359 1374
1360 1375
1361 if (!GTK_WIDGET_VISIBLE(b->item)) { 1376 if (!GTK_WIDGET_VISIBLE(b->item)) {
1377 #ifdef GAIM_PLUGINS
1378 GList *c = callbacks;
1379 struct gaim_callback *g;
1380 void (*function)(char *, void *);
1381 while (c) {
1382 g = (struct gaim_callback *)c->data;
1383 if (g->event == event_buddy_signon &&
1384 g->function != NULL) {
1385 function = g->function;
1386 (*function)(b->name, g->data);
1387 }
1388 c = c->next;
1389 }
1390 #endif
1362 1391
1363 play_sound(BUDDY_ARRIVE); 1392 play_sound(BUDDY_ARRIVE);
1364 1393
1365 who = g_malloc(sizeof(b->name) + 10); 1394 who = g_malloc(sizeof(b->name) + 10);
1366 strcpy(who, b->name); 1395 strcpy(who, b->name);
1435 1464
1436 1465
1437 1466
1438 } else { 1467 } else {
1439 if (GTK_WIDGET_VISIBLE(b->item)) { 1468 if (GTK_WIDGET_VISIBLE(b->item)) {
1469 #ifdef GAIM_PLUGINS
1470 GList *c = callbacks;
1471 struct gaim_callback *g;
1472 void (*function)(char *, void *);
1473 while (c) {
1474 g = (struct gaim_callback *)c->data;
1475 if (g->event == event_buddy_signoff &&
1476 g->function != NULL) {
1477 function = g->function;
1478 (*function)(b->name, g->data);
1479 }
1480 c = c->next;
1481 }
1482 #endif
1440 play_sound(BUDDY_LEAVE); 1483 play_sound(BUDDY_LEAVE);
1441 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, 1484 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm,
1442 NULL, (gchar **)logout_icon_xpm); 1485 NULL, (gchar **)logout_icon_xpm);
1443 gtk_widget_hide(b->pix); 1486 gtk_widget_hide(b->pix);
1444 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm); 1487 gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm);