comparison src/buddy.c @ 2778:27c22147e023

[gaim-migrate @ 2791] This will cure all that ails you. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 20 Nov 2001 06:53:45 +0000
parents 6e1ac8ceb3c4
children 8e0837d62ca0
comparison
equal deleted inserted replaced
2777:0899f8c99a15 2778:27c22147e023
281 remove_buddy_show(gs, bs); 281 remove_buddy_show(gs, bs);
282 g_free(bs->show); 282 g_free(bs->show);
283 g_free(bs->name); 283 g_free(bs->name);
284 g_free(bs); 284 g_free(bs);
285 } 285 }
286 update_num_group(gs);
286 } else { 287 } else {
287 gtk_label_set_text(GTK_LABEL(bs->label), b->show); 288 gtk_label_set_text(GTK_LABEL(bs->label), b->show);
288 update_idle_time(bs); 289 update_idle_time(bs);
289 } 290 }
290 } 291 }
817 if (gs) { 818 if (gs) {
818 bs = find_buddy_show(gs, rem_b->name); 819 bs = find_buddy_show(gs, rem_b->name);
819 if (bs) { 820 if (bs) {
820 if (g_slist_find(bs->connlist, gc)) { 821 if (g_slist_find(bs->connlist, gc)) {
821 bs->connlist = g_slist_remove(bs->connlist, gc); 822 bs->connlist = g_slist_remove(bs->connlist, gc);
823 update_num_group(gs);
822 if (!g_slist_length(bs->connlist)) { 824 if (!g_slist_length(bs->connlist)) {
823 gs->members = g_slist_remove(gs->members, bs); 825 gs->members = g_slist_remove(gs->members, bs);
824 if (bs->log_timer > 0) 826 if (bs->log_timer > 0)
825 gtk_timeout_remove(bs->log_timer); 827 gtk_timeout_remove(bs->log_timer);
826 bs->log_timer = 0; 828 bs->log_timer = 0;
832 (blist_options & OPT_BLIST_NO_MT_GRP)) { 834 (blist_options & OPT_BLIST_NO_MT_GRP)) {
833 shows = g_slist_remove(shows, gs); 835 shows = g_slist_remove(shows, gs);
834 gtk_tree_remove_item(GTK_TREE(buddies), gs->item); 836 gtk_tree_remove_item(GTK_TREE(buddies), gs->item);
835 g_free(gs->name); 837 g_free(gs->name);
836 g_free(gs); 838 g_free(gs);
837 } else 839 }
838 update_num_group(gs); 840 }
839 } else 841 }
840 update_num_group(gs); 842 }
841 } else
842 update_num_group(gs);
843 } else
844 update_num_group(gs);
845 } 843 }
846 844
847 c = find_conversation(rem_b->name); 845 c = find_conversation(rem_b->name);
848 if (c) 846 if (c)
849 update_buttons_by_protocol(c); 847 update_buttons_by_protocol(c);
961 uc)); 959 uc));
962 else 960 else
963 bs = new_buddy_show(gs, b, (char **)no_icon_xpm); 961 bs = new_buddy_show(gs, b, (char **)no_icon_xpm);
964 } 962 }
965 bs->connlist = g_slist_append(bs->connlist, gc); 963 bs->connlist = g_slist_append(bs->connlist, gc);
964 update_num_group(gs);
966 } 965 }
967 } 966 }
968 } 967 }
969 } 968 }
970 update_idle_times(); 969 update_idle_times();
2074 if (b->present) { 2073 if (b->present) {
2075 if ((gs = find_group_show(g->name)) == NULL) 2074 if ((gs = find_group_show(g->name)) == NULL)
2076 gs = new_group_show(g->name); 2075 gs = new_group_show(g->name);
2077 if ((bs = find_buddy_show(gs, b->name)) == NULL) 2076 if ((bs = find_buddy_show(gs, b->name)) == NULL)
2078 bs = new_buddy_show(gs, b, (char **)login_icon_xpm); 2077 bs = new_buddy_show(gs, b, (char **)login_icon_xpm);
2079 if (!g_slist_find(bs->connlist, gc)) 2078 if (!g_slist_find(bs->connlist, gc)) {
2080 bs->connlist = g_slist_append(bs->connlist, gc); 2079 bs->connlist = g_slist_append(bs->connlist, gc);
2080 update_num_group(gs);
2081 }
2081 if (b->present == 1) { 2082 if (b->present == 1) {
2082 if (bs->sound != 2) 2083 if (bs->sound != 2)
2083 play_sound(BUDDY_ARRIVE); 2084 play_sound(BUDDY_ARRIVE);
2084 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, 2085 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm,
2085 NULL, (char **)login_icon_xpm); 2086 NULL, (char **)login_icon_xpm);
2094 gdk_bitmap_unref(bm); 2095 gdk_bitmap_unref(bm);
2095 b->present = 2; 2096 b->present = 2;
2096 if (bs->log_timer > 0) 2097 if (bs->log_timer > 0)
2097 gtk_timeout_remove(bs->log_timer); 2098 gtk_timeout_remove(bs->log_timer);
2098 bs->log_timer = gtk_timeout_add(10000, (GtkFunction)log_timeout, bs); 2099 bs->log_timer = gtk_timeout_add(10000, (GtkFunction)log_timeout, bs);
2099 update_num_group(gs);
2100 if ((bs->sound != 2) && (im_options & OPT_IM_LOGON)) { 2100 if ((bs->sound != 2) && (im_options & OPT_IM_LOGON)) {
2101 struct conversation *c = find_conversation(b->name); 2101 struct conversation *c = find_conversation(b->name);
2102 if (c) { 2102 if (c) {
2103 char tmp[1024]; 2103 char tmp[1024];
2104 g_snprintf(tmp, sizeof(tmp), _("%s logged in."), b->name); 2104 g_snprintf(tmp, sizeof(tmp), _("%s logged in."), b->name);
2136 off */ 2136 off */
2137 if (bs->sound != 1) 2137 if (bs->sound != 1)
2138 play_sound(BUDDY_LEAVE); 2138 play_sound(BUDDY_LEAVE);
2139 2139
2140 bs->connlist = g_slist_remove(bs->connlist, gc); 2140 bs->connlist = g_slist_remove(bs->connlist, gc);
2141 update_num_group(gs);
2141 if (bs->log_timer > 0) 2142 if (bs->log_timer > 0)
2142 gtk_timeout_remove(bs->log_timer); 2143 gtk_timeout_remove(bs->log_timer);
2143 bs->log_timer = gtk_timeout_add(10000, (GtkFunction)log_timeout, bs); 2144 bs->log_timer = gtk_timeout_add(10000, (GtkFunction)log_timeout, bs);
2144 update_num_group(gs);
2145 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, logout_icon_xpm); 2145 pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, logout_icon_xpm);
2146 gtk_widget_hide(bs->pix); 2146 gtk_widget_hide(bs->pix);
2147 gtk_pixmap_set(GTK_PIXMAP(bs->pix), pm, bm); 2147 gtk_pixmap_set(GTK_PIXMAP(bs->pix), pm, bm);
2148 gtk_widget_show(bs->pix); 2148 gtk_widget_show(bs->pix);
2149 if (misc_options & OPT_MISC_BUDDY_TICKER) { 2149 if (misc_options & OPT_MISC_BUDDY_TICKER) {