[gnumeric] Conf: enhance gnumeric-gconf to allow monitoring.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnumeric] Conf: enhance gnumeric-gconf to allow monitoring.
- Date: Wed, 1 Jul 2009 18:03:04 +0000 (UTC)
commit 128ae8b26d31de07a71b4dfa714d7d8dc8c27fe4
Author: Morten Welinder <terra gnome org>
Date: Wed Jul 1 14:02:34 2009 -0400
Conf: enhance gnumeric-gconf to allow monitoring.
ChangeLog | 4 +
README | 4 +-
configure.in | 2 +-
gnumeric.spec.in | 2 +-
src/Makefile.am | 1 -
src/dialogs/ChangeLog | 5 +
src/dialogs/dialog-preferences.c | 286 +++++++-------
src/gnumeric-gconf-priv.h | 139 -------
src/gnumeric-gconf.c | 778 +++++++++++++++++++++++++++++++++++-
src/gnumeric-gconf.h | 109 +++++
src/print-info.c | 1 -
src/tools/auto-correct.c | 5 +-
src/widgets/ChangeLog | 5 +
src/widgets/widget-font-selector.c | 26 +-
tools/ChangeLog | 5 +
tools/handle-conf-options | 28 ++-
16 files changed, 1088 insertions(+), 312 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 30e79de..84b9cd3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-07-01 Morten Welinder <terra gnome org>
+
+ * configure.in (libspreadsheet_reqs): Require goffice 0.7.9
+
2009-06-30 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/sheet.c (sheet_get_nominal_printarea): make sure the
diff --git a/README b/README
index 313f9cd..ebe9c8e 100644
--- a/README
+++ b/README
@@ -16,8 +16,8 @@ Requirements
You need: Debian package name
glib >= 2.10.0 libglib2.0-dev
gtk+ >= 2.12.0 libgtk2.0-dev
- libgsf >= 1.14.13 libgsf-1-dev
- libgoffice >= 0.7.5 libgoffice-0-5-dev
+ libgsf >= 1.14.15 libgsf-1-dev
+ libgoffice >= 0.7.9 libgoffice-0-5-dev
libglade >= 2.3.6 libglade2-dev
gnome-xml >= 2.4.12 libxml2-dev
pango >= 1.12.0 libpango1.0-dev
diff --git a/configure.in b/configure.in
index ecb5a43..88906c6 100644
--- a/configure.in
+++ b/configure.in
@@ -141,7 +141,7 @@ PKG_PROG_PKG_CONFIG(0.18)
dnl *****************************
libspreadsheet_reqs="
- libgoffice-${GOFFICE_API_VER} >= 0.7.8
+ libgoffice-${GOFFICE_API_VER} >= 0.7.9
libgsf-1 >= 1.14.15
libxml-2.0 >= 2.4.12
"
diff --git a/gnumeric.spec.in b/gnumeric.spec.in
index cf265d7..adb1221 100644
--- a/gnumeric.spec.in
+++ b/gnumeric.spec.in
@@ -13,7 +13,7 @@ License: GPLv2
URL: http://www.gnome.org/gnumeric/
Source: ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/1.9/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}-root
-BuildRequires: goffice-devel >= 0.7.8
+BuildRequires: goffice-devel >= 0.7.9
BuildRequires: libgsf-devel >= 1.14.15
BuildRequires: libxml-2.0-devel >= 2.4.12
BuildRequires: glib-2.0-devel >= 2.12.0
diff --git a/src/Makefile.am b/src/Makefile.am
index 32925d8..0fade90 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -189,7 +189,6 @@ libspreadsheet_la_SOURCES = \
xml-sax-read.c \
xml-sax-write.c \
gnumeric-gconf.c \
- gnumeric-gconf-priv.h \
print.c \
print-cell.c
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index 5bcdd7c..cb66b1e 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,8 @@
+2009-07-01 Morten Welinder <terra gnome org>
+
+ * dialog-preferences.c: Cleanup using gnumeric-gconf's new
+ abilities.
+
2009-06-29 Morten Welinder <terra gnome org>
* dialog-function-select.c (make_expr_example): New function.
diff --git a/src/dialogs/dialog-preferences.c b/src/dialogs/dialog-preferences.c
index 0f69913..b8a8ca1 100644
--- a/src/dialogs/dialog-preferences.c
+++ b/src/dialogs/dialog-preferences.c
@@ -39,7 +39,6 @@
#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>
@@ -73,7 +72,8 @@ typedef void (* gboolean_conf_setter_t) (gboolean value);
typedef void (* enum_conf_setter_t) (int value);
static void
-dialog_pref_add_item (PrefState *state, char const *page_name, char const *icon_name,
+dialog_pref_add_item (PrefState *state, char const *page_name,
+ char const *icon_name,
int page, char const* parent_path)
{
GtkTreeIter iter, parent;
@@ -95,9 +95,9 @@ dialog_pref_add_item (PrefState *state, char const *page_name, char const *icon_
}
static void
-set_tip (GOConfNode *node, char const *key, GtkWidget *w)
+set_tip (GOConfNode *node, GtkWidget *w)
{
- char *desc = go_conf_get_long_desc (node, key);
+ char *desc = go_conf_get_long_desc (node, NULL);
if (desc != NULL) {
go_widget_set_tooltip_text (w, desc);
g_free (desc);
@@ -111,10 +111,10 @@ cb_pref_notification_destroy (gpointer handle)
}
static void
-connect_notification (GOConfNode *node, char const *key, GOConfMonitorFunc func,
+connect_notification (GOConfNode *node, GOConfMonitorFunc func,
gpointer data, GtkWidget *container)
{
- guint handle = go_conf_add_monitor (node, key, func, data);
+ guint handle = go_conf_add_monitor (node, NULL, func, data);
g_signal_connect_swapped (G_OBJECT (container), "destroy",
G_CALLBACK (cb_pref_notification_destroy),
GUINT_TO_POINTER (handle));
@@ -123,13 +123,13 @@ connect_notification (GOConfNode *node, char const *key, GOConfMonitorFunc func,
/*************************************************************************/
static void
-pref_create_label (GOConfNode *node, char const *key, GtkWidget *table,
+pref_create_label (GOConfNode *node, GtkWidget *table,
gint row, gchar const *default_label, GtkWidget *w)
{
GtkWidget *label;
if (NULL == default_label) {
- char *desc = go_conf_get_short_desc (node, key);
+ char *desc = go_conf_get_short_desc (node, NULL);
label = gtk_label_new (desc);
g_free (desc);
} else
@@ -151,37 +151,46 @@ static void
bool_pref_widget_to_conf (GtkToggleButton *button,
gboolean_conf_setter_t setter)
{
- setter (gtk_toggle_button_get_active (button));
+ GOConfNode *node = g_object_get_data (G_OBJECT (button), "node");
+ gboolean val_in_button = gtk_toggle_button_get_active (button);
+ gboolean val_in_conf = go_conf_get_bool (node, NULL);
+ if ((!val_in_button) != (!val_in_conf))
+ setter (val_in_button);
}
+
static void
-bool_pref_conf_to_widget (GOConfNode *node, char const *key, GtkToggleButton *button)
+bool_pref_conf_to_widget (GOConfNode *node, G_GNUC_UNUSED char const *key,
+ GtkToggleButton *button)
{
gboolean val_in_button = gtk_toggle_button_get_active (button);
- gboolean val_in_conf = go_conf_get_bool (node, key);
+ gboolean val_in_conf = go_conf_get_bool (node, NULL);
if ((!val_in_button) != (!val_in_conf))
gtk_toggle_button_set_active (button, val_in_conf);
}
+
static void
-bool_pref_create_widget (GOConfNode *node, char const *key, GtkWidget *table,
+bool_pref_create_widget (GOConfNode *node, GtkWidget *table,
gint row, gboolean_conf_setter_t setter,
char const *default_label)
{
- char *desc = go_conf_get_short_desc (node, key);
+ char *desc = go_conf_get_short_desc (node, NULL);
GtkWidget *item = gtk_check_button_new_with_label (
(desc != NULL) ? desc : default_label);
g_free (desc);
- bool_pref_conf_to_widget (node, key, GTK_TOGGLE_BUTTON (item));
+ bool_pref_conf_to_widget (node, NULL, GTK_TOGGLE_BUTTON (item));
+ g_object_set_data (G_OBJECT (item), "node", node);
g_signal_connect (G_OBJECT (item), "toggled",
- G_CALLBACK (bool_pref_widget_to_conf), (gpointer) setter);
+ G_CALLBACK (bool_pref_widget_to_conf),
+ (gpointer) setter);
gtk_table_attach (GTK_TABLE (table), item,
0, 2, row, row + 1,
GTK_FILL | GTK_SHRINK, GTK_FILL | GTK_SHRINK, 5, 5);
- connect_notification (node, key, (GOConfMonitorFunc)bool_pref_conf_to_widget,
+ connect_notification (node, (GOConfMonitorFunc)bool_pref_conf_to_widget,
item, table);
- set_tip (node, key, item);
+ set_tip (node, item);
}
/*************************************************************************/
@@ -205,19 +214,19 @@ typedef struct {
static gboolean
cb_find_enum (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter,
- FindEnumClosure *close)
+ FindEnumClosure *cls)
{
gboolean res = FALSE;
char *combo_val;
g_return_val_if_fail (model != NULL, FALSE);
- g_return_val_if_fail (close->val != NULL, FALSE);
+ g_return_val_if_fail (cls->val != NULL, FALSE);
gtk_tree_model_get (model, iter, 0, &combo_val, -1);
if (combo_val) {
- if (0 == strcmp (close->val, combo_val)) {
+ if (0 == strcmp (cls->val, combo_val)) {
res = TRUE;
- gtk_combo_box_set_active_iter (close->combo, iter);
+ gtk_combo_box_set_active_iter (cls->combo, iter);
}
g_free (combo_val);
}
@@ -225,22 +234,24 @@ cb_find_enum (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter,
}
static void
-enum_pref_conf_to_widget (GOConfNode *node, char const *key, GtkComboBox *combo)
+enum_pref_conf_to_widget (GOConfNode *node, G_GNUC_UNUSED char const *key,
+ GtkComboBox *combo)
{
- FindEnumClosure close;
+ FindEnumClosure cls;
GtkTreeModel *model = gtk_combo_box_get_model (combo);
- close.combo = combo;
- close.val = go_conf_get_enum_as_str (node, key);
- if (NULL != close.val) { /* in case go_conf fails */
+ cls.combo = combo;
+ cls.val = go_conf_get_enum_as_str (node, NULL);
+ if (NULL != cls.val) { /* in case go_conf fails */
gtk_tree_model_foreach (model,
- (GtkTreeModelForeachFunc) cb_find_enum, &close);
- g_free (close.val);
+ (GtkTreeModelForeachFunc)cb_find_enum,
+ &cls);
+ g_free (cls.val);
}
}
static void
-enum_pref_create_widget (GOConfNode *node, char const *key, GtkWidget *table,
+enum_pref_create_widget (GOConfNode *node, GtkWidget *table,
gint row, GType enum_type,
enum_conf_setter_t setter,
gchar const *default_label)
@@ -268,18 +279,18 @@ enum_pref_create_widget (GOConfNode *node, char const *key, GtkWidget *table,
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), renderer, "text", 0, NULL);
- enum_pref_conf_to_widget (node, key, GTK_COMBO_BOX (combo));
+ enum_pref_conf_to_widget (node, NULL, GTK_COMBO_BOX (combo));
gtk_table_attach (GTK_TABLE (table), combo,
1, 2, row, row + 1,
GTK_FILL | GTK_SHRINK, GTK_FILL | GTK_SHRINK, 5, 5);
g_signal_connect (G_OBJECT (combo), "changed",
G_CALLBACK (cb_enum_changed), (gpointer) setter);
- connect_notification (node, key,
- (GOConfMonitorFunc)enum_pref_conf_to_widget, combo, table);
+ connect_notification (node, (GOConfMonitorFunc)enum_pref_conf_to_widget,
+ combo, table);
- pref_create_label (node, key, table, row, default_label, combo);
- set_tip (node, key, combo);
+ pref_create_label (node, table, row, default_label, combo);
+ set_tip (node, combo);
}
/*************************************************************************/
@@ -287,22 +298,27 @@ enum_pref_create_widget (GOConfNode *node, char const *key, GtkWidget *table,
static void
int_pref_widget_to_conf (GtkSpinButton *button, gint_conf_setter_t setter)
{
- g_return_if_fail (setter != NULL);
+ GOConfNode *node = g_object_get_data (G_OBJECT (button), "node");
+ gint val_in_button = gtk_spin_button_get_value_as_int (button);
+ gint val_in_conf = go_conf_get_int (node, NULL);
- setter (gtk_spin_button_get_value_as_int (button));
+ if (val_in_conf != val_in_button)
+ setter (val_in_button);
}
static void
-int_pref_conf_to_widget (GOConfNode *node, char const *key, GtkSpinButton *button)
+int_pref_conf_to_widget (GOConfNode *node, G_GNUC_UNUSED char const *key,
+ GtkSpinButton *button)
{
gint val_in_button = gtk_spin_button_get_value_as_int (button);
- gint val_in_conf = go_conf_get_int (node, key);
+ gint val_in_conf = go_conf_get_int (node, NULL);
+
if (val_in_conf != val_in_button)
gtk_spin_button_set_value (button, (gdouble) val_in_conf);
}
static GtkWidget *
-int_pref_create_widget (GOConfNode *node, char const *key, GtkWidget *table,
+int_pref_create_widget (GOConfNode *node, GtkWidget *table,
gint row, gint val, gint from, gint to, gint step,
gint_conf_setter_t setter, char const *default_label)
{
@@ -310,7 +326,8 @@ int_pref_create_widget (GOConfNode *node, char const *key, GtkWidget *table,
(gtk_adjustment_new (val, from, to, step, step, 0));
GtkWidget *w = gtk_spin_button_new (adj, 1, 0);
- int_pref_conf_to_widget (node, key, GTK_SPIN_BUTTON (w));
+ int_pref_conf_to_widget (node, NULL, GTK_SPIN_BUTTON (w));
+ g_object_set_data (G_OBJECT (w), "node", node);
gtk_table_attach (GTK_TABLE (table), w,
1, 2, row, row + 1,
GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_SHRINK, 5, 2);
@@ -318,12 +335,11 @@ int_pref_create_widget (GOConfNode *node, char const *key, GtkWidget *table,
g_signal_connect (G_OBJECT (w), "value-changed",
G_CALLBACK (int_pref_widget_to_conf),
(gpointer) setter);
- connect_notification (node, key,
- (GOConfMonitorFunc)int_pref_conf_to_widget,
+ connect_notification (node, (GOConfMonitorFunc)int_pref_conf_to_widget,
w, table);
- pref_create_label (node, key, table, row, default_label, w);
- set_tip (node, key, w);
+ pref_create_label (node, table, row, default_label, w);
+ set_tip (node, w);
return w;
}
@@ -358,22 +374,26 @@ power_of_2_handlers (GtkWidget *w)
static void
double_pref_widget_to_conf (GtkSpinButton *button, double_conf_setter_t setter)
{
- g_return_if_fail (setter != NULL);
+ GOConfNode *node = g_object_get_data (G_OBJECT (button), "node");
+ double val_in_button = gtk_spin_button_get_value (button);
+ double val_in_conf = go_conf_get_double (node, NULL);
- setter (gtk_spin_button_get_value (button));
+ if (fabs (val_in_conf - val_in_button) > 1e-10) /* dead simple */
+ setter (val_in_button);
}
static void
-double_pref_conf_to_widget (GOConfNode *node, char const *key, GtkSpinButton *button)
+double_pref_conf_to_widget (GOConfNode *node, G_GNUC_UNUSED char const *key,
+ GtkSpinButton *button)
{
double val_in_button = gtk_spin_button_get_value (button);
- double val_in_conf = go_conf_get_double (node, key);
+ double val_in_conf = go_conf_get_double (node, NULL);
if (fabs (val_in_conf - val_in_button) > 1e-10) /* dead simple */
gtk_spin_button_set_value (button, val_in_conf);
}
static void
-double_pref_create_widget (GOConfNode *node, char const *key, GtkWidget *table,
+double_pref_create_widget (GOConfNode *node, GtkWidget *table,
gint row, gnm_float val, gnm_float from,gnm_float to,
gnm_float step,
gint digits, double_conf_setter_t setter,
@@ -382,18 +402,20 @@ double_pref_create_widget (GOConfNode *node, char const *key, GtkWidget *table,
GtkWidget *w = gtk_spin_button_new (GTK_ADJUSTMENT (
gtk_adjustment_new (val, from, to, step, step, 0)),
1, digits);
- double_pref_conf_to_widget (node, key, GTK_SPIN_BUTTON (w));
+ double_pref_conf_to_widget (node, NULL, GTK_SPIN_BUTTON (w));
+ g_object_set_data (G_OBJECT (w), "node", node);
gtk_table_attach (GTK_TABLE (table), w,
1, 2, row, row + 1,
GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_SHRINK, 5, 2);
g_signal_connect (G_OBJECT (w), "value-changed",
G_CALLBACK (double_pref_widget_to_conf), (gpointer) setter);
- connect_notification (node, key,
- (GOConfMonitorFunc)double_pref_conf_to_widget, w, table);
+ connect_notification (node,
+ (GOConfMonitorFunc)double_pref_conf_to_widget,
+ w, table);
- pref_create_label (node, key, table, row, default_label, w);
- set_tip (node, key, w);
+ pref_create_label (node, table, row, default_label, w);
+ set_tip (node, w);
}
/*******************************************************************************************/
@@ -401,20 +423,17 @@ double_pref_create_widget (GOConfNode *node, char const *key, GtkWidget *table,
/*******************************************************************************************/
static void
-cb_pref_font_set_fonts (GOConfNode *node, char const *key, GtkWidget *page)
-{
- if (!key || g_str_has_suffix (key, GNM_CONF_FONT_NAME))
- font_selector_set_name (FONT_SELECTOR (page),
- gnm_conf_get_core_defaultfont_name ());
- if (!key || g_str_has_suffix (key, GNM_CONF_FONT_SIZE))
- font_selector_set_points (FONT_SELECTOR (page),
- gnm_conf_get_core_defaultfont_size ());
- if (!key ||
- g_str_has_suffix (key, GNM_CONF_FONT_BOLD) ||
- g_str_has_suffix (key, GNM_CONF_FONT_ITALIC))
- font_selector_set_style (FONT_SELECTOR (page),
- gnm_conf_get_core_defaultfont_bold (),
- gnm_conf_get_core_defaultfont_italic ());
+cb_pref_font_set_fonts (G_GNUC_UNUSED GOConfNode *node,
+ G_GNUC_UNUSED char const *key,
+ GtkWidget *page)
+{
+ FontSelector *fs = FONT_SELECTOR (page);
+
+ font_selector_set_name (fs, gnm_conf_get_core_defaultfont_name ());
+ font_selector_set_points (fs, gnm_conf_get_core_defaultfont_size ());
+ font_selector_set_style (fs,
+ gnm_conf_get_core_defaultfont_bold (),
+ gnm_conf_get_core_defaultfont_italic ());
}
static gboolean
@@ -446,12 +465,12 @@ pref_font_initializer (PrefState *state,
cb_pref_font_set_fonts (NULL, NULL, page);
- connect_notification (state->root, GNM_CONF_FONT_DIR,
- (GOConfMonitorFunc) cb_pref_font_set_fonts,
- page, page);
+ connect_notification (gnm_conf_get_core_defaultfont_dir_node (),
+ (GOConfMonitorFunc) cb_pref_font_set_fonts,
+ page, page);
g_signal_connect (G_OBJECT (page),
- "font_changed",
- G_CALLBACK (cb_pref_font_has_changed), state);
+ "font_changed",
+ G_CALLBACK (cb_pref_font_has_changed), state);
gtk_widget_show_all (page);
@@ -464,29 +483,16 @@ pref_font_initializer (PrefState *state,
static void
cb_pref_font_hf_set_fonts (G_GNUC_UNUSED GOConfNode *node,
- char const *key, GtkWidget *page)
+ G_GNUC_UNUSED char const *key,
+ GtkWidget *page)
{
FontSelector *fs = FONT_SELECTOR (page);
- if (!key ||
- g_str_has_suffix (key, PRINTSETUP_GCONF_HF_FONT_NAME)) {
- const char *name = gnm_conf_get_printsetup_hf_font_name ();
- font_selector_set_name (fs, name);
- }
-
- if (!key ||
- g_str_has_suffix (key, PRINTSETUP_GCONF_HF_FONT_SIZE)) {
- double size = gnm_conf_get_printsetup_hf_font_size ();
- font_selector_set_points (fs, size);
- }
-
- if (!key ||
- g_str_has_suffix (key, PRINTSETUP_GCONF_HF_FONT_BOLD) ||
- g_str_has_suffix (key, PRINTSETUP_GCONF_HF_FONT_ITALIC)) {
- gboolean bold = gnm_conf_get_printsetup_hf_font_bold ();
- gboolean italic = gnm_conf_get_printsetup_hf_font_italic ();
- font_selector_set_style (fs, bold, italic);
- }
+ font_selector_set_name (fs, gnm_conf_get_printsetup_hf_font_name ());
+ font_selector_set_points (fs, gnm_conf_get_printsetup_hf_font_size ());
+ font_selector_set_style (fs,
+ gnm_conf_get_printsetup_hf_font_bold (),
+ gnm_conf_get_printsetup_hf_font_italic ());
}
static gboolean
@@ -517,13 +523,13 @@ pref_font_hf_initializer (PrefState *state,
{
GtkWidget *page = font_selector_new ();
- cb_pref_font_hf_set_fonts (state->root, NULL, page);
- connect_notification (state->root, PRINTSETUP_GCONF_DIR,
- (GOConfMonitorFunc) cb_pref_font_hf_set_fonts,
- page, page);
+ cb_pref_font_hf_set_fonts (NULL, NULL, page);
+ connect_notification (gnm_conf_get_printsetup_dir_node (),
+ (GOConfMonitorFunc) cb_pref_font_hf_set_fonts,
+ page, page);
g_signal_connect (G_OBJECT (page),
- "font_changed",
- G_CALLBACK (cb_pref_font_hf_has_changed), state);
+ "font_changed",
+ G_CALLBACK (cb_pref_font_hf_has_changed), state);
gtk_widget_show_all (page);
@@ -542,26 +548,23 @@ pref_undo_page_initializer (PrefState *state,
{
GtkWidget *page = gtk_table_new (4, 2, FALSE);
gint row = 0;
- GOConfNode *node;
- node = go_conf_get_node (state->root, GNM_CONF_UNDO_DIR);
- int_pref_create_widget (node, GNM_CONF_UNDO_MAX_DESCRIPTOR_WIDTH,
+ int_pref_create_widget (gnm_conf_get_undo_max_descriptor_width_node (),
page, row++, 5, 5, 200, 1,
gnm_conf_set_undo_max_descriptor_width,
_("Length of Undo Descriptors"));
- int_pref_create_widget (node, GNM_CONF_UNDO_SIZE,
+ int_pref_create_widget (gnm_conf_get_undo_size_node (),
page, row++, 1000, 0, 30000, 100,
gnm_conf_set_undo_size,
_("Maximal Undo Size"));
- int_pref_create_widget (node, GNM_CONF_UNDO_MAXNUM,
+ int_pref_create_widget (gnm_conf_get_undo_maxnum_node (),
page, row++, 20, 1, 200, 1,
gnm_conf_set_undo_maxnum,
_("Number of Undo Items"));
- bool_pref_create_widget (node, GNM_CONF_UNDO_SHOW_SHEET_NAME,
+ bool_pref_create_widget (gnm_conf_get_undo_show_sheet_name_node (),
page, row++,
gnm_conf_set_undo_show_sheet_name,
_("Show Sheet Name in Undo List"));
- go_conf_free_node (node);
gtk_widget_show_all (page);
return page;
@@ -579,26 +582,23 @@ pref_sort_page_initializer (PrefState *state,
{
GtkWidget *page = gtk_table_new (3, 2, FALSE);
gint row = 0;
- GOConfNode *node;
- node = go_conf_get_node (state->root, GNM_CONF_SORT_DIR);
- int_pref_create_widget (node, GNM_CONF_SORT_DIALOG_MAX_INITIAL,
+ int_pref_create_widget (gnm_conf_get_core_sort_dialog_max_initial_clauses_node (),
page, row++, 10, 0, 50, 1,
gnm_conf_set_core_sort_dialog_max_initial_clauses,
_("Number of Automatic Clauses"));
- bool_pref_create_widget (node, GNM_CONF_SORT_DEFAULT_RETAIN_FORM,
+ bool_pref_create_widget (gnm_conf_get_core_sort_default_retain_formats_node (),
page, row++,
gnm_conf_set_core_sort_default_retain_formats,
_("Sorting Preserves Formats"));
- bool_pref_create_widget (node, GNM_CONF_SORT_DEFAULT_BY_CASE,
+ bool_pref_create_widget (gnm_conf_get_core_sort_default_by_case_node (),
page, row++,
gnm_conf_set_core_sort_default_by_case,
_("Sorting is Case-Sensitive"));
- bool_pref_create_widget (node, GNM_CONF_SORT_DEFAULT_ASCENDING,
+ bool_pref_create_widget (gnm_conf_get_core_sort_default_ascending_node (),
page, row++,
gnm_conf_set_core_sort_default_ascending,
_("Sort Ascending"));
- go_conf_free_node (node);
gtk_widget_show_all (page);
return page;
@@ -616,46 +616,43 @@ pref_window_page_initializer (PrefState *state,
{
GtkWidget *page = gtk_table_new (7, 2, FALSE);
gint row = 0;
- GOConfNode *node;
GtkWidget *w;
- node = go_conf_get_node (state->root, GNM_CONF_GUI_DIR);
- double_pref_create_widget (node, GNM_CONF_GUI_WINDOW_Y,
+ double_pref_create_widget (gnm_conf_get_core_gui_window_y_node (),
page, row++, 0.75, 0.25, 1, 0.05, 2,
gnm_conf_set_core_gui_window_y,
_("Default Vertical Window Size"));
- double_pref_create_widget (node, GNM_CONF_GUI_WINDOW_X,
+ double_pref_create_widget (gnm_conf_get_core_gui_window_x_node (),
page, row++, 0.75, 0.25, 1, 0.05, 2,
gnm_conf_set_core_gui_window_x,
_("Default Horizontal Window Size"));
- double_pref_create_widget (node, GNM_CONF_GUI_ZOOM,
+ double_pref_create_widget (gnm_conf_get_core_gui_window_zoom_node (),
page, row++, 1.00, 0.10, 5.00, 0.05, 2,
gnm_conf_set_core_gui_window_zoom,
_("Default Zoom Factor"));
- int_pref_create_widget (state->root, GNM_CONF_WORKBOOK_NSHEETS,
+ int_pref_create_widget (gnm_conf_get_core_workbook_n_sheet_node (),
page, row++, 1, 1, 64, 1,
gnm_conf_set_core_workbook_n_sheet,
_("Default Number of Sheets"));
- w = int_pref_create_widget (state->root, GNM_CONF_WORKBOOK_NROWS,
+ w = int_pref_create_widget (gnm_conf_get_core_workbook_n_rows_node (),
page, row++,
GNM_DEFAULT_ROWS, GNM_MIN_ROWS, GNM_MAX_ROWS, 1,
gnm_conf_set_core_workbook_n_rows,
_("Default Number of Rows in a Sheet"));
power_of_2_handlers (w);
- w = int_pref_create_widget (state->root, GNM_CONF_WORKBOOK_NCOLS,
+ w = int_pref_create_widget (gnm_conf_get_core_workbook_n_cols_node (),
page, row++,
GNM_DEFAULT_COLS, GNM_MIN_COLS, GNM_MAX_COLS, 1,
gnm_conf_set_core_workbook_n_cols,
_("Default Number of Columns in a Sheet"));
power_of_2_handlers (w);
- bool_pref_create_widget (node, GNM_CONF_GUI_ED_LIVESCROLLING,
+ bool_pref_create_widget (gnm_conf_get_core_gui_editing_livescrolling_node (),
page, row++,
gnm_conf_set_core_gui_editing_livescrolling,
_("Live Scrolling"));
- go_conf_free_node (node);
gtk_widget_show_all (page);
return page;
@@ -673,33 +670,29 @@ pref_file_page_initializer (PrefState *state,
{
GtkWidget *page = gtk_table_new (2, 2, FALSE);
gint row = 0;
- GOConfNode *node;
- node = go_conf_get_node (state->root, GNM_CONF_FILE_DIR);
- int_pref_create_widget (state->root, GNM_CONF_XML_COMPRESSION,
+ int_pref_create_widget (gnm_conf_get_core_xml_compression_level_node (),
page, row++, 9, 0, 9, 1,
gnm_conf_set_core_xml_compression_level,
_("Default Compression Level For "
"Gnumeric Files"));
- int_pref_create_widget (state->root, GNM_CONF_WORKBOOK_AUTOSAVE_TIME,
+ int_pref_create_widget (gnm_conf_get_core_workbook_autosave_time_node (),
page, row++, 0, 0, 365*24*60*60, 60,
gnm_conf_set_core_workbook_autosave_time,
_("Default autosave frequency in seconds"));
- bool_pref_create_widget (node, GNM_CONF_FILE_OVERWRITE_DEFAULT,
+ bool_pref_create_widget (gnm_conf_get_core_file_save_def_overwrite_node (),
page, row++,
gnm_conf_set_core_file_save_def_overwrite,
_("Default To Overwriting Files"));
- bool_pref_create_widget (node, GNM_CONF_FILE_SINGLE_SHEET_SAVE,
+ bool_pref_create_widget (gnm_conf_get_core_file_save_single_sheet_node (),
page, row++,
gnm_conf_set_core_file_save_single_sheet,
_("Warn When Exporting Into Single "
"Sheet Format"));
- bool_pref_create_widget (state->root,
- PLUGIN_GCONF_LATEX "/" PLUGIN_GCONF_LATEX_USE_UTF8,
+ bool_pref_create_widget (gnm_conf_get_plugin_latex_use_utf8_node (),
page, row++,
gnm_conf_set_plugin_latex_use_utf8,
_("Use UTF-8 in LaTeX Export"));
- go_conf_free_node (node);
gtk_widget_show_all (page);
return page;
@@ -717,18 +710,15 @@ pref_screen_page_initializer (PrefState *state,
{
GtkWidget *page = gtk_table_new (2, 2, FALSE);
gint row = 0;
- GOConfNode *node;
- node = go_conf_get_node (state->root, GNM_CONF_GUI_DIR);
- double_pref_create_widget (node, GNM_CONF_GUI_RES_H, page, row++,
- 96, 50, 250, 1, 1,
+ double_pref_create_widget (gnm_conf_get_core_gui_screen_horizontaldpi_node (),
+ page, row++, 96, 50, 250, 1, 1,
gnm_conf_set_core_gui_screen_horizontaldpi,
_("Horizontal DPI"));
- double_pref_create_widget (node, GNM_CONF_GUI_RES_V, page, row++,
- 96, 50, 250, 1, 1,
+ double_pref_create_widget (gnm_conf_get_core_gui_screen_verticaldpi_node (),
+ page, row++, 96, 50, 250, 1, 1,
gnm_conf_set_core_gui_screen_verticaldpi,
_("Vertical DPI"));
- go_conf_free_node (node);
gtk_widget_show_all (page);
return page;
@@ -747,29 +737,24 @@ pref_tool_page_initializer (PrefState *state,
GtkWidget *page = gtk_table_new (2, 2, FALSE);
gint row = 0;
- enum_pref_create_widget (state->root,
- GNM_CONF_GUI_DIR "/" GNM_CONF_GUI_ED_ENTER_MOVES_DIR,
+ enum_pref_create_widget (gnm_conf_get_core_gui_editing_enter_moves_dir_node (),
page, row++,
GO_TYPE_DIRECTION,
(enum_conf_setter_t)gnm_conf_set_core_gui_editing_enter_moves_dir,
_("Enter _Moves Selection"));
- bool_pref_create_widget (state->root,
- GNM_CONF_GUI_DIR "/" GNM_CONF_GUI_ED_TRANSITION_KEYS,
+ bool_pref_create_widget (gnm_conf_get_core_gui_editing_transitionkeys_node (),
page, row++,
gnm_conf_set_core_gui_editing_transitionkeys,
_("Transition Keys"));
- bool_pref_create_widget (state->root,
- GNM_CONF_GUI_DIR "/" GNM_CONF_GUI_ED_AUTOCOMPLETE,
+ bool_pref_create_widget (gnm_conf_get_core_gui_editing_autocomplete_node (),
page, row++,
gnm_conf_set_core_gui_editing_autocomplete,
_("Autocomplete"));
- bool_pref_create_widget (state->root,
- DIALOGS_GCONF_DIR "/" DIALOGS_GCONF_UNFOCUSED_RS,
+ bool_pref_create_widget (gnm_conf_get_dialogs_rs_unfocused_node (),
page, row++,
gnm_conf_set_dialogs_rs_unfocused,
_("Allow Unfocused Range Selections"));
- int_pref_create_widget (state->root,
- FUNCTION_SELECT_GCONF_DIR "/" FUNCTION_SELECT_GCONF_NUM_OF_RECENT,
+ int_pref_create_widget (gnm_conf_get_functionselector_num_of_recent_node (),
page, row++, 10, 0, 40, 1,
gnm_conf_set_functionselector_num_of_recent,
_("Maximum Length of Recently "
@@ -792,8 +777,7 @@ pref_copypaste_page_initializer (PrefState *state,
GtkWidget *page = gtk_table_new (2, 2, FALSE);
gint row = 0;
- bool_pref_create_widget (state->root,
- GNM_CONF_CUTANDPASTE_DIR "/" GNM_CONF_CUTANDPASTE_PREFER_CLIPBOARD,
+ bool_pref_create_widget (gnm_conf_get_cut_and_paste_prefer_clipboard_node (),
page, row++,
gnm_conf_set_cut_and_paste_prefer_clipboard,
_("Prefer CLIPBOARD Over PRIMARY Selection"));
diff --git a/src/gnumeric-gconf.c b/src/gnumeric-gconf.c
index 45d684a..d3ace10 100644
--- a/src/gnumeric-gconf.c
+++ b/src/gnumeric-gconf.c
@@ -30,7 +30,6 @@
#include <gnumeric.h>
#include "application.h"
#include "gnumeric-gconf.h"
-#include "gnumeric-gconf-priv.h"
#include "gutils.h"
#include "mstyle.h"
#include <goffice/goffice.h>
@@ -47,6 +46,8 @@
#define d(code)
#endif
+#define GNM_CONF_DIR "gnumeric"
+
static GOConfNode *root = NULL;
/*
@@ -55,6 +56,7 @@ static GOConfNode *root = NULL;
*/
static GHashTable *string_pool;
static GHashTable *string_list_pool;
+static GHashTable *node_pool;
static guint sync_handler;
@@ -90,8 +92,12 @@ gnm_conf_init (void)
string_list_pool = g_hash_table_new_full
(g_str_hash, g_str_equal,
NULL, (GDestroyNotify)cb_free_string_list);
+ node_pool = g_hash_table_new_full
+ (g_str_hash, g_str_equal,
+ NULL, (GDestroyNotify)go_conf_free_node);
root = go_conf_get_node (NULL, GNM_CONF_DIR);
+ g_hash_table_insert (node_pool, (gpointer)"/", root);
}
void
@@ -109,7 +115,8 @@ gnm_conf_shutdown (void)
g_hash_table_destroy (string_list_pool);
string_list_pool = NULL;
- go_conf_free_node (root);
+ g_hash_table_destroy (node_pool);
+ node_pool = NULL;
root = NULL;
}
@@ -119,6 +126,17 @@ gnm_conf_get_root (void)
return root;
}
+static GOConfNode *
+get_node (const char *key)
+{
+ GOConfNode *res = g_hash_table_lookup (node_pool, key);
+ if (!res) {
+ res = go_conf_get_node (root, key);
+ g_hash_table_insert (node_pool, (gpointer)key, res);
+ }
+ return res;
+}
+
GtkPageSetup *
gnm_conf_get_page_setup (void)
{
@@ -328,6 +346,13 @@ gnm_conf_set_toolbar_style (GtkToolbarStyle x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_autocorrect_first_letter_node (void)
+{
+ const char *key = "autocorrect/first-letter";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_autocorrect_first_letter (void)
{
@@ -343,6 +368,13 @@ gnm_conf_set_autocorrect_first_letter (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_autocorrect_first_letter_list_node (void)
+{
+ const char *key = "autocorrect/first-letter-list";
+ return get_node (key);
+}
+
GSList *
gnm_conf_get_autocorrect_first_letter_list (void)
{
@@ -361,6 +393,13 @@ gnm_conf_set_autocorrect_first_letter_list (GSList *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_autocorrect_init_caps_node (void)
+{
+ const char *key = "autocorrect/init-caps";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_autocorrect_init_caps (void)
{
@@ -376,6 +415,13 @@ gnm_conf_set_autocorrect_init_caps (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_autocorrect_init_caps_list_node (void)
+{
+ const char *key = "autocorrect/init-caps-list";
+ return get_node (key);
+}
+
GSList *
gnm_conf_get_autocorrect_init_caps_list (void)
{
@@ -394,6 +440,13 @@ gnm_conf_set_autocorrect_init_caps_list (GSList *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_autocorrect_names_of_days_node (void)
+{
+ const char *key = "autocorrect/names-of-days";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_autocorrect_names_of_days (void)
{
@@ -409,6 +462,13 @@ gnm_conf_set_autocorrect_names_of_days (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_autocorrect_replace_node (void)
+{
+ const char *key = "autocorrect/replace";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_autocorrect_replace (void)
{
@@ -424,6 +484,13 @@ gnm_conf_set_autocorrect_replace (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_autoformat_extra_dirs_node (void)
+{
+ const char *key = "autoformat/extra-dirs";
+ return get_node (key);
+}
+
GSList *
gnm_conf_get_autoformat_extra_dirs (void)
{
@@ -442,6 +509,13 @@ gnm_conf_set_autoformat_extra_dirs (GSList *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_autoformat_sys_dir_node (void)
+{
+ const char *key = "autoformat/sys-dir";
+ return get_node (key);
+}
+
const char *
gnm_conf_get_autoformat_sys_dir (void)
{
@@ -461,6 +535,13 @@ gnm_conf_set_autoformat_sys_dir (const char *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_autoformat_usr_dir_node (void)
+{
+ const char *key = "autoformat/usr-dir";
+ return get_node (key);
+}
+
const char *
gnm_conf_get_autoformat_usr_dir (void)
{
@@ -480,6 +561,13 @@ gnm_conf_set_autoformat_usr_dir (const char *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_defaultfont_bold_node (void)
+{
+ const char *key = "core/defaultfont/bold";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_core_defaultfont_bold (void)
{
@@ -495,6 +583,13 @@ gnm_conf_set_core_defaultfont_bold (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_defaultfont_italic_node (void)
+{
+ const char *key = "core/defaultfont/italic";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_core_defaultfont_italic (void)
{
@@ -510,6 +605,13 @@ gnm_conf_set_core_defaultfont_italic (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_defaultfont_name_node (void)
+{
+ const char *key = "core/defaultfont/name";
+ return get_node (key);
+}
+
const char *
gnm_conf_get_core_defaultfont_name (void)
{
@@ -529,6 +631,13 @@ gnm_conf_set_core_defaultfont_name (const char *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_defaultfont_size_node (void)
+{
+ const char *key = "core/defaultfont/size";
+ return get_node (key);
+}
+
double
gnm_conf_get_core_defaultfont_size (void)
{
@@ -544,6 +653,13 @@ gnm_conf_set_core_defaultfont_size (double x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_file_save_def_overwrite_node (void)
+{
+ const char *key = "core/file/save/def-overwrite";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_core_file_save_def_overwrite (void)
{
@@ -559,6 +675,13 @@ gnm_conf_set_core_file_save_def_overwrite (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_file_save_single_sheet_node (void)
+{
+ const char *key = "core/file/save/single_sheet";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_core_file_save_single_sheet (void)
{
@@ -574,6 +697,13 @@ gnm_conf_set_core_file_save_single_sheet (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_gui_editing_autocomplete_node (void)
+{
+ const char *key = "core/gui/editing/autocomplete";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_core_gui_editing_autocomplete (void)
{
@@ -589,6 +719,13 @@ gnm_conf_set_core_gui_editing_autocomplete (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_gui_editing_enter_moves_dir_node (void)
+{
+ const char *key = "core/gui/editing/enter_moves_dir";
+ return get_node (key);
+}
+
GODirection
gnm_conf_get_core_gui_editing_enter_moves_dir (void)
{
@@ -604,6 +741,13 @@ gnm_conf_set_core_gui_editing_enter_moves_dir (GODirection x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_gui_editing_livescrolling_node (void)
+{
+ const char *key = "core/gui/editing/livescrolling";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_core_gui_editing_livescrolling (void)
{
@@ -619,6 +763,13 @@ gnm_conf_set_core_gui_editing_livescrolling (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_gui_editing_recalclag_node (void)
+{
+ const char *key = "core/gui/editing/recalclag";
+ return get_node (key);
+}
+
int
gnm_conf_get_core_gui_editing_recalclag (void)
{
@@ -634,6 +785,13 @@ gnm_conf_set_core_gui_editing_recalclag (int x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_gui_editing_transitionkeys_node (void)
+{
+ const char *key = "core/gui/editing/transitionkeys";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_core_gui_editing_transitionkeys (void)
{
@@ -649,6 +807,13 @@ gnm_conf_set_core_gui_editing_transitionkeys (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_gui_screen_horizontaldpi_node (void)
+{
+ const char *key = "core/gui/screen/horizontaldpi";
+ return get_node (key);
+}
+
double
gnm_conf_get_core_gui_screen_horizontaldpi (void)
{
@@ -664,6 +829,13 @@ gnm_conf_set_core_gui_screen_horizontaldpi (double x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_gui_screen_verticaldpi_node (void)
+{
+ const char *key = "core/gui/screen/verticaldpi";
+ return get_node (key);
+}
+
double
gnm_conf_get_core_gui_screen_verticaldpi (void)
{
@@ -679,6 +851,13 @@ gnm_conf_set_core_gui_screen_verticaldpi (double x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_gui_toolbars_FormatToolbar_node (void)
+{
+ const char *key = "core/gui/toolbars/FormatToolbar";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_core_gui_toolbars_FormatToolbar (void)
{
@@ -694,6 +873,13 @@ gnm_conf_set_core_gui_toolbars_FormatToolbar (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_gui_toolbars_FormatToolbar_position_node (void)
+{
+ const char *key = "core/gui/toolbars/FormatToolbar-position";
+ return get_node (key);
+}
+
GtkPositionType
gnm_conf_get_core_gui_toolbars_FormatToolbar_position (void)
{
@@ -709,6 +895,13 @@ gnm_conf_set_core_gui_toolbars_FormatToolbar_position (GtkPositionType x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_gui_toolbars_LongFormatToolbar_node (void)
+{
+ const char *key = "core/gui/toolbars/LongFormatToolbar";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_core_gui_toolbars_LongFormatToolbar (void)
{
@@ -724,6 +917,13 @@ gnm_conf_set_core_gui_toolbars_LongFormatToolbar (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_gui_toolbars_LongFormatToolbar_position_node (void)
+{
+ const char *key = "core/gui/toolbars/LongFormatToolbar-position";
+ return get_node (key);
+}
+
GtkPositionType
gnm_conf_get_core_gui_toolbars_LongFormatToolbar_position (void)
{
@@ -739,6 +939,13 @@ gnm_conf_set_core_gui_toolbars_LongFormatToolbar_position (GtkPositionType x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_gui_toolbars_ObjectToolbar_node (void)
+{
+ const char *key = "core/gui/toolbars/ObjectToolbar";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_core_gui_toolbars_ObjectToolbar (void)
{
@@ -754,6 +961,13 @@ gnm_conf_set_core_gui_toolbars_ObjectToolbar (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_gui_toolbars_ObjectToolbar_position_node (void)
+{
+ const char *key = "core/gui/toolbars/ObjectToolbar-position";
+ return get_node (key);
+}
+
GtkPositionType
gnm_conf_get_core_gui_toolbars_ObjectToolbar_position (void)
{
@@ -769,6 +983,13 @@ gnm_conf_set_core_gui_toolbars_ObjectToolbar_position (GtkPositionType x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_gui_toolbars_StandardToolbar_node (void)
+{
+ const char *key = "core/gui/toolbars/StandardToolbar";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_core_gui_toolbars_StandardToolbar (void)
{
@@ -784,6 +1005,13 @@ gnm_conf_set_core_gui_toolbars_StandardToolbar (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_gui_toolbars_StandardToolbar_position_node (void)
+{
+ const char *key = "core/gui/toolbars/StandardToolbar-position";
+ return get_node (key);
+}
+
GtkPositionType
gnm_conf_get_core_gui_toolbars_StandardToolbar_position (void)
{
@@ -799,6 +1027,13 @@ gnm_conf_set_core_gui_toolbars_StandardToolbar_position (GtkPositionType x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_gui_window_x_node (void)
+{
+ const char *key = "core/gui/window/x";
+ return get_node (key);
+}
+
double
gnm_conf_get_core_gui_window_x (void)
{
@@ -814,6 +1049,13 @@ gnm_conf_set_core_gui_window_x (double x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_gui_window_y_node (void)
+{
+ const char *key = "core/gui/window/y";
+ return get_node (key);
+}
+
double
gnm_conf_get_core_gui_window_y (void)
{
@@ -829,6 +1071,13 @@ gnm_conf_set_core_gui_window_y (double x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_gui_window_zoom_node (void)
+{
+ const char *key = "core/gui/window/zoom";
+ return get_node (key);
+}
+
double
gnm_conf_get_core_gui_window_zoom (void)
{
@@ -844,6 +1093,13 @@ gnm_conf_set_core_gui_window_zoom (double x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_sort_default_ascending_node (void)
+{
+ const char *key = "core/sort/default/ascending";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_core_sort_default_ascending (void)
{
@@ -859,6 +1115,13 @@ gnm_conf_set_core_sort_default_ascending (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_sort_default_by_case_node (void)
+{
+ const char *key = "core/sort/default/by-case";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_core_sort_default_by_case (void)
{
@@ -874,6 +1137,13 @@ gnm_conf_set_core_sort_default_by_case (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_sort_default_retain_formats_node (void)
+{
+ const char *key = "core/sort/default/retain-formats";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_core_sort_default_retain_formats (void)
{
@@ -889,6 +1159,13 @@ gnm_conf_set_core_sort_default_retain_formats (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_sort_dialog_max_initial_clauses_node (void)
+{
+ const char *key = "core/sort/dialog/max-initial-clauses";
+ return get_node (key);
+}
+
int
gnm_conf_get_core_sort_dialog_max_initial_clauses (void)
{
@@ -904,6 +1181,13 @@ gnm_conf_set_core_sort_dialog_max_initial_clauses (int x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_workbook_autosave_time_node (void)
+{
+ const char *key = "core/workbook/autosave_time";
+ return get_node (key);
+}
+
int
gnm_conf_get_core_workbook_autosave_time (void)
{
@@ -919,6 +1203,13 @@ gnm_conf_set_core_workbook_autosave_time (int x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_workbook_n_cols_node (void)
+{
+ const char *key = "core/workbook/n-cols";
+ return get_node (key);
+}
+
int
gnm_conf_get_core_workbook_n_cols (void)
{
@@ -934,6 +1225,13 @@ gnm_conf_set_core_workbook_n_cols (int x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_workbook_n_rows_node (void)
+{
+ const char *key = "core/workbook/n-rows";
+ return get_node (key);
+}
+
int
gnm_conf_get_core_workbook_n_rows (void)
{
@@ -949,6 +1247,13 @@ gnm_conf_set_core_workbook_n_rows (int x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_workbook_n_sheet_node (void)
+{
+ const char *key = "core/workbook/n-sheet";
+ return get_node (key);
+}
+
int
gnm_conf_get_core_workbook_n_sheet (void)
{
@@ -964,6 +1269,13 @@ gnm_conf_set_core_workbook_n_sheet (int x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_core_xml_compression_level_node (void)
+{
+ const char *key = "core/xml/compression-level";
+ return get_node (key);
+}
+
int
gnm_conf_get_core_xml_compression_level (void)
{
@@ -979,6 +1291,13 @@ gnm_conf_set_core_xml_compression_level (int x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_cut_and_paste_prefer_clipboard_node (void)
+{
+ const char *key = "cut-and-paste/prefer-clipboard";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_cut_and_paste_prefer_clipboard (void)
{
@@ -994,6 +1313,13 @@ gnm_conf_set_cut_and_paste_prefer_clipboard (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_dialogs_rs_unfocused_node (void)
+{
+ const char *key = "dialogs/rs/unfocused";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_dialogs_rs_unfocused (void)
{
@@ -1009,6 +1335,13 @@ gnm_conf_set_dialogs_rs_unfocused (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_functionselector_num_of_recent_node (void)
+{
+ const char *key = "functionselector/num-of-recent";
+ return get_node (key);
+}
+
int
gnm_conf_get_functionselector_num_of_recent (void)
{
@@ -1024,6 +1357,13 @@ gnm_conf_set_functionselector_num_of_recent (int x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_functionselector_recentfunctions_node (void)
+{
+ const char *key = "functionselector/recentfunctions";
+ return get_node (key);
+}
+
GSList *
gnm_conf_get_functionselector_recentfunctions (void)
{
@@ -1042,6 +1382,13 @@ gnm_conf_set_functionselector_recentfunctions (GSList *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_plugin_latex_use_utf8_node (void)
+{
+ const char *key = "plugin/latex/use-utf8";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_plugin_latex_use_utf8 (void)
{
@@ -1057,6 +1404,13 @@ gnm_conf_set_plugin_latex_use_utf8 (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_plugins_activate_new_node (void)
+{
+ const char *key = "plugins/activate-new";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_plugins_activate_new (void)
{
@@ -1072,6 +1426,13 @@ gnm_conf_set_plugins_activate_new (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_plugins_active_node (void)
+{
+ const char *key = "plugins/active";
+ return get_node (key);
+}
+
GSList *
gnm_conf_get_plugins_active (void)
{
@@ -1090,6 +1451,13 @@ gnm_conf_set_plugins_active (GSList *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_plugins_extra_dirs_node (void)
+{
+ const char *key = "plugins/extra-dirs";
+ return get_node (key);
+}
+
GSList *
gnm_conf_get_plugins_extra_dirs (void)
{
@@ -1108,6 +1476,13 @@ gnm_conf_set_plugins_extra_dirs (GSList *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_plugins_file_states_node (void)
+{
+ const char *key = "plugins/file-states";
+ return get_node (key);
+}
+
GSList *
gnm_conf_get_plugins_file_states (void)
{
@@ -1126,6 +1501,13 @@ gnm_conf_set_plugins_file_states (GSList *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_plugins_known_node (void)
+{
+ const char *key = "plugins/known";
+ return get_node (key);
+}
+
GSList *
gnm_conf_get_plugins_known (void)
{
@@ -1144,6 +1526,13 @@ gnm_conf_set_plugins_known (GSList *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_across_then_down_node (void)
+{
+ const char *key = "printsetup/across-then-down";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_printsetup_across_then_down (void)
{
@@ -1159,6 +1548,13 @@ gnm_conf_set_printsetup_across_then_down (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_all_sheets_node (void)
+{
+ const char *key = "printsetup/all-sheets";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_printsetup_all_sheets (void)
{
@@ -1174,6 +1570,13 @@ gnm_conf_set_printsetup_all_sheets (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_center_horizontally_node (void)
+{
+ const char *key = "printsetup/center-horizontally";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_printsetup_center_horizontally (void)
{
@@ -1189,6 +1592,13 @@ gnm_conf_set_printsetup_center_horizontally (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_center_vertically_node (void)
+{
+ const char *key = "printsetup/center-vertically";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_printsetup_center_vertically (void)
{
@@ -1204,6 +1614,13 @@ gnm_conf_set_printsetup_center_vertically (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_footer_node (void)
+{
+ const char *key = "printsetup/footer";
+ return get_node (key);
+}
+
GSList *
gnm_conf_get_printsetup_footer (void)
{
@@ -1222,6 +1639,13 @@ gnm_conf_set_printsetup_footer (GSList *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_gtk_setting_node (void)
+{
+ const char *key = "printsetup/gtk-setting";
+ return get_node (key);
+}
+
GSList *
gnm_conf_get_printsetup_gtk_setting (void)
{
@@ -1240,6 +1664,13 @@ gnm_conf_set_printsetup_gtk_setting (GSList *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_header_node (void)
+{
+ const char *key = "printsetup/header";
+ return get_node (key);
+}
+
GSList *
gnm_conf_get_printsetup_header (void)
{
@@ -1258,6 +1689,13 @@ gnm_conf_set_printsetup_header (GSList *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_hf_font_bold_node (void)
+{
+ const char *key = "printsetup/hf-font-bold";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_printsetup_hf_font_bold (void)
{
@@ -1273,6 +1711,13 @@ gnm_conf_set_printsetup_hf_font_bold (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_hf_font_italic_node (void)
+{
+ const char *key = "printsetup/hf-font-italic";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_printsetup_hf_font_italic (void)
{
@@ -1288,6 +1733,13 @@ gnm_conf_set_printsetup_hf_font_italic (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_hf_font_name_node (void)
+{
+ const char *key = "printsetup/hf-font-name";
+ return get_node (key);
+}
+
const char *
gnm_conf_get_printsetup_hf_font_name (void)
{
@@ -1307,6 +1759,13 @@ gnm_conf_set_printsetup_hf_font_name (const char *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_hf_font_size_node (void)
+{
+ const char *key = "printsetup/hf-font-size";
+ return get_node (key);
+}
+
double
gnm_conf_get_printsetup_hf_font_size (void)
{
@@ -1322,6 +1781,13 @@ gnm_conf_set_printsetup_hf_font_size (double x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_hf_left_node (void)
+{
+ const char *key = "printsetup/hf-left";
+ return get_node (key);
+}
+
GSList *
gnm_conf_get_printsetup_hf_left (void)
{
@@ -1340,6 +1806,13 @@ gnm_conf_set_printsetup_hf_left (GSList *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_hf_middle_node (void)
+{
+ const char *key = "printsetup/hf-middle";
+ return get_node (key);
+}
+
GSList *
gnm_conf_get_printsetup_hf_middle (void)
{
@@ -1358,6 +1831,13 @@ gnm_conf_set_printsetup_hf_middle (GSList *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_hf_right_node (void)
+{
+ const char *key = "printsetup/hf-right";
+ return get_node (key);
+}
+
GSList *
gnm_conf_get_printsetup_hf_right (void)
{
@@ -1376,6 +1856,13 @@ gnm_conf_set_printsetup_hf_right (GSList *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_margin_bottom_node (void)
+{
+ const char *key = "printsetup/margin-bottom";
+ return get_node (key);
+}
+
double
gnm_conf_get_printsetup_margin_bottom (void)
{
@@ -1391,6 +1878,13 @@ gnm_conf_set_printsetup_margin_bottom (double x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_margin_gtk_bottom_node (void)
+{
+ const char *key = "printsetup/margin-gtk-bottom";
+ return get_node (key);
+}
+
double
gnm_conf_get_printsetup_margin_gtk_bottom (void)
{
@@ -1406,6 +1900,13 @@ gnm_conf_set_printsetup_margin_gtk_bottom (double x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_margin_gtk_left_node (void)
+{
+ const char *key = "printsetup/margin-gtk-left";
+ return get_node (key);
+}
+
double
gnm_conf_get_printsetup_margin_gtk_left (void)
{
@@ -1421,6 +1922,13 @@ gnm_conf_set_printsetup_margin_gtk_left (double x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_margin_gtk_right_node (void)
+{
+ const char *key = "printsetup/margin-gtk-right";
+ return get_node (key);
+}
+
double
gnm_conf_get_printsetup_margin_gtk_right (void)
{
@@ -1436,6 +1944,13 @@ gnm_conf_set_printsetup_margin_gtk_right (double x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_margin_gtk_top_node (void)
+{
+ const char *key = "printsetup/margin-gtk-top";
+ return get_node (key);
+}
+
double
gnm_conf_get_printsetup_margin_gtk_top (void)
{
@@ -1451,6 +1966,13 @@ gnm_conf_set_printsetup_margin_gtk_top (double x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_margin_top_node (void)
+{
+ const char *key = "printsetup/margin-top";
+ return get_node (key);
+}
+
double
gnm_conf_get_printsetup_margin_top (void)
{
@@ -1466,6 +1988,13 @@ gnm_conf_set_printsetup_margin_top (double x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_paper_node (void)
+{
+ const char *key = "printsetup/paper";
+ return get_node (key);
+}
+
const char *
gnm_conf_get_printsetup_paper (void)
{
@@ -1485,6 +2014,13 @@ gnm_conf_set_printsetup_paper (const char *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_paper_orientation_node (void)
+{
+ const char *key = "printsetup/paper-orientation";
+ return get_node (key);
+}
+
int
gnm_conf_get_printsetup_paper_orientation (void)
{
@@ -1500,6 +2036,13 @@ gnm_conf_set_printsetup_paper_orientation (int x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_preferred_unit_node (void)
+{
+ const char *key = "printsetup/preferred-unit";
+ return get_node (key);
+}
+
GtkUnit
gnm_conf_get_printsetup_preferred_unit (void)
{
@@ -1515,6 +2058,13 @@ gnm_conf_set_printsetup_preferred_unit (GtkUnit x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_print_black_n_white_node (void)
+{
+ const char *key = "printsetup/print-black-n-white";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_printsetup_print_black_n_white (void)
{
@@ -1530,6 +2080,13 @@ gnm_conf_set_printsetup_print_black_n_white (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_print_even_if_only_styles_node (void)
+{
+ const char *key = "printsetup/print-even-if-only-styles";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_printsetup_print_even_if_only_styles (void)
{
@@ -1545,6 +2102,13 @@ gnm_conf_set_printsetup_print_even_if_only_styles (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_print_grid_lines_node (void)
+{
+ const char *key = "printsetup/print-grid-lines";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_printsetup_print_grid_lines (void)
{
@@ -1560,6 +2124,13 @@ gnm_conf_set_printsetup_print_grid_lines (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_print_titles_node (void)
+{
+ const char *key = "printsetup/print-titles";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_printsetup_print_titles (void)
{
@@ -1575,6 +2146,13 @@ gnm_conf_set_printsetup_print_titles (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_repeat_left_node (void)
+{
+ const char *key = "printsetup/repeat-left";
+ return get_node (key);
+}
+
const char *
gnm_conf_get_printsetup_repeat_left (void)
{
@@ -1594,6 +2172,13 @@ gnm_conf_set_printsetup_repeat_left (const char *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_repeat_top_node (void)
+{
+ const char *key = "printsetup/repeat-top";
+ return get_node (key);
+}
+
const char *
gnm_conf_get_printsetup_repeat_top (void)
{
@@ -1613,6 +2198,13 @@ gnm_conf_set_printsetup_repeat_top (const char *x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_scale_height_node (void)
+{
+ const char *key = "printsetup/scale-height";
+ return get_node (key);
+}
+
int
gnm_conf_get_printsetup_scale_height (void)
{
@@ -1628,6 +2220,13 @@ gnm_conf_set_printsetup_scale_height (int x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_scale_percentage_node (void)
+{
+ const char *key = "printsetup/scale-percentage";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_printsetup_scale_percentage (void)
{
@@ -1643,6 +2242,13 @@ gnm_conf_set_printsetup_scale_percentage (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_scale_percentage_value_node (void)
+{
+ const char *key = "printsetup/scale-percentage-value";
+ return get_node (key);
+}
+
double
gnm_conf_get_printsetup_scale_percentage_value (void)
{
@@ -1658,6 +2264,13 @@ gnm_conf_set_printsetup_scale_percentage_value (double x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_printsetup_scale_width_node (void)
+{
+ const char *key = "printsetup/scale-width";
+ return get_node (key);
+}
+
int
gnm_conf_get_printsetup_scale_width (void)
{
@@ -1673,6 +2286,13 @@ gnm_conf_set_printsetup_scale_width (int x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_undo_max_descriptor_width_node (void)
+{
+ const char *key = "undo/max_descriptor_width";
+ return get_node (key);
+}
+
int
gnm_conf_get_undo_max_descriptor_width (void)
{
@@ -1688,6 +2308,13 @@ gnm_conf_set_undo_max_descriptor_width (int x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_undo_maxnum_node (void)
+{
+ const char *key = "undo/maxnum";
+ return get_node (key);
+}
+
int
gnm_conf_get_undo_maxnum (void)
{
@@ -1703,6 +2330,13 @@ gnm_conf_set_undo_maxnum (int x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_undo_show_sheet_name_node (void)
+{
+ const char *key = "undo/show_sheet_name";
+ return get_node (key);
+}
+
gboolean
gnm_conf_get_undo_show_sheet_name (void)
{
@@ -1718,6 +2352,13 @@ gnm_conf_set_undo_show_sheet_name (gboolean x)
schedule_sync ();
}
+GOConfNode *
+gnm_conf_get_undo_size_node (void)
+{
+ const char *key = "undo/size";
+ return get_node (key);
+}
+
int
gnm_conf_get_undo_size (void)
{
@@ -1732,3 +2373,136 @@ gnm_conf_set_undo_size (int x)
go_conf_set_int (root, key, CLAMP (x, 1, 1000000));
schedule_sync ();
}
+
+GOConfNode *
+gnm_conf_get_autocorrect_dir_node (void)
+{
+ const char *key = "autocorrect";
+ return get_node (key);
+}
+
+GOConfNode *
+gnm_conf_get_autoformat_dir_node (void)
+{
+ const char *key = "autoformat";
+ return get_node (key);
+}
+
+GOConfNode *
+gnm_conf_get_core_defaultfont_dir_node (void)
+{
+ const char *key = "core/defaultfont";
+ return get_node (key);
+}
+
+GOConfNode *
+gnm_conf_get_core_file_save_dir_node (void)
+{
+ const char *key = "core/file/save";
+ return get_node (key);
+}
+
+GOConfNode *
+gnm_conf_get_core_gui_editing_dir_node (void)
+{
+ const char *key = "core/gui/editing";
+ return get_node (key);
+}
+
+GOConfNode *
+gnm_conf_get_core_gui_screen_dir_node (void)
+{
+ const char *key = "core/gui/screen";
+ return get_node (key);
+}
+
+GOConfNode *
+gnm_conf_get_core_gui_toolbars_dir_node (void)
+{
+ const char *key = "core/gui/toolbars";
+ return get_node (key);
+}
+
+GOConfNode *
+gnm_conf_get_core_gui_window_dir_node (void)
+{
+ const char *key = "core/gui/window";
+ return get_node (key);
+}
+
+GOConfNode *
+gnm_conf_get_core_sort_default_dir_node (void)
+{
+ const char *key = "core/sort/default";
+ return get_node (key);
+}
+
+GOConfNode *
+gnm_conf_get_core_sort_dialog_dir_node (void)
+{
+ const char *key = "core/sort/dialog";
+ return get_node (key);
+}
+
+GOConfNode *
+gnm_conf_get_core_workbook_dir_node (void)
+{
+ const char *key = "core/workbook";
+ return get_node (key);
+}
+
+GOConfNode *
+gnm_conf_get_core_xml_dir_node (void)
+{
+ const char *key = "core/xml";
+ return get_node (key);
+}
+
+GOConfNode *
+gnm_conf_get_cut_and_paste_dir_node (void)
+{
+ const char *key = "cut-and-paste";
+ return get_node (key);
+}
+
+GOConfNode *
+gnm_conf_get_dialogs_rs_dir_node (void)
+{
+ const char *key = "dialogs/rs";
+ return get_node (key);
+}
+
+GOConfNode *
+gnm_conf_get_functionselector_dir_node (void)
+{
+ const char *key = "functionselector";
+ return get_node (key);
+}
+
+GOConfNode *
+gnm_conf_get_plugin_latex_dir_node (void)
+{
+ const char *key = "plugin/latex";
+ return get_node (key);
+}
+
+GOConfNode *
+gnm_conf_get_plugins_dir_node (void)
+{
+ const char *key = "plugins";
+ return get_node (key);
+}
+
+GOConfNode *
+gnm_conf_get_printsetup_dir_node (void)
+{
+ const char *key = "printsetup";
+ return get_node (key);
+}
+
+GOConfNode *
+gnm_conf_get_undo_dir_node (void)
+{
+ const char *key = "undo";
+ return get_node (key);
+}
diff --git a/src/gnumeric-gconf.h b/src/gnumeric-gconf.h
index 2fbfec8..6143f2b 100644
--- a/src/gnumeric-gconf.h
+++ b/src/gnumeric-gconf.h
@@ -33,273 +33,382 @@ gboolean gnm_conf_get_detachable_toolbars (void);
GtkToolbarStyle gnm_conf_get_toolbar_style (void);
void gnm_conf_set_toolbar_style (GtkToolbarStyle);
+GOConfNode *gnm_conf_get_autocorrect_first_letter_node (void);
gboolean gnm_conf_get_autocorrect_first_letter (void);
void gnm_conf_set_autocorrect_first_letter (gboolean);
+GOConfNode *gnm_conf_get_autocorrect_first_letter_list_node (void);
GSList *gnm_conf_get_autocorrect_first_letter_list (void);
void gnm_conf_set_autocorrect_first_letter_list (GSList *);
+GOConfNode *gnm_conf_get_autocorrect_init_caps_node (void);
gboolean gnm_conf_get_autocorrect_init_caps (void);
void gnm_conf_set_autocorrect_init_caps (gboolean);
+GOConfNode *gnm_conf_get_autocorrect_init_caps_list_node (void);
GSList *gnm_conf_get_autocorrect_init_caps_list (void);
void gnm_conf_set_autocorrect_init_caps_list (GSList *);
+GOConfNode *gnm_conf_get_autocorrect_names_of_days_node (void);
gboolean gnm_conf_get_autocorrect_names_of_days (void);
void gnm_conf_set_autocorrect_names_of_days (gboolean);
+GOConfNode *gnm_conf_get_autocorrect_replace_node (void);
gboolean gnm_conf_get_autocorrect_replace (void);
void gnm_conf_set_autocorrect_replace (gboolean);
+GOConfNode *gnm_conf_get_autoformat_extra_dirs_node (void);
GSList *gnm_conf_get_autoformat_extra_dirs (void);
void gnm_conf_set_autoformat_extra_dirs (GSList *);
+GOConfNode *gnm_conf_get_autoformat_sys_dir_node (void);
const char *gnm_conf_get_autoformat_sys_dir (void);
void gnm_conf_set_autoformat_sys_dir (const char *);
+GOConfNode *gnm_conf_get_autoformat_usr_dir_node (void);
const char *gnm_conf_get_autoformat_usr_dir (void);
void gnm_conf_set_autoformat_usr_dir (const char *);
+GOConfNode *gnm_conf_get_core_defaultfont_bold_node (void);
gboolean gnm_conf_get_core_defaultfont_bold (void);
void gnm_conf_set_core_defaultfont_bold (gboolean);
+GOConfNode *gnm_conf_get_core_defaultfont_italic_node (void);
gboolean gnm_conf_get_core_defaultfont_italic (void);
void gnm_conf_set_core_defaultfont_italic (gboolean);
+GOConfNode *gnm_conf_get_core_defaultfont_name_node (void);
const char *gnm_conf_get_core_defaultfont_name (void);
void gnm_conf_set_core_defaultfont_name (const char *);
+GOConfNode *gnm_conf_get_core_defaultfont_size_node (void);
double gnm_conf_get_core_defaultfont_size (void);
void gnm_conf_set_core_defaultfont_size (double);
+GOConfNode *gnm_conf_get_core_file_save_def_overwrite_node (void);
gboolean gnm_conf_get_core_file_save_def_overwrite (void);
void gnm_conf_set_core_file_save_def_overwrite (gboolean);
+GOConfNode *gnm_conf_get_core_file_save_single_sheet_node (void);
gboolean gnm_conf_get_core_file_save_single_sheet (void);
void gnm_conf_set_core_file_save_single_sheet (gboolean);
+GOConfNode *gnm_conf_get_core_gui_editing_autocomplete_node (void);
gboolean gnm_conf_get_core_gui_editing_autocomplete (void);
void gnm_conf_set_core_gui_editing_autocomplete (gboolean);
+GOConfNode *gnm_conf_get_core_gui_editing_enter_moves_dir_node (void);
GODirection gnm_conf_get_core_gui_editing_enter_moves_dir (void);
void gnm_conf_set_core_gui_editing_enter_moves_dir (GODirection);
+GOConfNode *gnm_conf_get_core_gui_editing_livescrolling_node (void);
gboolean gnm_conf_get_core_gui_editing_livescrolling (void);
void gnm_conf_set_core_gui_editing_livescrolling (gboolean);
+GOConfNode *gnm_conf_get_core_gui_editing_recalclag_node (void);
int gnm_conf_get_core_gui_editing_recalclag (void);
void gnm_conf_set_core_gui_editing_recalclag (int);
+GOConfNode *gnm_conf_get_core_gui_editing_transitionkeys_node (void);
gboolean gnm_conf_get_core_gui_editing_transitionkeys (void);
void gnm_conf_set_core_gui_editing_transitionkeys (gboolean);
+GOConfNode *gnm_conf_get_core_gui_screen_horizontaldpi_node (void);
double gnm_conf_get_core_gui_screen_horizontaldpi (void);
void gnm_conf_set_core_gui_screen_horizontaldpi (double);
+GOConfNode *gnm_conf_get_core_gui_screen_verticaldpi_node (void);
double gnm_conf_get_core_gui_screen_verticaldpi (void);
void gnm_conf_set_core_gui_screen_verticaldpi (double);
+GOConfNode *gnm_conf_get_core_gui_toolbars_FormatToolbar_node (void);
gboolean gnm_conf_get_core_gui_toolbars_FormatToolbar (void);
void gnm_conf_set_core_gui_toolbars_FormatToolbar (gboolean);
+GOConfNode *gnm_conf_get_core_gui_toolbars_FormatToolbar_position_node (void);
GtkPositionType gnm_conf_get_core_gui_toolbars_FormatToolbar_position (void);
void gnm_conf_set_core_gui_toolbars_FormatToolbar_position (GtkPositionType);
+GOConfNode *gnm_conf_get_core_gui_toolbars_LongFormatToolbar_node (void);
gboolean gnm_conf_get_core_gui_toolbars_LongFormatToolbar (void);
void gnm_conf_set_core_gui_toolbars_LongFormatToolbar (gboolean);
+GOConfNode *gnm_conf_get_core_gui_toolbars_LongFormatToolbar_position_node (void);
GtkPositionType gnm_conf_get_core_gui_toolbars_LongFormatToolbar_position (void);
void gnm_conf_set_core_gui_toolbars_LongFormatToolbar_position (GtkPositionType);
+GOConfNode *gnm_conf_get_core_gui_toolbars_ObjectToolbar_node (void);
gboolean gnm_conf_get_core_gui_toolbars_ObjectToolbar (void);
void gnm_conf_set_core_gui_toolbars_ObjectToolbar (gboolean);
+GOConfNode *gnm_conf_get_core_gui_toolbars_ObjectToolbar_position_node (void);
GtkPositionType gnm_conf_get_core_gui_toolbars_ObjectToolbar_position (void);
void gnm_conf_set_core_gui_toolbars_ObjectToolbar_position (GtkPositionType);
+GOConfNode *gnm_conf_get_core_gui_toolbars_StandardToolbar_node (void);
gboolean gnm_conf_get_core_gui_toolbars_StandardToolbar (void);
void gnm_conf_set_core_gui_toolbars_StandardToolbar (gboolean);
+GOConfNode *gnm_conf_get_core_gui_toolbars_StandardToolbar_position_node (void);
GtkPositionType gnm_conf_get_core_gui_toolbars_StandardToolbar_position (void);
void gnm_conf_set_core_gui_toolbars_StandardToolbar_position (GtkPositionType);
+GOConfNode *gnm_conf_get_core_gui_window_x_node (void);
double gnm_conf_get_core_gui_window_x (void);
void gnm_conf_set_core_gui_window_x (double);
+GOConfNode *gnm_conf_get_core_gui_window_y_node (void);
double gnm_conf_get_core_gui_window_y (void);
void gnm_conf_set_core_gui_window_y (double);
+GOConfNode *gnm_conf_get_core_gui_window_zoom_node (void);
double gnm_conf_get_core_gui_window_zoom (void);
void gnm_conf_set_core_gui_window_zoom (double);
+GOConfNode *gnm_conf_get_core_sort_default_ascending_node (void);
gboolean gnm_conf_get_core_sort_default_ascending (void);
void gnm_conf_set_core_sort_default_ascending (gboolean);
+GOConfNode *gnm_conf_get_core_sort_default_by_case_node (void);
gboolean gnm_conf_get_core_sort_default_by_case (void);
void gnm_conf_set_core_sort_default_by_case (gboolean);
+GOConfNode *gnm_conf_get_core_sort_default_retain_formats_node (void);
gboolean gnm_conf_get_core_sort_default_retain_formats (void);
void gnm_conf_set_core_sort_default_retain_formats (gboolean);
+GOConfNode *gnm_conf_get_core_sort_dialog_max_initial_clauses_node (void);
int gnm_conf_get_core_sort_dialog_max_initial_clauses (void);
void gnm_conf_set_core_sort_dialog_max_initial_clauses (int);
+GOConfNode *gnm_conf_get_core_workbook_autosave_time_node (void);
int gnm_conf_get_core_workbook_autosave_time (void);
void gnm_conf_set_core_workbook_autosave_time (int);
+GOConfNode *gnm_conf_get_core_workbook_n_cols_node (void);
int gnm_conf_get_core_workbook_n_cols (void);
void gnm_conf_set_core_workbook_n_cols (int);
+GOConfNode *gnm_conf_get_core_workbook_n_rows_node (void);
int gnm_conf_get_core_workbook_n_rows (void);
void gnm_conf_set_core_workbook_n_rows (int);
+GOConfNode *gnm_conf_get_core_workbook_n_sheet_node (void);
int gnm_conf_get_core_workbook_n_sheet (void);
void gnm_conf_set_core_workbook_n_sheet (int);
+GOConfNode *gnm_conf_get_core_xml_compression_level_node (void);
int gnm_conf_get_core_xml_compression_level (void);
void gnm_conf_set_core_xml_compression_level (int);
+GOConfNode *gnm_conf_get_cut_and_paste_prefer_clipboard_node (void);
gboolean gnm_conf_get_cut_and_paste_prefer_clipboard (void);
void gnm_conf_set_cut_and_paste_prefer_clipboard (gboolean);
+GOConfNode *gnm_conf_get_dialogs_rs_unfocused_node (void);
gboolean gnm_conf_get_dialogs_rs_unfocused (void);
void gnm_conf_set_dialogs_rs_unfocused (gboolean);
+GOConfNode *gnm_conf_get_functionselector_num_of_recent_node (void);
int gnm_conf_get_functionselector_num_of_recent (void);
void gnm_conf_set_functionselector_num_of_recent (int);
+GOConfNode *gnm_conf_get_functionselector_recentfunctions_node (void);
GSList *gnm_conf_get_functionselector_recentfunctions (void);
void gnm_conf_set_functionselector_recentfunctions (GSList *);
+GOConfNode *gnm_conf_get_plugin_latex_use_utf8_node (void);
gboolean gnm_conf_get_plugin_latex_use_utf8 (void);
void gnm_conf_set_plugin_latex_use_utf8 (gboolean);
+GOConfNode *gnm_conf_get_plugins_activate_new_node (void);
gboolean gnm_conf_get_plugins_activate_new (void);
void gnm_conf_set_plugins_activate_new (gboolean);
+GOConfNode *gnm_conf_get_plugins_active_node (void);
GSList *gnm_conf_get_plugins_active (void);
void gnm_conf_set_plugins_active (GSList *);
+GOConfNode *gnm_conf_get_plugins_extra_dirs_node (void);
GSList *gnm_conf_get_plugins_extra_dirs (void);
void gnm_conf_set_plugins_extra_dirs (GSList *);
+GOConfNode *gnm_conf_get_plugins_file_states_node (void);
GSList *gnm_conf_get_plugins_file_states (void);
void gnm_conf_set_plugins_file_states (GSList *);
+GOConfNode *gnm_conf_get_plugins_known_node (void);
GSList *gnm_conf_get_plugins_known (void);
void gnm_conf_set_plugins_known (GSList *);
+GOConfNode *gnm_conf_get_printsetup_across_then_down_node (void);
gboolean gnm_conf_get_printsetup_across_then_down (void);
void gnm_conf_set_printsetup_across_then_down (gboolean);
+GOConfNode *gnm_conf_get_printsetup_all_sheets_node (void);
gboolean gnm_conf_get_printsetup_all_sheets (void);
void gnm_conf_set_printsetup_all_sheets (gboolean);
+GOConfNode *gnm_conf_get_printsetup_center_horizontally_node (void);
gboolean gnm_conf_get_printsetup_center_horizontally (void);
void gnm_conf_set_printsetup_center_horizontally (gboolean);
+GOConfNode *gnm_conf_get_printsetup_center_vertically_node (void);
gboolean gnm_conf_get_printsetup_center_vertically (void);
void gnm_conf_set_printsetup_center_vertically (gboolean);
+GOConfNode *gnm_conf_get_printsetup_footer_node (void);
GSList *gnm_conf_get_printsetup_footer (void);
void gnm_conf_set_printsetup_footer (GSList *);
+GOConfNode *gnm_conf_get_printsetup_gtk_setting_node (void);
GSList *gnm_conf_get_printsetup_gtk_setting (void);
void gnm_conf_set_printsetup_gtk_setting (GSList *);
+GOConfNode *gnm_conf_get_printsetup_header_node (void);
GSList *gnm_conf_get_printsetup_header (void);
void gnm_conf_set_printsetup_header (GSList *);
+GOConfNode *gnm_conf_get_printsetup_hf_font_bold_node (void);
gboolean gnm_conf_get_printsetup_hf_font_bold (void);
void gnm_conf_set_printsetup_hf_font_bold (gboolean);
+GOConfNode *gnm_conf_get_printsetup_hf_font_italic_node (void);
gboolean gnm_conf_get_printsetup_hf_font_italic (void);
void gnm_conf_set_printsetup_hf_font_italic (gboolean);
+GOConfNode *gnm_conf_get_printsetup_hf_font_name_node (void);
const char *gnm_conf_get_printsetup_hf_font_name (void);
void gnm_conf_set_printsetup_hf_font_name (const char *);
+GOConfNode *gnm_conf_get_printsetup_hf_font_size_node (void);
double gnm_conf_get_printsetup_hf_font_size (void);
void gnm_conf_set_printsetup_hf_font_size (double);
+GOConfNode *gnm_conf_get_printsetup_hf_left_node (void);
GSList *gnm_conf_get_printsetup_hf_left (void);
void gnm_conf_set_printsetup_hf_left (GSList *);
+GOConfNode *gnm_conf_get_printsetup_hf_middle_node (void);
GSList *gnm_conf_get_printsetup_hf_middle (void);
void gnm_conf_set_printsetup_hf_middle (GSList *);
+GOConfNode *gnm_conf_get_printsetup_hf_right_node (void);
GSList *gnm_conf_get_printsetup_hf_right (void);
void gnm_conf_set_printsetup_hf_right (GSList *);
+GOConfNode *gnm_conf_get_printsetup_margin_bottom_node (void);
double gnm_conf_get_printsetup_margin_bottom (void);
void gnm_conf_set_printsetup_margin_bottom (double);
+GOConfNode *gnm_conf_get_printsetup_margin_gtk_bottom_node (void);
double gnm_conf_get_printsetup_margin_gtk_bottom (void);
void gnm_conf_set_printsetup_margin_gtk_bottom (double);
+GOConfNode *gnm_conf_get_printsetup_margin_gtk_left_node (void);
double gnm_conf_get_printsetup_margin_gtk_left (void);
void gnm_conf_set_printsetup_margin_gtk_left (double);
+GOConfNode *gnm_conf_get_printsetup_margin_gtk_right_node (void);
double gnm_conf_get_printsetup_margin_gtk_right (void);
void gnm_conf_set_printsetup_margin_gtk_right (double);
+GOConfNode *gnm_conf_get_printsetup_margin_gtk_top_node (void);
double gnm_conf_get_printsetup_margin_gtk_top (void);
void gnm_conf_set_printsetup_margin_gtk_top (double);
+GOConfNode *gnm_conf_get_printsetup_margin_top_node (void);
double gnm_conf_get_printsetup_margin_top (void);
void gnm_conf_set_printsetup_margin_top (double);
+GOConfNode *gnm_conf_get_printsetup_paper_node (void);
const char *gnm_conf_get_printsetup_paper (void);
void gnm_conf_set_printsetup_paper (const char *);
+GOConfNode *gnm_conf_get_printsetup_paper_orientation_node (void);
int gnm_conf_get_printsetup_paper_orientation (void);
void gnm_conf_set_printsetup_paper_orientation (int);
+GOConfNode *gnm_conf_get_printsetup_preferred_unit_node (void);
GtkUnit gnm_conf_get_printsetup_preferred_unit (void);
void gnm_conf_set_printsetup_preferred_unit (GtkUnit);
+GOConfNode *gnm_conf_get_printsetup_print_black_n_white_node (void);
gboolean gnm_conf_get_printsetup_print_black_n_white (void);
void gnm_conf_set_printsetup_print_black_n_white (gboolean);
+GOConfNode *gnm_conf_get_printsetup_print_even_if_only_styles_node (void);
gboolean gnm_conf_get_printsetup_print_even_if_only_styles (void);
void gnm_conf_set_printsetup_print_even_if_only_styles (gboolean);
+GOConfNode *gnm_conf_get_printsetup_print_grid_lines_node (void);
gboolean gnm_conf_get_printsetup_print_grid_lines (void);
void gnm_conf_set_printsetup_print_grid_lines (gboolean);
+GOConfNode *gnm_conf_get_printsetup_print_titles_node (void);
gboolean gnm_conf_get_printsetup_print_titles (void);
void gnm_conf_set_printsetup_print_titles (gboolean);
+GOConfNode *gnm_conf_get_printsetup_repeat_left_node (void);
const char *gnm_conf_get_printsetup_repeat_left (void);
void gnm_conf_set_printsetup_repeat_left (const char *);
+GOConfNode *gnm_conf_get_printsetup_repeat_top_node (void);
const char *gnm_conf_get_printsetup_repeat_top (void);
void gnm_conf_set_printsetup_repeat_top (const char *);
+GOConfNode *gnm_conf_get_printsetup_scale_height_node (void);
int gnm_conf_get_printsetup_scale_height (void);
void gnm_conf_set_printsetup_scale_height (int);
+GOConfNode *gnm_conf_get_printsetup_scale_percentage_node (void);
gboolean gnm_conf_get_printsetup_scale_percentage (void);
void gnm_conf_set_printsetup_scale_percentage (gboolean);
+GOConfNode *gnm_conf_get_printsetup_scale_percentage_value_node (void);
double gnm_conf_get_printsetup_scale_percentage_value (void);
void gnm_conf_set_printsetup_scale_percentage_value (double);
+GOConfNode *gnm_conf_get_printsetup_scale_width_node (void);
int gnm_conf_get_printsetup_scale_width (void);
void gnm_conf_set_printsetup_scale_width (int);
+GOConfNode *gnm_conf_get_undo_max_descriptor_width_node (void);
int gnm_conf_get_undo_max_descriptor_width (void);
void gnm_conf_set_undo_max_descriptor_width (int);
+GOConfNode *gnm_conf_get_undo_maxnum_node (void);
int gnm_conf_get_undo_maxnum (void);
void gnm_conf_set_undo_maxnum (int);
+GOConfNode *gnm_conf_get_undo_show_sheet_name_node (void);
gboolean gnm_conf_get_undo_show_sheet_name (void);
void gnm_conf_set_undo_show_sheet_name (gboolean);
+GOConfNode *gnm_conf_get_undo_size_node (void);
int gnm_conf_get_undo_size (void);
void gnm_conf_set_undo_size (int);
+GOConfNode *gnm_conf_get_autocorrect_dir_node (void);
+GOConfNode *gnm_conf_get_autoformat_dir_node (void);
+GOConfNode *gnm_conf_get_core_defaultfont_dir_node (void);
+GOConfNode *gnm_conf_get_core_file_save_dir_node (void);
+GOConfNode *gnm_conf_get_core_gui_editing_dir_node (void);
+GOConfNode *gnm_conf_get_core_gui_screen_dir_node (void);
+GOConfNode *gnm_conf_get_core_gui_toolbars_dir_node (void);
+GOConfNode *gnm_conf_get_core_gui_window_dir_node (void);
+GOConfNode *gnm_conf_get_core_sort_default_dir_node (void);
+GOConfNode *gnm_conf_get_core_sort_dialog_dir_node (void);
+GOConfNode *gnm_conf_get_core_workbook_dir_node (void);
+GOConfNode *gnm_conf_get_core_xml_dir_node (void);
+GOConfNode *gnm_conf_get_cut_and_paste_dir_node (void);
+GOConfNode *gnm_conf_get_dialogs_rs_dir_node (void);
+GOConfNode *gnm_conf_get_functionselector_dir_node (void);
+GOConfNode *gnm_conf_get_plugin_latex_dir_node (void);
+GOConfNode *gnm_conf_get_plugins_dir_node (void);
+GOConfNode *gnm_conf_get_printsetup_dir_node (void);
+GOConfNode *gnm_conf_get_undo_dir_node (void);
+
/* ----------- AUTOMATICALLY GENERATED CODE ABOVE -- DO NOT EDIT ----------- */
G_END_DECLS
diff --git a/src/print-info.c b/src/print-info.c
index 2e5a248..817684c 100644
--- a/src/print-info.c
+++ b/src/print-info.c
@@ -24,7 +24,6 @@
#include "workbook.h"
#include "workbook-view.h"
#include "gnumeric-gconf.h"
-#include "gnumeric-gconf-priv.h"
#include "parse-util.h"
#include <goffice/goffice.h>
diff --git a/src/tools/auto-correct.c b/src/tools/auto-correct.c
index 8d4108a..ae48d0d 100644
--- a/src/tools/auto-correct.c
+++ b/src/tools/auto-correct.c
@@ -96,9 +96,8 @@ autocorrect_init (void)
autocorrect_load ();
autocorrect.notification_id =
- go_conf_add_monitor (gnm_conf_get_root (),
- AUTOCORRECT_DIRECTORY,
- &cb_autocorrect_update, NULL);
+ go_conf_add_monitor (gnm_conf_get_autocorrect_dir_node (),
+ NULL, &cb_autocorrect_update, NULL);
g_object_set_data_full (gnm_app_get_app (),
"ToolsAutoCorrect", GINT_TO_POINTER (1),
(GDestroyNotify) autocorrect_clear);
diff --git a/src/widgets/ChangeLog b/src/widgets/ChangeLog
index 1fc90ce..364912f 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,3 +1,8 @@
+2009-07-01 Morten Welinder <terra gnome org>
+
+ * widget-font-selector.c (fs_modify_style): If nothing changed, do
+ nothing.
+
2009-06-20 Morten Welinder <terra gnome org>
* Release 1.9.9
diff --git a/src/widgets/widget-font-selector.c b/src/widgets/widget-font-selector.c
index 177ae3d..541232e 100644
--- a/src/widgets/widget-font-selector.c
+++ b/src/widgets/widget-font-selector.c
@@ -79,16 +79,23 @@ static void
fs_modify_style (FontSelector *fs, GnmStyle *modification)
{
GnmStyle *original = fs->mstyle;
+ GnmStyle *new_style;
g_return_if_fail (modification != NULL);
- fs->mstyle = gnm_style_new_merged (original, modification);
- g_signal_emit (G_OBJECT (fs),
- fs_signals[FONT_CHANGED], 0, modification);
- foo_canvas_item_set (fs->font_preview_grid,
- "default-style", fs->mstyle,
- NULL);
+ new_style = gnm_style_new_merged (original, modification);
+
+ if (gnm_style_equal (new_style, original)) {
+ gnm_style_unref (new_style);
+ } else {
+ fs->mstyle = new_style;
+ g_signal_emit (G_OBJECT (fs),
+ fs_signals[FONT_CHANGED], 0, modification);
+ foo_canvas_item_set (fs->font_preview_grid,
+ "default-style", fs->mstyle,
+ NULL);
+ gnm_style_unref (original);
+ }
gnm_style_unref (modification);
- gnm_style_unref (original);
}
static void
@@ -133,9 +140,8 @@ list_init (GtkTreeView* view)
store = gtk_list_store_new (1, G_TYPE_STRING);
gtk_tree_view_set_model (view, GTK_TREE_MODEL (store));
renderer = gtk_cell_renderer_text_new ();
- column = gtk_tree_view_column_new_with_attributes (
- NULL,
- renderer, "text", 0, NULL);
+ column = gtk_tree_view_column_new_with_attributes
+ (NULL, renderer, "text", 0, NULL);
gtk_tree_view_column_set_expand (column, TRUE);
gtk_tree_view_append_column (view, column);
g_signal_connect (view, "realize", G_CALLBACK (cb_list_adjust), NULL);
diff --git a/tools/ChangeLog b/tools/ChangeLog
index ca23816..117b202 100644
--- a/tools/ChangeLog
+++ b/tools/ChangeLog
@@ -1,3 +1,8 @@
+2009-07-01 Morten Welinder <terra gnome org>
+
+ * handle-conf-options (make_get_conf_node): Create _get_node and
+ _get_dir_node functions too.
+
2009-06-29 Morten Welinder <terra gnome org>
* dumpdef.pl (parse_header): Handle the argument-as-type-only
diff --git a/tools/handle-conf-options b/tools/handle-conf-options
index 0cfe978..f7e9fee 100644
--- a/tools/handle-conf-options
+++ b/tools/handle-conf-options
@@ -269,6 +269,21 @@ sub number_schemas {
# -----------------------------------------------------------------------------
+sub make_get_conf_node {
+ my ($key,$var,$suffix,$phfile,$pcfile) = @_;
+
+ my $id = "gnm_conf_get_${var}_${suffix}";
+
+ ${$phfile} .= "GOConfNode *$id (void);\n";
+
+ ${$pcfile} .= "GOConfNode *\n";
+ ${$pcfile} .= "$id (void)\n";
+ ${$pcfile} .= "{\n";
+ ${$pcfile} .= "\tconst char *key = \"$key\";\n";
+ ${$pcfile} .= "\treturn get_node (key);\n";
+ ${$pcfile} .= "}\n\n";
+}
+
sub create_hcfile {
@schemas = sort { $a->{'applyto'} cmp $b->{'applyto'} } @schemas;
&number_schemas ();
@@ -289,6 +304,8 @@ sub create_hcfile {
my $cfile = "";
my $hfile = "";
+ my %dirs;
+
foreach my $schema (@schemas) {
my $i = $schema->{'i'};
my $key = $schema->{'applyto'};
@@ -310,6 +327,10 @@ sub create_hcfile {
my $root;
if ($key =~ s{/apps/gnumeric/}{}) {
$root = 'root';
+ &make_get_conf_node ($key, $var, "node", \$hfile, \$cfile);
+
+ my $dir = $key; $dir =~ s{/[^/]+$}{};
+ $dirs{$dir} = 1;
} else {
$root = 'NULL';
}
@@ -320,7 +341,6 @@ sub create_hcfile {
my $get_head = "$ctype\ngnm_conf_get_$var (void)";
my $set_head = "void\ngnm_conf_set_$var (${ctypes}x)";
-
if ($type eq 'bool') {
$default = uc $default;
@@ -405,6 +425,12 @@ sub create_hcfile {
}
}
+ for my $dir (sort keys %dirs) {
+ my $var = $dir;
+ $var =~ s{[^a-zA-Z0-9_]}{_}g;
+ &make_get_conf_node ($dir, $var, "dir_node", \$hfile, \$cfile);
+ }
+
print $hfile if $do_hfile;
print $cfile if $do_cfile;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]