Mercurial > pidgin
comparison src/multi.c @ 3572:bdd0bebd2d04
[gaim-migrate @ 3670]
Phase II. No longer do you have to worry about protocol plugins. When
Gaim probes plugins on load, it will detect protocol plugins and add them
to the list of available protocols. When you try to log an account on with
one of them, Gaim will automatically load the plugin--when no more accounts
need the protocol--Gaim will automatically unload it. Protocol plugins are
no longer available in the plugins ui, and no protocols are compiled statically
by default.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 30 Sep 2002 01:05:18 +0000 |
parents | b791019b2492 |
children | 9682c0e022c6 |
comparison
equal
deleted
inserted
replaced
3571:a88c62c5b7da | 3572:bdd0bebd2d04 |
---|---|
153 | 153 |
154 static char *proto_name(int proto) | 154 static char *proto_name(int proto) |
155 { | 155 { |
156 struct prpl *p = find_prpl(proto); | 156 struct prpl *p = find_prpl(proto); |
157 if (p && p->name) | 157 if (p && p->name) |
158 return p->name(); | 158 return p->name; |
159 else | 159 else |
160 return "Unknown"; | 160 return "Unknown"; |
161 } | 161 } |
162 | 162 |
163 | 163 |
394 if (e->protocol == u->protocol) | 394 if (e->protocol == u->protocol) |
395 found = TRUE; | 395 found = TRUE; |
396 if (!found) | 396 if (!found) |
397 count++; | 397 count++; |
398 if (e->name) | 398 if (e->name) |
399 opt = gtk_menu_item_new_with_label(e->name()); | 399 opt = gtk_menu_item_new_with_label(e->name); |
400 else | 400 else |
401 opt = gtk_menu_item_new_with_label("Unknown"); | 401 opt = gtk_menu_item_new_with_label("Unknown"); |
402 gtk_object_set_user_data(GTK_OBJECT(opt), u); | 402 gtk_object_set_user_data(GTK_OBJECT(opt), u); |
403 gtk_signal_connect(GTK_OBJECT(opt), "activate", | 403 gtk_signal_connect(GTK_OBJECT(opt), "activate", |
404 GTK_SIGNAL_FUNC(set_prot), (void *)e->protocol); | 404 GTK_SIGNAL_FUNC(set_prot), (void *)e->protocol); |
653 return; | 653 return; |
654 | 654 |
655 if (!p->user_opts) | 655 if (!p->user_opts) |
656 return; | 656 return; |
657 | 657 |
658 tmp = op = p->user_opts(); | 658 tmp = op = p->user_opts; |
659 | 659 |
660 if (!op) | 660 if (!op) |
661 return; | 661 return; |
662 | 662 |
663 g_snprintf(buf, sizeof(buf), "%s Options", p->name()); | 663 g_snprintf(buf, sizeof(buf), "%s Options", p->name); |
664 u->proto_frame = gtk_frame_new(buf); | 664 u->proto_frame = gtk_frame_new(buf); |
665 gtk_box_pack_start(GTK_BOX(box), u->proto_frame, FALSE, FALSE, 0); | 665 gtk_box_pack_start(GTK_BOX(box), u->proto_frame, FALSE, FALSE, 0); |
666 gtk_widget_show(u->proto_frame); | 666 gtk_widget_show(u->proto_frame); |
667 | 667 |
668 vbox = gtk_vbox_new(FALSE, 5); | 668 vbox = gtk_vbox_new(FALSE, 5); |
691 gtk_entry_set_text(GTK_ENTRY(entry), puo->def); | 691 gtk_entry_set_text(GTK_ENTRY(entry), puo->def); |
692 } | 692 } |
693 gtk_widget_show(entry); | 693 gtk_widget_show(entry); |
694 | 694 |
695 u->opt_entries = g_list_append(u->opt_entries, entry); | 695 u->opt_entries = g_list_append(u->opt_entries, entry); |
696 | 696 |
697 g_free(puo); | |
698 op = op->next; | 697 op = op->next; |
699 } | 698 } |
700 | 699 |
701 if(p->register_user != NULL) { | 700 if(p->register_user != NULL) { |
702 u->register_user = gtk_check_button_new_with_label(_("Register with server")); | 701 u->register_user = gtk_check_button_new_with_label(_("Register with server")); |
703 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(u->register_user), FALSE); | 702 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(u->register_user), FALSE); |
704 gtk_box_pack_start(GTK_BOX(vbox), u->register_user, FALSE, FALSE, 0); | 703 gtk_box_pack_start(GTK_BOX(vbox), u->register_user, FALSE, FALSE, 0); |
705 gtk_widget_show(u->register_user); | 704 gtk_widget_show(u->register_user); |
706 } | 705 } |
707 | 706 |
708 g_list_free(tmp); | |
709 } | 707 } |
710 | 708 |
711 static void show_acct_mod(struct aim_user *a) | 709 static void show_acct_mod(struct aim_user *a) |
712 { | 710 { |
713 /* This is the fucking modify account dialog. I've fucking seperated it into | 711 /* This is the fucking modify account dialog. I've fucking seperated it into |
1164 /* everything for the account editor */ | 1162 /* everything for the account editor */ |
1165 if (!acctedit) | 1163 if (!acctedit) |
1166 return; | 1164 return; |
1167 i = gtk_clist_find_row_from_data(GTK_CLIST(list), gc->user); | 1165 i = gtk_clist_find_row_from_data(GTK_CLIST(list), gc->user); |
1168 gtk_clist_set_text(GTK_CLIST(list), i, 1, "Yes"); | 1166 gtk_clist_set_text(GTK_CLIST(list), i, 1, "Yes"); |
1169 gtk_clist_set_text(GTK_CLIST(list), i, 3, gc->prpl->name()); | 1167 gtk_clist_set_text(GTK_CLIST(list), i, 3, gc->prpl->name); |
1170 | 1168 |
1171 return; | 1169 return; |
1172 } | 1170 } |
1173 | 1171 |
1174 void account_offline(struct gaim_connection *gc) | 1172 void account_offline(struct gaim_connection *gc) |
1322 | 1320 |
1323 meter = register_meter(gc, GTK_WIDGET (meter_win->window), GTK_TABLE (meter_win->table), (gint *) &meter_win->rows); | 1321 meter = register_meter(gc, GTK_WIDGET (meter_win->window), GTK_TABLE (meter_win->table), (gint *) &meter_win->rows); |
1324 meter->gc = gc; | 1322 meter->gc = gc; |
1325 meters = g_slist_append(meters, meter); | 1323 meters = g_slist_append(meters, meter); |
1326 | 1324 |
1327 g_snprintf(buf, sizeof(buf), "%s Signing On (using %s)", gc->username, gc->prpl->name()); | 1325 g_snprintf(buf, sizeof(buf), "%s Signing On (using %s)", gc->username, gc->prpl->name); |
1328 } | 1326 } |
1329 | 1327 |
1330 gtk_progress_bar_update(GTK_PROGRESS_BAR(meter->progress), howfar / LOGIN_STEPS); | 1328 gtk_progress_bar_update(GTK_PROGRESS_BAR(meter->progress), howfar / LOGIN_STEPS); |
1331 gtk_statusbar_pop(GTK_STATUSBAR(meter->status), 1); | 1329 gtk_statusbar_pop(GTK_STATUSBAR(meter->status), 1); |
1332 gtk_statusbar_push(GTK_STATUSBAR(meter->status), 1, message); | 1330 gtk_statusbar_push(GTK_STATUSBAR(meter->status), 1, message); |