Introspection fixes.
[gnumeric.git] / src / gnumeric-conf.c
blobe39c0531a14f00bed4c93ea64508af410ca43697
1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * gnumeric-conf.c:
5 * Author:
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>
29 #include <gnumeric.h>
30 #include "application.h"
31 #include "gnumeric-conf.h"
32 #include "gutils.h"
33 #include "mstyle.h"
34 #include <goffice/goffice.h>
35 #include <value.h>
36 #include <number-match.h>
37 #include <string.h>
38 #include <sheet.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; }
45 #else
46 #define d(code)
47 #endif
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); \
65 } while (0)
66 #define MAYBE_DEBUG_SET(key) do { \
67 if (debug_setters) g_printerr ("conf-set: %s\n", key); \
68 } while (0)
71 static guint sync_handler;
73 static gboolean
74 cb_sync (void)
76 go_conf_sync (root);
77 sync_handler = 0;
78 return FALSE;
81 static void
82 schedule_sync (void)
84 if (sync_handler)
85 return;
87 sync_handler = g_timeout_add (200, (GSourceFunc)cb_sync, NULL);
90 /* -------------------------------------------------------------------------- */
92 static GSList *watchers;
94 struct cb_watch_generic {
95 guint handler;
96 const char *key;
97 const char *short_desc;
98 const char *long_desc;
101 static void
102 free_watcher (struct cb_watch_generic *watcher)
104 go_conf_remove_monitor (watcher->handler);
107 /* ---------------------------------------- */
110 * gnm_conf_get_root:
112 * Returns: (transfer none): the root config node.
114 GOConfNode *
115 gnm_conf_get_root (void)
117 return root;
120 static GOConfNode *
121 get_node (const char *key, gpointer watch)
123 GOConfNode *res = g_hash_table_lookup (node_pool, key);
124 if (!res) {
125 res = go_conf_get_node (key[0] == '/' ? NULL : root, key);
126 g_hash_table_insert (node_pool, (gpointer)key, res);
127 if (watch)
128 g_hash_table_insert (node_watch, res, watch);
130 return res;
133 static GOConfNode *
134 get_watch_node (gpointer watch_)
136 struct cb_watch_generic *watch = watch_;
137 return get_node (watch->key, watch);
141 * gnm_conf_get_short_desc:
142 * @node: #GOConfNode
144 * Returns: (transfer none) (nullable): a brief description of @node.
146 char const *
147 gnm_conf_get_short_desc (GOConfNode *node)
149 struct cb_watch_generic *watch =
150 g_hash_table_lookup (node_watch, node);
151 const char *desc = watch ? watch->short_desc : NULL;
152 return desc ? _(desc) : NULL;
156 * gnm_conf_get_long_desc:
157 * @node: #GOConfNode
159 * Returns: (transfer none) (nullable): a description of @node.
161 char const *
162 gnm_conf_get_long_desc (GOConfNode *node)
164 struct cb_watch_generic *watch =
165 g_hash_table_lookup (node_watch, node);
166 const char *desc = watch ? watch->long_desc : NULL;
167 return desc ? _(desc) : NULL;
170 /* -------------------------------------------------------------------------- */
172 struct cb_watch_bool {
173 guint handler;
174 const char *key;
175 const char *short_desc;
176 const char *long_desc;
177 gboolean defalt;
178 gboolean var;
181 static void
182 cb_watch_bool (GOConfNode *node, G_GNUC_UNUSED const char *key, gpointer user)
184 struct cb_watch_bool *watch = user;
185 watch->var = go_conf_load_bool (node, NULL, watch->defalt);
188 static void
189 watch_bool (struct cb_watch_bool *watch)
191 GOConfNode *node = get_node (watch->key, watch);
192 watch->handler = go_conf_add_monitor
193 (node, NULL, cb_watch_bool, watch);
194 watchers = g_slist_prepend (watchers, watch);
195 cb_watch_bool (node, NULL, watch);
196 MAYBE_DEBUG_GET (watch->key);
199 static void
200 set_bool (struct cb_watch_bool *watch, gboolean x)
202 x = (x != FALSE);
203 if (x == watch->var)
204 return;
206 MAYBE_DEBUG_SET (watch->key);
207 watch->var = x;
208 go_conf_set_bool (root, watch->key, x);
209 schedule_sync ();
212 /* ---------------------------------------- */
214 struct cb_watch_int {
215 guint handler;
216 const char *key;
217 const char *short_desc;
218 const char *long_desc;
219 int min, max, defalt;
220 int var;
223 static void
224 cb_watch_int (GOConfNode *node, G_GNUC_UNUSED const char *key, gpointer user)
226 struct cb_watch_int *watch = user;
227 watch->var = go_conf_load_int (node, NULL,
228 watch->min, watch->max,
229 watch->defalt);
232 static void
233 watch_int (struct cb_watch_int *watch)
235 GOConfNode *node = get_node (watch->key, watch);
236 watch->handler = go_conf_add_monitor
237 (node, NULL, cb_watch_int, watch);
238 watchers = g_slist_prepend (watchers, watch);
239 cb_watch_int (node, NULL, watch);
240 MAYBE_DEBUG_GET (watch->key);
243 static void
244 set_int (struct cb_watch_int *watch, int x)
246 x = CLAMP (x, watch->min, watch->max);
248 if (x == watch->var)
249 return;
251 MAYBE_DEBUG_SET (watch->key);
252 watch->var = x;
253 go_conf_set_int (root, watch->key, x);
254 schedule_sync ();
257 /* ---------------------------------------- */
259 struct cb_watch_double {
260 guint handler;
261 const char *key;
262 const char *short_desc;
263 const char *long_desc;
264 double min, max, defalt;
265 double var;
268 static void
269 cb_watch_double (GOConfNode *node, G_GNUC_UNUSED const char *key, gpointer user)
271 struct cb_watch_double *watch = user;
272 watch->var = go_conf_load_double (node, NULL,
273 watch->min, watch->max,
274 watch->defalt);
277 static void
278 watch_double (struct cb_watch_double *watch)
280 GOConfNode *node = get_node (watch->key, watch);
281 watch->handler = go_conf_add_monitor
282 (node, NULL, cb_watch_double, watch);
283 watchers = g_slist_prepend (watchers, watch);
284 cb_watch_double (node, NULL, watch);
285 MAYBE_DEBUG_GET (watch->key);
288 static void
289 set_double (struct cb_watch_double *watch, double x)
291 x = CLAMP (x, watch->min, watch->max);
293 if (x == watch->var)
294 return;
296 MAYBE_DEBUG_SET (watch->key);
297 watch->var = x;
298 go_conf_set_double (root, watch->key, x);
299 schedule_sync ();
302 /* ---------------------------------------- */
304 struct cb_watch_string {
305 guint handler;
306 const char *key;
307 const char *short_desc;
308 const char *long_desc;
309 const char *defalt;
310 const char *var;
313 static void
314 cb_watch_string (GOConfNode *node, G_GNUC_UNUSED const char *key, gpointer user)
316 struct cb_watch_string *watch = user;
317 char *res = go_conf_load_string (node, NULL);
318 if (!res) res = g_strdup (watch->defalt);
319 g_hash_table_replace (string_pool, (gpointer)watch->key, res);
320 watch->var = res;
323 static void
324 watch_string (struct cb_watch_string *watch)
326 GOConfNode *node = get_node (watch->key, watch);
327 watch->handler = go_conf_add_monitor
328 (node, NULL, cb_watch_string, watch);
329 watchers = g_slist_prepend (watchers, watch);
330 cb_watch_string (node, NULL, watch);
331 MAYBE_DEBUG_GET (watch->key);
334 static void
335 set_string (struct cb_watch_string *watch, const char *x)
337 char *xc;
339 if (!x || !watch->var || strcmp (x, watch->var) == 0)
340 return;
342 MAYBE_DEBUG_SET (watch->key);
343 xc = g_strdup (x);
344 watch->var = xc;
345 /* Update pool before setting so monitors see the right value. */
346 g_hash_table_replace (string_pool, (gpointer)watch->key, xc);
347 go_conf_set_string (root, watch->key, xc);
348 schedule_sync ();
351 /* ---------------------------------------- */
353 struct cb_watch_string_list {
354 guint handler;
355 const char *key;
356 const char *short_desc;
357 const char *long_desc;
358 GSList *var;
361 static void
362 cb_watch_string_list (GOConfNode *node, G_GNUC_UNUSED const char *key, gpointer user)
364 struct cb_watch_string_list *watch = user;
365 GSList *res = go_conf_load_str_list (node, NULL);
366 g_hash_table_replace (string_list_pool, (gpointer)watch->key, res);
367 watch->var = res;
370 static void
371 watch_string_list (struct cb_watch_string_list *watch)
373 GOConfNode *node = get_node (watch->key, watch);
374 watch->handler = go_conf_add_monitor
375 (node, NULL, cb_watch_string_list, watch);
376 watchers = g_slist_prepend (watchers, watch);
377 cb_watch_string_list (node, NULL, watch);
378 MAYBE_DEBUG_GET (watch->key);
381 static gboolean
382 string_list_equal (GSList *x, GSList *y)
384 while (x && y) {
385 if (strcmp (x->data, y->data) != 0)
386 return FALSE;
387 x = x->next;
388 y = y->next;
391 return x == y;
394 static void
395 set_string_list (struct cb_watch_string_list *watch, GSList *x)
397 if (string_list_equal (x, watch->var))
398 return;
400 x = go_string_slist_copy (x);
402 MAYBE_DEBUG_SET (watch->key);
403 watch->var = x;
404 /* Update pool before setting so monitors see the right value. */
405 g_hash_table_replace (string_list_pool, (gpointer)watch->key, x);
406 go_conf_set_str_list (root, watch->key, x);
407 schedule_sync ();
410 /* ---------------------------------------- */
412 struct cb_watch_enum {
413 guint handler;
414 const char *key;
415 const char *short_desc;
416 const char *long_desc;
417 int defalt;
418 GType typ;
419 int var;
422 static void
423 cb_watch_enum (GOConfNode *node, G_GNUC_UNUSED const char *key, gpointer user)
425 struct cb_watch_enum *watch = user;
426 watch->var = go_conf_load_enum (node, NULL,
427 watch->typ, watch->defalt);
430 static void
431 watch_enum (struct cb_watch_enum *watch, GType typ)
433 GOConfNode *node = get_node (watch->key, watch);
434 watch->typ = typ;
435 watch->handler = go_conf_add_monitor
436 (node, NULL, cb_watch_enum, watch);
437 watchers = g_slist_prepend (watchers, watch);
438 cb_watch_enum (node, NULL, watch);
439 MAYBE_DEBUG_GET (watch->key);
442 static void
443 set_enum (struct cb_watch_enum *watch, int x)
445 if (x == watch->var)
446 return;
448 MAYBE_DEBUG_SET (watch->key);
449 watch->var = x;
450 go_conf_set_enum (root, watch->key, watch->typ, x);
451 schedule_sync ();
454 /* -------------------------------------------------------------------------- */
456 static void
457 cb_free_string_list (GSList *l)
459 g_slist_free_full (l, g_free);
463 * gnm_conf_init: (skip)
465 void
466 gnm_conf_init (void)
468 debug_getters = gnm_debug_flag ("conf-get");
469 debug_setters = gnm_debug_flag ("conf-set");
471 if (debug_getters || debug_setters)
472 g_printerr ("gnm_conf_init\n");
474 string_pool = g_hash_table_new_full
475 (g_str_hash, g_str_equal,
476 NULL, g_free);
477 string_list_pool = g_hash_table_new_full
478 (g_str_hash, g_str_equal,
479 NULL, (GDestroyNotify)cb_free_string_list);
480 node_pool = g_hash_table_new_full
481 (g_str_hash, g_str_equal,
482 NULL, (GDestroyNotify)go_conf_free_node);
483 node_watch = g_hash_table_new (g_direct_hash, g_direct_equal);
485 root = go_conf_get_node (NULL, GNM_CONF_DIR);
486 g_hash_table_insert (node_pool, (gpointer)"/", root);
490 * gnm_conf_shutdown: (skip)
492 void
493 gnm_conf_shutdown (void)
495 if (debug_getters || debug_setters)
496 g_printerr ("gnm_conf_shutdown\n");
498 go_conf_sync (root);
499 if (sync_handler) {
500 g_source_remove (sync_handler);
501 sync_handler = 0;
504 g_slist_free_full (watchers, (GDestroyNotify)free_watcher);
505 watchers = NULL;
507 g_hash_table_destroy (string_pool);
508 string_pool = NULL;
510 g_hash_table_destroy (string_list_pool);
511 string_list_pool = NULL;
513 g_hash_table_destroy (node_watch);
514 node_watch = NULL;
516 g_hash_table_destroy (node_pool);
517 node_pool = NULL;
519 root = NULL;
523 * gnm_conf_get_page_setup:
525 * Returns: (transfer full): the default #GtkPageSetup.
527 GtkPageSetup *
528 gnm_conf_get_page_setup (void)
530 GtkPageSetup *page_setup = gtk_page_setup_new ();
532 page_setup_set_paper (page_setup,
533 gnm_conf_get_printsetup_paper ());
535 gtk_page_setup_set_orientation
536 (page_setup,
537 gnm_conf_get_printsetup_paper_orientation ());
539 gtk_page_setup_set_top_margin
540 (page_setup,
541 gnm_conf_get_printsetup_margin_gtk_top (),
542 GTK_UNIT_POINTS);
543 gtk_page_setup_set_bottom_margin
544 (page_setup,
545 gnm_conf_get_printsetup_margin_gtk_bottom (),
546 GTK_UNIT_POINTS);
547 gtk_page_setup_set_left_margin
548 (page_setup,
549 gnm_conf_get_printsetup_margin_gtk_left (),
550 GTK_UNIT_POINTS);
551 gtk_page_setup_set_right_margin
552 (page_setup,
553 gnm_conf_get_printsetup_margin_gtk_right (),
554 GTK_UNIT_POINTS);
556 return page_setup;
559 void
560 gnm_conf_set_page_setup (GtkPageSetup *setup)
562 char *paper;
564 paper = page_setup_get_paper (setup);
565 gnm_conf_set_printsetup_paper (paper);
566 g_free (paper);
568 gnm_conf_set_printsetup_paper_orientation
569 (gtk_page_setup_get_orientation (setup));
571 gnm_conf_set_printsetup_margin_gtk_top
572 (gtk_page_setup_get_top_margin (setup, GTK_UNIT_POINTS));
573 gnm_conf_set_printsetup_margin_gtk_bottom
574 (gtk_page_setup_get_bottom_margin (setup, GTK_UNIT_POINTS));
575 gnm_conf_set_printsetup_margin_gtk_left
576 (gtk_page_setup_get_left_margin (setup, GTK_UNIT_POINTS));
577 gnm_conf_set_printsetup_margin_gtk_right
578 (gtk_page_setup_get_right_margin (setup, GTK_UNIT_POINTS));
582 * gnm_conf_get_printer_decoration_font:
584 * Returns: (transfer full): a style appropriate for for headers and
585 * footers.
587 GnmStyle *
588 gnm_conf_get_printer_decoration_font (void)
590 GnmStyle *style = gnm_style_new ();
592 gnm_style_set_font_name (style,
593 gnm_conf_get_printsetup_hf_font_name ());
594 gnm_style_set_font_size (style,
595 gnm_conf_get_printsetup_hf_font_size ());
596 gnm_style_set_font_bold (style,
597 gnm_conf_get_printsetup_hf_font_bold ());
598 gnm_style_set_font_italic (style,
599 gnm_conf_get_printsetup_hf_font_italic ());
601 return style;
604 #define TOOLBAR_TANGO(Object,Format,Standard) \
605 if (strcmp (name, "ObjectToolbar") == 0) \
606 Object \
607 else if (strcmp (name, "FormatToolbar") == 0) \
608 Format \
609 else if (strcmp (name, "StandardToolbar") == 0) \
610 Standard
613 gboolean
614 gnm_conf_get_toolbar_visible (const char *name)
616 TOOLBAR_TANGO
617 (return gnm_conf_get_core_gui_toolbars_object_visible ();,
618 return gnm_conf_get_core_gui_toolbars_format_visible ();,
619 return gnm_conf_get_core_gui_toolbars_standard_visible (););
621 g_warning ("Unknown toolbar: %s", name);
622 return FALSE;
625 void
626 gnm_conf_set_toolbar_visible (const char *name, gboolean x)
628 TOOLBAR_TANGO
629 (gnm_conf_set_core_gui_toolbars_object_visible (x);,
630 gnm_conf_set_core_gui_toolbars_format_visible (x);,
631 gnm_conf_set_core_gui_toolbars_standard_visible (x););
634 GtkPositionType
635 gnm_conf_get_toolbar_position (const char *name)
637 TOOLBAR_TANGO
638 (return gnm_conf_get_core_gui_toolbars_object_position ();,
639 return gnm_conf_get_core_gui_toolbars_format_position ();,
640 return gnm_conf_get_core_gui_toolbars_standard_position (););
642 g_warning ("Unknown toolbar: %s", name);
643 return GTK_POS_TOP;
646 void
647 gnm_conf_set_toolbar_position (const char *name, GtkPositionType x)
649 TOOLBAR_TANGO
650 (gnm_conf_set_core_gui_toolbars_object_position (x);,
651 gnm_conf_set_core_gui_toolbars_format_position (x);,
652 gnm_conf_set_core_gui_toolbars_standard_position (x););
655 #undef TOOLBAR_TANGO
658 * gnm_conf_get_print_settings:
660 * Returns: (transfer full): the default #GtkPrintSettings.
662 GtkPrintSettings *
663 gnm_conf_get_print_settings (void)
665 GtkPrintSettings *settings = gtk_print_settings_new ();
666 GSList *list = gnm_conf_get_printsetup_gtk_setting ();
668 while (list && list->next) {
669 /* For historical reasons, value comes before key. */
670 const char *value = list->data;
671 const char *key = list->next->data;
673 list = list->next->next;
674 gtk_print_settings_set (settings, key, value);
677 return settings;
680 static void
681 gnm_gconf_set_print_settings_cb (const gchar *key, const gchar *value, gpointer user_data)
683 GSList **list = user_data;
685 /* For historical reasons, value comes before key. */
686 *list = g_slist_prepend (*list, g_strdup (key));
687 *list = g_slist_prepend (*list, g_strdup (value));
690 void
691 gnm_conf_set_print_settings (GtkPrintSettings *settings)
693 GSList *list = NULL;
695 gtk_print_settings_foreach (settings, gnm_gconf_set_print_settings_cb, &list);
696 gnm_conf_set_printsetup_gtk_setting (list);
697 g_slist_free_full (list, g_free);
700 gboolean
701 gnm_conf_get_detachable_toolbars (void)
703 #ifdef WIN32
704 return FALSE;
705 #else
706 return go_conf_get_bool
707 (NULL,
708 "/desktop/interface/toolbar_detachable");
709 #endif
712 /* ------------------------------------------------------------------------- */
714 * The following code was generated by running
716 * make update-gnumeric-conf
719 /* ----------- AUTOMATICALLY GENERATED CODE BELOW -- DO NOT EDIT ----------- */
721 static struct cb_watch_bool watch_autocorrect_first_letter = {
722 0, "autocorrect/first-letter",
723 "Autocorrect first letter",
724 "This variable determines whether to autocorrect first letters",
725 TRUE,
728 gboolean
729 gnm_conf_get_autocorrect_first_letter (void)
731 if (!watch_autocorrect_first_letter.handler)
732 watch_bool (&watch_autocorrect_first_letter);
733 return watch_autocorrect_first_letter.var;
736 void
737 gnm_conf_set_autocorrect_first_letter (gboolean x)
739 if (!watch_autocorrect_first_letter.handler)
740 watch_bool (&watch_autocorrect_first_letter);
741 set_bool (&watch_autocorrect_first_letter, x);
745 * gnm_conf_get_autocorrect_first_letter_node:
747 * Returns: (transfer none): A #GOConfNode
749 GOConfNode *
750 gnm_conf_get_autocorrect_first_letter_node (void)
752 return get_watch_node (&watch_autocorrect_first_letter);
755 static struct cb_watch_string_list watch_autocorrect_first_letter_list = {
756 0, "autocorrect/first-letter-list",
757 "List of First Letter Exception",
758 "The autocorrect engine does not capitalize the first letter of words following strings in this list.",
762 * gnm_conf_get_autocorrect_first_letter_list:
764 * Returns: (element-type utf8) (transfer none):
766 GSList *
767 gnm_conf_get_autocorrect_first_letter_list (void)
769 if (!watch_autocorrect_first_letter_list.handler)
770 watch_string_list (&watch_autocorrect_first_letter_list);
771 return watch_autocorrect_first_letter_list.var;
775 * gnm_conf_set_autocorrect_first_letter_list:
776 * @x: (element-type utf8): list of strings
779 void
780 gnm_conf_set_autocorrect_first_letter_list (GSList *x)
782 if (!watch_autocorrect_first_letter_list.handler)
783 watch_string_list (&watch_autocorrect_first_letter_list);
784 set_string_list (&watch_autocorrect_first_letter_list, x);
788 * gnm_conf_get_autocorrect_first_letter_list_node:
790 * Returns: (transfer none): A #GOConfNode
792 GOConfNode *
793 gnm_conf_get_autocorrect_first_letter_list_node (void)
795 return get_watch_node (&watch_autocorrect_first_letter_list);
798 static struct cb_watch_bool watch_autocorrect_init_caps = {
799 0, "autocorrect/init-caps",
800 "Autocorrect initial caps",
801 "This variable determines whether to autocorrect initial caps",
802 TRUE,
805 gboolean
806 gnm_conf_get_autocorrect_init_caps (void)
808 if (!watch_autocorrect_init_caps.handler)
809 watch_bool (&watch_autocorrect_init_caps);
810 return watch_autocorrect_init_caps.var;
813 void
814 gnm_conf_set_autocorrect_init_caps (gboolean x)
816 if (!watch_autocorrect_init_caps.handler)
817 watch_bool (&watch_autocorrect_init_caps);
818 set_bool (&watch_autocorrect_init_caps, x);
822 * gnm_conf_get_autocorrect_init_caps_node:
824 * Returns: (transfer none): A #GOConfNode
826 GOConfNode *
827 gnm_conf_get_autocorrect_init_caps_node (void)
829 return get_watch_node (&watch_autocorrect_init_caps);
832 static struct cb_watch_string_list watch_autocorrect_init_caps_list = {
833 0, "autocorrect/init-caps-list",
834 "List of initial caps exceptions",
835 "The autocorrect engine does not correct the initial caps for words in this list.",
839 * gnm_conf_get_autocorrect_init_caps_list:
841 * Returns: (element-type utf8) (transfer none):
843 GSList *
844 gnm_conf_get_autocorrect_init_caps_list (void)
846 if (!watch_autocorrect_init_caps_list.handler)
847 watch_string_list (&watch_autocorrect_init_caps_list);
848 return watch_autocorrect_init_caps_list.var;
852 * gnm_conf_set_autocorrect_init_caps_list:
853 * @x: (element-type utf8): list of strings
856 void
857 gnm_conf_set_autocorrect_init_caps_list (GSList *x)
859 if (!watch_autocorrect_init_caps_list.handler)
860 watch_string_list (&watch_autocorrect_init_caps_list);
861 set_string_list (&watch_autocorrect_init_caps_list, x);
865 * gnm_conf_get_autocorrect_init_caps_list_node:
867 * Returns: (transfer none): A #GOConfNode
869 GOConfNode *
870 gnm_conf_get_autocorrect_init_caps_list_node (void)
872 return get_watch_node (&watch_autocorrect_init_caps_list);
875 static struct cb_watch_bool watch_autocorrect_names_of_days = {
876 0, "autocorrect/names-of-days",
877 "Autocorrect names of days",
878 "This variable determines whether to autocorrect names of days",
879 TRUE,
882 gboolean
883 gnm_conf_get_autocorrect_names_of_days (void)
885 if (!watch_autocorrect_names_of_days.handler)
886 watch_bool (&watch_autocorrect_names_of_days);
887 return watch_autocorrect_names_of_days.var;
890 void
891 gnm_conf_set_autocorrect_names_of_days (gboolean x)
893 if (!watch_autocorrect_names_of_days.handler)
894 watch_bool (&watch_autocorrect_names_of_days);
895 set_bool (&watch_autocorrect_names_of_days, x);
899 * gnm_conf_get_autocorrect_names_of_days_node:
901 * Returns: (transfer none): A #GOConfNode
903 GOConfNode *
904 gnm_conf_get_autocorrect_names_of_days_node (void)
906 return get_watch_node (&watch_autocorrect_names_of_days);
909 static struct cb_watch_bool watch_autocorrect_replace = {
910 0, "autocorrect/replace",
911 "Autocorrect replace",
912 "Autocorrect replace",
913 TRUE,
916 gboolean
917 gnm_conf_get_autocorrect_replace (void)
919 if (!watch_autocorrect_replace.handler)
920 watch_bool (&watch_autocorrect_replace);
921 return watch_autocorrect_replace.var;
924 void
925 gnm_conf_set_autocorrect_replace (gboolean x)
927 if (!watch_autocorrect_replace.handler)
928 watch_bool (&watch_autocorrect_replace);
929 set_bool (&watch_autocorrect_replace, x);
933 * gnm_conf_get_autocorrect_replace_node:
935 * Returns: (transfer none): A #GOConfNode
937 GOConfNode *
938 gnm_conf_get_autocorrect_replace_node (void)
940 return get_watch_node (&watch_autocorrect_replace);
943 static struct cb_watch_string_list watch_autoformat_extra_dirs = {
944 0, "autoformat/extra-dirs",
945 "List of Extra Autoformat Directories.",
946 "This list contains all extra directories containing autoformat templates.",
950 * gnm_conf_get_autoformat_extra_dirs:
952 * Returns: (element-type utf8) (transfer none):
954 GSList *
955 gnm_conf_get_autoformat_extra_dirs (void)
957 if (!watch_autoformat_extra_dirs.handler)
958 watch_string_list (&watch_autoformat_extra_dirs);
959 return watch_autoformat_extra_dirs.var;
963 * gnm_conf_set_autoformat_extra_dirs:
964 * @x: (element-type utf8): list of strings
967 void
968 gnm_conf_set_autoformat_extra_dirs (GSList *x)
970 if (!watch_autoformat_extra_dirs.handler)
971 watch_string_list (&watch_autoformat_extra_dirs);
972 set_string_list (&watch_autoformat_extra_dirs, x);
976 * gnm_conf_get_autoformat_extra_dirs_node:
978 * Returns: (transfer none): A #GOConfNode
980 GOConfNode *
981 gnm_conf_get_autoformat_extra_dirs_node (void)
983 return get_watch_node (&watch_autoformat_extra_dirs);
986 static struct cb_watch_string watch_autoformat_sys_dir = {
987 0, "autoformat/sys-dir",
988 "System Directory for Autoformats",
989 "This directory contains the pre-installed autoformat templates.",
990 "autoformat-templates",
993 const char *
994 gnm_conf_get_autoformat_sys_dir (void)
996 if (!watch_autoformat_sys_dir.handler)
997 watch_string (&watch_autoformat_sys_dir);
998 return watch_autoformat_sys_dir.var;
1001 void
1002 gnm_conf_set_autoformat_sys_dir (const char *x)
1004 g_return_if_fail (x != NULL);
1005 if (!watch_autoformat_sys_dir.handler)
1006 watch_string (&watch_autoformat_sys_dir);
1007 set_string (&watch_autoformat_sys_dir, x);
1011 * gnm_conf_get_autoformat_sys_dir_node:
1013 * Returns: (transfer none): A #GOConfNode
1015 GOConfNode *
1016 gnm_conf_get_autoformat_sys_dir_node (void)
1018 return get_watch_node (&watch_autoformat_sys_dir);
1021 static struct cb_watch_string watch_autoformat_usr_dir = {
1022 0, "autoformat/usr-dir",
1023 "User Directory for Autoformats",
1024 "The main directory for user specific autoformat templates.",
1025 "autoformat-templates",
1028 const char *
1029 gnm_conf_get_autoformat_usr_dir (void)
1031 if (!watch_autoformat_usr_dir.handler)
1032 watch_string (&watch_autoformat_usr_dir);
1033 return watch_autoformat_usr_dir.var;
1036 void
1037 gnm_conf_set_autoformat_usr_dir (const char *x)
1039 g_return_if_fail (x != NULL);
1040 if (!watch_autoformat_usr_dir.handler)
1041 watch_string (&watch_autoformat_usr_dir);
1042 set_string (&watch_autoformat_usr_dir, x);
1046 * gnm_conf_get_autoformat_usr_dir_node:
1048 * Returns: (transfer none): A #GOConfNode
1050 GOConfNode *
1051 gnm_conf_get_autoformat_usr_dir_node (void)
1053 return get_watch_node (&watch_autoformat_usr_dir);
1056 static struct cb_watch_bool watch_core_defaultfont_bold = {
1057 0, "core/defaultfont/bold",
1058 "The default font is bold.",
1059 "This value determines whether the default font for a new workbook is bold.",
1060 FALSE,
1063 gboolean
1064 gnm_conf_get_core_defaultfont_bold (void)
1066 if (!watch_core_defaultfont_bold.handler)
1067 watch_bool (&watch_core_defaultfont_bold);
1068 return watch_core_defaultfont_bold.var;
1071 void
1072 gnm_conf_set_core_defaultfont_bold (gboolean x)
1074 if (!watch_core_defaultfont_bold.handler)
1075 watch_bool (&watch_core_defaultfont_bold);
1076 set_bool (&watch_core_defaultfont_bold, x);
1080 * gnm_conf_get_core_defaultfont_bold_node:
1082 * Returns: (transfer none): A #GOConfNode
1084 GOConfNode *
1085 gnm_conf_get_core_defaultfont_bold_node (void)
1087 return get_watch_node (&watch_core_defaultfont_bold);
1090 static struct cb_watch_bool watch_core_defaultfont_italic = {
1091 0, "core/defaultfont/italic",
1092 "The default font is italic.",
1093 "This value determines whether the default font for a new workbook is italic.",
1094 FALSE,
1097 gboolean
1098 gnm_conf_get_core_defaultfont_italic (void)
1100 if (!watch_core_defaultfont_italic.handler)
1101 watch_bool (&watch_core_defaultfont_italic);
1102 return watch_core_defaultfont_italic.var;
1105 void
1106 gnm_conf_set_core_defaultfont_italic (gboolean x)
1108 if (!watch_core_defaultfont_italic.handler)
1109 watch_bool (&watch_core_defaultfont_italic);
1110 set_bool (&watch_core_defaultfont_italic, x);
1114 * gnm_conf_get_core_defaultfont_italic_node:
1116 * Returns: (transfer none): A #GOConfNode
1118 GOConfNode *
1119 gnm_conf_get_core_defaultfont_italic_node (void)
1121 return get_watch_node (&watch_core_defaultfont_italic);
1124 static struct cb_watch_string watch_core_defaultfont_name = {
1125 0, "core/defaultfont/name",
1126 "Default font name",
1127 "The default font name for new workbooks.",
1128 "Sans",
1131 const char *
1132 gnm_conf_get_core_defaultfont_name (void)
1134 if (!watch_core_defaultfont_name.handler)
1135 watch_string (&watch_core_defaultfont_name);
1136 return watch_core_defaultfont_name.var;
1139 void
1140 gnm_conf_set_core_defaultfont_name (const char *x)
1142 g_return_if_fail (x != NULL);
1143 if (!watch_core_defaultfont_name.handler)
1144 watch_string (&watch_core_defaultfont_name);
1145 set_string (&watch_core_defaultfont_name, x);
1149 * gnm_conf_get_core_defaultfont_name_node:
1151 * Returns: (transfer none): A #GOConfNode
1153 GOConfNode *
1154 gnm_conf_get_core_defaultfont_name_node (void)
1156 return get_watch_node (&watch_core_defaultfont_name);
1159 static struct cb_watch_double watch_core_defaultfont_size = {
1160 0, "core/defaultfont/size",
1161 "Default Font Size",
1162 "The default font size for new workbooks.",
1163 1, 100, 10,
1166 double
1167 gnm_conf_get_core_defaultfont_size (void)
1169 if (!watch_core_defaultfont_size.handler)
1170 watch_double (&watch_core_defaultfont_size);
1171 return watch_core_defaultfont_size.var;
1174 void
1175 gnm_conf_set_core_defaultfont_size (double x)
1177 if (!watch_core_defaultfont_size.handler)
1178 watch_double (&watch_core_defaultfont_size);
1179 set_double (&watch_core_defaultfont_size, x);
1183 * gnm_conf_get_core_defaultfont_size_node:
1185 * Returns: (transfer none): A #GOConfNode
1187 GOConfNode *
1188 gnm_conf_get_core_defaultfont_size_node (void)
1190 return get_watch_node (&watch_core_defaultfont_size);
1193 static struct cb_watch_bool watch_core_file_save_def_overwrite = {
1194 0, "core/file/save/def-overwrite",
1195 "Default To Overwriting Files",
1196 "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.",
1197 FALSE,
1200 gboolean
1201 gnm_conf_get_core_file_save_def_overwrite (void)
1203 if (!watch_core_file_save_def_overwrite.handler)
1204 watch_bool (&watch_core_file_save_def_overwrite);
1205 return watch_core_file_save_def_overwrite.var;
1208 void
1209 gnm_conf_set_core_file_save_def_overwrite (gboolean x)
1211 if (!watch_core_file_save_def_overwrite.handler)
1212 watch_bool (&watch_core_file_save_def_overwrite);
1213 set_bool (&watch_core_file_save_def_overwrite, x);
1217 * gnm_conf_get_core_file_save_def_overwrite_node:
1219 * Returns: (transfer none): A #GOConfNode
1221 GOConfNode *
1222 gnm_conf_get_core_file_save_def_overwrite_node (void)
1224 return get_watch_node (&watch_core_file_save_def_overwrite);
1227 static struct cb_watch_string_list watch_core_file_save_extension_check_disabled = {
1228 0, "core/file/save/extension-check-disabled",
1229 "List of file savers with disabled extension check.",
1230 "This list contains the ids of the file savers for which the extension check is disabled.",
1234 * gnm_conf_get_core_file_save_extension_check_disabled:
1236 * Returns: (element-type utf8) (transfer none):
1238 GSList *
1239 gnm_conf_get_core_file_save_extension_check_disabled (void)
1241 if (!watch_core_file_save_extension_check_disabled.handler)
1242 watch_string_list (&watch_core_file_save_extension_check_disabled);
1243 return watch_core_file_save_extension_check_disabled.var;
1247 * gnm_conf_set_core_file_save_extension_check_disabled:
1248 * @x: (element-type utf8): list of strings
1251 void
1252 gnm_conf_set_core_file_save_extension_check_disabled (GSList *x)
1254 if (!watch_core_file_save_extension_check_disabled.handler)
1255 watch_string_list (&watch_core_file_save_extension_check_disabled);
1256 set_string_list (&watch_core_file_save_extension_check_disabled, x);
1260 * gnm_conf_get_core_file_save_extension_check_disabled_node:
1262 * Returns: (transfer none): A #GOConfNode
1264 GOConfNode *
1265 gnm_conf_get_core_file_save_extension_check_disabled_node (void)
1267 return get_watch_node (&watch_core_file_save_extension_check_disabled);
1270 static struct cb_watch_bool watch_core_file_save_single_sheet = {
1271 0, "core/file/save/single-sheet",
1272 "Warn When Exporting Into Single Sheet Format",
1273 "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.",
1274 TRUE,
1277 gboolean
1278 gnm_conf_get_core_file_save_single_sheet (void)
1280 if (!watch_core_file_save_single_sheet.handler)
1281 watch_bool (&watch_core_file_save_single_sheet);
1282 return watch_core_file_save_single_sheet.var;
1285 void
1286 gnm_conf_set_core_file_save_single_sheet (gboolean x)
1288 if (!watch_core_file_save_single_sheet.handler)
1289 watch_bool (&watch_core_file_save_single_sheet);
1290 set_bool (&watch_core_file_save_single_sheet, x);
1294 * gnm_conf_get_core_file_save_single_sheet_node:
1296 * Returns: (transfer none): A #GOConfNode
1298 GOConfNode *
1299 gnm_conf_get_core_file_save_single_sheet_node (void)
1301 return get_watch_node (&watch_core_file_save_single_sheet);
1304 static struct cb_watch_bool watch_core_gui_cells_extension_markers = {
1305 0, "core/gui/cells/extension-markers",
1306 "Extension Markers",
1307 "This variable determines whether cells with truncated content are marked.",
1308 FALSE,
1311 gboolean
1312 gnm_conf_get_core_gui_cells_extension_markers (void)
1314 if (!watch_core_gui_cells_extension_markers.handler)
1315 watch_bool (&watch_core_gui_cells_extension_markers);
1316 return watch_core_gui_cells_extension_markers.var;
1319 void
1320 gnm_conf_set_core_gui_cells_extension_markers (gboolean x)
1322 if (!watch_core_gui_cells_extension_markers.handler)
1323 watch_bool (&watch_core_gui_cells_extension_markers);
1324 set_bool (&watch_core_gui_cells_extension_markers, x);
1328 * gnm_conf_get_core_gui_cells_extension_markers_node:
1330 * Returns: (transfer none): A #GOConfNode
1332 GOConfNode *
1333 gnm_conf_get_core_gui_cells_extension_markers_node (void)
1335 return get_watch_node (&watch_core_gui_cells_extension_markers);
1338 static struct cb_watch_bool watch_core_gui_cells_function_markers = {
1339 0, "core/gui/cells/function-markers",
1340 "Function Markers",
1341 "This variable determines whether cells containing spreadsheet function are marked.",
1342 FALSE,
1345 gboolean
1346 gnm_conf_get_core_gui_cells_function_markers (void)
1348 if (!watch_core_gui_cells_function_markers.handler)
1349 watch_bool (&watch_core_gui_cells_function_markers);
1350 return watch_core_gui_cells_function_markers.var;
1353 void
1354 gnm_conf_set_core_gui_cells_function_markers (gboolean x)
1356 if (!watch_core_gui_cells_function_markers.handler)
1357 watch_bool (&watch_core_gui_cells_function_markers);
1358 set_bool (&watch_core_gui_cells_function_markers, x);
1362 * gnm_conf_get_core_gui_cells_function_markers_node:
1364 * Returns: (transfer none): A #GOConfNode
1366 GOConfNode *
1367 gnm_conf_get_core_gui_cells_function_markers_node (void)
1369 return get_watch_node (&watch_core_gui_cells_function_markers);
1372 static struct cb_watch_bool watch_core_gui_editing_autocomplete = {
1373 0, "core/gui/editing/autocomplete",
1374 "Autocomplete",
1375 "This variable determines whether autocompletion is set on.",
1376 TRUE,
1379 gboolean
1380 gnm_conf_get_core_gui_editing_autocomplete (void)
1382 if (!watch_core_gui_editing_autocomplete.handler)
1383 watch_bool (&watch_core_gui_editing_autocomplete);
1384 return watch_core_gui_editing_autocomplete.var;
1387 void
1388 gnm_conf_set_core_gui_editing_autocomplete (gboolean x)
1390 if (!watch_core_gui_editing_autocomplete.handler)
1391 watch_bool (&watch_core_gui_editing_autocomplete);
1392 set_bool (&watch_core_gui_editing_autocomplete, x);
1396 * gnm_conf_get_core_gui_editing_autocomplete_node:
1398 * Returns: (transfer none): A #GOConfNode
1400 GOConfNode *
1401 gnm_conf_get_core_gui_editing_autocomplete_node (void)
1403 return get_watch_node (&watch_core_gui_editing_autocomplete);
1406 static struct cb_watch_int watch_core_gui_editing_autocomplete_min_chars = {
1407 0, "core/gui/editing/autocomplete-min-chars",
1408 "Minimum Number of Characters for Autocompletion",
1409 "This variable determines the minimum number of characters required for autocompletion.",
1410 1, 10, 3,
1414 gnm_conf_get_core_gui_editing_autocomplete_min_chars (void)
1416 if (!watch_core_gui_editing_autocomplete_min_chars.handler)
1417 watch_int (&watch_core_gui_editing_autocomplete_min_chars);
1418 return watch_core_gui_editing_autocomplete_min_chars.var;
1421 void
1422 gnm_conf_set_core_gui_editing_autocomplete_min_chars (int x)
1424 if (!watch_core_gui_editing_autocomplete_min_chars.handler)
1425 watch_int (&watch_core_gui_editing_autocomplete_min_chars);
1426 set_int (&watch_core_gui_editing_autocomplete_min_chars, x);
1430 * gnm_conf_get_core_gui_editing_autocomplete_min_chars_node:
1432 * Returns: (transfer none): A #GOConfNode
1434 GOConfNode *
1435 gnm_conf_get_core_gui_editing_autocomplete_min_chars_node (void)
1437 return get_watch_node (&watch_core_gui_editing_autocomplete_min_chars);
1440 static struct cb_watch_enum watch_core_gui_editing_enter_moves_dir = {
1441 0, "core/gui/editing/enter-moves-dir",
1442 "Enter Direction",
1443 "Which direction pressing Enter will move the edit position.",
1444 GO_DIRECTION_DOWN,
1447 GODirection
1448 gnm_conf_get_core_gui_editing_enter_moves_dir (void)
1450 if (!watch_core_gui_editing_enter_moves_dir.handler)
1451 watch_enum (&watch_core_gui_editing_enter_moves_dir, GO_TYPE_DIRECTION);
1452 return watch_core_gui_editing_enter_moves_dir.var;
1455 void
1456 gnm_conf_set_core_gui_editing_enter_moves_dir (GODirection x)
1458 if (!watch_core_gui_editing_enter_moves_dir.handler)
1459 watch_enum (&watch_core_gui_editing_enter_moves_dir, GO_TYPE_DIRECTION);
1460 set_enum (&watch_core_gui_editing_enter_moves_dir, x);
1464 * gnm_conf_get_core_gui_editing_enter_moves_dir_node:
1466 * Returns: (transfer none): A #GOConfNode
1468 GOConfNode *
1469 gnm_conf_get_core_gui_editing_enter_moves_dir_node (void)
1471 return get_watch_node (&watch_core_gui_editing_enter_moves_dir);
1474 static struct cb_watch_bool watch_core_gui_editing_function_argument_tooltips = {
1475 0, "core/gui/editing/function-argument-tooltips",
1476 "Show Function Argument Tooltips",
1477 "This variable determines whether to show function argument tooltips.",
1478 TRUE,
1481 gboolean
1482 gnm_conf_get_core_gui_editing_function_argument_tooltips (void)
1484 if (!watch_core_gui_editing_function_argument_tooltips.handler)
1485 watch_bool (&watch_core_gui_editing_function_argument_tooltips);
1486 return watch_core_gui_editing_function_argument_tooltips.var;
1489 void
1490 gnm_conf_set_core_gui_editing_function_argument_tooltips (gboolean x)
1492 if (!watch_core_gui_editing_function_argument_tooltips.handler)
1493 watch_bool (&watch_core_gui_editing_function_argument_tooltips);
1494 set_bool (&watch_core_gui_editing_function_argument_tooltips, x);
1498 * gnm_conf_get_core_gui_editing_function_argument_tooltips_node:
1500 * Returns: (transfer none): A #GOConfNode
1502 GOConfNode *
1503 gnm_conf_get_core_gui_editing_function_argument_tooltips_node (void)
1505 return get_watch_node (&watch_core_gui_editing_function_argument_tooltips);
1508 static struct cb_watch_bool watch_core_gui_editing_function_name_tooltips = {
1509 0, "core/gui/editing/function-name-tooltips",
1510 "Show Function Name Tooltips",
1511 "This variable determines whether to show function name tooltips.",
1512 TRUE,
1515 gboolean
1516 gnm_conf_get_core_gui_editing_function_name_tooltips (void)
1518 if (!watch_core_gui_editing_function_name_tooltips.handler)
1519 watch_bool (&watch_core_gui_editing_function_name_tooltips);
1520 return watch_core_gui_editing_function_name_tooltips.var;
1523 void
1524 gnm_conf_set_core_gui_editing_function_name_tooltips (gboolean x)
1526 if (!watch_core_gui_editing_function_name_tooltips.handler)
1527 watch_bool (&watch_core_gui_editing_function_name_tooltips);
1528 set_bool (&watch_core_gui_editing_function_name_tooltips, x);
1532 * gnm_conf_get_core_gui_editing_function_name_tooltips_node:
1534 * Returns: (transfer none): A #GOConfNode
1536 GOConfNode *
1537 gnm_conf_get_core_gui_editing_function_name_tooltips_node (void)
1539 return get_watch_node (&watch_core_gui_editing_function_name_tooltips);
1542 static struct cb_watch_int watch_core_gui_editing_recalclag = {
1543 0, "core/gui/editing/recalclag",
1544 "Auto Expression Recalculation Lag",
1545 "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.",
1546 -5000, 5000, 200,
1550 gnm_conf_get_core_gui_editing_recalclag (void)
1552 if (!watch_core_gui_editing_recalclag.handler)
1553 watch_int (&watch_core_gui_editing_recalclag);
1554 return watch_core_gui_editing_recalclag.var;
1557 void
1558 gnm_conf_set_core_gui_editing_recalclag (int x)
1560 if (!watch_core_gui_editing_recalclag.handler)
1561 watch_int (&watch_core_gui_editing_recalclag);
1562 set_int (&watch_core_gui_editing_recalclag, x);
1566 * gnm_conf_get_core_gui_editing_recalclag_node:
1568 * Returns: (transfer none): A #GOConfNode
1570 GOConfNode *
1571 gnm_conf_get_core_gui_editing_recalclag_node (void)
1573 return get_watch_node (&watch_core_gui_editing_recalclag);
1576 static struct cb_watch_bool watch_core_gui_editing_transitionkeys = {
1577 0, "core/gui/editing/transitionkeys",
1578 "Transition Keys",
1579 "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.",
1580 FALSE,
1583 gboolean
1584 gnm_conf_get_core_gui_editing_transitionkeys (void)
1586 if (!watch_core_gui_editing_transitionkeys.handler)
1587 watch_bool (&watch_core_gui_editing_transitionkeys);
1588 return watch_core_gui_editing_transitionkeys.var;
1591 void
1592 gnm_conf_set_core_gui_editing_transitionkeys (gboolean x)
1594 if (!watch_core_gui_editing_transitionkeys.handler)
1595 watch_bool (&watch_core_gui_editing_transitionkeys);
1596 set_bool (&watch_core_gui_editing_transitionkeys, x);
1600 * gnm_conf_get_core_gui_editing_transitionkeys_node:
1602 * Returns: (transfer none): A #GOConfNode
1604 GOConfNode *
1605 gnm_conf_get_core_gui_editing_transitionkeys_node (void)
1607 return get_watch_node (&watch_core_gui_editing_transitionkeys);
1610 static struct cb_watch_double watch_core_gui_screen_horizontaldpi = {
1611 0, "core/gui/screen/horizontaldpi",
1612 "Horizontal DPI",
1613 "Screen resolution in the horizontal direction.",
1614 10, 1000, 96,
1617 double
1618 gnm_conf_get_core_gui_screen_horizontaldpi (void)
1620 if (!watch_core_gui_screen_horizontaldpi.handler)
1621 watch_double (&watch_core_gui_screen_horizontaldpi);
1622 return watch_core_gui_screen_horizontaldpi.var;
1625 void
1626 gnm_conf_set_core_gui_screen_horizontaldpi (double x)
1628 if (!watch_core_gui_screen_horizontaldpi.handler)
1629 watch_double (&watch_core_gui_screen_horizontaldpi);
1630 set_double (&watch_core_gui_screen_horizontaldpi, x);
1634 * gnm_conf_get_core_gui_screen_horizontaldpi_node:
1636 * Returns: (transfer none): A #GOConfNode
1638 GOConfNode *
1639 gnm_conf_get_core_gui_screen_horizontaldpi_node (void)
1641 return get_watch_node (&watch_core_gui_screen_horizontaldpi);
1644 static struct cb_watch_double watch_core_gui_screen_verticaldpi = {
1645 0, "core/gui/screen/verticaldpi",
1646 "Vertical DPI",
1647 "Screen resolution in the vertical direction.",
1648 10, 1000, 96,
1651 double
1652 gnm_conf_get_core_gui_screen_verticaldpi (void)
1654 if (!watch_core_gui_screen_verticaldpi.handler)
1655 watch_double (&watch_core_gui_screen_verticaldpi);
1656 return watch_core_gui_screen_verticaldpi.var;
1659 void
1660 gnm_conf_set_core_gui_screen_verticaldpi (double x)
1662 if (!watch_core_gui_screen_verticaldpi.handler)
1663 watch_double (&watch_core_gui_screen_verticaldpi);
1664 set_double (&watch_core_gui_screen_verticaldpi, x);
1668 * gnm_conf_get_core_gui_screen_verticaldpi_node:
1670 * Returns: (transfer none): A #GOConfNode
1672 GOConfNode *
1673 gnm_conf_get_core_gui_screen_verticaldpi_node (void)
1675 return get_watch_node (&watch_core_gui_screen_verticaldpi);
1678 static struct cb_watch_int watch_core_gui_toolbars_format_position = {
1679 0, "core/gui/toolbars/format-position",
1680 "Format toolbar position",
1681 "This variable determines where the format toolbar should be shown. 0 is left, 1 is right, 2 is top.",
1682 0, 3, 2,
1685 GtkPositionType
1686 gnm_conf_get_core_gui_toolbars_format_position (void)
1688 if (!watch_core_gui_toolbars_format_position.handler)
1689 watch_int (&watch_core_gui_toolbars_format_position);
1690 return watch_core_gui_toolbars_format_position.var;
1693 void
1694 gnm_conf_set_core_gui_toolbars_format_position (GtkPositionType x)
1696 if (!watch_core_gui_toolbars_format_position.handler)
1697 watch_int (&watch_core_gui_toolbars_format_position);
1698 set_int (&watch_core_gui_toolbars_format_position, x);
1702 * gnm_conf_get_core_gui_toolbars_format_position_node:
1704 * Returns: (transfer none): A #GOConfNode
1706 GOConfNode *
1707 gnm_conf_get_core_gui_toolbars_format_position_node (void)
1709 return get_watch_node (&watch_core_gui_toolbars_format_position);
1712 static struct cb_watch_bool watch_core_gui_toolbars_format_visible = {
1713 0, "core/gui/toolbars/format-visible",
1714 "Format toolbar visible",
1715 "This variable determines whether the format toolbar should be visible initially.",
1716 TRUE,
1719 gboolean
1720 gnm_conf_get_core_gui_toolbars_format_visible (void)
1722 if (!watch_core_gui_toolbars_format_visible.handler)
1723 watch_bool (&watch_core_gui_toolbars_format_visible);
1724 return watch_core_gui_toolbars_format_visible.var;
1727 void
1728 gnm_conf_set_core_gui_toolbars_format_visible (gboolean x)
1730 if (!watch_core_gui_toolbars_format_visible.handler)
1731 watch_bool (&watch_core_gui_toolbars_format_visible);
1732 set_bool (&watch_core_gui_toolbars_format_visible, x);
1736 * gnm_conf_get_core_gui_toolbars_format_visible_node:
1738 * Returns: (transfer none): A #GOConfNode
1740 GOConfNode *
1741 gnm_conf_get_core_gui_toolbars_format_visible_node (void)
1743 return get_watch_node (&watch_core_gui_toolbars_format_visible);
1746 static struct cb_watch_int watch_core_gui_toolbars_object_position = {
1747 0, "core/gui/toolbars/object-position",
1748 "Object toolbar position",
1749 "This variable determines where the object toolbar should be shown. 0 is left, 1 is right, 2 is top.",
1750 0, 3, 2,
1753 GtkPositionType
1754 gnm_conf_get_core_gui_toolbars_object_position (void)
1756 if (!watch_core_gui_toolbars_object_position.handler)
1757 watch_int (&watch_core_gui_toolbars_object_position);
1758 return watch_core_gui_toolbars_object_position.var;
1761 void
1762 gnm_conf_set_core_gui_toolbars_object_position (GtkPositionType x)
1764 if (!watch_core_gui_toolbars_object_position.handler)
1765 watch_int (&watch_core_gui_toolbars_object_position);
1766 set_int (&watch_core_gui_toolbars_object_position, x);
1770 * gnm_conf_get_core_gui_toolbars_object_position_node:
1772 * Returns: (transfer none): A #GOConfNode
1774 GOConfNode *
1775 gnm_conf_get_core_gui_toolbars_object_position_node (void)
1777 return get_watch_node (&watch_core_gui_toolbars_object_position);
1780 static struct cb_watch_bool watch_core_gui_toolbars_object_visible = {
1781 0, "core/gui/toolbars/object-visible",
1782 "Object toolbar visible",
1783 "This variable determines whether the object toolbar should be visible initially.",
1784 TRUE,
1787 gboolean
1788 gnm_conf_get_core_gui_toolbars_object_visible (void)
1790 if (!watch_core_gui_toolbars_object_visible.handler)
1791 watch_bool (&watch_core_gui_toolbars_object_visible);
1792 return watch_core_gui_toolbars_object_visible.var;
1795 void
1796 gnm_conf_set_core_gui_toolbars_object_visible (gboolean x)
1798 if (!watch_core_gui_toolbars_object_visible.handler)
1799 watch_bool (&watch_core_gui_toolbars_object_visible);
1800 set_bool (&watch_core_gui_toolbars_object_visible, x);
1804 * gnm_conf_get_core_gui_toolbars_object_visible_node:
1806 * Returns: (transfer none): A #GOConfNode
1808 GOConfNode *
1809 gnm_conf_get_core_gui_toolbars_object_visible_node (void)
1811 return get_watch_node (&watch_core_gui_toolbars_object_visible);
1814 static struct cb_watch_int watch_core_gui_toolbars_standard_position = {
1815 0, "core/gui/toolbars/standard-position",
1816 "Standard toolbar position",
1817 "This variable determines where the standard toolbar should be shown. 0 is left, 1 is right, 2 is top.",
1818 0, 3, 2,
1821 GtkPositionType
1822 gnm_conf_get_core_gui_toolbars_standard_position (void)
1824 if (!watch_core_gui_toolbars_standard_position.handler)
1825 watch_int (&watch_core_gui_toolbars_standard_position);
1826 return watch_core_gui_toolbars_standard_position.var;
1829 void
1830 gnm_conf_set_core_gui_toolbars_standard_position (GtkPositionType x)
1832 if (!watch_core_gui_toolbars_standard_position.handler)
1833 watch_int (&watch_core_gui_toolbars_standard_position);
1834 set_int (&watch_core_gui_toolbars_standard_position, x);
1838 * gnm_conf_get_core_gui_toolbars_standard_position_node:
1840 * Returns: (transfer none): A #GOConfNode
1842 GOConfNode *
1843 gnm_conf_get_core_gui_toolbars_standard_position_node (void)
1845 return get_watch_node (&watch_core_gui_toolbars_standard_position);
1848 static struct cb_watch_bool watch_core_gui_toolbars_standard_visible = {
1849 0, "core/gui/toolbars/standard-visible",
1850 "Standard toolbar visible",
1851 "This variable determines whether the standard toolbar should be visible initially.",
1852 TRUE,
1855 gboolean
1856 gnm_conf_get_core_gui_toolbars_standard_visible (void)
1858 if (!watch_core_gui_toolbars_standard_visible.handler)
1859 watch_bool (&watch_core_gui_toolbars_standard_visible);
1860 return watch_core_gui_toolbars_standard_visible.var;
1863 void
1864 gnm_conf_set_core_gui_toolbars_standard_visible (gboolean x)
1866 if (!watch_core_gui_toolbars_standard_visible.handler)
1867 watch_bool (&watch_core_gui_toolbars_standard_visible);
1868 set_bool (&watch_core_gui_toolbars_standard_visible, x);
1872 * gnm_conf_get_core_gui_toolbars_standard_visible_node:
1874 * Returns: (transfer none): A #GOConfNode
1876 GOConfNode *
1877 gnm_conf_get_core_gui_toolbars_standard_visible_node (void)
1879 return get_watch_node (&watch_core_gui_toolbars_standard_visible);
1882 static struct cb_watch_double watch_core_gui_window_x = {
1883 0, "core/gui/window/x",
1884 "Default Horizontal Window Size",
1885 "This number (between 0.25 and 1.00) gives the horizontal fraction of the screen size covered by the default window.",
1886 0.1, 1, 0.75,
1889 double
1890 gnm_conf_get_core_gui_window_x (void)
1892 if (!watch_core_gui_window_x.handler)
1893 watch_double (&watch_core_gui_window_x);
1894 return watch_core_gui_window_x.var;
1897 void
1898 gnm_conf_set_core_gui_window_x (double x)
1900 if (!watch_core_gui_window_x.handler)
1901 watch_double (&watch_core_gui_window_x);
1902 set_double (&watch_core_gui_window_x, x);
1906 * gnm_conf_get_core_gui_window_x_node:
1908 * Returns: (transfer none): A #GOConfNode
1910 GOConfNode *
1911 gnm_conf_get_core_gui_window_x_node (void)
1913 return get_watch_node (&watch_core_gui_window_x);
1916 static struct cb_watch_double watch_core_gui_window_y = {
1917 0, "core/gui/window/y",
1918 "Default Vertical Window Size",
1919 "This number (between 0.25 and 1.00) gives the vertical fraction of the screen size covered by the default window.",
1920 0.1, 1, 0.75,
1923 double
1924 gnm_conf_get_core_gui_window_y (void)
1926 if (!watch_core_gui_window_y.handler)
1927 watch_double (&watch_core_gui_window_y);
1928 return watch_core_gui_window_y.var;
1931 void
1932 gnm_conf_set_core_gui_window_y (double x)
1934 if (!watch_core_gui_window_y.handler)
1935 watch_double (&watch_core_gui_window_y);
1936 set_double (&watch_core_gui_window_y, x);
1940 * gnm_conf_get_core_gui_window_y_node:
1942 * Returns: (transfer none): A #GOConfNode
1944 GOConfNode *
1945 gnm_conf_get_core_gui_window_y_node (void)
1947 return get_watch_node (&watch_core_gui_window_y);
1950 static struct cb_watch_double watch_core_gui_window_zoom = {
1951 0, "core/gui/window/zoom",
1952 "Default Zoom Factor",
1953 "The initial zoom factor for new workbooks.",
1954 0.1, 5, 1,
1957 double
1958 gnm_conf_get_core_gui_window_zoom (void)
1960 if (!watch_core_gui_window_zoom.handler)
1961 watch_double (&watch_core_gui_window_zoom);
1962 return watch_core_gui_window_zoom.var;
1965 void
1966 gnm_conf_set_core_gui_window_zoom (double x)
1968 if (!watch_core_gui_window_zoom.handler)
1969 watch_double (&watch_core_gui_window_zoom);
1970 set_double (&watch_core_gui_window_zoom, x);
1974 * gnm_conf_get_core_gui_window_zoom_node:
1976 * Returns: (transfer none): A #GOConfNode
1978 GOConfNode *
1979 gnm_conf_get_core_gui_window_zoom_node (void)
1981 return get_watch_node (&watch_core_gui_window_zoom);
1984 static struct cb_watch_bool watch_core_sort_default_ascending = {
1985 0, "core/sort/default/ascending",
1986 "Sort Ascending",
1987 "This option determines the initial state of the sort-order button in the sort dialog.",
1988 TRUE,
1991 gboolean
1992 gnm_conf_get_core_sort_default_ascending (void)
1994 if (!watch_core_sort_default_ascending.handler)
1995 watch_bool (&watch_core_sort_default_ascending);
1996 return watch_core_sort_default_ascending.var;
1999 void
2000 gnm_conf_set_core_sort_default_ascending (gboolean x)
2002 if (!watch_core_sort_default_ascending.handler)
2003 watch_bool (&watch_core_sort_default_ascending);
2004 set_bool (&watch_core_sort_default_ascending, x);
2008 * gnm_conf_get_core_sort_default_ascending_node:
2010 * Returns: (transfer none): A #GOConfNode
2012 GOConfNode *
2013 gnm_conf_get_core_sort_default_ascending_node (void)
2015 return get_watch_node (&watch_core_sort_default_ascending);
2018 static struct cb_watch_bool watch_core_sort_default_by_case = {
2019 0, "core/sort/default/by-case",
2020 "Sort is Case-Sensitive",
2021 "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.",
2022 FALSE,
2025 gboolean
2026 gnm_conf_get_core_sort_default_by_case (void)
2028 if (!watch_core_sort_default_by_case.handler)
2029 watch_bool (&watch_core_sort_default_by_case);
2030 return watch_core_sort_default_by_case.var;
2033 void
2034 gnm_conf_set_core_sort_default_by_case (gboolean x)
2036 if (!watch_core_sort_default_by_case.handler)
2037 watch_bool (&watch_core_sort_default_by_case);
2038 set_bool (&watch_core_sort_default_by_case, x);
2042 * gnm_conf_get_core_sort_default_by_case_node:
2044 * Returns: (transfer none): A #GOConfNode
2046 GOConfNode *
2047 gnm_conf_get_core_sort_default_by_case_node (void)
2049 return get_watch_node (&watch_core_sort_default_by_case);
2052 static struct cb_watch_bool watch_core_sort_default_retain_formats = {
2053 0, "core/sort/default/retain-formats",
2054 "Sorting Preserves Formats",
2055 "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.",
2056 TRUE,
2059 gboolean
2060 gnm_conf_get_core_sort_default_retain_formats (void)
2062 if (!watch_core_sort_default_retain_formats.handler)
2063 watch_bool (&watch_core_sort_default_retain_formats);
2064 return watch_core_sort_default_retain_formats.var;
2067 void
2068 gnm_conf_set_core_sort_default_retain_formats (gboolean x)
2070 if (!watch_core_sort_default_retain_formats.handler)
2071 watch_bool (&watch_core_sort_default_retain_formats);
2072 set_bool (&watch_core_sort_default_retain_formats, x);
2076 * gnm_conf_get_core_sort_default_retain_formats_node:
2078 * Returns: (transfer none): A #GOConfNode
2080 GOConfNode *
2081 gnm_conf_get_core_sort_default_retain_formats_node (void)
2083 return get_watch_node (&watch_core_sort_default_retain_formats);
2086 static struct cb_watch_int watch_core_sort_dialog_max_initial_clauses = {
2087 0, "core/sort/dialog/max-initial-clauses",
2088 "Number of Automatic Clauses",
2089 "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.",
2090 0, 256, 10,
2094 gnm_conf_get_core_sort_dialog_max_initial_clauses (void)
2096 if (!watch_core_sort_dialog_max_initial_clauses.handler)
2097 watch_int (&watch_core_sort_dialog_max_initial_clauses);
2098 return watch_core_sort_dialog_max_initial_clauses.var;
2101 void
2102 gnm_conf_set_core_sort_dialog_max_initial_clauses (int x)
2104 if (!watch_core_sort_dialog_max_initial_clauses.handler)
2105 watch_int (&watch_core_sort_dialog_max_initial_clauses);
2106 set_int (&watch_core_sort_dialog_max_initial_clauses, x);
2110 * gnm_conf_get_core_sort_dialog_max_initial_clauses_node:
2112 * Returns: (transfer none): A #GOConfNode
2114 GOConfNode *
2115 gnm_conf_get_core_sort_dialog_max_initial_clauses_node (void)
2117 return get_watch_node (&watch_core_sort_dialog_max_initial_clauses);
2120 static struct cb_watch_int watch_core_workbook_autosave_time = {
2121 0, "core/workbook/autosave-time",
2122 "Autosave frequency",
2123 "The number of seconds between autosaves.",
2124 0, 365 * 24 * 60 * 60, 0,
2128 gnm_conf_get_core_workbook_autosave_time (void)
2130 if (!watch_core_workbook_autosave_time.handler)
2131 watch_int (&watch_core_workbook_autosave_time);
2132 return watch_core_workbook_autosave_time.var;
2135 void
2136 gnm_conf_set_core_workbook_autosave_time (int x)
2138 if (!watch_core_workbook_autosave_time.handler)
2139 watch_int (&watch_core_workbook_autosave_time);
2140 set_int (&watch_core_workbook_autosave_time, x);
2144 * gnm_conf_get_core_workbook_autosave_time_node:
2146 * Returns: (transfer none): A #GOConfNode
2148 GOConfNode *
2149 gnm_conf_get_core_workbook_autosave_time_node (void)
2151 return get_watch_node (&watch_core_workbook_autosave_time);
2154 static struct cb_watch_int watch_core_workbook_n_cols = {
2155 0, "core/workbook/n-cols",
2156 "Default Number of columns in a sheet",
2157 "The number of columns in each sheet. This setting will be used only in a new Gnumeric session.",
2158 GNM_MIN_COLS, GNM_MAX_COLS, 256,
2162 gnm_conf_get_core_workbook_n_cols (void)
2164 if (!watch_core_workbook_n_cols.handler)
2165 watch_int (&watch_core_workbook_n_cols);
2166 return watch_core_workbook_n_cols.var;
2169 void
2170 gnm_conf_set_core_workbook_n_cols (int x)
2172 if (!watch_core_workbook_n_cols.handler)
2173 watch_int (&watch_core_workbook_n_cols);
2174 set_int (&watch_core_workbook_n_cols, x);
2178 * gnm_conf_get_core_workbook_n_cols_node:
2180 * Returns: (transfer none): A #GOConfNode
2182 GOConfNode *
2183 gnm_conf_get_core_workbook_n_cols_node (void)
2185 return get_watch_node (&watch_core_workbook_n_cols);
2188 static struct cb_watch_int watch_core_workbook_n_rows = {
2189 0, "core/workbook/n-rows",
2190 "Default Number of rows in a sheet",
2191 "The number of rows in each sheet. This setting will be used only in a new Gnumeric session.",
2192 GNM_MIN_ROWS, GNM_MAX_ROWS, 65536,
2196 gnm_conf_get_core_workbook_n_rows (void)
2198 if (!watch_core_workbook_n_rows.handler)
2199 watch_int (&watch_core_workbook_n_rows);
2200 return watch_core_workbook_n_rows.var;
2203 void
2204 gnm_conf_set_core_workbook_n_rows (int x)
2206 if (!watch_core_workbook_n_rows.handler)
2207 watch_int (&watch_core_workbook_n_rows);
2208 set_int (&watch_core_workbook_n_rows, x);
2212 * gnm_conf_get_core_workbook_n_rows_node:
2214 * Returns: (transfer none): A #GOConfNode
2216 GOConfNode *
2217 gnm_conf_get_core_workbook_n_rows_node (void)
2219 return get_watch_node (&watch_core_workbook_n_rows);
2222 static struct cb_watch_int watch_core_workbook_n_sheet = {
2223 0, "core/workbook/n-sheet",
2224 "Default Number of Sheets",
2225 "The number of sheets initially created in a new workbook.",
2226 1, 64, 3,
2230 gnm_conf_get_core_workbook_n_sheet (void)
2232 if (!watch_core_workbook_n_sheet.handler)
2233 watch_int (&watch_core_workbook_n_sheet);
2234 return watch_core_workbook_n_sheet.var;
2237 void
2238 gnm_conf_set_core_workbook_n_sheet (int x)
2240 if (!watch_core_workbook_n_sheet.handler)
2241 watch_int (&watch_core_workbook_n_sheet);
2242 set_int (&watch_core_workbook_n_sheet, x);
2246 * gnm_conf_get_core_workbook_n_sheet_node:
2248 * Returns: (transfer none): A #GOConfNode
2250 GOConfNode *
2251 gnm_conf_get_core_workbook_n_sheet_node (void)
2253 return get_watch_node (&watch_core_workbook_n_sheet);
2256 static struct cb_watch_int watch_core_xml_compression_level = {
2257 0, "core/xml/compression-level",
2258 "Default Compression Level For Gnumeric Files",
2259 "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.",
2260 0, 9, 9,
2264 gnm_conf_get_core_xml_compression_level (void)
2266 if (!watch_core_xml_compression_level.handler)
2267 watch_int (&watch_core_xml_compression_level);
2268 return watch_core_xml_compression_level.var;
2271 void
2272 gnm_conf_set_core_xml_compression_level (int x)
2274 if (!watch_core_xml_compression_level.handler)
2275 watch_int (&watch_core_xml_compression_level);
2276 set_int (&watch_core_xml_compression_level, x);
2280 * gnm_conf_get_core_xml_compression_level_node:
2282 * Returns: (transfer none): A #GOConfNode
2284 GOConfNode *
2285 gnm_conf_get_core_xml_compression_level_node (void)
2287 return get_watch_node (&watch_core_xml_compression_level);
2290 static struct cb_watch_bool watch_cut_and_paste_prefer_clipboard = {
2291 0, "cut-and-paste/prefer-clipboard",
2292 "Prefer CLIPBOARD over PRIMARY selection",
2293 "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.",
2294 TRUE,
2297 gboolean
2298 gnm_conf_get_cut_and_paste_prefer_clipboard (void)
2300 if (!watch_cut_and_paste_prefer_clipboard.handler)
2301 watch_bool (&watch_cut_and_paste_prefer_clipboard);
2302 return watch_cut_and_paste_prefer_clipboard.var;
2305 void
2306 gnm_conf_set_cut_and_paste_prefer_clipboard (gboolean x)
2308 if (!watch_cut_and_paste_prefer_clipboard.handler)
2309 watch_bool (&watch_cut_and_paste_prefer_clipboard);
2310 set_bool (&watch_cut_and_paste_prefer_clipboard, x);
2314 * gnm_conf_get_cut_and_paste_prefer_clipboard_node:
2316 * Returns: (transfer none): A #GOConfNode
2318 GOConfNode *
2319 gnm_conf_get_cut_and_paste_prefer_clipboard_node (void)
2321 return get_watch_node (&watch_cut_and_paste_prefer_clipboard);
2324 static struct cb_watch_bool watch_dialogs_rs_unfocused = {
2325 0, "dialogs/rs/unfocused",
2326 "Allow Unfocused Range Selections",
2327 "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.",
2328 FALSE,
2331 gboolean
2332 gnm_conf_get_dialogs_rs_unfocused (void)
2334 if (!watch_dialogs_rs_unfocused.handler)
2335 watch_bool (&watch_dialogs_rs_unfocused);
2336 return watch_dialogs_rs_unfocused.var;
2339 void
2340 gnm_conf_set_dialogs_rs_unfocused (gboolean x)
2342 if (!watch_dialogs_rs_unfocused.handler)
2343 watch_bool (&watch_dialogs_rs_unfocused);
2344 set_bool (&watch_dialogs_rs_unfocused, x);
2348 * gnm_conf_get_dialogs_rs_unfocused_node:
2350 * Returns: (transfer none): A #GOConfNode
2352 GOConfNode *
2353 gnm_conf_get_dialogs_rs_unfocused_node (void)
2355 return get_watch_node (&watch_dialogs_rs_unfocused);
2358 static struct cb_watch_int watch_functionselector_num_of_recent = {
2359 0, "functionselector/num-of-recent",
2360 "Maximum Length of Recently Used Functions List",
2361 "The function selector keeps a list of recently used functions. This is the maximum length of that list.",
2362 0, 40, 12,
2366 gnm_conf_get_functionselector_num_of_recent (void)
2368 if (!watch_functionselector_num_of_recent.handler)
2369 watch_int (&watch_functionselector_num_of_recent);
2370 return watch_functionselector_num_of_recent.var;
2373 void
2374 gnm_conf_set_functionselector_num_of_recent (int x)
2376 if (!watch_functionselector_num_of_recent.handler)
2377 watch_int (&watch_functionselector_num_of_recent);
2378 set_int (&watch_functionselector_num_of_recent, x);
2382 * gnm_conf_get_functionselector_num_of_recent_node:
2384 * Returns: (transfer none): A #GOConfNode
2386 GOConfNode *
2387 gnm_conf_get_functionselector_num_of_recent_node (void)
2389 return get_watch_node (&watch_functionselector_num_of_recent);
2392 static struct cb_watch_string_list watch_functionselector_recentfunctions = {
2393 0, "functionselector/recentfunctions",
2394 "List of recently used functions.",
2395 "The function selector keeps a list of recently used functions. This is that list.",
2399 * gnm_conf_get_functionselector_recentfunctions:
2401 * Returns: (element-type utf8) (transfer none):
2403 GSList *
2404 gnm_conf_get_functionselector_recentfunctions (void)
2406 if (!watch_functionselector_recentfunctions.handler)
2407 watch_string_list (&watch_functionselector_recentfunctions);
2408 return watch_functionselector_recentfunctions.var;
2412 * gnm_conf_set_functionselector_recentfunctions:
2413 * @x: (element-type utf8): list of strings
2416 void
2417 gnm_conf_set_functionselector_recentfunctions (GSList *x)
2419 if (!watch_functionselector_recentfunctions.handler)
2420 watch_string_list (&watch_functionselector_recentfunctions);
2421 set_string_list (&watch_functionselector_recentfunctions, x);
2425 * gnm_conf_get_functionselector_recentfunctions_node:
2427 * Returns: (transfer none): A #GOConfNode
2429 GOConfNode *
2430 gnm_conf_get_functionselector_recentfunctions_node (void)
2432 return get_watch_node (&watch_functionselector_recentfunctions);
2435 static struct cb_watch_string watch_plugin_glpk_glpsol_path = {
2436 0, "plugin/glpk/glpsol-path",
2437 "Full path of glpsol program to use",
2438 "This is the full path to the glpsol binary that the lpsolve plugin should use.",
2442 const char *
2443 gnm_conf_get_plugin_glpk_glpsol_path (void)
2445 if (!watch_plugin_glpk_glpsol_path.handler)
2446 watch_string (&watch_plugin_glpk_glpsol_path);
2447 return watch_plugin_glpk_glpsol_path.var;
2450 void
2451 gnm_conf_set_plugin_glpk_glpsol_path (const char *x)
2453 g_return_if_fail (x != NULL);
2454 if (!watch_plugin_glpk_glpsol_path.handler)
2455 watch_string (&watch_plugin_glpk_glpsol_path);
2456 set_string (&watch_plugin_glpk_glpsol_path, x);
2460 * gnm_conf_get_plugin_glpk_glpsol_path_node:
2462 * Returns: (transfer none): A #GOConfNode
2464 GOConfNode *
2465 gnm_conf_get_plugin_glpk_glpsol_path_node (void)
2467 return get_watch_node (&watch_plugin_glpk_glpsol_path);
2470 static struct cb_watch_bool watch_plugin_latex_use_utf8 = {
2471 0, "plugin/latex/use-utf8",
2472 "Use UTF-8 in LaTeX Export",
2473 "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.",
2474 FALSE,
2477 gboolean
2478 gnm_conf_get_plugin_latex_use_utf8 (void)
2480 if (!watch_plugin_latex_use_utf8.handler)
2481 watch_bool (&watch_plugin_latex_use_utf8);
2482 return watch_plugin_latex_use_utf8.var;
2485 void
2486 gnm_conf_set_plugin_latex_use_utf8 (gboolean x)
2488 if (!watch_plugin_latex_use_utf8.handler)
2489 watch_bool (&watch_plugin_latex_use_utf8);
2490 set_bool (&watch_plugin_latex_use_utf8, x);
2494 * gnm_conf_get_plugin_latex_use_utf8_node:
2496 * Returns: (transfer none): A #GOConfNode
2498 GOConfNode *
2499 gnm_conf_get_plugin_latex_use_utf8_node (void)
2501 return get_watch_node (&watch_plugin_latex_use_utf8);
2504 static struct cb_watch_string watch_plugin_lpsolve_lpsolve_path = {
2505 0, "plugin/lpsolve/lpsolve-path",
2506 "Full path of lp_solve program to use",
2507 "This is the full path to the lp_solve binary that the lpsolve plugin should use.",
2511 const char *
2512 gnm_conf_get_plugin_lpsolve_lpsolve_path (void)
2514 if (!watch_plugin_lpsolve_lpsolve_path.handler)
2515 watch_string (&watch_plugin_lpsolve_lpsolve_path);
2516 return watch_plugin_lpsolve_lpsolve_path.var;
2519 void
2520 gnm_conf_set_plugin_lpsolve_lpsolve_path (const char *x)
2522 g_return_if_fail (x != NULL);
2523 if (!watch_plugin_lpsolve_lpsolve_path.handler)
2524 watch_string (&watch_plugin_lpsolve_lpsolve_path);
2525 set_string (&watch_plugin_lpsolve_lpsolve_path, x);
2529 * gnm_conf_get_plugin_lpsolve_lpsolve_path_node:
2531 * Returns: (transfer none): A #GOConfNode
2533 GOConfNode *
2534 gnm_conf_get_plugin_lpsolve_lpsolve_path_node (void)
2536 return get_watch_node (&watch_plugin_lpsolve_lpsolve_path);
2539 static struct cb_watch_bool watch_plugins_activate_newplugins = {
2540 0, "plugins/activate-newplugins",
2541 "Activate New Plugins",
2542 "This variable determines whether to activate every new encountered plugin.",
2543 TRUE,
2546 gboolean
2547 gnm_conf_get_plugins_activate_newplugins (void)
2549 if (!watch_plugins_activate_newplugins.handler)
2550 watch_bool (&watch_plugins_activate_newplugins);
2551 return watch_plugins_activate_newplugins.var;
2554 void
2555 gnm_conf_set_plugins_activate_newplugins (gboolean x)
2557 if (!watch_plugins_activate_newplugins.handler)
2558 watch_bool (&watch_plugins_activate_newplugins);
2559 set_bool (&watch_plugins_activate_newplugins, x);
2563 * gnm_conf_get_plugins_activate_newplugins_node:
2565 * Returns: (transfer none): A #GOConfNode
2567 GOConfNode *
2568 gnm_conf_get_plugins_activate_newplugins_node (void)
2570 return get_watch_node (&watch_plugins_activate_newplugins);
2573 static struct cb_watch_string_list watch_plugins_active = {
2574 0, "plugins/active",
2575 "List of Active Plugins.",
2576 "This list contains all plugins that are supposed to be automatically activated.",
2580 * gnm_conf_get_plugins_active:
2582 * Returns: (element-type utf8) (transfer none):
2584 GSList *
2585 gnm_conf_get_plugins_active (void)
2587 if (!watch_plugins_active.handler)
2588 watch_string_list (&watch_plugins_active);
2589 return watch_plugins_active.var;
2593 * gnm_conf_set_plugins_active:
2594 * @x: (element-type utf8): list of strings
2597 void
2598 gnm_conf_set_plugins_active (GSList *x)
2600 if (!watch_plugins_active.handler)
2601 watch_string_list (&watch_plugins_active);
2602 set_string_list (&watch_plugins_active, x);
2606 * gnm_conf_get_plugins_active_node:
2608 * Returns: (transfer none): A #GOConfNode
2610 GOConfNode *
2611 gnm_conf_get_plugins_active_node (void)
2613 return get_watch_node (&watch_plugins_active);
2616 static struct cb_watch_string_list watch_plugins_extra_dirs = {
2617 0, "plugins/extra-dirs",
2618 "List of Extra Plugin Directories.",
2619 "This list contains all extra directories containing plugins.",
2623 * gnm_conf_get_plugins_extra_dirs:
2625 * Returns: (element-type utf8) (transfer none):
2627 GSList *
2628 gnm_conf_get_plugins_extra_dirs (void)
2630 if (!watch_plugins_extra_dirs.handler)
2631 watch_string_list (&watch_plugins_extra_dirs);
2632 return watch_plugins_extra_dirs.var;
2636 * gnm_conf_set_plugins_extra_dirs:
2637 * @x: (element-type utf8): list of strings
2640 void
2641 gnm_conf_set_plugins_extra_dirs (GSList *x)
2643 if (!watch_plugins_extra_dirs.handler)
2644 watch_string_list (&watch_plugins_extra_dirs);
2645 set_string_list (&watch_plugins_extra_dirs, x);
2649 * gnm_conf_get_plugins_extra_dirs_node:
2651 * Returns: (transfer none): A #GOConfNode
2653 GOConfNode *
2654 gnm_conf_get_plugins_extra_dirs_node (void)
2656 return get_watch_node (&watch_plugins_extra_dirs);
2659 static struct cb_watch_string_list watch_plugins_file_states = {
2660 0, "plugins/file-states",
2661 "List of Plugin File States.",
2662 "This list contains all plugin file states.",
2666 * gnm_conf_get_plugins_file_states:
2668 * Returns: (element-type utf8) (transfer none):
2670 GSList *
2671 gnm_conf_get_plugins_file_states (void)
2673 if (!watch_plugins_file_states.handler)
2674 watch_string_list (&watch_plugins_file_states);
2675 return watch_plugins_file_states.var;
2679 * gnm_conf_set_plugins_file_states:
2680 * @x: (element-type utf8): list of strings
2683 void
2684 gnm_conf_set_plugins_file_states (GSList *x)
2686 if (!watch_plugins_file_states.handler)
2687 watch_string_list (&watch_plugins_file_states);
2688 set_string_list (&watch_plugins_file_states, x);
2692 * gnm_conf_get_plugins_file_states_node:
2694 * Returns: (transfer none): A #GOConfNode
2696 GOConfNode *
2697 gnm_conf_get_plugins_file_states_node (void)
2699 return get_watch_node (&watch_plugins_file_states);
2702 static struct cb_watch_string_list watch_plugins_known = {
2703 0, "plugins/known",
2704 "List of Known Plugins.",
2705 "This list contains all known plugins.",
2709 * gnm_conf_get_plugins_known:
2711 * Returns: (element-type utf8) (transfer none):
2713 GSList *
2714 gnm_conf_get_plugins_known (void)
2716 if (!watch_plugins_known.handler)
2717 watch_string_list (&watch_plugins_known);
2718 return watch_plugins_known.var;
2722 * gnm_conf_set_plugins_known:
2723 * @x: (element-type utf8): list of strings
2726 void
2727 gnm_conf_set_plugins_known (GSList *x)
2729 if (!watch_plugins_known.handler)
2730 watch_string_list (&watch_plugins_known);
2731 set_string_list (&watch_plugins_known, x);
2735 * gnm_conf_get_plugins_known_node:
2737 * Returns: (transfer none): A #GOConfNode
2739 GOConfNode *
2740 gnm_conf_get_plugins_known_node (void)
2742 return get_watch_node (&watch_plugins_known);
2745 static struct cb_watch_bool watch_printsetup_across_then_down = {
2746 0, "printsetup/across-then-down",
2747 "Default Print Direction",
2748 "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.",
2749 FALSE,
2752 gboolean
2753 gnm_conf_get_printsetup_across_then_down (void)
2755 if (!watch_printsetup_across_then_down.handler)
2756 watch_bool (&watch_printsetup_across_then_down);
2757 return watch_printsetup_across_then_down.var;
2760 void
2761 gnm_conf_set_printsetup_across_then_down (gboolean x)
2763 if (!watch_printsetup_across_then_down.handler)
2764 watch_bool (&watch_printsetup_across_then_down);
2765 set_bool (&watch_printsetup_across_then_down, x);
2769 * gnm_conf_get_printsetup_across_then_down_node:
2771 * Returns: (transfer none): A #GOConfNode
2773 GOConfNode *
2774 gnm_conf_get_printsetup_across_then_down_node (void)
2776 return get_watch_node (&watch_printsetup_across_then_down);
2779 static struct cb_watch_bool watch_printsetup_all_sheets = {
2780 0, "printsetup/all-sheets",
2781 "Apply print-setup to all sheets",
2782 "This value determines whether by default the print set-up dialog applies to all sheets simultaneously.",
2783 FALSE,
2786 gboolean
2787 gnm_conf_get_printsetup_all_sheets (void)
2789 if (!watch_printsetup_all_sheets.handler)
2790 watch_bool (&watch_printsetup_all_sheets);
2791 return watch_printsetup_all_sheets.var;
2794 void
2795 gnm_conf_set_printsetup_all_sheets (gboolean x)
2797 if (!watch_printsetup_all_sheets.handler)
2798 watch_bool (&watch_printsetup_all_sheets);
2799 set_bool (&watch_printsetup_all_sheets, x);
2803 * gnm_conf_get_printsetup_all_sheets_node:
2805 * Returns: (transfer none): A #GOConfNode
2807 GOConfNode *
2808 gnm_conf_get_printsetup_all_sheets_node (void)
2810 return get_watch_node (&watch_printsetup_all_sheets);
2813 static struct cb_watch_bool watch_printsetup_center_horizontally = {
2814 0, "printsetup/center-horizontally",
2815 "Default Horizontal Centering",
2816 "This value determines whether the default setting in the Print Setup dialog is to center pages horizontally.",
2817 FALSE,
2820 gboolean
2821 gnm_conf_get_printsetup_center_horizontally (void)
2823 if (!watch_printsetup_center_horizontally.handler)
2824 watch_bool (&watch_printsetup_center_horizontally);
2825 return watch_printsetup_center_horizontally.var;
2828 void
2829 gnm_conf_set_printsetup_center_horizontally (gboolean x)
2831 if (!watch_printsetup_center_horizontally.handler)
2832 watch_bool (&watch_printsetup_center_horizontally);
2833 set_bool (&watch_printsetup_center_horizontally, x);
2837 * gnm_conf_get_printsetup_center_horizontally_node:
2839 * Returns: (transfer none): A #GOConfNode
2841 GOConfNode *
2842 gnm_conf_get_printsetup_center_horizontally_node (void)
2844 return get_watch_node (&watch_printsetup_center_horizontally);
2847 static struct cb_watch_bool watch_printsetup_center_vertically = {
2848 0, "printsetup/center-vertically",
2849 "Default Vertical Centering",
2850 "This value determines whether the default setting in the Print Setup dialog is to center pages vertically.",
2851 FALSE,
2854 gboolean
2855 gnm_conf_get_printsetup_center_vertically (void)
2857 if (!watch_printsetup_center_vertically.handler)
2858 watch_bool (&watch_printsetup_center_vertically);
2859 return watch_printsetup_center_vertically.var;
2862 void
2863 gnm_conf_set_printsetup_center_vertically (gboolean x)
2865 if (!watch_printsetup_center_vertically.handler)
2866 watch_bool (&watch_printsetup_center_vertically);
2867 set_bool (&watch_printsetup_center_vertically, x);
2871 * gnm_conf_get_printsetup_center_vertically_node:
2873 * Returns: (transfer none): A #GOConfNode
2875 GOConfNode *
2876 gnm_conf_get_printsetup_center_vertically_node (void)
2878 return get_watch_node (&watch_printsetup_center_vertically);
2881 static struct cb_watch_string_list watch_printsetup_footer = {
2882 0, "printsetup/footer",
2883 "Page Footer",
2884 "The default page footer for new documents that can be modified using the\n page setup dialog.",
2888 * gnm_conf_get_printsetup_footer:
2890 * Returns: (element-type utf8) (transfer none):
2892 GSList *
2893 gnm_conf_get_printsetup_footer (void)
2895 if (!watch_printsetup_footer.handler)
2896 watch_string_list (&watch_printsetup_footer);
2897 return watch_printsetup_footer.var;
2901 * gnm_conf_set_printsetup_footer:
2902 * @x: (element-type utf8): list of strings
2905 void
2906 gnm_conf_set_printsetup_footer (GSList *x)
2908 if (!watch_printsetup_footer.handler)
2909 watch_string_list (&watch_printsetup_footer);
2910 set_string_list (&watch_printsetup_footer, x);
2914 * gnm_conf_get_printsetup_footer_node:
2916 * Returns: (transfer none): A #GOConfNode
2918 GOConfNode *
2919 gnm_conf_get_printsetup_footer_node (void)
2921 return get_watch_node (&watch_printsetup_footer);
2924 static struct cb_watch_string_list watch_printsetup_gtk_setting = {
2925 0, "printsetup/gtk-setting",
2926 "GTKPrintSetting",
2927 "The configuration of GTKPrintSetting. Do not edit this variable.",
2931 * gnm_conf_get_printsetup_gtk_setting:
2933 * Returns: (element-type utf8) (transfer none):
2935 GSList *
2936 gnm_conf_get_printsetup_gtk_setting (void)
2938 if (!watch_printsetup_gtk_setting.handler)
2939 watch_string_list (&watch_printsetup_gtk_setting);
2940 return watch_printsetup_gtk_setting.var;
2944 * gnm_conf_set_printsetup_gtk_setting:
2945 * @x: (element-type utf8): list of strings
2948 void
2949 gnm_conf_set_printsetup_gtk_setting (GSList *x)
2951 if (!watch_printsetup_gtk_setting.handler)
2952 watch_string_list (&watch_printsetup_gtk_setting);
2953 set_string_list (&watch_printsetup_gtk_setting, x);
2957 * gnm_conf_get_printsetup_gtk_setting_node:
2959 * Returns: (transfer none): A #GOConfNode
2961 GOConfNode *
2962 gnm_conf_get_printsetup_gtk_setting_node (void)
2964 return get_watch_node (&watch_printsetup_gtk_setting);
2967 static struct cb_watch_string_list watch_printsetup_header = {
2968 0, "printsetup/header",
2969 "Page Header",
2970 "The default page header for new documents that can be modified using the\n page setup dialog.",
2974 * gnm_conf_get_printsetup_header:
2976 * Returns: (element-type utf8) (transfer none):
2978 GSList *
2979 gnm_conf_get_printsetup_header (void)
2981 if (!watch_printsetup_header.handler)
2982 watch_string_list (&watch_printsetup_header);
2983 return watch_printsetup_header.var;
2987 * gnm_conf_set_printsetup_header:
2988 * @x: (element-type utf8): list of strings
2991 void
2992 gnm_conf_set_printsetup_header (GSList *x)
2994 if (!watch_printsetup_header.handler)
2995 watch_string_list (&watch_printsetup_header);
2996 set_string_list (&watch_printsetup_header, x);
3000 * gnm_conf_get_printsetup_header_node:
3002 * Returns: (transfer none): A #GOConfNode
3004 GOConfNode *
3005 gnm_conf_get_printsetup_header_node (void)
3007 return get_watch_node (&watch_printsetup_header);
3010 static struct cb_watch_bool watch_printsetup_hf_font_bold = {
3011 0, "printsetup/hf-font-bold",
3012 "The default header/footer font is bold.",
3013 "This value determines whether the default font for headers and footers is bold.",
3014 FALSE,
3017 gboolean
3018 gnm_conf_get_printsetup_hf_font_bold (void)
3020 if (!watch_printsetup_hf_font_bold.handler)
3021 watch_bool (&watch_printsetup_hf_font_bold);
3022 return watch_printsetup_hf_font_bold.var;
3025 void
3026 gnm_conf_set_printsetup_hf_font_bold (gboolean x)
3028 if (!watch_printsetup_hf_font_bold.handler)
3029 watch_bool (&watch_printsetup_hf_font_bold);
3030 set_bool (&watch_printsetup_hf_font_bold, x);
3034 * gnm_conf_get_printsetup_hf_font_bold_node:
3036 * Returns: (transfer none): A #GOConfNode
3038 GOConfNode *
3039 gnm_conf_get_printsetup_hf_font_bold_node (void)
3041 return get_watch_node (&watch_printsetup_hf_font_bold);
3044 static struct cb_watch_bool watch_printsetup_hf_font_italic = {
3045 0, "printsetup/hf-font-italic",
3046 "The default header/footer font is italic.",
3047 "This value determines whether the default font for headers and footers is italic.",
3048 FALSE,
3051 gboolean
3052 gnm_conf_get_printsetup_hf_font_italic (void)
3054 if (!watch_printsetup_hf_font_italic.handler)
3055 watch_bool (&watch_printsetup_hf_font_italic);
3056 return watch_printsetup_hf_font_italic.var;
3059 void
3060 gnm_conf_set_printsetup_hf_font_italic (gboolean x)
3062 if (!watch_printsetup_hf_font_italic.handler)
3063 watch_bool (&watch_printsetup_hf_font_italic);
3064 set_bool (&watch_printsetup_hf_font_italic, x);
3068 * gnm_conf_get_printsetup_hf_font_italic_node:
3070 * Returns: (transfer none): A #GOConfNode
3072 GOConfNode *
3073 gnm_conf_get_printsetup_hf_font_italic_node (void)
3075 return get_watch_node (&watch_printsetup_hf_font_italic);
3078 static struct cb_watch_string watch_printsetup_hf_font_name = {
3079 0, "printsetup/hf-font-name",
3080 "Default header/footer font name",
3081 "The default font name for headers and footers.",
3082 "Sans",
3085 const char *
3086 gnm_conf_get_printsetup_hf_font_name (void)
3088 if (!watch_printsetup_hf_font_name.handler)
3089 watch_string (&watch_printsetup_hf_font_name);
3090 return watch_printsetup_hf_font_name.var;
3093 void
3094 gnm_conf_set_printsetup_hf_font_name (const char *x)
3096 g_return_if_fail (x != NULL);
3097 if (!watch_printsetup_hf_font_name.handler)
3098 watch_string (&watch_printsetup_hf_font_name);
3099 set_string (&watch_printsetup_hf_font_name, x);
3103 * gnm_conf_get_printsetup_hf_font_name_node:
3105 * Returns: (transfer none): A #GOConfNode
3107 GOConfNode *
3108 gnm_conf_get_printsetup_hf_font_name_node (void)
3110 return get_watch_node (&watch_printsetup_hf_font_name);
3113 static struct cb_watch_double watch_printsetup_hf_font_size = {
3114 0, "printsetup/hf-font-size",
3115 "Default Header/Footer Font Size",
3116 "The default font size for headers and footers.",
3117 1, 100, 10,
3120 double
3121 gnm_conf_get_printsetup_hf_font_size (void)
3123 if (!watch_printsetup_hf_font_size.handler)
3124 watch_double (&watch_printsetup_hf_font_size);
3125 return watch_printsetup_hf_font_size.var;
3128 void
3129 gnm_conf_set_printsetup_hf_font_size (double x)
3131 if (!watch_printsetup_hf_font_size.handler)
3132 watch_double (&watch_printsetup_hf_font_size);
3133 set_double (&watch_printsetup_hf_font_size, x);
3137 * gnm_conf_get_printsetup_hf_font_size_node:
3139 * Returns: (transfer none): A #GOConfNode
3141 GOConfNode *
3142 gnm_conf_get_printsetup_hf_font_size_node (void)
3144 return get_watch_node (&watch_printsetup_hf_font_size);
3147 static struct cb_watch_string_list watch_printsetup_hf_left = {
3148 0, "printsetup/hf-left",
3149 "Header/Footer Format (Left Portion)",
3150 "Please use the Print Setup dialog to edit this value.",
3154 * gnm_conf_get_printsetup_hf_left:
3156 * Returns: (element-type utf8) (transfer none):
3158 GSList *
3159 gnm_conf_get_printsetup_hf_left (void)
3161 if (!watch_printsetup_hf_left.handler)
3162 watch_string_list (&watch_printsetup_hf_left);
3163 return watch_printsetup_hf_left.var;
3167 * gnm_conf_set_printsetup_hf_left:
3168 * @x: (element-type utf8): list of strings
3171 void
3172 gnm_conf_set_printsetup_hf_left (GSList *x)
3174 if (!watch_printsetup_hf_left.handler)
3175 watch_string_list (&watch_printsetup_hf_left);
3176 set_string_list (&watch_printsetup_hf_left, x);
3180 * gnm_conf_get_printsetup_hf_left_node:
3182 * Returns: (transfer none): A #GOConfNode
3184 GOConfNode *
3185 gnm_conf_get_printsetup_hf_left_node (void)
3187 return get_watch_node (&watch_printsetup_hf_left);
3190 static struct cb_watch_string_list watch_printsetup_hf_middle = {
3191 0, "printsetup/hf-middle",
3192 "Header/Footer Format (Middle Portion)",
3193 "Please use the Print Setup dialog to edit this value.",
3197 * gnm_conf_get_printsetup_hf_middle:
3199 * Returns: (element-type utf8) (transfer none):
3201 GSList *
3202 gnm_conf_get_printsetup_hf_middle (void)
3204 if (!watch_printsetup_hf_middle.handler)
3205 watch_string_list (&watch_printsetup_hf_middle);
3206 return watch_printsetup_hf_middle.var;
3210 * gnm_conf_set_printsetup_hf_middle:
3211 * @x: (element-type utf8): list of strings
3214 void
3215 gnm_conf_set_printsetup_hf_middle (GSList *x)
3217 if (!watch_printsetup_hf_middle.handler)
3218 watch_string_list (&watch_printsetup_hf_middle);
3219 set_string_list (&watch_printsetup_hf_middle, x);
3223 * gnm_conf_get_printsetup_hf_middle_node:
3225 * Returns: (transfer none): A #GOConfNode
3227 GOConfNode *
3228 gnm_conf_get_printsetup_hf_middle_node (void)
3230 return get_watch_node (&watch_printsetup_hf_middle);
3233 static struct cb_watch_string_list watch_printsetup_hf_right = {
3234 0, "printsetup/hf-right",
3235 "Header/Footer Format (Right Portion)",
3236 "Please use the Print Setup dialog to edit this value.",
3240 * gnm_conf_get_printsetup_hf_right:
3242 * Returns: (element-type utf8) (transfer none):
3244 GSList *
3245 gnm_conf_get_printsetup_hf_right (void)
3247 if (!watch_printsetup_hf_right.handler)
3248 watch_string_list (&watch_printsetup_hf_right);
3249 return watch_printsetup_hf_right.var;
3253 * gnm_conf_set_printsetup_hf_right:
3254 * @x: (element-type utf8): list of strings
3257 void
3258 gnm_conf_set_printsetup_hf_right (GSList *x)
3260 if (!watch_printsetup_hf_right.handler)
3261 watch_string_list (&watch_printsetup_hf_right);
3262 set_string_list (&watch_printsetup_hf_right, x);
3266 * gnm_conf_get_printsetup_hf_right_node:
3268 * Returns: (transfer none): A #GOConfNode
3270 GOConfNode *
3271 gnm_conf_get_printsetup_hf_right_node (void)
3273 return get_watch_node (&watch_printsetup_hf_right);
3276 static struct cb_watch_double watch_printsetup_margin_bottom = {
3277 0, "printsetup/margin-bottom",
3278 "Default Bottom Margin",
3279 "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.",
3280 0, 10000, 120,
3283 double
3284 gnm_conf_get_printsetup_margin_bottom (void)
3286 if (!watch_printsetup_margin_bottom.handler)
3287 watch_double (&watch_printsetup_margin_bottom);
3288 return watch_printsetup_margin_bottom.var;
3291 void
3292 gnm_conf_set_printsetup_margin_bottom (double x)
3294 if (!watch_printsetup_margin_bottom.handler)
3295 watch_double (&watch_printsetup_margin_bottom);
3296 set_double (&watch_printsetup_margin_bottom, x);
3300 * gnm_conf_get_printsetup_margin_bottom_node:
3302 * Returns: (transfer none): A #GOConfNode
3304 GOConfNode *
3305 gnm_conf_get_printsetup_margin_bottom_node (void)
3307 return get_watch_node (&watch_printsetup_margin_bottom);
3310 static struct cb_watch_double watch_printsetup_margin_gtk_bottom = {
3311 0, "printsetup/margin-gtk-bottom",
3312 "Default Bottom Outside Margin",
3313 "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.",
3314 0, 720, 72,
3317 double
3318 gnm_conf_get_printsetup_margin_gtk_bottom (void)
3320 if (!watch_printsetup_margin_gtk_bottom.handler)
3321 watch_double (&watch_printsetup_margin_gtk_bottom);
3322 return watch_printsetup_margin_gtk_bottom.var;
3325 void
3326 gnm_conf_set_printsetup_margin_gtk_bottom (double x)
3328 if (!watch_printsetup_margin_gtk_bottom.handler)
3329 watch_double (&watch_printsetup_margin_gtk_bottom);
3330 set_double (&watch_printsetup_margin_gtk_bottom, x);
3334 * gnm_conf_get_printsetup_margin_gtk_bottom_node:
3336 * Returns: (transfer none): A #GOConfNode
3338 GOConfNode *
3339 gnm_conf_get_printsetup_margin_gtk_bottom_node (void)
3341 return get_watch_node (&watch_printsetup_margin_gtk_bottom);
3344 static struct cb_watch_double watch_printsetup_margin_gtk_left = {
3345 0, "printsetup/margin-gtk-left",
3346 "Default Left Margin",
3347 "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.",
3348 0, 720, 72,
3351 double
3352 gnm_conf_get_printsetup_margin_gtk_left (void)
3354 if (!watch_printsetup_margin_gtk_left.handler)
3355 watch_double (&watch_printsetup_margin_gtk_left);
3356 return watch_printsetup_margin_gtk_left.var;
3359 void
3360 gnm_conf_set_printsetup_margin_gtk_left (double x)
3362 if (!watch_printsetup_margin_gtk_left.handler)
3363 watch_double (&watch_printsetup_margin_gtk_left);
3364 set_double (&watch_printsetup_margin_gtk_left, x);
3368 * gnm_conf_get_printsetup_margin_gtk_left_node:
3370 * Returns: (transfer none): A #GOConfNode
3372 GOConfNode *
3373 gnm_conf_get_printsetup_margin_gtk_left_node (void)
3375 return get_watch_node (&watch_printsetup_margin_gtk_left);
3378 static struct cb_watch_double watch_printsetup_margin_gtk_right = {
3379 0, "printsetup/margin-gtk-right",
3380 "Default Right Margin",
3381 "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.",
3382 0, 720, 72,
3385 double
3386 gnm_conf_get_printsetup_margin_gtk_right (void)
3388 if (!watch_printsetup_margin_gtk_right.handler)
3389 watch_double (&watch_printsetup_margin_gtk_right);
3390 return watch_printsetup_margin_gtk_right.var;
3393 void
3394 gnm_conf_set_printsetup_margin_gtk_right (double x)
3396 if (!watch_printsetup_margin_gtk_right.handler)
3397 watch_double (&watch_printsetup_margin_gtk_right);
3398 set_double (&watch_printsetup_margin_gtk_right, x);
3402 * gnm_conf_get_printsetup_margin_gtk_right_node:
3404 * Returns: (transfer none): A #GOConfNode
3406 GOConfNode *
3407 gnm_conf_get_printsetup_margin_gtk_right_node (void)
3409 return get_watch_node (&watch_printsetup_margin_gtk_right);
3412 static struct cb_watch_double watch_printsetup_margin_gtk_top = {
3413 0, "printsetup/margin-gtk-top",
3414 "Default Top Outside Margin",
3415 "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.",
3416 0, 720, 72,
3419 double
3420 gnm_conf_get_printsetup_margin_gtk_top (void)
3422 if (!watch_printsetup_margin_gtk_top.handler)
3423 watch_double (&watch_printsetup_margin_gtk_top);
3424 return watch_printsetup_margin_gtk_top.var;
3427 void
3428 gnm_conf_set_printsetup_margin_gtk_top (double x)
3430 if (!watch_printsetup_margin_gtk_top.handler)
3431 watch_double (&watch_printsetup_margin_gtk_top);
3432 set_double (&watch_printsetup_margin_gtk_top, x);
3436 * gnm_conf_get_printsetup_margin_gtk_top_node:
3438 * Returns: (transfer none): A #GOConfNode
3440 GOConfNode *
3441 gnm_conf_get_printsetup_margin_gtk_top_node (void)
3443 return get_watch_node (&watch_printsetup_margin_gtk_top);
3446 static struct cb_watch_double watch_printsetup_margin_top = {
3447 0, "printsetup/margin-top",
3448 "Default Top Margin",
3449 "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.",
3450 0, 10000, 120,
3453 double
3454 gnm_conf_get_printsetup_margin_top (void)
3456 if (!watch_printsetup_margin_top.handler)
3457 watch_double (&watch_printsetup_margin_top);
3458 return watch_printsetup_margin_top.var;
3461 void
3462 gnm_conf_set_printsetup_margin_top (double x)
3464 if (!watch_printsetup_margin_top.handler)
3465 watch_double (&watch_printsetup_margin_top);
3466 set_double (&watch_printsetup_margin_top, x);
3470 * gnm_conf_get_printsetup_margin_top_node:
3472 * Returns: (transfer none): A #GOConfNode
3474 GOConfNode *
3475 gnm_conf_get_printsetup_margin_top_node (void)
3477 return get_watch_node (&watch_printsetup_margin_top);
3480 static struct cb_watch_string watch_printsetup_paper = {
3481 0, "printsetup/paper",
3482 "Paper",
3483 "This is the default paper specification. Please use the Print Setup dialog to edit this value.",
3487 const char *
3488 gnm_conf_get_printsetup_paper (void)
3490 if (!watch_printsetup_paper.handler)
3491 watch_string (&watch_printsetup_paper);
3492 return watch_printsetup_paper.var;
3495 void
3496 gnm_conf_set_printsetup_paper (const char *x)
3498 g_return_if_fail (x != NULL);
3499 if (!watch_printsetup_paper.handler)
3500 watch_string (&watch_printsetup_paper);
3501 set_string (&watch_printsetup_paper, x);
3505 * gnm_conf_get_printsetup_paper_node:
3507 * Returns: (transfer none): A #GOConfNode
3509 GOConfNode *
3510 gnm_conf_get_printsetup_paper_node (void)
3512 return get_watch_node (&watch_printsetup_paper);
3515 static struct cb_watch_int watch_printsetup_paper_orientation = {
3516 0, "printsetup/paper-orientation",
3517 "Paper orientation",
3518 "This is the default paper orientation. Please use the Print Setup dialog to edit this value.",
3519 GTK_PAGE_ORIENTATION_PORTRAIT, GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE, 0,
3523 gnm_conf_get_printsetup_paper_orientation (void)
3525 if (!watch_printsetup_paper_orientation.handler)
3526 watch_int (&watch_printsetup_paper_orientation);
3527 return watch_printsetup_paper_orientation.var;
3530 void
3531 gnm_conf_set_printsetup_paper_orientation (int x)
3533 if (!watch_printsetup_paper_orientation.handler)
3534 watch_int (&watch_printsetup_paper_orientation);
3535 set_int (&watch_printsetup_paper_orientation, x);
3539 * gnm_conf_get_printsetup_paper_orientation_node:
3541 * Returns: (transfer none): A #GOConfNode
3543 GOConfNode *
3544 gnm_conf_get_printsetup_paper_orientation_node (void)
3546 return get_watch_node (&watch_printsetup_paper_orientation);
3549 static struct cb_watch_enum watch_printsetup_preferred_unit = {
3550 0, "printsetup/preferred-unit",
3551 "Preferred Display Unit",
3552 "This string gives the default unit to be used in the page setup dialog.",
3553 GTK_UNIT_MM,
3556 GtkUnit
3557 gnm_conf_get_printsetup_preferred_unit (void)
3559 if (!watch_printsetup_preferred_unit.handler)
3560 watch_enum (&watch_printsetup_preferred_unit, GTK_TYPE_UNIT);
3561 return watch_printsetup_preferred_unit.var;
3564 void
3565 gnm_conf_set_printsetup_preferred_unit (GtkUnit x)
3567 if (!watch_printsetup_preferred_unit.handler)
3568 watch_enum (&watch_printsetup_preferred_unit, GTK_TYPE_UNIT);
3569 set_enum (&watch_printsetup_preferred_unit, x);
3573 * gnm_conf_get_printsetup_preferred_unit_node:
3575 * Returns: (transfer none): A #GOConfNode
3577 GOConfNode *
3578 gnm_conf_get_printsetup_preferred_unit_node (void)
3580 return get_watch_node (&watch_printsetup_preferred_unit);
3583 static struct cb_watch_bool watch_printsetup_print_black_n_white = {
3584 0, "printsetup/print-black-n-white",
3585 "Default Black and White Printing",
3586 "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.",
3587 FALSE,
3590 gboolean
3591 gnm_conf_get_printsetup_print_black_n_white (void)
3593 if (!watch_printsetup_print_black_n_white.handler)
3594 watch_bool (&watch_printsetup_print_black_n_white);
3595 return watch_printsetup_print_black_n_white.var;
3598 void
3599 gnm_conf_set_printsetup_print_black_n_white (gboolean x)
3601 if (!watch_printsetup_print_black_n_white.handler)
3602 watch_bool (&watch_printsetup_print_black_n_white);
3603 set_bool (&watch_printsetup_print_black_n_white, x);
3607 * gnm_conf_get_printsetup_print_black_n_white_node:
3609 * Returns: (transfer none): A #GOConfNode
3611 GOConfNode *
3612 gnm_conf_get_printsetup_print_black_n_white_node (void)
3614 return get_watch_node (&watch_printsetup_print_black_n_white);
3617 static struct cb_watch_bool watch_printsetup_print_even_if_only_styles = {
3618 0, "printsetup/print-even-if-only-styles",
3619 "Default Print Cells with Only Styles",
3620 "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.",
3621 FALSE,
3624 gboolean
3625 gnm_conf_get_printsetup_print_even_if_only_styles (void)
3627 if (!watch_printsetup_print_even_if_only_styles.handler)
3628 watch_bool (&watch_printsetup_print_even_if_only_styles);
3629 return watch_printsetup_print_even_if_only_styles.var;
3632 void
3633 gnm_conf_set_printsetup_print_even_if_only_styles (gboolean x)
3635 if (!watch_printsetup_print_even_if_only_styles.handler)
3636 watch_bool (&watch_printsetup_print_even_if_only_styles);
3637 set_bool (&watch_printsetup_print_even_if_only_styles, x);
3641 * gnm_conf_get_printsetup_print_even_if_only_styles_node:
3643 * Returns: (transfer none): A #GOConfNode
3645 GOConfNode *
3646 gnm_conf_get_printsetup_print_even_if_only_styles_node (void)
3648 return get_watch_node (&watch_printsetup_print_even_if_only_styles);
3651 static struct cb_watch_bool watch_printsetup_print_grid_lines = {
3652 0, "printsetup/print-grid-lines",
3653 "Default Grid Line Printing",
3654 "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.",
3655 FALSE,
3658 gboolean
3659 gnm_conf_get_printsetup_print_grid_lines (void)
3661 if (!watch_printsetup_print_grid_lines.handler)
3662 watch_bool (&watch_printsetup_print_grid_lines);
3663 return watch_printsetup_print_grid_lines.var;
3666 void
3667 gnm_conf_set_printsetup_print_grid_lines (gboolean x)
3669 if (!watch_printsetup_print_grid_lines.handler)
3670 watch_bool (&watch_printsetup_print_grid_lines);
3671 set_bool (&watch_printsetup_print_grid_lines, x);
3675 * gnm_conf_get_printsetup_print_grid_lines_node:
3677 * Returns: (transfer none): A #GOConfNode
3679 GOConfNode *
3680 gnm_conf_get_printsetup_print_grid_lines_node (void)
3682 return get_watch_node (&watch_printsetup_print_grid_lines);
3685 static struct cb_watch_bool watch_printsetup_print_titles = {
3686 0, "printsetup/print-titles",
3687 "Default Title Printing",
3688 "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.",
3689 FALSE,
3692 gboolean
3693 gnm_conf_get_printsetup_print_titles (void)
3695 if (!watch_printsetup_print_titles.handler)
3696 watch_bool (&watch_printsetup_print_titles);
3697 return watch_printsetup_print_titles.var;
3700 void
3701 gnm_conf_set_printsetup_print_titles (gboolean x)
3703 if (!watch_printsetup_print_titles.handler)
3704 watch_bool (&watch_printsetup_print_titles);
3705 set_bool (&watch_printsetup_print_titles, x);
3709 * gnm_conf_get_printsetup_print_titles_node:
3711 * Returns: (transfer none): A #GOConfNode
3713 GOConfNode *
3714 gnm_conf_get_printsetup_print_titles_node (void)
3716 return get_watch_node (&watch_printsetup_print_titles);
3719 static struct cb_watch_string watch_printsetup_repeat_left = {
3720 0, "printsetup/repeat-left",
3721 "Default Repeated Left Region",
3722 "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.",
3726 const char *
3727 gnm_conf_get_printsetup_repeat_left (void)
3729 if (!watch_printsetup_repeat_left.handler)
3730 watch_string (&watch_printsetup_repeat_left);
3731 return watch_printsetup_repeat_left.var;
3734 void
3735 gnm_conf_set_printsetup_repeat_left (const char *x)
3737 g_return_if_fail (x != NULL);
3738 if (!watch_printsetup_repeat_left.handler)
3739 watch_string (&watch_printsetup_repeat_left);
3740 set_string (&watch_printsetup_repeat_left, x);
3744 * gnm_conf_get_printsetup_repeat_left_node:
3746 * Returns: (transfer none): A #GOConfNode
3748 GOConfNode *
3749 gnm_conf_get_printsetup_repeat_left_node (void)
3751 return get_watch_node (&watch_printsetup_repeat_left);
3754 static struct cb_watch_string watch_printsetup_repeat_top = {
3755 0, "printsetup/repeat-top",
3756 "Default Repeated Top Region",
3757 "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.",
3761 const char *
3762 gnm_conf_get_printsetup_repeat_top (void)
3764 if (!watch_printsetup_repeat_top.handler)
3765 watch_string (&watch_printsetup_repeat_top);
3766 return watch_printsetup_repeat_top.var;
3769 void
3770 gnm_conf_set_printsetup_repeat_top (const char *x)
3772 g_return_if_fail (x != NULL);
3773 if (!watch_printsetup_repeat_top.handler)
3774 watch_string (&watch_printsetup_repeat_top);
3775 set_string (&watch_printsetup_repeat_top, x);
3779 * gnm_conf_get_printsetup_repeat_top_node:
3781 * Returns: (transfer none): A #GOConfNode
3783 GOConfNode *
3784 gnm_conf_get_printsetup_repeat_top_node (void)
3786 return get_watch_node (&watch_printsetup_repeat_top);
3789 static struct cb_watch_int watch_printsetup_scale_height = {
3790 0, "printsetup/scale-height",
3791 "Default Scaling Height",
3792 "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.",
3793 0, 100, 0,
3797 gnm_conf_get_printsetup_scale_height (void)
3799 if (!watch_printsetup_scale_height.handler)
3800 watch_int (&watch_printsetup_scale_height);
3801 return watch_printsetup_scale_height.var;
3804 void
3805 gnm_conf_set_printsetup_scale_height (int x)
3807 if (!watch_printsetup_scale_height.handler)
3808 watch_int (&watch_printsetup_scale_height);
3809 set_int (&watch_printsetup_scale_height, x);
3813 * gnm_conf_get_printsetup_scale_height_node:
3815 * Returns: (transfer none): A #GOConfNode
3817 GOConfNode *
3818 gnm_conf_get_printsetup_scale_height_node (void)
3820 return get_watch_node (&watch_printsetup_scale_height);
3823 static struct cb_watch_bool watch_printsetup_scale_percentage = {
3824 0, "printsetup/scale-percentage",
3825 "Default Scale Type",
3826 "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.",
3827 TRUE,
3830 gboolean
3831 gnm_conf_get_printsetup_scale_percentage (void)
3833 if (!watch_printsetup_scale_percentage.handler)
3834 watch_bool (&watch_printsetup_scale_percentage);
3835 return watch_printsetup_scale_percentage.var;
3838 void
3839 gnm_conf_set_printsetup_scale_percentage (gboolean x)
3841 if (!watch_printsetup_scale_percentage.handler)
3842 watch_bool (&watch_printsetup_scale_percentage);
3843 set_bool (&watch_printsetup_scale_percentage, x);
3847 * gnm_conf_get_printsetup_scale_percentage_node:
3849 * Returns: (transfer none): A #GOConfNode
3851 GOConfNode *
3852 gnm_conf_get_printsetup_scale_percentage_node (void)
3854 return get_watch_node (&watch_printsetup_scale_percentage);
3857 static struct cb_watch_double watch_printsetup_scale_percentage_value = {
3858 0, "printsetup/scale-percentage-value",
3859 "Default Scale Percentage",
3860 "This value gives the percentage by which to scale each printed page. Please use the Print Setup dialog to edit this value.",
3861 1, 500, 100,
3864 double
3865 gnm_conf_get_printsetup_scale_percentage_value (void)
3867 if (!watch_printsetup_scale_percentage_value.handler)
3868 watch_double (&watch_printsetup_scale_percentage_value);
3869 return watch_printsetup_scale_percentage_value.var;
3872 void
3873 gnm_conf_set_printsetup_scale_percentage_value (double x)
3875 if (!watch_printsetup_scale_percentage_value.handler)
3876 watch_double (&watch_printsetup_scale_percentage_value);
3877 set_double (&watch_printsetup_scale_percentage_value, x);
3881 * gnm_conf_get_printsetup_scale_percentage_value_node:
3883 * Returns: (transfer none): A #GOConfNode
3885 GOConfNode *
3886 gnm_conf_get_printsetup_scale_percentage_value_node (void)
3888 return get_watch_node (&watch_printsetup_scale_percentage_value);
3891 static struct cb_watch_int watch_printsetup_scale_width = {
3892 0, "printsetup/scale-width",
3893 "Default Scaling Width",
3894 "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.",
3895 0, 100, 0,
3899 gnm_conf_get_printsetup_scale_width (void)
3901 if (!watch_printsetup_scale_width.handler)
3902 watch_int (&watch_printsetup_scale_width);
3903 return watch_printsetup_scale_width.var;
3906 void
3907 gnm_conf_set_printsetup_scale_width (int x)
3909 if (!watch_printsetup_scale_width.handler)
3910 watch_int (&watch_printsetup_scale_width);
3911 set_int (&watch_printsetup_scale_width, x);
3915 * gnm_conf_get_printsetup_scale_width_node:
3917 * Returns: (transfer none): A #GOConfNode
3919 GOConfNode *
3920 gnm_conf_get_printsetup_scale_width_node (void)
3922 return get_watch_node (&watch_printsetup_scale_width);
3925 static struct cb_watch_bool watch_searchreplace_change_cell_expressions = {
3926 0, "searchreplace/change-cell-expressions",
3927 "Search & Replace Changes Expressions",
3928 "Search & Replace changes cells containing expressions as default",
3929 TRUE,
3932 gboolean
3933 gnm_conf_get_searchreplace_change_cell_expressions (void)
3935 if (!watch_searchreplace_change_cell_expressions.handler)
3936 watch_bool (&watch_searchreplace_change_cell_expressions);
3937 return watch_searchreplace_change_cell_expressions.var;
3940 void
3941 gnm_conf_set_searchreplace_change_cell_expressions (gboolean x)
3943 if (!watch_searchreplace_change_cell_expressions.handler)
3944 watch_bool (&watch_searchreplace_change_cell_expressions);
3945 set_bool (&watch_searchreplace_change_cell_expressions, x);
3949 * gnm_conf_get_searchreplace_change_cell_expressions_node:
3951 * Returns: (transfer none): A #GOConfNode
3953 GOConfNode *
3954 gnm_conf_get_searchreplace_change_cell_expressions_node (void)
3956 return get_watch_node (&watch_searchreplace_change_cell_expressions);
3959 static struct cb_watch_bool watch_searchreplace_change_cell_other = {
3960 0, "searchreplace/change-cell-other",
3961 "Search & Replace Changes Other Values",
3962 "Search & Replace changes cells containing other values as default",
3963 TRUE,
3966 gboolean
3967 gnm_conf_get_searchreplace_change_cell_other (void)
3969 if (!watch_searchreplace_change_cell_other.handler)
3970 watch_bool (&watch_searchreplace_change_cell_other);
3971 return watch_searchreplace_change_cell_other.var;
3974 void
3975 gnm_conf_set_searchreplace_change_cell_other (gboolean x)
3977 if (!watch_searchreplace_change_cell_other.handler)
3978 watch_bool (&watch_searchreplace_change_cell_other);
3979 set_bool (&watch_searchreplace_change_cell_other, x);
3983 * gnm_conf_get_searchreplace_change_cell_other_node:
3985 * Returns: (transfer none): A #GOConfNode
3987 GOConfNode *
3988 gnm_conf_get_searchreplace_change_cell_other_node (void)
3990 return get_watch_node (&watch_searchreplace_change_cell_other);
3993 static struct cb_watch_bool watch_searchreplace_change_cell_strings = {
3994 0, "searchreplace/change-cell-strings",
3995 "Search & Replace Changes Strings",
3996 "Search & Replace changes cells containing strings as default",
3997 TRUE,
4000 gboolean
4001 gnm_conf_get_searchreplace_change_cell_strings (void)
4003 if (!watch_searchreplace_change_cell_strings.handler)
4004 watch_bool (&watch_searchreplace_change_cell_strings);
4005 return watch_searchreplace_change_cell_strings.var;
4008 void
4009 gnm_conf_set_searchreplace_change_cell_strings (gboolean x)
4011 if (!watch_searchreplace_change_cell_strings.handler)
4012 watch_bool (&watch_searchreplace_change_cell_strings);
4013 set_bool (&watch_searchreplace_change_cell_strings, x);
4017 * gnm_conf_get_searchreplace_change_cell_strings_node:
4019 * Returns: (transfer none): A #GOConfNode
4021 GOConfNode *
4022 gnm_conf_get_searchreplace_change_cell_strings_node (void)
4024 return get_watch_node (&watch_searchreplace_change_cell_strings);
4027 static struct cb_watch_bool watch_searchreplace_change_comments = {
4028 0, "searchreplace/change-comments",
4029 "Search & Replace Changes Comments",
4030 "Search & Replace changes comments as default",
4031 FALSE,
4034 gboolean
4035 gnm_conf_get_searchreplace_change_comments (void)
4037 if (!watch_searchreplace_change_comments.handler)
4038 watch_bool (&watch_searchreplace_change_comments);
4039 return watch_searchreplace_change_comments.var;
4042 void
4043 gnm_conf_set_searchreplace_change_comments (gboolean x)
4045 if (!watch_searchreplace_change_comments.handler)
4046 watch_bool (&watch_searchreplace_change_comments);
4047 set_bool (&watch_searchreplace_change_comments, x);
4051 * gnm_conf_get_searchreplace_change_comments_node:
4053 * Returns: (transfer none): A #GOConfNode
4055 GOConfNode *
4056 gnm_conf_get_searchreplace_change_comments_node (void)
4058 return get_watch_node (&watch_searchreplace_change_comments);
4061 static struct cb_watch_bool watch_searchreplace_columnmajor = {
4062 0, "searchreplace/columnmajor",
4063 "Search & Replace Column Major",
4064 "Search & Replace proceeds in column major order as default",
4065 TRUE,
4068 gboolean
4069 gnm_conf_get_searchreplace_columnmajor (void)
4071 if (!watch_searchreplace_columnmajor.handler)
4072 watch_bool (&watch_searchreplace_columnmajor);
4073 return watch_searchreplace_columnmajor.var;
4076 void
4077 gnm_conf_set_searchreplace_columnmajor (gboolean x)
4079 if (!watch_searchreplace_columnmajor.handler)
4080 watch_bool (&watch_searchreplace_columnmajor);
4081 set_bool (&watch_searchreplace_columnmajor, x);
4085 * gnm_conf_get_searchreplace_columnmajor_node:
4087 * Returns: (transfer none): A #GOConfNode
4089 GOConfNode *
4090 gnm_conf_get_searchreplace_columnmajor_node (void)
4092 return get_watch_node (&watch_searchreplace_columnmajor);
4095 static struct cb_watch_int watch_searchreplace_error_behaviour = {
4096 0, "searchreplace/error-behaviour",
4097 "Search & Replace Error Behavior",
4098 "This is the default error behavior of Search & Replace indicated by an integer from 0 to 4.",
4099 0, 4, 0,
4103 gnm_conf_get_searchreplace_error_behaviour (void)
4105 if (!watch_searchreplace_error_behaviour.handler)
4106 watch_int (&watch_searchreplace_error_behaviour);
4107 return watch_searchreplace_error_behaviour.var;
4110 void
4111 gnm_conf_set_searchreplace_error_behaviour (int x)
4113 if (!watch_searchreplace_error_behaviour.handler)
4114 watch_int (&watch_searchreplace_error_behaviour);
4115 set_int (&watch_searchreplace_error_behaviour, x);
4119 * gnm_conf_get_searchreplace_error_behaviour_node:
4121 * Returns: (transfer none): A #GOConfNode
4123 GOConfNode *
4124 gnm_conf_get_searchreplace_error_behaviour_node (void)
4126 return get_watch_node (&watch_searchreplace_error_behaviour);
4129 static struct cb_watch_bool watch_searchreplace_ignore_case = {
4130 0, "searchreplace/ignore-case",
4131 "Search & Replace Ignores Case",
4132 "Search & Replace ignores case as default",
4133 TRUE,
4136 gboolean
4137 gnm_conf_get_searchreplace_ignore_case (void)
4139 if (!watch_searchreplace_ignore_case.handler)
4140 watch_bool (&watch_searchreplace_ignore_case);
4141 return watch_searchreplace_ignore_case.var;
4144 void
4145 gnm_conf_set_searchreplace_ignore_case (gboolean x)
4147 if (!watch_searchreplace_ignore_case.handler)
4148 watch_bool (&watch_searchreplace_ignore_case);
4149 set_bool (&watch_searchreplace_ignore_case, x);
4153 * gnm_conf_get_searchreplace_ignore_case_node:
4155 * Returns: (transfer none): A #GOConfNode
4157 GOConfNode *
4158 gnm_conf_get_searchreplace_ignore_case_node (void)
4160 return get_watch_node (&watch_searchreplace_ignore_case);
4163 static struct cb_watch_bool watch_searchreplace_keep_strings = {
4164 0, "searchreplace/keep-strings",
4165 "Search & Replace Keeps Strings as Strings",
4166 "Search & Replace keeps strings as strings even if they look like numbers as default",
4167 TRUE,
4170 gboolean
4171 gnm_conf_get_searchreplace_keep_strings (void)
4173 if (!watch_searchreplace_keep_strings.handler)
4174 watch_bool (&watch_searchreplace_keep_strings);
4175 return watch_searchreplace_keep_strings.var;
4178 void
4179 gnm_conf_set_searchreplace_keep_strings (gboolean x)
4181 if (!watch_searchreplace_keep_strings.handler)
4182 watch_bool (&watch_searchreplace_keep_strings);
4183 set_bool (&watch_searchreplace_keep_strings, x);
4187 * gnm_conf_get_searchreplace_keep_strings_node:
4189 * Returns: (transfer none): A #GOConfNode
4191 GOConfNode *
4192 gnm_conf_get_searchreplace_keep_strings_node (void)
4194 return get_watch_node (&watch_searchreplace_keep_strings);
4197 static struct cb_watch_bool watch_searchreplace_preserve_case = {
4198 0, "searchreplace/preserve-case",
4199 "Search & Replace Preserves Case",
4200 "Search & Replace preserves case as default",
4201 FALSE,
4204 gboolean
4205 gnm_conf_get_searchreplace_preserve_case (void)
4207 if (!watch_searchreplace_preserve_case.handler)
4208 watch_bool (&watch_searchreplace_preserve_case);
4209 return watch_searchreplace_preserve_case.var;
4212 void
4213 gnm_conf_set_searchreplace_preserve_case (gboolean x)
4215 if (!watch_searchreplace_preserve_case.handler)
4216 watch_bool (&watch_searchreplace_preserve_case);
4217 set_bool (&watch_searchreplace_preserve_case, x);
4221 * gnm_conf_get_searchreplace_preserve_case_node:
4223 * Returns: (transfer none): A #GOConfNode
4225 GOConfNode *
4226 gnm_conf_get_searchreplace_preserve_case_node (void)
4228 return get_watch_node (&watch_searchreplace_preserve_case);
4231 static struct cb_watch_bool watch_searchreplace_query = {
4232 0, "searchreplace/query",
4233 "Search & Replace Poses Query",
4234 "Search & Replace poses query before each change as default",
4235 FALSE,
4238 gboolean
4239 gnm_conf_get_searchreplace_query (void)
4241 if (!watch_searchreplace_query.handler)
4242 watch_bool (&watch_searchreplace_query);
4243 return watch_searchreplace_query.var;
4246 void
4247 gnm_conf_set_searchreplace_query (gboolean x)
4249 if (!watch_searchreplace_query.handler)
4250 watch_bool (&watch_searchreplace_query);
4251 set_bool (&watch_searchreplace_query, x);
4255 * gnm_conf_get_searchreplace_query_node:
4257 * Returns: (transfer none): A #GOConfNode
4259 GOConfNode *
4260 gnm_conf_get_searchreplace_query_node (void)
4262 return get_watch_node (&watch_searchreplace_query);
4265 static struct cb_watch_int watch_searchreplace_regex = {
4266 0, "searchreplace/regex",
4267 "Search & Replace Search Type",
4268 "This value determines the input type for Search & Replace. 0: text; 1: regular expression; 2: number",
4269 0, 2, 0,
4273 gnm_conf_get_searchreplace_regex (void)
4275 if (!watch_searchreplace_regex.handler)
4276 watch_int (&watch_searchreplace_regex);
4277 return watch_searchreplace_regex.var;
4280 void
4281 gnm_conf_set_searchreplace_regex (int x)
4283 if (!watch_searchreplace_regex.handler)
4284 watch_int (&watch_searchreplace_regex);
4285 set_int (&watch_searchreplace_regex, x);
4289 * gnm_conf_get_searchreplace_regex_node:
4291 * Returns: (transfer none): A #GOConfNode
4293 GOConfNode *
4294 gnm_conf_get_searchreplace_regex_node (void)
4296 return get_watch_node (&watch_searchreplace_regex);
4299 static struct cb_watch_int watch_searchreplace_scope = {
4300 0, "searchreplace/scope",
4301 "Search & Replace Scope",
4302 "This is the default scope of Search & Replace. 0: entire workbook; 1: current sheet; 2: range",
4303 0, 2, 0,
4307 gnm_conf_get_searchreplace_scope (void)
4309 if (!watch_searchreplace_scope.handler)
4310 watch_int (&watch_searchreplace_scope);
4311 return watch_searchreplace_scope.var;
4314 void
4315 gnm_conf_set_searchreplace_scope (int x)
4317 if (!watch_searchreplace_scope.handler)
4318 watch_int (&watch_searchreplace_scope);
4319 set_int (&watch_searchreplace_scope, x);
4323 * gnm_conf_get_searchreplace_scope_node:
4325 * Returns: (transfer none): A #GOConfNode
4327 GOConfNode *
4328 gnm_conf_get_searchreplace_scope_node (void)
4330 return get_watch_node (&watch_searchreplace_scope);
4333 static struct cb_watch_bool watch_searchreplace_search_results = {
4334 0, "searchreplace/search-results",
4335 "Search searches in results",
4336 "Search searches in results as default",
4337 TRUE,
4340 gboolean
4341 gnm_conf_get_searchreplace_search_results (void)
4343 if (!watch_searchreplace_search_results.handler)
4344 watch_bool (&watch_searchreplace_search_results);
4345 return watch_searchreplace_search_results.var;
4348 void
4349 gnm_conf_set_searchreplace_search_results (gboolean x)
4351 if (!watch_searchreplace_search_results.handler)
4352 watch_bool (&watch_searchreplace_search_results);
4353 set_bool (&watch_searchreplace_search_results, x);
4357 * gnm_conf_get_searchreplace_search_results_node:
4359 * Returns: (transfer none): A #GOConfNode
4361 GOConfNode *
4362 gnm_conf_get_searchreplace_search_results_node (void)
4364 return get_watch_node (&watch_searchreplace_search_results);
4367 static struct cb_watch_bool watch_searchreplace_whole_words_only = {
4368 0, "searchreplace/whole-words-only",
4369 "Search & Replace Whole Words Only",
4370 "Search & Replace replaces whole words only as default",
4371 FALSE,
4374 gboolean
4375 gnm_conf_get_searchreplace_whole_words_only (void)
4377 if (!watch_searchreplace_whole_words_only.handler)
4378 watch_bool (&watch_searchreplace_whole_words_only);
4379 return watch_searchreplace_whole_words_only.var;
4382 void
4383 gnm_conf_set_searchreplace_whole_words_only (gboolean x)
4385 if (!watch_searchreplace_whole_words_only.handler)
4386 watch_bool (&watch_searchreplace_whole_words_only);
4387 set_bool (&watch_searchreplace_whole_words_only, x);
4391 * gnm_conf_get_searchreplace_whole_words_only_node:
4393 * Returns: (transfer none): A #GOConfNode
4395 GOConfNode *
4396 gnm_conf_get_searchreplace_whole_words_only_node (void)
4398 return get_watch_node (&watch_searchreplace_whole_words_only);
4401 static struct cb_watch_string watch_stf_export_encoding = {
4402 0, "stf/export/encoding",
4403 "Text Export Encoding",
4404 "Please use the Text Export dialog to edit this value.",
4408 const char *
4409 gnm_conf_get_stf_export_encoding (void)
4411 if (!watch_stf_export_encoding.handler)
4412 watch_string (&watch_stf_export_encoding);
4413 return watch_stf_export_encoding.var;
4416 void
4417 gnm_conf_set_stf_export_encoding (const char *x)
4419 g_return_if_fail (x != NULL);
4420 if (!watch_stf_export_encoding.handler)
4421 watch_string (&watch_stf_export_encoding);
4422 set_string (&watch_stf_export_encoding, x);
4426 * gnm_conf_get_stf_export_encoding_node:
4428 * Returns: (transfer none): A #GOConfNode
4430 GOConfNode *
4431 gnm_conf_get_stf_export_encoding_node (void)
4433 return get_watch_node (&watch_stf_export_encoding);
4436 static struct cb_watch_enum watch_stf_export_format = {
4437 0, "stf/export/format",
4438 "Text Export Formatting Rule",
4439 "Please use the Text Export dialog to edit this value.",
4440 GNM_STF_FORMAT_AUTO,
4443 GnmStfFormatMode
4444 gnm_conf_get_stf_export_format (void)
4446 if (!watch_stf_export_format.handler)
4447 watch_enum (&watch_stf_export_format, GNM_STF_FORMAT_MODE_TYPE);
4448 return watch_stf_export_format.var;
4451 void
4452 gnm_conf_set_stf_export_format (GnmStfFormatMode x)
4454 if (!watch_stf_export_format.handler)
4455 watch_enum (&watch_stf_export_format, GNM_STF_FORMAT_MODE_TYPE);
4456 set_enum (&watch_stf_export_format, x);
4460 * gnm_conf_get_stf_export_format_node:
4462 * Returns: (transfer none): A #GOConfNode
4464 GOConfNode *
4465 gnm_conf_get_stf_export_format_node (void)
4467 return get_watch_node (&watch_stf_export_format);
4470 static struct cb_watch_string watch_stf_export_locale = {
4471 0, "stf/export/locale",
4472 "Text Export Locale",
4473 "Please use the Text Export dialog to edit this value.",
4477 const char *
4478 gnm_conf_get_stf_export_locale (void)
4480 if (!watch_stf_export_locale.handler)
4481 watch_string (&watch_stf_export_locale);
4482 return watch_stf_export_locale.var;
4485 void
4486 gnm_conf_set_stf_export_locale (const char *x)
4488 g_return_if_fail (x != NULL);
4489 if (!watch_stf_export_locale.handler)
4490 watch_string (&watch_stf_export_locale);
4491 set_string (&watch_stf_export_locale, x);
4495 * gnm_conf_get_stf_export_locale_node:
4497 * Returns: (transfer none): A #GOConfNode
4499 GOConfNode *
4500 gnm_conf_get_stf_export_locale_node (void)
4502 return get_watch_node (&watch_stf_export_locale);
4505 static struct cb_watch_enum watch_stf_export_quoting = {
4506 0, "stf/export/quoting",
4507 "Text Export String Quoting Rule",
4508 "Please use the Text Export dialog to edit this value.",
4509 GSF_OUTPUT_CSV_QUOTING_MODE_AUTO,
4512 GsfOutputCsvQuotingMode
4513 gnm_conf_get_stf_export_quoting (void)
4515 if (!watch_stf_export_quoting.handler)
4516 watch_enum (&watch_stf_export_quoting, GSF_OUTPUT_CSV_QUOTING_MODE_TYPE);
4517 return watch_stf_export_quoting.var;
4520 void
4521 gnm_conf_set_stf_export_quoting (GsfOutputCsvQuotingMode x)
4523 if (!watch_stf_export_quoting.handler)
4524 watch_enum (&watch_stf_export_quoting, GSF_OUTPUT_CSV_QUOTING_MODE_TYPE);
4525 set_enum (&watch_stf_export_quoting, x);
4529 * gnm_conf_get_stf_export_quoting_node:
4531 * Returns: (transfer none): A #GOConfNode
4533 GOConfNode *
4534 gnm_conf_get_stf_export_quoting_node (void)
4536 return get_watch_node (&watch_stf_export_quoting);
4539 static struct cb_watch_string watch_stf_export_separator = {
4540 0, "stf/export/separator",
4541 "Text Export Field Separator",
4542 "Please use the Text Export dialog to edit this value.",
4543 ",",
4546 const char *
4547 gnm_conf_get_stf_export_separator (void)
4549 if (!watch_stf_export_separator.handler)
4550 watch_string (&watch_stf_export_separator);
4551 return watch_stf_export_separator.var;
4554 void
4555 gnm_conf_set_stf_export_separator (const char *x)
4557 g_return_if_fail (x != NULL);
4558 if (!watch_stf_export_separator.handler)
4559 watch_string (&watch_stf_export_separator);
4560 set_string (&watch_stf_export_separator, x);
4564 * gnm_conf_get_stf_export_separator_node:
4566 * Returns: (transfer none): A #GOConfNode
4568 GOConfNode *
4569 gnm_conf_get_stf_export_separator_node (void)
4571 return get_watch_node (&watch_stf_export_separator);
4574 static struct cb_watch_string watch_stf_export_stringindicator = {
4575 0, "stf/export/stringindicator",
4576 "Text Export String Indicator",
4577 "Please use the Text Export dialog to edit this value.",
4578 "\"",
4581 const char *
4582 gnm_conf_get_stf_export_stringindicator (void)
4584 if (!watch_stf_export_stringindicator.handler)
4585 watch_string (&watch_stf_export_stringindicator);
4586 return watch_stf_export_stringindicator.var;
4589 void
4590 gnm_conf_set_stf_export_stringindicator (const char *x)
4592 g_return_if_fail (x != NULL);
4593 if (!watch_stf_export_stringindicator.handler)
4594 watch_string (&watch_stf_export_stringindicator);
4595 set_string (&watch_stf_export_stringindicator, x);
4599 * gnm_conf_get_stf_export_stringindicator_node:
4601 * Returns: (transfer none): A #GOConfNode
4603 GOConfNode *
4604 gnm_conf_get_stf_export_stringindicator_node (void)
4606 return get_watch_node (&watch_stf_export_stringindicator);
4609 static struct cb_watch_string watch_stf_export_terminator = {
4610 0, "stf/export/terminator",
4611 "Text Export Record Terminator",
4612 "Please use the Text Export dialog to edit this value.",
4613 "\n",
4616 const char *
4617 gnm_conf_get_stf_export_terminator (void)
4619 if (!watch_stf_export_terminator.handler)
4620 watch_string (&watch_stf_export_terminator);
4621 return watch_stf_export_terminator.var;
4624 void
4625 gnm_conf_set_stf_export_terminator (const char *x)
4627 g_return_if_fail (x != NULL);
4628 if (!watch_stf_export_terminator.handler)
4629 watch_string (&watch_stf_export_terminator);
4630 set_string (&watch_stf_export_terminator, x);
4634 * gnm_conf_get_stf_export_terminator_node:
4636 * Returns: (transfer none): A #GOConfNode
4638 GOConfNode *
4639 gnm_conf_get_stf_export_terminator_node (void)
4641 return get_watch_node (&watch_stf_export_terminator);
4644 static struct cb_watch_bool watch_stf_export_transliteration = {
4645 0, "stf/export/transliteration",
4646 "Text Export Unknown Character Transliteration",
4647 "Please use the Text Export dialog to edit this value.",
4648 TRUE,
4651 gboolean
4652 gnm_conf_get_stf_export_transliteration (void)
4654 if (!watch_stf_export_transliteration.handler)
4655 watch_bool (&watch_stf_export_transliteration);
4656 return watch_stf_export_transliteration.var;
4659 void
4660 gnm_conf_set_stf_export_transliteration (gboolean x)
4662 if (!watch_stf_export_transliteration.handler)
4663 watch_bool (&watch_stf_export_transliteration);
4664 set_bool (&watch_stf_export_transliteration, x);
4668 * gnm_conf_get_stf_export_transliteration_node:
4670 * Returns: (transfer none): A #GOConfNode
4672 GOConfNode *
4673 gnm_conf_get_stf_export_transliteration_node (void)
4675 return get_watch_node (&watch_stf_export_transliteration);
4678 static struct cb_watch_enum watch_toolbar_style = {
4679 0, "toolbar-style",
4680 "Toolbar Style",
4681 "Toolbar Style. Valid values are both, both_horiz, icon, and text.",
4682 GTK_TOOLBAR_ICONS,
4685 GtkToolbarStyle
4686 gnm_conf_get_toolbar_style (void)
4688 if (!watch_toolbar_style.handler)
4689 watch_enum (&watch_toolbar_style, GTK_TYPE_TOOLBAR_STYLE);
4690 return watch_toolbar_style.var;
4693 void
4694 gnm_conf_set_toolbar_style (GtkToolbarStyle x)
4696 if (!watch_toolbar_style.handler)
4697 watch_enum (&watch_toolbar_style, GTK_TYPE_TOOLBAR_STYLE);
4698 set_enum (&watch_toolbar_style, x);
4701 static struct cb_watch_int watch_undo_max_descriptor_width = {
4702 0, "undo/max-descriptor-width",
4703 "Length of the Undo Descriptors",
4704 "This value is indicative of the maximum length of the command descriptors in the undo and redo chains.",
4705 5, 256, 40,
4709 gnm_conf_get_undo_max_descriptor_width (void)
4711 if (!watch_undo_max_descriptor_width.handler)
4712 watch_int (&watch_undo_max_descriptor_width);
4713 return watch_undo_max_descriptor_width.var;
4716 void
4717 gnm_conf_set_undo_max_descriptor_width (int x)
4719 if (!watch_undo_max_descriptor_width.handler)
4720 watch_int (&watch_undo_max_descriptor_width);
4721 set_int (&watch_undo_max_descriptor_width, x);
4725 * gnm_conf_get_undo_max_descriptor_width_node:
4727 * Returns: (transfer none): A #GOConfNode
4729 GOConfNode *
4730 gnm_conf_get_undo_max_descriptor_width_node (void)
4732 return get_watch_node (&watch_undo_max_descriptor_width);
4735 static struct cb_watch_int watch_undo_maxnum = {
4736 0, "undo/maxnum",
4737 "Number of Undo Items",
4738 "This value determines the maximum number of items in the undo/redo list.",
4739 0, 10000, 20,
4743 gnm_conf_get_undo_maxnum (void)
4745 if (!watch_undo_maxnum.handler)
4746 watch_int (&watch_undo_maxnum);
4747 return watch_undo_maxnum.var;
4750 void
4751 gnm_conf_set_undo_maxnum (int x)
4753 if (!watch_undo_maxnum.handler)
4754 watch_int (&watch_undo_maxnum);
4755 set_int (&watch_undo_maxnum, x);
4759 * gnm_conf_get_undo_maxnum_node:
4761 * Returns: (transfer none): A #GOConfNode
4763 GOConfNode *
4764 gnm_conf_get_undo_maxnum_node (void)
4766 return get_watch_node (&watch_undo_maxnum);
4769 static struct cb_watch_bool watch_undo_show_sheet_name = {
4770 0, "undo/show-sheet-name",
4771 "Show Sheet Name in Undo List",
4772 "This value determines whether to show the sheet names in the undo and redo lists.",
4773 FALSE,
4776 gboolean
4777 gnm_conf_get_undo_show_sheet_name (void)
4779 if (!watch_undo_show_sheet_name.handler)
4780 watch_bool (&watch_undo_show_sheet_name);
4781 return watch_undo_show_sheet_name.var;
4784 void
4785 gnm_conf_set_undo_show_sheet_name (gboolean x)
4787 if (!watch_undo_show_sheet_name.handler)
4788 watch_bool (&watch_undo_show_sheet_name);
4789 set_bool (&watch_undo_show_sheet_name, x);
4793 * gnm_conf_get_undo_show_sheet_name_node:
4795 * Returns: (transfer none): A #GOConfNode
4797 GOConfNode *
4798 gnm_conf_get_undo_show_sheet_name_node (void)
4800 return get_watch_node (&watch_undo_show_sheet_name);
4803 static struct cb_watch_int watch_undo_size = {
4804 0, "undo/size",
4805 "Maximal Undo Size",
4806 "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.",
4807 1, 1000000, 100,
4811 gnm_conf_get_undo_size (void)
4813 if (!watch_undo_size.handler)
4814 watch_int (&watch_undo_size);
4815 return watch_undo_size.var;
4818 void
4819 gnm_conf_set_undo_size (int x)
4821 if (!watch_undo_size.handler)
4822 watch_int (&watch_undo_size);
4823 set_int (&watch_undo_size, x);
4827 * gnm_conf_get_undo_size_node:
4829 * Returns: (transfer none): A #GOConfNode
4831 GOConfNode *
4832 gnm_conf_get_undo_size_node (void)
4834 return get_watch_node (&watch_undo_size);
4838 * gnm_conf_get_autocorrect_dir_node:
4840 * Returns: (transfer none): A #GOConfNode
4842 GOConfNode *
4843 gnm_conf_get_autocorrect_dir_node (void)
4845 return get_node ("autocorrect", NULL);
4849 * gnm_conf_get_autoformat_dir_node:
4851 * Returns: (transfer none): A #GOConfNode
4853 GOConfNode *
4854 gnm_conf_get_autoformat_dir_node (void)
4856 return get_node ("autoformat", NULL);
4860 * gnm_conf_get_core_defaultfont_dir_node:
4862 * Returns: (transfer none): A #GOConfNode
4864 GOConfNode *
4865 gnm_conf_get_core_defaultfont_dir_node (void)
4867 return get_node ("core/defaultfont", NULL);
4871 * gnm_conf_get_core_file_save_dir_node:
4873 * Returns: (transfer none): A #GOConfNode
4875 GOConfNode *
4876 gnm_conf_get_core_file_save_dir_node (void)
4878 return get_node ("core/file/save", NULL);
4882 * gnm_conf_get_core_gui_cells_dir_node:
4884 * Returns: (transfer none): A #GOConfNode
4886 GOConfNode *
4887 gnm_conf_get_core_gui_cells_dir_node (void)
4889 return get_node ("core/gui/cells", NULL);
4893 * gnm_conf_get_core_gui_editing_dir_node:
4895 * Returns: (transfer none): A #GOConfNode
4897 GOConfNode *
4898 gnm_conf_get_core_gui_editing_dir_node (void)
4900 return get_node ("core/gui/editing", NULL);
4904 * gnm_conf_get_core_gui_screen_dir_node:
4906 * Returns: (transfer none): A #GOConfNode
4908 GOConfNode *
4909 gnm_conf_get_core_gui_screen_dir_node (void)
4911 return get_node ("core/gui/screen", NULL);
4915 * gnm_conf_get_core_gui_toolbars_dir_node:
4917 * Returns: (transfer none): A #GOConfNode
4919 GOConfNode *
4920 gnm_conf_get_core_gui_toolbars_dir_node (void)
4922 return get_node ("core/gui/toolbars", NULL);
4926 * gnm_conf_get_core_gui_window_dir_node:
4928 * Returns: (transfer none): A #GOConfNode
4930 GOConfNode *
4931 gnm_conf_get_core_gui_window_dir_node (void)
4933 return get_node ("core/gui/window", NULL);
4937 * gnm_conf_get_core_sort_default_dir_node:
4939 * Returns: (transfer none): A #GOConfNode
4941 GOConfNode *
4942 gnm_conf_get_core_sort_default_dir_node (void)
4944 return get_node ("core/sort/default", NULL);
4948 * gnm_conf_get_core_sort_dialog_dir_node:
4950 * Returns: (transfer none): A #GOConfNode
4952 GOConfNode *
4953 gnm_conf_get_core_sort_dialog_dir_node (void)
4955 return get_node ("core/sort/dialog", NULL);
4959 * gnm_conf_get_core_workbook_dir_node:
4961 * Returns: (transfer none): A #GOConfNode
4963 GOConfNode *
4964 gnm_conf_get_core_workbook_dir_node (void)
4966 return get_node ("core/workbook", NULL);
4970 * gnm_conf_get_core_xml_dir_node:
4972 * Returns: (transfer none): A #GOConfNode
4974 GOConfNode *
4975 gnm_conf_get_core_xml_dir_node (void)
4977 return get_node ("core/xml", NULL);
4981 * gnm_conf_get_cut_and_paste_dir_node:
4983 * Returns: (transfer none): A #GOConfNode
4985 GOConfNode *
4986 gnm_conf_get_cut_and_paste_dir_node (void)
4988 return get_node ("cut-and-paste", NULL);
4992 * gnm_conf_get_dialogs_rs_dir_node:
4994 * Returns: (transfer none): A #GOConfNode
4996 GOConfNode *
4997 gnm_conf_get_dialogs_rs_dir_node (void)
4999 return get_node ("dialogs/rs", NULL);
5003 * gnm_conf_get_functionselector_dir_node:
5005 * Returns: (transfer none): A #GOConfNode
5007 GOConfNode *
5008 gnm_conf_get_functionselector_dir_node (void)
5010 return get_node ("functionselector", NULL);
5014 * gnm_conf_get_plugin_glpk_dir_node:
5016 * Returns: (transfer none): A #GOConfNode
5018 GOConfNode *
5019 gnm_conf_get_plugin_glpk_dir_node (void)
5021 return get_node ("plugin/glpk", NULL);
5025 * gnm_conf_get_plugin_latex_dir_node:
5027 * Returns: (transfer none): A #GOConfNode
5029 GOConfNode *
5030 gnm_conf_get_plugin_latex_dir_node (void)
5032 return get_node ("plugin/latex", NULL);
5036 * gnm_conf_get_plugin_lpsolve_dir_node:
5038 * Returns: (transfer none): A #GOConfNode
5040 GOConfNode *
5041 gnm_conf_get_plugin_lpsolve_dir_node (void)
5043 return get_node ("plugin/lpsolve", NULL);
5047 * gnm_conf_get_plugins_dir_node:
5049 * Returns: (transfer none): A #GOConfNode
5051 GOConfNode *
5052 gnm_conf_get_plugins_dir_node (void)
5054 return get_node ("plugins", NULL);
5058 * gnm_conf_get_printsetup_dir_node:
5060 * Returns: (transfer none): A #GOConfNode
5062 GOConfNode *
5063 gnm_conf_get_printsetup_dir_node (void)
5065 return get_node ("printsetup", NULL);
5069 * gnm_conf_get_searchreplace_dir_node:
5071 * Returns: (transfer none): A #GOConfNode
5073 GOConfNode *
5074 gnm_conf_get_searchreplace_dir_node (void)
5076 return get_node ("searchreplace", NULL);
5080 * gnm_conf_get_stf_export_dir_node:
5082 * Returns: (transfer none): A #GOConfNode
5084 GOConfNode *
5085 gnm_conf_get_stf_export_dir_node (void)
5087 return get_node ("stf/export", NULL);
5091 * gnm_conf_get_toolbar_style_dir_node:
5093 * Returns: (transfer none): A #GOConfNode
5095 GOConfNode *
5096 gnm_conf_get_toolbar_style_dir_node (void)
5098 return get_node ("toolbar-style", NULL);
5102 * gnm_conf_get_undo_dir_node:
5104 * Returns: (transfer none): A #GOConfNode
5106 GOConfNode *
5107 gnm_conf_get_undo_dir_node (void)
5109 return get_node ("undo", NULL);