Commit 50d7d912 authored by Andreas J. Guelzow's avatar Andreas J. Guelzow Committed by Andreas J. Guelzow

add xml-compression schema new xml-compression-level key new

2002-04-17  Andreas J. Guelzow <aguelzow@taliesin.ca>

	* schemas/gnumeric-general.schemas : add xml-compression schema
	* src/gnumeric-gconf-priv.h : new xml-compression-level key
	* src/gnumeric-gconf.[ch] : new xml-compression-level get/set functions
	* src/xml-io.c : use get/set methods from src/gnumeric-gconf.h rather
	  than gnome-config directly

2002-04-17  Andreas J. Guelzow <aguelzow@taliesin.ca>

	* dialog-preferences.c : add file/xml preference page
	(dialog_pref_create_int_spin) : new
	(dialog_pref_create_float_spin) : new
	(dialog_pref_create_checkbox) : new
parent 2e6427a8
2002-04-17 Andreas J. Guelzow <aguelzow@taliesin.ca>
* schemas/gnumeric-general.schemas : add xml-compression schema
* src/gnumeric-gconf-priv.h : new xml-compression-level key
* src/gnumeric-gconf.[ch] : new xml-compression-level get/set functions
* src/xml-io.c : use get/set methods from src/gnumeric-gconf.h rather
than gnome-config directly
2002-04-16 Jody Goldberg <jody@gnome.org>
* src/workbook-view.c (wb_view_open) : merge with wb_view_open_custom
......
......@@ -29,6 +29,7 @@ Andreas:
* Preserve autocorrect exception lists
* Switch plugin manager from gnome-config to gconf
* Add window size preference page to preference dialog
* Add file/xml preference page to preference dialog
Jody:
* Add password dialog to support encrypted input.
......
2002-04-17 Andreas J. Guelzow <aguelzow@taliesin.ca>
* schemas/gnumeric-general.schemas : add xml-compression schema
* src/gnumeric-gconf-priv.h : new xml-compression-level key
* src/gnumeric-gconf.[ch] : new xml-compression-level get/set functions
* src/xml-io.c : use get/set methods from src/gnumeric-gconf.h rather
than gnome-config directly
2002-04-16 Jody Goldberg <jody@gnome.org>
* src/workbook-view.c (wb_view_open) : merge with wb_view_open_custom
......
2002-04-17 Andreas J. Guelzow <aguelzow@taliesin.ca>
* schemas/gnumeric-general.schemas : add xml-compression schema
* src/gnumeric-gconf-priv.h : new xml-compression-level key
* src/gnumeric-gconf.[ch] : new xml-compression-level get/set functions
* src/xml-io.c : use get/set methods from src/gnumeric-gconf.h rather
than gnome-config directly
2002-04-16 Jody Goldberg <jody@gnome.org>
* src/workbook-view.c (wb_view_open) : merge with wb_view_open_custom
......
......@@ -106,7 +106,7 @@
<type>int</type>
<default>5</default>
<locale name="C">
<short>Length of File History.</short>
<short>Length of File History</short>
<long>The number of files kept in the `recent' section of the file menu.</long>
</locale>
</schema>
......@@ -116,7 +116,7 @@
<owner>Gnumeric</owner>
<type>list</type>
<locale name="C">
<short>List of recently used files.</short>
<short>List of recently used files</short>
<long>The file menu shows a list of recently used functions. This is that list.</long>
</locale>
</schema>
......@@ -197,6 +197,17 @@
<long>This number (between 0.25 and 1.00) gives the vertical fraction of the screen size covered by the default window.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/core/xml/compression-level</key>
<applyto>/apps/gnumeric/core/xml/compression-level</applyto>
<owner>Gnumeric</owner>
<type>int</type>
<default>9</default>
<locale name="C">
<short>Default Compression Level For Gnumeric Files</short>
<long>This integer (between 0 and 9) gives the amount compression performed by Gnumeric when saving files in the default file format. 0 is no compression while 9 is maximum compression.</long>
</locale>
</schema>
</schemalist>
</gconfschemafile>
......@@ -106,7 +106,7 @@
<type>int</type>
<default>5</default>
<locale name="C">
<short>Length of File History.</short>
<short>Length of File History</short>
<long>The number of files kept in the `recent' section of the file menu.</long>
</locale>
</schema>
......@@ -116,7 +116,7 @@
<owner>Gnumeric</owner>
<type>list</type>
<locale name="C">
<short>List of recently used files.</short>
<short>List of recently used files</short>
<long>The file menu shows a list of recently used functions. This is that list.</long>
</locale>
</schema>
......@@ -197,6 +197,17 @@
<long>This number (between 0.25 and 1.00) gives the vertical fraction of the screen size covered by the default window.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnumeric/core/xml/compression-level</key>
<applyto>/apps/gnumeric/core/xml/compression-level</applyto>
<owner>Gnumeric</owner>
<type>int</type>
<default>9</default>
<locale name="C">
<short>Default Compression Level For Gnumeric Files</short>
<long>This integer (between 0 and 9) gives the amount compression performed by Gnumeric when saving files in the default file format. 0 is no compression while 9 is maximum compression.</long>
</locale>
</schema>
</schemalist>
</gconfschemafile>
2002-04-17 Andreas J. Guelzow <aguelzow@taliesin.ca>
* dialog-preferences.c : add file/xml preference page
(dialog_pref_create_int_spin) : new
(dialog_pref_create_float_spin) : new
(dialog_pref_create_checkbox) : new
2002-04-16 Andreas J. Guelzow <aguelzow@taliesin.ca>
* dialog-preferences.c : add window-size preference page
......
This diff is collapsed.
......@@ -65,6 +65,7 @@
#define GNUMERIC_GCONF_GUI_WINDOW_X GNUMERIC_GCONF_GUI_DIRECTORY "/window/x"
#define GNUMERIC_GCONF_GUI_WINDOW_Y GNUMERIC_GCONF_GUI_DIRECTORY "/window/y"
#define GNUMERIC_GCONF_XML_COMPRESSION "/apps/gnumeric/core/xml/compression-level"
......
......@@ -563,3 +563,22 @@ gnm_gconf_set_vertical_window_fraction (gnum_float val)
GNUMERIC_GCONF_GUI_WINDOW_Y,
val, NULL);
}
gint
gnm_gconf_get_xml_compression_level (void)
{
gint val = gconf_client_get_int (application_get_gconf_client (),
GNUMERIC_GCONF_XML_COMPRESSION,
NULL);
val = MIN (val, 10);
val = MAX (0, val);
return val;
}
void
gnm_gconf_set_xml_compression_level (gint val)
{
gconf_client_set_int (application_get_gconf_client (),
GNUMERIC_GCONF_XML_COMPRESSION,
val, NULL);
}
......@@ -6,33 +6,10 @@
void gnm_conf_sync (void);
/* autocorrect */
guint gnm_gconf_add_notification_autocorrect (GConfClientNotifyFunc func);
guint gnm_gconf_rm_notification_autocorrect (guint id);
GSList * gnm_gconf_get_plugin_file_states (void);
void gnm_gconf_set_plugin_file_states (GSList *list);
GSList * gnm_gconf_get_plugin_extra_dirs (void);
void gnm_gconf_set_plugin_extra_dirs (GSList *list);
GSList * gnm_gconf_get_active_plugins (void);
void gnm_gconf_set_active_plugins (GSList *list);
GSList * gnm_gconf_get_known_plugins (void);
void gnm_gconf_set_known_plugins (GSList *list);
gboolean gnm_gconf_get_activate_new_plugins (void);
void gnm_gconf_set_activate_new_plugins (gboolean val);
GSList * gnm_gconf_get_recent_funcs (void);
void gnm_gconf_set_recent_funcs (GSList *list);
guint gnm_gconf_get_num_of_recent_funcs (void);
void gnm_gconf_set_num_of_recent_funcs (guint val);
gboolean gnm_gconf_get_autocorrect_init_caps (void);
void gnm_gconf_set_autocorrect_init_caps (gboolean val);
......@@ -51,30 +28,40 @@ void gnm_gconf_set_autocorrect_init_caps_exceptions (GSList *list);
GSList * gnm_gconf_get_autocorrect_first_letter_exceptions (void);
void gnm_gconf_set_autocorrect_first_letter_exceptions (GSList *list);
gnum_float gnm_gconf_get_horizontal_dpi (void);
void gnm_gconf_set_horizontal_dpi (gnum_float val);
gnum_float gnm_gconf_get_vertical_dpi (void);
void gnm_gconf_set_vertical_dpi (gnum_float val);
gboolean gnm_gconf_get_auto_complete (void);
void gnm_gconf_set_auto_complete (gboolean val);
/* autoformat */
GSList * gnm_gconf_get_autoformat_extra_dirs (void);
void gnm_gconf_set_autoformat_extra_dirs (GSList *list);
gboolean gnm_gconf_get_live_scrolling (void);
void gnm_gconf_set_live_scrolling (gboolean val);
char * gnm_gconf_get_autoformat_sys_dirs (void);
void gnm_gconf_set_autoformat_sys_dirs (char const * string);
gint gnm_gconf_get_recalc_lag (void);
void gnm_gconf_set_recalc_lag (gint val);
char * gnm_gconf_get_autoformat_usr_dirs (void);
void gnm_gconf_set_autoformat_usr_dirs (char const * string);
/* file history */
gint gnm_gconf_get_file_history_max (void);
void gnm_gconf_set_file_history_max (gint val);
GSList * gnm_gconf_get_file_history_files (void);
void gnm_gconf_set_file_history_files (GSList *list);
gint gnm_gconf_get_initial_sheet_number (void);
void gnm_gconf_set_initial_sheet_number (gint val);
/* plugins */
GSList * gnm_gconf_get_plugin_file_states (void);
void gnm_gconf_set_plugin_file_states (GSList *list);
GSList * gnm_gconf_get_plugin_extra_dirs (void);
void gnm_gconf_set_plugin_extra_dirs (GSList *list);
GSList * gnm_gconf_get_active_plugins (void);
void gnm_gconf_set_active_plugins (GSList *list);
GSList * gnm_gconf_get_known_plugins (void);
void gnm_gconf_set_known_plugins (GSList *list);
gboolean gnm_gconf_get_activate_new_plugins (void);
void gnm_gconf_set_activate_new_plugins (gboolean val);
/* undo */
gboolean gnm_gconf_get_show_sheet_name (void);
void gnm_gconf_set_show_sheet_name (gboolean val);
......@@ -87,14 +74,9 @@ void gnm_gconf_set_undo_size (gint val);
gint gnm_gconf_get_undo_max_number (void);
void gnm_gconf_set_undo_max_number (gint val);
GSList * gnm_gconf_get_autoformat_extra_dirs (void);
void gnm_gconf_set_autoformat_extra_dirs (GSList *list);
char * gnm_gconf_get_autoformat_sys_dirs (void);
void gnm_gconf_set_autoformat_sys_dirs (char const * string);
char * gnm_gconf_get_autoformat_usr_dirs (void);
void gnm_gconf_set_autoformat_usr_dirs (char const * string);
/* new workbooks */
gint gnm_gconf_get_initial_sheet_number (void);
void gnm_gconf_set_initial_sheet_number (gint val);
gnum_float gnm_gconf_get_horizontal_window_fraction (void);
void gnm_gconf_set_horizontal_window_fraction (gnum_float val);
......@@ -102,4 +84,30 @@ void gnm_gconf_set_horizontal_window_fraction (gnum_float val);
gnum_float gnm_gconf_get_vertical_window_fraction (void);
void gnm_gconf_set_vertical_window_fraction (gnum_float val);
/* xml/files */
gint gnm_gconf_get_xml_compression_level (void);
void gnm_gconf_set_xml_compression_level (gint val);
GSList * gnm_gconf_get_recent_funcs (void);
void gnm_gconf_set_recent_funcs (GSList *list);
guint gnm_gconf_get_num_of_recent_funcs (void);
void gnm_gconf_set_num_of_recent_funcs (guint val);
/* others */
gnum_float gnm_gconf_get_horizontal_dpi (void);
void gnm_gconf_set_horizontal_dpi (gnum_float val);
gnum_float gnm_gconf_get_vertical_dpi (void);
void gnm_gconf_set_vertical_dpi (gnum_float val);
gboolean gnm_gconf_get_auto_complete (void);
void gnm_gconf_set_auto_complete (gboolean val);
gboolean gnm_gconf_get_live_scrolling (void);
void gnm_gconf_set_live_scrolling (gboolean val);
gint gnm_gconf_get_recalc_lag (void);
void gnm_gconf_set_recalc_lag (gint val);
#endif /* GNUMERIC_GRAPH_H */
......@@ -41,6 +41,7 @@
#include "file.h"
#include "str.h"
#include "plugin-util.h"
#include "gnumeric-gconf.h"
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
......@@ -56,7 +57,6 @@
#include <gal/widgets/e-colors.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-util.h>
#include <libgnome/gnome-config.h>
#include <locale.h>
#include <math.h>
#include <limits.h>
......@@ -3250,16 +3250,9 @@ xml_probe (GnumFileOpener const *fo, const gchar *filename, FileProbeLevel pl)
static void
gnumeric_xml_set_compression (xmlDoc *doc, int compression)
{
gboolean ok = TRUE;
if (compression < 0) {
gnome_config_push_prefix ("Gnumeric/XML_DOM/");
compression = gnome_config_get_int_with_default ("compressionLevel=9", &ok);
gnome_config_pop_prefix ();
}
if (compression >= 0)
xmlSetDocCompressMode (doc, compression);
if (compression < 0)
compression = gnm_gconf_get_xml_compression_level ();
xmlSetDocCompressMode (doc, compression);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment