Mercurial > pidgin
comparison src/buddy.c @ 1077:7221054ad2b1
[gaim-migrate @ 1087]
if this doesn't fix a problem i've never seen, then someone else can fix it.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 08 Nov 2000 11:40:11 +0000 |
parents | 2fe18b2d6105 |
children | efcacae6acdb |
comparison
equal
deleted
inserted
replaced
1076:58b98132b4a6 | 1077:7221054ad2b1 |
---|---|
151 while (s) { | 151 while (s) { |
152 g = (struct group_show *)s->data; | 152 g = (struct group_show *)s->data; |
153 if (!g_slist_length(g->members)) { | 153 if (!g_slist_length(g->members)) { |
154 shows = g_slist_remove(shows, g); | 154 shows = g_slist_remove(shows, g); |
155 s = shows; | 155 s = shows; |
156 gtk_widget_destroy(g->item); | 156 gtk_container_remove(GTK_CONTAINER(buddies), g->item); |
157 g_free(g->name); | 157 g_free(g->name); |
158 g_free(g); | 158 g_free(g); |
159 } else | 159 } else |
160 s = g_slist_next(s); | 160 s = g_slist_next(s); |
161 } | 161 } |
271 b = (struct buddy_show *)m->data; | 271 b = (struct buddy_show *)m->data; |
272 if (g_slist_length(b->connlist) == 1 && b->connlist->data == gc) { | 272 if (g_slist_length(b->connlist) == 1 && b->connlist->data == gc) { |
273 if (b->log_timer > 0) | 273 if (b->log_timer > 0) |
274 gtk_timeout_remove(b->log_timer); | 274 gtk_timeout_remove(b->log_timer); |
275 b->connlist = g_slist_remove(b->connlist, gc); | 275 b->connlist = g_slist_remove(b->connlist, gc); |
276 gtk_widget_destroy(b->item); | 276 gtk_container_remove(GTK_CONTAINER(g->tree), b->item); |
277 g->members = g_slist_remove(g->members, b); | 277 g->members = g_slist_remove(g->members, b); |
278 if (g->members == NULL) { | 278 if (g->members == NULL) { |
279 shows = g_slist_remove(shows, g); | 279 shows = g_slist_remove(shows, g); |
280 gtk_widget_destroy(g->item); | 280 gtk_container_remove(GTK_CONTAINER(buddies), g->item); |
281 g_free(g->name); | 281 g_free(g->name); |
282 g_free(g); | 282 g_free(g); |
283 m = NULL; | 283 m = NULL; |
284 remove_group = TRUE; | 284 remove_group = TRUE; |
285 } else | 285 } else |
492 update_num_group(gs); | 492 update_num_group(gs); |
493 if (!g_slist_length(bs->connlist)) { | 493 if (!g_slist_length(bs->connlist)) { |
494 gs->members = g_slist_remove(gs->members, bs); | 494 gs->members = g_slist_remove(gs->members, bs); |
495 if (bs->log_timer > 0) | 495 if (bs->log_timer > 0) |
496 gtk_timeout_remove(bs->log_timer); | 496 gtk_timeout_remove(bs->log_timer); |
497 gtk_widget_destroy(bs->item); | 497 gtk_container_remove(GTK_CONTAINER(gs->tree), bs->item); |
498 g_free(bs->show); | 498 g_free(bs->show); |
499 g_free(bs->name); | 499 g_free(bs->name); |
500 g_free(bs); | 500 g_free(bs); |
501 if (!g_slist_length(gs->members)) { | 501 if (!g_slist_length(gs->members)) { |
502 shows = g_slist_remove(shows, gs); | 502 shows = g_slist_remove(shows, gs); |
503 gtk_widget_destroy(gs->item); | 503 gtk_container_remove(GTK_CONTAINER(buddies), gs->item); |
504 g_free(gs->name); | 504 g_free(gs->name); |
505 g_free(gs); | 505 g_free(gs); |
506 } | 506 } |
507 } | 507 } |
508 } | 508 } |
535 GSList *grp; | 535 GSList *grp; |
536 GSList *mem; | 536 GSList *mem; |
537 | 537 |
538 struct group *delg; | 538 struct group *delg; |
539 struct buddy *delb; | 539 struct buddy *delb; |
540 | |
541 struct conversation *c; | |
542 | 540 |
543 /* we assume that the group actually does exist within the gc, and that the gc is not NULL. | 541 /* we assume that the group actually does exist within the gc, and that the gc is not NULL. |
544 * the UI is responsible for this */ | 542 * the UI is responsible for this */ |
545 | 543 |
546 grp = g_slist_find(gc->groups, rem_g); | 544 grp = g_slist_find(gc->groups, rem_g); |
1526 | 1524 |
1527 static int log_timeout(struct buddy_show *b) { | 1525 static int log_timeout(struct buddy_show *b) { |
1528 if (!b->connlist) { | 1526 if (!b->connlist) { |
1529 struct group_show *g = find_gs_by_bs(b); | 1527 struct group_show *g = find_gs_by_bs(b); |
1530 g->members = g_slist_remove(g->members, b); | 1528 g->members = g_slist_remove(g->members, b); |
1531 gtk_widget_destroy(b->item); | 1529 gtk_container_remove(GTK_CONTAINER(g->tree), b->item); |
1532 if (g->members == NULL && (display_options & OPT_DISP_NO_MT_GRP)) { | 1530 if (g->members == NULL && (display_options & OPT_DISP_NO_MT_GRP)) { |
1533 shows = g_slist_remove(shows, g); | 1531 shows = g_slist_remove(shows, g); |
1534 gtk_widget_destroy(g->item); | 1532 gtk_container_remove(GTK_CONTAINER(buddies), g->item); |
1535 g_free(g->name); | 1533 g_free(g->name); |
1536 g_free(g); | 1534 g_free(g); |
1537 } | 1535 } |
1538 g_free(b->name); | 1536 g_free(b->name); |
1539 g_free(b->show); | 1537 g_free(b->show); |
1604 /* this also updates the tooltip since that has idle time in it */ | 1602 /* this also updates the tooltip since that has idle time in it */ |
1605 char idlet[16]; | 1603 char idlet[16]; |
1606 time_t t; | 1604 time_t t; |
1607 int ihrs, imin; | 1605 int ihrs, imin; |
1608 struct buddy *b; | 1606 struct buddy *b; |
1609 GSList *c; | |
1610 | 1607 |
1611 char infotip[256]; | 1608 char infotip[256]; |
1612 char warn[256]; | 1609 char warn[256]; |
1613 char caps[256]; | 1610 char caps[256]; |
1614 char *sotime, *itime; | 1611 char *sotime, *itime; |
1670 void update_idle_times() { | 1667 void update_idle_times() { |
1671 GSList *grp = shows; | 1668 GSList *grp = shows; |
1672 GSList *mem; | 1669 GSList *mem; |
1673 struct buddy_show *b; | 1670 struct buddy_show *b; |
1674 struct group_show *g; | 1671 struct group_show *g; |
1675 struct buddy *bud; | |
1676 time_t t; | |
1677 char idlet[16]; | |
1678 int ihrs, imin; | |
1679 | 1672 |
1680 while (grp) { | 1673 while (grp) { |
1681 g = (struct group_show *)grp->data; | 1674 g = (struct group_show *)grp->data; |
1682 mem = g->members; | 1675 mem = g->members; |
1683 while (mem) { | 1676 while (mem) { |