Commit 7d3c6bfa authored by Andreas J. Guelzow's avatar Andreas J. Guelzow Committed by Andreas J. Guelzow

use get/set methods of gnumeric-gconf.h switch from gnome-config to gconf

2002-04-15  Andreas J. Guelzow <aguelzow@taliesin.ca>

	* dialog-function-select.c : use get/set methods of gnumeric-gconf.h
	* dialog-plugin-manager.c : switch from gnome-config to gconf
	* dialog-preferences.c : add include

2002-04-15  Andreas J. Guelzow <aguelzow@taliesin.ca>

	* schemas/gnumeric-dialogs.schemas : new plugin schemas
	* src/Makefile.am : add src/gnumeric-gconf.c and src/gnumeric-gconf-priv.h
	* src/application.c : use get/set methods from src/gnumeric-gconf.h
	* src/commands.c : change include
	* src/error-info.c : switch to GSLists from GLists
	* src/error-info.h : switch to GSLists from GLists
	* src/gnumeric-gconf.h : new get/set methods
	* src/gnumeric-gconf.c : new
	* src/gnumeric-gconf-priv.h : formerly src/gnumeric-gconf.h
	* src/gui-util.c : switch to GSLists from GLists
	* src/gutils.h : some new g_slist functions
	* src/gutils.c : some new g_slist functions
	* src/libgnumeric.c : use get/set methods from src/gnumeric-gconf.h
	* src/plugin-loader-module.c : switch to GSLists from GLists
	* src/plugin-loader.c : switch to GSLists from GLists
	* src/plugin-loader.h : switch to GSLists from GLists
	* src/plugin-service.c : switch to GSLists from GLists
	* src/plugin.c : switch to GSLists from GLists and use gconf
	* src/plugin.h : switch to GSLists from GLists
	* src/workbook-control-gui.c : use get/set methods from src/gnumeric-gconf.h
