Commit 090ff0e7 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

convert to unicode. (autocorrect_set_exceptions) : convert to ucs4

2002-09-09  Jody Goldberg <jody@gnome.org>

	* auto-correct.c (autocorrect_tool) : convert to unicode.
	(autocorrect_set_exceptions) : convert to ucs4 internally.
	(autocorrect_get_exceptions) : change the memory management semantics
	  of the result.
	(autocorrect_get_feature) : init the gconf cache as needed.
	(autocorrect_store_config) : use a changeset.
	(cb_autocorrect_update) : Use clear and load.
	(autocorrect_init) : hook on to the application as data so to handle
	  destruction in stead of requiring explicit removal.
	(autocorrect_load) : handle the gconf lookup directly.


2002-09-09  Jody Goldberg <jody@gnome.org>

	* src/gnumeric-gconf.c : slim things down and cache the results
	  locally.

	* src/gutils.c (g_unichar_strchr) : new.
	(g_unichar_strstr_utf8) : new.
	(g_unichar_strlen) : new.
	(g_unichar_strncmp) : new.
parent d8d5be54
......@@ -23,7 +23,6 @@ Release Critical
- load/save of external references
- String functions need to be UTF8ed: CHAR, CODE, SUBSTITUTE, SEARCH.
- function_category_compare needs to be made UTF8 safe.
- Auto-correct needs a lot of UTF8 love.
- Evaluate mathfunc.c's use of gamma and lgamma. We use the libc lgamma
(probably ok) and have gamma(x)=exp(lgamma(x)) (questionable).
......
2002-09-09 Jody Goldberg <jody@gnome.org>
* src/gnumeric-gconf.c : slim things down and cache the results
locally.
* src/gutils.c (g_unichar_strchr) : new.
(g_unichar_strstr_utf8) : new.
(g_unichar_strlen) : new.
(g_unichar_strncmp) : new.
2002-09-09 Morten Welinder <terra@diku.dk>
* src/item-edit.c (item_edit_destroy): Plug leak.
......@@ -8,6 +18,14 @@
(workbook_control_component_init): wbcg no longer has editing,
editing_sheet or editing_cell members, so don't initialize them.
2002-09-06 Jody Goldberg <jody@gnome.org>
* src/style.c (style_font_new_simple) : provide smarter defaults in case
of a screw up.
* src/gnumeric-gconf.c (gnm_gconf_get_zoom) : supply a smarter default
for out of range values.
2002-09-06 Jody Goldberg <jody@gnome.org>
* src/sheet-control-gui.c (scg_colrow_select) : don't do a start and a
......
......@@ -11,6 +11,7 @@ Jody:
* remove some deprecated functions
* Fix handling of files named .xml.gz
* Improvements for ExprEntry
* Make autocorrect unicode safe, and port dialgo to treeview
Morten:
* Leak plugging.
......
2002-09-09 Jody Goldberg <jody@gnome.org>
* src/gnumeric-gconf.c : slim things down and cache the results
locally.
* src/gutils.c (g_unichar_strchr) : new.
(g_unichar_strstr_utf8) : new.
(g_unichar_strlen) : new.
(g_unichar_strncmp) : new.
2002-09-09 Morten Welinder <terra@diku.dk>
* src/item-edit.c (item_edit_destroy): Plug leak.
......@@ -8,6 +18,14 @@
(workbook_control_component_init): wbcg no longer has editing,
editing_sheet or editing_cell members, so don't initialize them.
2002-09-06 Jody Goldberg <jody@gnome.org>
* src/style.c (style_font_new_simple) : provide smarter defaults in case
of a screw up.
* src/gnumeric-gconf.c (gnm_gconf_get_zoom) : supply a smarter default
for out of range values.
2002-09-06 Jody Goldberg <jody@gnome.org>
* src/sheet-control-gui.c (scg_colrow_select) : don't do a start and a
......
2002-09-09 Jody Goldberg <jody@gnome.org>
* src/gnumeric-gconf.c : slim things down and cache the results
locally.
* src/gutils.c (g_unichar_strchr) : new.
(g_unichar_strstr_utf8) : new.
(g_unichar_strlen) : new.
(g_unichar_strncmp) : new.
2002-09-09 Morten Welinder <terra@diku.dk>
* src/item-edit.c (item_edit_destroy): Plug leak.
......@@ -8,6 +18,14 @@
(workbook_control_component_init): wbcg no longer has editing,
editing_sheet or editing_cell members, so don't initialize them.
2002-09-06 Jody Goldberg <jody@gnome.org>
* src/style.c (style_font_new_simple) : provide smarter defaults in case
of a screw up.
* src/gnumeric-gconf.c (gnm_gconf_get_zoom) : supply a smarter default
for out of range values.
2002-09-06 Jody Goldberg <jody@gnome.org>
* src/sheet-control-gui.c (scg_colrow_select) : don't do a start and a
......
......@@ -67,8 +67,8 @@ provided and then it will be possible to create Gnumeric plugins with
other licenses, until then, the only setup available requires plugins
to fall under the GNU GPL license.
The perl and plan-perfect plugins are not meant to be installed.
They are included for informational purposes only.
The perl plugin is not meant to be installed. It is currently unmaintained and
is included for informational purposes only.
Mailing lists
-------------
......
......@@ -632,11 +632,6 @@ BONOBO_ACTIVATION_IDL_DIR="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`
ORBIT_IDL="${ORBIT} -I${BONOBO_IDL_DIR} -I${BONOBO_ACTIVATION_IDL_DIR}"
AC_SUBST(ORBIT_IDL)
dnl ====================================
dnl = Plan Perfect Plugin
dnl ====================================
AM_CONDITIONAL(WITH_PLAN_PERFECT, false)
dnl ====================================
dnl = Test whether jw is installed
dnl ====================================
......
......@@ -4750,6 +4750,13 @@ ms_excel_read_workbook (IOContext *context, WorkbookView *wb_view,
value_io_progress_set (context, gsf_input_size (input), N_BYTES_BETWEEN_PROGRESS_UPDATES);
q = ms_biff_query_new (input);
if (current_workbook_iconv != NULL) {
g_warning ("current_workbook_iconv != NULL");
}
/* default to ansi in case the file does not contain a CODEPAGE record */
current_workbook_iconv = gsf_msole_iconv_open_for_import (1252);
while (!stop_loading && /* we have not hit the end */
problem_loading == NULL && /* there were no problems so far */
ms_biff_query_next (q)) { /* we can load the record */
......
......@@ -367,7 +367,3 @@ EXTRA_DIST = GNOME_Gnumeric.xml GNOME_Gnumeric_Component.xml \
# Bonobo requires things to be in a subdir of this form
uidir=$(gnumeric_datadir)/gnome-2.0/ui
ui_DATA = GNOME_Gnumeric.xml GNOME_Gnumeric_Component.xml
CLEANFILES = $(GNUMERIC_GENERATED)
dist-hook :
cd $(distdir) && rm -f $(CLEANFILES)
......@@ -321,14 +321,14 @@ application_workbook_get_by_index (int i)
double
application_display_dpi_get (gboolean horizontal)
{
return horizontal ? gnm_gconf_get_horizontal_dpi () : gnm_gconf_get_vertical_dpi ();
return horizontal ? gnm_app_prefs->horizontal_dpi : gnm_app_prefs->vertical_dpi;
}
double
application_dpi_to_pixels (void)
{
return MIN (gnm_gconf_get_horizontal_dpi (),
gnm_gconf_get_vertical_dpi ()) / 72.;
return MIN (gnm_app_prefs->horizontal_dpi,
gnm_app_prefs->vertical_dpi) / 72.;
}
/**
......@@ -348,8 +348,8 @@ application_history_get_list (void)
if (app->history_list)
return app->history_list;
max_entries = gnm_gconf_get_file_history_max ();
app->history_list = gnm_gconf_get_file_history_files ();
max_entries = gnm_app_prefs->file_history_max;
app->history_list = gnm_app_prefs->file_history_files;
while (g_slist_length (app->history_list) > (guint)max_entries) {
GSList *last = g_slist_last (app->history_list);
......@@ -381,7 +381,7 @@ application_history_update_list (const gchar *filename)
g_return_val_if_fail (filename != NULL, NULL);
/* Get maximum list length from config */
max_entries = gnm_gconf_get_file_history_max ();
max_entries = gnm_app_prefs->file_history_max;
/* Shorten the list in case max_entries has changed. */
while (g_slist_length (app->history_list) > (guint) max_entries) {
......@@ -441,7 +441,7 @@ application_history_write_config (void)
if (app->history_list == NULL) return;
max_entries = gnm_gconf_get_file_history_max ();
max_entries = gnm_app_prefs->file_history_max;
/* Shorten the list in case max_entries has changed. */
while (g_slist_length (app->history_list) > (guint) max_entries) {
......@@ -458,20 +458,19 @@ application_history_write_config (void)
app->history_list = NULL;
}
gboolean application_use_auto_complete (void) { return gnm_gconf_get_auto_complete(); }
gboolean application_live_scrolling (void) { return gnm_gconf_get_live_scrolling (); }
int application_auto_expr_recalc_lag (void) { return gnm_gconf_get_recalc_lag (); }
gboolean application_use_auto_complete (void) { return gnm_app_prefs->auto_complete; }
gboolean application_live_scrolling (void) { return gnm_app_prefs->live_scrolling; }
int application_auto_expr_recalc_lag (void) { return gnm_app_prefs->recalc_lag; }
GConfClient *
application_get_gconf_client (void)
{
if (!app->gconf_client)
if (!app->gconf_client) {
app->gconf_client = gconf_client_get_default ();
gconf_client_add_dir (app->gconf_client, "/apps/gnumeric",
GCONF_CLIENT_PRELOAD_RECURSIVE,
NULL);
gconf_client_add_dir (app->gconf_client, "/apps/gnumeric",
GCONF_CLIENT_PRELOAD_RECURSIVE,
NULL);
}
return app->gconf_client;
}
......@@ -617,8 +616,7 @@ gnumeric_application_init (GObject *obj)
gnm_app->clipboard_copied_contents = NULL;
gnm_app->clipboard_sheet_view = NULL;
/* Set up GConf: */
gnm_app->gconf_client = gconf_client_get_default ();
gnm_app->gconf_client = NULL;
app = gnm_app;
}
......
......@@ -190,7 +190,7 @@ static GSF_CLASS (type, func, \
static char *
undo_global_range_name (Sheet *sheet, Range const * const range)
{
gboolean show_sheet_name = gnm_gconf_get_show_sheet_name ();
gboolean show_sheet_name = gnm_app_prefs->show_sheet_name;
return global_range_name (show_sheet_name ? sheet : NULL, range);
}
......@@ -298,7 +298,7 @@ cmd_cell_pos_name_utility (Sheet *sheet, CellPos const *pos)
static guint
max_descriptor_width (void)
{
return gnm_gconf_get_max_descriptor_width ();
return gnm_app_prefs->max_descriptor_width;
}
/**
......@@ -577,8 +577,8 @@ truncate_undo_info (Workbook *wb)
int ok_count;
GSList *l, *prev;
size_left = gnm_gconf_get_undo_size ();
max_num = gnm_gconf_get_undo_max_number ();
size_left = gnm_app_prefs->undo_size;
max_num = gnm_app_prefs->undo_max_number;
#ifdef DEBUG_TRUNCATE_UNDO
fprintf (stderr, "Undo sizes:");
......
This diff is collapsed.
......@@ -45,11 +45,11 @@
#include <gal/util/e-util.h>
typedef struct {
gboolean changed;
gint row;
GtkWidget *entry;
GtkWidget *list;
GSList *exceptions;
gboolean changed;
GtkWidget *entry;
GtkWidget *list;
GtkListStore *model;
GSList *exceptions;
} AutoCorrectExceptionState;
typedef struct {
......@@ -66,30 +66,22 @@ static void
cb_add_clicked (GtkWidget *widget, AutoCorrectExceptionState *s)
{
gchar const *txt;
GSList *ptr;
gboolean new_flag = TRUE;
GSList *ptr;
GtkTreeIter iter;
gboolean new_flag = TRUE;
txt = gtk_entry_get_text (GTK_ENTRY (s->entry));
for (ptr = s->exceptions; ptr != NULL; ptr = ptr->next) {
gchar *x = (gchar *) ptr->data;
if (strcmp(x, txt) == 0) {
for (ptr = s->exceptions; ptr != NULL; ptr = ptr->next)
if (strcmp (ptr->data, txt) == 0) {
new_flag = FALSE;
break;
}
}
if (new_flag) {
gint row;
char *dumy[2];
char *str;
dumy[0] = (char *)txt;
dumy[1] = NULL;
str = g_strdup (txt);
row = gtk_clist_append (GTK_CLIST (s->list), dumy);
gtk_clist_set_row_data (GTK_CLIST (s->list), row, str);
s->exceptions = g_slist_prepend (s->exceptions, str);
gchar *tmp = g_strdup (txt);
gtk_list_store_append (s->model, &iter);
gtk_list_store_set (s->model, &iter, 0, tmp, -1);
s->exceptions = g_slist_prepend (s->exceptions, tmp);
s->changed = TRUE;
}
gtk_entry_set_text (GTK_ENTRY (s->entry), "");
......@@ -98,67 +90,71 @@ cb_add_clicked (GtkWidget *widget, AutoCorrectExceptionState *s)
static void
cb_remove_clicked (GtkWidget *widget, AutoCorrectExceptionState *s)
{
if (s->row >= 0) {
gpointer x = gtk_clist_get_row_data (GTK_CLIST (s->list),
s->row);
gtk_clist_remove (GTK_CLIST (s->list), s->row);
s->exceptions = g_slist_remove (s->exceptions, x);
g_free (x);
s->changed = TRUE;
}
}
char *txt;
GtkTreeIter iter;
GtkTreeSelection *selection =
gtk_tree_view_get_selection (GTK_TREE_VIEW (s->list));
static void
cb_select_row (GtkWidget *widget, gint row, gint col, GdkEventButton *event,
AutoCorrectExceptionState *s)
{
s->row = row;
if (!gtk_tree_selection_get_selected (selection, NULL, &iter))
return;
gtk_tree_model_get (GTK_TREE_MODEL (s->model), &iter,
0, &txt,
-1);
s->exceptions = g_slist_remove (s->exceptions, txt);
gtk_list_store_remove (s->model, &iter);
g_free (txt);
s->changed = TRUE;
}
static void
autocorrect_init_exception_list (AutoCorrectState *state,
AutoCorrectExceptionState *exception,
GSList const *exceptions,
GSList *exceptions,
char const *entry_name,
char const *list_name,
char const *add_name,
char const *remove_name)
{
GtkWidget *w;
GSList *ptr;
GtkWidget *w;
GtkTreeIter iter;
GtkTreeSelection *selection;
exception->changed = FALSE;
exception->row = -1;
exception->exceptions = NULL;
exception->exceptions = exceptions;
exception->entry = glade_xml_get_widget (state->glade, entry_name);
exception->model = gtk_list_store_new (1, G_TYPE_STRING);
exception->list = glade_xml_get_widget (state->glade, list_name);
gnumeric_editable_enters (GTK_WINDOW (state->dialog),
GTK_WIDGET (exception->entry));
g_signal_connect (G_OBJECT (exception->list),
"select_row",
G_CALLBACK (cb_select_row), exception);
for (ptr = (GSList *)exceptions; ptr != NULL; ptr = ptr->next) {
gchar *s[2], *txt = (gchar *) ptr->data;
gint row;
exception->exceptions = g_slist_prepend (exception->exceptions,
g_strdup (txt));
s[0] = txt;
s[1] = NULL;
row = gtk_clist_append(GTK_CLIST (exception->list), s);
gtk_clist_set_row_data (GTK_CLIST (exception->list), row, txt);
gtk_tree_view_set_model (GTK_TREE_VIEW (exception->list),
GTK_TREE_MODEL (exception->model));
gtk_tree_view_append_column (GTK_TREE_VIEW (exception->list),
gtk_tree_view_column_new_with_attributes (NULL,
gtk_cell_renderer_text_new (),
"text", 0,
NULL));
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (exception->list));
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
for (; exceptions != NULL; exceptions = exceptions->next) {
gtk_list_store_append (exception->model, &iter);
gtk_list_store_set (exception->model, &iter,
0, exceptions->data,
-1);
}
exception->exceptions = g_slist_reverse (exception->exceptions);
w = glade_xml_get_widget (state->glade, add_name);
g_signal_connect (G_OBJECT (w),
"clicked",
G_CALLBACK (cb_add_clicked), exception);
w = glade_xml_get_widget (state->glade, remove_name);
g_signal_connect (GTK_OBJECT (w),
g_signal_connect (G_OBJECT (w),
"clicked",
G_CALLBACK (cb_remove_clicked), exception);
g_signal_connect (G_OBJECT (exception->entry),
"activate",
G_CALLBACK (cb_add_clicked), exception);
}
static void
......
......@@ -159,7 +159,7 @@ append_data (SortFlowState *state, int i, int index)
gchar *str;
GtkTreeIter iter;
Sheet *sheet = state->sel->v_range.cell.a.sheet;
gboolean sort_asc = gnm_gconf_get_sort_default_ascending ();
gboolean sort_asc = gnm_app_prefs->sort_default_ascending;
str = state->is_cols
? col_row_name (sheet, i, index, state->header, TRUE)
......@@ -170,7 +170,7 @@ append_data (SortFlowState *state, int i, int index)
ITEM_DESCENDING, !sort_asc,
ITEM_DESCENDING_IMAGE, sort_asc ? state->image_ascending
: state->image_descending,
ITEM_CASE_SENSITIVE, gnm_gconf_get_sort_default_by_case (),
ITEM_CASE_SENSITIVE, gnm_app_prefs->sort_default_by_case,
ITEM_SORT_BY_VALUE, TRUE,
ITEM_MOVE_FORMAT, TRUE,
ITEM_NUMBER, i,
......@@ -186,7 +186,7 @@ load_model_data (SortFlowState *state)
int end;
int index;
int i;
int limit = gnm_gconf_get_sort_max_initial_clauses ();
int limit = gnm_app_prefs->sort_max_initial_clauses;
if (state->is_cols) {
start = state->sel->v_range.cell.a.col;
......@@ -764,7 +764,7 @@ dialog_init (SortFlowState *state)
state->retain_format_check = glade_xml_get_widget (state->gui,
"retain_format_button");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->retain_format_check),
gnm_gconf_get_sort_default_retain_formats ());
gnm_app_prefs->sort_default_retain_formats);
/* Set-up buttons */
......
......@@ -81,7 +81,7 @@ dialog_function_load_recent_funcs (FunctionSelectState *state)
FunctionDefinition *fd;
GSList *recent_funcs, *this_funcs;
recent_funcs = gnm_gconf_get_recent_funcs ();
recent_funcs = gnm_app_prefs->recent_funcs;
for (this_funcs = recent_funcs; this_funcs; this_funcs = this_funcs->next) {
char *name = this_funcs->data;
......@@ -100,7 +100,7 @@ dialog_function_write_recent_func (FunctionSelectState *state, FunctionDefinitio
{
GSList *rec_funcs;
GSList *gconf_value_list = NULL;
guint ulimit = gnm_gconf_get_num_of_recent_funcs ();
guint ulimit = gnm_app_prefs->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);
......
......@@ -209,7 +209,7 @@ pm_delete_dir (char *dir_name)
GSList *plugin_dirs;
GSList *directory;
plugin_dirs = gnm_gconf_get_plugin_extra_dirs ();
plugin_dirs = gnm_app_prefs->plugin_extra_dirs;
directory = g_slist_find_custom (plugin_dirs, dir_name, g_str_compare);
g_free (dir_name);
if (directory) {
......@@ -224,7 +224,7 @@ pm_add_dir (char *dir_name)
{
GSList *plugin_dirs;
plugin_dirs = gnm_gconf_get_plugin_extra_dirs ();
plugin_dirs = gnm_app_prefs->plugin_extra_dirs;
if (g_slist_find_custom (plugin_dirs, dir_name, g_str_compare))
g_free (dir_name);
else {
......@@ -451,7 +451,7 @@ pm_dialog_init (PluginManagerGUI *pm_gui)
G_CALLBACK (pm_dialog_cleanup), pm_gui);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pm_gui->checkbutton_install_new),
gnm_gconf_get_activate_new_plugins ());
gnm_app_prefs->activate_new_plugins);
/* initialize plugin list */
gtk_list_store_clear (pm_gui->model_plugins);
......@@ -510,7 +510,7 @@ pm_gui_load_directory_page (PluginManagerGUI *pm_gui)
pm_gui_load_directories (pm_gui, plugin_dirs, FALSE);
e_free_string_slist (plugin_dirs);
}
plugin_dirs = gnm_gconf_get_plugin_extra_dirs ();
plugin_dirs = gnm_app_prefs->plugin_extra_dirs;
pm_gui_load_directories (pm_gui, plugin_dirs, TRUE);
e_free_string_slist (plugin_dirs);
}
......
......@@ -1530,11 +1530,11 @@ do_setup_sheet_selector (PrinterSetupState *state)
"toggled",
G_CALLBACK (cb_do_sheet_selector_toggled), state);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w),
gnm_gconf_get_all_sheets ());
gnm_app_prefs->print_all_sheets);
cb_do_sheet_selector_toggled (GTK_TOGGLE_BUTTON (w), state);
w = glade_xml_get_widget (state->gui, "apply-to-selected");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w),
!gnm_gconf_get_all_sheets ());
!gnm_app_prefs->print_all_sheets);
gtk_widget_show_all (table);
}
......
......@@ -191,10 +191,10 @@ category_group_list_get (void)
GList *categories, *l;
FormatTemplateCategoryGroup *current_group;
dir_list = g_create_slist (gnm_gconf_get_autoformat_sys_dirs (),
gnm_gconf_get_autoformat_usr_dirs (),
dir_list = g_create_slist (gnm_app_prefs->autoformat.sys_dir,
gnm_app_prefs->autoformat.usr_dir,
NULL);
dir_list = g_slist_concat (dir_list, gnm_gconf_get_autoformat_extra_dirs ());
dir_list = g_slist_concat (dir_list, g_slist_copy (gnm_app_prefs->autoformat.extra_dirs));
categories = category_list_get_from_dir_list (dir_list);
categories = g_list_sort (categories, category_compare_orig_name_and_dir);
......@@ -222,7 +222,7 @@ category_group_list_get (void)
}
g_list_free (categories);
e_free_string_slist (dir_list);
g_slist_free (dir_list); /* strings are owned by the gnm_app_prefs */
return category_groups;
}
......
......@@ -15,14 +15,6 @@
#define FUNCTION_SELECT_GCONF_RECENT "/apps/gnumeric/functionselector/recentfunctions"
#define FUNCTION_SELECT_GCONF_NUM_OF_RECENT "/apps/gnumeric/functionselector/num-of-recent"
#define AUTOCORRECT_DIRECTORY "/apps/gnumeric/autocorrect"
#define AUTOCORRECT_INIT_CAPS AUTOCORRECT_DIRECTORY "/init-caps"
#define AUTOCORRECT_INIT_CAPS_LIST AUTOCORRECT_DIRECTORY "/init-caps-list"
#define AUTOCORRECT_FIRST_LETTER AUTOCORRECT_DIRECTORY "/first-letter"
#define AUTOCORRECT_FIRST_LETTER_LIST AUTOCORRECT_DIRECTORY "/first-letter-list"
#define AUTOCORRECT_NAMES_OF_DAYS AUTOCORRECT_DIRECTORY "/names-of-days"
#define AUTOCORRECT_REPLACE AUTOCORRECT_DIRECTORY "/replace"
#define PLUGIN_GCONF_DIRECTORY "/apps/gnumeric/plugins"
#define PLUGIN_GCONF_ACTIVATE_NEW PLUGIN_GCONF_DIRECTORY "/activate-new"
#define PLUGIN_GCONF_ACTIVE PLUGIN_GCONF_DIRECTORY "/active"
......
This diff is collapsed.
......@@ -4,157 +4,128 @@
#include <gconf/gconf-client.h>
#include <numbers.h>
typedef struct {
struct {
GSList *extra_dirs;
char *sys_dir;
char *usr_dir;
} autoformat;
gint file_history_max;
GSList *file_history_files;
guint num_of_recent_funcs;
GSList *recent_funcs;
GSList *plugin_file_states;
GSList *plugin_extra_dirs;
GSList *active_plugins;
gboolean activate_new_plugins;
gboolean show_sheet_name;
guint max_descriptor_width;
gint undo_size;
gint undo_max_number;
gint initial_sheet_number;
float horizontal_window_fraction;
float vertical_window_fraction;
float zoom;
gint xml_compression_level;
gboolean import_uses_all_openers;
gboolean file_overwrite_default_answer;
gboolean file_ask_single_sheet_save;
gboolean sort_default_by_case;
gboolean sort_default_retain_formats;
gboolean sort_default_ascending;
gint sort_max_initial_clauses;
gboolean print_all_sheets; /* vs print only selected */
gchar *printer;
gchar *printer_backend;
gchar *printer_filename;
gchar *printer_command;
gchar *printer_lpr_P;
float horizontal_dpi;
float vertical_dpi;
gboolean auto_complete;
gboolean live_scrolling;
gint recalc_lag;
gboolean unfocused_range_selection;
} GnmAppPrefs;
extern GnmAppPrefs const *gnm_app_prefs;
void gnm_conf_init (void);
void gnm_conf_sync (void);
guint gnm_gconf_rm_notification (guint id);
/* autocorrect */
guint gnm_gconf_add_notification_autocorrect (GConfClientNotifyFunc func);
gboolean gnm_gconf_get_autocorrect_init_caps (void);
void gnm_gconf_set_autocorrect_init_caps (gboolean val);
gboolean gnm_gconf_get_autocorrect_first_letter (void);
void gnm_gconf_set_autocorrect_first_letter (gboolean val);
gboolean gnm_gconf_get_autocorrect_names_of_days (void);
void gnm_gconf_set_autocorrect_names_of_days (gboolean val);
gboolean gnm_gconf_get_autocorrect_replace (void);
void gnm_gconf_set_autocorrect_replace (gboolean val);
GSList * gnm_gconf_get_autocorrect_init_caps_exceptions (void);
void gnm_gconf_set_autocorrect_init_caps_exceptions (GSList *list);
GSList * gnm_gconf_get_autocorrect_first_letter_exceptions (void);
void gnm_gconf_set_autocorrect_first_letter_exceptions (GSList *list);
/* autoformat */
GSList * gnm_gconf_get_autoformat_extra_dirs (void);
void gnm_gconf_set_autoformat_extra_dirs (GSList *list);
char * gnm_gconf_get_autoformat_sys_dirs (void);
void gnm_gconf_set_autoformat_sys_dirs (char const * string);
char * gnm_gconf_get_autoformat_usr_dirs (void);
void gnm_gconf_set_autoformat_usr_dirs (char const * string);
/* file history */
gint gnm_gconf_get_file_history_max (void);
void gnm_gconf_set_file_history_max (gint val);
GSList * gnm_gconf_get_file_history_files (void);
void gnm_gconf_set_file_history_files (GSList *list);