comparison 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
comparison
equal deleted inserted replaced
5980:34341fd4f11e 5981:81564bb4db68
19 * You should have received a copy of the GNU General Public License 19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */ 22 */
23 #include "gtkplugin.h" 23 #include "gtkplugin.h"
24 #include "debug.h"
25 #include "prefs.h"
26
24 #include <string.h> 27 #include <string.h>
25 28
26 GtkWidget * 29 GtkWidget *
27 gaim_gtk_plugin_get_config_frame(GaimPlugin *plugin) 30 gaim_gtk_plugin_get_config_frame(GaimPlugin *plugin)
28 { 31 {
39 if (ui_info->get_config_frame == NULL) 42 if (ui_info->get_config_frame == NULL)
40 return NULL; 43 return NULL;
41 44
42 return ui_info->get_config_frame(plugin); 45 return ui_info->get_config_frame(plugin);
43 } 46 }
47
48 void
49 gaim_gtk_plugins_save(void)
50 {
51 GList *pl;
52 GList *files = NULL;
53 GaimPlugin *p;
54
55 for (pl = gaim_plugins_get_loaded(); pl != NULL; pl = pl->next) {
56 p = pl->data;
57
58 if (p->info->type != GAIM_PLUGIN_PROTOCOL &&
59 p->info->type != GAIM_PLUGIN_LOADER) {
60
61 files = g_list_append(files, p->path);
62
63 gaim_debug(GAIM_DEBUG_INFO, "gtkplugin",
64 "Adding %s to save list.\n", p->path);
65 }
66 }
67
68 gaim_prefs_set_string_list("/gaim/gtk/plugins/loaded", files);
69 g_list_free(files);
70 }