static void load_cb(GtkButton *button, PluginWindow *pluginwindow) { GList *file_list; file_list = filesel_select_multiple_files_open_with_filter( _("Select the Plugins to load"), get_plugin_dir(), "*." G_MODULE_SUFFIX); if (file_list) { GList *tmp; pluginwindow->loading = TRUE; for ( tmp = file_list; tmp; tmp = tmp->next) { gchar *file, *error = NULL; file = (gchar *) tmp->data; if (!file) continue; plugin_load(file, &error); if (error != NULL) { gchar *basename = g_path_get_basename(file); alertpanel_error( _("The following error occurred while loading %s:\n\n%s\n"), basename, error); g_free(basename); g_free(error); } /* FIXME: globally or atom-ly : ? */ set_plugin_list(pluginwindow); g_free(file); } pluginwindow->loading = FALSE; g_list_free(file_list); } }
GList *filesel_select_multiple_files_open(const gchar *title, const gchar *path) { return filesel_select_multiple_files_open_with_filter(title, path, NULL); }