1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
6 * Andreas J. Guelzow <aguelzow@pyrshep.ca>
8 * (C) Copyright 2002-2005 Andreas J. Guelzow <aguelzow@pyrshep.ca>
9 * (C) Copyright 2009-2011 Morten Welinder <terra@gnome.org>
11 * Introduced the concept of "node" and implemented the win32 backend
12 * by Ivan, Wong Yat Cheung <email@ivanwong.info>, 2005
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see <https://www.gnu.org/licenses/>.
28 #include <gnumeric-config.h>
30 #include "application.h"
31 #include "gnumeric-conf.h"
34 #include <goffice/goffice.h>
36 #include <number-match.h>
39 #include <print-info.h>
40 #include <glib/gi18n-lib.h>
42 #define NO_DEBUG_GCONF
43 #ifndef NO_DEBUG_GCONF
44 #define d(code) { code; }
49 #define GNM_CONF_DIR "gnumeric"
51 static GOConfNode
*root
= NULL
;
54 * Hashes to simplify ownership rules. We use this so none of the getters
55 * have to return memory that the callers need to free.
57 static GHashTable
*string_pool
;
58 static GHashTable
*string_list_pool
;
59 static GHashTable
*node_pool
, *node_watch
;
61 static gboolean debug_getters
;
62 static gboolean debug_setters
;
63 #define MAYBE_DEBUG_GET(key) do { \
64 if (debug_getters) g_printerr ("conf-get: %s\n", key); \
66 #define MAYBE_DEBUG_SET(key) do { \
67 if (debug_setters) g_printerr ("conf-set: %s\n", key); \
71 static guint sync_handler
;
87 sync_handler
= g_timeout_add (200, (GSourceFunc
)cb_sync
, NULL
);
90 /* -------------------------------------------------------------------------- */
92 static GSList
*watchers
;
94 struct cb_watch_generic
{
97 const char *short_desc
;
98 const char *long_desc
;
102 free_watcher (struct cb_watch_generic
*watcher
)
104 go_conf_remove_monitor (watcher
->handler
);
107 /* ---------------------------------------- */
110 gnm_conf_get_root (void)
116 get_node (const char *key
, gpointer watch
)
118 GOConfNode
*res
= g_hash_table_lookup (node_pool
, key
);
120 res
= go_conf_get_node (key
[0] == '/' ? NULL
: root
, key
);
121 g_hash_table_insert (node_pool
, (gpointer
)key
, res
);
123 g_hash_table_insert (node_watch
, res
, watch
);
129 get_watch_node (gpointer watch_
)
131 struct cb_watch_generic
*watch
= watch_
;
132 return get_node (watch
->key
, watch
);
136 gnm_conf_get_short_desc (GOConfNode
*node
)
138 struct cb_watch_generic
*watch
=
139 g_hash_table_lookup (node_watch
, node
);
140 const char *desc
= watch
? watch
->short_desc
: NULL
;
141 return desc
? _(desc
) : NULL
;
145 gnm_conf_get_long_desc (GOConfNode
*node
)
147 struct cb_watch_generic
*watch
=
148 g_hash_table_lookup (node_watch
, node
);
149 const char *desc
= watch
? watch
->long_desc
: NULL
;
150 return desc
? _(desc
) : NULL
;
153 /* -------------------------------------------------------------------------- */
155 struct cb_watch_bool
{
158 const char *short_desc
;
159 const char *long_desc
;
165 cb_watch_bool (GOConfNode
*node
, G_GNUC_UNUSED
const char *key
, gpointer user
)
167 struct cb_watch_bool
*watch
= user
;
168 watch
->var
= go_conf_load_bool (node
, NULL
, watch
->defalt
);
172 watch_bool (struct cb_watch_bool
*watch
)
174 GOConfNode
*node
= get_node (watch
->key
, watch
);
175 watch
->handler
= go_conf_add_monitor
176 (node
, NULL
, cb_watch_bool
, watch
);
177 watchers
= g_slist_prepend (watchers
, watch
);
178 cb_watch_bool (node
, NULL
, watch
);
179 MAYBE_DEBUG_GET (watch
->key
);
183 set_bool (struct cb_watch_bool
*watch
, gboolean x
)
189 MAYBE_DEBUG_SET (watch
->key
);
191 go_conf_set_bool (root
, watch
->key
, x
);
195 /* ---------------------------------------- */
197 struct cb_watch_int
{
200 const char *short_desc
;
201 const char *long_desc
;
202 int min
, max
, defalt
;
207 cb_watch_int (GOConfNode
*node
, G_GNUC_UNUSED
const char *key
, gpointer user
)
209 struct cb_watch_int
*watch
= user
;
210 watch
->var
= go_conf_load_int (node
, NULL
,
211 watch
->min
, watch
->max
,
216 watch_int (struct cb_watch_int
*watch
)
218 GOConfNode
*node
= get_node (watch
->key
, watch
);
219 watch
->handler
= go_conf_add_monitor
220 (node
, NULL
, cb_watch_int
, watch
);
221 watchers
= g_slist_prepend (watchers
, watch
);
222 cb_watch_int (node
, NULL
, watch
);
223 MAYBE_DEBUG_GET (watch
->key
);
227 set_int (struct cb_watch_int
*watch
, int x
)
229 x
= CLAMP (x
, watch
->min
, watch
->max
);
234 MAYBE_DEBUG_SET (watch
->key
);
236 go_conf_set_int (root
, watch
->key
, x
);
240 /* ---------------------------------------- */
242 struct cb_watch_double
{
245 const char *short_desc
;
246 const char *long_desc
;
247 double min
, max
, defalt
;
252 cb_watch_double (GOConfNode
*node
, G_GNUC_UNUSED
const char *key
, gpointer user
)
254 struct cb_watch_double
*watch
= user
;
255 watch
->var
= go_conf_load_double (node
, NULL
,
256 watch
->min
, watch
->max
,
261 watch_double (struct cb_watch_double
*watch
)
263 GOConfNode
*node
= get_node (watch
->key
, watch
);
264 watch
->handler
= go_conf_add_monitor
265 (node
, NULL
, cb_watch_double
, watch
);
266 watchers
= g_slist_prepend (watchers
, watch
);
267 cb_watch_double (node
, NULL
, watch
);
268 MAYBE_DEBUG_GET (watch
->key
);
272 set_double (struct cb_watch_double
*watch
, double x
)
274 x
= CLAMP (x
, watch
->min
, watch
->max
);
279 MAYBE_DEBUG_SET (watch
->key
);
281 go_conf_set_double (root
, watch
->key
, x
);
285 /* ---------------------------------------- */
287 struct cb_watch_string
{
290 const char *short_desc
;
291 const char *long_desc
;
297 cb_watch_string (GOConfNode
*node
, G_GNUC_UNUSED
const char *key
, gpointer user
)
299 struct cb_watch_string
*watch
= user
;
300 char *res
= go_conf_load_string (node
, NULL
);
301 if (!res
) res
= g_strdup (watch
->defalt
);
302 g_hash_table_replace (string_pool
, (gpointer
)watch
->key
, res
);
307 watch_string (struct cb_watch_string
*watch
)
309 GOConfNode
*node
= get_node (watch
->key
, watch
);
310 watch
->handler
= go_conf_add_monitor
311 (node
, NULL
, cb_watch_string
, watch
);
312 watchers
= g_slist_prepend (watchers
, watch
);
313 cb_watch_string (node
, NULL
, watch
);
314 MAYBE_DEBUG_GET (watch
->key
);
318 set_string (struct cb_watch_string
*watch
, const char *x
)
322 if (!x
|| !watch
->var
|| strcmp (x
, watch
->var
) == 0)
325 MAYBE_DEBUG_SET (watch
->key
);
328 /* Update pool before setting so monitors see the right value. */
329 g_hash_table_replace (string_pool
, (gpointer
)watch
->key
, xc
);
330 go_conf_set_string (root
, watch
->key
, xc
);
334 /* ---------------------------------------- */
336 struct cb_watch_string_list
{
339 const char *short_desc
;
340 const char *long_desc
;
345 cb_watch_string_list (GOConfNode
*node
, G_GNUC_UNUSED
const char *key
, gpointer user
)
347 struct cb_watch_string_list
*watch
= user
;
348 GSList
*res
= go_conf_load_str_list (node
, NULL
);
349 g_hash_table_replace (string_list_pool
, (gpointer
)watch
->key
, res
);
354 watch_string_list (struct cb_watch_string_list
*watch
)
356 GOConfNode
*node
= get_node (watch
->key
, watch
);
357 watch
->handler
= go_conf_add_monitor
358 (node
, NULL
, cb_watch_string_list
, watch
);
359 watchers
= g_slist_prepend (watchers
, watch
);
360 cb_watch_string_list (node
, NULL
, watch
);
361 MAYBE_DEBUG_GET (watch
->key
);
365 string_list_equal (GSList
*x
, GSList
*y
)
368 if (strcmp (x
->data
, y
->data
) != 0)
378 set_string_list (struct cb_watch_string_list
*watch
, GSList
*x
)
380 if (string_list_equal (x
, watch
->var
))
383 x
= go_string_slist_copy (x
);
385 MAYBE_DEBUG_SET (watch
->key
);
387 /* Update pool before setting so monitors see the right value. */
388 g_hash_table_replace (string_list_pool
, (gpointer
)watch
->key
, x
);
389 go_conf_set_str_list (root
, watch
->key
, x
);
393 /* ---------------------------------------- */
395 struct cb_watch_enum
{
398 const char *short_desc
;
399 const char *long_desc
;
406 cb_watch_enum (GOConfNode
*node
, G_GNUC_UNUSED
const char *key
, gpointer user
)
408 struct cb_watch_enum
*watch
= user
;
409 watch
->var
= go_conf_load_enum (node
, NULL
,
410 watch
->typ
, watch
->defalt
);
414 watch_enum (struct cb_watch_enum
*watch
, GType typ
)
416 GOConfNode
*node
= get_node (watch
->key
, watch
);
418 watch
->handler
= go_conf_add_monitor
419 (node
, NULL
, cb_watch_enum
, watch
);
420 watchers
= g_slist_prepend (watchers
, watch
);
421 cb_watch_enum (node
, NULL
, watch
);
422 MAYBE_DEBUG_GET (watch
->key
);
426 set_enum (struct cb_watch_enum
*watch
, int x
)
431 MAYBE_DEBUG_SET (watch
->key
);
433 go_conf_set_enum (root
, watch
->key
, watch
->typ
, x
);
437 /* -------------------------------------------------------------------------- */
440 cb_free_string_list (GSList
*l
)
442 g_slist_free_full (l
, g_free
);
448 debug_getters
= gnm_debug_flag ("conf-get");
449 debug_setters
= gnm_debug_flag ("conf-set");
451 if (debug_getters
|| debug_setters
)
452 g_printerr ("gnm_conf_init\n");
454 string_pool
= g_hash_table_new_full
455 (g_str_hash
, g_str_equal
,
457 string_list_pool
= g_hash_table_new_full
458 (g_str_hash
, g_str_equal
,
459 NULL
, (GDestroyNotify
)cb_free_string_list
);
460 node_pool
= g_hash_table_new_full
461 (g_str_hash
, g_str_equal
,
462 NULL
, (GDestroyNotify
)go_conf_free_node
);
463 node_watch
= g_hash_table_new (g_direct_hash
, g_direct_equal
);
465 root
= go_conf_get_node (NULL
, GNM_CONF_DIR
);
466 g_hash_table_insert (node_pool
, (gpointer
)"/", root
);
470 gnm_conf_shutdown (void)
472 if (debug_getters
|| debug_setters
)
473 g_printerr ("gnm_conf_shutdown\n");
477 g_source_remove (sync_handler
);
481 g_slist_free_full (watchers
, (GDestroyNotify
)free_watcher
);
484 g_hash_table_destroy (string_pool
);
487 g_hash_table_destroy (string_list_pool
);
488 string_list_pool
= NULL
;
490 g_hash_table_destroy (node_watch
);
493 g_hash_table_destroy (node_pool
);
500 * gnm_conf_get_page_setup:
502 * Returns: (transfer full): the default #GtkPageSetup.
505 gnm_conf_get_page_setup (void)
507 GtkPageSetup
*page_setup
= gtk_page_setup_new ();
509 page_setup_set_paper (page_setup
,
510 gnm_conf_get_printsetup_paper ());
512 gtk_page_setup_set_orientation
514 gnm_conf_get_printsetup_paper_orientation ());
516 gtk_page_setup_set_top_margin
518 gnm_conf_get_printsetup_margin_gtk_top (),
520 gtk_page_setup_set_bottom_margin
522 gnm_conf_get_printsetup_margin_gtk_bottom (),
524 gtk_page_setup_set_left_margin
526 gnm_conf_get_printsetup_margin_gtk_left (),
528 gtk_page_setup_set_right_margin
530 gnm_conf_get_printsetup_margin_gtk_right (),
537 gnm_conf_set_page_setup (GtkPageSetup
*setup
)
541 paper
= page_setup_get_paper (setup
);
542 gnm_conf_set_printsetup_paper (paper
);
545 gnm_conf_set_printsetup_paper_orientation
546 (gtk_page_setup_get_orientation (setup
));
548 gnm_conf_set_printsetup_margin_gtk_top
549 (gtk_page_setup_get_top_margin (setup
, GTK_UNIT_POINTS
));
550 gnm_conf_set_printsetup_margin_gtk_bottom
551 (gtk_page_setup_get_bottom_margin (setup
, GTK_UNIT_POINTS
));
552 gnm_conf_set_printsetup_margin_gtk_left
553 (gtk_page_setup_get_left_margin (setup
, GTK_UNIT_POINTS
));
554 gnm_conf_set_printsetup_margin_gtk_right
555 (gtk_page_setup_get_right_margin (setup
, GTK_UNIT_POINTS
));
559 gnm_conf_get_printer_decoration_font (void)
561 GnmStyle
*style
= gnm_style_new ();
563 gnm_style_set_font_name (style
,
564 gnm_conf_get_printsetup_hf_font_name ());
565 gnm_style_set_font_size (style
,
566 gnm_conf_get_printsetup_hf_font_size ());
567 gnm_style_set_font_bold (style
,
568 gnm_conf_get_printsetup_hf_font_bold ());
569 gnm_style_set_font_italic (style
,
570 gnm_conf_get_printsetup_hf_font_italic ());
575 #define TOOLBAR_TANGO(Object,Format,Standard) \
576 if (strcmp (name, "ObjectToolbar") == 0) \
578 else if (strcmp (name, "FormatToolbar") == 0) \
580 else if (strcmp (name, "StandardToolbar") == 0) \
585 gnm_conf_get_toolbar_visible (const char *name
)
588 (return gnm_conf_get_core_gui_toolbars_object_visible ();,
589 return gnm_conf_get_core_gui_toolbars_format_visible ();,
590 return gnm_conf_get_core_gui_toolbars_standard_visible (););
592 g_warning ("Unknown toolbar: %s", name
);
597 gnm_conf_set_toolbar_visible (const char *name
, gboolean x
)
600 (gnm_conf_set_core_gui_toolbars_object_visible (x
);,
601 gnm_conf_set_core_gui_toolbars_format_visible (x
);,
602 gnm_conf_set_core_gui_toolbars_standard_visible (x
););
606 gnm_conf_get_toolbar_position (const char *name
)
609 (return gnm_conf_get_core_gui_toolbars_object_position ();,
610 return gnm_conf_get_core_gui_toolbars_format_position ();,
611 return gnm_conf_get_core_gui_toolbars_standard_position (););
613 g_warning ("Unknown toolbar: %s", name
);
618 gnm_conf_set_toolbar_position (const char *name
, GtkPositionType x
)
621 (gnm_conf_set_core_gui_toolbars_object_position (x
);,
622 gnm_conf_set_core_gui_toolbars_format_position (x
);,
623 gnm_conf_set_core_gui_toolbars_standard_position (x
););
629 * gnm_conf_get_print_settings:
631 * Returns: (transfer full): the default #GtkPrintSettings.
634 gnm_conf_get_print_settings (void)
636 GtkPrintSettings
*settings
= gtk_print_settings_new ();
637 GSList
*list
= gnm_conf_get_printsetup_gtk_setting ();
639 while (list
&& list
->next
) {
640 /* For historical reasons, value comes before key. */
641 const char *value
= list
->data
;
642 const char *key
= list
->next
->data
;
644 list
= list
->next
->next
;
645 gtk_print_settings_set (settings
, key
, value
);
652 gnm_gconf_set_print_settings_cb (const gchar
*key
, const gchar
*value
, gpointer user_data
)
654 GSList
**list
= user_data
;
656 /* For historical reasons, value comes before key. */
657 *list
= g_slist_prepend (*list
, g_strdup (key
));
658 *list
= g_slist_prepend (*list
, g_strdup (value
));
662 gnm_conf_set_print_settings (GtkPrintSettings
*settings
)
666 gtk_print_settings_foreach (settings
, gnm_gconf_set_print_settings_cb
, &list
);
667 gnm_conf_set_printsetup_gtk_setting (list
);
668 g_slist_free_full (list
, g_free
);
672 gnm_conf_get_detachable_toolbars (void)
677 return go_conf_get_bool
679 "/desktop/interface/toolbar_detachable");
683 /* ------------------------------------------------------------------------- */
685 * The following code was generated by running
687 * make update-gnumeric-conf
690 /* ----------- AUTOMATICALLY GENERATED CODE BELOW -- DO NOT EDIT ----------- */
692 static struct cb_watch_bool watch_autocorrect_first_letter
= {
693 0, "autocorrect/first-letter",
694 "Autocorrect first letter",
695 "This variable determines whether to autocorrect first letters",
700 gnm_conf_get_autocorrect_first_letter (void)
702 if (!watch_autocorrect_first_letter
.handler
)
703 watch_bool (&watch_autocorrect_first_letter
);
704 return watch_autocorrect_first_letter
.var
;
708 gnm_conf_set_autocorrect_first_letter (gboolean x
)
710 if (!watch_autocorrect_first_letter
.handler
)
711 watch_bool (&watch_autocorrect_first_letter
);
712 set_bool (&watch_autocorrect_first_letter
, x
);
716 gnm_conf_get_autocorrect_first_letter_node (void)
718 return get_watch_node (&watch_autocorrect_first_letter
);
721 static struct cb_watch_string_list watch_autocorrect_first_letter_list
= {
722 0, "autocorrect/first-letter-list",
723 "List of First Letter Exception",
724 "The autocorrect engine does not capitalize the first letter of words following strings in this list.",
728 * gnm_conf_get_autocorrect_first_letter_list:
730 * Returns: (element-type char) (transfer none):
733 gnm_conf_get_autocorrect_first_letter_list (void)
735 if (!watch_autocorrect_first_letter_list
.handler
)
736 watch_string_list (&watch_autocorrect_first_letter_list
);
737 return watch_autocorrect_first_letter_list
.var
;
741 * gnm_conf_set_autocorrect_first_letter_list:
742 * @x: (element-type char): list of strings
746 gnm_conf_set_autocorrect_first_letter_list (GSList
*x
)
748 if (!watch_autocorrect_first_letter_list
.handler
)
749 watch_string_list (&watch_autocorrect_first_letter_list
);
750 set_string_list (&watch_autocorrect_first_letter_list
, x
);
754 gnm_conf_get_autocorrect_first_letter_list_node (void)
756 return get_watch_node (&watch_autocorrect_first_letter_list
);
759 static struct cb_watch_bool watch_autocorrect_init_caps
= {
760 0, "autocorrect/init-caps",
761 "Autocorrect initial caps",
762 "This variable determines whether to autocorrect initial caps",
767 gnm_conf_get_autocorrect_init_caps (void)
769 if (!watch_autocorrect_init_caps
.handler
)
770 watch_bool (&watch_autocorrect_init_caps
);
771 return watch_autocorrect_init_caps
.var
;
775 gnm_conf_set_autocorrect_init_caps (gboolean x
)
777 if (!watch_autocorrect_init_caps
.handler
)
778 watch_bool (&watch_autocorrect_init_caps
);
779 set_bool (&watch_autocorrect_init_caps
, x
);
783 gnm_conf_get_autocorrect_init_caps_node (void)
785 return get_watch_node (&watch_autocorrect_init_caps
);
788 static struct cb_watch_string_list watch_autocorrect_init_caps_list
= {
789 0, "autocorrect/init-caps-list",
790 "List of initial caps exceptions",
791 "The autocorrect engine does not correct the initial caps for words in this list.",
795 * gnm_conf_get_autocorrect_init_caps_list:
797 * Returns: (element-type char) (transfer none):
800 gnm_conf_get_autocorrect_init_caps_list (void)
802 if (!watch_autocorrect_init_caps_list
.handler
)
803 watch_string_list (&watch_autocorrect_init_caps_list
);
804 return watch_autocorrect_init_caps_list
.var
;
808 * gnm_conf_set_autocorrect_init_caps_list:
809 * @x: (element-type char): list of strings
813 gnm_conf_set_autocorrect_init_caps_list (GSList
*x
)
815 if (!watch_autocorrect_init_caps_list
.handler
)
816 watch_string_list (&watch_autocorrect_init_caps_list
);
817 set_string_list (&watch_autocorrect_init_caps_list
, x
);
821 gnm_conf_get_autocorrect_init_caps_list_node (void)
823 return get_watch_node (&watch_autocorrect_init_caps_list
);
826 static struct cb_watch_bool watch_autocorrect_names_of_days
= {
827 0, "autocorrect/names-of-days",
828 "Autocorrect names of days",
829 "This variable determines whether to autocorrect names of days",
834 gnm_conf_get_autocorrect_names_of_days (void)
836 if (!watch_autocorrect_names_of_days
.handler
)
837 watch_bool (&watch_autocorrect_names_of_days
);
838 return watch_autocorrect_names_of_days
.var
;
842 gnm_conf_set_autocorrect_names_of_days (gboolean x
)
844 if (!watch_autocorrect_names_of_days
.handler
)
845 watch_bool (&watch_autocorrect_names_of_days
);
846 set_bool (&watch_autocorrect_names_of_days
, x
);
850 gnm_conf_get_autocorrect_names_of_days_node (void)
852 return get_watch_node (&watch_autocorrect_names_of_days
);
855 static struct cb_watch_bool watch_autocorrect_replace
= {
856 0, "autocorrect/replace",
857 "Autocorrect replace",
858 "Autocorrect replace",
863 gnm_conf_get_autocorrect_replace (void)
865 if (!watch_autocorrect_replace
.handler
)
866 watch_bool (&watch_autocorrect_replace
);
867 return watch_autocorrect_replace
.var
;
871 gnm_conf_set_autocorrect_replace (gboolean x
)
873 if (!watch_autocorrect_replace
.handler
)
874 watch_bool (&watch_autocorrect_replace
);
875 set_bool (&watch_autocorrect_replace
, x
);
879 gnm_conf_get_autocorrect_replace_node (void)
881 return get_watch_node (&watch_autocorrect_replace
);
884 static struct cb_watch_string_list watch_autoformat_extra_dirs
= {
885 0, "autoformat/extra-dirs",
886 "List of Extra Autoformat Directories.",
887 "This list contains all extra directories containing autoformat templates.",
891 * gnm_conf_get_autoformat_extra_dirs:
893 * Returns: (element-type char) (transfer none):
896 gnm_conf_get_autoformat_extra_dirs (void)
898 if (!watch_autoformat_extra_dirs
.handler
)
899 watch_string_list (&watch_autoformat_extra_dirs
);
900 return watch_autoformat_extra_dirs
.var
;
904 * gnm_conf_set_autoformat_extra_dirs:
905 * @x: (element-type char): list of strings
909 gnm_conf_set_autoformat_extra_dirs (GSList
*x
)
911 if (!watch_autoformat_extra_dirs
.handler
)
912 watch_string_list (&watch_autoformat_extra_dirs
);
913 set_string_list (&watch_autoformat_extra_dirs
, x
);
917 gnm_conf_get_autoformat_extra_dirs_node (void)
919 return get_watch_node (&watch_autoformat_extra_dirs
);
922 static struct cb_watch_string watch_autoformat_sys_dir
= {
923 0, "autoformat/sys-dir",
924 "System Directory for Autoformats",
925 "This directory contains the pre-installed autoformat templates.",
926 "autoformat-templates",
930 gnm_conf_get_autoformat_sys_dir (void)
932 if (!watch_autoformat_sys_dir
.handler
)
933 watch_string (&watch_autoformat_sys_dir
);
934 return watch_autoformat_sys_dir
.var
;
938 gnm_conf_set_autoformat_sys_dir (const char *x
)
940 g_return_if_fail (x
!= NULL
);
941 if (!watch_autoformat_sys_dir
.handler
)
942 watch_string (&watch_autoformat_sys_dir
);
943 set_string (&watch_autoformat_sys_dir
, x
);
947 gnm_conf_get_autoformat_sys_dir_node (void)
949 return get_watch_node (&watch_autoformat_sys_dir
);
952 static struct cb_watch_string watch_autoformat_usr_dir
= {
953 0, "autoformat/usr-dir",
954 "User Directory for Autoformats",
955 "The main directory for user specific autoformat templates.",
956 "autoformat-templates",
960 gnm_conf_get_autoformat_usr_dir (void)
962 if (!watch_autoformat_usr_dir
.handler
)
963 watch_string (&watch_autoformat_usr_dir
);
964 return watch_autoformat_usr_dir
.var
;
968 gnm_conf_set_autoformat_usr_dir (const char *x
)
970 g_return_if_fail (x
!= NULL
);
971 if (!watch_autoformat_usr_dir
.handler
)
972 watch_string (&watch_autoformat_usr_dir
);
973 set_string (&watch_autoformat_usr_dir
, x
);
977 gnm_conf_get_autoformat_usr_dir_node (void)
979 return get_watch_node (&watch_autoformat_usr_dir
);
982 static struct cb_watch_bool watch_core_defaultfont_bold
= {
983 0, "core/defaultfont/bold",
984 "The default font is bold.",
985 "This value determines whether the default font for a new workbook is bold.",
990 gnm_conf_get_core_defaultfont_bold (void)
992 if (!watch_core_defaultfont_bold
.handler
)
993 watch_bool (&watch_core_defaultfont_bold
);
994 return watch_core_defaultfont_bold
.var
;
998 gnm_conf_set_core_defaultfont_bold (gboolean x
)
1000 if (!watch_core_defaultfont_bold
.handler
)
1001 watch_bool (&watch_core_defaultfont_bold
);
1002 set_bool (&watch_core_defaultfont_bold
, x
);
1006 gnm_conf_get_core_defaultfont_bold_node (void)
1008 return get_watch_node (&watch_core_defaultfont_bold
);
1011 static struct cb_watch_bool watch_core_defaultfont_italic
= {
1012 0, "core/defaultfont/italic",
1013 "The default font is italic.",
1014 "This value determines whether the default font for a new workbook is italic.",
1019 gnm_conf_get_core_defaultfont_italic (void)
1021 if (!watch_core_defaultfont_italic
.handler
)
1022 watch_bool (&watch_core_defaultfont_italic
);
1023 return watch_core_defaultfont_italic
.var
;
1027 gnm_conf_set_core_defaultfont_italic (gboolean x
)
1029 if (!watch_core_defaultfont_italic
.handler
)
1030 watch_bool (&watch_core_defaultfont_italic
);
1031 set_bool (&watch_core_defaultfont_italic
, x
);
1035 gnm_conf_get_core_defaultfont_italic_node (void)
1037 return get_watch_node (&watch_core_defaultfont_italic
);
1040 static struct cb_watch_string watch_core_defaultfont_name
= {
1041 0, "core/defaultfont/name",
1042 "Default font name",
1043 "The default font name for new workbooks.",
1048 gnm_conf_get_core_defaultfont_name (void)
1050 if (!watch_core_defaultfont_name
.handler
)
1051 watch_string (&watch_core_defaultfont_name
);
1052 return watch_core_defaultfont_name
.var
;
1056 gnm_conf_set_core_defaultfont_name (const char *x
)
1058 g_return_if_fail (x
!= NULL
);
1059 if (!watch_core_defaultfont_name
.handler
)
1060 watch_string (&watch_core_defaultfont_name
);
1061 set_string (&watch_core_defaultfont_name
, x
);
1065 gnm_conf_get_core_defaultfont_name_node (void)
1067 return get_watch_node (&watch_core_defaultfont_name
);
1070 static struct cb_watch_double watch_core_defaultfont_size
= {
1071 0, "core/defaultfont/size",
1072 "Default Font Size",
1073 "The default font size for new workbooks.",
1078 gnm_conf_get_core_defaultfont_size (void)
1080 if (!watch_core_defaultfont_size
.handler
)
1081 watch_double (&watch_core_defaultfont_size
);
1082 return watch_core_defaultfont_size
.var
;
1086 gnm_conf_set_core_defaultfont_size (double x
)
1088 if (!watch_core_defaultfont_size
.handler
)
1089 watch_double (&watch_core_defaultfont_size
);
1090 set_double (&watch_core_defaultfont_size
, x
);
1094 gnm_conf_get_core_defaultfont_size_node (void)
1096 return get_watch_node (&watch_core_defaultfont_size
);
1099 static struct cb_watch_bool watch_core_file_save_def_overwrite
= {
1100 0, "core/file/save/def-overwrite",
1101 "Default To Overwriting Files",
1102 "Before an existing file is being overwritten, Gnumeric will present a warning dialog. Setting this option will make the overwrite button in that dialog the default button.",
1107 gnm_conf_get_core_file_save_def_overwrite (void)
1109 if (!watch_core_file_save_def_overwrite
.handler
)
1110 watch_bool (&watch_core_file_save_def_overwrite
);
1111 return watch_core_file_save_def_overwrite
.var
;
1115 gnm_conf_set_core_file_save_def_overwrite (gboolean x
)
1117 if (!watch_core_file_save_def_overwrite
.handler
)
1118 watch_bool (&watch_core_file_save_def_overwrite
);
1119 set_bool (&watch_core_file_save_def_overwrite
, x
);
1123 gnm_conf_get_core_file_save_def_overwrite_node (void)
1125 return get_watch_node (&watch_core_file_save_def_overwrite
);
1128 static struct cb_watch_string_list watch_core_file_save_extension_check_disabled
= {
1129 0, "core/file/save/extension-check-disabled",
1130 "List of file savers with disabled extension check.",
1131 "This list contains the ids of the file savers for which the extension check is disabled.",
1135 * gnm_conf_get_core_file_save_extension_check_disabled:
1137 * Returns: (element-type char) (transfer none):
1140 gnm_conf_get_core_file_save_extension_check_disabled (void)
1142 if (!watch_core_file_save_extension_check_disabled
.handler
)
1143 watch_string_list (&watch_core_file_save_extension_check_disabled
);
1144 return watch_core_file_save_extension_check_disabled
.var
;
1148 * gnm_conf_set_core_file_save_extension_check_disabled:
1149 * @x: (element-type char): list of strings
1153 gnm_conf_set_core_file_save_extension_check_disabled (GSList
*x
)
1155 if (!watch_core_file_save_extension_check_disabled
.handler
)
1156 watch_string_list (&watch_core_file_save_extension_check_disabled
);
1157 set_string_list (&watch_core_file_save_extension_check_disabled
, x
);
1161 gnm_conf_get_core_file_save_extension_check_disabled_node (void)
1163 return get_watch_node (&watch_core_file_save_extension_check_disabled
);
1166 static struct cb_watch_bool watch_core_file_save_single_sheet
= {
1167 0, "core/file/save/single-sheet",
1168 "Warn When Exporting Into Single Sheet Format",
1169 "Some file formats can contain only a single sheet. This variable determines whether the user will be warned if only a single sheet of a multi-sheet workbook is being saved.",
1174 gnm_conf_get_core_file_save_single_sheet (void)
1176 if (!watch_core_file_save_single_sheet
.handler
)
1177 watch_bool (&watch_core_file_save_single_sheet
);
1178 return watch_core_file_save_single_sheet
.var
;
1182 gnm_conf_set_core_file_save_single_sheet (gboolean x
)
1184 if (!watch_core_file_save_single_sheet
.handler
)
1185 watch_bool (&watch_core_file_save_single_sheet
);
1186 set_bool (&watch_core_file_save_single_sheet
, x
);
1190 gnm_conf_get_core_file_save_single_sheet_node (void)
1192 return get_watch_node (&watch_core_file_save_single_sheet
);
1195 static struct cb_watch_bool watch_core_gui_cells_extension_markers
= {
1196 0, "core/gui/cells/extension-markers",
1197 "Extension Markers",
1198 "This variable determines whether cells with truncated content are marked.",
1203 gnm_conf_get_core_gui_cells_extension_markers (void)
1205 if (!watch_core_gui_cells_extension_markers
.handler
)
1206 watch_bool (&watch_core_gui_cells_extension_markers
);
1207 return watch_core_gui_cells_extension_markers
.var
;
1211 gnm_conf_set_core_gui_cells_extension_markers (gboolean x
)
1213 if (!watch_core_gui_cells_extension_markers
.handler
)
1214 watch_bool (&watch_core_gui_cells_extension_markers
);
1215 set_bool (&watch_core_gui_cells_extension_markers
, x
);
1219 gnm_conf_get_core_gui_cells_extension_markers_node (void)
1221 return get_watch_node (&watch_core_gui_cells_extension_markers
);
1224 static struct cb_watch_bool watch_core_gui_cells_function_markers
= {
1225 0, "core/gui/cells/function-markers",
1227 "This variable determines whether cells containing spreadsheet function are marked.",
1232 gnm_conf_get_core_gui_cells_function_markers (void)
1234 if (!watch_core_gui_cells_function_markers
.handler
)
1235 watch_bool (&watch_core_gui_cells_function_markers
);
1236 return watch_core_gui_cells_function_markers
.var
;
1240 gnm_conf_set_core_gui_cells_function_markers (gboolean x
)
1242 if (!watch_core_gui_cells_function_markers
.handler
)
1243 watch_bool (&watch_core_gui_cells_function_markers
);
1244 set_bool (&watch_core_gui_cells_function_markers
, x
);
1248 gnm_conf_get_core_gui_cells_function_markers_node (void)
1250 return get_watch_node (&watch_core_gui_cells_function_markers
);
1253 static struct cb_watch_bool watch_core_gui_editing_autocomplete
= {
1254 0, "core/gui/editing/autocomplete",
1256 "This variable determines whether autocompletion is set on.",
1261 gnm_conf_get_core_gui_editing_autocomplete (void)
1263 if (!watch_core_gui_editing_autocomplete
.handler
)
1264 watch_bool (&watch_core_gui_editing_autocomplete
);
1265 return watch_core_gui_editing_autocomplete
.var
;
1269 gnm_conf_set_core_gui_editing_autocomplete (gboolean x
)
1271 if (!watch_core_gui_editing_autocomplete
.handler
)
1272 watch_bool (&watch_core_gui_editing_autocomplete
);
1273 set_bool (&watch_core_gui_editing_autocomplete
, x
);
1277 gnm_conf_get_core_gui_editing_autocomplete_node (void)
1279 return get_watch_node (&watch_core_gui_editing_autocomplete
);
1282 static struct cb_watch_int watch_core_gui_editing_autocomplete_min_chars
= {
1283 0, "core/gui/editing/autocomplete-min-chars",
1284 "Minimum Number of Characters for Autocompletion",
1285 "This variable determines the minimum number of characters required for autocompletion.",
1290 gnm_conf_get_core_gui_editing_autocomplete_min_chars (void)
1292 if (!watch_core_gui_editing_autocomplete_min_chars
.handler
)
1293 watch_int (&watch_core_gui_editing_autocomplete_min_chars
);
1294 return watch_core_gui_editing_autocomplete_min_chars
.var
;
1298 gnm_conf_set_core_gui_editing_autocomplete_min_chars (int x
)
1300 if (!watch_core_gui_editing_autocomplete_min_chars
.handler
)
1301 watch_int (&watch_core_gui_editing_autocomplete_min_chars
);
1302 set_int (&watch_core_gui_editing_autocomplete_min_chars
, x
);
1306 gnm_conf_get_core_gui_editing_autocomplete_min_chars_node (void)
1308 return get_watch_node (&watch_core_gui_editing_autocomplete_min_chars
);
1311 static struct cb_watch_enum watch_core_gui_editing_enter_moves_dir
= {
1312 0, "core/gui/editing/enter-moves-dir",
1314 "Which direction pressing Enter will move the edit position.",
1319 gnm_conf_get_core_gui_editing_enter_moves_dir (void)
1321 if (!watch_core_gui_editing_enter_moves_dir
.handler
)
1322 watch_enum (&watch_core_gui_editing_enter_moves_dir
, GO_TYPE_DIRECTION
);
1323 return watch_core_gui_editing_enter_moves_dir
.var
;
1327 gnm_conf_set_core_gui_editing_enter_moves_dir (GODirection x
)
1329 if (!watch_core_gui_editing_enter_moves_dir
.handler
)
1330 watch_enum (&watch_core_gui_editing_enter_moves_dir
, GO_TYPE_DIRECTION
);
1331 set_enum (&watch_core_gui_editing_enter_moves_dir
, x
);
1335 gnm_conf_get_core_gui_editing_enter_moves_dir_node (void)
1337 return get_watch_node (&watch_core_gui_editing_enter_moves_dir
);
1340 static struct cb_watch_bool watch_core_gui_editing_function_argument_tooltips
= {
1341 0, "core/gui/editing/function-argument-tooltips",
1342 "Show Function Argument Tooltips",
1343 "This variable determines whether to show function argument tooltips.",
1348 gnm_conf_get_core_gui_editing_function_argument_tooltips (void)
1350 if (!watch_core_gui_editing_function_argument_tooltips
.handler
)
1351 watch_bool (&watch_core_gui_editing_function_argument_tooltips
);
1352 return watch_core_gui_editing_function_argument_tooltips
.var
;
1356 gnm_conf_set_core_gui_editing_function_argument_tooltips (gboolean x
)
1358 if (!watch_core_gui_editing_function_argument_tooltips
.handler
)
1359 watch_bool (&watch_core_gui_editing_function_argument_tooltips
);
1360 set_bool (&watch_core_gui_editing_function_argument_tooltips
, x
);
1364 gnm_conf_get_core_gui_editing_function_argument_tooltips_node (void)
1366 return get_watch_node (&watch_core_gui_editing_function_argument_tooltips
);
1369 static struct cb_watch_bool watch_core_gui_editing_function_name_tooltips
= {
1370 0, "core/gui/editing/function-name-tooltips",
1371 "Show Function Name Tooltips",
1372 "This variable determines whether to show function name tooltips.",
1377 gnm_conf_get_core_gui_editing_function_name_tooltips (void)
1379 if (!watch_core_gui_editing_function_name_tooltips
.handler
)
1380 watch_bool (&watch_core_gui_editing_function_name_tooltips
);
1381 return watch_core_gui_editing_function_name_tooltips
.var
;
1385 gnm_conf_set_core_gui_editing_function_name_tooltips (gboolean x
)
1387 if (!watch_core_gui_editing_function_name_tooltips
.handler
)
1388 watch_bool (&watch_core_gui_editing_function_name_tooltips
);
1389 set_bool (&watch_core_gui_editing_function_name_tooltips
, x
);
1393 gnm_conf_get_core_gui_editing_function_name_tooltips_node (void)
1395 return get_watch_node (&watch_core_gui_editing_function_name_tooltips
);
1398 static struct cb_watch_int watch_core_gui_editing_recalclag
= {
1399 0, "core/gui/editing/recalclag",
1400 "Auto Expression Recalculation Lag",
1401 "If `lag' is 0, Gnumeric recalculates all auto expressions immediately after every change. Non-zero values of `lag' allow Gnumeric to accumulate more changes before each recalculation. If `lag' is positive, then whenever a change appears, Gnumeric waits `lag' milliseconds and then recalculates; if more changes appear during that period, they are also processed at that time. If `lag' is negative, then recalculation happens only after a quiet period of |lag| milliseconds.",
1406 gnm_conf_get_core_gui_editing_recalclag (void)
1408 if (!watch_core_gui_editing_recalclag
.handler
)
1409 watch_int (&watch_core_gui_editing_recalclag
);
1410 return watch_core_gui_editing_recalclag
.var
;
1414 gnm_conf_set_core_gui_editing_recalclag (int x
)
1416 if (!watch_core_gui_editing_recalclag
.handler
)
1417 watch_int (&watch_core_gui_editing_recalclag
);
1418 set_int (&watch_core_gui_editing_recalclag
, x
);
1422 gnm_conf_get_core_gui_editing_recalclag_node (void)
1424 return get_watch_node (&watch_core_gui_editing_recalclag
);
1427 static struct cb_watch_bool watch_core_gui_editing_transitionkeys
= {
1428 0, "core/gui/editing/transitionkeys",
1430 "This variable determines whether transition keys are set on. Transition keys are a throw back to 1-2-3 style event handling. They turn Ctrl-arrow into page movement rather than jumping to the start/end of series.",
1435 gnm_conf_get_core_gui_editing_transitionkeys (void)
1437 if (!watch_core_gui_editing_transitionkeys
.handler
)
1438 watch_bool (&watch_core_gui_editing_transitionkeys
);
1439 return watch_core_gui_editing_transitionkeys
.var
;
1443 gnm_conf_set_core_gui_editing_transitionkeys (gboolean x
)
1445 if (!watch_core_gui_editing_transitionkeys
.handler
)
1446 watch_bool (&watch_core_gui_editing_transitionkeys
);
1447 set_bool (&watch_core_gui_editing_transitionkeys
, x
);
1451 gnm_conf_get_core_gui_editing_transitionkeys_node (void)
1453 return get_watch_node (&watch_core_gui_editing_transitionkeys
);
1456 static struct cb_watch_double watch_core_gui_screen_horizontaldpi
= {
1457 0, "core/gui/screen/horizontaldpi",
1459 "Screen resolution in the horizontal direction.",
1464 gnm_conf_get_core_gui_screen_horizontaldpi (void)
1466 if (!watch_core_gui_screen_horizontaldpi
.handler
)
1467 watch_double (&watch_core_gui_screen_horizontaldpi
);
1468 return watch_core_gui_screen_horizontaldpi
.var
;
1472 gnm_conf_set_core_gui_screen_horizontaldpi (double x
)
1474 if (!watch_core_gui_screen_horizontaldpi
.handler
)
1475 watch_double (&watch_core_gui_screen_horizontaldpi
);
1476 set_double (&watch_core_gui_screen_horizontaldpi
, x
);
1480 gnm_conf_get_core_gui_screen_horizontaldpi_node (void)
1482 return get_watch_node (&watch_core_gui_screen_horizontaldpi
);
1485 static struct cb_watch_double watch_core_gui_screen_verticaldpi
= {
1486 0, "core/gui/screen/verticaldpi",
1488 "Screen resolution in the vertical direction.",
1493 gnm_conf_get_core_gui_screen_verticaldpi (void)
1495 if (!watch_core_gui_screen_verticaldpi
.handler
)
1496 watch_double (&watch_core_gui_screen_verticaldpi
);
1497 return watch_core_gui_screen_verticaldpi
.var
;
1501 gnm_conf_set_core_gui_screen_verticaldpi (double x
)
1503 if (!watch_core_gui_screen_verticaldpi
.handler
)
1504 watch_double (&watch_core_gui_screen_verticaldpi
);
1505 set_double (&watch_core_gui_screen_verticaldpi
, x
);
1509 gnm_conf_get_core_gui_screen_verticaldpi_node (void)
1511 return get_watch_node (&watch_core_gui_screen_verticaldpi
);
1514 static struct cb_watch_int watch_core_gui_toolbars_format_position
= {
1515 0, "core/gui/toolbars/format-position",
1516 "Format toolbar position",
1517 "This variable determines where the format toolbar should be shown. 0 is left, 1 is right, 2 is top.",
1522 gnm_conf_get_core_gui_toolbars_format_position (void)
1524 if (!watch_core_gui_toolbars_format_position
.handler
)
1525 watch_int (&watch_core_gui_toolbars_format_position
);
1526 return watch_core_gui_toolbars_format_position
.var
;
1530 gnm_conf_set_core_gui_toolbars_format_position (GtkPositionType x
)
1532 if (!watch_core_gui_toolbars_format_position
.handler
)
1533 watch_int (&watch_core_gui_toolbars_format_position
);
1534 set_int (&watch_core_gui_toolbars_format_position
, x
);
1538 gnm_conf_get_core_gui_toolbars_format_position_node (void)
1540 return get_watch_node (&watch_core_gui_toolbars_format_position
);
1543 static struct cb_watch_bool watch_core_gui_toolbars_format_visible
= {
1544 0, "core/gui/toolbars/format-visible",
1545 "Format toolbar visible",
1546 "This variable determines whether the format toolbar should be visible initially.",
1551 gnm_conf_get_core_gui_toolbars_format_visible (void)
1553 if (!watch_core_gui_toolbars_format_visible
.handler
)
1554 watch_bool (&watch_core_gui_toolbars_format_visible
);
1555 return watch_core_gui_toolbars_format_visible
.var
;
1559 gnm_conf_set_core_gui_toolbars_format_visible (gboolean x
)
1561 if (!watch_core_gui_toolbars_format_visible
.handler
)
1562 watch_bool (&watch_core_gui_toolbars_format_visible
);
1563 set_bool (&watch_core_gui_toolbars_format_visible
, x
);
1567 gnm_conf_get_core_gui_toolbars_format_visible_node (void)
1569 return get_watch_node (&watch_core_gui_toolbars_format_visible
);
1572 static struct cb_watch_int watch_core_gui_toolbars_object_position
= {
1573 0, "core/gui/toolbars/object-position",
1574 "Object toolbar position",
1575 "This variable determines where the object toolbar should be shown. 0 is left, 1 is right, 2 is top.",
1580 gnm_conf_get_core_gui_toolbars_object_position (void)
1582 if (!watch_core_gui_toolbars_object_position
.handler
)
1583 watch_int (&watch_core_gui_toolbars_object_position
);
1584 return watch_core_gui_toolbars_object_position
.var
;
1588 gnm_conf_set_core_gui_toolbars_object_position (GtkPositionType x
)
1590 if (!watch_core_gui_toolbars_object_position
.handler
)
1591 watch_int (&watch_core_gui_toolbars_object_position
);
1592 set_int (&watch_core_gui_toolbars_object_position
, x
);
1596 gnm_conf_get_core_gui_toolbars_object_position_node (void)
1598 return get_watch_node (&watch_core_gui_toolbars_object_position
);
1601 static struct cb_watch_bool watch_core_gui_toolbars_object_visible
= {
1602 0, "core/gui/toolbars/object-visible",
1603 "Object toolbar visible",
1604 "This variable determines whether the object toolbar should be visible initially.",
1609 gnm_conf_get_core_gui_toolbars_object_visible (void)
1611 if (!watch_core_gui_toolbars_object_visible
.handler
)
1612 watch_bool (&watch_core_gui_toolbars_object_visible
);
1613 return watch_core_gui_toolbars_object_visible
.var
;
1617 gnm_conf_set_core_gui_toolbars_object_visible (gboolean x
)
1619 if (!watch_core_gui_toolbars_object_visible
.handler
)
1620 watch_bool (&watch_core_gui_toolbars_object_visible
);
1621 set_bool (&watch_core_gui_toolbars_object_visible
, x
);
1625 gnm_conf_get_core_gui_toolbars_object_visible_node (void)
1627 return get_watch_node (&watch_core_gui_toolbars_object_visible
);
1630 static struct cb_watch_int watch_core_gui_toolbars_standard_position
= {
1631 0, "core/gui/toolbars/standard-position",
1632 "Standard toolbar position",
1633 "This variable determines where the standard toolbar should be shown. 0 is left, 1 is right, 2 is top.",
1638 gnm_conf_get_core_gui_toolbars_standard_position (void)
1640 if (!watch_core_gui_toolbars_standard_position
.handler
)
1641 watch_int (&watch_core_gui_toolbars_standard_position
);
1642 return watch_core_gui_toolbars_standard_position
.var
;
1646 gnm_conf_set_core_gui_toolbars_standard_position (GtkPositionType x
)
1648 if (!watch_core_gui_toolbars_standard_position
.handler
)
1649 watch_int (&watch_core_gui_toolbars_standard_position
);
1650 set_int (&watch_core_gui_toolbars_standard_position
, x
);
1654 gnm_conf_get_core_gui_toolbars_standard_position_node (void)
1656 return get_watch_node (&watch_core_gui_toolbars_standard_position
);
1659 static struct cb_watch_bool watch_core_gui_toolbars_standard_visible
= {
1660 0, "core/gui/toolbars/standard-visible",
1661 "Standard toolbar visible",
1662 "This variable determines whether the standard toolbar should be visible initially.",
1667 gnm_conf_get_core_gui_toolbars_standard_visible (void)
1669 if (!watch_core_gui_toolbars_standard_visible
.handler
)
1670 watch_bool (&watch_core_gui_toolbars_standard_visible
);
1671 return watch_core_gui_toolbars_standard_visible
.var
;
1675 gnm_conf_set_core_gui_toolbars_standard_visible (gboolean x
)
1677 if (!watch_core_gui_toolbars_standard_visible
.handler
)
1678 watch_bool (&watch_core_gui_toolbars_standard_visible
);
1679 set_bool (&watch_core_gui_toolbars_standard_visible
, x
);
1683 gnm_conf_get_core_gui_toolbars_standard_visible_node (void)
1685 return get_watch_node (&watch_core_gui_toolbars_standard_visible
);
1688 static struct cb_watch_double watch_core_gui_window_x
= {
1689 0, "core/gui/window/x",
1690 "Default Horizontal Window Size",
1691 "This number (between 0.25 and 1.00) gives the horizontal fraction of the screen size covered by the default window.",
1696 gnm_conf_get_core_gui_window_x (void)
1698 if (!watch_core_gui_window_x
.handler
)
1699 watch_double (&watch_core_gui_window_x
);
1700 return watch_core_gui_window_x
.var
;
1704 gnm_conf_set_core_gui_window_x (double x
)
1706 if (!watch_core_gui_window_x
.handler
)
1707 watch_double (&watch_core_gui_window_x
);
1708 set_double (&watch_core_gui_window_x
, x
);
1712 gnm_conf_get_core_gui_window_x_node (void)
1714 return get_watch_node (&watch_core_gui_window_x
);
1717 static struct cb_watch_double watch_core_gui_window_y
= {
1718 0, "core/gui/window/y",
1719 "Default Vertical Window Size",
1720 "This number (between 0.25 and 1.00) gives the vertical fraction of the screen size covered by the default window.",
1725 gnm_conf_get_core_gui_window_y (void)
1727 if (!watch_core_gui_window_y
.handler
)
1728 watch_double (&watch_core_gui_window_y
);
1729 return watch_core_gui_window_y
.var
;
1733 gnm_conf_set_core_gui_window_y (double x
)
1735 if (!watch_core_gui_window_y
.handler
)
1736 watch_double (&watch_core_gui_window_y
);
1737 set_double (&watch_core_gui_window_y
, x
);
1741 gnm_conf_get_core_gui_window_y_node (void)
1743 return get_watch_node (&watch_core_gui_window_y
);
1746 static struct cb_watch_double watch_core_gui_window_zoom
= {
1747 0, "core/gui/window/zoom",
1748 "Default Zoom Factor",
1749 "The initial zoom factor for new workbooks.",
1754 gnm_conf_get_core_gui_window_zoom (void)
1756 if (!watch_core_gui_window_zoom
.handler
)
1757 watch_double (&watch_core_gui_window_zoom
);
1758 return watch_core_gui_window_zoom
.var
;
1762 gnm_conf_set_core_gui_window_zoom (double x
)
1764 if (!watch_core_gui_window_zoom
.handler
)
1765 watch_double (&watch_core_gui_window_zoom
);
1766 set_double (&watch_core_gui_window_zoom
, x
);
1770 gnm_conf_get_core_gui_window_zoom_node (void)
1772 return get_watch_node (&watch_core_gui_window_zoom
);
1775 static struct cb_watch_bool watch_core_sort_default_ascending
= {
1776 0, "core/sort/default/ascending",
1778 "This option determines the initial state of the sort-order button in the sort dialog.",
1783 gnm_conf_get_core_sort_default_ascending (void)
1785 if (!watch_core_sort_default_ascending
.handler
)
1786 watch_bool (&watch_core_sort_default_ascending
);
1787 return watch_core_sort_default_ascending
.var
;
1791 gnm_conf_set_core_sort_default_ascending (gboolean x
)
1793 if (!watch_core_sort_default_ascending
.handler
)
1794 watch_bool (&watch_core_sort_default_ascending
);
1795 set_bool (&watch_core_sort_default_ascending
, x
);
1799 gnm_conf_get_core_sort_default_ascending_node (void)
1801 return get_watch_node (&watch_core_sort_default_ascending
);
1804 static struct cb_watch_bool watch_core_sort_default_by_case
= {
1805 0, "core/sort/default/by-case",
1806 "Sort is Case-Sensitive",
1807 "Setting this option will cause the sort buttons on the toolbar to perform a case-sensitive sort and determine the initial state of the case-sensitive checkbox in the sort dialog.",
1812 gnm_conf_get_core_sort_default_by_case (void)
1814 if (!watch_core_sort_default_by_case
.handler
)
1815 watch_bool (&watch_core_sort_default_by_case
);
1816 return watch_core_sort_default_by_case
.var
;
1820 gnm_conf_set_core_sort_default_by_case (gboolean x
)
1822 if (!watch_core_sort_default_by_case
.handler
)
1823 watch_bool (&watch_core_sort_default_by_case
);
1824 set_bool (&watch_core_sort_default_by_case
, x
);
1828 gnm_conf_get_core_sort_default_by_case_node (void)
1830 return get_watch_node (&watch_core_sort_default_by_case
);
1833 static struct cb_watch_bool watch_core_sort_default_retain_formats
= {
1834 0, "core/sort/default/retain-formats",
1835 "Sorting Preserves Formats",
1836 "Setting this option will cause the sort buttons on the toolbar to preserve the cell formats while sorting and determines the initial state of the preserve-formats checkbox in the sort dialog.",
1841 gnm_conf_get_core_sort_default_retain_formats (void)
1843 if (!watch_core_sort_default_retain_formats
.handler
)
1844 watch_bool (&watch_core_sort_default_retain_formats
);
1845 return watch_core_sort_default_retain_formats
.var
;
1849 gnm_conf_set_core_sort_default_retain_formats (gboolean x
)
1851 if (!watch_core_sort_default_retain_formats
.handler
)
1852 watch_bool (&watch_core_sort_default_retain_formats
);
1853 set_bool (&watch_core_sort_default_retain_formats
, x
);
1857 gnm_conf_get_core_sort_default_retain_formats_node (void)
1859 return get_watch_node (&watch_core_sort_default_retain_formats
);
1862 static struct cb_watch_int watch_core_sort_dialog_max_initial_clauses
= {
1863 0, "core/sort/dialog/max-initial-clauses",
1864 "Number of Automatic Clauses",
1865 "When selecting a sort region in the sort dialog, sort clauses are automatically added. This number determines the maximum number of clauses to be added automatically.",
1870 gnm_conf_get_core_sort_dialog_max_initial_clauses (void)
1872 if (!watch_core_sort_dialog_max_initial_clauses
.handler
)
1873 watch_int (&watch_core_sort_dialog_max_initial_clauses
);
1874 return watch_core_sort_dialog_max_initial_clauses
.var
;
1878 gnm_conf_set_core_sort_dialog_max_initial_clauses (int x
)
1880 if (!watch_core_sort_dialog_max_initial_clauses
.handler
)
1881 watch_int (&watch_core_sort_dialog_max_initial_clauses
);
1882 set_int (&watch_core_sort_dialog_max_initial_clauses
, x
);
1886 gnm_conf_get_core_sort_dialog_max_initial_clauses_node (void)
1888 return get_watch_node (&watch_core_sort_dialog_max_initial_clauses
);
1891 static struct cb_watch_int watch_core_workbook_autosave_time
= {
1892 0, "core/workbook/autosave-time",
1893 "Autosave frequency",
1894 "The number of seconds between autosaves.",
1895 0, 365 * 24 * 60 * 60, 0,
1899 gnm_conf_get_core_workbook_autosave_time (void)
1901 if (!watch_core_workbook_autosave_time
.handler
)
1902 watch_int (&watch_core_workbook_autosave_time
);
1903 return watch_core_workbook_autosave_time
.var
;
1907 gnm_conf_set_core_workbook_autosave_time (int x
)
1909 if (!watch_core_workbook_autosave_time
.handler
)
1910 watch_int (&watch_core_workbook_autosave_time
);
1911 set_int (&watch_core_workbook_autosave_time
, x
);
1915 gnm_conf_get_core_workbook_autosave_time_node (void)
1917 return get_watch_node (&watch_core_workbook_autosave_time
);
1920 static struct cb_watch_int watch_core_workbook_n_cols
= {
1921 0, "core/workbook/n-cols",
1922 "Default Number of columns in a sheet",
1923 "The number of columns in each sheet. This setting will be used only in a new Gnumeric session.",
1924 GNM_MIN_COLS
, GNM_MAX_COLS
, 256,
1928 gnm_conf_get_core_workbook_n_cols (void)
1930 if (!watch_core_workbook_n_cols
.handler
)
1931 watch_int (&watch_core_workbook_n_cols
);
1932 return watch_core_workbook_n_cols
.var
;
1936 gnm_conf_set_core_workbook_n_cols (int x
)
1938 if (!watch_core_workbook_n_cols
.handler
)
1939 watch_int (&watch_core_workbook_n_cols
);
1940 set_int (&watch_core_workbook_n_cols
, x
);
1944 gnm_conf_get_core_workbook_n_cols_node (void)
1946 return get_watch_node (&watch_core_workbook_n_cols
);
1949 static struct cb_watch_int watch_core_workbook_n_rows
= {
1950 0, "core/workbook/n-rows",
1951 "Default Number of rows in a sheet",
1952 "The number of rows in each sheet. This setting will be used only in a new Gnumeric session.",
1953 GNM_MIN_ROWS
, GNM_MAX_ROWS
, 65536,
1957 gnm_conf_get_core_workbook_n_rows (void)
1959 if (!watch_core_workbook_n_rows
.handler
)
1960 watch_int (&watch_core_workbook_n_rows
);
1961 return watch_core_workbook_n_rows
.var
;
1965 gnm_conf_set_core_workbook_n_rows (int x
)
1967 if (!watch_core_workbook_n_rows
.handler
)
1968 watch_int (&watch_core_workbook_n_rows
);
1969 set_int (&watch_core_workbook_n_rows
, x
);
1973 gnm_conf_get_core_workbook_n_rows_node (void)
1975 return get_watch_node (&watch_core_workbook_n_rows
);
1978 static struct cb_watch_int watch_core_workbook_n_sheet
= {
1979 0, "core/workbook/n-sheet",
1980 "Default Number of Sheets",
1981 "The number of sheets initially created in a new workbook.",
1986 gnm_conf_get_core_workbook_n_sheet (void)
1988 if (!watch_core_workbook_n_sheet
.handler
)
1989 watch_int (&watch_core_workbook_n_sheet
);
1990 return watch_core_workbook_n_sheet
.var
;
1994 gnm_conf_set_core_workbook_n_sheet (int x
)
1996 if (!watch_core_workbook_n_sheet
.handler
)
1997 watch_int (&watch_core_workbook_n_sheet
);
1998 set_int (&watch_core_workbook_n_sheet
, x
);
2002 gnm_conf_get_core_workbook_n_sheet_node (void)
2004 return get_watch_node (&watch_core_workbook_n_sheet
);
2007 static struct cb_watch_int watch_core_xml_compression_level
= {
2008 0, "core/xml/compression-level",
2009 "Default Compression Level For Gnumeric Files",
2010 "This integer (between 0 and 9) specifies the amount of compression performed by Gnumeric when saving files in the default file format. 0 is minimal compression while 9 is maximal compression.",
2015 gnm_conf_get_core_xml_compression_level (void)
2017 if (!watch_core_xml_compression_level
.handler
)
2018 watch_int (&watch_core_xml_compression_level
);
2019 return watch_core_xml_compression_level
.var
;
2023 gnm_conf_set_core_xml_compression_level (int x
)
2025 if (!watch_core_xml_compression_level
.handler
)
2026 watch_int (&watch_core_xml_compression_level
);
2027 set_int (&watch_core_xml_compression_level
, x
);
2031 gnm_conf_get_core_xml_compression_level_node (void)
2033 return get_watch_node (&watch_core_xml_compression_level
);
2036 static struct cb_watch_bool watch_cut_and_paste_prefer_clipboard
= {
2037 0, "cut-and-paste/prefer-clipboard",
2038 "Prefer CLIPBOARD over PRIMARY selection",
2039 "When TRUE, Gnumeric will prefer the modern CLIPBOARD selection over the legacy PRIMARY selections. Set to FALSE if you have to deal with older applications, like Xterm or Emacs, which set only the PRIMARY selection.",
2044 gnm_conf_get_cut_and_paste_prefer_clipboard (void)
2046 if (!watch_cut_and_paste_prefer_clipboard
.handler
)
2047 watch_bool (&watch_cut_and_paste_prefer_clipboard
);
2048 return watch_cut_and_paste_prefer_clipboard
.var
;
2052 gnm_conf_set_cut_and_paste_prefer_clipboard (gboolean x
)
2054 if (!watch_cut_and_paste_prefer_clipboard
.handler
)
2055 watch_bool (&watch_cut_and_paste_prefer_clipboard
);
2056 set_bool (&watch_cut_and_paste_prefer_clipboard
, x
);
2060 gnm_conf_get_cut_and_paste_prefer_clipboard_node (void)
2062 return get_watch_node (&watch_cut_and_paste_prefer_clipboard
);
2065 static struct cb_watch_bool watch_dialogs_rs_unfocused
= {
2066 0, "dialogs/rs/unfocused",
2067 "Allow Unfocused Range Selections",
2068 "Some dialogs contain only a single entry field that allows range selections in the workbook. Setting this variable to TRUE directs selections to this entry even if the entry does not have keyboard focus.",
2073 gnm_conf_get_dialogs_rs_unfocused (void)
2075 if (!watch_dialogs_rs_unfocused
.handler
)
2076 watch_bool (&watch_dialogs_rs_unfocused
);
2077 return watch_dialogs_rs_unfocused
.var
;
2081 gnm_conf_set_dialogs_rs_unfocused (gboolean x
)
2083 if (!watch_dialogs_rs_unfocused
.handler
)
2084 watch_bool (&watch_dialogs_rs_unfocused
);
2085 set_bool (&watch_dialogs_rs_unfocused
, x
);
2089 gnm_conf_get_dialogs_rs_unfocused_node (void)
2091 return get_watch_node (&watch_dialogs_rs_unfocused
);
2094 static struct cb_watch_int watch_functionselector_num_of_recent
= {
2095 0, "functionselector/num-of-recent",
2096 "Maximum Length of Recently Used Functions List",
2097 "The function selector keeps a list of recently used functions. This is the maximum length of that list.",
2102 gnm_conf_get_functionselector_num_of_recent (void)
2104 if (!watch_functionselector_num_of_recent
.handler
)
2105 watch_int (&watch_functionselector_num_of_recent
);
2106 return watch_functionselector_num_of_recent
.var
;
2110 gnm_conf_set_functionselector_num_of_recent (int x
)
2112 if (!watch_functionselector_num_of_recent
.handler
)
2113 watch_int (&watch_functionselector_num_of_recent
);
2114 set_int (&watch_functionselector_num_of_recent
, x
);
2118 gnm_conf_get_functionselector_num_of_recent_node (void)
2120 return get_watch_node (&watch_functionselector_num_of_recent
);
2123 static struct cb_watch_string_list watch_functionselector_recentfunctions
= {
2124 0, "functionselector/recentfunctions",
2125 "List of recently used functions.",
2126 "The function selector keeps a list of recently used functions. This is that list.",
2130 * gnm_conf_get_functionselector_recentfunctions:
2132 * Returns: (element-type char) (transfer none):
2135 gnm_conf_get_functionselector_recentfunctions (void)
2137 if (!watch_functionselector_recentfunctions
.handler
)
2138 watch_string_list (&watch_functionselector_recentfunctions
);
2139 return watch_functionselector_recentfunctions
.var
;
2143 * gnm_conf_set_functionselector_recentfunctions:
2144 * @x: (element-type char): list of strings
2148 gnm_conf_set_functionselector_recentfunctions (GSList
*x
)
2150 if (!watch_functionselector_recentfunctions
.handler
)
2151 watch_string_list (&watch_functionselector_recentfunctions
);
2152 set_string_list (&watch_functionselector_recentfunctions
, x
);
2156 gnm_conf_get_functionselector_recentfunctions_node (void)
2158 return get_watch_node (&watch_functionselector_recentfunctions
);
2161 static struct cb_watch_string watch_plugin_glpk_glpsol_path
= {
2162 0, "plugin/glpk/glpsol-path",
2163 "Full path of glpsol program to use",
2164 "This is the full path to the glpsol binary that the lpsolve plugin should use.",
2169 gnm_conf_get_plugin_glpk_glpsol_path (void)
2171 if (!watch_plugin_glpk_glpsol_path
.handler
)
2172 watch_string (&watch_plugin_glpk_glpsol_path
);
2173 return watch_plugin_glpk_glpsol_path
.var
;
2177 gnm_conf_set_plugin_glpk_glpsol_path (const char *x
)
2179 g_return_if_fail (x
!= NULL
);
2180 if (!watch_plugin_glpk_glpsol_path
.handler
)
2181 watch_string (&watch_plugin_glpk_glpsol_path
);
2182 set_string (&watch_plugin_glpk_glpsol_path
, x
);
2186 gnm_conf_get_plugin_glpk_glpsol_path_node (void)
2188 return get_watch_node (&watch_plugin_glpk_glpsol_path
);
2191 static struct cb_watch_bool watch_plugin_latex_use_utf8
= {
2192 0, "plugin/latex/use-utf8",
2193 "Use UTF-8 in LaTeX Export",
2194 "This setting determines whether created LaTeX files use UTF-8 (unicode) or ISO-8859-1 (Latin1). To use the UTF-8 files, you must have the ucs LaTeX package installed.",
2199 gnm_conf_get_plugin_latex_use_utf8 (void)
2201 if (!watch_plugin_latex_use_utf8
.handler
)
2202 watch_bool (&watch_plugin_latex_use_utf8
);
2203 return watch_plugin_latex_use_utf8
.var
;
2207 gnm_conf_set_plugin_latex_use_utf8 (gboolean x
)
2209 if (!watch_plugin_latex_use_utf8
.handler
)
2210 watch_bool (&watch_plugin_latex_use_utf8
);
2211 set_bool (&watch_plugin_latex_use_utf8
, x
);
2215 gnm_conf_get_plugin_latex_use_utf8_node (void)
2217 return get_watch_node (&watch_plugin_latex_use_utf8
);
2220 static struct cb_watch_string watch_plugin_lpsolve_lpsolve_path
= {
2221 0, "plugin/lpsolve/lpsolve-path",
2222 "Full path of lp_solve program to use",
2223 "This is the full path to the lp_solve binary that the lpsolve plugin should use.",
2228 gnm_conf_get_plugin_lpsolve_lpsolve_path (void)
2230 if (!watch_plugin_lpsolve_lpsolve_path
.handler
)
2231 watch_string (&watch_plugin_lpsolve_lpsolve_path
);
2232 return watch_plugin_lpsolve_lpsolve_path
.var
;
2236 gnm_conf_set_plugin_lpsolve_lpsolve_path (const char *x
)
2238 g_return_if_fail (x
!= NULL
);
2239 if (!watch_plugin_lpsolve_lpsolve_path
.handler
)
2240 watch_string (&watch_plugin_lpsolve_lpsolve_path
);
2241 set_string (&watch_plugin_lpsolve_lpsolve_path
, x
);
2245 gnm_conf_get_plugin_lpsolve_lpsolve_path_node (void)
2247 return get_watch_node (&watch_plugin_lpsolve_lpsolve_path
);
2250 static struct cb_watch_bool watch_plugins_activate_newplugins
= {
2251 0, "plugins/activate-newplugins",
2252 "Activate New Plugins",
2253 "This variable determines whether to activate every new encountered plugin.",
2258 gnm_conf_get_plugins_activate_newplugins (void)
2260 if (!watch_plugins_activate_newplugins
.handler
)
2261 watch_bool (&watch_plugins_activate_newplugins
);
2262 return watch_plugins_activate_newplugins
.var
;
2266 gnm_conf_set_plugins_activate_newplugins (gboolean x
)
2268 if (!watch_plugins_activate_newplugins
.handler
)
2269 watch_bool (&watch_plugins_activate_newplugins
);
2270 set_bool (&watch_plugins_activate_newplugins
, x
);
2274 gnm_conf_get_plugins_activate_newplugins_node (void)
2276 return get_watch_node (&watch_plugins_activate_newplugins
);
2279 static struct cb_watch_string_list watch_plugins_active
= {
2280 0, "plugins/active",
2281 "List of Active Plugins.",
2282 "This list contains all plugins that are supposed to be automatically activated.",
2286 * gnm_conf_get_plugins_active:
2288 * Returns: (element-type char) (transfer none):
2291 gnm_conf_get_plugins_active (void)
2293 if (!watch_plugins_active
.handler
)
2294 watch_string_list (&watch_plugins_active
);
2295 return watch_plugins_active
.var
;
2299 * gnm_conf_set_plugins_active:
2300 * @x: (element-type char): list of strings
2304 gnm_conf_set_plugins_active (GSList
*x
)
2306 if (!watch_plugins_active
.handler
)
2307 watch_string_list (&watch_plugins_active
);
2308 set_string_list (&watch_plugins_active
, x
);
2312 gnm_conf_get_plugins_active_node (void)
2314 return get_watch_node (&watch_plugins_active
);
2317 static struct cb_watch_string_list watch_plugins_extra_dirs
= {
2318 0, "plugins/extra-dirs",
2319 "List of Extra Plugin Directories.",
2320 "This list contains all extra directories containing plugins.",
2324 * gnm_conf_get_plugins_extra_dirs:
2326 * Returns: (element-type char) (transfer none):
2329 gnm_conf_get_plugins_extra_dirs (void)
2331 if (!watch_plugins_extra_dirs
.handler
)
2332 watch_string_list (&watch_plugins_extra_dirs
);
2333 return watch_plugins_extra_dirs
.var
;
2337 * gnm_conf_set_plugins_extra_dirs:
2338 * @x: (element-type char): list of strings
2342 gnm_conf_set_plugins_extra_dirs (GSList
*x
)
2344 if (!watch_plugins_extra_dirs
.handler
)
2345 watch_string_list (&watch_plugins_extra_dirs
);
2346 set_string_list (&watch_plugins_extra_dirs
, x
);
2350 gnm_conf_get_plugins_extra_dirs_node (void)
2352 return get_watch_node (&watch_plugins_extra_dirs
);
2355 static struct cb_watch_string_list watch_plugins_file_states
= {
2356 0, "plugins/file-states",
2357 "List of Plugin File States.",
2358 "This list contains all plugin file states.",
2362 * gnm_conf_get_plugins_file_states:
2364 * Returns: (element-type char) (transfer none):
2367 gnm_conf_get_plugins_file_states (void)
2369 if (!watch_plugins_file_states
.handler
)
2370 watch_string_list (&watch_plugins_file_states
);
2371 return watch_plugins_file_states
.var
;
2375 * gnm_conf_set_plugins_file_states:
2376 * @x: (element-type char): list of strings
2380 gnm_conf_set_plugins_file_states (GSList
*x
)
2382 if (!watch_plugins_file_states
.handler
)
2383 watch_string_list (&watch_plugins_file_states
);
2384 set_string_list (&watch_plugins_file_states
, x
);
2388 gnm_conf_get_plugins_file_states_node (void)
2390 return get_watch_node (&watch_plugins_file_states
);
2393 static struct cb_watch_string_list watch_plugins_known
= {
2395 "List of Known Plugins.",
2396 "This list contains all known plugins.",
2400 * gnm_conf_get_plugins_known:
2402 * Returns: (element-type char) (transfer none):
2405 gnm_conf_get_plugins_known (void)
2407 if (!watch_plugins_known
.handler
)
2408 watch_string_list (&watch_plugins_known
);
2409 return watch_plugins_known
.var
;
2413 * gnm_conf_set_plugins_known:
2414 * @x: (element-type char): list of strings
2418 gnm_conf_set_plugins_known (GSList
*x
)
2420 if (!watch_plugins_known
.handler
)
2421 watch_string_list (&watch_plugins_known
);
2422 set_string_list (&watch_plugins_known
, x
);
2426 gnm_conf_get_plugins_known_node (void)
2428 return get_watch_node (&watch_plugins_known
);
2431 static struct cb_watch_bool watch_printsetup_across_then_down
= {
2432 0, "printsetup/across-then-down",
2433 "Default Print Direction",
2434 "This value determines the default setting in the Print Setup dialog whether to print first right then down. Please use the Print Setup dialog to edit this value.",
2439 gnm_conf_get_printsetup_across_then_down (void)
2441 if (!watch_printsetup_across_then_down
.handler
)
2442 watch_bool (&watch_printsetup_across_then_down
);
2443 return watch_printsetup_across_then_down
.var
;
2447 gnm_conf_set_printsetup_across_then_down (gboolean x
)
2449 if (!watch_printsetup_across_then_down
.handler
)
2450 watch_bool (&watch_printsetup_across_then_down
);
2451 set_bool (&watch_printsetup_across_then_down
, x
);
2455 gnm_conf_get_printsetup_across_then_down_node (void)
2457 return get_watch_node (&watch_printsetup_across_then_down
);
2460 static struct cb_watch_bool watch_printsetup_all_sheets
= {
2461 0, "printsetup/all-sheets",
2462 "Apply print-setup to all sheets",
2463 "This value determines whether by default the print set-up dialog applies to all sheets simultaneously.",
2468 gnm_conf_get_printsetup_all_sheets (void)
2470 if (!watch_printsetup_all_sheets
.handler
)
2471 watch_bool (&watch_printsetup_all_sheets
);
2472 return watch_printsetup_all_sheets
.var
;
2476 gnm_conf_set_printsetup_all_sheets (gboolean x
)
2478 if (!watch_printsetup_all_sheets
.handler
)
2479 watch_bool (&watch_printsetup_all_sheets
);
2480 set_bool (&watch_printsetup_all_sheets
, x
);
2484 gnm_conf_get_printsetup_all_sheets_node (void)
2486 return get_watch_node (&watch_printsetup_all_sheets
);
2489 static struct cb_watch_bool watch_printsetup_center_horizontally
= {
2490 0, "printsetup/center-horizontally",
2491 "Default Horizontal Centering",
2492 "This value determines whether the default setting in the Print Setup dialog is to center pages horizontally.",
2497 gnm_conf_get_printsetup_center_horizontally (void)
2499 if (!watch_printsetup_center_horizontally
.handler
)
2500 watch_bool (&watch_printsetup_center_horizontally
);
2501 return watch_printsetup_center_horizontally
.var
;
2505 gnm_conf_set_printsetup_center_horizontally (gboolean x
)
2507 if (!watch_printsetup_center_horizontally
.handler
)
2508 watch_bool (&watch_printsetup_center_horizontally
);
2509 set_bool (&watch_printsetup_center_horizontally
, x
);
2513 gnm_conf_get_printsetup_center_horizontally_node (void)
2515 return get_watch_node (&watch_printsetup_center_horizontally
);
2518 static struct cb_watch_bool watch_printsetup_center_vertically
= {
2519 0, "printsetup/center-vertically",
2520 "Default Vertical Centering",
2521 "This value determines whether the default setting in the Print Setup dialog is to center pages vertically.",
2526 gnm_conf_get_printsetup_center_vertically (void)
2528 if (!watch_printsetup_center_vertically
.handler
)
2529 watch_bool (&watch_printsetup_center_vertically
);
2530 return watch_printsetup_center_vertically
.var
;
2534 gnm_conf_set_printsetup_center_vertically (gboolean x
)
2536 if (!watch_printsetup_center_vertically
.handler
)
2537 watch_bool (&watch_printsetup_center_vertically
);
2538 set_bool (&watch_printsetup_center_vertically
, x
);
2542 gnm_conf_get_printsetup_center_vertically_node (void)
2544 return get_watch_node (&watch_printsetup_center_vertically
);
2547 static struct cb_watch_string_list watch_printsetup_footer
= {
2548 0, "printsetup/footer",
2550 "The default page footer for new documents that can be modified using the\n page setup dialog.",
2554 * gnm_conf_get_printsetup_footer:
2556 * Returns: (element-type char) (transfer none):
2559 gnm_conf_get_printsetup_footer (void)
2561 if (!watch_printsetup_footer
.handler
)
2562 watch_string_list (&watch_printsetup_footer
);
2563 return watch_printsetup_footer
.var
;
2567 * gnm_conf_set_printsetup_footer:
2568 * @x: (element-type char): list of strings
2572 gnm_conf_set_printsetup_footer (GSList
*x
)
2574 if (!watch_printsetup_footer
.handler
)
2575 watch_string_list (&watch_printsetup_footer
);
2576 set_string_list (&watch_printsetup_footer
, x
);
2580 gnm_conf_get_printsetup_footer_node (void)
2582 return get_watch_node (&watch_printsetup_footer
);
2585 static struct cb_watch_string_list watch_printsetup_gtk_setting
= {
2586 0, "printsetup/gtk-setting",
2588 "The configuration of GTKPrintSetting. Do not edit this variable.",
2592 * gnm_conf_get_printsetup_gtk_setting:
2594 * Returns: (element-type char) (transfer none):
2597 gnm_conf_get_printsetup_gtk_setting (void)
2599 if (!watch_printsetup_gtk_setting
.handler
)
2600 watch_string_list (&watch_printsetup_gtk_setting
);
2601 return watch_printsetup_gtk_setting
.var
;
2605 * gnm_conf_set_printsetup_gtk_setting:
2606 * @x: (element-type char): list of strings
2610 gnm_conf_set_printsetup_gtk_setting (GSList
*x
)
2612 if (!watch_printsetup_gtk_setting
.handler
)
2613 watch_string_list (&watch_printsetup_gtk_setting
);
2614 set_string_list (&watch_printsetup_gtk_setting
, x
);
2618 gnm_conf_get_printsetup_gtk_setting_node (void)
2620 return get_watch_node (&watch_printsetup_gtk_setting
);
2623 static struct cb_watch_string_list watch_printsetup_header
= {
2624 0, "printsetup/header",
2626 "The default page header for new documents that can be modified using the\n page setup dialog.",
2630 * gnm_conf_get_printsetup_header:
2632 * Returns: (element-type char) (transfer none):
2635 gnm_conf_get_printsetup_header (void)
2637 if (!watch_printsetup_header
.handler
)
2638 watch_string_list (&watch_printsetup_header
);
2639 return watch_printsetup_header
.var
;
2643 * gnm_conf_set_printsetup_header:
2644 * @x: (element-type char): list of strings
2648 gnm_conf_set_printsetup_header (GSList
*x
)
2650 if (!watch_printsetup_header
.handler
)
2651 watch_string_list (&watch_printsetup_header
);
2652 set_string_list (&watch_printsetup_header
, x
);
2656 gnm_conf_get_printsetup_header_node (void)
2658 return get_watch_node (&watch_printsetup_header
);
2661 static struct cb_watch_bool watch_printsetup_hf_font_bold
= {
2662 0, "printsetup/hf-font-bold",
2663 "The default header/footer font is bold.",
2664 "This value determines whether the default font for headers and footers is bold.",
2669 gnm_conf_get_printsetup_hf_font_bold (void)
2671 if (!watch_printsetup_hf_font_bold
.handler
)
2672 watch_bool (&watch_printsetup_hf_font_bold
);
2673 return watch_printsetup_hf_font_bold
.var
;
2677 gnm_conf_set_printsetup_hf_font_bold (gboolean x
)
2679 if (!watch_printsetup_hf_font_bold
.handler
)
2680 watch_bool (&watch_printsetup_hf_font_bold
);
2681 set_bool (&watch_printsetup_hf_font_bold
, x
);
2685 gnm_conf_get_printsetup_hf_font_bold_node (void)
2687 return get_watch_node (&watch_printsetup_hf_font_bold
);
2690 static struct cb_watch_bool watch_printsetup_hf_font_italic
= {
2691 0, "printsetup/hf-font-italic",
2692 "The default header/footer font is italic.",
2693 "This value determines whether the default font for headers and footers is italic.",
2698 gnm_conf_get_printsetup_hf_font_italic (void)
2700 if (!watch_printsetup_hf_font_italic
.handler
)
2701 watch_bool (&watch_printsetup_hf_font_italic
);
2702 return watch_printsetup_hf_font_italic
.var
;
2706 gnm_conf_set_printsetup_hf_font_italic (gboolean x
)
2708 if (!watch_printsetup_hf_font_italic
.handler
)
2709 watch_bool (&watch_printsetup_hf_font_italic
);
2710 set_bool (&watch_printsetup_hf_font_italic
, x
);
2714 gnm_conf_get_printsetup_hf_font_italic_node (void)
2716 return get_watch_node (&watch_printsetup_hf_font_italic
);
2719 static struct cb_watch_string watch_printsetup_hf_font_name
= {
2720 0, "printsetup/hf-font-name",
2721 "Default header/footer font name",
2722 "The default font name for headers and footers.",
2727 gnm_conf_get_printsetup_hf_font_name (void)
2729 if (!watch_printsetup_hf_font_name
.handler
)
2730 watch_string (&watch_printsetup_hf_font_name
);
2731 return watch_printsetup_hf_font_name
.var
;
2735 gnm_conf_set_printsetup_hf_font_name (const char *x
)
2737 g_return_if_fail (x
!= NULL
);
2738 if (!watch_printsetup_hf_font_name
.handler
)
2739 watch_string (&watch_printsetup_hf_font_name
);
2740 set_string (&watch_printsetup_hf_font_name
, x
);
2744 gnm_conf_get_printsetup_hf_font_name_node (void)
2746 return get_watch_node (&watch_printsetup_hf_font_name
);
2749 static struct cb_watch_double watch_printsetup_hf_font_size
= {
2750 0, "printsetup/hf-font-size",
2751 "Default Header/Footer Font Size",
2752 "The default font size for headers and footers.",
2757 gnm_conf_get_printsetup_hf_font_size (void)
2759 if (!watch_printsetup_hf_font_size
.handler
)
2760 watch_double (&watch_printsetup_hf_font_size
);
2761 return watch_printsetup_hf_font_size
.var
;
2765 gnm_conf_set_printsetup_hf_font_size (double x
)
2767 if (!watch_printsetup_hf_font_size
.handler
)
2768 watch_double (&watch_printsetup_hf_font_size
);
2769 set_double (&watch_printsetup_hf_font_size
, x
);
2773 gnm_conf_get_printsetup_hf_font_size_node (void)
2775 return get_watch_node (&watch_printsetup_hf_font_size
);
2778 static struct cb_watch_string_list watch_printsetup_hf_left
= {
2779 0, "printsetup/hf-left",
2780 "Header/Footer Format (Left Portion)",
2781 "Please use the Print Setup dialog to edit this value.",
2785 * gnm_conf_get_printsetup_hf_left:
2787 * Returns: (element-type char) (transfer none):
2790 gnm_conf_get_printsetup_hf_left (void)
2792 if (!watch_printsetup_hf_left
.handler
)
2793 watch_string_list (&watch_printsetup_hf_left
);
2794 return watch_printsetup_hf_left
.var
;
2798 * gnm_conf_set_printsetup_hf_left:
2799 * @x: (element-type char): list of strings
2803 gnm_conf_set_printsetup_hf_left (GSList
*x
)
2805 if (!watch_printsetup_hf_left
.handler
)
2806 watch_string_list (&watch_printsetup_hf_left
);
2807 set_string_list (&watch_printsetup_hf_left
, x
);
2811 gnm_conf_get_printsetup_hf_left_node (void)
2813 return get_watch_node (&watch_printsetup_hf_left
);
2816 static struct cb_watch_string_list watch_printsetup_hf_middle
= {
2817 0, "printsetup/hf-middle",
2818 "Header/Footer Format (Middle Portion)",
2819 "Please use the Print Setup dialog to edit this value.",
2823 * gnm_conf_get_printsetup_hf_middle:
2825 * Returns: (element-type char) (transfer none):
2828 gnm_conf_get_printsetup_hf_middle (void)
2830 if (!watch_printsetup_hf_middle
.handler
)
2831 watch_string_list (&watch_printsetup_hf_middle
);
2832 return watch_printsetup_hf_middle
.var
;
2836 * gnm_conf_set_printsetup_hf_middle:
2837 * @x: (element-type char): list of strings
2841 gnm_conf_set_printsetup_hf_middle (GSList
*x
)
2843 if (!watch_printsetup_hf_middle
.handler
)
2844 watch_string_list (&watch_printsetup_hf_middle
);
2845 set_string_list (&watch_printsetup_hf_middle
, x
);
2849 gnm_conf_get_printsetup_hf_middle_node (void)
2851 return get_watch_node (&watch_printsetup_hf_middle
);
2854 static struct cb_watch_string_list watch_printsetup_hf_right
= {
2855 0, "printsetup/hf-right",
2856 "Header/Footer Format (Right Portion)",
2857 "Please use the Print Setup dialog to edit this value.",
2861 * gnm_conf_get_printsetup_hf_right:
2863 * Returns: (element-type char) (transfer none):
2866 gnm_conf_get_printsetup_hf_right (void)
2868 if (!watch_printsetup_hf_right
.handler
)
2869 watch_string_list (&watch_printsetup_hf_right
);
2870 return watch_printsetup_hf_right
.var
;
2874 * gnm_conf_set_printsetup_hf_right:
2875 * @x: (element-type char): list of strings
2879 gnm_conf_set_printsetup_hf_right (GSList
*x
)
2881 if (!watch_printsetup_hf_right
.handler
)
2882 watch_string_list (&watch_printsetup_hf_right
);
2883 set_string_list (&watch_printsetup_hf_right
, x
);
2887 gnm_conf_get_printsetup_hf_right_node (void)
2889 return get_watch_node (&watch_printsetup_hf_right
);
2892 static struct cb_watch_double watch_printsetup_margin_bottom
= {
2893 0, "printsetup/margin-bottom",
2894 "Default Bottom Margin",
2895 "This value gives the default number of points from the bottom of a page to the end of the body. Please use the Print Setup dialog to edit this value.",
2900 gnm_conf_get_printsetup_margin_bottom (void)
2902 if (!watch_printsetup_margin_bottom
.handler
)
2903 watch_double (&watch_printsetup_margin_bottom
);
2904 return watch_printsetup_margin_bottom
.var
;
2908 gnm_conf_set_printsetup_margin_bottom (double x
)
2910 if (!watch_printsetup_margin_bottom
.handler
)
2911 watch_double (&watch_printsetup_margin_bottom
);
2912 set_double (&watch_printsetup_margin_bottom
, x
);
2916 gnm_conf_get_printsetup_margin_bottom_node (void)
2918 return get_watch_node (&watch_printsetup_margin_bottom
);
2921 static struct cb_watch_double watch_printsetup_margin_gtk_bottom
= {
2922 0, "printsetup/margin-gtk-bottom",
2923 "Default Bottom Outside Margin",
2924 "This value gives the default number of points from the bottom of a page to the end of the footer. Please use the Print Setup dialog to edit this value.",
2929 gnm_conf_get_printsetup_margin_gtk_bottom (void)
2931 if (!watch_printsetup_margin_gtk_bottom
.handler
)
2932 watch_double (&watch_printsetup_margin_gtk_bottom
);
2933 return watch_printsetup_margin_gtk_bottom
.var
;
2937 gnm_conf_set_printsetup_margin_gtk_bottom (double x
)
2939 if (!watch_printsetup_margin_gtk_bottom
.handler
)
2940 watch_double (&watch_printsetup_margin_gtk_bottom
);
2941 set_double (&watch_printsetup_margin_gtk_bottom
, x
);
2945 gnm_conf_get_printsetup_margin_gtk_bottom_node (void)
2947 return get_watch_node (&watch_printsetup_margin_gtk_bottom
);
2950 static struct cb_watch_double watch_printsetup_margin_gtk_left
= {
2951 0, "printsetup/margin-gtk-left",
2952 "Default Left Margin",
2953 "This value gives the default number of points from the left of a page to the left of the body. Please use the Print Setup dialog to edit this value.",
2958 gnm_conf_get_printsetup_margin_gtk_left (void)
2960 if (!watch_printsetup_margin_gtk_left
.handler
)
2961 watch_double (&watch_printsetup_margin_gtk_left
);
2962 return watch_printsetup_margin_gtk_left
.var
;
2966 gnm_conf_set_printsetup_margin_gtk_left (double x
)
2968 if (!watch_printsetup_margin_gtk_left
.handler
)
2969 watch_double (&watch_printsetup_margin_gtk_left
);
2970 set_double (&watch_printsetup_margin_gtk_left
, x
);
2974 gnm_conf_get_printsetup_margin_gtk_left_node (void)
2976 return get_watch_node (&watch_printsetup_margin_gtk_left
);
2979 static struct cb_watch_double watch_printsetup_margin_gtk_right
= {
2980 0, "printsetup/margin-gtk-right",
2981 "Default Right Margin",
2982 "This value gives the default number of points from the right of a page to the right of the body. Please use the Print Setup dialog to edit this value.",
2987 gnm_conf_get_printsetup_margin_gtk_right (void)
2989 if (!watch_printsetup_margin_gtk_right
.handler
)
2990 watch_double (&watch_printsetup_margin_gtk_right
);
2991 return watch_printsetup_margin_gtk_right
.var
;
2995 gnm_conf_set_printsetup_margin_gtk_right (double x
)
2997 if (!watch_printsetup_margin_gtk_right
.handler
)
2998 watch_double (&watch_printsetup_margin_gtk_right
);
2999 set_double (&watch_printsetup_margin_gtk_right
, x
);
3003 gnm_conf_get_printsetup_margin_gtk_right_node (void)
3005 return get_watch_node (&watch_printsetup_margin_gtk_right
);
3008 static struct cb_watch_double watch_printsetup_margin_gtk_top
= {
3009 0, "printsetup/margin-gtk-top",
3010 "Default Top Outside Margin",
3011 "This value gives the default number of points from the top of a page to the top of the header. Please use the Print Setup dialog to edit this value.",
3016 gnm_conf_get_printsetup_margin_gtk_top (void)
3018 if (!watch_printsetup_margin_gtk_top
.handler
)
3019 watch_double (&watch_printsetup_margin_gtk_top
);
3020 return watch_printsetup_margin_gtk_top
.var
;
3024 gnm_conf_set_printsetup_margin_gtk_top (double x
)
3026 if (!watch_printsetup_margin_gtk_top
.handler
)
3027 watch_double (&watch_printsetup_margin_gtk_top
);
3028 set_double (&watch_printsetup_margin_gtk_top
, x
);
3032 gnm_conf_get_printsetup_margin_gtk_top_node (void)
3034 return get_watch_node (&watch_printsetup_margin_gtk_top
);
3037 static struct cb_watch_double watch_printsetup_margin_top
= {
3038 0, "printsetup/margin-top",
3039 "Default Top Margin",
3040 "This value gives the default number of points from the top of a page to the start of the body. Please use the Print Setup dialog to edit this value.",
3045 gnm_conf_get_printsetup_margin_top (void)
3047 if (!watch_printsetup_margin_top
.handler
)
3048 watch_double (&watch_printsetup_margin_top
);
3049 return watch_printsetup_margin_top
.var
;
3053 gnm_conf_set_printsetup_margin_top (double x
)
3055 if (!watch_printsetup_margin_top
.handler
)
3056 watch_double (&watch_printsetup_margin_top
);
3057 set_double (&watch_printsetup_margin_top
, x
);
3061 gnm_conf_get_printsetup_margin_top_node (void)
3063 return get_watch_node (&watch_printsetup_margin_top
);
3066 static struct cb_watch_string watch_printsetup_paper
= {
3067 0, "printsetup/paper",
3069 "This is the default paper specification. Please use the Print Setup dialog to edit this value.",
3074 gnm_conf_get_printsetup_paper (void)
3076 if (!watch_printsetup_paper
.handler
)
3077 watch_string (&watch_printsetup_paper
);
3078 return watch_printsetup_paper
.var
;
3082 gnm_conf_set_printsetup_paper (const char *x
)
3084 g_return_if_fail (x
!= NULL
);
3085 if (!watch_printsetup_paper
.handler
)
3086 watch_string (&watch_printsetup_paper
);
3087 set_string (&watch_printsetup_paper
, x
);
3091 gnm_conf_get_printsetup_paper_node (void)
3093 return get_watch_node (&watch_printsetup_paper
);
3096 static struct cb_watch_int watch_printsetup_paper_orientation
= {
3097 0, "printsetup/paper-orientation",
3098 "Paper orientation",
3099 "This is the default paper orientation. Please use the Print Setup dialog to edit this value.",
3100 GTK_PAGE_ORIENTATION_PORTRAIT
, GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE
, 0,
3104 gnm_conf_get_printsetup_paper_orientation (void)
3106 if (!watch_printsetup_paper_orientation
.handler
)
3107 watch_int (&watch_printsetup_paper_orientation
);
3108 return watch_printsetup_paper_orientation
.var
;
3112 gnm_conf_set_printsetup_paper_orientation (int x
)
3114 if (!watch_printsetup_paper_orientation
.handler
)
3115 watch_int (&watch_printsetup_paper_orientation
);
3116 set_int (&watch_printsetup_paper_orientation
, x
);
3120 gnm_conf_get_printsetup_paper_orientation_node (void)
3122 return get_watch_node (&watch_printsetup_paper_orientation
);
3125 static struct cb_watch_enum watch_printsetup_preferred_unit
= {
3126 0, "printsetup/preferred-unit",
3127 "Preferred Display Unit",
3128 "This string gives the default unit to be used in the page setup dialog.",
3133 gnm_conf_get_printsetup_preferred_unit (void)
3135 if (!watch_printsetup_preferred_unit
.handler
)
3136 watch_enum (&watch_printsetup_preferred_unit
, GTK_TYPE_UNIT
);
3137 return watch_printsetup_preferred_unit
.var
;
3141 gnm_conf_set_printsetup_preferred_unit (GtkUnit x
)
3143 if (!watch_printsetup_preferred_unit
.handler
)
3144 watch_enum (&watch_printsetup_preferred_unit
, GTK_TYPE_UNIT
);
3145 set_enum (&watch_printsetup_preferred_unit
, x
);
3149 gnm_conf_get_printsetup_preferred_unit_node (void)
3151 return get_watch_node (&watch_printsetup_preferred_unit
);
3154 static struct cb_watch_bool watch_printsetup_print_black_n_white
= {
3155 0, "printsetup/print-black-n-white",
3156 "Default Black and White Printing",
3157 "This value determines the default setting in the Print Setup dialog whether to print in only black and white. Please use the Print Setup dialog to edit this value.",
3162 gnm_conf_get_printsetup_print_black_n_white (void)
3164 if (!watch_printsetup_print_black_n_white
.handler
)
3165 watch_bool (&watch_printsetup_print_black_n_white
);
3166 return watch_printsetup_print_black_n_white
.var
;
3170 gnm_conf_set_printsetup_print_black_n_white (gboolean x
)
3172 if (!watch_printsetup_print_black_n_white
.handler
)
3173 watch_bool (&watch_printsetup_print_black_n_white
);
3174 set_bool (&watch_printsetup_print_black_n_white
, x
);
3178 gnm_conf_get_printsetup_print_black_n_white_node (void)
3180 return get_watch_node (&watch_printsetup_print_black_n_white
);
3183 static struct cb_watch_bool watch_printsetup_print_even_if_only_styles
= {
3184 0, "printsetup/print-even-if-only-styles",
3185 "Default Print Cells with Only Styles",
3186 "This value determines the default setting in the Print Setup dialog whether to print empty but formatted cells. Please use the Print Setup dialog to edit this value.",
3191 gnm_conf_get_printsetup_print_even_if_only_styles (void)
3193 if (!watch_printsetup_print_even_if_only_styles
.handler
)
3194 watch_bool (&watch_printsetup_print_even_if_only_styles
);
3195 return watch_printsetup_print_even_if_only_styles
.var
;
3199 gnm_conf_set_printsetup_print_even_if_only_styles (gboolean x
)
3201 if (!watch_printsetup_print_even_if_only_styles
.handler
)
3202 watch_bool (&watch_printsetup_print_even_if_only_styles
);
3203 set_bool (&watch_printsetup_print_even_if_only_styles
, x
);
3207 gnm_conf_get_printsetup_print_even_if_only_styles_node (void)
3209 return get_watch_node (&watch_printsetup_print_even_if_only_styles
);
3212 static struct cb_watch_bool watch_printsetup_print_grid_lines
= {
3213 0, "printsetup/print-grid-lines",
3214 "Default Grid Line Printing",
3215 "This value determines the default setting in the Print Setup dialog whether print grid lines. Please use the Print Setup dialog to edit this value.",
3220 gnm_conf_get_printsetup_print_grid_lines (void)
3222 if (!watch_printsetup_print_grid_lines
.handler
)
3223 watch_bool (&watch_printsetup_print_grid_lines
);
3224 return watch_printsetup_print_grid_lines
.var
;
3228 gnm_conf_set_printsetup_print_grid_lines (gboolean x
)
3230 if (!watch_printsetup_print_grid_lines
.handler
)
3231 watch_bool (&watch_printsetup_print_grid_lines
);
3232 set_bool (&watch_printsetup_print_grid_lines
, x
);
3236 gnm_conf_get_printsetup_print_grid_lines_node (void)
3238 return get_watch_node (&watch_printsetup_print_grid_lines
);
3241 static struct cb_watch_bool watch_printsetup_print_titles
= {
3242 0, "printsetup/print-titles",
3243 "Default Title Printing",
3244 "This value determines the default setting in the Print Setup dialog whether to print row and column headers. Please use the Print Setup dialog to edit this value.",
3249 gnm_conf_get_printsetup_print_titles (void)
3251 if (!watch_printsetup_print_titles
.handler
)
3252 watch_bool (&watch_printsetup_print_titles
);
3253 return watch_printsetup_print_titles
.var
;
3257 gnm_conf_set_printsetup_print_titles (gboolean x
)
3259 if (!watch_printsetup_print_titles
.handler
)
3260 watch_bool (&watch_printsetup_print_titles
);
3261 set_bool (&watch_printsetup_print_titles
, x
);
3265 gnm_conf_get_printsetup_print_titles_node (void)
3267 return get_watch_node (&watch_printsetup_print_titles
);
3270 static struct cb_watch_string watch_printsetup_repeat_left
= {
3271 0, "printsetup/repeat-left",
3272 "Default Repeated Left Region",
3273 "This string gives the default region to be repeated at the left of each printed sheet. Please use the Print Setup dialog to edit this value.",
3278 gnm_conf_get_printsetup_repeat_left (void)
3280 if (!watch_printsetup_repeat_left
.handler
)
3281 watch_string (&watch_printsetup_repeat_left
);
3282 return watch_printsetup_repeat_left
.var
;
3286 gnm_conf_set_printsetup_repeat_left (const char *x
)
3288 g_return_if_fail (x
!= NULL
);
3289 if (!watch_printsetup_repeat_left
.handler
)
3290 watch_string (&watch_printsetup_repeat_left
);
3291 set_string (&watch_printsetup_repeat_left
, x
);
3295 gnm_conf_get_printsetup_repeat_left_node (void)
3297 return get_watch_node (&watch_printsetup_repeat_left
);
3300 static struct cb_watch_string watch_printsetup_repeat_top
= {
3301 0, "printsetup/repeat-top",
3302 "Default Repeated Top Region",
3303 "This string gives the default region to be repeated at the top of each printed sheet. Please use the Print Setup dialog to edit this value.",
3308 gnm_conf_get_printsetup_repeat_top (void)
3310 if (!watch_printsetup_repeat_top
.handler
)
3311 watch_string (&watch_printsetup_repeat_top
);
3312 return watch_printsetup_repeat_top
.var
;
3316 gnm_conf_set_printsetup_repeat_top (const char *x
)
3318 g_return_if_fail (x
!= NULL
);
3319 if (!watch_printsetup_repeat_top
.handler
)
3320 watch_string (&watch_printsetup_repeat_top
);
3321 set_string (&watch_printsetup_repeat_top
, x
);
3325 gnm_conf_get_printsetup_repeat_top_node (void)
3327 return get_watch_node (&watch_printsetup_repeat_top
);
3330 static struct cb_watch_int watch_printsetup_scale_height
= {
3331 0, "printsetup/scale-height",
3332 "Default Scaling Height",
3333 "This value determines the maximum number of pages that make up the height of a printout of the current sheet. The sheet will be reduced to fit within this height. This value can be changed in the Page Setup dialog.",
3338 gnm_conf_get_printsetup_scale_height (void)
3340 if (!watch_printsetup_scale_height
.handler
)
3341 watch_int (&watch_printsetup_scale_height
);
3342 return watch_printsetup_scale_height
.var
;
3346 gnm_conf_set_printsetup_scale_height (int x
)
3348 if (!watch_printsetup_scale_height
.handler
)
3349 watch_int (&watch_printsetup_scale_height
);
3350 set_int (&watch_printsetup_scale_height
, x
);
3354 gnm_conf_get_printsetup_scale_height_node (void)
3356 return get_watch_node (&watch_printsetup_scale_height
);
3359 static struct cb_watch_bool watch_printsetup_scale_percentage
= {
3360 0, "printsetup/scale-percentage",
3361 "Default Scale Type",
3362 "This value determines the default setting in the Print Setup dialog whether to scale pages by a given percentage. Please use the Print Setup dialog to edit this value.",
3367 gnm_conf_get_printsetup_scale_percentage (void)
3369 if (!watch_printsetup_scale_percentage
.handler
)
3370 watch_bool (&watch_printsetup_scale_percentage
);
3371 return watch_printsetup_scale_percentage
.var
;
3375 gnm_conf_set_printsetup_scale_percentage (gboolean x
)
3377 if (!watch_printsetup_scale_percentage
.handler
)
3378 watch_bool (&watch_printsetup_scale_percentage
);
3379 set_bool (&watch_printsetup_scale_percentage
, x
);
3383 gnm_conf_get_printsetup_scale_percentage_node (void)
3385 return get_watch_node (&watch_printsetup_scale_percentage
);
3388 static struct cb_watch_double watch_printsetup_scale_percentage_value
= {
3389 0, "printsetup/scale-percentage-value",
3390 "Default Scale Percentage",
3391 "This value gives the percentage by which to scale each printed page. Please use the Print Setup dialog to edit this value.",
3396 gnm_conf_get_printsetup_scale_percentage_value (void)
3398 if (!watch_printsetup_scale_percentage_value
.handler
)
3399 watch_double (&watch_printsetup_scale_percentage_value
);
3400 return watch_printsetup_scale_percentage_value
.var
;
3404 gnm_conf_set_printsetup_scale_percentage_value (double x
)
3406 if (!watch_printsetup_scale_percentage_value
.handler
)
3407 watch_double (&watch_printsetup_scale_percentage_value
);
3408 set_double (&watch_printsetup_scale_percentage_value
, x
);
3412 gnm_conf_get_printsetup_scale_percentage_value_node (void)
3414 return get_watch_node (&watch_printsetup_scale_percentage_value
);
3417 static struct cb_watch_int watch_printsetup_scale_width
= {
3418 0, "printsetup/scale-width",
3419 "Default Scaling Width",
3420 "This value determines the maximum number of pages that make up the width of a printout of the current sheet. The sheet will be reduced to fit within this width. This value can be changed in the Page Setup dialog.",
3425 gnm_conf_get_printsetup_scale_width (void)
3427 if (!watch_printsetup_scale_width
.handler
)
3428 watch_int (&watch_printsetup_scale_width
);
3429 return watch_printsetup_scale_width
.var
;
3433 gnm_conf_set_printsetup_scale_width (int x
)
3435 if (!watch_printsetup_scale_width
.handler
)
3436 watch_int (&watch_printsetup_scale_width
);
3437 set_int (&watch_printsetup_scale_width
, x
);
3441 gnm_conf_get_printsetup_scale_width_node (void)
3443 return get_watch_node (&watch_printsetup_scale_width
);
3446 static struct cb_watch_bool watch_searchreplace_change_cell_expressions
= {
3447 0, "searchreplace/change-cell-expressions",
3448 "Search & Replace Changes Expressions",
3449 "Search & Replace changes cells containing expressions as default",
3454 gnm_conf_get_searchreplace_change_cell_expressions (void)
3456 if (!watch_searchreplace_change_cell_expressions
.handler
)
3457 watch_bool (&watch_searchreplace_change_cell_expressions
);
3458 return watch_searchreplace_change_cell_expressions
.var
;
3462 gnm_conf_set_searchreplace_change_cell_expressions (gboolean x
)
3464 if (!watch_searchreplace_change_cell_expressions
.handler
)
3465 watch_bool (&watch_searchreplace_change_cell_expressions
);
3466 set_bool (&watch_searchreplace_change_cell_expressions
, x
);
3470 gnm_conf_get_searchreplace_change_cell_expressions_node (void)
3472 return get_watch_node (&watch_searchreplace_change_cell_expressions
);
3475 static struct cb_watch_bool watch_searchreplace_change_cell_other
= {
3476 0, "searchreplace/change-cell-other",
3477 "Search & Replace Changes Other Values",
3478 "Search & Replace changes cells containing other values as default",
3483 gnm_conf_get_searchreplace_change_cell_other (void)
3485 if (!watch_searchreplace_change_cell_other
.handler
)
3486 watch_bool (&watch_searchreplace_change_cell_other
);
3487 return watch_searchreplace_change_cell_other
.var
;
3491 gnm_conf_set_searchreplace_change_cell_other (gboolean x
)
3493 if (!watch_searchreplace_change_cell_other
.handler
)
3494 watch_bool (&watch_searchreplace_change_cell_other
);
3495 set_bool (&watch_searchreplace_change_cell_other
, x
);
3499 gnm_conf_get_searchreplace_change_cell_other_node (void)
3501 return get_watch_node (&watch_searchreplace_change_cell_other
);
3504 static struct cb_watch_bool watch_searchreplace_change_cell_strings
= {
3505 0, "searchreplace/change-cell-strings",
3506 "Search & Replace Changes Strings",
3507 "Search & Replace changes cells containing strings as default",
3512 gnm_conf_get_searchreplace_change_cell_strings (void)
3514 if (!watch_searchreplace_change_cell_strings
.handler
)
3515 watch_bool (&watch_searchreplace_change_cell_strings
);
3516 return watch_searchreplace_change_cell_strings
.var
;
3520 gnm_conf_set_searchreplace_change_cell_strings (gboolean x
)
3522 if (!watch_searchreplace_change_cell_strings
.handler
)
3523 watch_bool (&watch_searchreplace_change_cell_strings
);
3524 set_bool (&watch_searchreplace_change_cell_strings
, x
);
3528 gnm_conf_get_searchreplace_change_cell_strings_node (void)
3530 return get_watch_node (&watch_searchreplace_change_cell_strings
);
3533 static struct cb_watch_bool watch_searchreplace_change_comments
= {
3534 0, "searchreplace/change-comments",
3535 "Search & Replace Changes Comments",
3536 "Search & Replace changes comments as default",
3541 gnm_conf_get_searchreplace_change_comments (void)
3543 if (!watch_searchreplace_change_comments
.handler
)
3544 watch_bool (&watch_searchreplace_change_comments
);
3545 return watch_searchreplace_change_comments
.var
;
3549 gnm_conf_set_searchreplace_change_comments (gboolean x
)
3551 if (!watch_searchreplace_change_comments
.handler
)
3552 watch_bool (&watch_searchreplace_change_comments
);
3553 set_bool (&watch_searchreplace_change_comments
, x
);
3557 gnm_conf_get_searchreplace_change_comments_node (void)
3559 return get_watch_node (&watch_searchreplace_change_comments
);
3562 static struct cb_watch_bool watch_searchreplace_columnmajor
= {
3563 0, "searchreplace/columnmajor",
3564 "Search & Replace Column Major",
3565 "Search & Replace proceeds in column major order as default",
3570 gnm_conf_get_searchreplace_columnmajor (void)
3572 if (!watch_searchreplace_columnmajor
.handler
)
3573 watch_bool (&watch_searchreplace_columnmajor
);
3574 return watch_searchreplace_columnmajor
.var
;
3578 gnm_conf_set_searchreplace_columnmajor (gboolean x
)
3580 if (!watch_searchreplace_columnmajor
.handler
)
3581 watch_bool (&watch_searchreplace_columnmajor
);
3582 set_bool (&watch_searchreplace_columnmajor
, x
);
3586 gnm_conf_get_searchreplace_columnmajor_node (void)
3588 return get_watch_node (&watch_searchreplace_columnmajor
);
3591 static struct cb_watch_int watch_searchreplace_error_behaviour
= {
3592 0, "searchreplace/error-behaviour",
3593 "Search & Replace Error Behavior",
3594 "This is the default error behavior of Search & Replace indicated by an integer from 0 to 4.",
3599 gnm_conf_get_searchreplace_error_behaviour (void)
3601 if (!watch_searchreplace_error_behaviour
.handler
)
3602 watch_int (&watch_searchreplace_error_behaviour
);
3603 return watch_searchreplace_error_behaviour
.var
;
3607 gnm_conf_set_searchreplace_error_behaviour (int x
)
3609 if (!watch_searchreplace_error_behaviour
.handler
)
3610 watch_int (&watch_searchreplace_error_behaviour
);
3611 set_int (&watch_searchreplace_error_behaviour
, x
);
3615 gnm_conf_get_searchreplace_error_behaviour_node (void)
3617 return get_watch_node (&watch_searchreplace_error_behaviour
);
3620 static struct cb_watch_bool watch_searchreplace_ignore_case
= {
3621 0, "searchreplace/ignore-case",
3622 "Search & Replace Ignores Case",
3623 "Search & Replace ignores case as default",
3628 gnm_conf_get_searchreplace_ignore_case (void)
3630 if (!watch_searchreplace_ignore_case
.handler
)
3631 watch_bool (&watch_searchreplace_ignore_case
);
3632 return watch_searchreplace_ignore_case
.var
;
3636 gnm_conf_set_searchreplace_ignore_case (gboolean x
)
3638 if (!watch_searchreplace_ignore_case
.handler
)
3639 watch_bool (&watch_searchreplace_ignore_case
);
3640 set_bool (&watch_searchreplace_ignore_case
, x
);
3644 gnm_conf_get_searchreplace_ignore_case_node (void)
3646 return get_watch_node (&watch_searchreplace_ignore_case
);
3649 static struct cb_watch_bool watch_searchreplace_keep_strings
= {
3650 0, "searchreplace/keep-strings",
3651 "Search & Replace Keeps Strings as Strings",
3652 "Search & Replace keeps strings as strings even if they look like numbers as default",
3657 gnm_conf_get_searchreplace_keep_strings (void)
3659 if (!watch_searchreplace_keep_strings
.handler
)
3660 watch_bool (&watch_searchreplace_keep_strings
);
3661 return watch_searchreplace_keep_strings
.var
;
3665 gnm_conf_set_searchreplace_keep_strings (gboolean x
)
3667 if (!watch_searchreplace_keep_strings
.handler
)
3668 watch_bool (&watch_searchreplace_keep_strings
);
3669 set_bool (&watch_searchreplace_keep_strings
, x
);
3673 gnm_conf_get_searchreplace_keep_strings_node (void)
3675 return get_watch_node (&watch_searchreplace_keep_strings
);
3678 static struct cb_watch_bool watch_searchreplace_preserve_case
= {
3679 0, "searchreplace/preserve-case",
3680 "Search & Replace Preserves Case",
3681 "Search & Replace preserves case as default",
3686 gnm_conf_get_searchreplace_preserve_case (void)
3688 if (!watch_searchreplace_preserve_case
.handler
)
3689 watch_bool (&watch_searchreplace_preserve_case
);
3690 return watch_searchreplace_preserve_case
.var
;
3694 gnm_conf_set_searchreplace_preserve_case (gboolean x
)
3696 if (!watch_searchreplace_preserve_case
.handler
)
3697 watch_bool (&watch_searchreplace_preserve_case
);
3698 set_bool (&watch_searchreplace_preserve_case
, x
);
3702 gnm_conf_get_searchreplace_preserve_case_node (void)
3704 return get_watch_node (&watch_searchreplace_preserve_case
);
3707 static struct cb_watch_bool watch_searchreplace_query
= {
3708 0, "searchreplace/query",
3709 "Search & Replace Poses Query",
3710 "Search & Replace poses query before each change as default",
3715 gnm_conf_get_searchreplace_query (void)
3717 if (!watch_searchreplace_query
.handler
)
3718 watch_bool (&watch_searchreplace_query
);
3719 return watch_searchreplace_query
.var
;
3723 gnm_conf_set_searchreplace_query (gboolean x
)
3725 if (!watch_searchreplace_query
.handler
)
3726 watch_bool (&watch_searchreplace_query
);
3727 set_bool (&watch_searchreplace_query
, x
);
3731 gnm_conf_get_searchreplace_query_node (void)
3733 return get_watch_node (&watch_searchreplace_query
);
3736 static struct cb_watch_int watch_searchreplace_regex
= {
3737 0, "searchreplace/regex",
3738 "Search & Replace Search Type",
3739 "This value determines the input type for Search & Replace. 0: text; 1: regular expression; 2: number",
3744 gnm_conf_get_searchreplace_regex (void)
3746 if (!watch_searchreplace_regex
.handler
)
3747 watch_int (&watch_searchreplace_regex
);
3748 return watch_searchreplace_regex
.var
;
3752 gnm_conf_set_searchreplace_regex (int x
)
3754 if (!watch_searchreplace_regex
.handler
)
3755 watch_int (&watch_searchreplace_regex
);
3756 set_int (&watch_searchreplace_regex
, x
);
3760 gnm_conf_get_searchreplace_regex_node (void)
3762 return get_watch_node (&watch_searchreplace_regex
);
3765 static struct cb_watch_int watch_searchreplace_scope
= {
3766 0, "searchreplace/scope",
3767 "Search & Replace Scope",
3768 "This is the default scope of Search & Replace. 0: entire workbook; 1: current sheet; 2: range",
3773 gnm_conf_get_searchreplace_scope (void)
3775 if (!watch_searchreplace_scope
.handler
)
3776 watch_int (&watch_searchreplace_scope
);
3777 return watch_searchreplace_scope
.var
;
3781 gnm_conf_set_searchreplace_scope (int x
)
3783 if (!watch_searchreplace_scope
.handler
)
3784 watch_int (&watch_searchreplace_scope
);
3785 set_int (&watch_searchreplace_scope
, x
);
3789 gnm_conf_get_searchreplace_scope_node (void)
3791 return get_watch_node (&watch_searchreplace_scope
);
3794 static struct cb_watch_bool watch_searchreplace_search_results
= {
3795 0, "searchreplace/search-results",
3796 "Search searches in results",
3797 "Search searches in results as default",
3802 gnm_conf_get_searchreplace_search_results (void)
3804 if (!watch_searchreplace_search_results
.handler
)
3805 watch_bool (&watch_searchreplace_search_results
);
3806 return watch_searchreplace_search_results
.var
;
3810 gnm_conf_set_searchreplace_search_results (gboolean x
)
3812 if (!watch_searchreplace_search_results
.handler
)
3813 watch_bool (&watch_searchreplace_search_results
);
3814 set_bool (&watch_searchreplace_search_results
, x
);
3818 gnm_conf_get_searchreplace_search_results_node (void)
3820 return get_watch_node (&watch_searchreplace_search_results
);
3823 static struct cb_watch_bool watch_searchreplace_whole_words_only
= {
3824 0, "searchreplace/whole-words-only",
3825 "Search & Replace Whole Words Only",
3826 "Search & Replace replaces whole words only as default",
3831 gnm_conf_get_searchreplace_whole_words_only (void)
3833 if (!watch_searchreplace_whole_words_only
.handler
)
3834 watch_bool (&watch_searchreplace_whole_words_only
);
3835 return watch_searchreplace_whole_words_only
.var
;
3839 gnm_conf_set_searchreplace_whole_words_only (gboolean x
)
3841 if (!watch_searchreplace_whole_words_only
.handler
)
3842 watch_bool (&watch_searchreplace_whole_words_only
);
3843 set_bool (&watch_searchreplace_whole_words_only
, x
);
3847 gnm_conf_get_searchreplace_whole_words_only_node (void)
3849 return get_watch_node (&watch_searchreplace_whole_words_only
);
3852 static struct cb_watch_string watch_stf_export_encoding
= {
3853 0, "stf/export/encoding",
3854 "Text Export Encoding",
3855 "Please use the Text Export dialog to edit this value.",
3860 gnm_conf_get_stf_export_encoding (void)
3862 if (!watch_stf_export_encoding
.handler
)
3863 watch_string (&watch_stf_export_encoding
);
3864 return watch_stf_export_encoding
.var
;
3868 gnm_conf_set_stf_export_encoding (const char *x
)
3870 g_return_if_fail (x
!= NULL
);
3871 if (!watch_stf_export_encoding
.handler
)
3872 watch_string (&watch_stf_export_encoding
);
3873 set_string (&watch_stf_export_encoding
, x
);
3877 gnm_conf_get_stf_export_encoding_node (void)
3879 return get_watch_node (&watch_stf_export_encoding
);
3882 static struct cb_watch_enum watch_stf_export_format
= {
3883 0, "stf/export/format",
3884 "Text Export Formatting Rule",
3885 "Please use the Text Export dialog to edit this value.",
3886 GNM_STF_FORMAT_AUTO
,
3890 gnm_conf_get_stf_export_format (void)
3892 if (!watch_stf_export_format
.handler
)
3893 watch_enum (&watch_stf_export_format
, GNM_STF_FORMAT_MODE_TYPE
);
3894 return watch_stf_export_format
.var
;
3898 gnm_conf_set_stf_export_format (GnmStfFormatMode x
)
3900 if (!watch_stf_export_format
.handler
)
3901 watch_enum (&watch_stf_export_format
, GNM_STF_FORMAT_MODE_TYPE
);
3902 set_enum (&watch_stf_export_format
, x
);
3906 gnm_conf_get_stf_export_format_node (void)
3908 return get_watch_node (&watch_stf_export_format
);
3911 static struct cb_watch_string watch_stf_export_locale
= {
3912 0, "stf/export/locale",
3913 "Text Export Locale",
3914 "Please use the Text Export dialog to edit this value.",
3919 gnm_conf_get_stf_export_locale (void)
3921 if (!watch_stf_export_locale
.handler
)
3922 watch_string (&watch_stf_export_locale
);
3923 return watch_stf_export_locale
.var
;
3927 gnm_conf_set_stf_export_locale (const char *x
)
3929 g_return_if_fail (x
!= NULL
);
3930 if (!watch_stf_export_locale
.handler
)
3931 watch_string (&watch_stf_export_locale
);
3932 set_string (&watch_stf_export_locale
, x
);
3936 gnm_conf_get_stf_export_locale_node (void)
3938 return get_watch_node (&watch_stf_export_locale
);
3941 static struct cb_watch_enum watch_stf_export_quoting
= {
3942 0, "stf/export/quoting",
3943 "Text Export String Quoting Rule",
3944 "Please use the Text Export dialog to edit this value.",
3945 GSF_OUTPUT_CSV_QUOTING_MODE_AUTO
,
3948 GsfOutputCsvQuotingMode
3949 gnm_conf_get_stf_export_quoting (void)
3951 if (!watch_stf_export_quoting
.handler
)
3952 watch_enum (&watch_stf_export_quoting
, GSF_OUTPUT_CSV_QUOTING_MODE_TYPE
);
3953 return watch_stf_export_quoting
.var
;
3957 gnm_conf_set_stf_export_quoting (GsfOutputCsvQuotingMode x
)
3959 if (!watch_stf_export_quoting
.handler
)
3960 watch_enum (&watch_stf_export_quoting
, GSF_OUTPUT_CSV_QUOTING_MODE_TYPE
);
3961 set_enum (&watch_stf_export_quoting
, x
);
3965 gnm_conf_get_stf_export_quoting_node (void)
3967 return get_watch_node (&watch_stf_export_quoting
);
3970 static struct cb_watch_string watch_stf_export_separator
= {
3971 0, "stf/export/separator",
3972 "Text Export Field Separator",
3973 "Please use the Text Export dialog to edit this value.",
3978 gnm_conf_get_stf_export_separator (void)
3980 if (!watch_stf_export_separator
.handler
)
3981 watch_string (&watch_stf_export_separator
);
3982 return watch_stf_export_separator
.var
;
3986 gnm_conf_set_stf_export_separator (const char *x
)
3988 g_return_if_fail (x
!= NULL
);
3989 if (!watch_stf_export_separator
.handler
)
3990 watch_string (&watch_stf_export_separator
);
3991 set_string (&watch_stf_export_separator
, x
);
3995 gnm_conf_get_stf_export_separator_node (void)
3997 return get_watch_node (&watch_stf_export_separator
);
4000 static struct cb_watch_string watch_stf_export_stringindicator
= {
4001 0, "stf/export/stringindicator",
4002 "Text Export String Indicator",
4003 "Please use the Text Export dialog to edit this value.",
4008 gnm_conf_get_stf_export_stringindicator (void)
4010 if (!watch_stf_export_stringindicator
.handler
)
4011 watch_string (&watch_stf_export_stringindicator
);
4012 return watch_stf_export_stringindicator
.var
;
4016 gnm_conf_set_stf_export_stringindicator (const char *x
)
4018 g_return_if_fail (x
!= NULL
);
4019 if (!watch_stf_export_stringindicator
.handler
)
4020 watch_string (&watch_stf_export_stringindicator
);
4021 set_string (&watch_stf_export_stringindicator
, x
);
4025 gnm_conf_get_stf_export_stringindicator_node (void)
4027 return get_watch_node (&watch_stf_export_stringindicator
);
4030 static struct cb_watch_string watch_stf_export_terminator
= {
4031 0, "stf/export/terminator",
4032 "Text Export Record Terminator",
4033 "Please use the Text Export dialog to edit this value.",
4038 gnm_conf_get_stf_export_terminator (void)
4040 if (!watch_stf_export_terminator
.handler
)
4041 watch_string (&watch_stf_export_terminator
);
4042 return watch_stf_export_terminator
.var
;
4046 gnm_conf_set_stf_export_terminator (const char *x
)
4048 g_return_if_fail (x
!= NULL
);
4049 if (!watch_stf_export_terminator
.handler
)
4050 watch_string (&watch_stf_export_terminator
);
4051 set_string (&watch_stf_export_terminator
, x
);
4055 gnm_conf_get_stf_export_terminator_node (void)
4057 return get_watch_node (&watch_stf_export_terminator
);
4060 static struct cb_watch_bool watch_stf_export_transliteration
= {
4061 0, "stf/export/transliteration",
4062 "Text Export Unknown Character Transliteration",
4063 "Please use the Text Export dialog to edit this value.",
4068 gnm_conf_get_stf_export_transliteration (void)
4070 if (!watch_stf_export_transliteration
.handler
)
4071 watch_bool (&watch_stf_export_transliteration
);
4072 return watch_stf_export_transliteration
.var
;
4076 gnm_conf_set_stf_export_transliteration (gboolean x
)
4078 if (!watch_stf_export_transliteration
.handler
)
4079 watch_bool (&watch_stf_export_transliteration
);
4080 set_bool (&watch_stf_export_transliteration
, x
);
4084 gnm_conf_get_stf_export_transliteration_node (void)
4086 return get_watch_node (&watch_stf_export_transliteration
);
4089 static struct cb_watch_enum watch_toolbar_style
= {
4092 "Toolbar Style. Valid values are both, both_horiz, icon, and text.",
4097 gnm_conf_get_toolbar_style (void)
4099 if (!watch_toolbar_style
.handler
)
4100 watch_enum (&watch_toolbar_style
, GTK_TYPE_TOOLBAR_STYLE
);
4101 return watch_toolbar_style
.var
;
4105 gnm_conf_set_toolbar_style (GtkToolbarStyle x
)
4107 if (!watch_toolbar_style
.handler
)
4108 watch_enum (&watch_toolbar_style
, GTK_TYPE_TOOLBAR_STYLE
);
4109 set_enum (&watch_toolbar_style
, x
);
4112 static struct cb_watch_int watch_undo_max_descriptor_width
= {
4113 0, "undo/max-descriptor-width",
4114 "Length of the Undo Descriptors",
4115 "This value is indicative of the maximum length of the command descriptors in the undo and redo chains.",
4120 gnm_conf_get_undo_max_descriptor_width (void)
4122 if (!watch_undo_max_descriptor_width
.handler
)
4123 watch_int (&watch_undo_max_descriptor_width
);
4124 return watch_undo_max_descriptor_width
.var
;
4128 gnm_conf_set_undo_max_descriptor_width (int x
)
4130 if (!watch_undo_max_descriptor_width
.handler
)
4131 watch_int (&watch_undo_max_descriptor_width
);
4132 set_int (&watch_undo_max_descriptor_width
, x
);
4136 gnm_conf_get_undo_max_descriptor_width_node (void)
4138 return get_watch_node (&watch_undo_max_descriptor_width
);
4141 static struct cb_watch_int watch_undo_maxnum
= {
4143 "Number of Undo Items",
4144 "This value determines the maximum number of items in the undo/redo list.",
4149 gnm_conf_get_undo_maxnum (void)
4151 if (!watch_undo_maxnum
.handler
)
4152 watch_int (&watch_undo_maxnum
);
4153 return watch_undo_maxnum
.var
;
4157 gnm_conf_set_undo_maxnum (int x
)
4159 if (!watch_undo_maxnum
.handler
)
4160 watch_int (&watch_undo_maxnum
);
4161 set_int (&watch_undo_maxnum
, x
);
4165 gnm_conf_get_undo_maxnum_node (void)
4167 return get_watch_node (&watch_undo_maxnum
);
4170 static struct cb_watch_bool watch_undo_show_sheet_name
= {
4171 0, "undo/show-sheet-name",
4172 "Show Sheet Name in Undo List",
4173 "This value determines whether to show the sheet names in the undo and redo lists.",
4178 gnm_conf_get_undo_show_sheet_name (void)
4180 if (!watch_undo_show_sheet_name
.handler
)
4181 watch_bool (&watch_undo_show_sheet_name
);
4182 return watch_undo_show_sheet_name
.var
;
4186 gnm_conf_set_undo_show_sheet_name (gboolean x
)
4188 if (!watch_undo_show_sheet_name
.handler
)
4189 watch_bool (&watch_undo_show_sheet_name
);
4190 set_bool (&watch_undo_show_sheet_name
, x
);
4194 gnm_conf_get_undo_show_sheet_name_node (void)
4196 return get_watch_node (&watch_undo_show_sheet_name
);
4199 static struct cb_watch_int watch_undo_size
= {
4201 "Maximal Undo Size",
4202 "This value determines the length of the undo chain. Each editing action has a size associate with it, to compare it with the memory requirements of a simple one-cell edit (size of 1). The undo list will be truncated when its total size exceeds this configurable value.",
4207 gnm_conf_get_undo_size (void)
4209 if (!watch_undo_size
.handler
)
4210 watch_int (&watch_undo_size
);
4211 return watch_undo_size
.var
;
4215 gnm_conf_set_undo_size (int x
)
4217 if (!watch_undo_size
.handler
)
4218 watch_int (&watch_undo_size
);
4219 set_int (&watch_undo_size
, x
);
4223 gnm_conf_get_undo_size_node (void)
4225 return get_watch_node (&watch_undo_size
);
4229 gnm_conf_get_autocorrect_dir_node (void)
4231 return get_node ("autocorrect", NULL
);
4235 gnm_conf_get_autoformat_dir_node (void)
4237 return get_node ("autoformat", NULL
);
4241 gnm_conf_get_core_defaultfont_dir_node (void)
4243 return get_node ("core/defaultfont", NULL
);
4247 gnm_conf_get_core_file_save_dir_node (void)
4249 return get_node ("core/file/save", NULL
);
4253 gnm_conf_get_core_gui_cells_dir_node (void)
4255 return get_node ("core/gui/cells", NULL
);
4259 gnm_conf_get_core_gui_editing_dir_node (void)
4261 return get_node ("core/gui/editing", NULL
);
4265 gnm_conf_get_core_gui_screen_dir_node (void)
4267 return get_node ("core/gui/screen", NULL
);
4271 gnm_conf_get_core_gui_toolbars_dir_node (void)
4273 return get_node ("core/gui/toolbars", NULL
);
4277 gnm_conf_get_core_gui_window_dir_node (void)
4279 return get_node ("core/gui/window", NULL
);
4283 gnm_conf_get_core_sort_default_dir_node (void)
4285 return get_node ("core/sort/default", NULL
);
4289 gnm_conf_get_core_sort_dialog_dir_node (void)
4291 return get_node ("core/sort/dialog", NULL
);
4295 gnm_conf_get_core_workbook_dir_node (void)
4297 return get_node ("core/workbook", NULL
);
4301 gnm_conf_get_core_xml_dir_node (void)
4303 return get_node ("core/xml", NULL
);
4307 gnm_conf_get_cut_and_paste_dir_node (void)
4309 return get_node ("cut-and-paste", NULL
);
4313 gnm_conf_get_dialogs_rs_dir_node (void)
4315 return get_node ("dialogs/rs", NULL
);
4319 gnm_conf_get_functionselector_dir_node (void)
4321 return get_node ("functionselector", NULL
);
4325 gnm_conf_get_plugin_glpk_dir_node (void)
4327 return get_node ("plugin/glpk", NULL
);
4331 gnm_conf_get_plugin_latex_dir_node (void)
4333 return get_node ("plugin/latex", NULL
);
4337 gnm_conf_get_plugin_lpsolve_dir_node (void)
4339 return get_node ("plugin/lpsolve", NULL
);
4343 gnm_conf_get_plugins_dir_node (void)
4345 return get_node ("plugins", NULL
);
4349 gnm_conf_get_printsetup_dir_node (void)
4351 return get_node ("printsetup", NULL
);
4355 gnm_conf_get_searchreplace_dir_node (void)
4357 return get_node ("searchreplace", NULL
);
4361 gnm_conf_get_stf_export_dir_node (void)
4363 return get_node ("stf/export", NULL
);
4367 gnm_conf_get_toolbar_style_dir_node (void)
4369 return get_node ("toolbar-style", NULL
);
4373 gnm_conf_get_undo_dir_node (void)
4375 return get_node ("undo", NULL
);