Commit 603546aa authored by Morten Welinder's avatar Morten Welinder

Conf: inital non-compiling first cut.

parent e3b71b54
......@@ -134,6 +134,17 @@
<long>The number of columns in each sheet. This setting will be used only in a new gnumeric session. Whatever value is given here, the real number of columns will be a power of 2 between 256 and 4096.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/core/workbook/autosave_time</key>
<applyto>/apps/gnumeric/core/workbook/autosave_time</applyto>
<owner>Gnumeric</owner>
<type>int</type>
<default>0</default>
<locale name="C">
<short>Autosave frequency</short>
<long>The number of seconds between autosaves.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/core/gui/screen/horizontaldpi</key>
<applyto>/apps/gnumeric/core/gui/screen/horizontaldpi</applyto>
......
......@@ -229,7 +229,7 @@ append_data (SortFlowState *state, int i, int index)
gchar *str, *header;
GtkTreeIter iter;
Sheet *sheet = state->sel->v_range.cell.a.sheet;
gboolean sort_asc = gnm_app_prefs->sort_default_ascending;
gboolean sort_asc = gnm_conf_get_core_sort_default_ascending ();
header = state->is_cols
? header_name (sheet, i, index)
......@@ -244,7 +244,7 @@ append_data (SortFlowState *state, int i, int index)
ITEM_DESCENDING, !sort_asc,
ITEM_DESCENDING_IMAGE, sort_asc ? state->image_ascending
: state->image_descending,
ITEM_CASE_SENSITIVE, gnm_app_prefs->sort_default_by_case,
ITEM_CASE_SENSITIVE, gnm_conf_get_core_sort_default_by_case (),
ITEM_SORT_BY_VALUE, TRUE,
ITEM_MOVE_FORMAT, TRUE,
ITEM_NUMBER, i,
......@@ -359,7 +359,7 @@ load_model_data (SortFlowState *state)
int end;
int index;
int i;
int limit = gnm_app_prefs->sort_max_initial_clauses;
int limit = gnm_conf_get_core_sort_dialog_max_initial_clauses ();
if (state->is_cols) {
start = state->sel->v_range.cell.a.col;
......@@ -1004,7 +1004,7 @@ dialog_init (SortFlowState *state)
state->retain_format_check = glade_xml_get_widget (state->gui,
"retain_format_button");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->retain_format_check),
gnm_app_prefs->sort_default_retain_formats);
gnm_conf_get_core_sort_default_retain_formats ());
/* Set-up buttons */
......
......@@ -80,15 +80,17 @@ enum {
static void
dialog_function_load_recent_funcs (FunctionSelectState *state)
{
GnmFunc *fd;
GSList const *recent_funcs, *this_funcs;
GSList const *recent_funcs;
recent_funcs = gnm_app_prefs->recent_funcs;
for (recent_funcs = gnm_conf_get_functionselector_recentfunctions ();
recent_funcs;
recent_funcs = recent_funcs->next) {
char const *name = recent_funcs->data;
GnmFunc *fd;
for (this_funcs = recent_funcs; this_funcs; this_funcs = this_funcs->next) {
char const *name = this_funcs->data;
if (name == NULL)
continue;
fd = gnm_func_lookup (name, NULL);
if (fd)
state->recent_funcs = g_slist_prepend (state->recent_funcs, fd);
......@@ -100,7 +102,7 @@ dialog_function_write_recent_func (FunctionSelectState *state, GnmFunc const *fd
{
GSList *rec_funcs;
GSList *gconf_value_list = NULL;
guint ulimit = gnm_app_prefs->num_of_recent_funcs;
guint ulimit = gnm_conf_get_functionselector_num_of_recent ();
state->recent_funcs = g_slist_remove (state->recent_funcs, (gpointer) fd);
state->recent_funcs = g_slist_prepend (state->recent_funcs, (gpointer) fd);
......@@ -113,7 +115,8 @@ dialog_function_write_recent_func (FunctionSelectState *state, GnmFunc const *fd
gconf_value_list = g_slist_prepend
(gconf_value_list, g_strdup (gnm_func_get_name (rec_funcs->data)));
}
gnm_gconf_set_recent_funcs (gconf_value_list);
gnm_conf_set_functionselector_recentfunctions (gconf_value_list);
go_slist_free_custom (gconf_value_list, g_free);
go_conf_sync (NULL);
}
......
......@@ -201,7 +201,7 @@ static void
cb_pm_checkbutton_install_new_toggled (GtkCheckButton *checkbutton,
G_GNUC_UNUSED PluginManagerGUI *pm_gui)
{
gnm_gconf_set_activate_new_plugins (
gnm_conf_set_plugins_activate_new (
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton)));
}
......@@ -257,7 +257,7 @@ pm_gui_load_directory_page (PluginManagerGUI *pm_gui)
pm_gui_load_directories (pm_gui, plugin_dirs, FALSE);
go_slist_free_custom (plugin_dirs, g_free);
}
pm_gui_load_directories (pm_gui, gnm_app_prefs->plugin_extra_dirs, TRUE);
pm_gui_load_directories (pm_gui, gnm_conf_get_plugins_extra_dirs (), TRUE);
}
static void
......@@ -288,14 +288,16 @@ cb_pm_button_directory_add_clicked (PluginManagerGUI *pm_gui)
path = dir_name;
}
if (g_slist_find_custom ((GSList *)gnm_app_prefs->plugin_extra_dirs,
if (g_slist_find_custom (gnm_conf_get_plugins_extra_dirs (),
path, go_str_compare) == NULL) {
GSList *extra_dirs = go_string_slist_copy (
gnm_app_prefs->plugin_extra_dirs);
GSList *extra_dirs = go_string_slist_copy
(gnm_conf_get_plugins_extra_dirs ());
GO_SLIST_PREPEND (extra_dirs, path);
GO_SLIST_SORT (extra_dirs, go_str_compare);
gnm_gconf_set_plugin_extra_dirs (extra_dirs);
gnm_conf_set_plugins_extra_dirs (extra_dirs);
go_slist_free_custom (extra_dirs, g_free);
pm_gui_load_directory_page (pm_gui);
cb_pm_button_rescan_directories_clicked (pm_gui);
} else
......@@ -311,6 +313,7 @@ cb_pm_button_directory_delete_clicked (PluginManagerGUI *pm_gui)
GtkTreeIter iter;
char *dir_name = NULL;
gboolean is_system = TRUE;
GSList *extra_dirs, *res;
if (!gtk_tree_selection_get_selected (pm_gui->selection_directory, NULL, &iter))
return;
......@@ -320,20 +323,23 @@ cb_pm_button_directory_delete_clicked (PluginManagerGUI *pm_gui)
DIR_IS_SYSTEM, &is_system,
-1);
if (!is_system
&& g_slist_find_custom ((GSList *)gnm_app_prefs->plugin_extra_dirs,
dir_name, go_str_compare) != NULL) {
GSList *extra_dirs = go_string_slist_copy (gnm_app_prefs->plugin_extra_dirs);
GSList *res = g_slist_find_custom (extra_dirs, dir_name, go_str_compare);
extra_dirs = go_string_slist_copy (gnm_conf_get_plugins_extra_dirs ());
res = is_system
? NULL
: g_slist_find_custom (extra_dirs, dir_name, go_str_compare);
if (res) {
extra_dirs = g_slist_remove_link (extra_dirs, res);
g_free (res->data);
extra_dirs = g_slist_remove (extra_dirs, res->data);
g_slist_free_1 (res);
gnm_conf_set_plugins_extra_dirs (extra_dirs);
gnm_gconf_set_plugin_extra_dirs (extra_dirs);
pm_gui_load_directory_page (pm_gui);
cb_pm_button_rescan_directories_clicked (pm_gui);
}
go_slist_free_custom (extra_dirs, g_free);
g_free (dir_name);
}
......@@ -511,7 +517,7 @@ pm_dialog_init (PluginManagerGUI *pm_gui)
G_CALLBACK (cb_pm_checkbutton_install_new_toggled), pm_gui);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pm_gui->checkbutton_install_new),
gnm_app_prefs->activate_new_plugins);
gnm_conf_get_plugins_activate_new ());
/* initialize plugin list */
gtk_list_store_clear (pm_gui->model_plugins);
......
......@@ -402,16 +402,16 @@ 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_app_prefs->default_font.name);
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_app_prefs->default_font.size);
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_app_prefs->default_font.is_bold,
gnm_app_prefs->default_font.is_italic);
gnm_conf_get_core_defaultfont_bold (),
gnm_conf_get_core_defaultfont_italic ());
}
static gboolean
......@@ -419,16 +419,16 @@ cb_pref_font_has_changed (G_GNUC_UNUSED FontSelector *fs,
GnmStyle *mstyle, PrefState *state)
{
if (gnm_style_is_element_set (mstyle, MSTYLE_FONT_SIZE))
gnm_gconf_set_default_font_size
gnm_conf_set_core_defaultfont_size
(gnm_style_get_font_size (mstyle));
if (gnm_style_is_element_set (mstyle, MSTYLE_FONT_NAME))
gnm_gconf_set_default_font_name (
gnm_conf_set_core_defaultfont_name (
gnm_style_get_font_name (mstyle));
if (gnm_style_is_element_set (mstyle, MSTYLE_FONT_BOLD))
gnm_gconf_set_default_font_bold (
gnm_conf_set_core_defaultfont_bold (
gnm_style_get_font_bold (mstyle));
if (gnm_style_is_element_set (mstyle, MSTYLE_FONT_ITALIC))
gnm_gconf_set_default_font_italic (
gnm_conf_set_core_defaultfont_italic (
gnm_style_get_font_italic (mstyle));
return TRUE;
}
......@@ -460,36 +460,49 @@ pref_font_initializer (PrefState *state,
/*******************************************************************************************/
static void
cb_pref_font_hf_set_fonts (GOConfNode *node, char const *key, GtkWidget *page)
cb_pref_font_hf_set_fonts (G_GNUC_UNUSED GOConfNode *node,
char const *key, GtkWidget *page)
{
node = gnm_conf_get_root ();
FontSelector *fs = FONT_SELECTOR (page);
if (!key ||
g_str_has_suffix (key, PRINTSETUP_GCONF_HF_FONT_NAME)) {
gchar *name = go_conf_load_string (
node, PRINTSETUP_GCONF_DIR "/" PRINTSETUP_GCONF_HF_FONT_NAME);
font_selector_set_name (FONT_SELECTOR (page), name);
g_free (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))
font_selector_set_points (FONT_SELECTOR (page),
go_conf_get_double (
node, PRINTSETUP_GCONF_DIR "/" PRINTSETUP_GCONF_HF_FONT_SIZE));
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))
font_selector_set_style (FONT_SELECTOR (page),
go_conf_get_bool (
node, PRINTSETUP_GCONF_DIR "/" PRINTSETUP_GCONF_HF_FONT_BOLD),
go_conf_get_bool (
node, PRINTSETUP_GCONF_DIR "/" PRINTSETUP_GCONF_HF_FONT_ITALIC));
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);
}
}
static gboolean
cb_pref_font_hf_has_changed (G_GNUC_UNUSED FontSelector *fs,
GnmStyle *mstyle, PrefState *state)
{
gnm_gconf_set_hf_font (mstyle);
if (gnm_style_is_element_set (mstyle, MSTYLE_FONT_SIZE))
gnm_conf_set_printsetup_hf_font_size
(gnm_style_get_font_size (mstyle));
if (gnm_style_is_element_set (mstyle, MSTYLE_FONT_NAME))
gnm_conf_set_printsetup_hf_font_name
(gnm_style_get_font_name (mstyle));
if (gnm_style_is_element_set (mstyle, MSTYLE_FONT_BOLD))
gnm_conf_set_printsetup_hf_font_bold
(gnm_style_get_font_bold (mstyle));
if (gnm_style_is_element_set (mstyle, MSTYLE_FONT_ITALIC))
gnm_conf_set_printsetup_hf_font_italic
(gnm_style_get_font_italic (mstyle));
return TRUE;
}
......@@ -531,19 +544,19 @@ pref_undo_page_initializer (PrefState *state,
node = go_conf_get_node (state->root, GNM_CONF_UNDO_DIR);
int_pref_create_widget (node, GNM_CONF_UNDO_MAX_DESCRIPTOR_WIDTH,
page, row++, 5, 5, 200, 1,
gnm_gconf_set_max_descriptor_width,
gnm_conf_set_undo_max_descriptor_width,
_("Length of Undo Descriptors"));
int_pref_create_widget (node, GNM_CONF_UNDO_SIZE,
page, row++, 1000, 0, 30000, 100,
gnm_gconf_set_undo_size,
gnm_conf_set_undo_size,
_("Maximal Undo Size"));
int_pref_create_widget (node, GNM_CONF_UNDO_MAXNUM,
page, row++, 20, 1, 200, 1,
gnm_gconf_set_undo_max_number,
gnm_conf_set_undo_maxnum,
_("Number of Undo Items"));
bool_pref_create_widget (node, GNM_CONF_UNDO_SHOW_SHEET_NAME,
page, row++,
gnm_gconf_set_show_sheet_name,
gnm_conf_set_undo_show_sheet_name,
_("Show Sheet Name in Undo List"));
go_conf_free_node (node);
......@@ -568,19 +581,19 @@ pref_sort_page_initializer (PrefState *state,
node = go_conf_get_node (state->root, GNM_CONF_SORT_DIR);
int_pref_create_widget (node, GNM_CONF_SORT_DIALOG_MAX_INITIAL,
page, row++, 10, 0, 50, 1,
gnm_gconf_set_sort_dialog_max_initial,
gnm_conf_set_core_sort_dialog_max_initial_clauses,
_("Number of Automatic Clauses"));
bool_pref_create_widget (node, GNM_CONF_SORT_DEFAULT_RETAIN_FORM,
page, row++,
gnm_gconf_set_sort_retain_form,
gnm_conf_set_core_sort_default_retain_formats,
_("Sorting Preserves Formats"));
bool_pref_create_widget (node, GNM_CONF_SORT_DEFAULT_BY_CASE,
page, row++,
gnm_gconf_set_sort_by_case,
gnm_conf_set_core_sort_default_by_case,
_("Sorting is Case-Sensitive"));
bool_pref_create_widget (node, GNM_CONF_SORT_DEFAULT_ASCENDING,
page, row++,
gnm_gconf_set_sort_ascending,
gnm_conf_set_core_sort_default_ascending,
_("Sort Ascending"));
go_conf_free_node (node);
......@@ -606,38 +619,38 @@ pref_window_page_initializer (PrefState *state,
node = go_conf_get_node (state->root, GNM_CONF_GUI_DIR);
double_pref_create_widget (node, GNM_CONF_GUI_WINDOW_Y,
page, row++, 0.75, 0.25, 1, 0.05, 2,
gnm_gconf_set_gui_window_y,
gnm_conf_set_core_gui_window_y,
_("Default Vertical Window Size"));
double_pref_create_widget (node, GNM_CONF_GUI_WINDOW_X,
page, row++, 0.75, 0.25, 1, 0.05, 2,
gnm_gconf_set_gui_window_x,
gnm_conf_set_core_gui_window_x,
_("Default Horizontal Window Size"));
double_pref_create_widget (node, GNM_CONF_GUI_ZOOM,
page, row++, 1.00, 0.10, 5.00, 0.05, 2,
gnm_gconf_set_gui_zoom,
gnm_conf_set_core_gui_window_zoom,
_("Default Zoom Factor"));
int_pref_create_widget (state->root, GNM_CONF_WORKBOOK_NSHEETS,
page, row++, 1, 1, 64, 1,
gnm_gconf_set_workbook_nsheets,
gnm_conf_set_core_workbook_n_sheet,
_("Default Number of Sheets"));
w = int_pref_create_widget (state->root, GNM_CONF_WORKBOOK_NROWS,
page, row++,
GNM_DEFAULT_ROWS, GNM_MIN_ROWS, GNM_MAX_ROWS, 1,
gnm_gconf_set_workbook_nrows,
_("Default Number of Rows in a Sheet"));
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,
page, row++,
GNM_DEFAULT_COLS, GNM_MIN_COLS, GNM_MAX_COLS, 1,
gnm_gconf_set_workbook_ncols,
_("Default Number of Columns in a Sheet"));
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,
page, row++,
gnm_gconf_set_gui_livescrolling,
gnm_conf_set_core_gui_editing_livescrolling,
_("Live Scrolling"));
go_conf_free_node (node);
......@@ -662,26 +675,26 @@ pref_file_page_initializer (PrefState *state,
node = go_conf_get_node (state->root, GNM_CONF_FILE_DIR);
int_pref_create_widget (state->root, GNM_CONF_XML_COMPRESSION,
page, row++, 9, 0, 9, 1,
gnm_gconf_set_xml_compression,
gnm_conf_set_core_xml_compression_level,
_("Default Compression Level For "
"Gnumeric Files"));
int_pref_create_widget (state->root, GNM_CONF_WORKBOOK_AUTOSAVE_TIME,
page, row++, 0, 0, 365*24*60*60, 60,
gnm_gconf_set_workbook_autosave_time,
gnm_conf_set_core_workbook_autosave_time,
_("Default autosave frequency in seconds"));
bool_pref_create_widget (node, GNM_CONF_FILE_OVERWRITE_DEFAULT,
page, row++,
gnm_gconf_set_file_overwrite,
gnm_conf_set_core_file_save_def_overwrite,
_("Default To Overwriting Files"));
bool_pref_create_widget (node, GNM_CONF_FILE_SINGLE_SHEET_SAVE,
page, row++,
gnm_gconf_set_file_single_sheet_save,
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,
page, row++,
gnm_gconf_set_latex_use_utf8,
gnm_conf_set_plugin_latex_use_utf8,
_("Use UTF-8 in LaTeX Export"));
go_conf_free_node (node);
......@@ -706,11 +719,11 @@ pref_screen_page_initializer (PrefState *state,
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,
gnm_gconf_set_gui_resolution_h,
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,
gnm_gconf_set_gui_resolution_v,
gnm_conf_set_core_gui_screen_verticaldpi,
_("Vertical DPI"));
go_conf_free_node (node);
......@@ -735,27 +748,27 @@ pref_tool_page_initializer (PrefState *state,
GNM_CONF_GUI_DIR "/" GNM_CONF_GUI_ED_ENTER_MOVES_DIR,
page, row++,
GO_TYPE_DIRECTION,
(enum_conf_setter_t) gnm_gconf_set_enter_moves_dir,
(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,
page, row++,
gnm_gconf_set_gui_transition_keys,
gnm_conf_set_core_gui_editing_transitionkeys,
_("Transition Keys"));
bool_pref_create_widget (state->root,
GNM_CONF_GUI_DIR "/" GNM_CONF_GUI_ED_AUTOCOMPLETE,
page, row++,
gnm_gconf_set_autocomplete,
gnm_conf_set_core_gui_editing_autocomplete,
_("Autocomplete"));
bool_pref_create_widget (state->root,
DIALOGS_GCONF_DIR "/" DIALOGS_GCONF_UNFOCUSED_RS,
page, row++,
gnm_gconf_set_unfocused_rs,
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,
page, row++, 10, 0, 40, 1,
gnm_gconf_set_num_recent_functions,
gnm_conf_set_functionselector_num_of_recent,
_("Maximum Length of Recently "
"Used Functions List"));
......@@ -779,7 +792,7 @@ pref_copypaste_page_initializer (PrefState *state,
bool_pref_create_widget (state->root,
GNM_CONF_CUTANDPASTE_DIR "/" GNM_CONF_CUTANDPASTE_PREFER_CLIPBOARD,
page, row++,
gnm_gconf_set_prefer_clipboard,
gnm_conf_set_cut_and_paste_prefer_clipboard,
_("Prefer CLIPBOARD Over PRIMARY Selection"));
gtk_widget_show_all (page);
......
......@@ -2,206 +2,277 @@
#ifndef _GNM_GCONF_H_
# define _GNM_GCONF_H_
#include "numbers.h"
#include <gnumeric.h>
#include <glib-object.h>
#include <print-info.h>
#include <libgnumeric.h>
#include <goffice/goffice.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
typedef struct {
struct {
GSList const *extra_dirs;
char *sys_dir;
char *usr_dir;
} autoformat;
struct {
char const *name;
float size;
gboolean is_bold, is_italic;
} default_font;
guint num_of_recent_funcs;
GSList const *recent_funcs;
GSList const *plugin_file_states;
GSList const *plugin_extra_dirs;
GSList const *active_plugins;
gboolean activate_new_plugins;
gboolean show_sheet_name;
guint max_descriptor_width;
gint undo_size;
gint undo_max_number;
gint initial_sheet_number;
gint row_number;
gint col_number;
gint autosave_time;
float horizontal_window_fraction;
float vertical_window_fraction;
float zoom;
gint xml_compression_level;
gboolean file_overwrite_default_answer;
gboolean file_ask_single_sheet_save;
gboolean sort_default_by_case;
gboolean sort_default_retain_formats;
gboolean sort_default_ascending;
gint sort_max_initial_clauses;
gboolean print_all_sheets; /* vs print only selected */
GSList const *printer_header;
GSList const *printer_footer;
GSList const *printer_header_formats_left;
GSList const *printer_header_formats_middle;
GSList const *printer_header_formats_right;
GnmStyle *printer_decoration_font;
gboolean print_center_horizontally;
gboolean print_center_vertically;
gboolean print_grid_lines;
gboolean print_even_if_only_styles;
gboolean print_black_and_white;
gboolean print_titles;
gboolean print_order_across_then_down;
gboolean print_scale_percentage;
float print_scale_percentage_value;
gint print_scale_width;
gint print_scale_height;
gchar *print_repeat_top;
gchar *print_repeat_left;
double print_margin_top;
double print_margin_bottom;
GtkUnit desired_display;
/* Also acts as flag whether the print defaults are loaded */
GtkPrintSettings *print_settings;
GtkPageSetup *page_setup;
float horizontal_dpi;
float vertical_dpi;
gboolean auto_complete;
GODirection enter_moves_dir; /* Which way does hitting <Enter> go */
gboolean transition_keys;
gboolean live_scrolling;
gboolean detachable_toolbars;
GHashTable *toolbars;
GHashTable *toolbar_positions;
gint recalc_lag;
gboolean unfocused_range_selection;
gboolean prefer_clipboard_selection; /* As opposed to "primary". */
gboolean latex_use_utf8;
} GnmAppPrefs;
GNM_VAR_DECL GnmAppPrefs const *gnm_app_prefs;
void gnm_conf_init (gboolean fast);
void gnm_conf_shutdown (void);
GOConfNode *gnm_conf_get_root (void);
/* autocomplete */
void gnm_gconf_set_autocomplete (gboolean val);
/* autoformat */
void gnm_gconf_set_autoformat_sys_dirs (char const * string);
void gnm_gconf_set_autoformat_usr_dirs (char const * string);
/* plugins */
void gnm_gconf_set_plugin_file_states (GSList *list);
void gnm_gconf_set_plugin_extra_dirs (GSList *list);
void gnm_gconf_set_active_plugins (GSList *list);
void gnm_gconf_set_activate_new_plugins (gboolean val);
/* undo */
void gnm_gconf_set_show_sheet_name (gboolean val);
void gnm_gconf_set_max_descriptor_width (gint val);
void gnm_gconf_set_undo_size (gint val);
void gnm_gconf_set_undo_max_number (gint val);
/* xml/files */
void gnm_gconf_set_recent_funcs (GSList *list);
void gnm_gconf_set_xml_compression (gint value);
void gnm_gconf_set_file_overwrite (gboolean value);
void gnm_gconf_set_file_single_sheet_save (gboolean value);
/* print-setup & printing */
void gnm_gconf_init_printer_defaults (void);
void gnm_gconf_set_all_sheets (gboolean val);
void gnm_gconf_set_printer_header (gchar const *left, gchar const *middle,
gchar const *right);
void gnm_gconf_set_printer_footer (gchar const *left, gchar const *middle,
gchar const *right);
void gnm_gconf_set_print_center_horizontally (gboolean val);
void gnm_gconf_set_print_center_vertically (gboolean val);
void gnm_gconf_set_print_grid_lines (gboolean val);
void gnm_gconf_set_print_even_if_only_styles (gboolean val);
void gnm_gconf_set_print_black_and_white (gboolean val);
void gnm_gconf_set_print_titles (gboolean val);
void gnm_gconf_set_print_order_across_then_down (gboolean val);
void gnm_gconf_set_print_scale_percentage (gboolean val);
void gnm_gconf_set_print_scale_percentage_value (gnm_float val);
void gnm_gconf_set_print_tb_margins (double edge_to_header,
double edge_to_footer,
GtkUnit unit);
void gnm_gconf_set_print_header_formats (GSList *left, GSList *middle,
GSList *right);
void gnm_gconf_set_print_settings (GtkPrintSettings *settings);
void gnm_gconf_set_page_setup (GtkPageSetup *setup);
GtkPrintSettings *gnm_gconf_get_print_settings (void);
GtkPageSetup *gnm_gconf_get_page_setup (void);
/* gui */
void gnm_gconf_set_gui_window_x (gnm_float val);
void gnm_gconf_set_gui_window_y (gnm_float val);
void gnm_gconf_set_gui_zoom (gnm_float val);
void gnm_gconf_set_gui_transition_keys (gboolean value);
void gnm_gconf_set_gui_livescrolling (gboolean value);
void gnm_gconf_set_gui_resolution_h (gnm_float val);
void gnm_gconf_set_gui_resolution_v (gnm_float val);
gboolean gnm_gconf_get_toolbar_visible (char const *name);
void gnm_gconf_set_toolbar_visible (char const *name, gboolean vis);
int gnm_gconf_get_toolbar_position (char const *name);
void gnm_gconf_set_toolbar_position (char const *name, int pos);
void gnm_gconf_set_enter_moves_dir (GODirection val);
/* default font */
void gnm_gconf_set_default_font_size (gnm_float val);
void gnm_gconf_set_default_font_name (char const *str);
void gnm_gconf_set_default_font_bold (gboolean val);
void gnm_gconf_set_default_font_italic (gboolean val);
/* hf font */
void gnm_gconf_set_hf_font (GnmStyle const *mstyle);
/* sorting */
void gnm_gconf_set_sort_dialog_max_initial (gint value);
void gnm_gconf_set_sort_retain_form (gboolean value);
void gnm_gconf_set_sort_by_case (gboolean value);
void gnm_gconf_set_sort_ascending (gboolean value);
/* workbook */
void gnm_gconf_set_workbook_nsheets (gint value);
void gnm_gconf_set_workbook_nrows (gint value);
void gnm_gconf_set_workbook_ncols (gint value);
void gnm_gconf_set_workbook_autosave_time (gint value);
void gnm_gconf_set_unfocused_rs (gboolean value);
/* function selector and formula guru */
void gnm_gconf_set_num_recent_functions (gint value);
/* standard plugins */
void gnm_gconf_set_latex_use_utf8 (gboolean value);
/* application interface */
void gnm_gconf_set_prefer_clipboard (gboolean value);
const char *gnm_conf_get_toolbar_style (void);
void gnm_conf_set_toolbar_style (const char *);
gboolean gnm_conf_get_autocorrect_first_letter (void);
void gnm_conf_set_autocorrect_first_letter (gboolean);
GSList *gnm_conf_get_autocorrect_first_letter_list (void);
void gnm_conf_set_autocorrect_first_letter_list (GSList *);
gboolean gnm_conf_get_autocorrect_init_caps (void);
void gnm_conf_set_autocorrect_init_caps (gboolean);
GSList *gnm_conf_get_autocorrect_init_caps_list (void);
void gnm_conf_set_autocorrect_init_caps_list (GSList *);
gboolean gnm_conf_get_autocorrect_names_of_days (void);
void gnm_conf_set_autocorrect_names_of_days (gboolean);
gboolean gnm_conf_get_autocorrect_replace (void);
void gnm_conf_set_autocorrect_replace (gboolean);
GSList *gnm_conf_get_autoformat_extra_dirs (void);
void gnm_conf_set_autoformat_extra_dirs (GSList *);
const char *gnm_conf_get_autoformat_sys_dir (void);
void gnm_conf_set_autoformat_sys_dir (const char *);
const char *gnm_conf_get_autoformat_usr_dir (void);
void gnm_conf_set_autoformat_usr_dir (const char *);
gboolean gnm_conf_get_core_defaultfont_bold (void);
void gnm_conf_set_core_defaultfont_bold (gboolean);
gboolean gnm_conf_get_core_defaultfont_italic (void);
void gnm_conf_set_core_defaultfont_italic (gboolean);
const char *gnm_conf_get_core_defaultfont_name (void);
void gnm_conf_set_core_defaultfont_name (const char *);
double gnm_conf_get_core_defaultfont_size (void);
void gnm_conf_set_core_defaultfont_size (double);
gboolean gnm_conf_get_core_file_save_def_overwrite (void);
void gnm_conf_set_core_file_save_def_overwrite (gboolean);
gboolean gnm_conf_get_core_file_save_single_sheet (void);
void gnm_conf_set_core_file_save_single_sheet (gboolean);
gboolean gnm_conf_get_core_gui_editing_autocomplete (void);
void gnm_conf_set_core_gui_editing_autocomplete (gboolean);
GODirection gnm_conf_get_core_gui_editing_enter_moves_dir (void);
void gnm_conf_set_core_gui_editing_enter_moves_dir (GODirection);
gboolean gnm_conf_get_core_gui_editing_livescrolling (void);
void gnm_conf_set_core_gui_editing_livescrolling (gboolean);
int gnm_conf_get_core_gui_editing_recalclag (void);