diff src/gtkplugin.c @ 5981:81564bb4db68

[gaim-migrate @ 6429] Saving and loading the current plugin list should work once again. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 02 Jul 2003 06:00:22 +0000
parents fefad67de2c7
children 35d3c1ac5ece
line wrap: on
line diff
--- a/src/gtkplugin.c	Tue Jul 01 12:43:39 2003 +0000
+++ b/src/gtkplugin.c	Wed Jul 02 06:00:22 2003 +0000
@@ -21,6 +21,9 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include "gtkplugin.h"
+#include "debug.h"
+#include "prefs.h"
+
 #include <string.h>
 
 GtkWidget *
@@ -41,3 +44,27 @@
 
 	return ui_info->get_config_frame(plugin);
 }
+
+void
+gaim_gtk_plugins_save(void)
+{
+	GList *pl;
+	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_debug(GAIM_DEBUG_INFO, "gtkplugin",
+					   "Adding %s to save list.\n", p->path);
+		}
+	}
+
+	gaim_prefs_set_string_list("/gaim/gtk/plugins/loaded", files);
+	g_list_free(files);
+}