gimp/app/config
Michael Natterer 894cf70dd5 Added infrastructure to make sure we don't write to the global brush,
2004-01-28  Michael Natterer  <mitch@gimp.org>

	Added infrastructure to make sure we don't write to the global
	brush, pattern etc. directories. Needed to make this configurable
	because we can't rely on the global directories being read-only,
	having certain names or being otherwise detectable at runtime in a
	sane way. Fixes bug #132214.

	* libgimpbase/gimpdatafiles.[ch]: added "const gchar *dirname" to
	the GimpDataFileData struct so callbacks don't need to call
	g_path_get_dirname() for each file.

	* libgimpwidgets/gimpfileentry.c: made it work with non UTF-8
	encoded filenames.

	* libgimpwidgets/gimppatheditor.[ch]: ditto. Added GUI and API for
	setting/getting a second "writable_path". The widget makes sure
	that the writable_path is always a subset of the path.

	* app/config/gimpconfig-utils.[ch]: added new function
	gimp_config_build_writable_path().

	* app/config/gimpcoreconfig.[ch]: added separate properties for
	the writable brush, pattern, gradient, palette and font paths.

	* app/config/gimprc-blurbs.h: added (still empty) blurbs for the
	new properties.

	* app/core/gimpdata.[ch] (gimp_data_set_filename): added parameter
	"gboolean writable". Set data->writable to FALSE by default. If
	"writable" is passed as TRUE, still check if we can write to the
	file before setting data->writable to TRUE.

	(gimp_data_create_filename): changed "data_path" parameter to
	"dest_dir" and assume dest_dir is writable.

	(gimp_data_duplicate): set data->dirty to TRUE to make sure
	duplicated things will be saved.

	* app/core/gimpbrush.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpgradient.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c: don't set the data's filename and don't
	touch data->dirty in the _load() functions because that's done by
	the data factory now. Don't touch data->dirty in the _duplicate()
	functions because that's done by gimp_data_duplicate() itself now.

	* app/core/gimpdatafactory.[ch] (gimp_data_factory_new): added
	"writable_property_name" and remember it.
	Added utility function gimp_data_factory_get_save_dir() which
	determines the directory to save new datas to.
	Added public function gimp_data_factory_data_save_single() which
	saves a single data object.
	Make sure new things get saved to the first writable directory
	as specified in preferences.

	* app/core/gimp.c (gimp_real_initialize): pass the writable_paths'
	property names to gimp_data_factory_new().

	* app/widgets/gimpdataeditor.c (gimp_data_editor_save_dirty): use
	gimp_data_factory_data_save_single() instead of implementing
	saving here.

	* app/widgets/gimppropwidgets.[ch] (gimp_prop_path_editor_new):
	added "const gchar *writable_property_name" parameter (can be
	NULL).

	Added the needed callbacks to handle the writable_path and made
	the path_editor and file_entry code aware of non UTF-8 filename
	encodings. Some general cleanup.

	* app/gui/preferences-dialog.c: changed accordingly.
