diff libgaim/plugin.c @ 15295:7d6bd7a4994f

[gaim-migrate @ 18086] core-ify some code...and someone tell me why my gvim and svn aren't getting along and I have to type out this damn message on the command line committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Mon, 08 Jan 2007 04:26:16 +0000
parents 8a0c3cb93de8
children c5e272b47618
line wrap: on
line diff
--- a/libgaim/plugin.c	Mon Jan 08 04:04:16 2007 +0000
+++ b/libgaim/plugin.c	Mon Jan 08 04:26:16 2007 +0000
@@ -1200,6 +1200,30 @@
 }
 
 void
+gaim_plugins_save_loaded(const char *key)
+{
+#ifdef GAIM_PLUGINS
+	GList *pl;
+	GList *f;
+	GList *files = NULL;
+	GaimPlugin *p;
+
+	for (pl = gaim_plugins_get_loaded(); pl != NULL; pl = pl->next) {
+		p = pl->data;
+
+		if (p->info->type != GAIM_PLUGIN_PROTOCOL &&
+			p->info->type != GAIM_PLUGIN_LOADER) {
+				files = g_list_append(files, p->path);
+		}
+	}
+
+	gaim_prefs_set_string_list(key, files);
+	g_list_foreach(files, (GFunc)g_free, NULL);
+	g_list_free(files);
+#endif
+}
+
+void
 gaim_plugins_load_saved(const char *key)
 {
 #ifdef GAIM_PLUGINS
@@ -1256,6 +1280,8 @@
 
 		g_free(basename);
 
+		g_free(filename);
+
 		g_free(f->data);
 	}