comparison src/multi.c @ 2662:b0c5770156e1

[gaim-migrate @ 2675] everything changed! not really. actually to be quite honest nothing changed. it's really bad that all of these files use prpl references. most of them shouldn't. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 02 Nov 2001 01:41:37 +0000
parents 5e9a033f04fa
children 7cdf02a9bc0e
comparison
equal deleted inserted replaced
2661:5e9a033f04fa 2662:b0c5770156e1
101 g = g_slist_remove(g, m); 101 g = g_slist_remove(g, m);
102 h = m->members; 102 h = m->members;
103 while (h) { 103 while (h) {
104 n = (struct buddy *)h->data; 104 n = (struct buddy *)h->data;
105 if (gc->prpl->buddy_free) 105 if (gc->prpl->buddy_free)
106 (*gc->prpl->buddy_free)(n); 106 gc->prpl->buddy_free(n);
107 h = g_slist_remove(h, n); 107 h = g_slist_remove(h, n);
108 g_free(n); 108 g_free(n);
109 } 109 }
110 g_free(m); 110 g_free(m);
111 } 111 }
148 148
149 static char *proto_name(int proto) 149 static char *proto_name(int proto)
150 { 150 {
151 struct prpl *p = find_prpl(proto); 151 struct prpl *p = find_prpl(proto);
152 if (p && p->name) 152 if (p && p->name)
153 return (*p->name)(); 153 return p->name();
154 else 154 else
155 return "Unknown"; 155 return "Unknown";
156 } 156 }
157 157
158 void regenerate_user_list() 158 void regenerate_user_list()
355 if (e->protocol == u->protocol) 355 if (e->protocol == u->protocol)
356 found = TRUE; 356 found = TRUE;
357 if (!found) 357 if (!found)
358 count++; 358 count++;
359 if (e->name) 359 if (e->name)
360 opt = gtk_menu_item_new_with_label((*e->name)()); 360 opt = gtk_menu_item_new_with_label(e->name());
361 else 361 else
362 opt = gtk_menu_item_new_with_label("Unknown"); 362 opt = gtk_menu_item_new_with_label("Unknown");
363 gtk_object_set_user_data(GTK_OBJECT(opt), u); 363 gtk_object_set_user_data(GTK_OBJECT(opt), u);
364 gtk_signal_connect(GTK_OBJECT(opt), "activate", 364 gtk_signal_connect(GTK_OBJECT(opt), "activate",
365 GTK_SIGNAL_FUNC(set_prot), (void *)e->protocol); 365 GTK_SIGNAL_FUNC(set_prot), (void *)e->protocol);
604 return; 604 return;
605 605
606 if (!p->user_opts) 606 if (!p->user_opts)
607 return; 607 return;
608 608
609 tmp = op = (*p->user_opts)(); 609 tmp = op = p->user_opts();
610 610
611 if (!op) 611 if (!op)
612 return; 612 return;
613 613
614 g_snprintf(buf, sizeof(buf), "%s Options", (*p->name)()); 614 g_snprintf(buf, sizeof(buf), "%s Options", p->name());
615 u->proto_frame = gtk_frame_new(buf); 615 u->proto_frame = gtk_frame_new(buf);
616 gtk_box_pack_start(GTK_BOX(box), u->proto_frame, FALSE, FALSE, 0); 616 gtk_box_pack_start(GTK_BOX(box), u->proto_frame, FALSE, FALSE, 0);
617 gtk_widget_show(u->proto_frame); 617 gtk_widget_show(u->proto_frame);
618 618
619 vbox = gtk_vbox_new(FALSE, 5); 619 vbox = gtk_vbox_new(FALSE, 5);
1086 /* everything for the account editor */ 1086 /* everything for the account editor */
1087 if (!acctedit) 1087 if (!acctedit)
1088 return; 1088 return;
1089 i = gtk_clist_find_row_from_data(GTK_CLIST(list), gc->user); 1089 i = gtk_clist_find_row_from_data(GTK_CLIST(list), gc->user);
1090 gtk_clist_set_text(GTK_CLIST(list), i, 1, "Yes"); 1090 gtk_clist_set_text(GTK_CLIST(list), i, 1, "Yes");
1091 gtk_clist_set_text(GTK_CLIST(list), i, 3, (*gc->prpl->name)()); 1091 gtk_clist_set_text(GTK_CLIST(list), i, 3, gc->prpl->name());
1092 1092
1093 return; 1093 return;
1094 } 1094 }
1095 1095
1096 void account_offline(struct gaim_connection *gc) 1096 void account_offline(struct gaim_connection *gc)