Blob Blame History Raw
diff -ur empathy-2.23.6/src/empathy.c empathy-2.23.6.hacked/src/empathy.c
--- empathy-2.23.6/src/empathy.c	2008-08-04 07:25:40.000000000 -0400
+++ empathy-2.23.6.hacked/src/empathy.c	2008-08-15 13:10:41.000000000 -0400
@@ -356,6 +356,47 @@
 	return (retval > 0) ? retval : 0;
 }
 
+/* This change is specific to Fedora and how we set up
+ * the mission control profiles before.  This patch
+ * can probably be removed by Fedora 11-12.
+ */
+static void
+fedora_mission_control_convert ()
+{
+	GDir *accts;
+	const char *name;
+	GError *error = NULL;
+	char *path;
+
+	path = g_build_filename (g_get_home_dir (), ".mission-control", 
+				 "accounts", NULL);
+	accts = g_dir_open (path, 0, &error);
+	/* If no accts dir, that's fine */
+	if (!accts)
+		return;
+	while ((name = g_dir_read_name (accts)) != NULL) {
+		char *fullpath = g_build_filename (path, name, NULL);
+		char *newpath = NULL;
+
+		if (g_str_has_prefix (name, "haze-aim") ||
+		    g_str_has_prefix (name, "haze-icq") ||
+		    g_str_has_prefix (name, "haze-yahoo"))
+			newpath = g_build_filename (path, name + strlen ("haze-"), NULL);
+		else if (g_str_has_prefix (name, "haze-msn"))
+			newpath = g_strdup_printf ("%s/%s%s", path, "msn-haze", 
+						   name + strlen ("haze-msn"));
+		
+		if (newpath) {
+			g_rename (fullpath, newpath);
+			g_free (newpath);
+		}
+		g_free (fullpath);
+	}
+
+	g_dir_close (accts);
+	g_free (path);
+}
+
 int
 main (int argc, char *argv[])
 {
@@ -386,6 +427,8 @@
 		{ NULL }
 	};
 
+	fedora_mission_control_convert ();
+
 	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 	textdomain (GETTEXT_PACKAGE);
Only in empathy-2.23.6.hacked/src: empathy.c~
Only in empathy-2.23.6/: upgrade-haze-profiles.sh