parent 79c92bf5
2002-04-15 Andreas J. Guelzow <aguelzow@taliesin.ca>
* schemas/gnumeric-dialogs.schemas : new plugin schemas
* src/Makefile.am : add src/gnumeric-gconf.c and src/gnumeric-gconf-priv.h
* src/application.c : use get/set methods from src/gnumeric-gconf.h
* src/commands.c : change include
* src/error-info.c : switch to GSLists from GLists
* src/error-info.h : switch to GSLists from GLists
* src/gnumeric-gconf.h : new get/set methods
* src/gnumeric-gconf.c : new
* src/gnumeric-gconf-priv.h : formerly src/gnumeric-gconf.h
* src/gui-util.c : switch to GSLists from GLists
* src/gutils.h : some new g_slist functions
* src/gutils.c : some new g_slist functions
* src/libgnumeric.c : use get/set methods from src/gnumeric-gconf.h
* src/plugin-loader-module.c : switch to GSLists from GLists
* src/plugin-loader.c : switch to GSLists from GLists
* src/plugin-loader.h : switch to GSLists from GLists
* src/plugin-service.c : switch to GSLists from GLists
* src/plugin.c : switch to GSLists from GLists and use gconf
* src/plugin.h : switch to GSLists from GLists
* src/workbook-control-gui.c : use get/set methods from src/gnumeric-gconf.h
2002-04-15 Jon K Hellan <hellan@acm.org>
* src/.cvsignore: Ingore gnumeric-component
......
......@@ -27,6 +27,7 @@ Andreas:
* Add number of sheets preference
* Start to UTF8 some of the string functions
* Preserve autocorrect exception lists
* Switch plugin manager from gnome-config to gconf
Jody:
* Add password dialog to support encrypted input.
......
2002-04-15 Andreas J. Guelzow <aguelzow@taliesin.ca>
* schemas/gnumeric-dialogs.schemas : new plugin schemas
* src/Makefile.am : add src/gnumeric-gconf.c and src/gnumeric-gconf-priv.h
* src/application.c : use get/set methods from src/gnumeric-gconf.h
* src/commands.c : change include
* src/error-info.c : switch to GSLists from GLists
* src/error-info.h : switch to GSLists from GLists
* src/gnumeric-gconf.h : new get/set methods
* src/gnumeric-gconf.c : new
* src/gnumeric-gconf-priv.h : formerly src/gnumeric-gconf.h
* src/gui-util.c : switch to GSLists from GLists
* src/gutils.h : some new g_slist functions
* src/gutils.c : some new g_slist functions
* src/libgnumeric.c : use get/set methods from src/gnumeric-gconf.h
* src/plugin-loader-module.c : switch to GSLists from GLists
* src/plugin-loader.c : switch to GSLists from GLists
* src/plugin-loader.h : switch to GSLists from GLists
* src/plugin-service.c : switch to GSLists from GLists
* src/plugin.c : switch to GSLists from GLists and use gconf
* src/plugin.h : switch to GSLists from GLists
* src/workbook-control-gui.c : use get/set methods from src/gnumeric-gconf.h
2002-04-15 Jon K Hellan <hellan@acm.org>
* src/.cvsignore: Ingore gnumeric-component
......
2002-04-15 Andreas J. Guelzow <aguelzow@taliesin.ca>
* schemas/gnumeric-dialogs.schemas : new plugin schemas
* src/Makefile.am : add src/gnumeric-gconf.c and src/gnumeric-gconf-priv.h
* src/application.c : use get/set methods from src/gnumeric-gconf.h
* src/commands.c : change include
* src/error-info.c : switch to GSLists from GLists
* src/error-info.h : switch to GSLists from GLists
* src/gnumeric-gconf.h : new get/set methods
* src/gnumeric-gconf.c : new
* src/gnumeric-gconf-priv.h : formerly src/gnumeric-gconf.h
* src/gui-util.c : switch to GSLists from GLists
* src/gutils.h : some new g_slist functions
* src/gutils.c : some new g_slist functions
* src/libgnumeric.c : use get/set methods from src/gnumeric-gconf.h
* src/plugin-loader-module.c : switch to GSLists from GLists
* src/plugin-loader.c : switch to GSLists from GLists
* src/plugin-loader.h : switch to GSLists from GLists
* src/plugin-service.c : switch to GSLists from GLists
* src/plugin.c : switch to GSLists from GLists and use gconf
* src/plugin.h : switch to GSLists from GLists
* src/workbook-control-gui.c : use get/set methods from src/gnumeric-gconf.h
2002-04-15 Jon K Hellan <hellan@acm.org>
* src/.cvsignore: Ingore gnumeric-component
......
......@@ -85,6 +85,57 @@
<long>Autocorrect replace</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/plugins/activate-new</key>
<applyto>/apps/gnumeric/plugins/activate-new</applyto>
<owner>Gnumeric</owner>
<type>bool</type>
<default>TRUE</default>
<locale name="C">
<short>Activate New Plugins</short>
<long>This variable determines whether to activate every new encountered plugin.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/plugins/active</key>
<applyto>/apps/gnumeric/plugins/active</applyto>
<owner>Gnumeric</owner>
<type>list</type>
<locale name="C">
<short>List of Active Plugins.</short>
<long>This list contains all plugins that are supposed to be automatically activated.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/plugins/known</key>
<applyto>/apps/gnumeric/plugins/known</applyto>
<owner>Gnumeric</owner>
<type>list</type>
<locale name="C">
<short>List of Known Plugins.</short>
<long>This list contains all known plugins.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/plugins/file-states</key>
<applyto>/apps/gnumeric/plugins/file-states</applyto>
<owner>Gnumeric</owner>
<type>list</type>
<locale name="C">
<short>List of Plugin File States.</short>
<long>This list contains all plugin file states.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/plugins/extra-dirs</key>
<applyto>/apps/gnumeric/plugins/extra-dirs</applyto>
<owner>Gnumeric</owner>
<type>list</type>
<locale name="C">
<short>List of Extra Plugin Directories.</short>
<long>This list contains all extra directories containing plugins.</long>
</locale>
</schema>
</schemalist>
</gconfschemafile>
......@@ -85,6 +85,57 @@
<long>Autocorrect replace</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/plugins/activate-new</key>
<applyto>/apps/gnumeric/plugins/activate-new</applyto>
<owner>Gnumeric</owner>
<type>bool</type>
<default>TRUE</default>
<locale name="C">
<short>Activate New Plugins</short>
<long>This variable determines whether to activate every new encountered plugin.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/plugins/active</key>
<applyto>/apps/gnumeric/plugins/active</applyto>
<owner>Gnumeric</owner>
<type>list</type>
<locale name="C">
<short>List of Active Plugins.</short>
<long>This list contains all plugins that are supposed to be automatically activated.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/plugins/known</key>
<applyto>/apps/gnumeric/plugins/known</applyto>
<owner>Gnumeric</owner>
<type>list</type>
<locale name="C">
<short>List of Known Plugins.</short>
<long>This list contains all known plugins.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/plugins/file-states</key>
<applyto>/apps/gnumeric/plugins/file-states</applyto>
<owner>Gnumeric</owner>
<type>list</type>
<locale name="C">
<short>List of Plugin File States.</short>
<long>This list contains all plugin file states.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/plugins/extra-dirs</key>
<applyto>/apps/gnumeric/plugins/extra-dirs</applyto>
<owner>Gnumeric</owner>
<type>list</type>
<locale name="C">
<short>List of Extra Plugin Directories.</short>
<long>This list contains all extra directories containing plugins.</long>
</locale>
</schema>
</schemalist>
</gconfschemafile>
......@@ -101,6 +101,9 @@ GNUMERIC_BASE = \
gnumeric-simple-canvas.h \
gnumeric-canvas.c \
gnumeric-canvas.h \
gnumeric-gconf.c \
gnumeric-gconf.h \
gnumeric-gconf-priv.h \
gnumeric-pane.c \
gnumeric-pane.h \
gnumeric.h \
......
......@@ -148,7 +148,6 @@ application_init (void)
};
unsigned i = 0;
GtkIconFactory *factory = gtk_icon_factory_new ();
GError *err = NULL;
for (i = 0; i < G_N_ELEMENTS (entry) ; i++)
add_icon (factory, entry[i].scalable_data,
......@@ -177,28 +176,11 @@ application_init (void)
* out the flaws in the display code.
*/
app.horizontal_dpi = gconf_client_get_float (app.gconf_client,
GNUMERIC_GCONF_GUI_RES_H, &err);
if (err || app.horizontal_dpi == 0.0)
app.horizontal_dpi = 96.;
err = NULL;
app.vertical_dpi = gconf_client_get_float (app.gconf_client,
GNUMERIC_GCONF_GUI_RES_V, &err);
if (err || app.vertical_dpi == 0.0)
app.vertical_dpi = 96.;
err = NULL;
app.edit_auto_complete = gconf_client_get_bool (app.gconf_client,
GNUMERIC_GCONF_GUI_ED_AUTOCOMPLETE, &err);
err = NULL;
app.live_scrolling = gconf_client_get_bool (app.gconf_client,
GNUMERIC_GCONF_GUI_ED_LIVESCROLLING, &err);
err = NULL;
app.auto_expr_recalc_lag = gconf_client_get_int (app.gconf_client,
GNUMERIC_GCONF_GUI_ED_RECALC_LAG,
&err);
if (err || app.auto_expr_recalc_lag == 0)
app.auto_expr_recalc_lag = 200;
app.horizontal_dpi = gnm_gconf_get_horizontal_dpi ();
app.vertical_dpi = gnm_gconf_get_vertical_dpi ();
app.edit_auto_complete = gnm_gconf_get_auto_complete();
app.live_scrolling = gnm_gconf_get_live_scrolling ();
app.auto_expr_recalc_lag = gnm_gconf_get_recalc_lag ();
}
static GList *workbook_list = NULL;
......@@ -462,19 +444,13 @@ GSList*
application_history_get_list (void)
{
gint max_entries;
GError *err = NULL;
GConfClient *client = application_get_gconf_client ();
/* If the list is already populated, return it. */
if (app.history_list)
return app.history_list;
max_entries = gconf_client_get_int (client, GNUMERIC_GCONF_FILE_HISTORY_N, &err);
if (err || max_entries < 0)
max_entries = 4;
app.history_list = gconf_client_get_list (client, GNUMERIC_GCONF_FILE_HISTORY_FILES,
GCONF_VALUE_STRING, NULL);
max_entries = gnm_gconf_get_file_history_max ();
app.history_list = gnm_gconf_get_file_history_files ();
while (g_slist_length (app.history_list) > (guint)max_entries) {
GSList *last = g_slist_last (app.history_list);
......@@ -502,15 +478,11 @@ application_history_update_list (const gchar *filename)
gchar *name, *old_name = NULL;
GSList *l = NULL;
gint max_entries;
GError *err = NULL;
GConfClient *client = application_get_gconf_client ();
g_return_val_if_fail (filename != NULL, NULL);
/* Get maximum list length from config */
max_entries = gconf_client_get_int (client, GNUMERIC_GCONF_FILE_HISTORY_N, &err);
if (err || max_entries < 0)
max_entries = 4;
max_entries = gnm_gconf_get_file_history_max ();
/* Shorten the list in case max_entries has changed. */
while (g_slist_length (app.history_list) > (guint) max_entries) {
......@@ -540,6 +512,8 @@ application_history_update_list (const gchar *filename)
last);
}
gnm_gconf_set_file_history_files (app.history_list);
gnm_conf_sync ();
return old_name;
}
......@@ -565,14 +539,10 @@ void
application_history_write_config (void)
{
gint max_entries;
GError *err = NULL;
GConfClient *client = application_get_gconf_client ();
if (app.history_list == NULL) return;
max_entries = gconf_client_get_int (client, GNUMERIC_GCONF_FILE_HISTORY_N, &err);
if (err || max_entries < 0)
max_entries = 4;
max_entries = gnm_gconf_get_file_history_max ();
/* Shorten the list in case max_entries has changed. */
while (g_slist_length (app.history_list) > (guint) max_entries) {
......@@ -582,9 +552,8 @@ application_history_write_config (void)
last);
}
gconf_client_set_list (client, GNUMERIC_GCONF_FILE_HISTORY_FILES, GCONF_VALUE_STRING,
app.history_list, NULL);
gconf_client_suggest_sync (client, NULL);
gnm_gconf_set_file_history_files (app.history_list);
gnm_conf_sync ();
e_free_string_slist (app.history_list);
app.history_list = NULL;
......
......@@ -63,6 +63,8 @@
#include "summary.h"
#include "tools/dao.h"
#include "gnumeric-gconf.h"
/* FIXME, we shouldn't be using gnumeric-gconf-priv.h */
#include "gnumeric-gconf-priv.h"
#include <libgnome/gnome-i18n.h>
#include <gal/util/e-util.h>
......
2002-04-15 Andreas J. Guelzow <aguelzow@taliesin.ca>
* dialog-function-select.c : use get/set methods of gnumeric-gconf.h
* dialog-plugin-manager.c : switch from gnome-config to gconf
* dialog-preferences.c : add include
2002-04-15 Andreas J. Guelzow <aguelzow@taliesin.ca>
* dialog-autocorrect.c : make exception lists into GSList (rather
......
......@@ -77,13 +77,10 @@ enum {
static void
dialog_function_load_recent_funcs (FunctionSelectState *state)
{
GConfClient *client;
FunctionDefinition *fd;
GSList *recent_funcs, *this_funcs;
client = application_get_gconf_client ();
recent_funcs = gconf_client_get_list (client, FUNCTION_SELECT_GCONF_RECENT,
GCONF_VALUE_STRING, NULL);
recent_funcs = gnm_gconf_get_recent_funcs ();
for (this_funcs = recent_funcs; this_funcs; this_funcs = this_funcs->next) {
char *name = this_funcs->data;
......@@ -101,18 +98,8 @@ static void
dialog_function_write_recent_func (FunctionSelectState *state, FunctionDefinition const *fd)
{
GSList *rec_funcs;
GConfClient *client;
GSList *gconf_value_list = NULL;
GError *err = NULL;
gint limit;
guint ulimit;
client = application_get_gconf_client ();
limit = gconf_client_get_int (client, FUNCTION_SELECT_GCONF_NUM_OF_RECENT, &err);
if (err)
limit = 0;
ulimit = (limit < 0) ? 0 : (guint)limit;
guint ulimit = gnm_gconf_get_num_of_recent_funcs ();
state->recent_funcs = g_slist_remove (state->recent_funcs, (gpointer) fd);
state->recent_funcs = g_slist_prepend (state->recent_funcs, (gpointer) fd);
......@@ -125,9 +112,8 @@ dialog_function_write_recent_func (FunctionSelectState *state, FunctionDefinitio
gconf_value_list = g_slist_prepend
(gconf_value_list, g_strdup (function_def_get_name (rec_funcs->data)));
}
gconf_client_set_list (client, FUNCTION_SELECT_GCONF_RECENT, GCONF_VALUE_STRING,
gconf_value_list, NULL);
gconf_client_suggest_sync (client, NULL);
gnm_gconf_set_recent_funcs (gconf_value_list);
gnm_conf_sync ();
e_free_string_slist (gconf_value_list);
}
......
......@@ -34,9 +34,10 @@
#include <workbook-control.h>
#include <workbook.h>
#include <plugin.h>
#include <gnumeric-gconf.h>
#include <application.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-config.h>
#include <string.h>
#include <glade/glade.h>
#include <gal/util/e-util.h>
......@@ -113,7 +114,7 @@ cb_pm_button_activate_plugin_clicked (GtkButton *button, PluginManagerGUI *pm_gu
if (plugin_loader_is_available_by_id (loader_type_str)) {
loader_available = TRUE;
} else {
GList *l;
GSList *l;
PluginInfo *loader_pinfo = NULL;
for (l = plugin_db_get_available_plugin_info_list (); l != NULL; l = l->next) {
......@@ -275,8 +276,8 @@ cb_pm_button_install_plugin_clicked (GtkButton *button, PluginManagerGUI *pm_gui
static void
cb_pm_checkbutton_install_new_toggled (GtkCheckButton *checkbutton, PluginManagerGUI *pm_gui)
{
gnome_config_set_bool ("Gnumeric/Plugin/ActivateNewByDefault",
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton)));
gnm_gconf_set_activate_new_plugins (
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton)));
}
static void
......@@ -338,9 +339,9 @@ pm_dialog_init (PluginManagerGUI *pm_gui)
g_signal_connect (G_OBJECT (pm_gui->checkbutton_install_new),
"toggled",
G_CALLBACK (cb_pm_checkbutton_install_new_toggled), pm_gui);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pm_gui->checkbutton_install_new),
gnome_config_get_bool_with_default
("Gnumeric/Plugin/ActivateNewByDefault=true", NULL));
gnm_gconf_get_activate_new_plugins ());
update_plugin_manager_view (pm_gui);
}
......@@ -356,7 +357,7 @@ plugin_compare_name (gconstpointer a, gconstpointer b)
static void
update_plugin_manager_view (PluginManagerGUI *pm_gui)
{
GList *sorted_plugin_list, *l;
GSList *sorted_plugin_list, *l;
gint n_active_plugins, n_inactive_plugins, n_plugins;
GtkTreeIter iter, *select_iter = NULL;
plugin_state_t status;
......@@ -368,7 +369,7 @@ update_plugin_manager_view (PluginManagerGUI *pm_gui)
gtk_list_store_clear (pm_gui->model_plugins);
sorted_plugin_list = g_list_sort (g_list_copy
sorted_plugin_list = g_slist_sort (g_slist_copy
(plugin_db_get_available_plugin_info_list ()),
&plugin_compare_name);
......@@ -414,7 +415,7 @@ update_plugin_manager_view (PluginManagerGUI *pm_gui)
}
n_plugins = n_active_plugins + n_inactive_plugins;
g_list_free (sorted_plugin_list);
g_slist_free (sorted_plugin_list);
free_plugin_id (pm_gui->current_plugin_id);
pm_gui->current_plugin_id = NULL;
......@@ -440,7 +441,7 @@ update_plugin_details_view (PluginManagerGUI *pm_gui)
{
PluginInfo *pinfo;
gint n_extra_info_items, i;
GList *extra_info_keys, *extra_info_values, *lkey, *lvalue;
GSList *extra_info_keys, *extra_info_values, *lkey, *lvalue;
GtkTreeIter iter;
g_return_if_fail (pm_gui != NULL);
......@@ -468,8 +469,8 @@ update_plugin_details_view (PluginManagerGUI *pm_gui)
EXTRA_VALUE, (gchar *) lvalue->data,
-1);
}
e_free_string_list (extra_info_keys);
e_free_string_list (extra_info_values);
e_free_string_slist (extra_info_keys);
e_free_string_slist (extra_info_values);
}
} else {
gtk_entry_set_text (pm_gui->entry_name, "");
......@@ -587,7 +588,8 @@ dialog_plugin_manager (WorkbookControlGUI *wbcg)
pm_gui->current_plugin_id = NULL;
pm_dialog_init (pm_gui);
(void) gnumeric_dialog_run (wbcg, pm_gui->dialog_pm);
gnome_config_sync ();
gconf_client_suggest_sync (application_get_gconf_client (), NULL);
free_plugin_id (pm_gui->current_plugin_id);
g_free (pm_gui);
......
......@@ -32,6 +32,8 @@
#include "number-match.h"
#include "widgets/widget-font-selector.h"
#include "widgets/gnumeric-cell-renderer-text.h"
#include "gnumeric-gconf-priv.h"
#include "gnumeric-gconf.h"
#include <gui-util.h>
......
......@@ -14,7 +14,7 @@
struct _ErrorInfo {
gchar *msg;
GList *details; /* list of ErrorInfo */
GSList *details; /* list of ErrorInfo */
};
ErrorInfo *
......@@ -58,7 +58,7 @@ error_info_new_str_with_details (char const *msg, ErrorInfo *details)
}
ErrorInfo *
error_info_new_str_with_details_list (char const *msg, GList *details)
error_info_new_str_with_details_list (char const *msg, GSList *details)
{
ErrorInfo *error = error_info_new_str (msg);
error_info_add_details_list (error, details);
......@@ -66,17 +66,17 @@ error_info_new_str_with_details_list (char const *msg, GList *details)
}
ErrorInfo *
error_info_new_from_error_list (GList *errors)
error_info_new_from_error_list (GSList *errors)
{
ErrorInfo *error;
switch (g_list_length (errors)) {
switch (g_slist_length (errors)) {
case 0:
error = error_info_new_str (NULL);
break;
case 1:
error = (ErrorInfo *) errors->data;
g_list_free (errors);
g_slist_free (errors);
break;
default:
error = error_info_new_str_with_details_list (NULL, errors);
......@@ -100,16 +100,16 @@ error_info_add_details (ErrorInfo *error, ErrorInfo *details)
if (details == NULL)
;
else if (details->msg == NULL) {
error->details = g_list_concat (error->details, details->details);
error->details = g_slist_concat (error->details, details->details);
g_free (details);
} else
error->details = g_list_append (error->details, details);
error->details = g_slist_append (error->details, details);
}
void
error_info_add_details_list (ErrorInfo *error, GList *details)
error_info_add_details_list (ErrorInfo *error, GSList *details)
{
GList *new_details_list, *l, *ll;
GSList *new_details_list, *l, *ll;
g_return_if_fail (error != NULL);
......@@ -118,20 +118,20 @@ error_info_add_details_list (ErrorInfo *error, GList *details)
ErrorInfo *details_error = l->data;
if (details_error->msg == NULL) {
for (ll = details_error->details; ll != NULL; ll = ll->next)
new_details_list = g_list_prepend (new_details_list, l->data);
new_details_list = g_slist_prepend (new_details_list, l->data);
g_free (details_error);
} else
new_details_list = g_list_prepend (new_details_list, details_error);
new_details_list = g_slist_prepend (new_details_list, details_error);
}
g_list_free (details);
new_details_list = g_list_reverse (new_details_list);
error->details = g_list_concat (error->details, new_details_list);
g_slist_free (details);
new_details_list = g_slist_reverse (new_details_list);
error->details = g_slist_concat (error->details, new_details_list);
}
void
error_info_free (ErrorInfo *error)
{
GList *l;
GSList *l;
if (error == NULL)
return;
......@@ -140,14 +140,14 @@ error_info_free (ErrorInfo *error)
for (l = error->details; l != NULL; l = l->next)
error_info_free ((ErrorInfo *) l->data);
g_list_free (error->details);
g_slist_free (error->details);
g_free(error);
}
static void
error_info_print_with_offset (ErrorInfo *error, gint offset)
{
GList *l;
GSList *l;
if (error->msg != NULL) {
fprintf (stderr, "%*s%s\n", offset, "", error->msg);
......@@ -173,7 +173,7 @@ error_info_peek_message (ErrorInfo *error)
return error->msg;