Update Spanish translation
[gnumeric.git] / src / gnumeric-conf.c
blob788a80e67374b89ab31a693dfd249c19f1d91280
1 /*
2 * gnumeric-conf.c:
4 * Author:
5 * Andreas J. Guelzow <aguelzow@pyrshep.ca>
7 * (C) Copyright 2002-2005 Andreas J. Guelzow <aguelzow@pyrshep.ca>
8 * (C) Copyright 2009-2011 Morten Welinder <terra@gnome.org>
10 * Introduced the concept of "node" and implemented the win32 backend
11 * by Ivan, Wong Yat Cheung <email@ivanwong.info>, 2005
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, see <https://www.gnu.org/licenses/>.
27 #include <gnumeric-config.h>
28 #include <gnumeric.h>
29 #include <application.h>
30 #include <gnumeric-conf.h>
31 #include <gutils.h>
32 #include <mstyle.h>
33 #include <goffice/goffice.h>
34 #include <value.h>
35 #include <number-match.h>
36 #include <string.h>
37 #include <sheet.h>
38 #include <print-info.h>
39 #include <glib/gi18n-lib.h>
41 #define NO_DEBUG_GCONF
42 #ifndef NO_DEBUG_GCONF
43 #define d(code) { code; }
44 #else
45 #define d(code)
46 #endif
48 #define GNM_CONF_DIR "gnumeric"
50 static gboolean persist_changes = TRUE;
52 static GOConfNode *root = NULL;
55 * Hashes to simplify ownership rules. We use this so none of the getters
56 * have to return memory that the callers need to free.
58 static GHashTable *string_pool;
59 static GHashTable *string_list_pool;
60 static GHashTable *node_pool, *node_watch;
62 static gboolean debug_getters;
63 static gboolean debug_setters;
64 #define MAYBE_DEBUG_GET(key) do { \
65 if (debug_getters) g_printerr ("conf-get: %s\n", key); \
66 } while (0)
67 #define MAYBE_DEBUG_SET(key) do { \
68 if (debug_setters) g_printerr ("conf-set: %s\n", key); \
69 } while (0)
72 static guint sync_handler;
74 static gboolean
75 cb_sync (void)
77 go_conf_sync (root);
78 sync_handler = 0;
79 return FALSE;
82 static void
83 schedule_sync (void)
85 if (sync_handler)
86 return;
88 sync_handler = g_timeout_add (200, (GSourceFunc)cb_sync, NULL);
91 /* -------------------------------------------------------------------------- */
93 static GSList *watchers;
95 struct cb_watch_generic {
96 guint handler;
97 const char *key;
98 const char *short_desc;
99 const char *long_desc;
102 static void
103 free_watcher (struct cb_watch_generic *watcher)
105 go_conf_remove_monitor (watcher->handler);
108 /* ---------------------------------------- */
111 * gnm_conf_get_root:
113 * Returns: (transfer none): the root config node.
115 GOConfNode *
116 gnm_conf_get_root (void)
118 return root;
121 static GOConfNode *
122 get_node (const char *key, gpointer watch)
124 GOConfNode *res = g_hash_table_lookup (node_pool, key);
125 if (!res) {
126 res = go_conf_get_node (key[0] == '/' ? NULL : root, key);
127 g_hash_table_insert (node_pool, (gpointer)key, res);
128 if (watch)
129 g_hash_table_insert (node_watch, res, watch);
131 return res;
134 static GOConfNode *
135 get_watch_node (gpointer watch_)
137 struct cb_watch_generic *watch = watch_;
138 return get_node (watch->key, watch);
142 * gnm_conf_get_short_desc:
143 * @node: #GOConfNode
145 * Returns: (transfer none) (nullable): a brief description of @node.
147 char const *
148 gnm_conf_get_short_desc (GOConfNode *node)
150 struct cb_watch_generic *watch =
151 g_hash_table_lookup (node_watch, node);
152 const char *desc = watch ? watch->short_desc : NULL;
153 return desc ? _(desc) : NULL;
157 * gnm_conf_get_long_desc:
158 * @node: #GOConfNode
160 * Returns: (transfer none) (nullable): a description of @node.
162 char const *
163 gnm_conf_get_long_desc (GOConfNode *node)
165 struct cb_watch_generic *watch =
166 g_hash_table_lookup (node_watch, node);
167 const char *desc = watch ? watch->long_desc : NULL;
168 return desc ? _(desc) : NULL;
171 /* -------------------------------------------------------------------------- */
173 struct cb_watch_bool {
174 guint handler;
175 const char *key;
176 const char *short_desc;
177 const char *long_desc;
178 gboolean defalt;
179 gboolean var;
182 static void
183 cb_watch_bool (GOConfNode *node, G_GNUC_UNUSED const char *key, gpointer user)
185 struct cb_watch_bool *watch = user;
186 watch->var = go_conf_load_bool (node, NULL, watch->defalt);
189 static void
190 watch_bool (struct cb_watch_bool *watch)
192 GOConfNode *node = get_node (watch->key, watch);
193 watch->handler = go_conf_add_monitor
194 (node, NULL, cb_watch_bool, watch);
195 watchers = g_slist_prepend (watchers, watch);
196 cb_watch_bool (node, NULL, watch);
197 MAYBE_DEBUG_GET (watch->key);
200 static void
201 set_bool (struct cb_watch_bool *watch, gboolean x)
203 x = (x != FALSE);
204 if (x == watch->var)
205 return;
207 MAYBE_DEBUG_SET (watch->key);
208 watch->var = x;
209 if (persist_changes) {
210 go_conf_set_bool (root, watch->key, x);
211 schedule_sync ();
215 /* ---------------------------------------- */
217 struct cb_watch_int {
218 guint handler;
219 const char *key;
220 const char *short_desc;
221 const char *long_desc;
222 int min, max, defalt;
223 int var;
226 static void
227 cb_watch_int (GOConfNode *node, G_GNUC_UNUSED const char *key, gpointer user)
229 struct cb_watch_int *watch = user;
230 watch->var = go_conf_load_int (node, NULL,
231 watch->min, watch->max,
232 watch->defalt);
235 static void
236 watch_int (struct cb_watch_int *watch)
238 GOConfNode *node = get_node (watch->key, watch);
239 watch->handler = go_conf_add_monitor
240 (node, NULL, cb_watch_int, watch);
241 watchers = g_slist_prepend (watchers, watch);
242 cb_watch_int (node, NULL, watch);
243 MAYBE_DEBUG_GET (watch->key);
246 static void
247 set_int (struct cb_watch_int *watch, int x)
249 x = CLAMP (x, watch->min, watch->max);
251 if (x == watch->var)
252 return;
254 MAYBE_DEBUG_SET (watch->key);
255 watch->var = x;
256 if (persist_changes) {
257 go_conf_set_int (root, watch->key, x);
258 schedule_sync ();
262 /* ---------------------------------------- */
264 struct cb_watch_double {
265 guint handler;
266 const char *key;
267 const char *short_desc;
268 const char *long_desc;
269 double min, max, defalt;
270 double var;
273 static void
274 cb_watch_double (GOConfNode *node, G_GNUC_UNUSED const char *key, gpointer user)
276 struct cb_watch_double *watch = user;
277 watch->var = go_conf_load_double (node, NULL,
278 watch->min, watch->max,
279 watch->defalt);
282 static void
283 watch_double (struct cb_watch_double *watch)
285 GOConfNode *node = get_node (watch->key, watch);
286 watch->handler = go_conf_add_monitor
287 (node, NULL, cb_watch_double, watch);
288 watchers = g_slist_prepend (watchers, watch);
289 cb_watch_double (node, NULL, watch);
290 MAYBE_DEBUG_GET (watch->key);
293 static void
294 set_double (struct cb_watch_double *watch, double x)
296 x = CLAMP (x, watch->min, watch->max);
298 if (x == watch->var)
299 return;
301 MAYBE_DEBUG_SET (watch->key);
302 watch->var = x;
303 if (persist_changes) {
304 go_conf_set_double (root, watch->key, x);
305 schedule_sync ();
309 /* ---------------------------------------- */
311 struct cb_watch_string {
312 guint handler;
313 const char *key;
314 const char *short_desc;
315 const char *long_desc;
316 const char *defalt;
317 const char *var;
320 static void
321 cb_watch_string (GOConfNode *node, G_GNUC_UNUSED const char *key, gpointer user)
323 struct cb_watch_string *watch = user;
324 char *res = go_conf_load_string (node, NULL);
325 if (!res) res = g_strdup (watch->defalt);
326 g_hash_table_replace (string_pool, (gpointer)watch->key, res);
327 watch->var = res;
330 static void
331 watch_string (struct cb_watch_string *watch)
333 GOConfNode *node = get_node (watch->key, watch);
334 watch->handler = go_conf_add_monitor
335 (node, NULL, cb_watch_string, watch);
336 watchers = g_slist_prepend (watchers, watch);
337 cb_watch_string (node, NULL, watch);
338 MAYBE_DEBUG_GET (watch->key);
341 static void
342 set_string (struct cb_watch_string *watch, const char *x)
344 char *xc;
346 if (!x || !watch->var || strcmp (x, watch->var) == 0)
347 return;
349 MAYBE_DEBUG_SET (watch->key);
350 xc = g_strdup (x);
351 watch->var = xc;
352 /* Update pool before setting so monitors see the right value. */
353 g_hash_table_replace (string_pool, (gpointer)watch->key, xc);
354 if (persist_changes) {
355 go_conf_set_string (root, watch->key, xc);
356 schedule_sync ();
360 /* ---------------------------------------- */
362 struct cb_watch_string_list {
363 guint handler;
364 const char *key;
365 const char *short_desc;
366 const char *long_desc;
367 GSList *var;
370 static void
371 cb_watch_string_list (GOConfNode *node, G_GNUC_UNUSED const char *key, gpointer user)
373 struct cb_watch_string_list *watch = user;
374 GSList *res = go_conf_load_str_list (node, NULL);
375 g_hash_table_replace (string_list_pool, (gpointer)watch->key, res);
376 watch->var = res;
379 static void
380 watch_string_list (struct cb_watch_string_list *watch)
382 GOConfNode *node = get_node (watch->key, watch);
383 watch->handler = go_conf_add_monitor
384 (node, NULL, cb_watch_string_list, watch);
385 watchers = g_slist_prepend (watchers, watch);
386 cb_watch_string_list (node, NULL, watch);
387 MAYBE_DEBUG_GET (watch->key);
390 static gboolean
391 string_list_equal (GSList *x, GSList *y)
393 while (x && y) {
394 if (strcmp (x->data, y->data) != 0)
395 return FALSE;
396 x = x->next;
397 y = y->next;
400 return x == y;
403 static void
404 set_string_list (struct cb_watch_string_list *watch, GSList *x)
406 if (string_list_equal (x, watch->var))
407 return;
409 x = go_string_slist_copy (x);
411 MAYBE_DEBUG_SET (watch->key);
412 watch->var = x;
413 /* Update pool before setting so monitors see the right value. */
414 g_hash_table_replace (string_list_pool, (gpointer)watch->key, x);
415 if (persist_changes) {
416 go_conf_set_str_list (root, watch->key, x);
417 schedule_sync ();
421 /* ---------------------------------------- */
423 struct cb_watch_enum {
424 guint handler;
425 const char *key;
426 const char *short_desc;
427 const char *long_desc;
428 int defalt;
429 GType typ;
430 int var;
433 static void
434 cb_watch_enum (GOConfNode *node, G_GNUC_UNUSED const char *key, gpointer user)
436 struct cb_watch_enum *watch = user;
437 watch->var = go_conf_load_enum (node, NULL,
438 watch->typ, watch->defalt);
441 static void
442 watch_enum (struct cb_watch_enum *watch, GType typ)
444 GOConfNode *node = get_node (watch->key, watch);
445 watch->typ = typ;
446 watch->handler = go_conf_add_monitor
447 (node, NULL, cb_watch_enum, watch);
448 watchers = g_slist_prepend (watchers, watch);
449 cb_watch_enum (node, NULL, watch);
450 MAYBE_DEBUG_GET (watch->key);
453 static void
454 set_enum (struct cb_watch_enum *watch, int x)
456 if (x == watch->var)
457 return;
459 MAYBE_DEBUG_SET (watch->key);
460 watch->var = x;
461 if (persist_changes) {
462 go_conf_set_enum (root, watch->key, watch->typ, x);
463 schedule_sync ();
467 /* -------------------------------------------------------------------------- */
469 static void
470 cb_free_string_list (GSList *l)
472 g_slist_free_full (l, g_free);
476 * gnm_conf_init: (skip)
478 void
479 gnm_conf_init (void)
481 debug_getters = gnm_debug_flag ("conf-get");
482 debug_setters = gnm_debug_flag ("conf-set");
484 if (debug_getters || debug_setters)
485 g_printerr ("gnm_conf_init\n");
487 string_pool = g_hash_table_new_full
488 (g_str_hash, g_str_equal,
489 NULL, g_free);
490 string_list_pool = g_hash_table_new_full
491 (g_str_hash, g_str_equal,
492 NULL, (GDestroyNotify)cb_free_string_list);
493 node_pool = g_hash_table_new_full
494 (g_str_hash, g_str_equal,
495 NULL, (GDestroyNotify)go_conf_free_node);
496 node_watch = g_hash_table_new (g_direct_hash, g_direct_equal);
498 root = go_conf_get_node (NULL, GNM_CONF_DIR);
499 g_hash_table_insert (node_pool, (gpointer)"/", root);
503 * gnm_conf_shutdown: (skip)
505 void
506 gnm_conf_shutdown (void)
508 if (debug_getters || debug_setters)
509 g_printerr ("gnm_conf_shutdown\n");
511 //go_conf_sync (root);
512 if (sync_handler) {
513 g_source_remove (sync_handler);
514 sync_handler = 0;
517 g_slist_free_full (watchers, (GDestroyNotify)free_watcher);
518 watchers = NULL;
520 g_hash_table_destroy (string_pool);
521 string_pool = NULL;
523 g_hash_table_destroy (string_list_pool);
524 string_list_pool = NULL;
526 g_hash_table_destroy (node_watch);
527 node_watch = NULL;
529 g_hash_table_destroy (node_pool);
530 node_pool = NULL;
532 root = NULL;
536 * gnm_conf_set_persistence:
537 * @persist: whether to save changes
539 * If @persist is %TRUE, then changes from this point on will not be saved.
541 void
542 gnm_conf_set_persistence (gboolean persist)
544 persist_changes = persist;
549 * gnm_conf_get_page_setup:
551 * Returns: (transfer full): the default #GtkPageSetup.
553 GtkPageSetup *
554 gnm_conf_get_page_setup (void)
556 GtkPageSetup *page_setup = gtk_page_setup_new ();
558 page_setup_set_paper (page_setup,
559 gnm_conf_get_printsetup_paper ());
561 gtk_page_setup_set_orientation
562 (page_setup,
563 gnm_conf_get_printsetup_paper_orientation ());
565 gtk_page_setup_set_top_margin
566 (page_setup,
567 gnm_conf_get_printsetup_margin_gtk_top (),
568 GTK_UNIT_POINTS);
569 gtk_page_setup_set_bottom_margin
570 (page_setup,
571 gnm_conf_get_printsetup_margin_gtk_bottom (),
572 GTK_UNIT_POINTS);
573 gtk_page_setup_set_left_margin
574 (page_setup,
575 gnm_conf_get_printsetup_margin_gtk_left (),
576 GTK_UNIT_POINTS);
577 gtk_page_setup_set_right_margin
578 (page_setup,
579 gnm_conf_get_printsetup_margin_gtk_right (),
580 GTK_UNIT_POINTS);
582 return page_setup;
585 void
586 gnm_conf_set_page_setup (GtkPageSetup *setup)
588 char *paper;
590 paper = page_setup_get_paper (setup);
591 gnm_conf_set_printsetup_paper (paper);
592 g_free (paper);
594 gnm_conf_set_printsetup_paper_orientation
595 (gtk_page_setup_get_orientation (setup));
597 gnm_conf_set_printsetup_margin_gtk_top
598 (gtk_page_setup_get_top_margin (setup, GTK_UNIT_POINTS));
599 gnm_conf_set_printsetup_margin_gtk_bottom
600 (gtk_page_setup_get_bottom_margin (setup, GTK_UNIT_POINTS));
601 gnm_conf_set_printsetup_margin_gtk_left
602 (gtk_page_setup_get_left_margin (setup, GTK_UNIT_POINTS));
603 gnm_conf_set_printsetup_margin_gtk_right
604 (gtk_page_setup_get_right_margin (setup, GTK_UNIT_POINTS));
608 * gnm_conf_get_printer_decoration_font:
610 * Returns: (transfer full): a style appropriate for for headers and
611 * footers.
613 GnmStyle *
614 gnm_conf_get_printer_decoration_font (void)
616 GnmStyle *style = gnm_style_new ();
618 gnm_style_set_font_name (style,
619 gnm_conf_get_printsetup_hf_font_name ());
620 gnm_style_set_font_size (style,
621 gnm_conf_get_printsetup_hf_font_size ());
622 gnm_style_set_font_bold (style,
623 gnm_conf_get_printsetup_hf_font_bold ());
624 gnm_style_set_font_italic (style,
625 gnm_conf_get_printsetup_hf_font_italic ());
627 return style;
630 #define TOOLBAR_TANGO(Object,Format,Standard) \
631 if (strcmp (name, "ObjectToolbar") == 0) \
632 Object \
633 else if (strcmp (name, "FormatToolbar") == 0) \
634 Format \
635 else if (strcmp (name, "StandardToolbar") == 0) \
636 Standard
639 gboolean
640 gnm_conf_get_toolbar_visible (const char *name)
642 TOOLBAR_TANGO
643 (return gnm_conf_get_core_gui_toolbars_object_visible ();,
644 return gnm_conf_get_core_gui_toolbars_format_visible ();,
645 return gnm_conf_get_core_gui_toolbars_standard_visible (););
647 g_warning ("Unknown toolbar: %s", name);
648 return FALSE;
651 void
652 gnm_conf_set_toolbar_visible (const char *name, gboolean x)
654 TOOLBAR_TANGO
655 (gnm_conf_set_core_gui_toolbars_object_visible (x);,
656 gnm_conf_set_core_gui_toolbars_format_visible (x);,
657 gnm_conf_set_core_gui_toolbars_standard_visible (x););
660 GtkPositionType
661 gnm_conf_get_toolbar_position (const char *name)
663 TOOLBAR_TANGO
664 (return gnm_conf_get_core_gui_toolbars_object_position ();,
665 return gnm_conf_get_core_gui_toolbars_format_position ();,
666 return gnm_conf_get_core_gui_toolbars_standard_position (););
668 g_warning ("Unknown toolbar: %s", name);
669 return GTK_POS_TOP;
672 void
673 gnm_conf_set_toolbar_position (const char *name, GtkPositionType x)
675 TOOLBAR_TANGO
676 (gnm_conf_set_core_gui_toolbars_object_position (x);,
677 gnm_conf_set_core_gui_toolbars_format_position (x);,
678 gnm_conf_set_core_gui_toolbars_standard_position (x););
681 #undef TOOLBAR_TANGO
684 * gnm_conf_get_print_settings:
686 * Returns: (transfer full): the default #GtkPrintSettings.
688 GtkPrintSettings *
689 gnm_conf_get_print_settings (void)
691 GtkPrintSettings *settings = gtk_print_settings_new ();
692 GSList *list = gnm_conf_get_printsetup_gtk_setting ();
694 while (list && list->next) {
695 /* For historical reasons, value comes before key. */
696 const char *value = list->data;
697 const char *key = list->next->data;
699 list = list->next->next;
700 gtk_print_settings_set (settings, key, value);
703 return settings;
706 static void
707 gnm_gconf_set_print_settings_cb (const gchar *key, const gchar *value, gpointer user_data)
709 GSList **list = user_data;
711 /* For historical reasons, value comes before key. */
712 *list = g_slist_prepend (*list, g_strdup (key));
713 *list = g_slist_prepend (*list, g_strdup (value));
716 void
717 gnm_conf_set_print_settings (GtkPrintSettings *settings)
719 GSList *list = NULL;
721 gtk_print_settings_foreach (settings, gnm_gconf_set_print_settings_cb, &list);
722 gnm_conf_set_printsetup_gtk_setting (list);
723 g_slist_free_full (list, g_free);
726 gboolean
727 gnm_conf_get_detachable_toolbars (void)
729 #ifdef WIN32
730 return FALSE;
731 #else
732 return go_conf_get_bool
733 (NULL,
734 "/desktop/interface/toolbar_detachable");
735 #endif
738 /* ------------------------------------------------------------------------- */
740 * The following code was generated by running
742 * make update-gnumeric-conf
745 /* ----------- AUTOMATICALLY GENERATED CODE BELOW -- DO NOT EDIT ----------- */
747 static struct cb_watch_bool watch_autocorrect_first_letter = {
748 0, "autocorrect/first-letter",
749 "Autocorrect first letter",
750 "This variable determines whether to autocorrect first letters",
751 TRUE,
754 gboolean
755 gnm_conf_get_autocorrect_first_letter (void)
757 if (!watch_autocorrect_first_letter.handler)
758 watch_bool (&watch_autocorrect_first_letter);
759 return watch_autocorrect_first_letter.var;
762 void
763 gnm_conf_set_autocorrect_first_letter (gboolean x)
765 if (!watch_autocorrect_first_letter.handler)
766 watch_bool (&watch_autocorrect_first_letter);
767 set_bool (&watch_autocorrect_first_letter, x);
771 * gnm_conf_get_autocorrect_first_letter_node:
773 * Returns: (transfer none): A #GOConfNode
775 GOConfNode *
776 gnm_conf_get_autocorrect_first_letter_node (void)
778 return get_watch_node (&watch_autocorrect_first_letter);
781 static struct cb_watch_string_list watch_autocorrect_first_letter_list = {
782 0, "autocorrect/first-letter-list",
783 "List of First Letter Exception",
784 "The autocorrect engine does not capitalize the first letter of words following strings in this list.",
788 * gnm_conf_get_autocorrect_first_letter_list:
790 * Returns: (element-type utf8) (transfer none):
792 GSList *
793 gnm_conf_get_autocorrect_first_letter_list (void)
795 if (!watch_autocorrect_first_letter_list.handler)
796 watch_string_list (&watch_autocorrect_first_letter_list);
797 return watch_autocorrect_first_letter_list.var;
801 * gnm_conf_set_autocorrect_first_letter_list:
802 * @x: (element-type utf8): list of strings
805 void
806 gnm_conf_set_autocorrect_first_letter_list (GSList *x)
808 if (!watch_autocorrect_first_letter_list.handler)
809 watch_string_list (&watch_autocorrect_first_letter_list);
810 set_string_list (&watch_autocorrect_first_letter_list, x);
814 * gnm_conf_get_autocorrect_first_letter_list_node:
816 * Returns: (transfer none): A #GOConfNode
818 GOConfNode *
819 gnm_conf_get_autocorrect_first_letter_list_node (void)
821 return get_watch_node (&watch_autocorrect_first_letter_list);
824 static struct cb_watch_bool watch_autocorrect_init_caps = {
825 0, "autocorrect/init-caps",
826 "Autocorrect initial caps",
827 "This variable determines whether to autocorrect initial caps",
828 TRUE,
831 gboolean
832 gnm_conf_get_autocorrect_init_caps (void)
834 if (!watch_autocorrect_init_caps.handler)
835 watch_bool (&watch_autocorrect_init_caps);
836 return watch_autocorrect_init_caps.var;
839 void
840 gnm_conf_set_autocorrect_init_caps (gboolean x)
842 if (!watch_autocorrect_init_caps.handler)
843 watch_bool (&watch_autocorrect_init_caps);
844 set_bool (&watch_autocorrect_init_caps, x);
848 * gnm_conf_get_autocorrect_init_caps_node:
850 * Returns: (transfer none): A #GOConfNode
852 GOConfNode *
853 gnm_conf_get_autocorrect_init_caps_node (void)
855 return get_watch_node (&watch_autocorrect_init_caps);
858 static struct cb_watch_string_list watch_autocorrect_init_caps_list = {
859 0, "autocorrect/init-caps-list",
860 "List of initial caps exceptions",
861 "The autocorrect engine does not correct the initial caps for words in this list.",
865 * gnm_conf_get_autocorrect_init_caps_list:
867 * Returns: (element-type utf8) (transfer none):
869 GSList *
870 gnm_conf_get_autocorrect_init_caps_list (void)
872 if (!watch_autocorrect_init_caps_list.handler)
873 watch_string_list (&watch_autocorrect_init_caps_list);
874 return watch_autocorrect_init_caps_list.var;
878 * gnm_conf_set_autocorrect_init_caps_list:
879 * @x: (element-type utf8): list of strings
882 void
883 gnm_conf_set_autocorrect_init_caps_list (GSList *x)
885 if (!watch_autocorrect_init_caps_list.handler)
886 watch_string_list (&watch_autocorrect_init_caps_list);
887 set_string_list (&watch_autocorrect_init_caps_list, x);
891 * gnm_conf_get_autocorrect_init_caps_list_node:
893 * Returns: (transfer none): A #GOConfNode
895 GOConfNode *
896 gnm_conf_get_autocorrect_init_caps_list_node (void)
898 return get_watch_node (&watch_autocorrect_init_caps_list);
901 static struct cb_watch_bool watch_autocorrect_names_of_days = {
902 0, "autocorrect/names-of-days",
903 "Autocorrect names of days",
904 "This variable determines whether to autocorrect names of days",
905 TRUE,
908 gboolean
909 gnm_conf_get_autocorrect_names_of_days (void)
911 if (!watch_autocorrect_names_of_days.handler)
912 watch_bool (&watch_autocorrect_names_of_days);
913 return watch_autocorrect_names_of_days.var;
916 void
917 gnm_conf_set_autocorrect_names_of_days (gboolean x)
919 if (!watch_autocorrect_names_of_days.handler)
920 watch_bool (&watch_autocorrect_names_of_days);
921 set_bool (&watch_autocorrect_names_of_days, x);
925 * gnm_conf_get_autocorrect_names_of_days_node:
927 * Returns: (transfer none): A #GOConfNode
929 GOConfNode *
930 gnm_conf_get_autocorrect_names_of_days_node (void)
932 return get_watch_node (&watch_autocorrect_names_of_days);
935 static struct cb_watch_bool watch_autocorrect_replace = {
936 0, "autocorrect/replace",
937 "Autocorrect replace",
938 "Autocorrect replace",
939 TRUE,
942 gboolean
943 gnm_conf_get_autocorrect_replace (void)
945 if (!watch_autocorrect_replace.handler)
946 watch_bool (&watch_autocorrect_replace);
947 return watch_autocorrect_replace.var;
950 void
951 gnm_conf_set_autocorrect_replace (gboolean x)
953 if (!watch_autocorrect_replace.handler)
954 watch_bool (&watch_autocorrect_replace);
955 set_bool (&watch_autocorrect_replace, x);
959 * gnm_conf_get_autocorrect_replace_node:
961 * Returns: (transfer none): A #GOConfNode
963 GOConfNode *
964 gnm_conf_get_autocorrect_replace_node (void)
966 return get_watch_node (&watch_autocorrect_replace);
969 static struct cb_watch_string_list watch_autoformat_extra_dirs = {
970 0, "autoformat/extra-dirs",
971 "List of Extra Autoformat Directories.",
972 "This list contains all extra directories containing autoformat templates.",
976 * gnm_conf_get_autoformat_extra_dirs:
978 * Returns: (element-type utf8) (transfer none):
980 GSList *
981 gnm_conf_get_autoformat_extra_dirs (void)
983 if (!watch_autoformat_extra_dirs.handler)
984 watch_string_list (&watch_autoformat_extra_dirs);
985 return watch_autoformat_extra_dirs.var;
989 * gnm_conf_set_autoformat_extra_dirs:
990 * @x: (element-type utf8): list of strings
993 void
994 gnm_conf_set_autoformat_extra_dirs (GSList *x)
996 if (!watch_autoformat_extra_dirs.handler)
997 watch_string_list (&watch_autoformat_extra_dirs);
998 set_string_list (&watch_autoformat_extra_dirs, x);
1002 * gnm_conf_get_autoformat_extra_dirs_node:
1004 * Returns: (transfer none): A #GOConfNode
1006 GOConfNode *
1007 gnm_conf_get_autoformat_extra_dirs_node (void)
1009 return get_watch_node (&watch_autoformat_extra_dirs);
1012 static struct cb_watch_string watch_autoformat_sys_dir = {
1013 0, "autoformat/sys-dir",
1014 "System Directory for Autoformats",
1015 "This directory contains the pre-installed autoformat templates.",
1016 "autoformat-templates",
1019 const char *
1020 gnm_conf_get_autoformat_sys_dir (void)
1022 if (!watch_autoformat_sys_dir.handler)
1023 watch_string (&watch_autoformat_sys_dir);
1024 return watch_autoformat_sys_dir.var;
1027 void
1028 gnm_conf_set_autoformat_sys_dir (const char *x)
1030 g_return_if_fail (x != NULL);
1031 if (!watch_autoformat_sys_dir.handler)
1032 watch_string (&watch_autoformat_sys_dir);
1033 set_string (&watch_autoformat_sys_dir, x);
1037 * gnm_conf_get_autoformat_sys_dir_node:
1039 * Returns: (transfer none): A #GOConfNode
1041 GOConfNode *
1042 gnm_conf_get_autoformat_sys_dir_node (void)
1044 return get_watch_node (&watch_autoformat_sys_dir);
1047 static struct cb_watch_string watch_autoformat_usr_dir = {
1048 0, "autoformat/usr-dir",
1049 "User Directory for Autoformats",
1050 "The main directory for user specific autoformat templates.",
1051 "autoformat-templates",
1054 const char *
1055 gnm_conf_get_autoformat_usr_dir (void)
1057 if (!watch_autoformat_usr_dir.handler)
1058 watch_string (&watch_autoformat_usr_dir);
1059 return watch_autoformat_usr_dir.var;
1062 void
1063 gnm_conf_set_autoformat_usr_dir (const char *x)
1065 g_return_if_fail (x != NULL);
1066 if (!watch_autoformat_usr_dir.handler)
1067 watch_string (&watch_autoformat_usr_dir);
1068 set_string (&watch_autoformat_usr_dir, x);
1072 * gnm_conf_get_autoformat_usr_dir_node:
1074 * Returns: (transfer none): A #GOConfNode
1076 GOConfNode *
1077 gnm_conf_get_autoformat_usr_dir_node (void)
1079 return get_watch_node (&watch_autoformat_usr_dir);
1082 static struct cb_watch_bool watch_core_defaultfont_bold = {
1083 0, "core/defaultfont/bold",
1084 "The default font is bold.",
1085 "This value determines whether the default font for a new workbook is bold.",
1086 FALSE,
1089 gboolean
1090 gnm_conf_get_core_defaultfont_bold (void)
1092 if (!watch_core_defaultfont_bold.handler)
1093 watch_bool (&watch_core_defaultfont_bold);
1094 return watch_core_defaultfont_bold.var;
1097 void
1098 gnm_conf_set_core_defaultfont_bold (gboolean x)
1100 if (!watch_core_defaultfont_bold.handler)
1101 watch_bool (&watch_core_defaultfont_bold);
1102 set_bool (&watch_core_defaultfont_bold, x);
1106 * gnm_conf_get_core_defaultfont_bold_node:
1108 * Returns: (transfer none): A #GOConfNode
1110 GOConfNode *
1111 gnm_conf_get_core_defaultfont_bold_node (void)
1113 return get_watch_node (&watch_core_defaultfont_bold);
1116 static struct cb_watch_bool watch_core_defaultfont_italic = {
1117 0, "core/defaultfont/italic",
1118 "The default font is italic.",
1119 "This value determines whether the default font for a new workbook is italic.",
1120 FALSE,
1123 gboolean
1124 gnm_conf_get_core_defaultfont_italic (void)
1126 if (!watch_core_defaultfont_italic.handler)
1127 watch_bool (&watch_core_defaultfont_italic);
1128 return watch_core_defaultfont_italic.var;
1131 void
1132 gnm_conf_set_core_defaultfont_italic (gboolean x)
1134 if (!watch_core_defaultfont_italic.handler)
1135 watch_bool (&watch_core_defaultfont_italic);
1136 set_bool (&watch_core_defaultfont_italic, x);
1140 * gnm_conf_get_core_defaultfont_italic_node:
1142 * Returns: (transfer none): A #GOConfNode
1144 GOConfNode *
1145 gnm_conf_get_core_defaultfont_italic_node (void)
1147 return get_watch_node (&watch_core_defaultfont_italic);
1150 static struct cb_watch_string watch_core_defaultfont_name = {
1151 0, "core/defaultfont/name",
1152 "Default font name",
1153 "The default font name for new workbooks.",
1154 "Sans",
1157 const char *
1158 gnm_conf_get_core_defaultfont_name (void)
1160 if (!watch_core_defaultfont_name.handler)
1161 watch_string (&watch_core_defaultfont_name);
1162 return watch_core_defaultfont_name.var;
1165 void
1166 gnm_conf_set_core_defaultfont_name (const char *x)
1168 g_return_if_fail (x != NULL);
1169 if (!watch_core_defaultfont_name.handler)
1170 watch_string (&watch_core_defaultfont_name);
1171 set_string (&watch_core_defaultfont_name, x);
1175 * gnm_conf_get_core_defaultfont_name_node:
1177 * Returns: (transfer none): A #GOConfNode
1179 GOConfNode *
1180 gnm_conf_get_core_defaultfont_name_node (void)
1182 return get_watch_node (&watch_core_defaultfont_name);
1185 static struct cb_watch_double watch_core_defaultfont_size = {
1186 0, "core/defaultfont/size",
1187 "Default Font Size",
1188 "The default font size for new workbooks.",
1189 1, 100, 10,
1192 double
1193 gnm_conf_get_core_defaultfont_size (void)
1195 if (!watch_core_defaultfont_size.handler)
1196 watch_double (&watch_core_defaultfont_size);
1197 return watch_core_defaultfont_size.var;
1200 void
1201 gnm_conf_set_core_defaultfont_size (double x)
1203 if (!watch_core_defaultfont_size.handler)
1204 watch_double (&watch_core_defaultfont_size);
1205 set_double (&watch_core_defaultfont_size, x);
1209 * gnm_conf_get_core_defaultfont_size_node:
1211 * Returns: (transfer none): A #GOConfNode
1213 GOConfNode *
1214 gnm_conf_get_core_defaultfont_size_node (void)
1216 return get_watch_node (&watch_core_defaultfont_size);
1219 static struct cb_watch_bool watch_core_file_save_def_overwrite = {
1220 0, "core/file/save/def-overwrite",
1221 "Default To Overwriting Files",
1222 "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.",
1223 FALSE,
1226 gboolean
1227 gnm_conf_get_core_file_save_def_overwrite (void)
1229 if (!watch_core_file_save_def_overwrite.handler)
1230 watch_bool (&watch_core_file_save_def_overwrite);
1231 return watch_core_file_save_def_overwrite.var;
1234 void
1235 gnm_conf_set_core_file_save_def_overwrite (gboolean x)
1237 if (!watch_core_file_save_def_overwrite.handler)
1238 watch_bool (&watch_core_file_save_def_overwrite);
1239 set_bool (&watch_core_file_save_def_overwrite, x);
1243 * gnm_conf_get_core_file_save_def_overwrite_node:
1245 * Returns: (transfer none): A #GOConfNode
1247 GOConfNode *
1248 gnm_conf_get_core_file_save_def_overwrite_node (void)
1250 return get_watch_node (&watch_core_file_save_def_overwrite);
1253 static struct cb_watch_string_list watch_core_file_save_extension_check_disabled = {
1254 0, "core/file/save/extension-check-disabled",
1255 "List of file savers with disabled extension check.",
1256 "This list contains the ids of the file savers for which the extension check is disabled.",
1260 * gnm_conf_get_core_file_save_extension_check_disabled:
1262 * Returns: (element-type utf8) (transfer none):
1264 GSList *
1265 gnm_conf_get_core_file_save_extension_check_disabled (void)
1267 if (!watch_core_file_save_extension_check_disabled.handler)
1268 watch_string_list (&watch_core_file_save_extension_check_disabled);
1269 return watch_core_file_save_extension_check_disabled.var;
1273 * gnm_conf_set_core_file_save_extension_check_disabled:
1274 * @x: (element-type utf8): list of strings
1277 void
1278 gnm_conf_set_core_file_save_extension_check_disabled (GSList *x)
1280 if (!watch_core_file_save_extension_check_disabled.handler)
1281 watch_string_list (&watch_core_file_save_extension_check_disabled);
1282 set_string_list (&watch_core_file_save_extension_check_disabled, x);
1286 * gnm_conf_get_core_file_save_extension_check_disabled_node:
1288 * Returns: (transfer none): A #GOConfNode
1290 GOConfNode *
1291 gnm_conf_get_core_file_save_extension_check_disabled_node (void)
1293 return get_watch_node (&watch_core_file_save_extension_check_disabled);
1296 static struct cb_watch_bool watch_core_file_save_single_sheet = {
1297 0, "core/file/save/single-sheet",
1298 "Warn When Exporting Into Single Sheet Format",
1299 "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.",
1300 TRUE,
1303 gboolean
1304 gnm_conf_get_core_file_save_single_sheet (void)
1306 if (!watch_core_file_save_single_sheet.handler)
1307 watch_bool (&watch_core_file_save_single_sheet);
1308 return watch_core_file_save_single_sheet.var;
1311 void
1312 gnm_conf_set_core_file_save_single_sheet (gboolean x)
1314 if (!watch_core_file_save_single_sheet.handler)
1315 watch_bool (&watch_core_file_save_single_sheet);
1316 set_bool (&watch_core_file_save_single_sheet, x);
1320 * gnm_conf_get_core_file_save_single_sheet_node:
1322 * Returns: (transfer none): A #GOConfNode
1324 GOConfNode *
1325 gnm_conf_get_core_file_save_single_sheet_node (void)
1327 return get_watch_node (&watch_core_file_save_single_sheet);
1330 static struct cb_watch_bool watch_core_gui_cells_extension_markers = {
1331 0, "core/gui/cells/extension-markers",
1332 "Extension Markers",
1333 "This variable determines whether cells with truncated content are marked.",
1334 FALSE,
1337 gboolean
1338 gnm_conf_get_core_gui_cells_extension_markers (void)
1340 if (!watch_core_gui_cells_extension_markers.handler)
1341 watch_bool (&watch_core_gui_cells_extension_markers);
1342 return watch_core_gui_cells_extension_markers.var;
1345 void
1346 gnm_conf_set_core_gui_cells_extension_markers (gboolean x)
1348 if (!watch_core_gui_cells_extension_markers.handler)
1349 watch_bool (&watch_core_gui_cells_extension_markers);
1350 set_bool (&watch_core_gui_cells_extension_markers, x);
1354 * gnm_conf_get_core_gui_cells_extension_markers_node:
1356 * Returns: (transfer none): A #GOConfNode
1358 GOConfNode *
1359 gnm_conf_get_core_gui_cells_extension_markers_node (void)
1361 return get_watch_node (&watch_core_gui_cells_extension_markers);
1364 static struct cb_watch_bool watch_core_gui_cells_function_markers = {
1365 0, "core/gui/cells/function-markers",
1366 "Function Markers",
1367 "This variable determines whether cells containing spreadsheet function are marked.",
1368 FALSE,
1371 gboolean
1372 gnm_conf_get_core_gui_cells_function_markers (void)
1374 if (!watch_core_gui_cells_function_markers.handler)
1375 watch_bool (&watch_core_gui_cells_function_markers);
1376 return watch_core_gui_cells_function_markers.var;
1379 void
1380 gnm_conf_set_core_gui_cells_function_markers (gboolean x)
1382 if (!watch_core_gui_cells_function_markers.handler)
1383 watch_bool (&watch_core_gui_cells_function_markers);
1384 set_bool (&watch_core_gui_cells_function_markers, x);
1388 * gnm_conf_get_core_gui_cells_function_markers_node:
1390 * Returns: (transfer none): A #GOConfNode
1392 GOConfNode *
1393 gnm_conf_get_core_gui_cells_function_markers_node (void)
1395 return get_watch_node (&watch_core_gui_cells_function_markers);
1398 static struct cb_watch_bool watch_core_gui_editing_autocomplete = {
1399 0, "core/gui/editing/autocomplete",
1400 "Autocomplete",
1401 "This variable determines whether autocompletion is set on.",
1402 TRUE,
1405 gboolean
1406 gnm_conf_get_core_gui_editing_autocomplete (void)
1408 if (!watch_core_gui_editing_autocomplete.handler)
1409 watch_bool (&watch_core_gui_editing_autocomplete);
1410 return watch_core_gui_editing_autocomplete.var;
1413 void
1414 gnm_conf_set_core_gui_editing_autocomplete (gboolean x)
1416 if (!watch_core_gui_editing_autocomplete.handler)
1417 watch_bool (&watch_core_gui_editing_autocomplete);
1418 set_bool (&watch_core_gui_editing_autocomplete, x);
1422 * gnm_conf_get_core_gui_editing_autocomplete_node:
1424 * Returns: (transfer none): A #GOConfNode
1426 GOConfNode *
1427 gnm_conf_get_core_gui_editing_autocomplete_node (void)
1429 return get_watch_node (&watch_core_gui_editing_autocomplete);
1432 static struct cb_watch_int watch_core_gui_editing_autocomplete_min_chars = {
1433 0, "core/gui/editing/autocomplete-min-chars",
1434 "Minimum Number of Characters for Autocompletion",
1435 "This variable determines the minimum number of characters required for autocompletion.",
1436 1, 10, 3,
1440 gnm_conf_get_core_gui_editing_autocomplete_min_chars (void)
1442 if (!watch_core_gui_editing_autocomplete_min_chars.handler)
1443 watch_int (&watch_core_gui_editing_autocomplete_min_chars);
1444 return watch_core_gui_editing_autocomplete_min_chars.var;
1447 void
1448 gnm_conf_set_core_gui_editing_autocomplete_min_chars (int x)
1450 if (!watch_core_gui_editing_autocomplete_min_chars.handler)
1451 watch_int (&watch_core_gui_editing_autocomplete_min_chars);
1452 set_int (&watch_core_gui_editing_autocomplete_min_chars, x);
1456 * gnm_conf_get_core_gui_editing_autocomplete_min_chars_node:
1458 * Returns: (transfer none): A #GOConfNode
1460 GOConfNode *
1461 gnm_conf_get_core_gui_editing_autocomplete_min_chars_node (void)
1463 return get_watch_node (&watch_core_gui_editing_autocomplete_min_chars);
1466 static struct cb_watch_enum watch_core_gui_editing_enter_moves_dir = {
1467 0, "core/gui/editing/enter-moves-dir",
1468 "Enter Direction",
1469 "Which direction pressing Enter will move the edit position.",
1470 GO_DIRECTION_DOWN,
1473 GODirection
1474 gnm_conf_get_core_gui_editing_enter_moves_dir (void)
1476 if (!watch_core_gui_editing_enter_moves_dir.handler)
1477 watch_enum (&watch_core_gui_editing_enter_moves_dir, GO_TYPE_DIRECTION);
1478 return watch_core_gui_editing_enter_moves_dir.var;
1481 void
1482 gnm_conf_set_core_gui_editing_enter_moves_dir (GODirection x)
1484 if (!watch_core_gui_editing_enter_moves_dir.handler)
1485 watch_enum (&watch_core_gui_editing_enter_moves_dir, GO_TYPE_DIRECTION);
1486 set_enum (&watch_core_gui_editing_enter_moves_dir, x);
1490 * gnm_conf_get_core_gui_editing_enter_moves_dir_node:
1492 * Returns: (transfer none): A #GOConfNode
1494 GOConfNode *
1495 gnm_conf_get_core_gui_editing_enter_moves_dir_node (void)
1497 return get_watch_node (&watch_core_gui_editing_enter_moves_dir);
1500 static struct cb_watch_bool watch_core_gui_editing_function_argument_tooltips = {
1501 0, "core/gui/editing/function-argument-tooltips",
1502 "Show Function Argument Tooltips",
1503 "This variable determines whether to show function argument tooltips.",
1504 TRUE,
1507 gboolean
1508 gnm_conf_get_core_gui_editing_function_argument_tooltips (void)
1510 if (!watch_core_gui_editing_function_argument_tooltips.handler)
1511 watch_bool (&watch_core_gui_editing_function_argument_tooltips);
1512 return watch_core_gui_editing_function_argument_tooltips.var;
1515 void
1516 gnm_conf_set_core_gui_editing_function_argument_tooltips (gboolean x)
1518 if (!watch_core_gui_editing_function_argument_tooltips.handler)
1519 watch_bool (&watch_core_gui_editing_function_argument_tooltips);
1520 set_bool (&watch_core_gui_editing_function_argument_tooltips, x);
1524 * gnm_conf_get_core_gui_editing_function_argument_tooltips_node:
1526 * Returns: (transfer none): A #GOConfNode
1528 GOConfNode *
1529 gnm_conf_get_core_gui_editing_function_argument_tooltips_node (void)
1531 return get_watch_node (&watch_core_gui_editing_function_argument_tooltips);
1534 static struct cb_watch_bool watch_core_gui_editing_function_name_tooltips = {
1535 0, "core/gui/editing/function-name-tooltips",
1536 "Show Function Name Tooltips",
1537 "This variable determines whether to show function name tooltips.",
1538 TRUE,
1541 gboolean
1542 gnm_conf_get_core_gui_editing_function_name_tooltips (void)
1544 if (!watch_core_gui_editing_function_name_tooltips.handler)
1545 watch_bool (&watch_core_gui_editing_function_name_tooltips);
1546 return watch_core_gui_editing_function_name_tooltips.var;
1549 void
1550 gnm_conf_set_core_gui_editing_function_name_tooltips (gboolean x)
1552 if (!watch_core_gui_editing_function_name_tooltips.handler)
1553 watch_bool (&watch_core_gui_editing_function_name_tooltips);
1554 set_bool (&watch_core_gui_editing_function_name_tooltips, x);
1558 * gnm_conf_get_core_gui_editing_function_name_tooltips_node:
1560 * Returns: (transfer none): A #GOConfNode
1562 GOConfNode *
1563 gnm_conf_get_core_gui_editing_function_name_tooltips_node (void)
1565 return get_watch_node (&watch_core_gui_editing_function_name_tooltips);
1568 static struct cb_watch_int watch_core_gui_editing_recalclag = {
1569 0, "core/gui/editing/recalclag",
1570 "Auto Expression Recalculation Lag",
1571 "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.",
1572 -5000, 5000, 200,
1576 gnm_conf_get_core_gui_editing_recalclag (void)
1578 if (!watch_core_gui_editing_recalclag.handler)
1579 watch_int (&watch_core_gui_editing_recalclag);
1580 return watch_core_gui_editing_recalclag.var;
1583 void
1584 gnm_conf_set_core_gui_editing_recalclag (int x)
1586 if (!watch_core_gui_editing_recalclag.handler)
1587 watch_int (&watch_core_gui_editing_recalclag);
1588 set_int (&watch_core_gui_editing_recalclag, x);
1592 * gnm_conf_get_core_gui_editing_recalclag_node:
1594 * Returns: (transfer none): A #GOConfNode
1596 GOConfNode *
1597 gnm_conf_get_core_gui_editing_recalclag_node (void)
1599 return get_watch_node (&watch_core_gui_editing_recalclag);
1602 static struct cb_watch_bool watch_core_gui_editing_transitionkeys = {
1603 0, "core/gui/editing/transitionkeys",
1604 "Transition Keys",
1605 "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.",
1606 FALSE,
1609 gboolean
1610 gnm_conf_get_core_gui_editing_transitionkeys (void)
1612 if (!watch_core_gui_editing_transitionkeys.handler)
1613 watch_bool (&watch_core_gui_editing_transitionkeys);
1614 return watch_core_gui_editing_transitionkeys.var;
1617 void
1618 gnm_conf_set_core_gui_editing_transitionkeys (gboolean x)
1620 if (!watch_core_gui_editing_transitionkeys.handler)
1621 watch_bool (&watch_core_gui_editing_transitionkeys);
1622 set_bool (&watch_core_gui_editing_transitionkeys, x);
1626 * gnm_conf_get_core_gui_editing_transitionkeys_node:
1628 * Returns: (transfer none): A #GOConfNode
1630 GOConfNode *
1631 gnm_conf_get_core_gui_editing_transitionkeys_node (void)
1633 return get_watch_node (&watch_core_gui_editing_transitionkeys);
1636 static struct cb_watch_double watch_core_gui_screen_horizontaldpi = {
1637 0, "core/gui/screen/horizontaldpi",
1638 "Horizontal DPI",
1639 "Screen resolution in the horizontal direction.",
1640 10, 1000, 96,
1643 double
1644 gnm_conf_get_core_gui_screen_horizontaldpi (void)
1646 if (!watch_core_gui_screen_horizontaldpi.handler)
1647 watch_double (&watch_core_gui_screen_horizontaldpi);
1648 return watch_core_gui_screen_horizontaldpi.var;
1651 void
1652 gnm_conf_set_core_gui_screen_horizontaldpi (double x)
1654 if (!watch_core_gui_screen_horizontaldpi.handler)
1655 watch_double (&watch_core_gui_screen_horizontaldpi);
1656 set_double (&watch_core_gui_screen_horizontaldpi, x);
1660 * gnm_conf_get_core_gui_screen_horizontaldpi_node:
1662 * Returns: (transfer none): A #GOConfNode
1664 GOConfNode *
1665 gnm_conf_get_core_gui_screen_horizontaldpi_node (void)
1667 return get_watch_node (&watch_core_gui_screen_horizontaldpi);
1670 static struct cb_watch_double watch_core_gui_screen_verticaldpi = {
1671 0, "core/gui/screen/verticaldpi",
1672 "Vertical DPI",
1673 "Screen resolution in the vertical direction.",
1674 10, 1000, 96,
1677 double
1678 gnm_conf_get_core_gui_screen_verticaldpi (void)
1680 if (!watch_core_gui_screen_verticaldpi.handler)
1681 watch_double (&watch_core_gui_screen_verticaldpi);
1682 return watch_core_gui_screen_verticaldpi.var;
1685 void
1686 gnm_conf_set_core_gui_screen_verticaldpi (double x)
1688 if (!watch_core_gui_screen_verticaldpi.handler)
1689 watch_double (&watch_core_gui_screen_verticaldpi);
1690 set_double (&watch_core_gui_screen_verticaldpi, x);
1694 * gnm_conf_get_core_gui_screen_verticaldpi_node:
1696 * Returns: (transfer none): A #GOConfNode
1698 GOConfNode *
1699 gnm_conf_get_core_gui_screen_verticaldpi_node (void)
1701 return get_watch_node (&watch_core_gui_screen_verticaldpi);
1704 static struct cb_watch_int watch_core_gui_toolbars_format_position = {
1705 0, "core/gui/toolbars/format-position",
1706 "Format toolbar position",
1707 "This variable determines where the format toolbar should be shown. 0 is left, 1 is right, 2 is top.",
1708 0, 3, 2,
1711 GtkPositionType
1712 gnm_conf_get_core_gui_toolbars_format_position (void)
1714 if (!watch_core_gui_toolbars_format_position.handler)
1715 watch_int (&watch_core_gui_toolbars_format_position);
1716 return watch_core_gui_toolbars_format_position.var;
1719 void
1720 gnm_conf_set_core_gui_toolbars_format_position (GtkPositionType x)
1722 if (!watch_core_gui_toolbars_format_position.handler)
1723 watch_int (&watch_core_gui_toolbars_format_position);
1724 set_int (&watch_core_gui_toolbars_format_position, x);
1728 * gnm_conf_get_core_gui_toolbars_format_position_node:
1730 * Returns: (transfer none): A #GOConfNode
1732 GOConfNode *
1733 gnm_conf_get_core_gui_toolbars_format_position_node (void)
1735 return get_watch_node (&watch_core_gui_toolbars_format_position);
1738 static struct cb_watch_bool watch_core_gui_toolbars_format_visible = {
1739 0, "core/gui/toolbars/format-visible",
1740 "Format toolbar visible",
1741 "This variable determines whether the format toolbar should be visible initially.",
1742 TRUE,
1745 gboolean
1746 gnm_conf_get_core_gui_toolbars_format_visible (void)
1748 if (!watch_core_gui_toolbars_format_visible.handler)
1749 watch_bool (&watch_core_gui_toolbars_format_visible);
1750 return watch_core_gui_toolbars_format_visible.var;
1753 void
1754 gnm_conf_set_core_gui_toolbars_format_visible (gboolean x)
1756 if (!watch_core_gui_toolbars_format_visible.handler)
1757 watch_bool (&watch_core_gui_toolbars_format_visible);
1758 set_bool (&watch_core_gui_toolbars_format_visible, x);
1762 * gnm_conf_get_core_gui_toolbars_format_visible_node:
1764 * Returns: (transfer none): A #GOConfNode
1766 GOConfNode *
1767 gnm_conf_get_core_gui_toolbars_format_visible_node (void)
1769 return get_watch_node (&watch_core_gui_toolbars_format_visible);
1772 static struct cb_watch_int watch_core_gui_toolbars_object_position = {
1773 0, "core/gui/toolbars/object-position",
1774 "Object toolbar position",
1775 "This variable determines where the object toolbar should be shown. 0 is left, 1 is right, 2 is top.",
1776 0, 3, 2,
1779 GtkPositionType
1780 gnm_conf_get_core_gui_toolbars_object_position (void)
1782 if (!watch_core_gui_toolbars_object_position.handler)
1783 watch_int (&watch_core_gui_toolbars_object_position);
1784 return watch_core_gui_toolbars_object_position.var;
1787 void
1788 gnm_conf_set_core_gui_toolbars_object_position (GtkPositionType x)
1790 if (!watch_core_gui_toolbars_object_position.handler)
1791 watch_int (&watch_core_gui_toolbars_object_position);
1792 set_int (&watch_core_gui_toolbars_object_position, x);
1796 * gnm_conf_get_core_gui_toolbars_object_position_node:
1798 * Returns: (transfer none): A #GOConfNode
1800 GOConfNode *
1801 gnm_conf_get_core_gui_toolbars_object_position_node (void)
1803 return get_watch_node (&watch_core_gui_toolbars_object_position);
1806 static struct cb_watch_bool watch_core_gui_toolbars_object_visible = {
1807 0, "core/gui/toolbars/object-visible",
1808 "Object toolbar visible",
1809 "This variable determines whether the object toolbar should be visible initially.",
1810 TRUE,
1813 gboolean
1814 gnm_conf_get_core_gui_toolbars_object_visible (void)
1816 if (!watch_core_gui_toolbars_object_visible.handler)
1817 watch_bool (&watch_core_gui_toolbars_object_visible);
1818 return watch_core_gui_toolbars_object_visible.var;
1821 void
1822 gnm_conf_set_core_gui_toolbars_object_visible (gboolean x)
1824 if (!watch_core_gui_toolbars_object_visible.handler)
1825 watch_bool (&watch_core_gui_toolbars_object_visible);
1826 set_bool (&watch_core_gui_toolbars_object_visible, x);
1830 * gnm_conf_get_core_gui_toolbars_object_visible_node:
1832 * Returns: (transfer none): A #GOConfNode
1834 GOConfNode *
1835 gnm_conf_get_core_gui_toolbars_object_visible_node (void)
1837 return get_watch_node (&watch_core_gui_toolbars_object_visible);
1840 static struct cb_watch_int watch_core_gui_toolbars_standard_position = {
1841 0, "core/gui/toolbars/standard-position",
1842 "Standard toolbar position",
1843 "This variable determines where the standard toolbar should be shown. 0 is left, 1 is right, 2 is top.",
1844 0, 3, 2,
1847 GtkPositionType
1848 gnm_conf_get_core_gui_toolbars_standard_position (void)
1850 if (!watch_core_gui_toolbars_standard_position.handler)
1851 watch_int (&watch_core_gui_toolbars_standard_position);
1852 return watch_core_gui_toolbars_standard_position.var;
1855 void
1856 gnm_conf_set_core_gui_toolbars_standard_position (GtkPositionType x)
1858 if (!watch_core_gui_toolbars_standard_position.handler)
1859 watch_int (&watch_core_gui_toolbars_standard_position);
1860 set_int (&watch_core_gui_toolbars_standard_position, x);
1864 * gnm_conf_get_core_gui_toolbars_standard_position_node:
1866 * Returns: (transfer none): A #GOConfNode
1868 GOConfNode *
1869 gnm_conf_get_core_gui_toolbars_standard_position_node (void)
1871 return get_watch_node (&watch_core_gui_toolbars_standard_position);
1874 static struct cb_watch_bool watch_core_gui_toolbars_standard_visible = {
1875 0, "core/gui/toolbars/standard-visible",
1876 "Standard toolbar visible",
1877 "This variable determines whether the standard toolbar should be visible initially.",
1878 TRUE,
1881 gboolean
1882 gnm_conf_get_core_gui_toolbars_standard_visible (void)
1884 if (!watch_core_gui_toolbars_standard_visible.handler)
1885 watch_bool (&watch_core_gui_toolbars_standard_visible);
1886 return watch_core_gui_toolbars_standard_visible.var;
1889 void
1890 gnm_conf_set_core_gui_toolbars_standard_visible (gboolean x)
1892 if (!watch_core_gui_toolbars_standard_visible.handler)
1893 watch_bool (&watch_core_gui_toolbars_standard_visible);
1894 set_bool (&watch_core_gui_toolbars_standard_visible, x);
1898 * gnm_conf_get_core_gui_toolbars_standard_visible_node:
1900 * Returns: (transfer none): A #GOConfNode
1902 GOConfNode *
1903 gnm_conf_get_core_gui_toolbars_standard_visible_node (void)
1905 return get_watch_node (&watch_core_gui_toolbars_standard_visible);
1908 static struct cb_watch_double watch_core_gui_window_x = {
1909 0, "core/gui/window/x",
1910 "Default Horizontal Window Size",
1911 "This number (between 0.25 and 1.00) gives the horizontal fraction of the screen size covered by the default window.",
1912 0.1, 1, 0.75,
1915 double
1916 gnm_conf_get_core_gui_window_x (void)
1918 if (!watch_core_gui_window_x.handler)
1919 watch_double (&watch_core_gui_window_x);
1920 return watch_core_gui_window_x.var;
1923 void
1924 gnm_conf_set_core_gui_window_x (double x)
1926 if (!watch_core_gui_window_x.handler)
1927 watch_double (&watch_core_gui_window_x);
1928 set_double (&watch_core_gui_window_x, x);
1932 * gnm_conf_get_core_gui_window_x_node:
1934 * Returns: (transfer none): A #GOConfNode
1936 GOConfNode *
1937 gnm_conf_get_core_gui_window_x_node (void)
1939 return get_watch_node (&watch_core_gui_window_x);
1942 static struct cb_watch_double watch_core_gui_window_y = {
1943 0, "core/gui/window/y",
1944 "Default Vertical Window Size",
1945 "This number (between 0.25 and 1.00) gives the vertical fraction of the screen size covered by the default window.",
1946 0.1, 1, 0.75,
1949 double
1950 gnm_conf_get_core_gui_window_y (void)
1952 if (!watch_core_gui_window_y.handler)
1953 watch_double (&watch_core_gui_window_y);
1954 return watch_core_gui_window_y.var;
1957 void
1958 gnm_conf_set_core_gui_window_y (double x)
1960 if (!watch_core_gui_window_y.handler)
1961 watch_double (&watch_core_gui_window_y);
1962 set_double (&watch_core_gui_window_y, x);
1966 * gnm_conf_get_core_gui_window_y_node:
1968 * Returns: (transfer none): A #GOConfNode
1970 GOConfNode *
1971 gnm_conf_get_core_gui_window_y_node (void)
1973 return get_watch_node (&watch_core_gui_window_y);
1976 static struct cb_watch_double watch_core_gui_window_zoom = {
1977 0, "core/gui/window/zoom",
1978 "Default Zoom Factor",
1979 "The initial zoom factor for new workbooks.",
1980 0.1, 5, 1,
1983 double
1984 gnm_conf_get_core_gui_window_zoom (void)
1986 if (!watch_core_gui_window_zoom.handler)
1987 watch_double (&watch_core_gui_window_zoom);
1988 return watch_core_gui_window_zoom.var;
1991 void
1992 gnm_conf_set_core_gui_window_zoom (double x)
1994 if (!watch_core_gui_window_zoom.handler)
1995 watch_double (&watch_core_gui_window_zoom);
1996 set_double (&watch_core_gui_window_zoom, x);
2000 * gnm_conf_get_core_gui_window_zoom_node:
2002 * Returns: (transfer none): A #GOConfNode
2004 GOConfNode *
2005 gnm_conf_get_core_gui_window_zoom_node (void)
2007 return get_watch_node (&watch_core_gui_window_zoom);
2010 static struct cb_watch_bool watch_core_sort_default_ascending = {
2011 0, "core/sort/default/ascending",
2012 "Sort Ascending",
2013 "This option determines the initial state of the sort-order button in the sort dialog.",
2014 TRUE,
2017 gboolean
2018 gnm_conf_get_core_sort_default_ascending (void)
2020 if (!watch_core_sort_default_ascending.handler)
2021 watch_bool (&watch_core_sort_default_ascending);
2022 return watch_core_sort_default_ascending.var;
2025 void
2026 gnm_conf_set_core_sort_default_ascending (gboolean x)
2028 if (!watch_core_sort_default_ascending.handler)
2029 watch_bool (&watch_core_sort_default_ascending);
2030 set_bool (&watch_core_sort_default_ascending, x);
2034 * gnm_conf_get_core_sort_default_ascending_node:
2036 * Returns: (transfer none): A #GOConfNode
2038 GOConfNode *
2039 gnm_conf_get_core_sort_default_ascending_node (void)
2041 return get_watch_node (&watch_core_sort_default_ascending);
2044 static struct cb_watch_bool watch_core_sort_default_by_case = {
2045 0, "core/sort/default/by-case",
2046 "Sort is Case-Sensitive",
2047 "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.",
2048 FALSE,
2051 gboolean
2052 gnm_conf_get_core_sort_default_by_case (void)
2054 if (!watch_core_sort_default_by_case.handler)
2055 watch_bool (&watch_core_sort_default_by_case);
2056 return watch_core_sort_default_by_case.var;
2059 void
2060 gnm_conf_set_core_sort_default_by_case (gboolean x)
2062 if (!watch_core_sort_default_by_case.handler)
2063 watch_bool (&watch_core_sort_default_by_case);
2064 set_bool (&watch_core_sort_default_by_case, x);
2068 * gnm_conf_get_core_sort_default_by_case_node:
2070 * Returns: (transfer none): A #GOConfNode
2072 GOConfNode *
2073 gnm_conf_get_core_sort_default_by_case_node (void)
2075 return get_watch_node (&watch_core_sort_default_by_case);
2078 static struct cb_watch_bool watch_core_sort_default_retain_formats = {
2079 0, "core/sort/default/retain-formats",
2080 "Sorting Preserves Formats",
2081 "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.",
2082 TRUE,
2085 gboolean
2086 gnm_conf_get_core_sort_default_retain_formats (void)
2088 if (!watch_core_sort_default_retain_formats.handler)
2089 watch_bool (&watch_core_sort_default_retain_formats);
2090 return watch_core_sort_default_retain_formats.var;
2093 void
2094 gnm_conf_set_core_sort_default_retain_formats (gboolean x)
2096 if (!watch_core_sort_default_retain_formats.handler)
2097 watch_bool (&watch_core_sort_default_retain_formats);
2098 set_bool (&watch_core_sort_default_retain_formats, x);
2102 * gnm_conf_get_core_sort_default_retain_formats_node:
2104 * Returns: (transfer none): A #GOConfNode
2106 GOConfNode *
2107 gnm_conf_get_core_sort_default_retain_formats_node (void)
2109 return get_watch_node (&watch_core_sort_default_retain_formats);
2112 static struct cb_watch_int watch_core_sort_dialog_max_initial_clauses = {
2113 0, "core/sort/dialog/max-initial-clauses",
2114 "Number of Automatic Clauses",
2115 "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.",
2116 0, 256, 10,
2120 gnm_conf_get_core_sort_dialog_max_initial_clauses (void)
2122 if (!watch_core_sort_dialog_max_initial_clauses.handler)
2123 watch_int (&watch_core_sort_dialog_max_initial_clauses);
2124 return watch_core_sort_dialog_max_initial_clauses.var;
2127 void
2128 gnm_conf_set_core_sort_dialog_max_initial_clauses (int x)
2130 if (!watch_core_sort_dialog_max_initial_clauses.handler)
2131 watch_int (&watch_core_sort_dialog_max_initial_clauses);
2132 set_int (&watch_core_sort_dialog_max_initial_clauses, x);
2136 * gnm_conf_get_core_sort_dialog_max_initial_clauses_node:
2138 * Returns: (transfer none): A #GOConfNode
2140 GOConfNode *
2141 gnm_conf_get_core_sort_dialog_max_initial_clauses_node (void)
2143 return get_watch_node (&watch_core_sort_dialog_max_initial_clauses);
2146 static struct cb_watch_int watch_core_workbook_autosave_time = {
2147 0, "core/workbook/autosave-time",
2148 "Autosave frequency",
2149 "The number of seconds between autosaves.",
2150 0, 365 * 24 * 60 * 60, 0,
2154 gnm_conf_get_core_workbook_autosave_time (void)
2156 if (!watch_core_workbook_autosave_time.handler)
2157 watch_int (&watch_core_workbook_autosave_time);
2158 return watch_core_workbook_autosave_time.var;
2161 void
2162 gnm_conf_set_core_workbook_autosave_time (int x)
2164 if (!watch_core_workbook_autosave_time.handler)
2165 watch_int (&watch_core_workbook_autosave_time);
2166 set_int (&watch_core_workbook_autosave_time, x);
2170 * gnm_conf_get_core_workbook_autosave_time_node:
2172 * Returns: (transfer none): A #GOConfNode
2174 GOConfNode *
2175 gnm_conf_get_core_workbook_autosave_time_node (void)
2177 return get_watch_node (&watch_core_workbook_autosave_time);
2180 static struct cb_watch_int watch_core_workbook_n_cols = {
2181 0, "core/workbook/n-cols",
2182 "Default Number of columns in a sheet",
2183 "The number of columns in each sheet. This setting will be used only in a new Gnumeric session.",
2184 GNM_MIN_COLS, GNM_MAX_COLS, 256,
2188 gnm_conf_get_core_workbook_n_cols (void)
2190 if (!watch_core_workbook_n_cols.handler)
2191 watch_int (&watch_core_workbook_n_cols);
2192 return watch_core_workbook_n_cols.var;
2195 void
2196 gnm_conf_set_core_workbook_n_cols (int x)
2198 if (!watch_core_workbook_n_cols.handler)
2199 watch_int (&watch_core_workbook_n_cols);
2200 set_int (&watch_core_workbook_n_cols, x);
2204 * gnm_conf_get_core_workbook_n_cols_node:
2206 * Returns: (transfer none): A #GOConfNode
2208 GOConfNode *
2209 gnm_conf_get_core_workbook_n_cols_node (void)
2211 return get_watch_node (&watch_core_workbook_n_cols);
2214 static struct cb_watch_int watch_core_workbook_n_rows = {
2215 0, "core/workbook/n-rows",
2216 "Default Number of rows in a sheet",
2217 "The number of rows in each sheet. This setting will be used only in a new Gnumeric session.",
2218 GNM_MIN_ROWS, GNM_MAX_ROWS, 65536,
2222 gnm_conf_get_core_workbook_n_rows (void)
2224 if (!watch_core_workbook_n_rows.handler)
2225 watch_int (&watch_core_workbook_n_rows);
2226 return watch_core_workbook_n_rows.var;
2229 void
2230 gnm_conf_set_core_workbook_n_rows (int x)
2232 if (!watch_core_workbook_n_rows.handler)
2233 watch_int (&watch_core_workbook_n_rows);
2234 set_int (&watch_core_workbook_n_rows, x);
2238 * gnm_conf_get_core_workbook_n_rows_node:
2240 * Returns: (transfer none): A #GOConfNode
2242 GOConfNode *
2243 gnm_conf_get_core_workbook_n_rows_node (void)
2245 return get_watch_node (&watch_core_workbook_n_rows);
2248 static struct cb_watch_int watch_core_workbook_n_sheet = {
2249 0, "core/workbook/n-sheet",
2250 "Default Number of Sheets",
2251 "The number of sheets initially created in a new workbook.",
2252 1, 64, 3,
2256 gnm_conf_get_core_workbook_n_sheet (void)
2258 if (!watch_core_workbook_n_sheet.handler)
2259 watch_int (&watch_core_workbook_n_sheet);
2260 return watch_core_workbook_n_sheet.var;
2263 void
2264 gnm_conf_set_core_workbook_n_sheet (int x)
2266 if (!watch_core_workbook_n_sheet.handler)
2267 watch_int (&watch_core_workbook_n_sheet);
2268 set_int (&watch_core_workbook_n_sheet, x);
2272 * gnm_conf_get_core_workbook_n_sheet_node:
2274 * Returns: (transfer none): A #GOConfNode
2276 GOConfNode *
2277 gnm_conf_get_core_workbook_n_sheet_node (void)
2279 return get_watch_node (&watch_core_workbook_n_sheet);
2282 static struct cb_watch_int watch_core_xml_compression_level = {
2283 0, "core/xml/compression-level",
2284 "Default Compression Level For Gnumeric Files",
2285 "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.",
2286 0, 9, 9,
2290 gnm_conf_get_core_xml_compression_level (void)
2292 if (!watch_core_xml_compression_level.handler)
2293 watch_int (&watch_core_xml_compression_level);
2294 return watch_core_xml_compression_level.var;
2297 void
2298 gnm_conf_set_core_xml_compression_level (int x)
2300 if (!watch_core_xml_compression_level.handler)
2301 watch_int (&watch_core_xml_compression_level);
2302 set_int (&watch_core_xml_compression_level, x);
2306 * gnm_conf_get_core_xml_compression_level_node:
2308 * Returns: (transfer none): A #GOConfNode
2310 GOConfNode *
2311 gnm_conf_get_core_xml_compression_level_node (void)
2313 return get_watch_node (&watch_core_xml_compression_level);
2316 static struct cb_watch_bool watch_cut_and_paste_prefer_clipboard = {
2317 0, "cut-and-paste/prefer-clipboard",
2318 "Prefer CLIPBOARD over PRIMARY selection",
2319 "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.",
2320 TRUE,
2323 gboolean
2324 gnm_conf_get_cut_and_paste_prefer_clipboard (void)
2326 if (!watch_cut_and_paste_prefer_clipboard.handler)
2327 watch_bool (&watch_cut_and_paste_prefer_clipboard);
2328 return watch_cut_and_paste_prefer_clipboard.var;
2331 void
2332 gnm_conf_set_cut_and_paste_prefer_clipboard (gboolean x)
2334 if (!watch_cut_and_paste_prefer_clipboard.handler)
2335 watch_bool (&watch_cut_and_paste_prefer_clipboard);
2336 set_bool (&watch_cut_and_paste_prefer_clipboard, x);
2340 * gnm_conf_get_cut_and_paste_prefer_clipboard_node:
2342 * Returns: (transfer none): A #GOConfNode
2344 GOConfNode *
2345 gnm_conf_get_cut_and_paste_prefer_clipboard_node (void)
2347 return get_watch_node (&watch_cut_and_paste_prefer_clipboard);
2350 static struct cb_watch_bool watch_dialogs_rs_unfocused = {
2351 0, "dialogs/rs/unfocused",
2352 "Allow Unfocused Range Selections",
2353 "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.",
2354 FALSE,
2357 gboolean
2358 gnm_conf_get_dialogs_rs_unfocused (void)
2360 if (!watch_dialogs_rs_unfocused.handler)
2361 watch_bool (&watch_dialogs_rs_unfocused);
2362 return watch_dialogs_rs_unfocused.var;
2365 void
2366 gnm_conf_set_dialogs_rs_unfocused (gboolean x)
2368 if (!watch_dialogs_rs_unfocused.handler)
2369 watch_bool (&watch_dialogs_rs_unfocused);
2370 set_bool (&watch_dialogs_rs_unfocused, x);
2374 * gnm_conf_get_dialogs_rs_unfocused_node:
2376 * Returns: (transfer none): A #GOConfNode
2378 GOConfNode *
2379 gnm_conf_get_dialogs_rs_unfocused_node (void)
2381 return get_watch_node (&watch_dialogs_rs_unfocused);
2384 static struct cb_watch_int watch_functionselector_num_of_recent = {
2385 0, "functionselector/num-of-recent",
2386 "Maximum Length of Recently Used Functions List",
2387 "The function selector keeps a list of recently used functions. This is the maximum length of that list.",
2388 0, 40, 12,
2392 gnm_conf_get_functionselector_num_of_recent (void)
2394 if (!watch_functionselector_num_of_recent.handler)
2395 watch_int (&watch_functionselector_num_of_recent);
2396 return watch_functionselector_num_of_recent.var;
2399 void
2400 gnm_conf_set_functionselector_num_of_recent (int x)
2402 if (!watch_functionselector_num_of_recent.handler)
2403 watch_int (&watch_functionselector_num_of_recent);
2404 set_int (&watch_functionselector_num_of_recent, x);
2408 * gnm_conf_get_functionselector_num_of_recent_node:
2410 * Returns: (transfer none): A #GOConfNode
2412 GOConfNode *
2413 gnm_conf_get_functionselector_num_of_recent_node (void)
2415 return get_watch_node (&watch_functionselector_num_of_recent);
2418 static struct cb_watch_string_list watch_functionselector_recentfunctions = {
2419 0, "functionselector/recentfunctions",
2420 "List of recently used functions.",
2421 "The function selector keeps a list of recently used functions. This is that list.",
2425 * gnm_conf_get_functionselector_recentfunctions:
2427 * Returns: (element-type utf8) (transfer none):
2429 GSList *
2430 gnm_conf_get_functionselector_recentfunctions (void)
2432 if (!watch_functionselector_recentfunctions.handler)
2433 watch_string_list (&watch_functionselector_recentfunctions);
2434 return watch_functionselector_recentfunctions.var;
2438 * gnm_conf_set_functionselector_recentfunctions:
2439 * @x: (element-type utf8): list of strings
2442 void
2443 gnm_conf_set_functionselector_recentfunctions (GSList *x)
2445 if (!watch_functionselector_recentfunctions.handler)
2446 watch_string_list (&watch_functionselector_recentfunctions);
2447 set_string_list (&watch_functionselector_recentfunctions, x);
2451 * gnm_conf_get_functionselector_recentfunctions_node:
2453 * Returns: (transfer none): A #GOConfNode
2455 GOConfNode *
2456 gnm_conf_get_functionselector_recentfunctions_node (void)
2458 return get_watch_node (&watch_functionselector_recentfunctions);
2461 static struct cb_watch_string watch_plugin_glpk_glpsol_path = {
2462 0, "plugin/glpk/glpsol-path",
2463 "Full path of glpsol program to use",
2464 "This is the full path to the glpsol binary that the lpsolve plugin should use.",
2468 const char *
2469 gnm_conf_get_plugin_glpk_glpsol_path (void)
2471 if (!watch_plugin_glpk_glpsol_path.handler)
2472 watch_string (&watch_plugin_glpk_glpsol_path);
2473 return watch_plugin_glpk_glpsol_path.var;
2476 void
2477 gnm_conf_set_plugin_glpk_glpsol_path (const char *x)
2479 g_return_if_fail (x != NULL);
2480 if (!watch_plugin_glpk_glpsol_path.handler)
2481 watch_string (&watch_plugin_glpk_glpsol_path);
2482 set_string (&watch_plugin_glpk_glpsol_path, x);
2486 * gnm_conf_get_plugin_glpk_glpsol_path_node:
2488 * Returns: (transfer none): A #GOConfNode
2490 GOConfNode *
2491 gnm_conf_get_plugin_glpk_glpsol_path_node (void)
2493 return get_watch_node (&watch_plugin_glpk_glpsol_path);
2496 static struct cb_watch_bool watch_plugin_latex_use_utf8 = {
2497 0, "plugin/latex/use-utf8",
2498 "Use UTF-8 in LaTeX Export",
2499 "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.",
2500 FALSE,
2503 gboolean
2504 gnm_conf_get_plugin_latex_use_utf8 (void)
2506 if (!watch_plugin_latex_use_utf8.handler)
2507 watch_bool (&watch_plugin_latex_use_utf8);
2508 return watch_plugin_latex_use_utf8.var;
2511 void
2512 gnm_conf_set_plugin_latex_use_utf8 (gboolean x)
2514 if (!watch_plugin_latex_use_utf8.handler)
2515 watch_bool (&watch_plugin_latex_use_utf8);
2516 set_bool (&watch_plugin_latex_use_utf8, x);
2520 * gnm_conf_get_plugin_latex_use_utf8_node:
2522 * Returns: (transfer none): A #GOConfNode
2524 GOConfNode *
2525 gnm_conf_get_plugin_latex_use_utf8_node (void)
2527 return get_watch_node (&watch_plugin_latex_use_utf8);
2530 static struct cb_watch_string watch_plugin_lpsolve_lpsolve_path = {
2531 0, "plugin/lpsolve/lpsolve-path",
2532 "Full path of lp_solve program to use",
2533 "This is the full path to the lp_solve binary that the lpsolve plugin should use.",
2537 const char *
2538 gnm_conf_get_plugin_lpsolve_lpsolve_path (void)
2540 if (!watch_plugin_lpsolve_lpsolve_path.handler)
2541 watch_string (&watch_plugin_lpsolve_lpsolve_path);
2542 return watch_plugin_lpsolve_lpsolve_path.var;
2545 void
2546 gnm_conf_set_plugin_lpsolve_lpsolve_path (const char *x)
2548 g_return_if_fail (x != NULL);
2549 if (!watch_plugin_lpsolve_lpsolve_path.handler)
2550 watch_string (&watch_plugin_lpsolve_lpsolve_path);
2551 set_string (&watch_plugin_lpsolve_lpsolve_path, x);
2555 * gnm_conf_get_plugin_lpsolve_lpsolve_path_node:
2557 * Returns: (transfer none): A #GOConfNode
2559 GOConfNode *
2560 gnm_conf_get_plugin_lpsolve_lpsolve_path_node (void)
2562 return get_watch_node (&watch_plugin_lpsolve_lpsolve_path);
2565 static struct cb_watch_bool watch_plugins_activate_newplugins = {
2566 0, "plugins/activate-newplugins",
2567 "Activate New Plugins",
2568 "This variable determines whether to activate every new encountered plugin.",
2569 TRUE,
2572 gboolean
2573 gnm_conf_get_plugins_activate_newplugins (void)
2575 if (!watch_plugins_activate_newplugins.handler)
2576 watch_bool (&watch_plugins_activate_newplugins);
2577 return watch_plugins_activate_newplugins.var;
2580 void
2581 gnm_conf_set_plugins_activate_newplugins (gboolean x)
2583 if (!watch_plugins_activate_newplugins.handler)
2584 watch_bool (&watch_plugins_activate_newplugins);
2585 set_bool (&watch_plugins_activate_newplugins, x);
2589 * gnm_conf_get_plugins_activate_newplugins_node:
2591 * Returns: (transfer none): A #GOConfNode
2593 GOConfNode *
2594 gnm_conf_get_plugins_activate_newplugins_node (void)
2596 return get_watch_node (&watch_plugins_activate_newplugins);
2599 static struct cb_watch_string_list watch_plugins_active = {
2600 0, "plugins/active",
2601 "List of Active Plugins.",
2602 "This list contains all plugins that are supposed to be automatically activated.",
2606 * gnm_conf_get_plugins_active:
2608 * Returns: (element-type utf8) (transfer none):
2610 GSList *
2611 gnm_conf_get_plugins_active (void)
2613 if (!watch_plugins_active.handler)
2614 watch_string_list (&watch_plugins_active);
2615 return watch_plugins_active.var;
2619 * gnm_conf_set_plugins_active:
2620 * @x: (element-type utf8): list of strings
2623 void
2624 gnm_conf_set_plugins_active (GSList *x)
2626 if (!watch_plugins_active.handler)
2627 watch_string_list (&watch_plugins_active);
2628 set_string_list (&watch_plugins_active, x);
2632 * gnm_conf_get_plugins_active_node:
2634 * Returns: (transfer none): A #GOConfNode
2636 GOConfNode *
2637 gnm_conf_get_plugins_active_node (void)
2639 return get_watch_node (&watch_plugins_active);
2642 static struct cb_watch_string_list watch_plugins_extra_dirs = {
2643 0, "plugins/extra-dirs",
2644 "List of Extra Plugin Directories.",
2645 "This list contains all extra directories containing plugins.",
2649 * gnm_conf_get_plugins_extra_dirs:
2651 * Returns: (element-type utf8) (transfer none):
2653 GSList *
2654 gnm_conf_get_plugins_extra_dirs (void)
2656 if (!watch_plugins_extra_dirs.handler)
2657 watch_string_list (&watch_plugins_extra_dirs);
2658 return watch_plugins_extra_dirs.var;
2662 * gnm_conf_set_plugins_extra_dirs:
2663 * @x: (element-type utf8): list of strings
2666 void
2667 gnm_conf_set_plugins_extra_dirs (GSList *x)
2669 if (!watch_plugins_extra_dirs.handler)
2670 watch_string_list (&watch_plugins_extra_dirs);
2671 set_string_list (&watch_plugins_extra_dirs, x);
2675 * gnm_conf_get_plugins_extra_dirs_node:
2677 * Returns: (transfer none): A #GOConfNode
2679 GOConfNode *
2680 gnm_conf_get_plugins_extra_dirs_node (void)
2682 return get_watch_node (&watch_plugins_extra_dirs);
2685 static struct cb_watch_string_list watch_plugins_file_states = {
2686 0, "plugins/file-states",
2687 "List of Plugin File States.",
2688 "This list contains all plugin file states.",
2692 * gnm_conf_get_plugins_file_states:
2694 * Returns: (element-type utf8) (transfer none):
2696 GSList *
2697 gnm_conf_get_plugins_file_states (void)
2699 if (!watch_plugins_file_states.handler)
2700 watch_string_list (&watch_plugins_file_states);
2701 return watch_plugins_file_states.var;
2705 * gnm_conf_set_plugins_file_states:
2706 * @x: (element-type utf8): list of strings
2709 void
2710 gnm_conf_set_plugins_file_states (GSList *x)
2712 if (!watch_plugins_file_states.handler)
2713 watch_string_list (&watch_plugins_file_states);
2714 set_string_list (&watch_plugins_file_states, x);
2718 * gnm_conf_get_plugins_file_states_node:
2720 * Returns: (transfer none): A #GOConfNode
2722 GOConfNode *
2723 gnm_conf_get_plugins_file_states_node (void)
2725 return get_watch_node (&watch_plugins_file_states);
2728 static struct cb_watch_string_list watch_plugins_known = {
2729 0, "plugins/known",
2730 "List of Known Plugins.",
2731 "This list contains all known plugins.",
2735 * gnm_conf_get_plugins_known:
2737 * Returns: (element-type utf8) (transfer none):
2739 GSList *
2740 gnm_conf_get_plugins_known (void)
2742 if (!watch_plugins_known.handler)
2743 watch_string_list (&watch_plugins_known);
2744 return watch_plugins_known.var;
2748 * gnm_conf_set_plugins_known:
2749 * @x: (element-type utf8): list of strings
2752 void
2753 gnm_conf_set_plugins_known (GSList *x)
2755 if (!watch_plugins_known.handler)
2756 watch_string_list (&watch_plugins_known);
2757 set_string_list (&watch_plugins_known, x);
2761 * gnm_conf_get_plugins_known_node:
2763 * Returns: (transfer none): A #GOConfNode
2765 GOConfNode *
2766 gnm_conf_get_plugins_known_node (void)
2768 return get_watch_node (&watch_plugins_known);
2771 static struct cb_watch_bool watch_printsetup_across_then_down = {
2772 0, "printsetup/across-then-down",
2773 "Default Print Direction",
2774 "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.",
2775 FALSE,
2778 gboolean
2779 gnm_conf_get_printsetup_across_then_down (void)
2781 if (!watch_printsetup_across_then_down.handler)
2782 watch_bool (&watch_printsetup_across_then_down);
2783 return watch_printsetup_across_then_down.var;
2786 void
2787 gnm_conf_set_printsetup_across_then_down (gboolean x)
2789 if (!watch_printsetup_across_then_down.handler)
2790 watch_bool (&watch_printsetup_across_then_down);
2791 set_bool (&watch_printsetup_across_then_down, x);
2795 * gnm_conf_get_printsetup_across_then_down_node:
2797 * Returns: (transfer none): A #GOConfNode
2799 GOConfNode *
2800 gnm_conf_get_printsetup_across_then_down_node (void)
2802 return get_watch_node (&watch_printsetup_across_then_down);
2805 static struct cb_watch_bool watch_printsetup_all_sheets = {
2806 0, "printsetup/all-sheets",
2807 "Apply print-setup to all sheets",
2808 "This value determines whether by default the print set-up dialog applies to all sheets simultaneously.",
2809 FALSE,
2812 gboolean
2813 gnm_conf_get_printsetup_all_sheets (void)
2815 if (!watch_printsetup_all_sheets.handler)
2816 watch_bool (&watch_printsetup_all_sheets);
2817 return watch_printsetup_all_sheets.var;
2820 void
2821 gnm_conf_set_printsetup_all_sheets (gboolean x)
2823 if (!watch_printsetup_all_sheets.handler)
2824 watch_bool (&watch_printsetup_all_sheets);
2825 set_bool (&watch_printsetup_all_sheets, x);
2829 * gnm_conf_get_printsetup_all_sheets_node:
2831 * Returns: (transfer none): A #GOConfNode
2833 GOConfNode *
2834 gnm_conf_get_printsetup_all_sheets_node (void)
2836 return get_watch_node (&watch_printsetup_all_sheets);
2839 static struct cb_watch_bool watch_printsetup_center_horizontally = {
2840 0, "printsetup/center-horizontally",
2841 "Default Horizontal Centering",
2842 "This value determines whether the default setting in the Print Setup dialog is to center pages horizontally.",
2843 FALSE,
2846 gboolean
2847 gnm_conf_get_printsetup_center_horizontally (void)
2849 if (!watch_printsetup_center_horizontally.handler)
2850 watch_bool (&watch_printsetup_center_horizontally);
2851 return watch_printsetup_center_horizontally.var;
2854 void
2855 gnm_conf_set_printsetup_center_horizontally (gboolean x)
2857 if (!watch_printsetup_center_horizontally.handler)
2858 watch_bool (&watch_printsetup_center_horizontally);
2859 set_bool (&watch_printsetup_center_horizontally, x);
2863 * gnm_conf_get_printsetup_center_horizontally_node:
2865 * Returns: (transfer none): A #GOConfNode
2867 GOConfNode *
2868 gnm_conf_get_printsetup_center_horizontally_node (void)
2870 return get_watch_node (&watch_printsetup_center_horizontally);
2873 static struct cb_watch_bool watch_printsetup_center_vertically = {
2874 0, "printsetup/center-vertically",
2875 "Default Vertical Centering",
2876 "This value determines whether the default setting in the Print Setup dialog is to center pages vertically.",
2877 FALSE,
2880 gboolean
2881 gnm_conf_get_printsetup_center_vertically (void)
2883 if (!watch_printsetup_center_vertically.handler)
2884 watch_bool (&watch_printsetup_center_vertically);
2885 return watch_printsetup_center_vertically.var;
2888 void
2889 gnm_conf_set_printsetup_center_vertically (gboolean x)
2891 if (!watch_printsetup_center_vertically.handler)
2892 watch_bool (&watch_printsetup_center_vertically);
2893 set_bool (&watch_printsetup_center_vertically, x);
2897 * gnm_conf_get_printsetup_center_vertically_node:
2899 * Returns: (transfer none): A #GOConfNode
2901 GOConfNode *
2902 gnm_conf_get_printsetup_center_vertically_node (void)
2904 return get_watch_node (&watch_printsetup_center_vertically);
2907 static struct cb_watch_string_list watch_printsetup_footer = {
2908 0, "printsetup/footer",
2909 "Page Footer",
2910 "The default page footer for new documents that can be modified using the\n page setup dialog.",
2914 * gnm_conf_get_printsetup_footer:
2916 * Returns: (element-type utf8) (transfer none):
2918 GSList *
2919 gnm_conf_get_printsetup_footer (void)
2921 if (!watch_printsetup_footer.handler)
2922 watch_string_list (&watch_printsetup_footer);
2923 return watch_printsetup_footer.var;
2927 * gnm_conf_set_printsetup_footer:
2928 * @x: (element-type utf8): list of strings
2931 void
2932 gnm_conf_set_printsetup_footer (GSList *x)
2934 if (!watch_printsetup_footer.handler)
2935 watch_string_list (&watch_printsetup_footer);
2936 set_string_list (&watch_printsetup_footer, x);
2940 * gnm_conf_get_printsetup_footer_node:
2942 * Returns: (transfer none): A #GOConfNode
2944 GOConfNode *
2945 gnm_conf_get_printsetup_footer_node (void)
2947 return get_watch_node (&watch_printsetup_footer);
2950 static struct cb_watch_string_list watch_printsetup_gtk_setting = {
2951 0, "printsetup/gtk-setting",
2952 "GTKPrintSetting",
2953 "The configuration of GTKPrintSetting. Do not edit this variable.",
2957 * gnm_conf_get_printsetup_gtk_setting:
2959 * Returns: (element-type utf8) (transfer none):
2961 GSList *
2962 gnm_conf_get_printsetup_gtk_setting (void)
2964 if (!watch_printsetup_gtk_setting.handler)
2965 watch_string_list (&watch_printsetup_gtk_setting);
2966 return watch_printsetup_gtk_setting.var;
2970 * gnm_conf_set_printsetup_gtk_setting:
2971 * @x: (element-type utf8): list of strings
2974 void
2975 gnm_conf_set_printsetup_gtk_setting (GSList *x)
2977 if (!watch_printsetup_gtk_setting.handler)
2978 watch_string_list (&watch_printsetup_gtk_setting);
2979 set_string_list (&watch_printsetup_gtk_setting, x);
2983 * gnm_conf_get_printsetup_gtk_setting_node:
2985 * Returns: (transfer none): A #GOConfNode
2987 GOConfNode *
2988 gnm_conf_get_printsetup_gtk_setting_node (void)
2990 return get_watch_node (&watch_printsetup_gtk_setting);
2993 static struct cb_watch_string_list watch_printsetup_header = {
2994 0, "printsetup/header",
2995 "Page Header",
2996 "The default page header for new documents that can be modified using the\n page setup dialog.",
3000 * gnm_conf_get_printsetup_header:
3002 * Returns: (element-type utf8) (transfer none):
3004 GSList *
3005 gnm_conf_get_printsetup_header (void)
3007 if (!watch_printsetup_header.handler)
3008 watch_string_list (&watch_printsetup_header);
3009 return watch_printsetup_header.var;
3013 * gnm_conf_set_printsetup_header:
3014 * @x: (element-type utf8): list of strings
3017 void
3018 gnm_conf_set_printsetup_header (GSList *x)
3020 if (!watch_printsetup_header.handler)
3021 watch_string_list (&watch_printsetup_header);
3022 set_string_list (&watch_printsetup_header, x);
3026 * gnm_conf_get_printsetup_header_node:
3028 * Returns: (transfer none): A #GOConfNode
3030 GOConfNode *
3031 gnm_conf_get_printsetup_header_node (void)
3033 return get_watch_node (&watch_printsetup_header);
3036 static struct cb_watch_bool watch_printsetup_hf_font_bold = {
3037 0, "printsetup/hf-font-bold",
3038 "The default header/footer font is bold.",
3039 "This value determines whether the default font for headers and footers is bold.",
3040 FALSE,
3043 gboolean
3044 gnm_conf_get_printsetup_hf_font_bold (void)
3046 if (!watch_printsetup_hf_font_bold.handler)
3047 watch_bool (&watch_printsetup_hf_font_bold);
3048 return watch_printsetup_hf_font_bold.var;
3051 void
3052 gnm_conf_set_printsetup_hf_font_bold (gboolean x)
3054 if (!watch_printsetup_hf_font_bold.handler)
3055 watch_bool (&watch_printsetup_hf_font_bold);
3056 set_bool (&watch_printsetup_hf_font_bold, x);
3060 * gnm_conf_get_printsetup_hf_font_bold_node:
3062 * Returns: (transfer none): A #GOConfNode
3064 GOConfNode *
3065 gnm_conf_get_printsetup_hf_font_bold_node (void)
3067 return get_watch_node (&watch_printsetup_hf_font_bold);
3070 static struct cb_watch_bool watch_printsetup_hf_font_italic = {
3071 0, "printsetup/hf-font-italic",
3072 "The default header/footer font is italic.",
3073 "This value determines whether the default font for headers and footers is italic.",
3074 FALSE,
3077 gboolean
3078 gnm_conf_get_printsetup_hf_font_italic (void)
3080 if (!watch_printsetup_hf_font_italic.handler)
3081 watch_bool (&watch_printsetup_hf_font_italic);
3082 return watch_printsetup_hf_font_italic.var;
3085 void
3086 gnm_conf_set_printsetup_hf_font_italic (gboolean x)
3088 if (!watch_printsetup_hf_font_italic.handler)
3089 watch_bool (&watch_printsetup_hf_font_italic);
3090 set_bool (&watch_printsetup_hf_font_italic, x);
3094 * gnm_conf_get_printsetup_hf_font_italic_node:
3096 * Returns: (transfer none): A #GOConfNode
3098 GOConfNode *
3099 gnm_conf_get_printsetup_hf_font_italic_node (void)
3101 return get_watch_node (&watch_printsetup_hf_font_italic);
3104 static struct cb_watch_string watch_printsetup_hf_font_name = {
3105 0, "printsetup/hf-font-name",
3106 "Default header/footer font name",
3107 "The default font name for headers and footers.",
3108 "Sans",
3111 const char *
3112 gnm_conf_get_printsetup_hf_font_name (void)
3114 if (!watch_printsetup_hf_font_name.handler)
3115 watch_string (&watch_printsetup_hf_font_name);
3116 return watch_printsetup_hf_font_name.var;
3119 void
3120 gnm_conf_set_printsetup_hf_font_name (const char *x)
3122 g_return_if_fail (x != NULL);
3123 if (!watch_printsetup_hf_font_name.handler)
3124 watch_string (&watch_printsetup_hf_font_name);
3125 set_string (&watch_printsetup_hf_font_name, x);
3129 * gnm_conf_get_printsetup_hf_font_name_node:
3131 * Returns: (transfer none): A #GOConfNode
3133 GOConfNode *
3134 gnm_conf_get_printsetup_hf_font_name_node (void)
3136 return get_watch_node (&watch_printsetup_hf_font_name);
3139 static struct cb_watch_double watch_printsetup_hf_font_size = {
3140 0, "printsetup/hf-font-size",
3141 "Default Header/Footer Font Size",
3142 "The default font size for headers and footers.",
3143 1, 100, 10,
3146 double
3147 gnm_conf_get_printsetup_hf_font_size (void)
3149 if (!watch_printsetup_hf_font_size.handler)
3150 watch_double (&watch_printsetup_hf_font_size);
3151 return watch_printsetup_hf_font_size.var;
3154 void
3155 gnm_conf_set_printsetup_hf_font_size (double x)
3157 if (!watch_printsetup_hf_font_size.handler)
3158 watch_double (&watch_printsetup_hf_font_size);
3159 set_double (&watch_printsetup_hf_font_size, x);
3163 * gnm_conf_get_printsetup_hf_font_size_node:
3165 * Returns: (transfer none): A #GOConfNode
3167 GOConfNode *
3168 gnm_conf_get_printsetup_hf_font_size_node (void)
3170 return get_watch_node (&watch_printsetup_hf_font_size);
3173 static struct cb_watch_string_list watch_printsetup_hf_left = {
3174 0, "printsetup/hf-left",
3175 "Header/Footer Format (Left Portion)",
3176 "Please use the Print Setup dialog to edit this value.",
3180 * gnm_conf_get_printsetup_hf_left:
3182 * Returns: (element-type utf8) (transfer none):
3184 GSList *
3185 gnm_conf_get_printsetup_hf_left (void)
3187 if (!watch_printsetup_hf_left.handler)
3188 watch_string_list (&watch_printsetup_hf_left);
3189 return watch_printsetup_hf_left.var;
3193 * gnm_conf_set_printsetup_hf_left:
3194 * @x: (element-type utf8): list of strings
3197 void
3198 gnm_conf_set_printsetup_hf_left (GSList *x)
3200 if (!watch_printsetup_hf_left.handler)
3201 watch_string_list (&watch_printsetup_hf_left);
3202 set_string_list (&watch_printsetup_hf_left, x);
3206 * gnm_conf_get_printsetup_hf_left_node:
3208 * Returns: (transfer none): A #GOConfNode
3210 GOConfNode *
3211 gnm_conf_get_printsetup_hf_left_node (void)
3213 return get_watch_node (&watch_printsetup_hf_left);
3216 static struct cb_watch_string_list watch_printsetup_hf_middle = {
3217 0, "printsetup/hf-middle",
3218 "Header/Footer Format (Middle Portion)",
3219 "Please use the Print Setup dialog to edit this value.",
3223 * gnm_conf_get_printsetup_hf_middle:
3225 * Returns: (element-type utf8) (transfer none):
3227 GSList *
3228 gnm_conf_get_printsetup_hf_middle (void)
3230 if (!watch_printsetup_hf_middle.handler)
3231 watch_string_list (&watch_printsetup_hf_middle);
3232 return watch_printsetup_hf_middle.var;
3236 * gnm_conf_set_printsetup_hf_middle:
3237 * @x: (element-type utf8): list of strings
3240 void
3241 gnm_conf_set_printsetup_hf_middle (GSList *x)
3243 if (!watch_printsetup_hf_middle.handler)
3244 watch_string_list (&watch_printsetup_hf_middle);
3245 set_string_list (&watch_printsetup_hf_middle, x);
3249 * gnm_conf_get_printsetup_hf_middle_node:
3251 * Returns: (transfer none): A #GOConfNode
3253 GOConfNode *
3254 gnm_conf_get_printsetup_hf_middle_node (void)
3256 return get_watch_node (&watch_printsetup_hf_middle);
3259 static struct cb_watch_string_list watch_printsetup_hf_right = {
3260 0, "printsetup/hf-right",
3261 "Header/Footer Format (Right Portion)",
3262 "Please use the Print Setup dialog to edit this value.",
3266 * gnm_conf_get_printsetup_hf_right:
3268 * Returns: (element-type utf8) (transfer none):
3270 GSList *
3271 gnm_conf_get_printsetup_hf_right (void)
3273 if (!watch_printsetup_hf_right.handler)
3274 watch_string_list (&watch_printsetup_hf_right);
3275 return watch_printsetup_hf_right.var;
3279 * gnm_conf_set_printsetup_hf_right:
3280 * @x: (element-type utf8): list of strings
3283 void
3284 gnm_conf_set_printsetup_hf_right (GSList *x)
3286 if (!watch_printsetup_hf_right.handler)
3287 watch_string_list (&watch_printsetup_hf_right);
3288 set_string_list (&watch_printsetup_hf_right, x);
3292 * gnm_conf_get_printsetup_hf_right_node:
3294 * Returns: (transfer none): A #GOConfNode
3296 GOConfNode *
3297 gnm_conf_get_printsetup_hf_right_node (void)
3299 return get_watch_node (&watch_printsetup_hf_right);
3302 static struct cb_watch_double watch_printsetup_margin_bottom = {
3303 0, "printsetup/margin-bottom",
3304 "Default Bottom Margin",
3305 "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.",
3306 0, 10000, 120,
3309 double
3310 gnm_conf_get_printsetup_margin_bottom (void)
3312 if (!watch_printsetup_margin_bottom.handler)
3313 watch_double (&watch_printsetup_margin_bottom);
3314 return watch_printsetup_margin_bottom.var;
3317 void
3318 gnm_conf_set_printsetup_margin_bottom (double x)
3320 if (!watch_printsetup_margin_bottom.handler)
3321 watch_double (&watch_printsetup_margin_bottom);
3322 set_double (&watch_printsetup_margin_bottom, x);
3326 * gnm_conf_get_printsetup_margin_bottom_node:
3328 * Returns: (transfer none): A #GOConfNode
3330 GOConfNode *
3331 gnm_conf_get_printsetup_margin_bottom_node (void)
3333 return get_watch_node (&watch_printsetup_margin_bottom);
3336 static struct cb_watch_double watch_printsetup_margin_gtk_bottom = {
3337 0, "printsetup/margin-gtk-bottom",
3338 "Default Bottom Outside Margin",
3339 "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.",
3340 0, 720, 72,
3343 double
3344 gnm_conf_get_printsetup_margin_gtk_bottom (void)
3346 if (!watch_printsetup_margin_gtk_bottom.handler)
3347 watch_double (&watch_printsetup_margin_gtk_bottom);
3348 return watch_printsetup_margin_gtk_bottom.var;
3351 void
3352 gnm_conf_set_printsetup_margin_gtk_bottom (double x)
3354 if (!watch_printsetup_margin_gtk_bottom.handler)
3355 watch_double (&watch_printsetup_margin_gtk_bottom);
3356 set_double (&watch_printsetup_margin_gtk_bottom, x);
3360 * gnm_conf_get_printsetup_margin_gtk_bottom_node:
3362 * Returns: (transfer none): A #GOConfNode
3364 GOConfNode *
3365 gnm_conf_get_printsetup_margin_gtk_bottom_node (void)
3367 return get_watch_node (&watch_printsetup_margin_gtk_bottom);
3370 static struct cb_watch_double watch_printsetup_margin_gtk_left = {
3371 0, "printsetup/margin-gtk-left",
3372 "Default Left Margin",
3373 "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.",
3374 0, 720, 72,
3377 double
3378 gnm_conf_get_printsetup_margin_gtk_left (void)
3380 if (!watch_printsetup_margin_gtk_left.handler)
3381 watch_double (&watch_printsetup_margin_gtk_left);
3382 return watch_printsetup_margin_gtk_left.var;
3385 void
3386 gnm_conf_set_printsetup_margin_gtk_left (double x)
3388 if (!watch_printsetup_margin_gtk_left.handler)
3389 watch_double (&watch_printsetup_margin_gtk_left);
3390 set_double (&watch_printsetup_margin_gtk_left, x);
3394 * gnm_conf_get_printsetup_margin_gtk_left_node:
3396 * Returns: (transfer none): A #GOConfNode
3398 GOConfNode *
3399 gnm_conf_get_printsetup_margin_gtk_left_node (void)
3401 return get_watch_node (&watch_printsetup_margin_gtk_left);
3404 static struct cb_watch_double watch_printsetup_margin_gtk_right = {
3405 0, "printsetup/margin-gtk-right",
3406 "Default Right Margin",
3407 "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.",
3408 0, 720, 72,
3411 double
3412 gnm_conf_get_printsetup_margin_gtk_right (void)
3414 if (!watch_printsetup_margin_gtk_right.handler)
3415 watch_double (&watch_printsetup_margin_gtk_right);
3416 return watch_printsetup_margin_gtk_right.var;
3419 void
3420 gnm_conf_set_printsetup_margin_gtk_right (double x)
3422 if (!watch_printsetup_margin_gtk_right.handler)
3423 watch_double (&watch_printsetup_margin_gtk_right);
3424 set_double (&watch_printsetup_margin_gtk_right, x);
3428 * gnm_conf_get_printsetup_margin_gtk_right_node:
3430 * Returns: (transfer none): A #GOConfNode
3432 GOConfNode *
3433 gnm_conf_get_printsetup_margin_gtk_right_node (void)
3435 return get_watch_node (&watch_printsetup_margin_gtk_right);
3438 static struct cb_watch_double watch_printsetup_margin_gtk_top = {
3439 0, "printsetup/margin-gtk-top",
3440 "Default Top Outside Margin",
3441 "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.",
3442 0, 720, 72,
3445 double
3446 gnm_conf_get_printsetup_margin_gtk_top (void)
3448 if (!watch_printsetup_margin_gtk_top.handler)
3449 watch_double (&watch_printsetup_margin_gtk_top);
3450 return watch_printsetup_margin_gtk_top.var;
3453 void
3454 gnm_conf_set_printsetup_margin_gtk_top (double x)
3456 if (!watch_printsetup_margin_gtk_top.handler)
3457 watch_double (&watch_printsetup_margin_gtk_top);
3458 set_double (&watch_printsetup_margin_gtk_top, x);
3462 * gnm_conf_get_printsetup_margin_gtk_top_node:
3464 * Returns: (transfer none): A #GOConfNode
3466 GOConfNode *
3467 gnm_conf_get_printsetup_margin_gtk_top_node (void)
3469 return get_watch_node (&watch_printsetup_margin_gtk_top);
3472 static struct cb_watch_double watch_printsetup_margin_top = {
3473 0, "printsetup/margin-top",
3474 "Default Top Margin",
3475 "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.",
3476 0, 10000, 120,
3479 double
3480 gnm_conf_get_printsetup_margin_top (void)
3482 if (!watch_printsetup_margin_top.handler)
3483 watch_double (&watch_printsetup_margin_top);
3484 return watch_printsetup_margin_top.var;
3487 void
3488 gnm_conf_set_printsetup_margin_top (double x)
3490 if (!watch_printsetup_margin_top.handler)
3491 watch_double (&watch_printsetup_margin_top);
3492 set_double (&watch_printsetup_margin_top, x);
3496 * gnm_conf_get_printsetup_margin_top_node:
3498 * Returns: (transfer none): A #GOConfNode
3500 GOConfNode *
3501 gnm_conf_get_printsetup_margin_top_node (void)
3503 return get_watch_node (&watch_printsetup_margin_top);
3506 static struct cb_watch_string watch_printsetup_paper = {
3507 0, "printsetup/paper",
3508 "Paper",
3509 "This is the default paper specification. Please use the Print Setup dialog to edit this value.",
3513 const char *
3514 gnm_conf_get_printsetup_paper (void)
3516 if (!watch_printsetup_paper.handler)
3517 watch_string (&watch_printsetup_paper);
3518 return watch_printsetup_paper.var;
3521 void
3522 gnm_conf_set_printsetup_paper (const char *x)
3524 g_return_if_fail (x != NULL);
3525 if (!watch_printsetup_paper.handler)
3526 watch_string (&watch_printsetup_paper);
3527 set_string (&watch_printsetup_paper, x);
3531 * gnm_conf_get_printsetup_paper_node:
3533 * Returns: (transfer none): A #GOConfNode
3535 GOConfNode *
3536 gnm_conf_get_printsetup_paper_node (void)
3538 return get_watch_node (&watch_printsetup_paper);
3541 static struct cb_watch_int watch_printsetup_paper_orientation = {
3542 0, "printsetup/paper-orientation",
3543 "Paper orientation",
3544 "This is the default paper orientation. Please use the Print Setup dialog to edit this value.",
3545 GTK_PAGE_ORIENTATION_PORTRAIT, GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE, 0,
3549 gnm_conf_get_printsetup_paper_orientation (void)
3551 if (!watch_printsetup_paper_orientation.handler)
3552 watch_int (&watch_printsetup_paper_orientation);
3553 return watch_printsetup_paper_orientation.var;
3556 void
3557 gnm_conf_set_printsetup_paper_orientation (int x)
3559 if (!watch_printsetup_paper_orientation.handler)
3560 watch_int (&watch_printsetup_paper_orientation);
3561 set_int (&watch_printsetup_paper_orientation, x);
3565 * gnm_conf_get_printsetup_paper_orientation_node:
3567 * Returns: (transfer none): A #GOConfNode
3569 GOConfNode *
3570 gnm_conf_get_printsetup_paper_orientation_node (void)
3572 return get_watch_node (&watch_printsetup_paper_orientation);
3575 static struct cb_watch_enum watch_printsetup_preferred_unit = {
3576 0, "printsetup/preferred-unit",
3577 "Preferred Display Unit",
3578 "This string gives the default unit to be used in the page setup dialog.",
3579 GTK_UNIT_MM,
3582 GtkUnit
3583 gnm_conf_get_printsetup_preferred_unit (void)
3585 if (!watch_printsetup_preferred_unit.handler)
3586 watch_enum (&watch_printsetup_preferred_unit, GTK_TYPE_UNIT);
3587 return watch_printsetup_preferred_unit.var;
3590 void
3591 gnm_conf_set_printsetup_preferred_unit (GtkUnit x)
3593 if (!watch_printsetup_preferred_unit.handler)
3594 watch_enum (&watch_printsetup_preferred_unit, GTK_TYPE_UNIT);
3595 set_enum (&watch_printsetup_preferred_unit, x);
3599 * gnm_conf_get_printsetup_preferred_unit_node:
3601 * Returns: (transfer none): A #GOConfNode
3603 GOConfNode *
3604 gnm_conf_get_printsetup_preferred_unit_node (void)
3606 return get_watch_node (&watch_printsetup_preferred_unit);
3609 static struct cb_watch_bool watch_printsetup_print_black_n_white = {
3610 0, "printsetup/print-black-n-white",
3611 "Default Black and White Printing",
3612 "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.",
3613 FALSE,
3616 gboolean
3617 gnm_conf_get_printsetup_print_black_n_white (void)
3619 if (!watch_printsetup_print_black_n_white.handler)
3620 watch_bool (&watch_printsetup_print_black_n_white);
3621 return watch_printsetup_print_black_n_white.var;
3624 void
3625 gnm_conf_set_printsetup_print_black_n_white (gboolean x)
3627 if (!watch_printsetup_print_black_n_white.handler)
3628 watch_bool (&watch_printsetup_print_black_n_white);
3629 set_bool (&watch_printsetup_print_black_n_white, x);
3633 * gnm_conf_get_printsetup_print_black_n_white_node:
3635 * Returns: (transfer none): A #GOConfNode
3637 GOConfNode *
3638 gnm_conf_get_printsetup_print_black_n_white_node (void)
3640 return get_watch_node (&watch_printsetup_print_black_n_white);
3643 static struct cb_watch_bool watch_printsetup_print_even_if_only_styles = {
3644 0, "printsetup/print-even-if-only-styles",
3645 "Default Print Cells with Only Styles",
3646 "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.",
3647 FALSE,
3650 gboolean
3651 gnm_conf_get_printsetup_print_even_if_only_styles (void)
3653 if (!watch_printsetup_print_even_if_only_styles.handler)
3654 watch_bool (&watch_printsetup_print_even_if_only_styles);
3655 return watch_printsetup_print_even_if_only_styles.var;
3658 void
3659 gnm_conf_set_printsetup_print_even_if_only_styles (gboolean x)
3661 if (!watch_printsetup_print_even_if_only_styles.handler)
3662 watch_bool (&watch_printsetup_print_even_if_only_styles);
3663 set_bool (&watch_printsetup_print_even_if_only_styles, x);
3667 * gnm_conf_get_printsetup_print_even_if_only_styles_node:
3669 * Returns: (transfer none): A #GOConfNode
3671 GOConfNode *
3672 gnm_conf_get_printsetup_print_even_if_only_styles_node (void)
3674 return get_watch_node (&watch_printsetup_print_even_if_only_styles);
3677 static struct cb_watch_bool watch_printsetup_print_grid_lines = {
3678 0, "printsetup/print-grid-lines",
3679 "Default Grid Line Printing",
3680 "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.",
3681 FALSE,
3684 gboolean
3685 gnm_conf_get_printsetup_print_grid_lines (void)
3687 if (!watch_printsetup_print_grid_lines.handler)
3688 watch_bool (&watch_printsetup_print_grid_lines);
3689 return watch_printsetup_print_grid_lines.var;
3692 void
3693 gnm_conf_set_printsetup_print_grid_lines (gboolean x)
3695 if (!watch_printsetup_print_grid_lines.handler)
3696 watch_bool (&watch_printsetup_print_grid_lines);
3697 set_bool (&watch_printsetup_print_grid_lines, x);
3701 * gnm_conf_get_printsetup_print_grid_lines_node:
3703 * Returns: (transfer none): A #GOConfNode
3705 GOConfNode *
3706 gnm_conf_get_printsetup_print_grid_lines_node (void)
3708 return get_watch_node (&watch_printsetup_print_grid_lines);
3711 static struct cb_watch_bool watch_printsetup_print_titles = {
3712 0, "printsetup/print-titles",
3713 "Default Title Printing",
3714 "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.",
3715 FALSE,
3718 gboolean
3719 gnm_conf_get_printsetup_print_titles (void)
3721 if (!watch_printsetup_print_titles.handler)
3722 watch_bool (&watch_printsetup_print_titles);
3723 return watch_printsetup_print_titles.var;
3726 void
3727 gnm_conf_set_printsetup_print_titles (gboolean x)
3729 if (!watch_printsetup_print_titles.handler)
3730 watch_bool (&watch_printsetup_print_titles);
3731 set_bool (&watch_printsetup_print_titles, x);
3735 * gnm_conf_get_printsetup_print_titles_node:
3737 * Returns: (transfer none): A #GOConfNode
3739 GOConfNode *
3740 gnm_conf_get_printsetup_print_titles_node (void)
3742 return get_watch_node (&watch_printsetup_print_titles);
3745 static struct cb_watch_string watch_printsetup_repeat_left = {
3746 0, "printsetup/repeat-left",
3747 "Default Repeated Left Region",
3748 "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.",
3752 const char *
3753 gnm_conf_get_printsetup_repeat_left (void)
3755 if (!watch_printsetup_repeat_left.handler)
3756 watch_string (&watch_printsetup_repeat_left);
3757 return watch_printsetup_repeat_left.var;
3760 void
3761 gnm_conf_set_printsetup_repeat_left (const char *x)
3763 g_return_if_fail (x != NULL);
3764 if (!watch_printsetup_repeat_left.handler)
3765 watch_string (&watch_printsetup_repeat_left);
3766 set_string (&watch_printsetup_repeat_left, x);
3770 * gnm_conf_get_printsetup_repeat_left_node:
3772 * Returns: (transfer none): A #GOConfNode
3774 GOConfNode *
3775 gnm_conf_get_printsetup_repeat_left_node (void)
3777 return get_watch_node (&watch_printsetup_repeat_left);
3780 static struct cb_watch_string watch_printsetup_repeat_top = {
3781 0, "printsetup/repeat-top",
3782 "Default Repeated Top Region",
3783 "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.",
3787 const char *
3788 gnm_conf_get_printsetup_repeat_top (void)
3790 if (!watch_printsetup_repeat_top.handler)
3791 watch_string (&watch_printsetup_repeat_top);
3792 return watch_printsetup_repeat_top.var;
3795 void
3796 gnm_conf_set_printsetup_repeat_top (const char *x)
3798 g_return_if_fail (x != NULL);
3799 if (!watch_printsetup_repeat_top.handler)
3800 watch_string (&watch_printsetup_repeat_top);
3801 set_string (&watch_printsetup_repeat_top, x);
3805 * gnm_conf_get_printsetup_repeat_top_node:
3807 * Returns: (transfer none): A #GOConfNode
3809 GOConfNode *
3810 gnm_conf_get_printsetup_repeat_top_node (void)
3812 return get_watch_node (&watch_printsetup_repeat_top);
3815 static struct cb_watch_int watch_printsetup_scale_height = {
3816 0, "printsetup/scale-height",
3817 "Default Scaling Height",
3818 "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.",
3819 0, 100, 0,
3823 gnm_conf_get_printsetup_scale_height (void)
3825 if (!watch_printsetup_scale_height.handler)
3826 watch_int (&watch_printsetup_scale_height);
3827 return watch_printsetup_scale_height.var;
3830 void
3831 gnm_conf_set_printsetup_scale_height (int x)
3833 if (!watch_printsetup_scale_height.handler)
3834 watch_int (&watch_printsetup_scale_height);
3835 set_int (&watch_printsetup_scale_height, x);
3839 * gnm_conf_get_printsetup_scale_height_node:
3841 * Returns: (transfer none): A #GOConfNode
3843 GOConfNode *
3844 gnm_conf_get_printsetup_scale_height_node (void)
3846 return get_watch_node (&watch_printsetup_scale_height);
3849 static struct cb_watch_bool watch_printsetup_scale_percentage = {
3850 0, "printsetup/scale-percentage",
3851 "Default Scale Type",
3852 "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.",
3853 TRUE,
3856 gboolean
3857 gnm_conf_get_printsetup_scale_percentage (void)
3859 if (!watch_printsetup_scale_percentage.handler)
3860 watch_bool (&watch_printsetup_scale_percentage);
3861 return watch_printsetup_scale_percentage.var;
3864 void
3865 gnm_conf_set_printsetup_scale_percentage (gboolean x)
3867 if (!watch_printsetup_scale_percentage.handler)
3868 watch_bool (&watch_printsetup_scale_percentage);
3869 set_bool (&watch_printsetup_scale_percentage, x);
3873 * gnm_conf_get_printsetup_scale_percentage_node:
3875 * Returns: (transfer none): A #GOConfNode
3877 GOConfNode *
3878 gnm_conf_get_printsetup_scale_percentage_node (void)
3880 return get_watch_node (&watch_printsetup_scale_percentage);
3883 static struct cb_watch_double watch_printsetup_scale_percentage_value = {
3884 0, "printsetup/scale-percentage-value",
3885 "Default Scale Percentage",
3886 "This value gives the percentage by which to scale each printed page. Please use the Print Setup dialog to edit this value.",
3887 1, 500, 100,
3890 double
3891 gnm_conf_get_printsetup_scale_percentage_value (void)
3893 if (!watch_printsetup_scale_percentage_value.handler)
3894 watch_double (&watch_printsetup_scale_percentage_value);
3895 return watch_printsetup_scale_percentage_value.var;
3898 void
3899 gnm_conf_set_printsetup_scale_percentage_value (double x)
3901 if (!watch_printsetup_scale_percentage_value.handler)
3902 watch_double (&watch_printsetup_scale_percentage_value);
3903 set_double (&watch_printsetup_scale_percentage_value, x);
3907 * gnm_conf_get_printsetup_scale_percentage_value_node:
3909 * Returns: (transfer none): A #GOConfNode
3911 GOConfNode *
3912 gnm_conf_get_printsetup_scale_percentage_value_node (void)
3914 return get_watch_node (&watch_printsetup_scale_percentage_value);
3917 static struct cb_watch_int watch_printsetup_scale_width = {
3918 0, "printsetup/scale-width",
3919 "Default Scaling Width",
3920 "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.",
3921 0, 100, 0,
3925 gnm_conf_get_printsetup_scale_width (void)
3927 if (!watch_printsetup_scale_width.handler)
3928 watch_int (&watch_printsetup_scale_width);
3929 return watch_printsetup_scale_width.var;
3932 void
3933 gnm_conf_set_printsetup_scale_width (int x)
3935 if (!watch_printsetup_scale_width.handler)
3936 watch_int (&watch_printsetup_scale_width);
3937 set_int (&watch_printsetup_scale_width, x);
3941 * gnm_conf_get_printsetup_scale_width_node:
3943 * Returns: (transfer none): A #GOConfNode
3945 GOConfNode *
3946 gnm_conf_get_printsetup_scale_width_node (void)
3948 return get_watch_node (&watch_printsetup_scale_width);
3951 static struct cb_watch_bool watch_searchreplace_change_cell_expressions = {
3952 0, "searchreplace/change-cell-expressions",
3953 "Search & Replace Changes Expressions",
3954 "Search & Replace changes cells containing expressions as default",
3955 TRUE,
3958 gboolean
3959 gnm_conf_get_searchreplace_change_cell_expressions (void)
3961 if (!watch_searchreplace_change_cell_expressions.handler)
3962 watch_bool (&watch_searchreplace_change_cell_expressions);
3963 return watch_searchreplace_change_cell_expressions.var;
3966 void
3967 gnm_conf_set_searchreplace_change_cell_expressions (gboolean x)
3969 if (!watch_searchreplace_change_cell_expressions.handler)
3970 watch_bool (&watch_searchreplace_change_cell_expressions);
3971 set_bool (&watch_searchreplace_change_cell_expressions, x);
3975 * gnm_conf_get_searchreplace_change_cell_expressions_node:
3977 * Returns: (transfer none): A #GOConfNode
3979 GOConfNode *
3980 gnm_conf_get_searchreplace_change_cell_expressions_node (void)
3982 return get_watch_node (&watch_searchreplace_change_cell_expressions);
3985 static struct cb_watch_bool watch_searchreplace_change_cell_other = {
3986 0, "searchreplace/change-cell-other",
3987 "Search & Replace Changes Other Values",
3988 "Search & Replace changes cells containing other values as default",
3989 TRUE,
3992 gboolean
3993 gnm_conf_get_searchreplace_change_cell_other (void)
3995 if (!watch_searchreplace_change_cell_other.handler)
3996 watch_bool (&watch_searchreplace_change_cell_other);
3997 return watch_searchreplace_change_cell_other.var;
4000 void
4001 gnm_conf_set_searchreplace_change_cell_other (gboolean x)
4003 if (!watch_searchreplace_change_cell_other.handler)
4004 watch_bool (&watch_searchreplace_change_cell_other);
4005 set_bool (&watch_searchreplace_change_cell_other, x);
4009 * gnm_conf_get_searchreplace_change_cell_other_node:
4011 * Returns: (transfer none): A #GOConfNode
4013 GOConfNode *
4014 gnm_conf_get_searchreplace_change_cell_other_node (void)
4016 return get_watch_node (&watch_searchreplace_change_cell_other);
4019 static struct cb_watch_bool watch_searchreplace_change_cell_strings = {
4020 0, "searchreplace/change-cell-strings",
4021 "Search & Replace Changes Strings",
4022 "Search & Replace changes cells containing strings as default",
4023 TRUE,
4026 gboolean
4027 gnm_conf_get_searchreplace_change_cell_strings (void)
4029 if (!watch_searchreplace_change_cell_strings.handler)
4030 watch_bool (&watch_searchreplace_change_cell_strings);
4031 return watch_searchreplace_change_cell_strings.var;
4034 void
4035 gnm_conf_set_searchreplace_change_cell_strings (gboolean x)
4037 if (!watch_searchreplace_change_cell_strings.handler)
4038 watch_bool (&watch_searchreplace_change_cell_strings);
4039 set_bool (&watch_searchreplace_change_cell_strings, x);
4043 * gnm_conf_get_searchreplace_change_cell_strings_node:
4045 * Returns: (transfer none): A #GOConfNode
4047 GOConfNode *
4048 gnm_conf_get_searchreplace_change_cell_strings_node (void)
4050 return get_watch_node (&watch_searchreplace_change_cell_strings);
4053 static struct cb_watch_bool watch_searchreplace_change_comments = {
4054 0, "searchreplace/change-comments",
4055 "Search & Replace Changes Comments",
4056 "Search & Replace changes comments as default",
4057 FALSE,
4060 gboolean
4061 gnm_conf_get_searchreplace_change_comments (void)
4063 if (!watch_searchreplace_change_comments.handler)
4064 watch_bool (&watch_searchreplace_change_comments);
4065 return watch_searchreplace_change_comments.var;
4068 void
4069 gnm_conf_set_searchreplace_change_comments (gboolean x)
4071 if (!watch_searchreplace_change_comments.handler)
4072 watch_bool (&watch_searchreplace_change_comments);
4073 set_bool (&watch_searchreplace_change_comments, x);
4077 * gnm_conf_get_searchreplace_change_comments_node:
4079 * Returns: (transfer none): A #GOConfNode
4081 GOConfNode *
4082 gnm_conf_get_searchreplace_change_comments_node (void)
4084 return get_watch_node (&watch_searchreplace_change_comments);
4087 static struct cb_watch_bool watch_searchreplace_columnmajor = {
4088 0, "searchreplace/columnmajor",
4089 "Search & Replace Column Major",
4090 "Search & Replace proceeds in column major order as default",
4091 TRUE,
4094 gboolean
4095 gnm_conf_get_searchreplace_columnmajor (void)
4097 if (!watch_searchreplace_columnmajor.handler)
4098 watch_bool (&watch_searchreplace_columnmajor);
4099 return watch_searchreplace_columnmajor.var;
4102 void
4103 gnm_conf_set_searchreplace_columnmajor (gboolean x)
4105 if (!watch_searchreplace_columnmajor.handler)
4106 watch_bool (&watch_searchreplace_columnmajor);
4107 set_bool (&watch_searchreplace_columnmajor, x);
4111 * gnm_conf_get_searchreplace_columnmajor_node:
4113 * Returns: (transfer none): A #GOConfNode
4115 GOConfNode *
4116 gnm_conf_get_searchreplace_columnmajor_node (void)
4118 return get_watch_node (&watch_searchreplace_columnmajor);
4121 static struct cb_watch_int watch_searchreplace_error_behaviour = {
4122 0, "searchreplace/error-behaviour",
4123 "Search & Replace Error Behavior",
4124 "This is the default error behavior of Search & Replace indicated by an integer from 0 to 4.",
4125 0, 4, 0,
4129 gnm_conf_get_searchreplace_error_behaviour (void)
4131 if (!watch_searchreplace_error_behaviour.handler)
4132 watch_int (&watch_searchreplace_error_behaviour);
4133 return watch_searchreplace_error_behaviour.var;
4136 void
4137 gnm_conf_set_searchreplace_error_behaviour (int x)
4139 if (!watch_searchreplace_error_behaviour.handler)
4140 watch_int (&watch_searchreplace_error_behaviour);
4141 set_int (&watch_searchreplace_error_behaviour, x);
4145 * gnm_conf_get_searchreplace_error_behaviour_node:
4147 * Returns: (transfer none): A #GOConfNode
4149 GOConfNode *
4150 gnm_conf_get_searchreplace_error_behaviour_node (void)
4152 return get_watch_node (&watch_searchreplace_error_behaviour);
4155 static struct cb_watch_bool watch_searchreplace_ignore_case = {
4156 0, "searchreplace/ignore-case",
4157 "Search & Replace Ignores Case",
4158 "Search & Replace ignores case as default",
4159 TRUE,
4162 gboolean
4163 gnm_conf_get_searchreplace_ignore_case (void)
4165 if (!watch_searchreplace_ignore_case.handler)
4166 watch_bool (&watch_searchreplace_ignore_case);
4167 return watch_searchreplace_ignore_case.var;
4170 void
4171 gnm_conf_set_searchreplace_ignore_case (gboolean x)
4173 if (!watch_searchreplace_ignore_case.handler)
4174 watch_bool (&watch_searchreplace_ignore_case);
4175 set_bool (&watch_searchreplace_ignore_case, x);
4179 * gnm_conf_get_searchreplace_ignore_case_node:
4181 * Returns: (transfer none): A #GOConfNode
4183 GOConfNode *
4184 gnm_conf_get_searchreplace_ignore_case_node (void)
4186 return get_watch_node (&watch_searchreplace_ignore_case);
4189 static struct cb_watch_bool watch_searchreplace_keep_strings = {
4190 0, "searchreplace/keep-strings",
4191 "Search & Replace Keeps Strings as Strings",
4192 "Search & Replace keeps strings as strings even if they look like numbers as default",
4193 TRUE,
4196 gboolean
4197 gnm_conf_get_searchreplace_keep_strings (void)
4199 if (!watch_searchreplace_keep_strings.handler)
4200 watch_bool (&watch_searchreplace_keep_strings);
4201 return watch_searchreplace_keep_strings.var;
4204 void
4205 gnm_conf_set_searchreplace_keep_strings (gboolean x)
4207 if (!watch_searchreplace_keep_strings.handler)
4208 watch_bool (&watch_searchreplace_keep_strings);
4209 set_bool (&watch_searchreplace_keep_strings, x);
4213 * gnm_conf_get_searchreplace_keep_strings_node:
4215 * Returns: (transfer none): A #GOConfNode
4217 GOConfNode *
4218 gnm_conf_get_searchreplace_keep_strings_node (void)
4220 return get_watch_node (&watch_searchreplace_keep_strings);
4223 static struct cb_watch_bool watch_searchreplace_preserve_case = {
4224 0, "searchreplace/preserve-case",
4225 "Search & Replace Preserves Case",
4226 "Search & Replace preserves case as default",
4227 FALSE,
4230 gboolean
4231 gnm_conf_get_searchreplace_preserve_case (void)
4233 if (!watch_searchreplace_preserve_case.handler)
4234 watch_bool (&watch_searchreplace_preserve_case);
4235 return watch_searchreplace_preserve_case.var;
4238 void
4239 gnm_conf_set_searchreplace_preserve_case (gboolean x)
4241 if (!watch_searchreplace_preserve_case.handler)
4242 watch_bool (&watch_searchreplace_preserve_case);
4243 set_bool (&watch_searchreplace_preserve_case, x);
4247 * gnm_conf_get_searchreplace_preserve_case_node:
4249 * Returns: (transfer none): A #GOConfNode
4251 GOConfNode *
4252 gnm_conf_get_searchreplace_preserve_case_node (void)
4254 return get_watch_node (&watch_searchreplace_preserve_case);
4257 static struct cb_watch_bool watch_searchreplace_query = {
4258 0, "searchreplace/query",
4259 "Search & Replace Poses Query",
4260 "Search & Replace poses query before each change as default",
4261 FALSE,
4264 gboolean
4265 gnm_conf_get_searchreplace_query (void)
4267 if (!watch_searchreplace_query.handler)
4268 watch_bool (&watch_searchreplace_query);
4269 return watch_searchreplace_query.var;
4272 void
4273 gnm_conf_set_searchreplace_query (gboolean x)
4275 if (!watch_searchreplace_query.handler)
4276 watch_bool (&watch_searchreplace_query);
4277 set_bool (&watch_searchreplace_query, x);
4281 * gnm_conf_get_searchreplace_query_node:
4283 * Returns: (transfer none): A #GOConfNode
4285 GOConfNode *
4286 gnm_conf_get_searchreplace_query_node (void)
4288 return get_watch_node (&watch_searchreplace_query);
4291 static struct cb_watch_int watch_searchreplace_regex = {
4292 0, "searchreplace/regex",
4293 "Search & Replace Search Type",
4294 "This value determines the input type for Search & Replace. 0: text; 1: regular expression; 2: number",
4295 0, 2, 0,
4299 gnm_conf_get_searchreplace_regex (void)
4301 if (!watch_searchreplace_regex.handler)
4302 watch_int (&watch_searchreplace_regex);
4303 return watch_searchreplace_regex.var;
4306 void
4307 gnm_conf_set_searchreplace_regex (int x)
4309 if (!watch_searchreplace_regex.handler)
4310 watch_int (&watch_searchreplace_regex);
4311 set_int (&watch_searchreplace_regex, x);
4315 * gnm_conf_get_searchreplace_regex_node:
4317 * Returns: (transfer none): A #GOConfNode
4319 GOConfNode *
4320 gnm_conf_get_searchreplace_regex_node (void)
4322 return get_watch_node (&watch_searchreplace_regex);
4325 static struct cb_watch_int watch_searchreplace_scope = {
4326 0, "searchreplace/scope",
4327 "Search & Replace Scope",
4328 "This is the default scope of Search & Replace. 0: entire workbook; 1: current sheet; 2: range",
4329 0, 2, 0,
4333 gnm_conf_get_searchreplace_scope (void)
4335 if (!watch_searchreplace_scope.handler)
4336 watch_int (&watch_searchreplace_scope);
4337 return watch_searchreplace_scope.var;
4340 void
4341 gnm_conf_set_searchreplace_scope (int x)
4343 if (!watch_searchreplace_scope.handler)
4344 watch_int (&watch_searchreplace_scope);
4345 set_int (&watch_searchreplace_scope, x);
4349 * gnm_conf_get_searchreplace_scope_node:
4351 * Returns: (transfer none): A #GOConfNode
4353 GOConfNode *
4354 gnm_conf_get_searchreplace_scope_node (void)
4356 return get_watch_node (&watch_searchreplace_scope);
4359 static struct cb_watch_bool watch_searchreplace_search_results = {
4360 0, "searchreplace/search-results",
4361 "Search searches in results",
4362 "Search searches in results as default",
4363 TRUE,
4366 gboolean
4367 gnm_conf_get_searchreplace_search_results (void)
4369 if (!watch_searchreplace_search_results.handler)
4370 watch_bool (&watch_searchreplace_search_results);
4371 return watch_searchreplace_search_results.var;
4374 void
4375 gnm_conf_set_searchreplace_search_results (gboolean x)
4377 if (!watch_searchreplace_search_results.handler)
4378 watch_bool (&watch_searchreplace_search_results);
4379 set_bool (&watch_searchreplace_search_results, x);
4383 * gnm_conf_get_searchreplace_search_results_node:
4385 * Returns: (transfer none): A #GOConfNode
4387 GOConfNode *
4388 gnm_conf_get_searchreplace_search_results_node (void)
4390 return get_watch_node (&watch_searchreplace_search_results);
4393 static struct cb_watch_bool watch_searchreplace_whole_words_only = {
4394 0, "searchreplace/whole-words-only",
4395 "Search & Replace Whole Words Only",
4396 "Search & Replace replaces whole words only as default",
4397 FALSE,
4400 gboolean
4401 gnm_conf_get_searchreplace_whole_words_only (void)
4403 if (!watch_searchreplace_whole_words_only.handler)
4404 watch_bool (&watch_searchreplace_whole_words_only);
4405 return watch_searchreplace_whole_words_only.var;
4408 void
4409 gnm_conf_set_searchreplace_whole_words_only (gboolean x)
4411 if (!watch_searchreplace_whole_words_only.handler)
4412 watch_bool (&watch_searchreplace_whole_words_only);
4413 set_bool (&watch_searchreplace_whole_words_only, x);
4417 * gnm_conf_get_searchreplace_whole_words_only_node:
4419 * Returns: (transfer none): A #GOConfNode
4421 GOConfNode *
4422 gnm_conf_get_searchreplace_whole_words_only_node (void)
4424 return get_watch_node (&watch_searchreplace_whole_words_only);
4427 static struct cb_watch_string watch_stf_export_encoding = {
4428 0, "stf/export/encoding",
4429 "Text Export Encoding",
4430 "Please use the Text Export dialog to edit this value.",
4434 const char *
4435 gnm_conf_get_stf_export_encoding (void)
4437 if (!watch_stf_export_encoding.handler)
4438 watch_string (&watch_stf_export_encoding);
4439 return watch_stf_export_encoding.var;
4442 void
4443 gnm_conf_set_stf_export_encoding (const char *x)
4445 g_return_if_fail (x != NULL);
4446 if (!watch_stf_export_encoding.handler)
4447 watch_string (&watch_stf_export_encoding);
4448 set_string (&watch_stf_export_encoding, x);
4452 * gnm_conf_get_stf_export_encoding_node:
4454 * Returns: (transfer none): A #GOConfNode
4456 GOConfNode *
4457 gnm_conf_get_stf_export_encoding_node (void)
4459 return get_watch_node (&watch_stf_export_encoding);
4462 static struct cb_watch_enum watch_stf_export_format = {
4463 0, "stf/export/format",
4464 "Text Export Formatting Rule",
4465 "Please use the Text Export dialog to edit this value.",
4466 GNM_STF_FORMAT_AUTO,
4469 GnmStfFormatMode
4470 gnm_conf_get_stf_export_format (void)
4472 if (!watch_stf_export_format.handler)
4473 watch_enum (&watch_stf_export_format, GNM_STF_FORMAT_MODE_TYPE);
4474 return watch_stf_export_format.var;
4477 void
4478 gnm_conf_set_stf_export_format (GnmStfFormatMode x)
4480 if (!watch_stf_export_format.handler)
4481 watch_enum (&watch_stf_export_format, GNM_STF_FORMAT_MODE_TYPE);
4482 set_enum (&watch_stf_export_format, x);
4486 * gnm_conf_get_stf_export_format_node:
4488 * Returns: (transfer none): A #GOConfNode
4490 GOConfNode *
4491 gnm_conf_get_stf_export_format_node (void)
4493 return get_watch_node (&watch_stf_export_format);
4496 static struct cb_watch_string watch_stf_export_locale = {
4497 0, "stf/export/locale",
4498 "Text Export Locale",
4499 "Please use the Text Export dialog to edit this value.",
4503 const char *
4504 gnm_conf_get_stf_export_locale (void)
4506 if (!watch_stf_export_locale.handler)
4507 watch_string (&watch_stf_export_locale);
4508 return watch_stf_export_locale.var;
4511 void
4512 gnm_conf_set_stf_export_locale (const char *x)
4514 g_return_if_fail (x != NULL);
4515 if (!watch_stf_export_locale.handler)
4516 watch_string (&watch_stf_export_locale);
4517 set_string (&watch_stf_export_locale, x);
4521 * gnm_conf_get_stf_export_locale_node:
4523 * Returns: (transfer none): A #GOConfNode
4525 GOConfNode *
4526 gnm_conf_get_stf_export_locale_node (void)
4528 return get_watch_node (&watch_stf_export_locale);
4531 static struct cb_watch_enum watch_stf_export_quoting = {
4532 0, "stf/export/quoting",
4533 "Text Export String Quoting Rule",
4534 "Please use the Text Export dialog to edit this value.",
4535 GSF_OUTPUT_CSV_QUOTING_MODE_AUTO,
4538 GsfOutputCsvQuotingMode
4539 gnm_conf_get_stf_export_quoting (void)
4541 if (!watch_stf_export_quoting.handler)
4542 watch_enum (&watch_stf_export_quoting, GSF_OUTPUT_CSV_QUOTING_MODE_TYPE);
4543 return watch_stf_export_quoting.var;
4546 void
4547 gnm_conf_set_stf_export_quoting (GsfOutputCsvQuotingMode x)
4549 if (!watch_stf_export_quoting.handler)
4550 watch_enum (&watch_stf_export_quoting, GSF_OUTPUT_CSV_QUOTING_MODE_TYPE);
4551 set_enum (&watch_stf_export_quoting, x);
4555 * gnm_conf_get_stf_export_quoting_node:
4557 * Returns: (transfer none): A #GOConfNode
4559 GOConfNode *
4560 gnm_conf_get_stf_export_quoting_node (void)
4562 return get_watch_node (&watch_stf_export_quoting);
4565 static struct cb_watch_string watch_stf_export_separator = {
4566 0, "stf/export/separator",
4567 "Text Export Field Separator",
4568 "Please use the Text Export dialog to edit this value.",
4569 ",",
4572 const char *
4573 gnm_conf_get_stf_export_separator (void)
4575 if (!watch_stf_export_separator.handler)
4576 watch_string (&watch_stf_export_separator);
4577 return watch_stf_export_separator.var;
4580 void
4581 gnm_conf_set_stf_export_separator (const char *x)
4583 g_return_if_fail (x != NULL);
4584 if (!watch_stf_export_separator.handler)
4585 watch_string (&watch_stf_export_separator);
4586 set_string (&watch_stf_export_separator, x);
4590 * gnm_conf_get_stf_export_separator_node:
4592 * Returns: (transfer none): A #GOConfNode
4594 GOConfNode *
4595 gnm_conf_get_stf_export_separator_node (void)
4597 return get_watch_node (&watch_stf_export_separator);
4600 static struct cb_watch_string watch_stf_export_stringindicator = {
4601 0, "stf/export/stringindicator",
4602 "Text Export String Indicator",
4603 "Please use the Text Export dialog to edit this value.",
4604 "\"",
4607 const char *
4608 gnm_conf_get_stf_export_stringindicator (void)
4610 if (!watch_stf_export_stringindicator.handler)
4611 watch_string (&watch_stf_export_stringindicator);
4612 return watch_stf_export_stringindicator.var;
4615 void
4616 gnm_conf_set_stf_export_stringindicator (const char *x)
4618 g_return_if_fail (x != NULL);
4619 if (!watch_stf_export_stringindicator.handler)
4620 watch_string (&watch_stf_export_stringindicator);
4621 set_string (&watch_stf_export_stringindicator, x);
4625 * gnm_conf_get_stf_export_stringindicator_node:
4627 * Returns: (transfer none): A #GOConfNode
4629 GOConfNode *
4630 gnm_conf_get_stf_export_stringindicator_node (void)
4632 return get_watch_node (&watch_stf_export_stringindicator);
4635 static struct cb_watch_string watch_stf_export_terminator = {
4636 0, "stf/export/terminator",
4637 "Text Export Record Terminator",
4638 "Please use the Text Export dialog to edit this value.",
4639 "\n",
4642 const char *
4643 gnm_conf_get_stf_export_terminator (void)
4645 if (!watch_stf_export_terminator.handler)
4646 watch_string (&watch_stf_export_terminator);
4647 return watch_stf_export_terminator.var;
4650 void
4651 gnm_conf_set_stf_export_terminator (const char *x)
4653 g_return_if_fail (x != NULL);
4654 if (!watch_stf_export_terminator.handler)
4655 watch_string (&watch_stf_export_terminator);
4656 set_string (&watch_stf_export_terminator, x);
4660 * gnm_conf_get_stf_export_terminator_node:
4662 * Returns: (transfer none): A #GOConfNode
4664 GOConfNode *
4665 gnm_conf_get_stf_export_terminator_node (void)
4667 return get_watch_node (&watch_stf_export_terminator);
4670 static struct cb_watch_bool watch_stf_export_transliteration = {
4671 0, "stf/export/transliteration",
4672 "Text Export Unknown Character Transliteration",
4673 "Please use the Text Export dialog to edit this value.",
4674 TRUE,
4677 gboolean
4678 gnm_conf_get_stf_export_transliteration (void)
4680 if (!watch_stf_export_transliteration.handler)
4681 watch_bool (&watch_stf_export_transliteration);
4682 return watch_stf_export_transliteration.var;
4685 void
4686 gnm_conf_set_stf_export_transliteration (gboolean x)
4688 if (!watch_stf_export_transliteration.handler)
4689 watch_bool (&watch_stf_export_transliteration);
4690 set_bool (&watch_stf_export_transliteration, x);
4694 * gnm_conf_get_stf_export_transliteration_node:
4696 * Returns: (transfer none): A #GOConfNode
4698 GOConfNode *
4699 gnm_conf_get_stf_export_transliteration_node (void)
4701 return get_watch_node (&watch_stf_export_transliteration);
4704 static struct cb_watch_enum watch_toolbar_style = {
4705 0, "toolbar-style",
4706 "Toolbar Style",
4707 "Toolbar Style. Valid values are both, both_horiz, icon, and text.",
4708 GTK_TOOLBAR_ICONS,
4711 GtkToolbarStyle
4712 gnm_conf_get_toolbar_style (void)
4714 if (!watch_toolbar_style.handler)
4715 watch_enum (&watch_toolbar_style, GTK_TYPE_TOOLBAR_STYLE);
4716 return watch_toolbar_style.var;
4719 void
4720 gnm_conf_set_toolbar_style (GtkToolbarStyle x)
4722 if (!watch_toolbar_style.handler)
4723 watch_enum (&watch_toolbar_style, GTK_TYPE_TOOLBAR_STYLE);
4724 set_enum (&watch_toolbar_style, x);
4727 static struct cb_watch_int watch_undo_max_descriptor_width = {
4728 0, "undo/max-descriptor-width",
4729 "Length of the Undo Descriptors",
4730 "This value is indicative of the maximum length of the command descriptors in the undo and redo chains.",
4731 5, 256, 40,
4735 gnm_conf_get_undo_max_descriptor_width (void)
4737 if (!watch_undo_max_descriptor_width.handler)
4738 watch_int (&watch_undo_max_descriptor_width);
4739 return watch_undo_max_descriptor_width.var;
4742 void
4743 gnm_conf_set_undo_max_descriptor_width (int x)
4745 if (!watch_undo_max_descriptor_width.handler)
4746 watch_int (&watch_undo_max_descriptor_width);
4747 set_int (&watch_undo_max_descriptor_width, x);
4751 * gnm_conf_get_undo_max_descriptor_width_node:
4753 * Returns: (transfer none): A #GOConfNode
4755 GOConfNode *
4756 gnm_conf_get_undo_max_descriptor_width_node (void)
4758 return get_watch_node (&watch_undo_max_descriptor_width);
4761 static struct cb_watch_int watch_undo_maxnum = {
4762 0, "undo/maxnum",
4763 "Number of Undo Items",
4764 "This value determines the maximum number of items in the undo/redo list.",
4765 0, 10000, 20,
4769 gnm_conf_get_undo_maxnum (void)
4771 if (!watch_undo_maxnum.handler)
4772 watch_int (&watch_undo_maxnum);
4773 return watch_undo_maxnum.var;
4776 void
4777 gnm_conf_set_undo_maxnum (int x)
4779 if (!watch_undo_maxnum.handler)
4780 watch_int (&watch_undo_maxnum);
4781 set_int (&watch_undo_maxnum, x);
4785 * gnm_conf_get_undo_maxnum_node:
4787 * Returns: (transfer none): A #GOConfNode
4789 GOConfNode *
4790 gnm_conf_get_undo_maxnum_node (void)
4792 return get_watch_node (&watch_undo_maxnum);
4795 static struct cb_watch_bool watch_undo_show_sheet_name = {
4796 0, "undo/show-sheet-name",
4797 "Show Sheet Name in Undo List",
4798 "This value determines whether to show the sheet names in the undo and redo lists.",
4799 FALSE,
4802 gboolean
4803 gnm_conf_get_undo_show_sheet_name (void)
4805 if (!watch_undo_show_sheet_name.handler)
4806 watch_bool (&watch_undo_show_sheet_name);
4807 return watch_undo_show_sheet_name.var;
4810 void
4811 gnm_conf_set_undo_show_sheet_name (gboolean x)
4813 if (!watch_undo_show_sheet_name.handler)
4814 watch_bool (&watch_undo_show_sheet_name);
4815 set_bool (&watch_undo_show_sheet_name, x);
4819 * gnm_conf_get_undo_show_sheet_name_node:
4821 * Returns: (transfer none): A #GOConfNode
4823 GOConfNode *
4824 gnm_conf_get_undo_show_sheet_name_node (void)
4826 return get_watch_node (&watch_undo_show_sheet_name);
4829 static struct cb_watch_int watch_undo_size = {
4830 0, "undo/size",
4831 "Maximal Undo Size",
4832 "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.",
4833 1, 1000000, 100,
4837 gnm_conf_get_undo_size (void)
4839 if (!watch_undo_size.handler)
4840 watch_int (&watch_undo_size);
4841 return watch_undo_size.var;
4844 void
4845 gnm_conf_set_undo_size (int x)
4847 if (!watch_undo_size.handler)
4848 watch_int (&watch_undo_size);
4849 set_int (&watch_undo_size, x);
4853 * gnm_conf_get_undo_size_node:
4855 * Returns: (transfer none): A #GOConfNode
4857 GOConfNode *
4858 gnm_conf_get_undo_size_node (void)
4860 return get_watch_node (&watch_undo_size);
4864 * gnm_conf_get_autocorrect_dir_node:
4866 * Returns: (transfer none): A #GOConfNode
4868 GOConfNode *
4869 gnm_conf_get_autocorrect_dir_node (void)
4871 return get_node ("autocorrect", NULL);
4875 * gnm_conf_get_autoformat_dir_node:
4877 * Returns: (transfer none): A #GOConfNode
4879 GOConfNode *
4880 gnm_conf_get_autoformat_dir_node (void)
4882 return get_node ("autoformat", NULL);
4886 * gnm_conf_get_core_defaultfont_dir_node:
4888 * Returns: (transfer none): A #GOConfNode
4890 GOConfNode *
4891 gnm_conf_get_core_defaultfont_dir_node (void)
4893 return get_node ("core/defaultfont", NULL);
4897 * gnm_conf_get_core_file_save_dir_node:
4899 * Returns: (transfer none): A #GOConfNode
4901 GOConfNode *
4902 gnm_conf_get_core_file_save_dir_node (void)
4904 return get_node ("core/file/save", NULL);
4908 * gnm_conf_get_core_gui_cells_dir_node:
4910 * Returns: (transfer none): A #GOConfNode
4912 GOConfNode *
4913 gnm_conf_get_core_gui_cells_dir_node (void)
4915 return get_node ("core/gui/cells", NULL);
4919 * gnm_conf_get_core_gui_editing_dir_node:
4921 * Returns: (transfer none): A #GOConfNode
4923 GOConfNode *
4924 gnm_conf_get_core_gui_editing_dir_node (void)
4926 return get_node ("core/gui/editing", NULL);
4930 * gnm_conf_get_core_gui_screen_dir_node:
4932 * Returns: (transfer none): A #GOConfNode
4934 GOConfNode *
4935 gnm_conf_get_core_gui_screen_dir_node (void)
4937 return get_node ("core/gui/screen", NULL);
4941 * gnm_conf_get_core_gui_toolbars_dir_node:
4943 * Returns: (transfer none): A #GOConfNode
4945 GOConfNode *
4946 gnm_conf_get_core_gui_toolbars_dir_node (void)
4948 return get_node ("core/gui/toolbars", NULL);
4952 * gnm_conf_get_core_gui_window_dir_node:
4954 * Returns: (transfer none): A #GOConfNode
4956 GOConfNode *
4957 gnm_conf_get_core_gui_window_dir_node (void)
4959 return get_node ("core/gui/window", NULL);
4963 * gnm_conf_get_core_sort_default_dir_node:
4965 * Returns: (transfer none): A #GOConfNode
4967 GOConfNode *
4968 gnm_conf_get_core_sort_default_dir_node (void)
4970 return get_node ("core/sort/default", NULL);
4974 * gnm_conf_get_core_sort_dialog_dir_node:
4976 * Returns: (transfer none): A #GOConfNode
4978 GOConfNode *
4979 gnm_conf_get_core_sort_dialog_dir_node (void)
4981 return get_node ("core/sort/dialog", NULL);
4985 * gnm_conf_get_core_workbook_dir_node:
4987 * Returns: (transfer none): A #GOConfNode
4989 GOConfNode *
4990 gnm_conf_get_core_workbook_dir_node (void)
4992 return get_node ("core/workbook", NULL);
4996 * gnm_conf_get_core_xml_dir_node:
4998 * Returns: (transfer none): A #GOConfNode
5000 GOConfNode *
5001 gnm_conf_get_core_xml_dir_node (void)
5003 return get_node ("core/xml", NULL);
5007 * gnm_conf_get_cut_and_paste_dir_node:
5009 * Returns: (transfer none): A #GOConfNode
5011 GOConfNode *
5012 gnm_conf_get_cut_and_paste_dir_node (void)
5014 return get_node ("cut-and-paste", NULL);
5018 * gnm_conf_get_dialogs_rs_dir_node:
5020 * Returns: (transfer none): A #GOConfNode
5022 GOConfNode *
5023 gnm_conf_get_dialogs_rs_dir_node (void)
5025 return get_node ("dialogs/rs", NULL);
5029 * gnm_conf_get_functionselector_dir_node:
5031 * Returns: (transfer none): A #GOConfNode
5033 GOConfNode *
5034 gnm_conf_get_functionselector_dir_node (void)
5036 return get_node ("functionselector", NULL);
5040 * gnm_conf_get_plugin_glpk_dir_node:
5042 * Returns: (transfer none): A #GOConfNode
5044 GOConfNode *
5045 gnm_conf_get_plugin_glpk_dir_node (void)
5047 return get_node ("plugin/glpk", NULL);
5051 * gnm_conf_get_plugin_latex_dir_node:
5053 * Returns: (transfer none): A #GOConfNode
5055 GOConfNode *
5056 gnm_conf_get_plugin_latex_dir_node (void)
5058 return get_node ("plugin/latex", NULL);
5062 * gnm_conf_get_plugin_lpsolve_dir_node:
5064 * Returns: (transfer none): A #GOConfNode
5066 GOConfNode *
5067 gnm_conf_get_plugin_lpsolve_dir_node (void)
5069 return get_node ("plugin/lpsolve", NULL);
5073 * gnm_conf_get_plugins_dir_node:
5075 * Returns: (transfer none): A #GOConfNode
5077 GOConfNode *
5078 gnm_conf_get_plugins_dir_node (void)
5080 return get_node ("plugins", NULL);
5084 * gnm_conf_get_printsetup_dir_node:
5086 * Returns: (transfer none): A #GOConfNode
5088 GOConfNode *
5089 gnm_conf_get_printsetup_dir_node (void)
5091 return get_node ("printsetup", NULL);
5095 * gnm_conf_get_searchreplace_dir_node:
5097 * Returns: (transfer none): A #GOConfNode
5099 GOConfNode *
5100 gnm_conf_get_searchreplace_dir_node (void)
5102 return get_node ("searchreplace", NULL);
5106 * gnm_conf_get_stf_export_dir_node:
5108 * Returns: (transfer none): A #GOConfNode
5110 GOConfNode *
5111 gnm_conf_get_stf_export_dir_node (void)
5113 return get_node ("stf/export", NULL);
5117 * gnm_conf_get_toolbar_style_dir_node:
5119 * Returns: (transfer none): A #GOConfNode
5121 GOConfNode *
5122 gnm_conf_get_toolbar_style_dir_node (void)
5124 return get_node ("toolbar-style", NULL);
5128 * gnm_conf_get_undo_dir_node:
5130 * Returns: (transfer none): A #GOConfNode
5132 GOConfNode *
5133 gnm_conf_get_undo_dir_node (void)
5135 return get_node ("undo", NULL);