Commit cc7c14df authored by Andreas J. Guelzow's avatar Andreas J. Guelzow Committed by Andreas J. Guelzow

add more preferences move autocorrect_init into src/main.c added defines

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

	* schemas/gnumeric-dialogs.schemas : add more preferences
	* src/application.c : move autocorrect_init into src/main.c
	* src/gnumeric-gconf.h : added defines and comments
	* src/main.c : add autocorrect_init and autocorrect_shutdown

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

	* dialog-autocorrect.c : make exception lists into GSList (rather
	  than GList)
	* dialog-preferences.c : move gconf keys for fonts into
	  gnumeric-gconf.h, synchronize gconf on destroy

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

	* auto-correct.[ch] : switch from gnome-config to gconf and make
	  preserve autocorrect exceptions. Make exception lists into
	  GSList
parent fb777cf0
2002-04-15 Andreas J. Guelzow <aguelzow@taliesin.ca>
* schemas/gnumeric-dialogs.schemas : add more preferences
* src/application.c : move autocorrect_init into src/main.c
* src/gnumeric-gconf.h : added defines and comments
* src/main.c : add autocorrect_init and autocorrect_shutdown
2002-04-15 Morten Welinder <terra@diku.dk>
* src/sheet.c (sheet_cell_add_to_hash): Plug leak.
......
......@@ -26,6 +26,7 @@ Andreas:
* Fix CONCATENATE (#78610)
* Add number of sheets preference
* Start to UTF8 some of the string functions
* Preserve autocorrect exception lists
Jody:
* Add password dialog to support encrypted input.
......
2002-04-15 Andreas J. Guelzow <aguelzow@taliesin.ca>
* schemas/gnumeric-dialogs.schemas : add more preferences
* src/application.c : move autocorrect_init into src/main.c
* src/gnumeric-gconf.h : added defines and comments
* src/main.c : add autocorrect_init and autocorrect_shutdown
2002-04-15 Morten Welinder <terra@diku.dk>
* src/sheet.c (sheet_cell_add_to_hash): Plug leak.
......
2002-04-15 Andreas J. Guelzow <aguelzow@taliesin.ca>
* schemas/gnumeric-dialogs.schemas : add more preferences
* src/application.c : move autocorrect_init into src/main.c
* src/gnumeric-gconf.h : added defines and comments
* src/main.c : add autocorrect_init and autocorrect_shutdown
2002-04-15 Morten Welinder <terra@diku.dk>
* src/sheet.c (sheet_cell_add_to_hash): Plug leak.
......
......@@ -21,6 +21,70 @@
<long>The function selector keeps a list of recently used functions. This is the maximum length of that list.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/autocorrect/init-caps</key>
<applyto>/apps/gnumeric/autocorrect/init-caps</applyto>
<owner>Gnumeric</owner>
<type>bool</type>
<default>TRUE</default>
<locale name="C">
<short>Autocorrect Initial Caps</short>
<long>Autocorrect initial caps</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/autocorrect/init-caps-list</key>
<applyto>/apps/gnumeric/autocorrect/init-caps-list</applyto>
<owner>Gnumeric</owner>
<type>list</type>
<locale name="C">
<short>List of Init Caps Exceptions</short>
<long>The autocorrect engine does not correct the inital caps for words in this list.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/autocorrect/first-letter</key>
<applyto>/apps/gnumeric/autocorrect/first-letter</applyto>
<owner>Gnumeric</owner>
<type>bool</type>
<default>TRUE</default>
<locale name="C">
<short>Autocorrect First Letter</short>
<long>Autocorrect first letter</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/autocorrect/first-letter-list</key>
<applyto>/apps/gnumeric/autocorrect//first-letter-list</applyto>
<owner>Gnumeric</owner>
<type>list</type>
<locale name="C">
<short>List of First Letter Exceptions</short>
<long>The autocorrect engine does not correct the first letter for words in this list.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/autocorrect/names-of-days</key>
<applyto>/apps/gnumeric/autocorrect/names-of-days</applyto>
<owner>Gnumeric</owner>
<type>bool</type>
<default>TRUE</default>
<locale name="C">
<short>Autocorrect Names od Days</short>
<long>Autocorrect names of days</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/autocorrect/replace</key>
<applyto>/apps/gnumeric/autocorrect/replace</applyto>
<owner>Gnumeric</owner>
<type>bool</type>
<default>TRUE</default>
<locale name="C">
<short>Autocorrect Replace</short>
<long>Autocorrect replace</long>
</locale>
</schema>
</schemalist>
</gconfschemafile>
......@@ -21,6 +21,70 @@
<long>The function selector keeps a list of recently used functions. This is the maximum length of that list.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/autocorrect/init-caps</key>
<applyto>/apps/gnumeric/autocorrect/init-caps</applyto>
<owner>Gnumeric</owner>
<type>bool</type>
<default>TRUE</default>
<locale name="C">
<short>Autocorrect Initial Caps</short>
<long>Autocorrect initial caps</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/autocorrect/init-caps-list</key>
<applyto>/apps/gnumeric/autocorrect/init-caps-list</applyto>
<owner>Gnumeric</owner>
<type>list</type>
<locale name="C">
<short>List of Init Caps Exceptions</short>
<long>The autocorrect engine does not correct the inital caps for words in this list.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/autocorrect/first-letter</key>
<applyto>/apps/gnumeric/autocorrect/first-letter</applyto>
<owner>Gnumeric</owner>
<type>bool</type>
<default>TRUE</default>
<locale name="C">
<short>Autocorrect First Letter</short>
<long>Autocorrect first letter</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/autocorrect/first-letter-list</key>
<applyto>/apps/gnumeric/autocorrect//first-letter-list</applyto>
<owner>Gnumeric</owner>
<type>list</type>
<locale name="C">
<short>List of First Letter Exceptions</short>
<long>The autocorrect engine does not correct the first letter for words in this list.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/autocorrect/names-of-days</key>
<applyto>/apps/gnumeric/autocorrect/names-of-days</applyto>
<owner>Gnumeric</owner>
<type>bool</type>
<default>TRUE</default>
<locale name="C">
<short>Autocorrect Names od Days</short>
<long>Autocorrect names of days</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/autocorrect/replace</key>
<applyto>/apps/gnumeric/autocorrect/replace</applyto>
<owner>Gnumeric</owner>
<type>bool</type>
<default>TRUE</default>
<locale name="C">
<short>Autocorrect Replace</short>
<long>Autocorrect replace</long>
</locale>
</schema>
</schemalist>
</gconfschemafile>
......@@ -199,7 +199,6 @@ application_init (void)
if (err || app.auto_expr_recalc_lag == 0)
app.auto_expr_recalc_lag = 200;
autocorrect_init ();
}
static GList *workbook_list = NULL;
......
2002-04-15 Andreas J. Guelzow <aguelzow@taliesin.ca>
* dialog-autocorrect.c : make exception lists into GSList (rather
than GList)
* dialog-preferences.c : move gconf keys for fonts into
gnumeric-gconf.h, synchronize gconf on destroy
2002-04-15 Andreas J. Guelzow <aguelzow@taliesin.ca>
* dialog-preferences.c : add more preferences
......
......@@ -22,6 +22,14 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
/*
* FIXME: since we are displaying gconf data, we should register a notification and
* update our info on gconf changes!
*
*/
#include <gnumeric-config.h>
#include <gnumeric.h>
#include "dialogs.h"
......@@ -32,13 +40,14 @@
#include <libgnome/gnome-i18n.h>
#include <glade/glade.h>
#include <gal/util/e-util.h>
typedef struct {
gboolean changed;
gint row;
GtkWidget *entry;
GtkWidget *list;
GList *exceptions;
GSList *exceptions;
} AutoCorrectExceptionState;
typedef struct {
......@@ -56,7 +65,7 @@ cb_add_clicked (GtkWidget *widget, AutoCorrectExceptionState *s)
{
gchar const *txt;
gchar *dumy[2], *str;
GList *ptr;
GSList *ptr;
gboolean new_flag = TRUE;
txt = gtk_entry_get_text (GTK_ENTRY (s->entry));
......@@ -77,7 +86,7 @@ cb_add_clicked (GtkWidget *widget, AutoCorrectExceptionState *s)
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_list_prepend (s->exceptions, str);
s->exceptions = g_slist_prepend (s->exceptions, str);
s->changed = TRUE;
}
gtk_entry_set_text (GTK_ENTRY (s->entry), "");
......@@ -90,7 +99,7 @@ cb_remove_clicked (GtkWidget *widget, AutoCorrectExceptionState *s)
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_list_remove (s->exceptions, x);
s->exceptions = g_slist_remove (s->exceptions, x);
g_free (x);
s->changed = TRUE;
}
......@@ -106,18 +115,18 @@ cb_select_row (GtkWidget *widget, gint row, gint col, GdkEventButton *event,
static void
autocorrect_init_exception_list (AutoCorrectState *state,
AutoCorrectExceptionState *exception,
GList *exceptions,
GSList const *exceptions,
char const *entry_name,
char const *list_name,
char const *add_name,
char const *remove_name)
{
GtkWidget *w;
GList *ptr;
GSList *ptr;
exception->changed = FALSE;
exception->row = -1;
exception->exceptions = exceptions;
exception->exceptions = NULL;
exception->entry = glade_xml_get_widget (state->glade, entry_name);
exception->list = glade_xml_get_widget (state->glade, list_name);
gnumeric_editable_enters (GTK_WINDOW (state->dialog),
......@@ -125,15 +134,19 @@ autocorrect_init_exception_list (AutoCorrectState *state,
g_signal_connect (G_OBJECT (exception->list),
"select_row",
G_CALLBACK (cb_select_row), exception);
for (ptr = exceptions; ptr != NULL; ptr = ptr->next) {
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);
}
exception->exceptions = g_slist_reverse (exception->exceptions);
w = glade_xml_get_widget (state->glade, add_name);
g_signal_connect (G_OBJECT (w),
......@@ -170,6 +183,11 @@ ac_dialog_toggle_init (AutoCorrectState *state, char const *name,
static gboolean
cb_autocorrect_destroy (GtkObject *w, AutoCorrectState *state)
{
e_free_string_slist (state->init_caps.exceptions);
state->init_caps.exceptions = NULL;
e_free_string_slist (state->first_letter.exceptions);
state->first_letter.exceptions = NULL;
if (state->glade != NULL) {
g_object_unref (G_OBJECT (state->glade));
state->glade = NULL;
......
......@@ -310,8 +310,7 @@ cb_value_edited (GtkCellRendererText *cell,
value = format_match_number (new_text, NULL);
if (value != NULL) {
the_float = value_get_as_float (value);
gconf_client_set_float (application_get_gconf_client (),
key, the_float, NULL);
gconf_client_set_float (client, key, the_float, NULL);
}
if (value)
value_release (value);
......@@ -320,8 +319,7 @@ cb_value_edited (GtkCellRendererText *cell,
value = format_match_number (new_text, NULL);
if (value != NULL) {
the_int = value_get_as_int (value);
gconf_client_set_int (application_get_gconf_client (),
key, the_int, NULL);
gconf_client_set_int (client, key, the_int, NULL);
}
if (value)
value_release (value);
......@@ -331,8 +329,7 @@ cb_value_edited (GtkCellRendererText *cell,
if (value != NULL) {
err = FALSE;
the_bool = value_get_as_bool (value, &err);
gconf_client_set_bool (application_get_gconf_client (),
key, the_bool, NULL);
gconf_client_set_bool (client, key, the_bool, NULL);
}
if (value)
value_release (value);
......@@ -437,16 +434,11 @@ static GtkWidget *pref_tree_initializer (PrefState *state, gpointer data,
/* Default Font Selector */
/*******************************************************************************************/
#define GCONF_FONT_NAME "/apps/gnumeric/core/defaultfont/name"
#define GCONF_FONT_SIZE "/apps/gnumeric/core/defaultfont/size"
#define GCONF_FONT_BOLD "/apps/gnumeric/core/defaultfont/bold"
#define GCONF_FONT_ITALIC "/apps/gnumeric/core/defaultfont/italic"
static void
pref_font_page_open (PrefState *state, gpointer data,
GtkNotebook *notebook, gint page_num)
{
dialog_pref_load_description_from_schema (state, "/schemas" GCONF_FONT_NAME);
dialog_pref_load_description_from_schema (state, "/schemas" GNUMERIC_GCONF_FONT_NAME);
}
static void
......@@ -454,26 +446,26 @@ cb_pref_font_set_fonts (GConfClient *gconf, guint cnxn_id, GConfEntry *entry,
GtkWidget *page)
{
if (entry == NULL || 0 == strcmp (gconf_entry_get_key (entry),
GCONF_FONT_NAME)) {
GNUMERIC_GCONF_FONT_NAME)) {
char *font_name = gconf_client_get_string (gconf,
GCONF_FONT_NAME, NULL);
GNUMERIC_GCONF_FONT_NAME, NULL);
font_selector_set_name (FONT_SELECTOR (page), font_name);
g_free (font_name);
}
if (entry == NULL || 0 == strcmp (gconf_entry_get_key (entry),
GCONF_FONT_SIZE)) {
GNUMERIC_GCONF_FONT_SIZE)) {
double size = gconf_client_get_float (gconf,
GCONF_FONT_SIZE, NULL);
GNUMERIC_GCONF_FONT_SIZE, NULL);
font_selector_set_points (FONT_SELECTOR (page), size);
}
if (entry == NULL || 0 == strcmp (gconf_entry_get_key (entry),
GCONF_FONT_BOLD)
GNUMERIC_GCONF_FONT_BOLD)
|| 0 == strcmp (gconf_entry_get_key (entry),
GCONF_FONT_ITALIC)) {
GNUMERIC_GCONF_FONT_ITALIC)) {
gboolean is_bold = gconf_client_get_bool (gconf,
GCONF_FONT_BOLD, NULL);
GNUMERIC_GCONF_FONT_BOLD, NULL);
gboolean is_italic = gconf_client_get_bool (gconf,
GCONF_FONT_ITALIC, NULL);
GNUMERIC_GCONF_FONT_ITALIC, NULL);
font_selector_set_style (FONT_SELECTOR (page), is_bold, is_italic);
}
}
......@@ -483,19 +475,19 @@ cb_pref_font_has_changed (FontSelector *fs, MStyle *mstyle, PrefState *state)
{
if (mstyle_is_element_set (mstyle, MSTYLE_FONT_SIZE))
gconf_client_set_float (state->gconf,
GCONF_FONT_SIZE,
GNUMERIC_GCONF_FONT_SIZE,
mstyle_get_font_size (mstyle), NULL);
if (mstyle_is_element_set (mstyle, MSTYLE_FONT_NAME))
gconf_client_set_string (state->gconf,
GCONF_FONT_NAME,
GNUMERIC_GCONF_FONT_NAME,
mstyle_get_font_name (mstyle), NULL);
if (mstyle_is_element_set (mstyle, MSTYLE_FONT_BOLD))
gconf_client_set_bool (state->gconf,
GCONF_FONT_BOLD,
GNUMERIC_GCONF_FONT_BOLD,
mstyle_get_font_bold (mstyle), NULL);
if (mstyle_is_element_set (mstyle, MSTYLE_FONT_ITALIC))
gconf_client_set_bool (state->gconf,
GCONF_FONT_ITALIC,
GNUMERIC_GCONF_FONT_ITALIC,
mstyle_get_font_italic (mstyle), NULL);
return TRUE;
}
......@@ -509,7 +501,7 @@ GtkWidget *pref_font_initializer (PrefState *state, gpointer data,
cb_pref_font_set_fonts (state->gconf, 0, NULL, page);
notification = gconf_client_notify_add (state->gconf, "/apps/gnumeric/core/defaultfont",
notification = gconf_client_notify_add (state->gconf, GNUMERIC_GCONF_FONT_DIRECTORY,
(GConfClientNotifyFunc) cb_pref_font_set_fonts,
page, NULL, NULL);
......@@ -764,6 +756,9 @@ static page_info_t page_info[] = {
static gboolean
cb_preferences_destroy (GtkWidget *widget, PrefState *state)
{
if (state->gconf)
gconf_client_suggest_sync (state->gconf, NULL);
if (state->gui != NULL) {
g_object_unref (G_OBJECT (state->gui));
state->gui = NULL;
......
#ifndef GNUMERIC_GCONF_H
#define GNUMERIC_GCONF_H
#define GNUMERIC_GCONF_UNDO_SIZE "/apps/gnumeric/undo/size"
#define GNUMERIC_GCONF_UNDO_MAXNUM "/apps/gnumeric/undo/maxnum"
#define GNUMERIC_GCONF_UNDO_SHOW_SHEET_NAME "/apps/gnumeric/undo/show_sheet_name"
#define GNUMERIC_GCONF_UNDO_MAX_DESCRIPTOR_WIDTH "/apps/gnumeric/undo/max_descriptor_width"
/*
* Note: This file must stay synchronized with the corresponding schema file!
*
*
*/
/*
* schemas/gnumeric-dialogs.schemas
*/
#define GNUMERIC_GCONF_UNDO_DIRECTORY "/apps/gnumeric/undo"
#define GNUMERIC_GCONF_UNDO_SIZE GNUMERIC_GCONF_UNDO_DIRECTORY "/size"
#define GNUMERIC_GCONF_UNDO_MAXNUM GNUMERIC_GCONF_UNDO_DIRECTORY "/maxnum"
#define GNUMERIC_GCONF_UNDO_SHOW_SHEET_NAME GNUMERIC_GCONF_UNDO_DIRECTORY "/show_sheet_name"
#define GNUMERIC_GCONF_UNDO_MAX_DESCRIPTOR_WIDTH GNUMERIC_GCONF_UNDO_DIRECTORY "/max_descriptor_width"
#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"
/*
* schemas/gnumeric-general.schemas
*/
#define GNUMERIC_GCONF_FONT_DIRECTORY "/apps/gnumeric/core/defaultfont"
#define GNUMERIC_GCONF_FONT_NAME GNUMERIC_GCONF_FONT_DIRECTORY "/name"
#define GNUMERIC_GCONF_FONT_SIZE GNUMERIC_GCONF_FONT_DIRECTORY "/size"
#define GNUMERIC_GCONF_FONT_BOLD GNUMERIC_GCONF_FONT_DIRECTORY "/bold"
#define GNUMERIC_GCONF_FONT_ITALIC GNUMERIC_GCONF_FONT_DIRECTORY "/italic"
#define GNUMERIC_GCONF_FILE_HISTORY_N "/apps/gnumeric/core/file/history/n"
#define GNUMERIC_GCONF_FILE_HISTORY_FILES "/apps/gnumeric/core/file/history/files"
#define GNUMERIC_GCONF_WORKBOOK_NSHEETS "/apps/gnumeric/core/workbook/n-sheet"
#define GNUMERIC_GCONF_GUI_RES_H "/apps/gnumeric/core/gui/screen/horizontaldpi"
#define GNUMERIC_GCONF_GUI_RES_V "/apps/gnumeric/core/gui/screen/verticaldpi"
#define GNUMERIC_GCONF_GUI_ED_AUTOCOMPLETE "/apps/gnumeric/core/gui/editing/autocomplete"
......@@ -20,5 +54,6 @@
#include <gconf/gconf-client.h>
#endif /* GNUMERIC_GRAPH_H */
......@@ -40,6 +40,7 @@
#include "expr.h"
#include "rendered-value.h"
#include "gnumeric-gconf.h"
#include "auto-correct.h"
#include <sys/types.h>
#include <sys/stat.h>
......@@ -222,6 +223,7 @@ main (int argc, char *argv [])
print_init ();
autofill_init ();
sheet_object_register ();
autocorrect_init ();
/* The statically linked in file formats */
xml_init ();
......@@ -325,6 +327,7 @@ main (int argc, char *argv [])
application_release_pref_dialog ();
autocorrect_shutdown ();
plugins_shutdown ();
print_shutdown ();
auto_format_shutdown ();
......
......@@ -40,6 +40,7 @@
#include "expr.h"
#include "rendered-value.h"
#include "gnumeric-gconf.h"
#include "auto-correct.h"
#include <sys/types.h>
#include <sys/stat.h>
......@@ -222,6 +223,7 @@ main (int argc, char *argv [])
print_init ();
autofill_init ();
sheet_object_register ();
autocorrect_init ();
/* The statically linked in file formats */
xml_init ();
......@@ -325,6 +327,7 @@ main (int argc, char *argv [])
application_release_pref_dialog ();
autocorrect_shutdown ();
plugins_shutdown ();
print_shutdown ();
auto_format_shutdown ();
......
2002-04-15 Andreas J. Guelzow <aguelzow@taliesin.ca>
* auto-correct.[ch] : switch from gnome-config to gconf and make
preserve autocorrect exceptions. Make exception lists into
GSList
2002-04-13 Andreas J. Guelzow <aguelzow@taliesin.ca>
* dao.c (dao_command_descriptor) : use cmd_range_to_str_utility
......
......@@ -27,11 +27,13 @@
#include "gnumeric.h"
#include "auto-correct.h"
#include "dates.h"
#include "application.h"
#include <ctype.h>
#include <string.h>
#include <libgnome/gnome-config.h>
#include <gnumeric-gconf.h>
#include <libgnome/gnome-i18n.h>
#include <gal/util/e-util.h>
static struct {
gboolean init_caps : 1;
......@@ -40,35 +42,75 @@ static struct {
gboolean replace : 1;
struct {
GList *first_letter;
GList *init_caps;
GSList *first_letter;
GSList *init_caps;
} exceptions;
guint notification_id;
} autocorrect;
static void
cb_autocorrect_notification (GConfClient *gconf, guint cnxn_id, GConfEntry *entry,
gpointer ignore)
{
autocorrect_init ();
}
void
autocorrect_init (void)
{
gnome_config_push_prefix ("Gnumeric/AutoCorrect/");
autocorrect.init_caps = gnome_config_get_bool ("init_caps=true");
autocorrect.first_letter = gnome_config_get_bool ("first_letter=true");
autocorrect.names_of_days = gnome_config_get_bool ("names_of_days=true");
autocorrect.replace = gnome_config_get_bool ("replace=true");
gnome_config_pop_prefix ();
/* TODO */
GConfClient *client = application_get_gconf_client ();
autocorrect.init_caps = gconf_client_get_bool (client, AUTOCORRECT_INIT_CAPS, NULL);
autocorrect.first_letter = gconf_client_get_bool (client, AUTOCORRECT_FIRST_LETTER, NULL);
autocorrect.names_of_days = gconf_client_get_bool (client, AUTOCORRECT_NAMES_OF_DAYS,
NULL);
autocorrect.replace = gconf_client_get_bool (client, AUTOCORRECT_REPLACE, NULL);
e_free_string_slist (autocorrect.exceptions.first_letter);
autocorrect.exceptions.first_letter = gconf_client_get_list (client,
AUTOCORRECT_FIRST_LETTER_LIST,
GCONF_VALUE_STRING, NULL);
e_free_string_slist (autocorrect.exceptions.init_caps);
autocorrect.exceptions.init_caps = gconf_client_get_list (client,
AUTOCORRECT_INIT_CAPS_LIST,
GCONF_VALUE_STRING, NULL);
autocorrect.notification_id = gconf_client_notify_add (client, AUTOCORRECT_DIRECTORY,
(GConfClientNotifyFunc) cb_autocorrect_notification,
NULL, NULL, NULL);
}
void
autocorrect_shutdown (void)
{