2004-01-28 21:53:50 +00:00
..
.cvsignore app/Makefile.am app/main.c app/config/Makefile.am app/config/makefile.msc 2003-10-13 22:55:25 +00:00
Makefile.am modernized, made a lot of things m4 macros, and made versioning a lot more 2004-01-22 03:51:46 +00:00
config-types.h app/display/Makefile.am new files that implement a GimpConfig object with 2003-10-22 14:46:05 +00:00
gimpbaseconfig.c added GIMP_MAX_MEMSIZE, an arbitrary upper limit for memory sizes. It must 2003-11-25 19:45:01 +00:00
gimpbaseconfig.h app/config/gimpbaseconfig.h use gint64 for all memsize properties. 2003-11-16 17:51:36 +00:00
gimpconfig-deserialize.c libgimpwidgets/gimpquerybox.c configure the labels in the message dialog 2003-11-14 15:33:40 +00:00
gimpconfig-deserialize.h app/widgets/gimpdocked.[ch] renamed GimpDockedIface to 2003-10-11 14:30:18 +00:00
gimpconfig-dump.c added '%P' which expands to the PDB id of the active drawable. Moved local 2004-01-27 12:43:53 +00:00
gimpconfig-dump.h app/Makefile.am app/main.c app/config/Makefile.am app/config/makefile.msc 2003-10-13 22:55:25 +00:00
gimpconfig-error.c app/config/Makefile.am moved code from gimpconfig.[ch] to these new files. 2003-07-24 14:14:23 +00:00
gimpconfig-error.h added GIMP_CONFIG_ERROR_VERSION to GimpConfigError enum. 2003-11-07 23:47:35 +00:00
gimpconfig-params.c app/config/gimpscanner.c configured the scanner to use 64bit integers. 2003-11-14 13:41:16 +00:00
gimpconfig-params.h app/config/gimpscanner.c configured the scanner to use 64bit integers. 2003-11-14 13:41:16 +00:00
gimpconfig-path.c return early if gimp_config_path_expand_only() fails. 2004-01-28 14:36:22 +00:00
gimpconfig-path.h configure.in etc/Makefile.am etc/gimprc.in removed templates for gimprc 2002-12-29 18:58:24 +00:00
gimpconfig-serialize.c handle negative float and double values similar to how this is done for 2003-10-26 00:03:16 +00:00
gimpconfig-serialize.h removed function gimp_config_serialize_comment()... 2003-10-12 01:49:51 +00:00
gimpconfig-types.c app/config/gimpscanner.c configured the scanner to use 64bit integers. 2003-11-14 13:41:16 +00:00
gimpconfig-types.h include <libgimpmath/gimpmathtypes.h>. 2003-07-07 16:22:45 +00:00
gimpconfig-utils.c Added infrastructure to make sure we don't write to the global brush, 2004-01-28 21:53:50 +00:00
gimpconfig-utils.h Added infrastructure to make sure we don't write to the global brush, 2004-01-28 21:53:50 +00:00
gimpconfig.c app/widgets/gimpdocked.c (gimp_docked_iface_base_init) they are base_init, 2003-10-15 20:05:23 +00:00
gimpconfig.h removed gimp_config_copy_properties() and added the more intelligent 2003-10-14 15:20:59 +00:00
gimpconfigwriter.c app/app_procs.c app/errors.c app/main.c app/config/gimpconfigwriter.c 2004-01-23 17:24:44 +00:00
gimpconfigwriter.h fixed dependencies for test-config. 2003-10-12 16:46:50 +00:00
gimpcoreconfig.c Added infrastructure to make sure we don't write to the global brush, 2004-01-28 21:53:50 +00:00
gimpcoreconfig.h Added infrastructure to make sure we don't write to the global brush, 2004-01-28 21:53:50 +00:00
gimpdisplayconfig.c added %D* to DEFAULT_IMAGE_TITLE_FORMAT. 2004-01-08 22:06:57 +00:00
gimpdisplayconfig.h app/config/gimpdisplayconfig.[ch] added a new gimprc option 2003-11-20 17:13:02 +00:00
gimpguiconfig.c app/config/gimpguiconfig.[ch] app/config/gimprc-blurbs.h 2004-01-16 23:18:23 +00:00
gimpguiconfig.h app/config/gimpguiconfig.[ch] app/config/gimprc-blurbs.h 2004-01-16 23:18:23 +00:00
gimppluginconfig.c removed an unused variable and trailing whitespace. 2003-11-16 21:57:46 +00:00
gimppluginconfig.h app/config/gimppluginconfig.[ch] added "script-fu-path" back to gimprc. 2002-12-30 01:28:47 +00:00
gimprc-blurbs.h Added infrastructure to make sure we don't write to the global brush, 2004-01-28 21:53:50 +00:00
gimprc.c include "libgimpbase/gimpbase.h" where needed; removed now unnecessary 2004-01-19 01:54:11 +00:00
gimprc.h app/config/Makefile.am new files that define plug-in specific 2002-12-29 23:23:35 +00:00
gimpscanner.c include "libgimpbase/gimpbase.h" where needed; removed now unnecessary 2004-01-19 01:54:11 +00:00
gimpscanner.h include <libgimpmath/gimpmathtypes.h>. 2003-07-07 16:22:45 +00:00
gimpxmlparser.c added gimp_xml_parser_parse_buffer(). 2003-12-21 00:23:36 +00:00
gimpxmlparser.h added gimp_xml_parser_parse_buffer(). 2003-12-21 00:23:36 +00:00
makefile.msc still unacceptable patched to compile without FT2, see bug #113681 2003-11-16 21:20:14 +00:00
test-config.c Only add FOO_DISABLE_DEPRECATED flags with GTK+ 2.2.x. Add 2003-11-01 20:06:01 +00:00