diff gtk/gtkmain.c @ 14990:633d4c25e82c

[gaim-migrate @ 17769] Change oscar-to-aim-and-icq hack. This does the renaming gtkgaim, after everything's initialized (so it fixes broken Persons and pounces and savedstatuses, but it introduces a hack in gaim_account_get_protocol_id(), since some initialization requires the protocol id to match the plugin. I don't really like this, but it's the best workaround I could think of. Hopefully we can remove this after not-long. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Fri, 17 Nov 2006 19:39:17 +0000
parents 589c4aaa0435
children 0d9f69b23352
line wrap: on
line diff
--- a/gtk/gtkmain.c	Fri Nov 17 19:27:58 2006 +0000
+++ b/gtk/gtkmain.c	Fri Nov 17 19:39:17 2006 +0000
@@ -726,6 +726,22 @@
 	/* TODO: Move pounces loading into gaim_pounces_init() */
 	gaim_pounces_load();
 
+	
+	/* HACK BY SEANEGAN:
+	 * We've renamed prpl-oscar to prpl-aim and prpl-icq, accordingly.
+	 * Let's do that change right here... after everything's loaded, but
+	 * before anything has happened
+	 */
+	for (accounts = gaim_accounts_get_all(); accounts != NULL; accounts = accounts->next) {
+		GaimAccount *account = accounts->data;
+		if (!strcmp(gaim_account_get_protocol_id(account), "prpl-oscar")) {
+			if (isdigit(gaim_account_get_username(account)))
+				gaim_account_set_protocol_id(account, "prpl-icq");
+			else 
+				gaim_account_set_protocol_id(account, "prpl-aim");
+		}
+	}
+	
 	ui_main();
 
 #ifdef USE_SM