changeset 5949:90d0849abd3c

[gaim-migrate @ 6393] Saved plugins are now stored in UI-specific keys, which are passed to gaim_plugins_load_saved(). If you're using CVS (shame on you!) you'll need to reload your plugins, and if you're careful enough, remove the old plugins tree from prefs.xml (/core/plugins/loaded/...). I assume no responsibility if you destroy prefs.xml, delete your harddrive, or sell your soul to a goat. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Tue, 24 Jun 2003 03:50:31 +0000
parents 1bebb8345bde
children e8316fec4fd1
files src/gtkprefs.c src/main.c src/plugin.c src/plugin.h src/prefs.c
diffstat 5 files changed, 16 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkprefs.c	Tue Jun 24 03:49:11 2003 +0000
+++ b/src/gtkprefs.c	Tue Jun 24 03:50:31 2003 +0000
@@ -2810,6 +2810,9 @@
 	gaim_prefs_add_bool("/gaim/gtk/logging/log_own_states", TRUE);
 	gaim_prefs_add_bool("/gaim/gtk/logging/individual_logs", FALSE);
 
+	/* Plugins */
+	gaim_prefs_add_string_list("/gaim/gtk/plugins/loaded", NULL);
+
 	/* Smiley Themes */
 	gaim_prefs_add_none("/gaim/gtk/smileys");
 	gaim_prefs_add_string("/gaim/gtk/smileys/theme", "");
--- a/src/main.c	Tue Jun 24 03:49:11 2003 +0000
+++ b/src/main.c	Tue Jun 24 03:50:31 2003 +0000
@@ -886,7 +886,7 @@
 	}
 
 	/* load plugins we had when we quit */
-	gaim_plugins_load_saved();
+	gaim_plugins_load_saved("/gaim/gtk/plugins/loaded");
 
 	gaim_pounces_load();
 
--- a/src/plugin.c	Tue Jun 24 03:49:11 2003 +0000
+++ b/src/plugin.c	Tue Jun 24 03:50:31 2003 +0000
@@ -532,12 +532,16 @@
 }
 
 void
-gaim_plugins_load_saved(void)
+gaim_plugins_load_saved(const char *key)
 {
 #ifdef GAIM_PLUGINS
-	GList *f, *files = gaim_prefs_get_string_list("/plugins/loaded");
+	GList *f, *files;
+
+	g_return_if_fail(key != NULL);
 
-	for(f = files; f; f = f->next) {
+	files = gaim_prefs_get_string_list(key);
+
+	for (f = files; f; f = f->next) {
 		gaim_plugin_load(gaim_plugin_probe(f->data));
 		g_free(f->data);
 	}
--- a/src/plugin.h	Tue Jun 24 03:49:11 2003 +0000
+++ b/src/plugin.h	Tue Jun 24 03:50:31 2003 +0000
@@ -253,9 +253,12 @@
 void gaim_plugins_destroy_all(void);
 
 /**
- * Attempts to load all the plugins that were loaded when gaim last quit
+ * Attempts to load all the plugins in the specified preference key
+ * that were loaded when gaim last quit.
+ *
+ * @param key The preference key containing the list of plugins.
  */
-void gaim_plugins_load_saved(void);
+void gaim_plugins_load_saved(const char *key);
 
 /**
  * Probes for plugins in the registered module paths.
--- a/src/prefs.c	Tue Jun 24 03:49:11 2003 +0000
+++ b/src/prefs.c	Tue Jun 24 03:50:31 2003 +0000
@@ -100,7 +100,6 @@
 	gaim_prefs_add_none("/plugins/core");
 	gaim_prefs_add_none("/plugins/lopl");
 	gaim_prefs_add_none("/plugins/prpl");
-	gaim_prefs_add_string_list("/plugins/loaded", NULL);
 
 	/* XXX: this is where you would want to put prefs declarations */