1 /*
2  * gnumeric-conf.c:
3  *
4  * Author:
5  *	Andreas J. Guelzow <aguelzow@pyrshep.ca>
6  *
7  * (C) Copyright 2002-2005 Andreas J. Guelzow <aguelzow@pyrshep.ca>
8  * (C) Copyright 2009-2011 Morten Welinder <terra@gnome.org>
9  *
10  * Introduced the concept of "node" and implemented the win32 backend
11  * by Ivan, Wong Yat Cheung <email@ivanwong.info>, 2005
12  *
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.
17  *
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.
22  *
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/>.
25  */
26 
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>
40 
41 #define NO_DEBUG_GCONF
42 #ifndef NO_DEBUG_GCONF
43 #define d(code)	{ code; }
44 #else
45 #define d(code)
46 #endif
47 
48 #define GNM_CONF_DIR "gnumeric"
49 
50 static gboolean persist_changes = TRUE;
51 
52 static GOConfNode *root = NULL;
53 
54 /*
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.
57   */
58 static GHashTable *string_pool;
59 static GHashTable *string_list_pool;
60 static GHashTable *node_pool, *node_watch;
61 
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)
70 
71 
72 static guint sync_handler;
73 
74 static gboolean
cb_sync(void)75 cb_sync (void)
76 {
77 	go_conf_sync (root);
78 	sync_handler = 0;
79 	return FALSE;
80 }
81 
82 static void
schedule_sync(void)83 schedule_sync (void)
84 {
85 	if (sync_handler)
86 		return;
87 
88 	sync_handler = g_timeout_add (200, (GSourceFunc)cb_sync, NULL);
89 }
90 
91 /* -------------------------------------------------------------------------- */
92 
93 static GSList *watchers;
94 
95 struct cb_watch_generic {
96 	guint handler;
97 	const char *key;
98 	const char *short_desc;
99 	const char *long_desc;
100 };
101 
102 static void
free_watcher(struct cb_watch_generic * watcher)103 free_watcher (struct cb_watch_generic *watcher)
104 {
105 	go_conf_remove_monitor (watcher->handler);
106 }
107 
108 /* ---------------------------------------- */
109 
110 /**
111  * gnm_conf_get_root:
112  *
113  * Returns: (transfer none): the root config node.
114  */
115 GOConfNode *
gnm_conf_get_root(void)116 gnm_conf_get_root (void)
117 {
118 	return root;
119 }
120 
121 static GOConfNode *
get_node(const char * key,gpointer watch)122 get_node (const char *key, gpointer watch)
123 {
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);
130 	}
131 	return res;
132 }
133 
134 static GOConfNode *
get_watch_node(gpointer watch_)135 get_watch_node (gpointer watch_)
136 {
137 	struct cb_watch_generic *watch = watch_;
138 	return get_node (watch->key, watch);
139 }
140 
141 /**
142  * gnm_conf_get_short_desc:
143  * @node: #GOConfNode
144  *
145  * Returns: (transfer none) (nullable): a brief description of @node.
146  */
147 char const *
gnm_conf_get_short_desc(GOConfNode * node)148 gnm_conf_get_short_desc (GOConfNode *node)
149 {
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;
154 }
155 
156 /**
157  * gnm_conf_get_long_desc:
158  * @node: #GOConfNode
159  *
160  * Returns: (transfer none) (nullable): a description of @node.
161  */
162 char const *
gnm_conf_get_long_desc(GOConfNode * node)163 gnm_conf_get_long_desc (GOConfNode *node)
164 {
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;
169 }
170 
171 /* -------------------------------------------------------------------------- */
172 
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;
180 };
181 
182 static void
cb_watch_bool(GOConfNode * node,G_GNUC_UNUSED const char * key,gpointer user)183 cb_watch_bool (GOConfNode *node, G_GNUC_UNUSED const char *key, gpointer user)
184 {
185 	struct cb_watch_bool *watch = user;
186 	watch->var = go_conf_load_bool (node, NULL, watch->defalt);
187 }
188 
189 static void
watch_bool(struct cb_watch_bool * watch)190 watch_bool (struct cb_watch_bool *watch)
191 {
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);
198 }
199 
200 static void
set_bool(struct cb_watch_bool * watch,gboolean x)201 set_bool (struct cb_watch_bool *watch, gboolean x)
202 {
203 	x = (x != FALSE);
204 	if (x == watch->var)
205 		return;
206 
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 ();
212 	}
213 }
214 
215 /* ---------------------------------------- */
216 
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;
224 };
225 
226 static void
cb_watch_int(GOConfNode * node,G_GNUC_UNUSED const char * key,gpointer user)227 cb_watch_int (GOConfNode *node, G_GNUC_UNUSED const char *key, gpointer user)
228 {
229 	struct cb_watch_int *watch = user;
230 	watch->var = go_conf_load_int (node, NULL,
231 				       watch->min, watch->max,
232 				       watch->defalt);
233 }
234 
235 static void
watch_int(struct cb_watch_int * watch)236 watch_int (struct cb_watch_int *watch)
237 {
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);
244 }
245 
246 static void
set_int(struct cb_watch_int * watch,int x)247 set_int (struct cb_watch_int *watch, int x)
248 {
249 	x = CLAMP (x, watch->min, watch->max);
250 
251 	if (x == watch->var)
252 		return;
253 
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 ();
259 	}
260 }
261 
262 /* ---------------------------------------- */
263 
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;
271 };
272 
273 static void
cb_watch_double(GOConfNode * node,G_GNUC_UNUSED const char * key,gpointer user)274 cb_watch_double (GOConfNode *node, G_GNUC_UNUSED const char *key, gpointer user)
275 {
276 	struct cb_watch_double *watch = user;
277 	watch->var = go_conf_load_double (node, NULL,
278 					  watch->min, watch->max,
279 					  watch->defalt);
280 }
281 
282 static void
watch_double(struct cb_watch_double * watch)283 watch_double (struct cb_watch_double *watch)
284 {
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);
291 }
292 
293 static void
set_double(struct cb_watch_double * watch,double x)294 set_double (struct cb_watch_double *watch, double x)
295 {
296 	x = CLAMP (x, watch->min, watch->max);
297 
298 	if (x == watch->var)
299 		return;
300 
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 ();
306 	}
307 }
308 
309 /* ---------------------------------------- */
310 
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;
318 };
319 
320 static void
cb_watch_string(GOConfNode * node,G_GNUC_UNUSED const char * key,gpointer user)321 cb_watch_string (GOConfNode *node, G_GNUC_UNUSED const char *key, gpointer user)
322 {
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;
328 }
329 
330 static void
watch_string(struct cb_watch_string * watch)331 watch_string (struct cb_watch_string *watch)
332 {
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);
339 }
340 
341 static void
set_string(struct cb_watch_string * watch,const char * x)342 set_string (struct cb_watch_string *watch, const char *x)
343 {
344 	char *xc;
345 
346 	if (!x || !watch->var || strcmp (x, watch->var) == 0)
347 		return;
348 
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 ();
357 	}
358 }
359 
360 /* ---------------------------------------- */
361 
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;
368 };
369 
370 static void
cb_watch_string_list(GOConfNode * node,G_GNUC_UNUSED const char * key,gpointer user)371 cb_watch_string_list (GOConfNode *node, G_GNUC_UNUSED const char *key, gpointer user)
372 {
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;
377 }
378 
379 static void
watch_string_list(struct cb_watch_string_list * watch)380 watch_string_list (struct cb_watch_string_list *watch)
381 {
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);
388 }
389 
390 static gboolean
string_list_equal(GSList * x,GSList * y)391 string_list_equal (GSList *x, GSList *y)
392 {
393 	while (x && y) {
394 		if (strcmp (x->data, y->data) != 0)
395 			return FALSE;
396 		x = x->next;
397 		y = y->next;
398 	}
399 
400 	return x == y;
401 }
402 
403 static void
set_string_list(struct cb_watch_string_list * watch,GSList * x)404 set_string_list (struct cb_watch_string_list *watch, GSList *x)
405 {
406 	if (string_list_equal (x, watch->var))
407 		return;
408 
409 	x = go_string_slist_copy (x);
410 
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 ();
418 	}
419 }
420 
421 /* ---------------------------------------- */
422 
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;
431 };
432 
433 static void
cb_watch_enum(GOConfNode * node,G_GNUC_UNUSED const char * key,gpointer user)434 cb_watch_enum (GOConfNode *node, G_GNUC_UNUSED const char *key, gpointer user)
435 {
436 	struct cb_watch_enum *watch = user;
437 	watch->var = go_conf_load_enum (node, NULL,
438 					watch->typ, watch->defalt);
439 }
440 
441 static void
watch_enum(struct cb_watch_enum * watch,GType typ)442 watch_enum (struct cb_watch_enum *watch, GType typ)
443 {
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);
451 }
452 
453 static void
set_enum(struct cb_watch_enum * watch,int x)454 set_enum (struct cb_watch_enum *watch, int x)
455 {
456 	if (x == watch->var)
457 		return;
458 
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 ();
464 	}
465 }
466 
467 /* -------------------------------------------------------------------------- */
468 
469 static void
cb_free_string_list(GSList * l)470 cb_free_string_list (GSList *l)
471 {
472 	g_slist_free_full (l, g_free);
473 }
474 
475 /**
476  * gnm_conf_init: (skip)
477  */
478 void
gnm_conf_init(void)479 gnm_conf_init (void)
480 {
481 	debug_getters = gnm_debug_flag ("conf-get");
482 	debug_setters = gnm_debug_flag ("conf-set");
483 
484 	if (debug_getters || debug_setters)
485 		g_printerr ("gnm_conf_init\n");
486 
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);
497 
498 	root = go_conf_get_node (NULL, GNM_CONF_DIR);
499 	g_hash_table_insert (node_pool, (gpointer)"/", root);
500 }
501 
502 /**
503  * gnm_conf_shutdown: (skip)
504  */
505 void
gnm_conf_shutdown(void)506 gnm_conf_shutdown (void)
507 {
508 	if (debug_getters || debug_setters)
509 		g_printerr ("gnm_conf_shutdown\n");
510 
511 	//go_conf_sync (root);
512 	if (sync_handler) {
513 		g_source_remove (sync_handler);
514 		sync_handler = 0;
515 	}
516 
517 	g_slist_free_full (watchers, (GDestroyNotify)free_watcher);
518 	watchers = NULL;
519 
520 	g_hash_table_destroy (string_pool);
521 	string_pool = NULL;
522 
523 	g_hash_table_destroy (string_list_pool);
524 	string_list_pool = NULL;
525 
526 	g_hash_table_destroy (node_watch);
527 	node_watch = NULL;
528 
529 	g_hash_table_destroy (node_pool);
530 	node_pool = NULL;
531 
532 	root = NULL;
533 }
534 
535 /**
536  * gnm_conf_set_persistence:
537  * @persist: whether to save changes
538  *
539  * If @persist is %TRUE, then changes from this point on will not be saved.
540  */
541 void
gnm_conf_set_persistence(gboolean persist)542 gnm_conf_set_persistence (gboolean persist)
543 {
544 	persist_changes = persist;
545 }
546 
547 
548 /**
549  * gnm_conf_get_page_setup:
550  *
551  * Returns: (transfer full): the default #GtkPageSetup.
552  **/
553 GtkPageSetup *
gnm_conf_get_page_setup(void)554 gnm_conf_get_page_setup (void)
555 {
556 	GtkPageSetup *page_setup = gtk_page_setup_new ();
557 
558 	page_setup_set_paper (page_setup,
559 			      gnm_conf_get_printsetup_paper ());
560 
561 	gtk_page_setup_set_orientation
562 		(page_setup,
563 		 gnm_conf_get_printsetup_paper_orientation ());
564 
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);
581 
582 	return page_setup;
583 }
584 
585 void
gnm_conf_set_page_setup(GtkPageSetup * setup)586 gnm_conf_set_page_setup (GtkPageSetup *setup)
587 {
588 	char *paper;
589 
590 	paper = page_setup_get_paper (setup);
591 	gnm_conf_set_printsetup_paper (paper);
592 	g_free (paper);
593 
594 	gnm_conf_set_printsetup_paper_orientation
595 		(gtk_page_setup_get_orientation (setup));
596 
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));
605 }
606 
607 /**
608  * gnm_conf_get_printer_decoration_font:
609  *
610  * Returns: (transfer full): a style appropriate font for headers and
611  * footers.
612  */
613 GnmStyle *
gnm_conf_get_printer_decoration_font(void)614 gnm_conf_get_printer_decoration_font (void)
615 {
616 	GnmStyle *style = gnm_style_new ();
617 
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 ());
626 
627 	return style;
628 }
629 
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
637 
638 
639 gboolean
gnm_conf_get_toolbar_visible(const char * name)640 gnm_conf_get_toolbar_visible (const char *name)
641 {
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 (););
646 
647 	g_warning ("Unknown toolbar: %s", name);
648 	return FALSE;
649 }
650 
651 void
gnm_conf_set_toolbar_visible(const char * name,gboolean x)652 gnm_conf_set_toolbar_visible (const char *name, gboolean x)
653 {
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););
658 }
659 
660 GtkPositionType
gnm_conf_get_toolbar_position(const char * name)661 gnm_conf_get_toolbar_position (const char *name)
662 {
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 (););
667 
668 	g_warning ("Unknown toolbar: %s", name);
669 	return GTK_POS_TOP;
670 }
671 
672 void
gnm_conf_set_toolbar_position(const char * name,GtkPositionType x)673 gnm_conf_set_toolbar_position (const char *name, GtkPositionType x)
674 {
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););
679 }
680 
681 #undef TOOLBAR_TANGO
682 
683 /**
684  * gnm_conf_get_print_settings:
685  *
686  * Returns: (transfer full): the default #GtkPrintSettings.
687  **/
688 GtkPrintSettings *
gnm_conf_get_print_settings(void)689 gnm_conf_get_print_settings (void)
690 {
691 	GtkPrintSettings *settings =  gtk_print_settings_new ();
692 	GSList *list = gnm_conf_get_printsetup_gtk_setting ();
693 
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;
698 
699 		list = list->next->next;
700 		gtk_print_settings_set (settings, key, value);
701 	}
702 
703 	return settings;
704 }
705 
706 static void
gnm_gconf_set_print_settings_cb(const gchar * key,const gchar * value,gpointer user_data)707 gnm_gconf_set_print_settings_cb (const gchar *key, const gchar *value, gpointer user_data)
708 {
709 	GSList **list = user_data;
710 
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));
714 }
715 
716 void
gnm_conf_set_print_settings(GtkPrintSettings * settings)717 gnm_conf_set_print_settings (GtkPrintSettings *settings)
718 {
719 	GSList *list = NULL;
720 
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);
724 }
725 
726 gboolean
gnm_conf_get_detachable_toolbars(void)727 gnm_conf_get_detachable_toolbars (void)
728 {
729 #ifdef WIN32
730 	return FALSE;
731 #else
732 	return go_conf_get_bool
733 		(NULL,
734 		 "/desktop/interface/toolbar_detachable");
735 #endif
736 }
737 
738 /* ------------------------------------------------------------------------- */
739 /*
740  * The following code was generated by running
741  *
742  *     make update-gnumeric-conf
743  */
744 
745 /* ----------- AUTOMATICALLY GENERATED CODE BELOW -- DO NOT EDIT ----------- */
746 
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,
752 };
753 
754 gboolean
gnm_conf_get_autocorrect_first_letter(void)755 gnm_conf_get_autocorrect_first_letter (void)
756 {
757 	if (!watch_autocorrect_first_letter.handler)
758 		watch_bool (&watch_autocorrect_first_letter);
759 	return watch_autocorrect_first_letter.var;
760 }
761 
762 void
gnm_conf_set_autocorrect_first_letter(gboolean x)763 gnm_conf_set_autocorrect_first_letter (gboolean x)
764 {
765 	if (!watch_autocorrect_first_letter.handler)
766 		watch_bool (&watch_autocorrect_first_letter);
767 	set_bool (&watch_autocorrect_first_letter, x);
768 }
769 
770 /**
771  * gnm_conf_get_autocorrect_first_letter_node:
772  *
773  * Returns: (transfer none): A #GOConfNode
774  */
775 GOConfNode *
gnm_conf_get_autocorrect_first_letter_node(void)776 gnm_conf_get_autocorrect_first_letter_node (void)
777 {
778 	return get_watch_node (&watch_autocorrect_first_letter);
779 }
780 
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.",
785 };
786 
787 /**
788  * gnm_conf_get_autocorrect_first_letter_list:
789  *
790  * Returns: (element-type utf8) (transfer none):
791  **/
792 GSList *
gnm_conf_get_autocorrect_first_letter_list(void)793 gnm_conf_get_autocorrect_first_letter_list (void)
794 {
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;
798 }
799 
800 /**
801  * gnm_conf_set_autocorrect_first_letter_list:
802  * @x: (element-type utf8): list of strings
803  *
804  **/
805 void
gnm_conf_set_autocorrect_first_letter_list(GSList * x)806 gnm_conf_set_autocorrect_first_letter_list (GSList *x)
807 {
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);
811 }
812 
813 /**
814  * gnm_conf_get_autocorrect_first_letter_list_node:
815  *
816  * Returns: (transfer none): A #GOConfNode
817  */
818 GOConfNode *
gnm_conf_get_autocorrect_first_letter_list_node(void)819 gnm_conf_get_autocorrect_first_letter_list_node (void)
820 {
821 	return get_watch_node (&watch_autocorrect_first_letter_list);
822 }
823 
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,
829 };
830 
831 gboolean
gnm_conf_get_autocorrect_init_caps(void)832 gnm_conf_get_autocorrect_init_caps (void)
833 {
834 	if (!watch_autocorrect_init_caps.handler)
835 		watch_bool (&watch_autocorrect_init_caps);
836 	return watch_autocorrect_init_caps.var;
837 }
838 
839 void
gnm_conf_set_autocorrect_init_caps(gboolean x)840 gnm_conf_set_autocorrect_init_caps (gboolean x)
841 {
842 	if (!watch_autocorrect_init_caps.handler)
843 		watch_bool (&watch_autocorrect_init_caps);
844 	set_bool (&watch_autocorrect_init_caps, x);
845 }
846 
847 /**
848  * gnm_conf_get_autocorrect_init_caps_node:
849  *
850  * Returns: (transfer none): A #GOConfNode
851  */
852 GOConfNode *
gnm_conf_get_autocorrect_init_caps_node(void)853 gnm_conf_get_autocorrect_init_caps_node (void)
854 {
855 	return get_watch_node (&watch_autocorrect_init_caps);
856 }
857 
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.",
862 };
863 
864 /**
865  * gnm_conf_get_autocorrect_init_caps_list:
866  *
867  * Returns: (element-type utf8) (transfer none):
868  **/
869 GSList *
gnm_conf_get_autocorrect_init_caps_list(void)870 gnm_conf_get_autocorrect_init_caps_list (void)
871 {
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;
875 }
876 
877 /**
878  * gnm_conf_set_autocorrect_init_caps_list:
879  * @x: (element-type utf8): list of strings
880  *
881  **/
882 void
gnm_conf_set_autocorrect_init_caps_list(GSList * x)883 gnm_conf_set_autocorrect_init_caps_list (GSList *x)
884 {
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);
888 }
889 
890 /**
891  * gnm_conf_get_autocorrect_init_caps_list_node:
892  *
893  * Returns: (transfer none): A #GOConfNode
894  */
895 GOConfNode *
gnm_conf_get_autocorrect_init_caps_list_node(void)896 gnm_conf_get_autocorrect_init_caps_list_node (void)
897 {
898 	return get_watch_node (&watch_autocorrect_init_caps_list);
899 }
900 
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,
906 };
907 
908 gboolean
gnm_conf_get_autocorrect_names_of_days(void)909 gnm_conf_get_autocorrect_names_of_days (void)
910 {
911 	if (!watch_autocorrect_names_of_days.handler)
912 		watch_bool (&watch_autocorrect_names_of_days);
913 	return watch_autocorrect_names_of_days.var;
914 }
915 
916 void
gnm_conf_set_autocorrect_names_of_days(gboolean x)917 gnm_conf_set_autocorrect_names_of_days (gboolean x)
918 {
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);
922 }
923 
924 /**
925  * gnm_conf_get_autocorrect_names_of_days_node:
926  *
927  * Returns: (transfer none): A #GOConfNode
928  */
929 GOConfNode *
gnm_conf_get_autocorrect_names_of_days_node(void)930 gnm_conf_get_autocorrect_names_of_days_node (void)
931 {
932 	return get_watch_node (&watch_autocorrect_names_of_days);
933 }
934 
935 static struct cb_watch_bool watch_autocorrect_replace = {
936 	0, "autocorrect/replace",
937 	"Autocorrect replace",
938 	"Autocorrect replace",
939 	TRUE,
940 };
941 
942 gboolean
gnm_conf_get_autocorrect_replace(void)943 gnm_conf_get_autocorrect_replace (void)
944 {
945 	if (!watch_autocorrect_replace.handler)
946 		watch_bool (&watch_autocorrect_replace);
947 	return watch_autocorrect_replace.var;
948 }
949 
950 void
gnm_conf_set_autocorrect_replace(gboolean x)951 gnm_conf_set_autocorrect_replace (gboolean x)
952 {
953 	if (!watch_autocorrect_replace.handler)
954 		watch_bool (&watch_autocorrect_replace);
955 	set_bool (&watch_autocorrect_replace, x);
956 }
957 
958 /**
959  * gnm_conf_get_autocorrect_replace_node:
960  *
961  * Returns: (transfer none): A #GOConfNode
962  */
963 GOConfNode *
gnm_conf_get_autocorrect_replace_node(void)964 gnm_conf_get_autocorrect_replace_node (void)
965 {
966 	return get_watch_node (&watch_autocorrect_replace);
967 }
968 
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.",
973 };
974 
975 /**
976  * gnm_conf_get_autoformat_extra_dirs:
977  *
978  * Returns: (element-type utf8) (transfer none):
979  **/
980 GSList *
gnm_conf_get_autoformat_extra_dirs(void)981 gnm_conf_get_autoformat_extra_dirs (void)
982 {
983 	if (!watch_autoformat_extra_dirs.handler)
984 		watch_string_list (&watch_autoformat_extra_dirs);
985 	return watch_autoformat_extra_dirs.var;
986 }
987 
988 /**
989  * gnm_conf_set_autoformat_extra_dirs:
990  * @x: (element-type utf8): list of strings
991  *
992  **/
993 void
gnm_conf_set_autoformat_extra_dirs(GSList * x)994 gnm_conf_set_autoformat_extra_dirs (GSList *x)
995 {
996 	if (!watch_autoformat_extra_dirs.handler)
997 		watch_string_list (&watch_autoformat_extra_dirs);
998 	set_string_list (&watch_autoformat_extra_dirs, x);
999 }
1000 
1001 /**
1002  * gnm_conf_get_autoformat_extra_dirs_node:
1003  *
1004  * Returns: (transfer none): A #GOConfNode
1005  */
1006 GOConfNode *
gnm_conf_get_autoformat_extra_dirs_node(void)1007 gnm_conf_get_autoformat_extra_dirs_node (void)
1008 {
1009 	return get_watch_node (&watch_autoformat_extra_dirs);
1010 }
1011 
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",
1017 };
1018 
1019 const char *
gnm_conf_get_autoformat_sys_dir(void)1020 gnm_conf_get_autoformat_sys_dir (void)
1021 {
1022 	if (!watch_autoformat_sys_dir.handler)
1023 		watch_string (&watch_autoformat_sys_dir);
1024 	return watch_autoformat_sys_dir.var;
1025 }
1026 
1027 void
gnm_conf_set_autoformat_sys_dir(const char * x)1028 gnm_conf_set_autoformat_sys_dir (const char *x)
1029 {
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);
1034 }
1035 
1036 /**
1037  * gnm_conf_get_autoformat_sys_dir_node:
1038  *
1039  * Returns: (transfer none): A #GOConfNode
1040  */
1041 GOConfNode *
gnm_conf_get_autoformat_sys_dir_node(void)1042 gnm_conf_get_autoformat_sys_dir_node (void)
1043 {
1044 	return get_watch_node (&watch_autoformat_sys_dir);
1045 }
1046 
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",
1052 };
1053 
1054 const char *
gnm_conf_get_autoformat_usr_dir(void)1055 gnm_conf_get_autoformat_usr_dir (void)
1056 {
1057 	if (!watch_autoformat_usr_dir.handler)
1058 		watch_string (&watch_autoformat_usr_dir);
1059 	return watch_autoformat_usr_dir.var;
1060 }
1061 
1062 void
gnm_conf_set_autoformat_usr_dir(const char * x)1063 gnm_conf_set_autoformat_usr_dir (const char *x)
1064 {
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);
1069 }
1070 
1071 /**
1072  * gnm_conf_get_autoformat_usr_dir_node:
1073  *
1074  * Returns: (transfer none): A #GOConfNode
1075  */
1076 GOConfNode *
gnm_conf_get_autoformat_usr_dir_node(void)1077 gnm_conf_get_autoformat_usr_dir_node (void)
1078 {
1079 	return get_watch_node (&watch_autoformat_usr_dir);
1080 }
1081 
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,
1087 };
1088 
1089 gboolean
gnm_conf_get_core_defaultfont_bold(void)1090 gnm_conf_get_core_defaultfont_bold (void)
1091 {
1092 	if (!watch_core_defaultfont_bold.handler)
1093 		watch_bool (&watch_core_defaultfont_bold);
1094 	return watch_core_defaultfont_bold.var;
1095 }
1096 
1097 void
gnm_conf_set_core_defaultfont_bold(gboolean x)1098 gnm_conf_set_core_defaultfont_bold (gboolean x)
1099 {
1100 	if (!watch_core_defaultfont_bold.handler)
1101 		watch_bool (&watch_core_defaultfont_bold);
1102 	set_bool (&watch_core_defaultfont_bold, x);
1103 }
1104 
1105 /**
1106  * gnm_conf_get_core_defaultfont_bold_node:
1107  *
1108  * Returns: (transfer none): A #GOConfNode
1109  */
1110 GOConfNode *
gnm_conf_get_core_defaultfont_bold_node(void)1111 gnm_conf_get_core_defaultfont_bold_node (void)
1112 {
1113 	return get_watch_node (&watch_core_defaultfont_bold);
1114 }
1115 
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,
1121 };
1122 
1123 gboolean
gnm_conf_get_core_defaultfont_italic(void)1124 gnm_conf_get_core_defaultfont_italic (void)
1125 {
1126 	if (!watch_core_defaultfont_italic.handler)
1127 		watch_bool (&watch_core_defaultfont_italic);
1128 	return watch_core_defaultfont_italic.var;
1129 }
1130 
1131 void
gnm_conf_set_core_defaultfont_italic(gboolean x)1132 gnm_conf_set_core_defaultfont_italic (gboolean x)
1133 {
1134 	if (!watch_core_defaultfont_italic.handler)
1135 		watch_bool (&watch_core_defaultfont_italic);
1136 	set_bool (&watch_core_defaultfont_italic, x);
1137 }
1138 
1139 /**
1140  * gnm_conf_get_core_defaultfont_italic_node:
1141  *
1142  * Returns: (transfer none): A #GOConfNode
1143  */
1144 GOConfNode *
gnm_conf_get_core_defaultfont_italic_node(void)1145 gnm_conf_get_core_defaultfont_italic_node (void)
1146 {
1147 	return get_watch_node (&watch_core_defaultfont_italic);
1148 }
1149 
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",
1155 };
1156 
1157 const char *
gnm_conf_get_core_defaultfont_name(void)1158 gnm_conf_get_core_defaultfont_name (void)
1159 {
1160 	if (!watch_core_defaultfont_name.handler)
1161 		watch_string (&watch_core_defaultfont_name);
1162 	return watch_core_defaultfont_name.var;
1163 }
1164 
1165 void
gnm_conf_set_core_defaultfont_name(const char * x)1166 gnm_conf_set_core_defaultfont_name (const char *x)
1167 {
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);
1172 }
1173 
1174 /**
1175  * gnm_conf_get_core_defaultfont_name_node:
1176  *
1177  * Returns: (transfer none): A #GOConfNode
1178  */
1179 GOConfNode *
gnm_conf_get_core_defaultfont_name_node(void)1180 gnm_conf_get_core_defaultfont_name_node (void)
1181 {
1182 	return get_watch_node (&watch_core_defaultfont_name);
1183 }
1184 
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,
1190 };
1191 
1192 double
gnm_conf_get_core_defaultfont_size(void)1193 gnm_conf_get_core_defaultfont_size (void)
1194 {
1195 	if (!watch_core_defaultfont_size.handler)
1196 		watch_double (&watch_core_defaultfont_size);
1197 	return watch_core_defaultfont_size.var;
1198 }
1199 
1200 void
gnm_conf_set_core_defaultfont_size(double x)1201 gnm_conf_set_core_defaultfont_size (double x)
1202 {
1203 	if (!watch_core_defaultfont_size.handler)
1204 		watch_double (&watch_core_defaultfont_size);
1205 	set_double (&watch_core_defaultfont_size, x);
1206 }
1207 
1208 /**
1209  * gnm_conf_get_core_defaultfont_size_node:
1210  *
1211  * Returns: (transfer none): A #GOConfNode
1212  */
1213 GOConfNode *
gnm_conf_get_core_defaultfont_size_node(void)1214 gnm_conf_get_core_defaultfont_size_node (void)
1215 {
1216 	return get_watch_node (&watch_core_defaultfont_size);
1217 }
1218 
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,
1224 };
1225 
1226 gboolean
gnm_conf_get_core_file_save_def_overwrite(void)1227 gnm_conf_get_core_file_save_def_overwrite (void)
1228 {
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;
1232 }
1233 
1234 void
gnm_conf_set_core_file_save_def_overwrite(gboolean x)1235 gnm_conf_set_core_file_save_def_overwrite (gboolean x)
1236 {
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);
1240 }
1241 
1242 /**
1243  * gnm_conf_get_core_file_save_def_overwrite_node:
1244  *
1245  * Returns: (transfer none): A #GOConfNode
1246  */
1247 GOConfNode *
gnm_conf_get_core_file_save_def_overwrite_node(void)1248 gnm_conf_get_core_file_save_def_overwrite_node (void)
1249 {
1250 	return get_watch_node (&watch_core_file_save_def_overwrite);
1251 }
1252 
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.",
1257 };
1258 
1259 /**
1260  * gnm_conf_get_core_file_save_extension_check_disabled:
1261  *
1262  * Returns: (element-type utf8) (transfer none):
1263  **/
1264 GSList *
gnm_conf_get_core_file_save_extension_check_disabled(void)1265 gnm_conf_get_core_file_save_extension_check_disabled (void)
1266 {
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;
1270 }
1271 
1272 /**
1273  * gnm_conf_set_core_file_save_extension_check_disabled:
1274  * @x: (element-type utf8): list of strings
1275  *
1276  **/
1277 void
gnm_conf_set_core_file_save_extension_check_disabled(GSList * x)1278 gnm_conf_set_core_file_save_extension_check_disabled (GSList *x)
1279 {
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);
1283 }
1284 
1285 /**
1286  * gnm_conf_get_core_file_save_extension_check_disabled_node:
1287  *
1288  * Returns: (transfer none): A #GOConfNode
1289  */
1290 GOConfNode *
gnm_conf_get_core_file_save_extension_check_disabled_node(void)1291 gnm_conf_get_core_file_save_extension_check_disabled_node (void)
1292 {
1293 	return get_watch_node (&watch_core_file_save_extension_check_disabled);
1294 }
1295 
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,
1301 };
1302 
1303 gboolean
gnm_conf_get_core_file_save_single_sheet(void)1304 gnm_conf_get_core_file_save_single_sheet (void)
1305 {
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;
1309 }
1310 
1311 void
gnm_conf_set_core_file_save_single_sheet(gboolean x)1312 gnm_conf_set_core_file_save_single_sheet (gboolean x)
1313 {
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);
1317 }
1318 
1319 /**
1320  * gnm_conf_get_core_file_save_single_sheet_node:
1321  *
1322  * Returns: (transfer none): A #GOConfNode
1323  */
1324 GOConfNode *
gnm_conf_get_core_file_save_single_sheet_node(void)1325 gnm_conf_get_core_file_save_single_sheet_node (void)
1326 {
1327 	return get_watch_node (&watch_core_file_save_single_sheet);
1328 }
1329 
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,
1335 };
1336 
1337 gboolean
gnm_conf_get_core_gui_cells_extension_markers(void)1338 gnm_conf_get_core_gui_cells_extension_markers (void)
1339 {
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;
1343 }
1344 
1345 void
gnm_conf_set_core_gui_cells_extension_markers(gboolean x)1346 gnm_conf_set_core_gui_cells_extension_markers (gboolean x)
1347 {
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);
1351 }
1352 
1353 /**
1354  * gnm_conf_get_core_gui_cells_extension_markers_node:
1355  *
1356  * Returns: (transfer none): A #GOConfNode
1357  */
1358 GOConfNode *
gnm_conf_get_core_gui_cells_extension_markers_node(void)1359 gnm_conf_get_core_gui_cells_extension_markers_node (void)
1360 {
1361 	return get_watch_node (&watch_core_gui_cells_extension_markers);
1362 }
1363 
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,
1369 };
1370 
1371 gboolean
gnm_conf_get_core_gui_cells_function_markers(void)1372 gnm_conf_get_core_gui_cells_function_markers (void)
1373 {
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;
1377 }
1378 
1379 void
gnm_conf_set_core_gui_cells_function_markers(gboolean x)1380 gnm_conf_set_core_gui_cells_function_markers (gboolean x)
1381 {
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);
1385 }
1386 
1387 /**
1388  * gnm_conf_get_core_gui_cells_function_markers_node:
1389  *
1390  * Returns: (transfer none): A #GOConfNode
1391  */
1392 GOConfNode *
gnm_conf_get_core_gui_cells_function_markers_node(void)1393 gnm_conf_get_core_gui_cells_function_markers_node (void)
1394 {
1395 	return get_watch_node (&watch_core_gui_cells_function_markers);
1396 }
1397 
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,
1403 };
1404 
1405 gboolean
gnm_conf_get_core_gui_editing_autocomplete(void)1406 gnm_conf_get_core_gui_editing_autocomplete (void)
1407 {
1408 	if (!watch_core_gui_editing_autocomplete.handler)
1409 		watch_bool (&watch_core_gui_editing_autocomplete);
1410 	return watch_core_gui_editing_autocomplete.var;
1411 }
1412 
1413 void
gnm_conf_set_core_gui_editing_autocomplete(gboolean x)1414 gnm_conf_set_core_gui_editing_autocomplete (gboolean x)
1415 {
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);
1419 }
1420 
1421 /**
1422  * gnm_conf_get_core_gui_editing_autocomplete_node:
1423  *
1424  * Returns: (transfer none): A #GOConfNode
1425  */
1426 GOConfNode *
gnm_conf_get_core_gui_editing_autocomplete_node(void)1427 gnm_conf_get_core_gui_editing_autocomplete_node (void)
1428 {
1429 	return get_watch_node (&watch_core_gui_editing_autocomplete);
1430 }
1431 
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,
1437 };
1438 
1439 int
gnm_conf_get_core_gui_editing_autocomplete_min_chars(void)1440 gnm_conf_get_core_gui_editing_autocomplete_min_chars (void)
1441 {
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;
1445 }
1446 
1447 void
gnm_conf_set_core_gui_editing_autocomplete_min_chars(int x)1448 gnm_conf_set_core_gui_editing_autocomplete_min_chars (int x)
1449 {
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);
1453 }
1454 
1455 /**
1456  * gnm_conf_get_core_gui_editing_autocomplete_min_chars_node:
1457  *
1458  * Returns: (transfer none): A #GOConfNode
1459  */
1460 GOConfNode *
gnm_conf_get_core_gui_editing_autocomplete_min_chars_node(void)1461 gnm_conf_get_core_gui_editing_autocomplete_min_chars_node (void)
1462 {
1463 	return get_watch_node (&watch_core_gui_editing_autocomplete_min_chars);
1464 }
1465 
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,
1471 };
1472 
1473 GODirection
gnm_conf_get_core_gui_editing_enter_moves_dir(void)1474 gnm_conf_get_core_gui_editing_enter_moves_dir (void)
1475 {
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;
1479 }
1480 
1481 void
gnm_conf_set_core_gui_editing_enter_moves_dir(GODirection x)1482 gnm_conf_set_core_gui_editing_enter_moves_dir (GODirection x)
1483 {
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);
1487 }
1488 
1489 /**
1490  * gnm_conf_get_core_gui_editing_enter_moves_dir_node:
1491  *
1492  * Returns: (transfer none): A #GOConfNode
1493  */
1494 GOConfNode *
gnm_conf_get_core_gui_editing_enter_moves_dir_node(void)1495 gnm_conf_get_core_gui_editing_enter_moves_dir_node (void)
1496 {
1497 	return get_watch_node (&watch_core_gui_editing_enter_moves_dir);
1498 }
1499 
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,
1505 };
1506 
1507 gboolean
gnm_conf_get_core_gui_editing_function_argument_tooltips(void)1508 gnm_conf_get_core_gui_editing_function_argument_tooltips (void)
1509 {
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;
1513 }
1514 
1515 void
gnm_conf_set_core_gui_editing_function_argument_tooltips(gboolean x)1516 gnm_conf_set_core_gui_editing_function_argument_tooltips (gboolean x)
1517 {
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);
1521 }
1522 
1523 /**
1524  * gnm_conf_get_core_gui_editing_function_argument_tooltips_node:
1525  *
1526  * Returns: (transfer none): A #GOConfNode
1527  */
1528 GOConfNode *
gnm_conf_get_core_gui_editing_function_argument_tooltips_node(void)1529 gnm_conf_get_core_gui_editing_function_argument_tooltips_node (void)
1530 {
1531 	return get_watch_node (&watch_core_gui_editing_function_argument_tooltips);
1532 }
1533 
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,
1539 };
1540 
1541 gboolean
gnm_conf_get_core_gui_editing_function_name_tooltips(void)1542 gnm_conf_get_core_gui_editing_function_name_tooltips (void)
1543 {
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;
1547 }
1548 
1549 void
gnm_conf_set_core_gui_editing_function_name_tooltips(gboolean x)1550 gnm_conf_set_core_gui_editing_function_name_tooltips (gboolean x)
1551 {
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);
1555 }
1556 
1557 /**
1558  * gnm_conf_get_core_gui_editing_function_name_tooltips_node:
1559  *
1560  * Returns: (transfer none): A #GOConfNode
1561  */
1562 GOConfNode *
gnm_conf_get_core_gui_editing_function_name_tooltips_node(void)1563 gnm_conf_get_core_gui_editing_function_name_tooltips_node (void)
1564 {
1565 	return get_watch_node (&watch_core_gui_editing_function_name_tooltips);
1566 }
1567 
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,
1573 };
1574 
1575 int
gnm_conf_get_core_gui_editing_recalclag(void)1576 gnm_conf_get_core_gui_editing_recalclag (void)
1577 {
1578 	if (!watch_core_gui_editing_recalclag.handler)
1579 		watch_int (&watch_core_gui_editing_recalclag);
1580 	return watch_core_gui_editing_recalclag.var;
1581 }
1582 
1583 void
gnm_conf_set_core_gui_editing_recalclag(int x)1584 gnm_conf_set_core_gui_editing_recalclag (int x)
1585 {
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);
1589 }
1590 
1591 /**
1592  * gnm_conf_get_core_gui_editing_recalclag_node:
1593  *
1594  * Returns: (transfer none): A #GOConfNode
1595  */
1596 GOConfNode *
gnm_conf_get_core_gui_editing_recalclag_node(void)1597 gnm_conf_get_core_gui_editing_recalclag_node (void)
1598 {
1599 	return get_watch_node (&watch_core_gui_editing_recalclag);
1600 }
1601 
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,
1607 };
1608 
1609 gboolean
gnm_conf_get_core_gui_editing_transitionkeys(void)1610 gnm_conf_get_core_gui_editing_transitionkeys (void)
1611 {
1612 	if (!watch_core_gui_editing_transitionkeys.handler)
1613 		watch_bool (&watch_core_gui_editing_transitionkeys);
1614 	return watch_core_gui_editing_transitionkeys.var;
1615 }
1616 
1617 void
gnm_conf_set_core_gui_editing_transitionkeys(gboolean x)1618 gnm_conf_set_core_gui_editing_transitionkeys (gboolean x)
1619 {
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);
1623 }
1624 
1625 /**
1626  * gnm_conf_get_core_gui_editing_transitionkeys_node:
1627  *
1628  * Returns: (transfer none): A #GOConfNode
1629  */
1630 GOConfNode *
gnm_conf_get_core_gui_editing_transitionkeys_node(void)1631 gnm_conf_get_core_gui_editing_transitionkeys_node (void)
1632 {
1633 	return get_watch_node (&watch_core_gui_editing_transitionkeys);
1634 }
1635 
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,
1641 };
1642 
1643 double
gnm_conf_get_core_gui_screen_horizontaldpi(void)1644 gnm_conf_get_core_gui_screen_horizontaldpi (void)
1645 {
1646 	if (!watch_core_gui_screen_horizontaldpi.handler)
1647 		watch_double (&watch_core_gui_screen_horizontaldpi);
1648 	return watch_core_gui_screen_horizontaldpi.var;
1649 }
1650 
1651 void
gnm_conf_set_core_gui_screen_horizontaldpi(double x)1652 gnm_conf_set_core_gui_screen_horizontaldpi (double x)
1653 {
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);
1657 }
1658 
1659 /**
1660  * gnm_conf_get_core_gui_screen_horizontaldpi_node:
1661  *
1662  * Returns: (transfer none): A #GOConfNode
1663  */
1664 GOConfNode *
gnm_conf_get_core_gui_screen_horizontaldpi_node(void)1665 gnm_conf_get_core_gui_screen_horizontaldpi_node (void)
1666 {
1667 	return get_watch_node (&watch_core_gui_screen_horizontaldpi);
1668 }
1669 
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,
1675 };
1676 
1677 double
gnm_conf_get_core_gui_screen_verticaldpi(void)1678 gnm_conf_get_core_gui_screen_verticaldpi (void)
1679 {
1680 	if (!watch_core_gui_screen_verticaldpi.handler)
1681 		watch_double (&watch_core_gui_screen_verticaldpi);
1682 	return watch_core_gui_screen_verticaldpi.var;
1683 }
1684 
1685 void
gnm_conf_set_core_gui_screen_verticaldpi(double x)1686 gnm_conf_set_core_gui_screen_verticaldpi (double x)
1687 {
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);
1691 }
1692 
1693 /**
1694  * gnm_conf_get_core_gui_screen_verticaldpi_node:
1695  *
1696  * Returns: (transfer none): A #GOConfNode
1697  */
1698 GOConfNode *
gnm_conf_get_core_gui_screen_verticaldpi_node(void)1699 gnm_conf_get_core_gui_screen_verticaldpi_node (void)
1700 {
1701 	return get_watch_node (&watch_core_gui_screen_verticaldpi);
1702 }
1703 
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,
1709 };
1710 
1711 GtkPositionType
gnm_conf_get_core_gui_toolbars_format_position(void)1712 gnm_conf_get_core_gui_toolbars_format_position (void)
1713 {
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;
1717 }
1718 
1719 void
gnm_conf_set_core_gui_toolbars_format_position(GtkPositionType x)1720 gnm_conf_set_core_gui_toolbars_format_position (GtkPositionType x)
1721 {
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);
1725 }
1726 
1727 /**
1728  * gnm_conf_get_core_gui_toolbars_format_position_node:
1729  *
1730  * Returns: (transfer none): A #GOConfNode
1731  */
1732 GOConfNode *
gnm_conf_get_core_gui_toolbars_format_position_node(void)1733 gnm_conf_get_core_gui_toolbars_format_position_node (void)
1734 {
1735 	return get_watch_node (&watch_core_gui_toolbars_format_position);
1736 }
1737 
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,
1743 };
1744 
1745 gboolean
gnm_conf_get_core_gui_toolbars_format_visible(void)1746 gnm_conf_get_core_gui_toolbars_format_visible (void)
1747 {
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;
1751 }
1752 
1753 void
gnm_conf_set_core_gui_toolbars_format_visible(gboolean x)1754 gnm_conf_set_core_gui_toolbars_format_visible (gboolean x)
1755 {
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);
1759 }
1760 
1761 /**
1762  * gnm_conf_get_core_gui_toolbars_format_visible_node:
1763  *
1764  * Returns: (transfer none): A #GOConfNode
1765  */
1766 GOConfNode *
gnm_conf_get_core_gui_toolbars_format_visible_node(void)1767 gnm_conf_get_core_gui_toolbars_format_visible_node (void)
1768 {
1769 	return get_watch_node (&watch_core_gui_toolbars_format_visible);
1770 }
1771 
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,
1777 };
1778 
1779 GtkPositionType
gnm_conf_get_core_gui_toolbars_object_position(void)1780 gnm_conf_get_core_gui_toolbars_object_position (void)
1781 {
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;
1785 }
1786 
1787 void
gnm_conf_set_core_gui_toolbars_object_position(GtkPositionType x)1788 gnm_conf_set_core_gui_toolbars_object_position (GtkPositionType x)
1789 {
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);
1793 }
1794 
1795 /**
1796  * gnm_conf_get_core_gui_toolbars_object_position_node:
1797  *
1798  * Returns: (transfer none): A #GOConfNode
1799  */
1800 GOConfNode *
gnm_conf_get_core_gui_toolbars_object_position_node(void)1801 gnm_conf_get_core_gui_toolbars_object_position_node (void)
1802 {
1803 	return get_watch_node (&watch_core_gui_toolbars_object_position);
1804 }
1805 
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,
1811 };
1812 
1813 gboolean
gnm_conf_get_core_gui_toolbars_object_visible(void)1814 gnm_conf_get_core_gui_toolbars_object_visible (void)
1815 {
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;
1819 }
1820 
1821 void
gnm_conf_set_core_gui_toolbars_object_visible(gboolean x)1822 gnm_conf_set_core_gui_toolbars_object_visible (gboolean x)
1823 {
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);
1827 }
1828 
1829 /**
1830  * gnm_conf_get_core_gui_toolbars_object_visible_node:
1831  *
1832  * Returns: (transfer none): A #GOConfNode
1833  */
1834 GOConfNode *
gnm_conf_get_core_gui_toolbars_object_visible_node(void)1835 gnm_conf_get_core_gui_toolbars_object_visible_node (void)
1836 {
1837 	return get_watch_node (&watch_core_gui_toolbars_object_visible);
1838 }
1839 
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,
1845 };
1846 
1847 GtkPositionType
gnm_conf_get_core_gui_toolbars_standard_position(void)1848 gnm_conf_get_core_gui_toolbars_standard_position (void)
1849 {
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;
1853 }
1854 
1855 void
gnm_conf_set_core_gui_toolbars_standard_position(GtkPositionType x)1856 gnm_conf_set_core_gui_toolbars_standard_position (GtkPositionType x)
1857 {
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);
1861 }
1862 
1863 /**
1864  * gnm_conf_get_core_gui_toolbars_standard_position_node:
1865  *
1866  * Returns: (transfer none): A #GOConfNode
1867  */
1868 GOConfNode *
gnm_conf_get_core_gui_toolbars_standard_position_node(void)1869 gnm_conf_get_core_gui_toolbars_standard_position_node (void)
1870 {
1871 	return get_watch_node (&watch_core_gui_toolbars_standard_position);
1872 }
1873 
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,
1879 };
1880 
1881 gboolean
gnm_conf_get_core_gui_toolbars_standard_visible(void)1882 gnm_conf_get_core_gui_toolbars_standard_visible (void)
1883 {
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;
1887 }
1888 
1889 void
gnm_conf_set_core_gui_toolbars_standard_visible(gboolean x)1890 gnm_conf_set_core_gui_toolbars_standard_visible (gboolean x)
1891 {
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);
1895 }
1896 
1897 /**
1898  * gnm_conf_get_core_gui_toolbars_standard_visible_node:
1899  *
1900  * Returns: (transfer none): A #GOConfNode
1901  */
1902 GOConfNode *
gnm_conf_get_core_gui_toolbars_standard_visible_node(void)1903 gnm_conf_get_core_gui_toolbars_standard_visible_node (void)
1904 {
1905 	return get_watch_node (&watch_core_gui_toolbars_standard_visible);
1906 }
1907 
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,
1913 };
1914 
1915 double
gnm_conf_get_core_gui_window_x(void)1916 gnm_conf_get_core_gui_window_x (void)
1917 {
1918 	if (!watch_core_gui_window_x.handler)
1919 		watch_double (&watch_core_gui_window_x);
1920 	return watch_core_gui_window_x.var;
1921 }
1922 
1923 void
gnm_conf_set_core_gui_window_x(double x)1924 gnm_conf_set_core_gui_window_x (double x)
1925 {
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);
1929 }
1930 
1931 /**
1932  * gnm_conf_get_core_gui_window_x_node:
1933  *
1934  * Returns: (transfer none): A #GOConfNode
1935  */
1936 GOConfNode *
gnm_conf_get_core_gui_window_x_node(void)1937 gnm_conf_get_core_gui_window_x_node (void)
1938 {
1939 	return get_watch_node (&watch_core_gui_window_x);
1940 }
1941 
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,
1947 };
1948 
1949 double
gnm_conf_get_core_gui_window_y(void)1950 gnm_conf_get_core_gui_window_y (void)
1951 {
1952 	if (!watch_core_gui_window_y.handler)
1953 		watch_double (&watch_core_gui_window_y);
1954 	return watch_core_gui_window_y.var;
1955 }
1956 
1957 void
gnm_conf_set_core_gui_window_y(double x)1958 gnm_conf_set_core_gui_window_y (double x)
1959 {
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);
1963 }
1964 
1965 /**
1966  * gnm_conf_get_core_gui_window_y_node:
1967  *
1968  * Returns: (transfer none): A #GOConfNode
1969  */
1970 GOConfNode *
gnm_conf_get_core_gui_window_y_node(void)1971 gnm_conf_get_core_gui_window_y_node (void)
1972 {
1973 	return get_watch_node (&watch_core_gui_window_y);
1974 }
1975 
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,
1981 };
1982 
1983 double
gnm_conf_get_core_gui_window_zoom(void)1984 gnm_conf_get_core_gui_window_zoom (void)
1985 {
1986 	if (!watch_core_gui_window_zoom.handler)
1987 		watch_double (&watch_core_gui_window_zoom);
1988 	return watch_core_gui_window_zoom.var;
1989 }
1990 
1991 void
gnm_conf_set_core_gui_window_zoom(double x)1992 gnm_conf_set_core_gui_window_zoom (double x)
1993 {
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);
1997 }
1998 
1999 /**
2000  * gnm_conf_get_core_gui_window_zoom_node:
2001  *
2002  * Returns: (transfer none): A #GOConfNode
2003  */
2004 GOConfNode *
gnm_conf_get_core_gui_window_zoom_node(void)2005 gnm_conf_get_core_gui_window_zoom_node (void)
2006 {
2007 	return get_watch_node (&watch_core_gui_window_zoom);
2008 }
2009 
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,
2015 };
2016 
2017 gboolean
gnm_conf_get_core_sort_default_ascending(void)2018 gnm_conf_get_core_sort_default_ascending (void)
2019 {
2020 	if (!watch_core_sort_default_ascending.handler)
2021 		watch_bool (&watch_core_sort_default_ascending);
2022 	return watch_core_sort_default_ascending.var;
2023 }
2024 
2025 void
gnm_conf_set_core_sort_default_ascending(gboolean x)2026 gnm_conf_set_core_sort_default_ascending (gboolean x)
2027 {
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);
2031 }
2032 
2033 /**
2034  * gnm_conf_get_core_sort_default_ascending_node:
2035  *
2036  * Returns: (transfer none): A #GOConfNode
2037  */
2038 GOConfNode *
gnm_conf_get_core_sort_default_ascending_node(void)2039 gnm_conf_get_core_sort_default_ascending_node (void)
2040 {
2041 	return get_watch_node (&watch_core_sort_default_ascending);
2042 }
2043 
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,
2049 };
2050 
2051 gboolean
gnm_conf_get_core_sort_default_by_case(void)2052 gnm_conf_get_core_sort_default_by_case (void)
2053 {
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;
2057 }
2058 
2059 void
gnm_conf_set_core_sort_default_by_case(gboolean x)2060 gnm_conf_set_core_sort_default_by_case (gboolean x)
2061 {
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);
2065 }
2066 
2067 /**
2068  * gnm_conf_get_core_sort_default_by_case_node:
2069  *
2070  * Returns: (transfer none): A #GOConfNode
2071  */
2072 GOConfNode *
gnm_conf_get_core_sort_default_by_case_node(void)2073 gnm_conf_get_core_sort_default_by_case_node (void)
2074 {
2075 	return get_watch_node (&watch_core_sort_default_by_case);
2076 }
2077 
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,
2083 };
2084 
2085 gboolean
gnm_conf_get_core_sort_default_retain_formats(void)2086 gnm_conf_get_core_sort_default_retain_formats (void)
2087 {
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;
2091 }
2092 
2093 void
gnm_conf_set_core_sort_default_retain_formats(gboolean x)2094 gnm_conf_set_core_sort_default_retain_formats (gboolean x)
2095 {
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);
2099 }
2100 
2101 /**
2102  * gnm_conf_get_core_sort_default_retain_formats_node:
2103  *
2104  * Returns: (transfer none): A #GOConfNode
2105  */
2106 GOConfNode *
gnm_conf_get_core_sort_default_retain_formats_node(void)2107 gnm_conf_get_core_sort_default_retain_formats_node (void)
2108 {
2109 	return get_watch_node (&watch_core_sort_default_retain_formats);
2110 }
2111 
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,
2117 };
2118 
2119 int
gnm_conf_get_core_sort_dialog_max_initial_clauses(void)2120 gnm_conf_get_core_sort_dialog_max_initial_clauses (void)
2121 {
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;
2125 }
2126 
2127 void
gnm_conf_set_core_sort_dialog_max_initial_clauses(int x)2128 gnm_conf_set_core_sort_dialog_max_initial_clauses (int x)
2129 {
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);
2133 }
2134 
2135 /**
2136  * gnm_conf_get_core_sort_dialog_max_initial_clauses_node:
2137  *
2138  * Returns: (transfer none): A #GOConfNode
2139  */
2140 GOConfNode *
gnm_conf_get_core_sort_dialog_max_initial_clauses_node(void)2141 gnm_conf_get_core_sort_dialog_max_initial_clauses_node (void)
2142 {
2143 	return get_watch_node (&watch_core_sort_dialog_max_initial_clauses);
2144 }
2145 
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,
2151 };
2152 
2153 int
gnm_conf_get_core_workbook_autosave_time(void)2154 gnm_conf_get_core_workbook_autosave_time (void)
2155 {
2156 	if (!watch_core_workbook_autosave_time.handler)
2157 		watch_int (&watch_core_workbook_autosave_time);
2158 	return watch_core_workbook_autosave_time.var;
2159 }
2160 
2161 void
gnm_conf_set_core_workbook_autosave_time(int x)2162 gnm_conf_set_core_workbook_autosave_time (int x)
2163 {
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);
2167 }
2168 
2169 /**
2170  * gnm_conf_get_core_workbook_autosave_time_node:
2171  *
2172  * Returns: (transfer none): A #GOConfNode
2173  */
2174 GOConfNode *
gnm_conf_get_core_workbook_autosave_time_node(void)2175 gnm_conf_get_core_workbook_autosave_time_node (void)
2176 {
2177 	return get_watch_node (&watch_core_workbook_autosave_time);
2178 }
2179 
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,
2185 };
2186 
2187 int
gnm_conf_get_core_workbook_n_cols(void)2188 gnm_conf_get_core_workbook_n_cols (void)
2189 {
2190 	if (!watch_core_workbook_n_cols.handler)
2191 		watch_int (&watch_core_workbook_n_cols);
2192 	return watch_core_workbook_n_cols.var;
2193 }
2194 
2195 void
gnm_conf_set_core_workbook_n_cols(int x)2196 gnm_conf_set_core_workbook_n_cols (int x)
2197 {
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);
2201 }
2202 
2203 /**
2204  * gnm_conf_get_core_workbook_n_cols_node:
2205  *
2206  * Returns: (transfer none): A #GOConfNode
2207  */
2208 GOConfNode *
gnm_conf_get_core_workbook_n_cols_node(void)2209 gnm_conf_get_core_workbook_n_cols_node (void)
2210 {
2211 	return get_watch_node (&watch_core_workbook_n_cols);
2212 }
2213 
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,
2219 };
2220 
2221 int
gnm_conf_get_core_workbook_n_rows(void)2222 gnm_conf_get_core_workbook_n_rows (void)
2223 {
2224 	if (!watch_core_workbook_n_rows.handler)
2225 		watch_int (&watch_core_workbook_n_rows);
2226 	return watch_core_workbook_n_rows.var;
2227 }
2228 
2229 void
gnm_conf_set_core_workbook_n_rows(int x)2230 gnm_conf_set_core_workbook_n_rows (int x)
2231 {
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);
2235 }
2236 
2237 /**
2238  * gnm_conf_get_core_workbook_n_rows_node:
2239  *
2240  * Returns: (transfer none): A #GOConfNode
2241  */
2242 GOConfNode *
gnm_conf_get_core_workbook_n_rows_node(void)2243 gnm_conf_get_core_workbook_n_rows_node (void)
2244 {
2245 	return get_watch_node (&watch_core_workbook_n_rows);
2246 }
2247 
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,
2253 };
2254 
2255 int
gnm_conf_get_core_workbook_n_sheet(void)2256 gnm_conf_get_core_workbook_n_sheet (void)
2257 {
2258 	if (!watch_core_workbook_n_sheet.handler)
2259 		watch_int (&watch_core_workbook_n_sheet);
2260 	return watch_core_workbook_n_sheet.var;
2261 }
2262 
2263 void
gnm_conf_set_core_workbook_n_sheet(int x)2264 gnm_conf_set_core_workbook_n_sheet (int x)
2265 {
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);
2269 }
2270 
2271 /**
2272  * gnm_conf_get_core_workbook_n_sheet_node:
2273  *
2274  * Returns: (transfer none): A #GOConfNode
2275  */
2276 GOConfNode *
gnm_conf_get_core_workbook_n_sheet_node(void)2277 gnm_conf_get_core_workbook_n_sheet_node (void)
2278 {
2279 	return get_watch_node (&watch_core_workbook_n_sheet);
2280 }
2281 
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,
2287 };
2288 
2289 int
gnm_conf_get_core_xml_compression_level(void)2290 gnm_conf_get_core_xml_compression_level (void)
2291 {
2292 	if (!watch_core_xml_compression_level.handler)
2293 		watch_int (&watch_core_xml_compression_level);
2294 	return watch_core_xml_compression_level.var;
2295 }
2296 
2297 void
gnm_conf_set_core_xml_compression_level(int x)2298 gnm_conf_set_core_xml_compression_level (int x)
2299 {
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);
2303 }
2304 
2305 /**
2306  * gnm_conf_get_core_xml_compression_level_node:
2307  *
2308  * Returns: (transfer none): A #GOConfNode
2309  */
2310 GOConfNode *
gnm_conf_get_core_xml_compression_level_node(void)2311 gnm_conf_get_core_xml_compression_level_node (void)
2312 {
2313 	return get_watch_node (&watch_core_xml_compression_level);
2314 }
2315 
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,
2321 };
2322 
2323 gboolean
gnm_conf_get_cut_and_paste_prefer_clipboard(void)2324 gnm_conf_get_cut_and_paste_prefer_clipboard (void)
2325 {
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;
2329 }
2330 
2331 void
gnm_conf_set_cut_and_paste_prefer_clipboard(gboolean x)2332 gnm_conf_set_cut_and_paste_prefer_clipboard (gboolean x)
2333 {
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);
2337 }
2338 
2339 /**
2340  * gnm_conf_get_cut_and_paste_prefer_clipboard_node:
2341  *
2342  * Returns: (transfer none): A #GOConfNode
2343  */
2344 GOConfNode *
gnm_conf_get_cut_and_paste_prefer_clipboard_node(void)2345 gnm_conf_get_cut_and_paste_prefer_clipboard_node (void)
2346 {
2347 	return get_watch_node (&watch_cut_and_paste_prefer_clipboard);
2348 }
2349 
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,
2355 };
2356 
2357 gboolean
gnm_conf_get_dialogs_rs_unfocused(void)2358 gnm_conf_get_dialogs_rs_unfocused (void)
2359 {
2360 	if (!watch_dialogs_rs_unfocused.handler)
2361 		watch_bool (&watch_dialogs_rs_unfocused);
2362 	return watch_dialogs_rs_unfocused.var;
2363 }
2364 
2365 void
gnm_conf_set_dialogs_rs_unfocused(gboolean x)2366 gnm_conf_set_dialogs_rs_unfocused (gboolean x)
2367 {
2368 	if (!watch_dialogs_rs_unfocused.handler)
2369 		watch_bool (&watch_dialogs_rs_unfocused);
2370 	set_bool (&watch_dialogs_rs_unfocused, x);
2371 }
2372 
2373 /**
2374  * gnm_conf_get_dialogs_rs_unfocused_node:
2375  *
2376  * Returns: (transfer none): A #GOConfNode
2377  */
2378 GOConfNode *
gnm_conf_get_dialogs_rs_unfocused_node(void)2379 gnm_conf_get_dialogs_rs_unfocused_node (void)
2380 {
2381 	return get_watch_node (&watch_dialogs_rs_unfocused);
2382 }
2383 
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,
2389 };
2390 
2391 int
gnm_conf_get_functionselector_num_of_recent(void)2392 gnm_conf_get_functionselector_num_of_recent (void)
2393 {
2394 	if (!watch_functionselector_num_of_recent.handler)
2395 		watch_int (&watch_functionselector_num_of_recent);
2396 	return watch_functionselector_num_of_recent.var;
2397 }
2398 
2399 void
gnm_conf_set_functionselector_num_of_recent(int x)2400 gnm_conf_set_functionselector_num_of_recent (int x)
2401 {
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);
2405 }
2406 
2407 /**
2408  * gnm_conf_get_functionselector_num_of_recent_node:
2409  *
2410  * Returns: (transfer none): A #GOConfNode
2411  */
2412 GOConfNode *
gnm_conf_get_functionselector_num_of_recent_node(void)2413 gnm_conf_get_functionselector_num_of_recent_node (void)
2414 {
2415 	return get_watch_node (&watch_functionselector_num_of_recent);
2416 }
2417 
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.",
2422 };
2423 
2424 /**
2425  * gnm_conf_get_functionselector_recentfunctions:
2426  *
2427  * Returns: (element-type utf8) (transfer none):
2428  **/
2429 GSList *
gnm_conf_get_functionselector_recentfunctions(void)2430 gnm_conf_get_functionselector_recentfunctions (void)
2431 {
2432 	if (!watch_functionselector_recentfunctions.handler)
2433 		watch_string_list (&watch_functionselector_recentfunctions);
2434 	return watch_functionselector_recentfunctions.var;
2435 }
2436 
2437 /**
2438  * gnm_conf_set_functionselector_recentfunctions:
2439  * @x: (element-type utf8): list of strings
2440  *
2441  **/
2442 void
gnm_conf_set_functionselector_recentfunctions(GSList * x)2443 gnm_conf_set_functionselector_recentfunctions (GSList *x)
2444 {
2445 	if (!watch_functionselector_recentfunctions.handler)
2446 		watch_string_list (&watch_functionselector_recentfunctions);
2447 	set_string_list (&watch_functionselector_recentfunctions, x);
2448 }
2449 
2450 /**
2451  * gnm_conf_get_functionselector_recentfunctions_node:
2452  *
2453  * Returns: (transfer none): A #GOConfNode
2454  */
2455 GOConfNode *
gnm_conf_get_functionselector_recentfunctions_node(void)2456 gnm_conf_get_functionselector_recentfunctions_node (void)
2457 {
2458 	return get_watch_node (&watch_functionselector_recentfunctions);
2459 }
2460 
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.",
2465 	"",
2466 };
2467 
2468 const char *
gnm_conf_get_plugin_glpk_glpsol_path(void)2469 gnm_conf_get_plugin_glpk_glpsol_path (void)
2470 {
2471 	if (!watch_plugin_glpk_glpsol_path.handler)
2472 		watch_string (&watch_plugin_glpk_glpsol_path);
2473 	return watch_plugin_glpk_glpsol_path.var;
2474 }
2475 
2476 void
gnm_conf_set_plugin_glpk_glpsol_path(const char * x)2477 gnm_conf_set_plugin_glpk_glpsol_path (const char *x)
2478 {
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);
2483 }
2484 
2485 /**
2486  * gnm_conf_get_plugin_glpk_glpsol_path_node:
2487  *
2488  * Returns: (transfer none): A #GOConfNode
2489  */
2490 GOConfNode *
gnm_conf_get_plugin_glpk_glpsol_path_node(void)2491 gnm_conf_get_plugin_glpk_glpsol_path_node (void)
2492 {
2493 	return get_watch_node (&watch_plugin_glpk_glpsol_path);
2494 }
2495 
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,
2501 };
2502 
2503 gboolean
gnm_conf_get_plugin_latex_use_utf8(void)2504 gnm_conf_get_plugin_latex_use_utf8 (void)
2505 {
2506 	if (!watch_plugin_latex_use_utf8.handler)
2507 		watch_bool (&watch_plugin_latex_use_utf8);
2508 	return watch_plugin_latex_use_utf8.var;
2509 }
2510 
2511 void
gnm_conf_set_plugin_latex_use_utf8(gboolean x)2512 gnm_conf_set_plugin_latex_use_utf8 (gboolean x)
2513 {
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);
2517 }
2518 
2519 /**
2520  * gnm_conf_get_plugin_latex_use_utf8_node:
2521  *
2522  * Returns: (transfer none): A #GOConfNode
2523  */
2524 GOConfNode *
gnm_conf_get_plugin_latex_use_utf8_node(void)2525 gnm_conf_get_plugin_latex_use_utf8_node (void)
2526 {
2527 	return get_watch_node (&watch_plugin_latex_use_utf8);
2528 }
2529 
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.",
2534 	"",
2535 };
2536 
2537 const char *
gnm_conf_get_plugin_lpsolve_lpsolve_path(void)2538 gnm_conf_get_plugin_lpsolve_lpsolve_path (void)
2539 {
2540 	if (!watch_plugin_lpsolve_lpsolve_path.handler)
2541 		watch_string (&watch_plugin_lpsolve_lpsolve_path);
2542 	return watch_plugin_lpsolve_lpsolve_path.var;
2543 }
2544 
2545 void
gnm_conf_set_plugin_lpsolve_lpsolve_path(const char * x)2546 gnm_conf_set_plugin_lpsolve_lpsolve_path (const char *x)
2547 {
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);
2552 }
2553 
2554 /**
2555  * gnm_conf_get_plugin_lpsolve_lpsolve_path_node:
2556  *
2557  * Returns: (transfer none): A #GOConfNode
2558  */
2559 GOConfNode *
gnm_conf_get_plugin_lpsolve_lpsolve_path_node(void)2560 gnm_conf_get_plugin_lpsolve_lpsolve_path_node (void)
2561 {
2562 	return get_watch_node (&watch_plugin_lpsolve_lpsolve_path);
2563 }
2564 
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,
2570 };
2571 
2572 gboolean
gnm_conf_get_plugins_activate_newplugins(void)2573 gnm_conf_get_plugins_activate_newplugins (void)
2574 {
2575 	if (!watch_plugins_activate_newplugins.handler)
2576 		watch_bool (&watch_plugins_activate_newplugins);
2577 	return watch_plugins_activate_newplugins.var;
2578 }
2579 
2580 void
gnm_conf_set_plugins_activate_newplugins(gboolean x)2581 gnm_conf_set_plugins_activate_newplugins (gboolean x)
2582 {
2583 	if (!watch_plugins_activate_newplugins.handler)
2584 		watch_bool (&watch_plugins_activate_newplugins);
2585 	set_bool (&watch_plugins_activate_newplugins, x);
2586 }
2587 
2588 /**
2589  * gnm_conf_get_plugins_activate_newplugins_node:
2590  *
2591  * Returns: (transfer none): A #GOConfNode
2592  */
2593 GOConfNode *
gnm_conf_get_plugins_activate_newplugins_node(void)2594 gnm_conf_get_plugins_activate_newplugins_node (void)
2595 {
2596 	return get_watch_node (&watch_plugins_activate_newplugins);
2597 }
2598 
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.",
2603 };
2604 
2605 /**
2606  * gnm_conf_get_plugins_active:
2607  *
2608  * Returns: (element-type utf8) (transfer none):
2609  **/
2610 GSList *
gnm_conf_get_plugins_active(void)2611 gnm_conf_get_plugins_active (void)
2612 {
2613 	if (!watch_plugins_active.handler)
2614 		watch_string_list (&watch_plugins_active);
2615 	return watch_plugins_active.var;
2616 }
2617 
2618 /**
2619  * gnm_conf_set_plugins_active:
2620  * @x: (element-type utf8): list of strings
2621  *
2622  **/
2623 void
gnm_conf_set_plugins_active(GSList * x)2624 gnm_conf_set_plugins_active (GSList *x)
2625 {
2626 	if (!watch_plugins_active.handler)
2627 		watch_string_list (&watch_plugins_active);
2628 	set_string_list (&watch_plugins_active, x);
2629 }
2630 
2631 /**
2632  * gnm_conf_get_plugins_active_node:
2633  *
2634  * Returns: (transfer none): A #GOConfNode
2635  */
2636 GOConfNode *
gnm_conf_get_plugins_active_node(void)2637 gnm_conf_get_plugins_active_node (void)
2638 {
2639 	return get_watch_node (&watch_plugins_active);
2640 }
2641 
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.",
2646 };
2647 
2648 /**
2649  * gnm_conf_get_plugins_extra_dirs:
2650  *
2651  * Returns: (element-type utf8) (transfer none):
2652  **/
2653 GSList *
gnm_conf_get_plugins_extra_dirs(void)2654 gnm_conf_get_plugins_extra_dirs (void)
2655 {
2656 	if (!watch_plugins_extra_dirs.handler)
2657 		watch_string_list (&watch_plugins_extra_dirs);
2658 	return watch_plugins_extra_dirs.var;
2659 }
2660 
2661 /**
2662  * gnm_conf_set_plugins_extra_dirs:
2663  * @x: (element-type utf8): list of strings
2664  *
2665  **/
2666 void
gnm_conf_set_plugins_extra_dirs(GSList * x)2667 gnm_conf_set_plugins_extra_dirs (GSList *x)
2668 {
2669 	if (!watch_plugins_extra_dirs.handler)
2670 		watch_string_list (&watch_plugins_extra_dirs);
2671 	set_string_list (&watch_plugins_extra_dirs, x);
2672 }
2673 
2674 /**
2675  * gnm_conf_get_plugins_extra_dirs_node:
2676  *
2677  * Returns: (transfer none): A #GOConfNode
2678  */
2679 GOConfNode *
gnm_conf_get_plugins_extra_dirs_node(void)2680 gnm_conf_get_plugins_extra_dirs_node (void)
2681 {
2682 	return get_watch_node (&watch_plugins_extra_dirs);
2683 }
2684 
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.",
2689 };
2690 
2691 /**
2692  * gnm_conf_get_plugins_file_states:
2693  *
2694  * Returns: (element-type utf8) (transfer none):
2695  **/
2696 GSList *
gnm_conf_get_plugins_file_states(void)2697 gnm_conf_get_plugins_file_states (void)
2698 {
2699 	if (!watch_plugins_file_states.handler)
2700 		watch_string_list (&watch_plugins_file_states);
2701 	return watch_plugins_file_states.var;
2702 }
2703 
2704 /**
2705  * gnm_conf_set_plugins_file_states:
2706  * @x: (element-type utf8): list of strings
2707  *
2708  **/
2709 void
gnm_conf_set_plugins_file_states(GSList * x)2710 gnm_conf_set_plugins_file_states (GSList *x)
2711 {
2712 	if (!watch_plugins_file_states.handler)
2713 		watch_string_list (&watch_plugins_file_states);
2714 	set_string_list (&watch_plugins_file_states, x);
2715 }
2716 
2717 /**
2718  * gnm_conf_get_plugins_file_states_node:
2719  *
2720  * Returns: (transfer none): A #GOConfNode
2721  */
2722 GOConfNode *
gnm_conf_get_plugins_file_states_node(void)2723 gnm_conf_get_plugins_file_states_node (void)
2724 {
2725 	return get_watch_node (&watch_plugins_file_states);
2726 }
2727 
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.",
2732 };
2733 
2734 /**
2735  * gnm_conf_get_plugins_known:
2736  *
2737  * Returns: (element-type utf8) (transfer none):
2738  **/
2739 GSList *
gnm_conf_get_plugins_known(void)2740 gnm_conf_get_plugins_known (void)
2741 {
2742 	if (!watch_plugins_known.handler)
2743 		watch_string_list (&watch_plugins_known);
2744 	return watch_plugins_known.var;
2745 }
2746 
2747 /**
2748  * gnm_conf_set_plugins_known:
2749  * @x: (element-type utf8): list of strings
2750  *
2751  **/
2752 void
gnm_conf_set_plugins_known(GSList * x)2753 gnm_conf_set_plugins_known (GSList *x)
2754 {
2755 	if (!watch_plugins_known.handler)
2756 		watch_string_list (&watch_plugins_known);
2757 	set_string_list (&watch_plugins_known, x);
2758 }
2759 
2760 /**
2761  * gnm_conf_get_plugins_known_node:
2762  *
2763  * Returns: (transfer none): A #GOConfNode
2764  */
2765 GOConfNode *
gnm_conf_get_plugins_known_node(void)2766 gnm_conf_get_plugins_known_node (void)
2767 {
2768 	return get_watch_node (&watch_plugins_known);
2769 }
2770 
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,
2776 };
2777 
2778 gboolean
gnm_conf_get_printsetup_across_then_down(void)2779 gnm_conf_get_printsetup_across_then_down (void)
2780 {
2781 	if (!watch_printsetup_across_then_down.handler)
2782 		watch_bool (&watch_printsetup_across_then_down);
2783 	return watch_printsetup_across_then_down.var;
2784 }
2785 
2786 void
gnm_conf_set_printsetup_across_then_down(gboolean x)2787 gnm_conf_set_printsetup_across_then_down (gboolean x)
2788 {
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);
2792 }
2793 
2794 /**
2795  * gnm_conf_get_printsetup_across_then_down_node:
2796  *
2797  * Returns: (transfer none): A #GOConfNode
2798  */
2799 GOConfNode *
gnm_conf_get_printsetup_across_then_down_node(void)2800 gnm_conf_get_printsetup_across_then_down_node (void)
2801 {
2802 	return get_watch_node (&watch_printsetup_across_then_down);
2803 }
2804 
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,
2810 };
2811 
2812 gboolean
gnm_conf_get_printsetup_all_sheets(void)2813 gnm_conf_get_printsetup_all_sheets (void)
2814 {
2815 	if (!watch_printsetup_all_sheets.handler)
2816 		watch_bool (&watch_printsetup_all_sheets);
2817 	return watch_printsetup_all_sheets.var;
2818 }
2819 
2820 void
gnm_conf_set_printsetup_all_sheets(gboolean x)2821 gnm_conf_set_printsetup_all_sheets (gboolean x)
2822 {
2823 	if (!watch_printsetup_all_sheets.handler)
2824 		watch_bool (&watch_printsetup_all_sheets);
2825 	set_bool (&watch_printsetup_all_sheets, x);
2826 }
2827 
2828 /**
2829  * gnm_conf_get_printsetup_all_sheets_node:
2830  *
2831  * Returns: (transfer none): A #GOConfNode
2832  */
2833 GOConfNode *
gnm_conf_get_printsetup_all_sheets_node(void)2834 gnm_conf_get_printsetup_all_sheets_node (void)
2835 {
2836 	return get_watch_node (&watch_printsetup_all_sheets);
2837 }
2838 
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,
2844 };
2845 
2846 gboolean
gnm_conf_get_printsetup_center_horizontally(void)2847 gnm_conf_get_printsetup_center_horizontally (void)
2848 {
2849 	if (!watch_printsetup_center_horizontally.handler)
2850 		watch_bool (&watch_printsetup_center_horizontally);
2851 	return watch_printsetup_center_horizontally.var;
2852 }
2853 
2854 void
gnm_conf_set_printsetup_center_horizontally(gboolean x)2855 gnm_conf_set_printsetup_center_horizontally (gboolean x)
2856 {
2857 	if (!watch_printsetup_center_horizontally.handler)
2858 		watch_bool (&watch_printsetup_center_horizontally);
2859 	set_bool (&watch_printsetup_center_horizontally, x);
2860 }
2861 
2862 /**
2863  * gnm_conf_get_printsetup_center_horizontally_node:
2864  *
2865  * Returns: (transfer none): A #GOConfNode
2866  */
2867 GOConfNode *
gnm_conf_get_printsetup_center_horizontally_node(void)2868 gnm_conf_get_printsetup_center_horizontally_node (void)
2869 {
2870 	return get_watch_node (&watch_printsetup_center_horizontally);
2871 }
2872 
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,
2878 };
2879 
2880 gboolean
gnm_conf_get_printsetup_center_vertically(void)2881 gnm_conf_get_printsetup_center_vertically (void)
2882 {
2883 	if (!watch_printsetup_center_vertically.handler)
2884 		watch_bool (&watch_printsetup_center_vertically);
2885 	return watch_printsetup_center_vertically.var;
2886 }
2887 
2888 void
gnm_conf_set_printsetup_center_vertically(gboolean x)2889 gnm_conf_set_printsetup_center_vertically (gboolean x)
2890 {
2891 	if (!watch_printsetup_center_vertically.handler)
2892 		watch_bool (&watch_printsetup_center_vertically);
2893 	set_bool (&watch_printsetup_center_vertically, x);
2894 }
2895 
2896 /**
2897  * gnm_conf_get_printsetup_center_vertically_node:
2898  *
2899  * Returns: (transfer none): A #GOConfNode
2900  */
2901 GOConfNode *
gnm_conf_get_printsetup_center_vertically_node(void)2902 gnm_conf_get_printsetup_center_vertically_node (void)
2903 {
2904 	return get_watch_node (&watch_printsetup_center_vertically);
2905 }
2906 
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.",
2911 };
2912 
2913 /**
2914  * gnm_conf_get_printsetup_footer:
2915  *
2916  * Returns: (element-type utf8) (transfer none):
2917  **/
2918 GSList *
gnm_conf_get_printsetup_footer(void)2919 gnm_conf_get_printsetup_footer (void)
2920 {
2921 	if (!watch_printsetup_footer.handler)
2922 		watch_string_list (&watch_printsetup_footer);
2923 	return watch_printsetup_footer.var;
2924 }
2925 
2926 /**
2927  * gnm_conf_set_printsetup_footer:
2928  * @x: (element-type utf8): list of strings
2929  *
2930  **/
2931 void
gnm_conf_set_printsetup_footer(GSList * x)2932 gnm_conf_set_printsetup_footer (GSList *x)
2933 {
2934 	if (!watch_printsetup_footer.handler)
2935 		watch_string_list (&watch_printsetup_footer);
2936 	set_string_list (&watch_printsetup_footer, x);
2937 }
2938 
2939 /**
2940  * gnm_conf_get_printsetup_footer_node:
2941  *
2942  * Returns: (transfer none): A #GOConfNode
2943  */
2944 GOConfNode *
gnm_conf_get_printsetup_footer_node(void)2945 gnm_conf_get_printsetup_footer_node (void)
2946 {
2947 	return get_watch_node (&watch_printsetup_footer);
2948 }
2949 
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.",
2954 };
2955 
2956 /**
2957  * gnm_conf_get_printsetup_gtk_setting:
2958  *
2959  * Returns: (element-type utf8) (transfer none):
2960  **/
2961 GSList *
gnm_conf_get_printsetup_gtk_setting(void)2962 gnm_conf_get_printsetup_gtk_setting (void)
2963 {
2964 	if (!watch_printsetup_gtk_setting.handler)
2965 		watch_string_list (&watch_printsetup_gtk_setting);
2966 	return watch_printsetup_gtk_setting.var;
2967 }
2968 
2969 /**
2970  * gnm_conf_set_printsetup_gtk_setting:
2971  * @x: (element-type utf8): list of strings
2972  *
2973  **/
2974 void
gnm_conf_set_printsetup_gtk_setting(GSList * x)2975 gnm_conf_set_printsetup_gtk_setting (GSList *x)
2976 {
2977 	if (!watch_printsetup_gtk_setting.handler)
2978 		watch_string_list (&watch_printsetup_gtk_setting);
2979 	set_string_list (&watch_printsetup_gtk_setting, x);
2980 }
2981 
2982 /**
2983  * gnm_conf_get_printsetup_gtk_setting_node:
2984  *
2985  * Returns: (transfer none): A #GOConfNode
2986  */
2987 GOConfNode *
gnm_conf_get_printsetup_gtk_setting_node(void)2988 gnm_conf_get_printsetup_gtk_setting_node (void)
2989 {
2990 	return get_watch_node (&watch_printsetup_gtk_setting);
2991 }
2992 
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.",
2997 };
2998 
2999 /**
3000  * gnm_conf_get_printsetup_header:
3001  *
3002  * Returns: (element-type utf8) (transfer none):
3003  **/
3004 GSList *
gnm_conf_get_printsetup_header(void)3005 gnm_conf_get_printsetup_header (void)
3006 {
3007 	if (!watch_printsetup_header.handler)
3008 		watch_string_list (&watch_printsetup_header);
3009 	return watch_printsetup_header.var;
3010 }
3011 
3012 /**
3013  * gnm_conf_set_printsetup_header:
3014  * @x: (element-type utf8): list of strings
3015  *
3016  **/
3017 void
gnm_conf_set_printsetup_header(GSList * x)3018 gnm_conf_set_printsetup_header (GSList *x)
3019 {
3020 	if (!watch_printsetup_header.handler)
3021 		watch_string_list (&watch_printsetup_header);
3022 	set_string_list (&watch_printsetup_header, x);
3023 }
3024 
3025 /**
3026  * gnm_conf_get_printsetup_header_node:
3027  *
3028  * Returns: (transfer none): A #GOConfNode
3029  */
3030 GOConfNode *
gnm_conf_get_printsetup_header_node(void)3031 gnm_conf_get_printsetup_header_node (void)
3032 {
3033 	return get_watch_node (&watch_printsetup_header);
3034 }
3035 
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,
3041 };
3042 
3043 gboolean
gnm_conf_get_printsetup_hf_font_bold(void)3044 gnm_conf_get_printsetup_hf_font_bold (void)
3045 {
3046 	if (!watch_printsetup_hf_font_bold.handler)
3047 		watch_bool (&watch_printsetup_hf_font_bold);
3048 	return watch_printsetup_hf_font_bold.var;
3049 }
3050 
3051 void
gnm_conf_set_printsetup_hf_font_bold(gboolean x)3052 gnm_conf_set_printsetup_hf_font_bold (gboolean x)
3053 {
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);
3057 }
3058 
3059 /**
3060  * gnm_conf_get_printsetup_hf_font_bold_node:
3061  *
3062  * Returns: (transfer none): A #GOConfNode
3063  */
3064 GOConfNode *
gnm_conf_get_printsetup_hf_font_bold_node(void)3065 gnm_conf_get_printsetup_hf_font_bold_node (void)
3066 {
3067 	return get_watch_node (&watch_printsetup_hf_font_bold);
3068 }
3069 
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,
3075 };
3076 
3077 gboolean
gnm_conf_get_printsetup_hf_font_italic(void)3078 gnm_conf_get_printsetup_hf_font_italic (void)
3079 {
3080 	if (!watch_printsetup_hf_font_italic.handler)
3081 		watch_bool (&watch_printsetup_hf_font_italic);
3082 	return watch_printsetup_hf_font_italic.var;
3083 }
3084 
3085 void
gnm_conf_set_printsetup_hf_font_italic(gboolean x)3086 gnm_conf_set_printsetup_hf_font_italic (gboolean x)
3087 {
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);
3091 }
3092 
3093 /**
3094  * gnm_conf_get_printsetup_hf_font_italic_node:
3095  *
3096  * Returns: (transfer none): A #GOConfNode
3097  */
3098 GOConfNode *
gnm_conf_get_printsetup_hf_font_italic_node(void)3099 gnm_conf_get_printsetup_hf_font_italic_node (void)
3100 {
3101 	return get_watch_node (&watch_printsetup_hf_font_italic);
3102 }
3103 
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",
3109 };
3110 
3111 const char *
gnm_conf_get_printsetup_hf_font_name(void)3112 gnm_conf_get_printsetup_hf_font_name (void)
3113 {
3114 	if (!watch_printsetup_hf_font_name.handler)
3115 		watch_string (&watch_printsetup_hf_font_name);
3116 	return watch_printsetup_hf_font_name.var;
3117 }
3118 
3119 void
gnm_conf_set_printsetup_hf_font_name(const char * x)3120 gnm_conf_set_printsetup_hf_font_name (const char *x)
3121 {
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);
3126 }
3127 
3128 /**
3129  * gnm_conf_get_printsetup_hf_font_name_node:
3130  *
3131  * Returns: (transfer none): A #GOConfNode
3132  */
3133 GOConfNode *
gnm_conf_get_printsetup_hf_font_name_node(void)3134 gnm_conf_get_printsetup_hf_font_name_node (void)
3135 {
3136 	return get_watch_node (&watch_printsetup_hf_font_name);
3137 }
3138 
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,
3144 };
3145 
3146 double
gnm_conf_get_printsetup_hf_font_size(void)3147 gnm_conf_get_printsetup_hf_font_size (void)
3148 {
3149 	if (!watch_printsetup_hf_font_size.handler)
3150 		watch_double (&watch_printsetup_hf_font_size);
3151 	return watch_printsetup_hf_font_size.var;
3152 }
3153 
3154 void
gnm_conf_set_printsetup_hf_font_size(double x)3155 gnm_conf_set_printsetup_hf_font_size (double x)
3156 {
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);
3160 }
3161 
3162 /**
3163  * gnm_conf_get_printsetup_hf_font_size_node:
3164  *
3165  * Returns: (transfer none): A #GOConfNode
3166  */
3167 GOConfNode *
gnm_conf_get_printsetup_hf_font_size_node(void)3168 gnm_conf_get_printsetup_hf_font_size_node (void)
3169 {
3170 	return get_watch_node (&watch_printsetup_hf_font_size);
3171 }
3172 
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.",
3177 };
3178 
3179 /**
3180  * gnm_conf_get_printsetup_hf_left:
3181  *
3182  * Returns: (element-type utf8) (transfer none):
3183  **/
3184 GSList *
gnm_conf_get_printsetup_hf_left(void)3185 gnm_conf_get_printsetup_hf_left (void)
3186 {
3187 	if (!watch_printsetup_hf_left.handler)
3188 		watch_string_list (&watch_printsetup_hf_left);
3189 	return watch_printsetup_hf_left.var;
3190 }
3191 
3192 /**
3193  * gnm_conf_set_printsetup_hf_left:
3194  * @x: (element-type utf8): list of strings
3195  *
3196  **/
3197 void
gnm_conf_set_printsetup_hf_left(GSList * x)3198 gnm_conf_set_printsetup_hf_left (GSList *x)
3199 {
3200 	if (!watch_printsetup_hf_left.handler)
3201 		watch_string_list (&watch_printsetup_hf_left);
3202 	set_string_list (&watch_printsetup_hf_left, x);
3203 }
3204 
3205 /**
3206  * gnm_conf_get_printsetup_hf_left_node:
3207  *
3208  * Returns: (transfer none): A #GOConfNode
3209  */
3210 GOConfNode *
gnm_conf_get_printsetup_hf_left_node(void)3211 gnm_conf_get_printsetup_hf_left_node (void)
3212 {
3213 	return get_watch_node (&watch_printsetup_hf_left);
3214 }
3215 
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.",
3220 };
3221 
3222 /**
3223  * gnm_conf_get_printsetup_hf_middle:
3224  *
3225  * Returns: (element-type utf8) (transfer none):
3226  **/
3227 GSList *
gnm_conf_get_printsetup_hf_middle(void)3228 gnm_conf_get_printsetup_hf_middle (void)
3229 {
3230 	if (!watch_printsetup_hf_middle.handler)
3231 		watch_string_list (&watch_printsetup_hf_middle);
3232 	return watch_printsetup_hf_middle.var;
3233 }
3234 
3235 /**
3236  * gnm_conf_set_printsetup_hf_middle:
3237  * @x: (element-type utf8): list of strings
3238  *
3239  **/
3240 void
gnm_conf_set_printsetup_hf_middle(GSList * x)3241 gnm_conf_set_printsetup_hf_middle (GSList *x)
3242 {
3243 	if (!watch_printsetup_hf_middle.handler)
3244 		watch_string_list (&watch_printsetup_hf_middle);
3245 	set_string_list (&watch_printsetup_hf_middle, x);
3246 }
3247 
3248 /**
3249  * gnm_conf_get_printsetup_hf_middle_node:
3250  *
3251  * Returns: (transfer none): A #GOConfNode
3252  */
3253 GOConfNode *
gnm_conf_get_printsetup_hf_middle_node(void)3254 gnm_conf_get_printsetup_hf_middle_node (void)
3255 {
3256 	return get_watch_node (&watch_printsetup_hf_middle);
3257 }
3258 
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.",
3263 };
3264 
3265 /**
3266  * gnm_conf_get_printsetup_hf_right:
3267  *
3268  * Returns: (element-type utf8) (transfer none):
3269  **/
3270 GSList *
gnm_conf_get_printsetup_hf_right(void)3271 gnm_conf_get_printsetup_hf_right (void)
3272 {
3273 	if (!watch_printsetup_hf_right.handler)
3274 		watch_string_list (&watch_printsetup_hf_right);
3275 	return watch_printsetup_hf_right.var;
3276 }
3277 
3278 /**
3279  * gnm_conf_set_printsetup_hf_right:
3280  * @x: (element-type utf8): list of strings
3281  *
3282  **/
3283 void
gnm_conf_set_printsetup_hf_right(GSList * x)3284 gnm_conf_set_printsetup_hf_right (GSList *x)
3285 {
3286 	if (!watch_printsetup_hf_right.handler)
3287 		watch_string_list (&watch_printsetup_hf_right);
3288 	set_string_list (&watch_printsetup_hf_right, x);
3289 }
3290 
3291 /**
3292  * gnm_conf_get_printsetup_hf_right_node:
3293  *
3294  * Returns: (transfer none): A #GOConfNode
3295  */
3296 GOConfNode *
gnm_conf_get_printsetup_hf_right_node(void)3297 gnm_conf_get_printsetup_hf_right_node (void)
3298 {
3299 	return get_watch_node (&watch_printsetup_hf_right);
3300 }
3301 
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,
3307 };
3308 
3309 double
gnm_conf_get_printsetup_margin_bottom(void)3310 gnm_conf_get_printsetup_margin_bottom (void)
3311 {
3312 	if (!watch_printsetup_margin_bottom.handler)
3313 		watch_double (&watch_printsetup_margin_bottom);
3314 	return watch_printsetup_margin_bottom.var;
3315 }
3316 
3317 void
gnm_conf_set_printsetup_margin_bottom(double x)3318 gnm_conf_set_printsetup_margin_bottom (double x)
3319 {
3320 	if (!watch_printsetup_margin_bottom.handler)
3321 		watch_double (&watch_printsetup_margin_bottom);
3322 	set_double (&watch_printsetup_margin_bottom, x);
3323 }
3324 
3325 /**
3326  * gnm_conf_get_printsetup_margin_bottom_node:
3327  *
3328  * Returns: (transfer none): A #GOConfNode
3329  */
3330 GOConfNode *
gnm_conf_get_printsetup_margin_bottom_node(void)3331 gnm_conf_get_printsetup_margin_bottom_node (void)
3332 {
3333 	return get_watch_node (&watch_printsetup_margin_bottom);
3334 }
3335 
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,
3341 };
3342 
3343 double
gnm_conf_get_printsetup_margin_gtk_bottom(void)3344 gnm_conf_get_printsetup_margin_gtk_bottom (void)
3345 {
3346 	if (!watch_printsetup_margin_gtk_bottom.handler)
3347 		watch_double (&watch_printsetup_margin_gtk_bottom);
3348 	return watch_printsetup_margin_gtk_bottom.var;
3349 }
3350 
3351 void
gnm_conf_set_printsetup_margin_gtk_bottom(double x)3352 gnm_conf_set_printsetup_margin_gtk_bottom (double x)
3353 {
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);
3357 }
3358 
3359 /**
3360  * gnm_conf_get_printsetup_margin_gtk_bottom_node:
3361  *
3362  * Returns: (transfer none): A #GOConfNode
3363  */
3364 GOConfNode *
gnm_conf_get_printsetup_margin_gtk_bottom_node(void)3365 gnm_conf_get_printsetup_margin_gtk_bottom_node (void)
3366 {
3367 	return get_watch_node (&watch_printsetup_margin_gtk_bottom);
3368 }
3369 
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,
3375 };
3376 
3377 double
gnm_conf_get_printsetup_margin_gtk_left(void)3378 gnm_conf_get_printsetup_margin_gtk_left (void)
3379 {
3380 	if (!watch_printsetup_margin_gtk_left.handler)
3381 		watch_double (&watch_printsetup_margin_gtk_left);
3382 	return watch_printsetup_margin_gtk_left.var;
3383 }
3384 
3385 void
gnm_conf_set_printsetup_margin_gtk_left(double x)3386 gnm_conf_set_printsetup_margin_gtk_left (double x)
3387 {
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);
3391 }
3392 
3393 /**
3394  * gnm_conf_get_printsetup_margin_gtk_left_node:
3395  *
3396  * Returns: (transfer none): A #GOConfNode
3397  */
3398 GOConfNode *
gnm_conf_get_printsetup_margin_gtk_left_node(void)3399 gnm_conf_get_printsetup_margin_gtk_left_node (void)
3400 {
3401 	return get_watch_node (&watch_printsetup_margin_gtk_left);
3402 }
3403 
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,
3409 };
3410 
3411 double
gnm_conf_get_printsetup_margin_gtk_right(void)3412 gnm_conf_get_printsetup_margin_gtk_right (void)
3413 {
3414 	if (!watch_printsetup_margin_gtk_right.handler)
3415 		watch_double (&watch_printsetup_margin_gtk_right);
3416 	return watch_printsetup_margin_gtk_right.var;
3417 }
3418 
3419 void
gnm_conf_set_printsetup_margin_gtk_right(double x)3420 gnm_conf_set_printsetup_margin_gtk_right (double x)
3421 {
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);
3425 }
3426 
3427 /**
3428  * gnm_conf_get_printsetup_margin_gtk_right_node:
3429  *
3430  * Returns: (transfer none): A #GOConfNode
3431  */
3432 GOConfNode *
gnm_conf_get_printsetup_margin_gtk_right_node(void)3433 gnm_conf_get_printsetup_margin_gtk_right_node (void)
3434 {
3435 	return get_watch_node (&watch_printsetup_margin_gtk_right);
3436 }
3437 
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,
3443 };
3444 
3445 double
gnm_conf_get_printsetup_margin_gtk_top(void)3446 gnm_conf_get_printsetup_margin_gtk_top (void)
3447 {
3448 	if (!watch_printsetup_margin_gtk_top.handler)
3449 		watch_double (&watch_printsetup_margin_gtk_top);
3450 	return watch_printsetup_margin_gtk_top.var;
3451 }
3452 
3453 void
gnm_conf_set_printsetup_margin_gtk_top(double x)3454 gnm_conf_set_printsetup_margin_gtk_top (double x)
3455 {
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);
3459 }
3460 
3461 /**
3462  * gnm_conf_get_printsetup_margin_gtk_top_node:
3463  *
3464  * Returns: (transfer none): A #GOConfNode
3465  */
3466 GOConfNode *
gnm_conf_get_printsetup_margin_gtk_top_node(void)3467 gnm_conf_get_printsetup_margin_gtk_top_node (void)
3468 {
3469 	return get_watch_node (&watch_printsetup_margin_gtk_top);
3470 }
3471 
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,
3477 };
3478 
3479 double
gnm_conf_get_printsetup_margin_top(void)3480 gnm_conf_get_printsetup_margin_top (void)
3481 {
3482 	if (!watch_printsetup_margin_top.handler)
3483 		watch_double (&watch_printsetup_margin_top);
3484 	return watch_printsetup_margin_top.var;
3485 }
3486 
3487 void
gnm_conf_set_printsetup_margin_top(double x)3488 gnm_conf_set_printsetup_margin_top (double x)
3489 {
3490 	if (!watch_printsetup_margin_top.handler)
3491 		watch_double (&watch_printsetup_margin_top);
3492 	set_double (&watch_printsetup_margin_top, x);
3493 }
3494 
3495 /**
3496  * gnm_conf_get_printsetup_margin_top_node:
3497  *
3498  * Returns: (transfer none): A #GOConfNode
3499  */
3500 GOConfNode *
gnm_conf_get_printsetup_margin_top_node(void)3501 gnm_conf_get_printsetup_margin_top_node (void)
3502 {
3503 	return get_watch_node (&watch_printsetup_margin_top);
3504 }
3505 
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.",
3510 	"",
3511 };
3512 
3513 const char *
gnm_conf_get_printsetup_paper(void)3514 gnm_conf_get_printsetup_paper (void)
3515 {
3516 	if (!watch_printsetup_paper.handler)
3517 		watch_string (&watch_printsetup_paper);
3518 	return watch_printsetup_paper.var;
3519 }
3520 
3521 void
gnm_conf_set_printsetup_paper(const char * x)3522 gnm_conf_set_printsetup_paper (const char *x)
3523 {
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);
3528 }
3529 
3530 /**
3531  * gnm_conf_get_printsetup_paper_node:
3532  *
3533  * Returns: (transfer none): A #GOConfNode
3534  */
3535 GOConfNode *
gnm_conf_get_printsetup_paper_node(void)3536 gnm_conf_get_printsetup_paper_node (void)
3537 {
3538 	return get_watch_node (&watch_printsetup_paper);
3539 }
3540 
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,
3546 };
3547 
3548 int
gnm_conf_get_printsetup_paper_orientation(void)3549 gnm_conf_get_printsetup_paper_orientation (void)
3550 {
3551 	if (!watch_printsetup_paper_orientation.handler)
3552 		watch_int (&watch_printsetup_paper_orientation);
3553 	return watch_printsetup_paper_orientation.var;
3554 }
3555 
3556 void
gnm_conf_set_printsetup_paper_orientation(int x)3557 gnm_conf_set_printsetup_paper_orientation (int x)
3558 {
3559 	if (!watch_printsetup_paper_orientation.handler)
3560 		watch_int (&watch_printsetup_paper_orientation);
3561 	set_int (&watch_printsetup_paper_orientation, x);
3562 }
3563 
3564 /**
3565  * gnm_conf_get_printsetup_paper_orientation_node:
3566  *
3567  * Returns: (transfer none): A #GOConfNode
3568  */
3569 GOConfNode *
gnm_conf_get_printsetup_paper_orientation_node(void)3570 gnm_conf_get_printsetup_paper_orientation_node (void)
3571 {
3572 	return get_watch_node (&watch_printsetup_paper_orientation);
3573 }
3574 
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,
3580 };
3581 
3582 GtkUnit
gnm_conf_get_printsetup_preferred_unit(void)3583 gnm_conf_get_printsetup_preferred_unit (void)
3584 {
3585 	if (!watch_printsetup_preferred_unit.handler)
3586 		watch_enum (&watch_printsetup_preferred_unit, GTK_TYPE_UNIT);
3587 	return watch_printsetup_preferred_unit.var;
3588 }
3589 
3590 void
gnm_conf_set_printsetup_preferred_unit(GtkUnit x)3591 gnm_conf_set_printsetup_preferred_unit (GtkUnit x)
3592 {
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);
3596 }
3597 
3598 /**
3599  * gnm_conf_get_printsetup_preferred_unit_node:
3600  *
3601  * Returns: (transfer none): A #GOConfNode
3602  */
3603 GOConfNode *
gnm_conf_get_printsetup_preferred_unit_node(void)3604 gnm_conf_get_printsetup_preferred_unit_node (void)
3605 {
3606 	return get_watch_node (&watch_printsetup_preferred_unit);
3607 }
3608 
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,
3614 };
3615 
3616 gboolean
gnm_conf_get_printsetup_print_black_n_white(void)3617 gnm_conf_get_printsetup_print_black_n_white (void)
3618 {
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;
3622 }
3623 
3624 void
gnm_conf_set_printsetup_print_black_n_white(gboolean x)3625 gnm_conf_set_printsetup_print_black_n_white (gboolean x)
3626 {
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);
3630 }
3631 
3632 /**
3633  * gnm_conf_get_printsetup_print_black_n_white_node:
3634  *
3635  * Returns: (transfer none): A #GOConfNode
3636  */
3637 GOConfNode *
gnm_conf_get_printsetup_print_black_n_white_node(void)3638 gnm_conf_get_printsetup_print_black_n_white_node (void)
3639 {
3640 	return get_watch_node (&watch_printsetup_print_black_n_white);
3641 }
3642 
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,
3648 };
3649 
3650 gboolean
gnm_conf_get_printsetup_print_even_if_only_styles(void)3651 gnm_conf_get_printsetup_print_even_if_only_styles (void)
3652 {
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;
3656 }
3657 
3658 void
gnm_conf_set_printsetup_print_even_if_only_styles(gboolean x)3659 gnm_conf_set_printsetup_print_even_if_only_styles (gboolean x)
3660 {
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);
3664 }
3665 
3666 /**
3667  * gnm_conf_get_printsetup_print_even_if_only_styles_node:
3668  *
3669  * Returns: (transfer none): A #GOConfNode
3670  */
3671 GOConfNode *
gnm_conf_get_printsetup_print_even_if_only_styles_node(void)3672 gnm_conf_get_printsetup_print_even_if_only_styles_node (void)
3673 {
3674 	return get_watch_node (&watch_printsetup_print_even_if_only_styles);
3675 }
3676 
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,
3682 };
3683 
3684 gboolean
gnm_conf_get_printsetup_print_grid_lines(void)3685 gnm_conf_get_printsetup_print_grid_lines (void)
3686 {
3687 	if (!watch_printsetup_print_grid_lines.handler)
3688 		watch_bool (&watch_printsetup_print_grid_lines);
3689 	return watch_printsetup_print_grid_lines.var;
3690 }
3691 
3692 void
gnm_conf_set_printsetup_print_grid_lines(gboolean x)3693 gnm_conf_set_printsetup_print_grid_lines (gboolean x)
3694 {
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);
3698 }
3699 
3700 /**
3701  * gnm_conf_get_printsetup_print_grid_lines_node:
3702  *
3703  * Returns: (transfer none): A #GOConfNode
3704  */
3705 GOConfNode *
gnm_conf_get_printsetup_print_grid_lines_node(void)3706 gnm_conf_get_printsetup_print_grid_lines_node (void)
3707 {
3708 	return get_watch_node (&watch_printsetup_print_grid_lines);
3709 }
3710 
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,
3716 };
3717 
3718 gboolean
gnm_conf_get_printsetup_print_titles(void)3719 gnm_conf_get_printsetup_print_titles (void)
3720 {
3721 	if (!watch_printsetup_print_titles.handler)
3722 		watch_bool (&watch_printsetup_print_titles);
3723 	return watch_printsetup_print_titles.var;
3724 }
3725 
3726 void
gnm_conf_set_printsetup_print_titles(gboolean x)3727 gnm_conf_set_printsetup_print_titles (gboolean x)
3728 {
3729 	if (!watch_printsetup_print_titles.handler)
3730 		watch_bool (&watch_printsetup_print_titles);
3731 	set_bool (&watch_printsetup_print_titles, x);
3732 }
3733 
3734 /**
3735  * gnm_conf_get_printsetup_print_titles_node:
3736  *
3737  * Returns: (transfer none): A #GOConfNode
3738  */
3739 GOConfNode *
gnm_conf_get_printsetup_print_titles_node(void)3740 gnm_conf_get_printsetup_print_titles_node (void)
3741 {
3742 	return get_watch_node (&watch_printsetup_print_titles);
3743 }
3744 
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.",
3749 	"",
3750 };
3751 
3752 const char *
gnm_conf_get_printsetup_repeat_left(void)3753 gnm_conf_get_printsetup_repeat_left (void)
3754 {
3755 	if (!watch_printsetup_repeat_left.handler)
3756 		watch_string (&watch_printsetup_repeat_left);
3757 	return watch_printsetup_repeat_left.var;
3758 }
3759 
3760 void
gnm_conf_set_printsetup_repeat_left(const char * x)3761 gnm_conf_set_printsetup_repeat_left (const char *x)
3762 {
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);
3767 }
3768 
3769 /**
3770  * gnm_conf_get_printsetup_repeat_left_node:
3771  *
3772  * Returns: (transfer none): A #GOConfNode
3773  */
3774 GOConfNode *
gnm_conf_get_printsetup_repeat_left_node(void)3775 gnm_conf_get_printsetup_repeat_left_node (void)
3776 {
3777 	return get_watch_node (&watch_printsetup_repeat_left);
3778 }
3779 
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.",
3784 	"",
3785 };
3786 
3787 const char *
gnm_conf_get_printsetup_repeat_top(void)3788 gnm_conf_get_printsetup_repeat_top (void)
3789 {
3790 	if (!watch_printsetup_repeat_top.handler)
3791 		watch_string (&watch_printsetup_repeat_top);
3792 	return watch_printsetup_repeat_top.var;
3793 }
3794 
3795 void
gnm_conf_set_printsetup_repeat_top(const char * x)3796 gnm_conf_set_printsetup_repeat_top (const char *x)
3797 {
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);
3802 }
3803 
3804 /**
3805  * gnm_conf_get_printsetup_repeat_top_node:
3806  *
3807  * Returns: (transfer none): A #GOConfNode
3808  */
3809 GOConfNode *
gnm_conf_get_printsetup_repeat_top_node(void)3810 gnm_conf_get_printsetup_repeat_top_node (void)
3811 {
3812 	return get_watch_node (&watch_printsetup_repeat_top);
3813 }
3814 
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,
3820 };
3821 
3822 int
gnm_conf_get_printsetup_scale_height(void)3823 gnm_conf_get_printsetup_scale_height (void)
3824 {
3825 	if (!watch_printsetup_scale_height.handler)
3826 		watch_int (&watch_printsetup_scale_height);
3827 	return watch_printsetup_scale_height.var;
3828 }
3829 
3830 void
gnm_conf_set_printsetup_scale_height(int x)3831 gnm_conf_set_printsetup_scale_height (int x)
3832 {
3833 	if (!watch_printsetup_scale_height.handler)
3834 		watch_int (&watch_printsetup_scale_height);
3835 	set_int (&watch_printsetup_scale_height, x);
3836 }
3837 
3838 /**
3839  * gnm_conf_get_printsetup_scale_height_node:
3840  *
3841  * Returns: (transfer none): A #GOConfNode
3842  */
3843 GOConfNode *
gnm_conf_get_printsetup_scale_height_node(void)3844 gnm_conf_get_printsetup_scale_height_node (void)
3845 {
3846 	return get_watch_node (&watch_printsetup_scale_height);
3847 }
3848 
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,
3854 };
3855 
3856 gboolean
gnm_conf_get_printsetup_scale_percentage(void)3857 gnm_conf_get_printsetup_scale_percentage (void)
3858 {
3859 	if (!watch_printsetup_scale_percentage.handler)
3860 		watch_bool (&watch_printsetup_scale_percentage);
3861 	return watch_printsetup_scale_percentage.var;
3862 }
3863 
3864 void
gnm_conf_set_printsetup_scale_percentage(gboolean x)3865 gnm_conf_set_printsetup_scale_percentage (gboolean x)
3866 {
3867 	if (!watch_printsetup_scale_percentage.handler)
3868 		watch_bool (&watch_printsetup_scale_percentage);
3869 	set_bool (&watch_printsetup_scale_percentage, x);
3870 }
3871 
3872 /**
3873  * gnm_conf_get_printsetup_scale_percentage_node:
3874  *
3875  * Returns: (transfer none): A #GOConfNode
3876  */
3877 GOConfNode *
gnm_conf_get_printsetup_scale_percentage_node(void)3878 gnm_conf_get_printsetup_scale_percentage_node (void)
3879 {
3880 	return get_watch_node (&watch_printsetup_scale_percentage);
3881 }
3882 
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,
3888 };
3889 
3890 double
gnm_conf_get_printsetup_scale_percentage_value(void)3891 gnm_conf_get_printsetup_scale_percentage_value (void)
3892 {
3893 	if (!watch_printsetup_scale_percentage_value.handler)
3894 		watch_double (&watch_printsetup_scale_percentage_value);
3895 	return watch_printsetup_scale_percentage_value.var;
3896 }
3897 
3898 void
gnm_conf_set_printsetup_scale_percentage_value(double x)3899 gnm_conf_set_printsetup_scale_percentage_value (double x)
3900 {
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);
3904 }
3905 
3906 /**
3907  * gnm_conf_get_printsetup_scale_percentage_value_node:
3908  *
3909  * Returns: (transfer none): A #GOConfNode
3910  */
3911 GOConfNode *
gnm_conf_get_printsetup_scale_percentage_value_node(void)3912 gnm_conf_get_printsetup_scale_percentage_value_node (void)
3913 {
3914 	return get_watch_node (&watch_printsetup_scale_percentage_value);
3915 }
3916 
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,
3922 };
3923 
3924 int
gnm_conf_get_printsetup_scale_width(void)3925 gnm_conf_get_printsetup_scale_width (void)
3926 {
3927 	if (!watch_printsetup_scale_width.handler)
3928 		watch_int (&watch_printsetup_scale_width);
3929 	return watch_printsetup_scale_width.var;
3930 }
3931 
3932 void
gnm_conf_set_printsetup_scale_width(int x)3933 gnm_conf_set_printsetup_scale_width (int x)
3934 {
3935 	if (!watch_printsetup_scale_width.handler)
3936 		watch_int (&watch_printsetup_scale_width);
3937 	set_int (&watch_printsetup_scale_width, x);
3938 }
3939 
3940 /**
3941  * gnm_conf_get_printsetup_scale_width_node:
3942  *
3943  * Returns: (transfer none): A #GOConfNode
3944  */
3945 GOConfNode *
gnm_conf_get_printsetup_scale_width_node(void)3946 gnm_conf_get_printsetup_scale_width_node (void)
3947 {
3948 	return get_watch_node (&watch_printsetup_scale_width);
3949 }
3950 
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,
3956 };
3957 
3958 gboolean
gnm_conf_get_searchreplace_change_cell_expressions(void)3959 gnm_conf_get_searchreplace_change_cell_expressions (void)
3960 {
3961 	if (!watch_searchreplace_change_cell_expressions.handler)
3962 		watch_bool (&watch_searchreplace_change_cell_expressions);
3963 	return watch_searchreplace_change_cell_expressions.var;
3964 }
3965 
3966 void
gnm_conf_set_searchreplace_change_cell_expressions(gboolean x)3967 gnm_conf_set_searchreplace_change_cell_expressions (gboolean x)
3968 {
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);
3972 }
3973 
3974 /**
3975  * gnm_conf_get_searchreplace_change_cell_expressions_node:
3976  *
3977  * Returns: (transfer none): A #GOConfNode
3978  */
3979 GOConfNode *
gnm_conf_get_searchreplace_change_cell_expressions_node(void)3980 gnm_conf_get_searchreplace_change_cell_expressions_node (void)
3981 {
3982 	return get_watch_node (&watch_searchreplace_change_cell_expressions);
3983 }
3984 
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,
3990 };
3991 
3992 gboolean
gnm_conf_get_searchreplace_change_cell_other(void)3993 gnm_conf_get_searchreplace_change_cell_other (void)
3994 {
3995 	if (!watch_searchreplace_change_cell_other.handler)
3996 		watch_bool (&watch_searchreplace_change_cell_other);
3997 	return watch_searchreplace_change_cell_other.var;
3998 }
3999 
4000 void
gnm_conf_set_searchreplace_change_cell_other(gboolean x)4001 gnm_conf_set_searchreplace_change_cell_other (gboolean x)
4002 {
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);
4006 }
4007 
4008 /**
4009  * gnm_conf_get_searchreplace_change_cell_other_node:
4010  *
4011  * Returns: (transfer none): A #GOConfNode
4012  */
4013 GOConfNode *
gnm_conf_get_searchreplace_change_cell_other_node(void)4014 gnm_conf_get_searchreplace_change_cell_other_node (void)
4015 {
4016 	return get_watch_node (&watch_searchreplace_change_cell_other);
4017 }
4018 
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,
4024 };
4025 
4026 gboolean
gnm_conf_get_searchreplace_change_cell_strings(void)4027 gnm_conf_get_searchreplace_change_cell_strings (void)
4028 {
4029 	if (!watch_searchreplace_change_cell_strings.handler)
4030 		watch_bool (&watch_searchreplace_change_cell_strings);
4031 	return watch_searchreplace_change_cell_strings.var;
4032 }
4033 
4034 void
gnm_conf_set_searchreplace_change_cell_strings(gboolean x)4035 gnm_conf_set_searchreplace_change_cell_strings (gboolean x)
4036 {
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);
4040 }
4041 
4042 /**
4043  * gnm_conf_get_searchreplace_change_cell_strings_node:
4044  *
4045  * Returns: (transfer none): A #GOConfNode
4046  */
4047 GOConfNode *
gnm_conf_get_searchreplace_change_cell_strings_node(void)4048 gnm_conf_get_searchreplace_change_cell_strings_node (void)
4049 {
4050 	return get_watch_node (&watch_searchreplace_change_cell_strings);
4051 }
4052 
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,
4058 };
4059 
4060 gboolean
gnm_conf_get_searchreplace_change_comments(void)4061 gnm_conf_get_searchreplace_change_comments (void)
4062 {
4063 	if (!watch_searchreplace_change_comments.handler)
4064 		watch_bool (&watch_searchreplace_change_comments);
4065 	return watch_searchreplace_change_comments.var;
4066 }
4067 
4068 void
gnm_conf_set_searchreplace_change_comments(gboolean x)4069 gnm_conf_set_searchreplace_change_comments (gboolean x)
4070 {
4071 	if (!watch_searchreplace_change_comments.handler)
4072 		watch_bool (&watch_searchreplace_change_comments);
4073 	set_bool (&watch_searchreplace_change_comments, x);
4074 }
4075 
4076 /**
4077  * gnm_conf_get_searchreplace_change_comments_node:
4078  *
4079  * Returns: (transfer none): A #GOConfNode
4080  */
4081 GOConfNode *
gnm_conf_get_searchreplace_change_comments_node(void)4082 gnm_conf_get_searchreplace_change_comments_node (void)
4083 {
4084 	return get_watch_node (&watch_searchreplace_change_comments);
4085 }
4086 
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,
4092 };
4093 
4094 gboolean
gnm_conf_get_searchreplace_columnmajor(void)4095 gnm_conf_get_searchreplace_columnmajor (void)
4096 {
4097 	if (!watch_searchreplace_columnmajor.handler)
4098 		watch_bool (&watch_searchreplace_columnmajor);
4099 	return watch_searchreplace_columnmajor.var;
4100 }
4101 
4102 void
gnm_conf_set_searchreplace_columnmajor(gboolean x)4103 gnm_conf_set_searchreplace_columnmajor (gboolean x)
4104 {
4105 	if (!watch_searchreplace_columnmajor.handler)
4106 		watch_bool (&watch_searchreplace_columnmajor);
4107 	set_bool (&watch_searchreplace_columnmajor, x);
4108 }
4109 
4110 /**
4111  * gnm_conf_get_searchreplace_columnmajor_node:
4112  *
4113  * Returns: (transfer none): A #GOConfNode
4114  */
4115 GOConfNode *
gnm_conf_get_searchreplace_columnmajor_node(void)4116 gnm_conf_get_searchreplace_columnmajor_node (void)
4117 {
4118 	return get_watch_node (&watch_searchreplace_columnmajor);
4119 }
4120 
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,
4126 };
4127 
4128 int
gnm_conf_get_searchreplace_error_behaviour(void)4129 gnm_conf_get_searchreplace_error_behaviour (void)
4130 {
4131 	if (!watch_searchreplace_error_behaviour.handler)
4132 		watch_int (&watch_searchreplace_error_behaviour);
4133 	return watch_searchreplace_error_behaviour.var;
4134 }
4135 
4136 void
gnm_conf_set_searchreplace_error_behaviour(int x)4137 gnm_conf_set_searchreplace_error_behaviour (int x)
4138 {
4139 	if (!watch_searchreplace_error_behaviour.handler)
4140 		watch_int (&watch_searchreplace_error_behaviour);
4141 	set_int (&watch_searchreplace_error_behaviour, x);
4142 }
4143 
4144 /**
4145  * gnm_conf_get_searchreplace_error_behaviour_node:
4146  *
4147  * Returns: (transfer none): A #GOConfNode
4148  */
4149 GOConfNode *
gnm_conf_get_searchreplace_error_behaviour_node(void)4150 gnm_conf_get_searchreplace_error_behaviour_node (void)
4151 {
4152 	return get_watch_node (&watch_searchreplace_error_behaviour);
4153 }
4154 
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,
4160 };
4161 
4162 gboolean
gnm_conf_get_searchreplace_ignore_case(void)4163 gnm_conf_get_searchreplace_ignore_case (void)
4164 {
4165 	if (!watch_searchreplace_ignore_case.handler)
4166 		watch_bool (&watch_searchreplace_ignore_case);
4167 	return watch_searchreplace_ignore_case.var;
4168 }
4169 
4170 void
gnm_conf_set_searchreplace_ignore_case(gboolean x)4171 gnm_conf_set_searchreplace_ignore_case (gboolean x)
4172 {
4173 	if (!watch_searchreplace_ignore_case.handler)
4174 		watch_bool (&watch_searchreplace_ignore_case);
4175 	set_bool (&watch_searchreplace_ignore_case, x);
4176 }
4177 
4178 /**
4179  * gnm_conf_get_searchreplace_ignore_case_node:
4180  *
4181  * Returns: (transfer none): A #GOConfNode
4182  */
4183 GOConfNode *
gnm_conf_get_searchreplace_ignore_case_node(void)4184 gnm_conf_get_searchreplace_ignore_case_node (void)
4185 {
4186 	return get_watch_node (&watch_searchreplace_ignore_case);
4187 }
4188 
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,
4194 };
4195 
4196 gboolean
gnm_conf_get_searchreplace_keep_strings(void)4197 gnm_conf_get_searchreplace_keep_strings (void)
4198 {
4199 	if (!watch_searchreplace_keep_strings.handler)
4200 		watch_bool (&watch_searchreplace_keep_strings);
4201 	return watch_searchreplace_keep_strings.var;
4202 }
4203 
4204 void
gnm_conf_set_searchreplace_keep_strings(gboolean x)4205 gnm_conf_set_searchreplace_keep_strings (gboolean x)
4206 {
4207 	if (!watch_searchreplace_keep_strings.handler)
4208 		watch_bool (&watch_searchreplace_keep_strings);
4209 	set_bool (&watch_searchreplace_keep_strings, x);
4210 }
4211 
4212 /**
4213  * gnm_conf_get_searchreplace_keep_strings_node:
4214  *
4215  * Returns: (transfer none): A #GOConfNode
4216  */
4217 GOConfNode *
gnm_conf_get_searchreplace_keep_strings_node(void)4218 gnm_conf_get_searchreplace_keep_strings_node (void)
4219 {
4220 	return get_watch_node (&watch_searchreplace_keep_strings);
4221 }
4222 
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,
4228 };
4229 
4230 gboolean
gnm_conf_get_searchreplace_preserve_case(void)4231 gnm_conf_get_searchreplace_preserve_case (void)
4232 {
4233 	if (!watch_searchreplace_preserve_case.handler)
4234 		watch_bool (&watch_searchreplace_preserve_case);
4235 	return watch_searchreplace_preserve_case.var;
4236 }
4237 
4238 void
gnm_conf_set_searchreplace_preserve_case(gboolean x)4239 gnm_conf_set_searchreplace_preserve_case (gboolean x)
4240 {
4241 	if (!watch_searchreplace_preserve_case.handler)
4242 		watch_bool (&watch_searchreplace_preserve_case);
4243 	set_bool (&watch_searchreplace_preserve_case, x);
4244 }
4245 
4246 /**
4247  * gnm_conf_get_searchreplace_preserve_case_node:
4248  *
4249  * Returns: (transfer none): A #GOConfNode
4250  */
4251 GOConfNode *
gnm_conf_get_searchreplace_preserve_case_node(void)4252 gnm_conf_get_searchreplace_preserve_case_node (void)
4253 {
4254 	return get_watch_node (&watch_searchreplace_preserve_case);
4255 }
4256 
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,
4262 };
4263 
4264 gboolean
gnm_conf_get_searchreplace_query(void)4265 gnm_conf_get_searchreplace_query (void)
4266 {
4267 	if (!watch_searchreplace_query.handler)
4268 		watch_bool (&watch_searchreplace_query);
4269 	return watch_searchreplace_query.var;
4270 }
4271 
4272 void
gnm_conf_set_searchreplace_query(gboolean x)4273 gnm_conf_set_searchreplace_query (gboolean x)
4274 {
4275 	if (!watch_searchreplace_query.handler)
4276 		watch_bool (&watch_searchreplace_query);
4277 	set_bool (&watch_searchreplace_query, x);
4278 }
4279 
4280 /**
4281  * gnm_conf_get_searchreplace_query_node:
4282  *
4283  * Returns: (transfer none): A #GOConfNode
4284  */
4285 GOConfNode *
gnm_conf_get_searchreplace_query_node(void)4286 gnm_conf_get_searchreplace_query_node (void)
4287 {
4288 	return get_watch_node (&watch_searchreplace_query);
4289 }
4290 
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,
4296 };
4297 
4298 int
gnm_conf_get_searchreplace_regex(void)4299 gnm_conf_get_searchreplace_regex (void)
4300 {
4301 	if (!watch_searchreplace_regex.handler)
4302 		watch_int (&watch_searchreplace_regex);
4303 	return watch_searchreplace_regex.var;
4304 }
4305 
4306 void
gnm_conf_set_searchreplace_regex(int x)4307 gnm_conf_set_searchreplace_regex (int x)
4308 {
4309 	if (!watch_searchreplace_regex.handler)
4310 		watch_int (&watch_searchreplace_regex);
4311 	set_int (&watch_searchreplace_regex, x);
4312 }
4313 
4314 /**
4315  * gnm_conf_get_searchreplace_regex_node:
4316  *
4317  * Returns: (transfer none): A #GOConfNode
4318  */
4319 GOConfNode *
gnm_conf_get_searchreplace_regex_node(void)4320 gnm_conf_get_searchreplace_regex_node (void)
4321 {
4322 	return get_watch_node (&watch_searchreplace_regex);
4323 }
4324 
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,
4330 };
4331 
4332 int
gnm_conf_get_searchreplace_scope(void)4333 gnm_conf_get_searchreplace_scope (void)
4334 {
4335 	if (!watch_searchreplace_scope.handler)
4336 		watch_int (&watch_searchreplace_scope);
4337 	return watch_searchreplace_scope.var;
4338 }
4339 
4340 void
gnm_conf_set_searchreplace_scope(int x)4341 gnm_conf_set_searchreplace_scope (int x)
4342 {
4343 	if (!watch_searchreplace_scope.handler)
4344 		watch_int (&watch_searchreplace_scope);
4345 	set_int (&watch_searchreplace_scope, x);
4346 }
4347 
4348 /**
4349  * gnm_conf_get_searchreplace_scope_node:
4350  *
4351  * Returns: (transfer none): A #GOConfNode
4352  */
4353 GOConfNode *
gnm_conf_get_searchreplace_scope_node(void)4354 gnm_conf_get_searchreplace_scope_node (void)
4355 {
4356 	return get_watch_node (&watch_searchreplace_scope);
4357 }
4358 
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,
4364 };
4365 
4366 gboolean
gnm_conf_get_searchreplace_search_results(void)4367 gnm_conf_get_searchreplace_search_results (void)
4368 {
4369 	if (!watch_searchreplace_search_results.handler)
4370 		watch_bool (&watch_searchreplace_search_results);
4371 	return watch_searchreplace_search_results.var;
4372 }
4373 
4374 void
gnm_conf_set_searchreplace_search_results(gboolean x)4375 gnm_conf_set_searchreplace_search_results (gboolean x)
4376 {
4377 	if (!watch_searchreplace_search_results.handler)
4378 		watch_bool (&watch_searchreplace_search_results);
4379 	set_bool (&watch_searchreplace_search_results, x);
4380 }
4381 
4382 /**
4383  * gnm_conf_get_searchreplace_search_results_node:
4384  *
4385  * Returns: (transfer none): A #GOConfNode
4386  */
4387 GOConfNode *
gnm_conf_get_searchreplace_search_results_node(void)4388 gnm_conf_get_searchreplace_search_results_node (void)
4389 {
4390 	return get_watch_node (&watch_searchreplace_search_results);
4391 }
4392 
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,
4398 };
4399 
4400 gboolean
gnm_conf_get_searchreplace_whole_words_only(void)4401 gnm_conf_get_searchreplace_whole_words_only (void)
4402 {
4403 	if (!watch_searchreplace_whole_words_only.handler)
4404 		watch_bool (&watch_searchreplace_whole_words_only);
4405 	return watch_searchreplace_whole_words_only.var;
4406 }
4407 
4408 void
gnm_conf_set_searchreplace_whole_words_only(gboolean x)4409 gnm_conf_set_searchreplace_whole_words_only (gboolean x)
4410 {
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);
4414 }
4415 
4416 /**
4417  * gnm_conf_get_searchreplace_whole_words_only_node:
4418  *
4419  * Returns: (transfer none): A #GOConfNode
4420  */
4421 GOConfNode *
gnm_conf_get_searchreplace_whole_words_only_node(void)4422 gnm_conf_get_searchreplace_whole_words_only_node (void)
4423 {
4424 	return get_watch_node (&watch_searchreplace_whole_words_only);
4425 }
4426 
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.",
4431 	"",
4432 };
4433 
4434 const char *
gnm_conf_get_stf_export_encoding(void)4435 gnm_conf_get_stf_export_encoding (void)
4436 {
4437 	if (!watch_stf_export_encoding.handler)
4438 		watch_string (&watch_stf_export_encoding);
4439 	return watch_stf_export_encoding.var;
4440 }
4441 
4442 void
gnm_conf_set_stf_export_encoding(const char * x)4443 gnm_conf_set_stf_export_encoding (const char *x)
4444 {
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);
4449 }
4450 
4451 /**
4452  * gnm_conf_get_stf_export_encoding_node:
4453  *
4454  * Returns: (transfer none): A #GOConfNode
4455  */
4456 GOConfNode *
gnm_conf_get_stf_export_encoding_node(void)4457 gnm_conf_get_stf_export_encoding_node (void)
4458 {
4459 	return get_watch_node (&watch_stf_export_encoding);
4460 }
4461 
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,
4467 };
4468 
4469 GnmStfFormatMode
gnm_conf_get_stf_export_format(void)4470 gnm_conf_get_stf_export_format (void)
4471 {
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;
4475 }
4476 
4477 void
gnm_conf_set_stf_export_format(GnmStfFormatMode x)4478 gnm_conf_set_stf_export_format (GnmStfFormatMode x)
4479 {
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);
4483 }
4484 
4485 /**
4486  * gnm_conf_get_stf_export_format_node:
4487  *
4488  * Returns: (transfer none): A #GOConfNode
4489  */
4490 GOConfNode *
gnm_conf_get_stf_export_format_node(void)4491 gnm_conf_get_stf_export_format_node (void)
4492 {
4493 	return get_watch_node (&watch_stf_export_format);
4494 }
4495 
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.",
4500 	"",
4501 };
4502 
4503 const char *
gnm_conf_get_stf_export_locale(void)4504 gnm_conf_get_stf_export_locale (void)
4505 {
4506 	if (!watch_stf_export_locale.handler)
4507 		watch_string (&watch_stf_export_locale);
4508 	return watch_stf_export_locale.var;
4509 }
4510 
4511 void
gnm_conf_set_stf_export_locale(const char * x)4512 gnm_conf_set_stf_export_locale (const char *x)
4513 {
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);
4518 }
4519 
4520 /**
4521  * gnm_conf_get_stf_export_locale_node:
4522  *
4523  * Returns: (transfer none): A #GOConfNode
4524  */
4525 GOConfNode *
gnm_conf_get_stf_export_locale_node(void)4526 gnm_conf_get_stf_export_locale_node (void)
4527 {
4528 	return get_watch_node (&watch_stf_export_locale);
4529 }
4530 
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,
4536 };
4537 
4538 GsfOutputCsvQuotingMode
gnm_conf_get_stf_export_quoting(void)4539 gnm_conf_get_stf_export_quoting (void)
4540 {
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;
4544 }
4545 
4546 void
gnm_conf_set_stf_export_quoting(GsfOutputCsvQuotingMode x)4547 gnm_conf_set_stf_export_quoting (GsfOutputCsvQuotingMode x)
4548 {
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);
4552 }
4553 
4554 /**
4555  * gnm_conf_get_stf_export_quoting_node:
4556  *
4557  * Returns: (transfer none): A #GOConfNode
4558  */
4559 GOConfNode *
gnm_conf_get_stf_export_quoting_node(void)4560 gnm_conf_get_stf_export_quoting_node (void)
4561 {
4562 	return get_watch_node (&watch_stf_export_quoting);
4563 }
4564 
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 	",",
4570 };
4571 
4572 const char *
gnm_conf_get_stf_export_separator(void)4573 gnm_conf_get_stf_export_separator (void)
4574 {
4575 	if (!watch_stf_export_separator.handler)
4576 		watch_string (&watch_stf_export_separator);
4577 	return watch_stf_export_separator.var;
4578 }
4579 
4580 void
gnm_conf_set_stf_export_separator(const char * x)4581 gnm_conf_set_stf_export_separator (const char *x)
4582 {
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);
4587 }
4588 
4589 /**
4590  * gnm_conf_get_stf_export_separator_node:
4591  *
4592  * Returns: (transfer none): A #GOConfNode
4593  */
4594 GOConfNode *
gnm_conf_get_stf_export_separator_node(void)4595 gnm_conf_get_stf_export_separator_node (void)
4596 {
4597 	return get_watch_node (&watch_stf_export_separator);
4598 }
4599 
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 	"\"",
4605 };
4606 
4607 const char *
gnm_conf_get_stf_export_stringindicator(void)4608 gnm_conf_get_stf_export_stringindicator (void)
4609 {
4610 	if (!watch_stf_export_stringindicator.handler)
4611 		watch_string (&watch_stf_export_stringindicator);
4612 	return watch_stf_export_stringindicator.var;
4613 }
4614 
4615 void
gnm_conf_set_stf_export_stringindicator(const char * x)4616 gnm_conf_set_stf_export_stringindicator (const char *x)
4617 {
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);
4622 }
4623 
4624 /**
4625  * gnm_conf_get_stf_export_stringindicator_node:
4626  *
4627  * Returns: (transfer none): A #GOConfNode
4628  */
4629 GOConfNode *
gnm_conf_get_stf_export_stringindicator_node(void)4630 gnm_conf_get_stf_export_stringindicator_node (void)
4631 {
4632 	return get_watch_node (&watch_stf_export_stringindicator);
4633 }
4634 
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",
4640 };
4641 
4642 const char *
gnm_conf_get_stf_export_terminator(void)4643 gnm_conf_get_stf_export_terminator (void)
4644 {
4645 	if (!watch_stf_export_terminator.handler)
4646 		watch_string (&watch_stf_export_terminator);
4647 	return watch_stf_export_terminator.var;
4648 }
4649 
4650 void
gnm_conf_set_stf_export_terminator(const char * x)4651 gnm_conf_set_stf_export_terminator (const char *x)
4652 {
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);
4657 }
4658 
4659 /**
4660  * gnm_conf_get_stf_export_terminator_node:
4661  *
4662  * Returns: (transfer none): A #GOConfNode
4663  */
4664 GOConfNode *
gnm_conf_get_stf_export_terminator_node(void)4665 gnm_conf_get_stf_export_terminator_node (void)
4666 {
4667 	return get_watch_node (&watch_stf_export_terminator);
4668 }
4669 
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,
4675 };
4676 
4677 gboolean
gnm_conf_get_stf_export_transliteration(void)4678 gnm_conf_get_stf_export_transliteration (void)
4679 {
4680 	if (!watch_stf_export_transliteration.handler)
4681 		watch_bool (&watch_stf_export_transliteration);
4682 	return watch_stf_export_transliteration.var;
4683 }
4684 
4685 void
gnm_conf_set_stf_export_transliteration(gboolean x)4686 gnm_conf_set_stf_export_transliteration (gboolean x)
4687 {
4688 	if (!watch_stf_export_transliteration.handler)
4689 		watch_bool (&watch_stf_export_transliteration);
4690 	set_bool (&watch_stf_export_transliteration, x);
4691 }
4692 
4693 /**
4694  * gnm_conf_get_stf_export_transliteration_node:
4695  *
4696  * Returns: (transfer none): A #GOConfNode
4697  */
4698 GOConfNode *
gnm_conf_get_stf_export_transliteration_node(void)4699 gnm_conf_get_stf_export_transliteration_node (void)
4700 {
4701 	return get_watch_node (&watch_stf_export_transliteration);
4702 }
4703 
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,
4709 };
4710 
4711 GtkToolbarStyle
gnm_conf_get_toolbar_style(void)4712 gnm_conf_get_toolbar_style (void)
4713 {
4714 	if (!watch_toolbar_style.handler)
4715 		watch_enum (&watch_toolbar_style, GTK_TYPE_TOOLBAR_STYLE);
4716 	return watch_toolbar_style.var;
4717 }
4718 
4719 void
gnm_conf_set_toolbar_style(GtkToolbarStyle x)4720 gnm_conf_set_toolbar_style (GtkToolbarStyle x)
4721 {
4722 	if (!watch_toolbar_style.handler)
4723 		watch_enum (&watch_toolbar_style, GTK_TYPE_TOOLBAR_STYLE);
4724 	set_enum (&watch_toolbar_style, x);
4725 }
4726 
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,
4732 };
4733 
4734 int
gnm_conf_get_undo_max_descriptor_width(void)4735 gnm_conf_get_undo_max_descriptor_width (void)
4736 {
4737 	if (!watch_undo_max_descriptor_width.handler)
4738 		watch_int (&watch_undo_max_descriptor_width);
4739 	return watch_undo_max_descriptor_width.var;
4740 }
4741 
4742 void
gnm_conf_set_undo_max_descriptor_width(int x)4743 gnm_conf_set_undo_max_descriptor_width (int x)
4744 {
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);
4748 }
4749 
4750 /**
4751  * gnm_conf_get_undo_max_descriptor_width_node:
4752  *
4753  * Returns: (transfer none): A #GOConfNode
4754  */
4755 GOConfNode *
gnm_conf_get_undo_max_descriptor_width_node(void)4756 gnm_conf_get_undo_max_descriptor_width_node (void)
4757 {
4758 	return get_watch_node (&watch_undo_max_descriptor_width);
4759 }
4760 
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,
4766 };
4767 
4768 int
gnm_conf_get_undo_maxnum(void)4769 gnm_conf_get_undo_maxnum (void)
4770 {
4771 	if (!watch_undo_maxnum.handler)
4772 		watch_int (&watch_undo_maxnum);
4773 	return watch_undo_maxnum.var;
4774 }
4775 
4776 void
gnm_conf_set_undo_maxnum(int x)4777 gnm_conf_set_undo_maxnum (int x)
4778 {
4779 	if (!watch_undo_maxnum.handler)
4780 		watch_int (&watch_undo_maxnum);
4781 	set_int (&watch_undo_maxnum, x);
4782 }
4783 
4784 /**
4785  * gnm_conf_get_undo_maxnum_node:
4786  *
4787  * Returns: (transfer none): A #GOConfNode
4788  */
4789 GOConfNode *
gnm_conf_get_undo_maxnum_node(void)4790 gnm_conf_get_undo_maxnum_node (void)
4791 {
4792 	return get_watch_node (&watch_undo_maxnum);
4793 }
4794 
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,
4800 };
4801 
4802 gboolean
gnm_conf_get_undo_show_sheet_name(void)4803 gnm_conf_get_undo_show_sheet_name (void)
4804 {
4805 	if (!watch_undo_show_sheet_name.handler)
4806 		watch_bool (&watch_undo_show_sheet_name);
4807 	return watch_undo_show_sheet_name.var;
4808 }
4809 
4810 void
gnm_conf_set_undo_show_sheet_name(gboolean x)4811 gnm_conf_set_undo_show_sheet_name (gboolean x)
4812 {
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);
4816 }
4817 
4818 /**
4819  * gnm_conf_get_undo_show_sheet_name_node:
4820  *
4821  * Returns: (transfer none): A #GOConfNode
4822  */
4823 GOConfNode *
gnm_conf_get_undo_show_sheet_name_node(void)4824 gnm_conf_get_undo_show_sheet_name_node (void)
4825 {
4826 	return get_watch_node (&watch_undo_show_sheet_name);
4827 }
4828 
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,
4834 };
4835 
4836 int
gnm_conf_get_undo_size(void)4837 gnm_conf_get_undo_size (void)
4838 {
4839 	if (!watch_undo_size.handler)
4840 		watch_int (&watch_undo_size);
4841 	return watch_undo_size.var;
4842 }
4843 
4844 void
gnm_conf_set_undo_size(int x)4845 gnm_conf_set_undo_size (int x)
4846 {
4847 	if (!watch_undo_size.handler)
4848 		watch_int (&watch_undo_size);
4849 	set_int (&watch_undo_size, x);
4850 }
4851 
4852 /**
4853  * gnm_conf_get_undo_size_node:
4854  *
4855  * Returns: (transfer none): A #GOConfNode
4856  */
4857 GOConfNode *
gnm_conf_get_undo_size_node(void)4858 gnm_conf_get_undo_size_node (void)
4859 {
4860 	return get_watch_node (&watch_undo_size);
4861 }
4862 
4863 /**
4864  * gnm_conf_get_autocorrect_dir_node:
4865  *
4866  * Returns: (transfer none): A #GOConfNode
4867  */
4868 GOConfNode *
gnm_conf_get_autocorrect_dir_node(void)4869 gnm_conf_get_autocorrect_dir_node (void)
4870 {
4871 	return get_node ("autocorrect", NULL);
4872 }
4873 
4874 /**
4875  * gnm_conf_get_autoformat_dir_node:
4876  *
4877  * Returns: (transfer none): A #GOConfNode
4878  */
4879 GOConfNode *
gnm_conf_get_autoformat_dir_node(void)4880 gnm_conf_get_autoformat_dir_node (void)
4881 {
4882 	return get_node ("autoformat", NULL);
4883 }
4884 
4885 /**
4886  * gnm_conf_get_core_defaultfont_dir_node:
4887  *
4888  * Returns: (transfer none): A #GOConfNode
4889  */
4890 GOConfNode *
gnm_conf_get_core_defaultfont_dir_node(void)4891 gnm_conf_get_core_defaultfont_dir_node (void)
4892 {
4893 	return get_node ("core/defaultfont", NULL);
4894 }
4895 
4896 /**
4897  * gnm_conf_get_core_file_save_dir_node:
4898  *
4899  * Returns: (transfer none): A #GOConfNode
4900  */
4901 GOConfNode *
gnm_conf_get_core_file_save_dir_node(void)4902 gnm_conf_get_core_file_save_dir_node (void)
4903 {
4904 	return get_node ("core/file/save", NULL);
4905 }
4906 
4907 /**
4908  * gnm_conf_get_core_gui_cells_dir_node:
4909  *
4910  * Returns: (transfer none): A #GOConfNode
4911  */
4912 GOConfNode *
gnm_conf_get_core_gui_cells_dir_node(void)4913 gnm_conf_get_core_gui_cells_dir_node (void)
4914 {
4915 	return get_node ("core/gui/cells", NULL);
4916 }
4917 
4918 /**
4919  * gnm_conf_get_core_gui_editing_dir_node:
4920  *
4921  * Returns: (transfer none): A #GOConfNode
4922  */
4923 GOConfNode *
gnm_conf_get_core_gui_editing_dir_node(void)4924 gnm_conf_get_core_gui_editing_dir_node (void)
4925 {
4926 	return get_node ("core/gui/editing", NULL);
4927 }
4928 
4929 /**
4930  * gnm_conf_get_core_gui_screen_dir_node:
4931  *
4932  * Returns: (transfer none): A #GOConfNode
4933  */
4934 GOConfNode *
gnm_conf_get_core_gui_screen_dir_node(void)4935 gnm_conf_get_core_gui_screen_dir_node (void)
4936 {
4937 	return get_node ("core/gui/screen", NULL);
4938 }
4939 
4940 /**
4941  * gnm_conf_get_core_gui_toolbars_dir_node:
4942  *
4943  * Returns: (transfer none): A #GOConfNode
4944  */
4945 GOConfNode *
gnm_conf_get_core_gui_toolbars_dir_node(void)4946 gnm_conf_get_core_gui_toolbars_dir_node (void)
4947 {
4948 	return get_node ("core/gui/toolbars", NULL);
4949 }
4950 
4951 /**
4952  * gnm_conf_get_core_gui_window_dir_node:
4953  *
4954  * Returns: (transfer none): A #GOConfNode
4955  */
4956 GOConfNode *
gnm_conf_get_core_gui_window_dir_node(void)4957 gnm_conf_get_core_gui_window_dir_node (void)
4958 {
4959 	return get_node ("core/gui/window", NULL);
4960 }
4961 
4962 /**
4963  * gnm_conf_get_core_sort_default_dir_node:
4964  *
4965  * Returns: (transfer none): A #GOConfNode
4966  */
4967 GOConfNode *
gnm_conf_get_core_sort_default_dir_node(void)4968 gnm_conf_get_core_sort_default_dir_node (void)
4969 {
4970 	return get_node ("core/sort/default", NULL);
4971 }
4972 
4973 /**
4974  * gnm_conf_get_core_sort_dialog_dir_node:
4975  *
4976  * Returns: (transfer none): A #GOConfNode
4977  */
4978 GOConfNode *
gnm_conf_get_core_sort_dialog_dir_node(void)4979 gnm_conf_get_core_sort_dialog_dir_node (void)
4980 {
4981 	return get_node ("core/sort/dialog", NULL);
4982 }
4983 
4984 /**
4985  * gnm_conf_get_core_workbook_dir_node:
4986  *
4987  * Returns: (transfer none): A #GOConfNode
4988  */
4989 GOConfNode *
gnm_conf_get_core_workbook_dir_node(void)4990 gnm_conf_get_core_workbook_dir_node (void)
4991 {
4992 	return get_node ("core/workbook", NULL);
4993 }
4994 
4995 /**
4996  * gnm_conf_get_core_xml_dir_node:
4997  *
4998  * Returns: (transfer none): A #GOConfNode
4999  */
5000 GOConfNode *
gnm_conf_get_core_xml_dir_node(void)5001 gnm_conf_get_core_xml_dir_node (void)
5002 {
5003 	return get_node ("core/xml", NULL);
5004 }
5005 
5006 /**
5007  * gnm_conf_get_cut_and_paste_dir_node:
5008  *
5009  * Returns: (transfer none): A #GOConfNode
5010  */
5011 GOConfNode *
gnm_conf_get_cut_and_paste_dir_node(void)5012 gnm_conf_get_cut_and_paste_dir_node (void)
5013 {
5014 	return get_node ("cut-and-paste", NULL);
5015 }
5016 
5017 /**
5018  * gnm_conf_get_dialogs_rs_dir_node:
5019  *
5020  * Returns: (transfer none): A #GOConfNode
5021  */
5022 GOConfNode *
gnm_conf_get_dialogs_rs_dir_node(void)5023 gnm_conf_get_dialogs_rs_dir_node (void)
5024 {
5025 	return get_node ("dialogs/rs", NULL);
5026 }
5027 
5028 /**
5029  * gnm_conf_get_functionselector_dir_node:
5030  *
5031  * Returns: (transfer none): A #GOConfNode
5032  */
5033 GOConfNode *
gnm_conf_get_functionselector_dir_node(void)5034 gnm_conf_get_functionselector_dir_node (void)
5035 {
5036 	return get_node ("functionselector", NULL);
5037 }
5038 
5039 /**
5040  * gnm_conf_get_plugin_glpk_dir_node:
5041  *
5042  * Returns: (transfer none): A #GOConfNode
5043  */
5044 GOConfNode *
gnm_conf_get_plugin_glpk_dir_node(void)5045 gnm_conf_get_plugin_glpk_dir_node (void)
5046 {
5047 	return get_node ("plugin/glpk", NULL);
5048 }
5049 
5050 /**
5051  * gnm_conf_get_plugin_latex_dir_node:
5052  *
5053  * Returns: (transfer none): A #GOConfNode
5054  */
5055 GOConfNode *
gnm_conf_get_plugin_latex_dir_node(void)5056 gnm_conf_get_plugin_latex_dir_node (void)
5057 {
5058 	return get_node ("plugin/latex", NULL);
5059 }
5060 
5061 /**
5062  * gnm_conf_get_plugin_lpsolve_dir_node:
5063  *
5064  * Returns: (transfer none): A #GOConfNode
5065  */
5066 GOConfNode *
gnm_conf_get_plugin_lpsolve_dir_node(void)5067 gnm_conf_get_plugin_lpsolve_dir_node (void)
5068 {
5069 	return get_node ("plugin/lpsolve", NULL);
5070 }
5071 
5072 /**
5073  * gnm_conf_get_plugins_dir_node:
5074  *
5075  * Returns: (transfer none): A #GOConfNode
5076  */
5077 GOConfNode *
gnm_conf_get_plugins_dir_node(void)5078 gnm_conf_get_plugins_dir_node (void)
5079 {
5080 	return get_node ("plugins", NULL);
5081 }
5082 
5083 /**
5084  * gnm_conf_get_printsetup_dir_node:
5085  *
5086  * Returns: (transfer none): A #GOConfNode
5087  */
5088 GOConfNode *
gnm_conf_get_printsetup_dir_node(void)5089 gnm_conf_get_printsetup_dir_node (void)
5090 {
5091 	return get_node ("printsetup", NULL);
5092 }
5093 
5094 /**
5095  * gnm_conf_get_searchreplace_dir_node:
5096  *
5097  * Returns: (transfer none): A #GOConfNode
5098  */
5099 GOConfNode *
gnm_conf_get_searchreplace_dir_node(void)5100 gnm_conf_get_searchreplace_dir_node (void)
5101 {
5102 	return get_node ("searchreplace", NULL);
5103 }
5104 
5105 /**
5106  * gnm_conf_get_stf_export_dir_node:
5107  *
5108  * Returns: (transfer none): A #GOConfNode
5109  */
5110 GOConfNode *
gnm_conf_get_stf_export_dir_node(void)5111 gnm_conf_get_stf_export_dir_node (void)
5112 {
5113 	return get_node ("stf/export", NULL);
5114 }
5115 
5116 /**
5117  * gnm_conf_get_toolbar_style_dir_node:
5118  *
5119  * Returns: (transfer none): A #GOConfNode
5120  */
5121 GOConfNode *
gnm_conf_get_toolbar_style_dir_node(void)5122 gnm_conf_get_toolbar_style_dir_node (void)
5123 {
5124 	return get_node ("toolbar-style", NULL);
5125 }
5126 
5127 /**
5128  * gnm_conf_get_undo_dir_node:
5129  *
5130  * Returns: (transfer none): A #GOConfNode
5131  */
5132 GOConfNode *
gnm_conf_get_undo_dir_node(void)5133 gnm_conf_get_undo_dir_node (void)
5134 {
5135 	return get_node ("undo", NULL);
5136 }
5137