# HG changeset patch # User Eric Warmenhoven # Date 973069637 0 # Node ID 17cea517fd90f2b3f26f2efcc3b4fd1efc973c66 # Parent 67ed2ee5be9fb76e0141892d974389f40abd6897 [gaim-migrate @ 1050] if a new protocol wants to be loaded, load it. nothing wrong with that. committer: Tailor Script diff -r 67ed2ee5be9f -r 17cea517fd90 src/dialogs.c --- a/src/dialogs.c Tue Oct 31 19:34:57 2000 +0000 +++ b/src/dialogs.c Wed Nov 01 09:07:17 2000 +0000 @@ -3278,6 +3278,7 @@ gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5); gtk_box_pack_start(GTK_BOX(topbox), aliasentry, FALSE, FALSE, 5); + gtk_entry_set_editable(GTK_ENTRY(aliasentry), FALSE); label = gtk_label_new(_("Alias")); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5); diff -r 67ed2ee5be9f -r 17cea517fd90 src/prpl.c --- a/src/prpl.c Tue Oct 31 19:34:57 2000 +0000 +++ b/src/prpl.c Wed Nov 01 09:07:17 2000 +0000 @@ -44,11 +44,28 @@ void load_protocol(proto_init pi) { struct prpl *p = g_new0(struct prpl, 1); + struct prpl *old; pi(p); - if (find_prpl(p->protocol)) - g_free(p); - else - protocols = g_slist_append(protocols, p); + if (old = find_prpl(p->protocol)) { + GSList *c = connections; + struct gaim_connection *g; + while (c) { + g = (struct gaim_connection *)c->data; + if (g->prpl == old) { + char buf[256]; + g_snprintf(buf, sizeof buf, _("%s was using %s, which got replaced." + " %s is now offline."), g->username, + (*p->name)(), g->username); + do_error_dialog(buf, _("Disconnect")); + signoff(g); + c = connections; + } else + c = c->next; + } + protocols = g_slist_remove(protocols, old); + g_free(old); + } + protocols = g_slist_append(protocols, p); } void static_proto_init()