Commit Graph

281 Commits

Author SHA1 Message Date
Mikael Magnusson cf3e7bc40b libgimpconfig: unfix loop condition and fix if condition
The loop was right, but the following if was meant to check if
the token was terminated correctly so it needs to be *p.
2014-10-29 22:17:15 +01:00
Mikael Magnusson d96096515e libgimpconfig: fix loop condition 2014-10-29 21:01:00 +01:00
Michael Natterer 23d3f5aa47 libgimpconfig: don't leak "expanded" in gimp_config_path_expand_to_files() 2014-10-06 20:33:09 +02:00
Michael Natterer 849481a861 Clean up code around calls to g_file_replace()
- use G_FILE_CREATE_NONE instead of 0
- don't put "Could not open <file> for writing: <error>" around the
  returned error, the returned message is already verbose
2014-10-04 02:44:54 +02:00
Jehan 8c1cd7caac Makefile: fix VPATH builds for win32. 2014-09-14 18:28:26 +02:00
Michael Natterer 14978bfe5d Simplify calls to g_output_stream_write_all()
It returns TRUE only if all bytes were written, so there is no need to
get and check the bytes_written return value.
2014-09-07 20:30:14 +02:00
Michael Natterer 32f29db8b0 libgimpconfig: add gimp_config_path_expand_to_files()
which returns a list of newly allocated GFiles.
2014-07-20 17:09:25 +02:00
Michael Natterer d7812173f4 libgimpconfig: add gimp_config_deserialize_stream()
and gimp_scanner_new_stream().
2014-07-04 03:29:09 +02:00
Michael Natterer 0acbfc3ffa libgimpconfig: add gimp_config_serialize_to_stream()
and gimp_config_writer_new_stream() which take a GOutputStream. Also
fix some new and old corner cases in GimpConfigWriter.
2014-07-03 23:25:21 +02:00
Michael Henning 33af6c61b7 app: fix building for windows.
This was broken in 53b5822926
2014-07-02 19:16:51 -04:00
Michael Natterer 53b5822926 libgimpconfig: port GimpConfigWriter to GIO 2014-07-02 23:53:57 +02:00
Michael Natterer 581a6e16e7 libgimpconfig: port GimpScanner to GIO
Move all code from gimp_scanner_new_file() to gimp_scanner_new_gfile().
If the passed GFile has a path, use a GMappedFile like before, otherwise
GIO-read the entire file into an allocated buffer and parse that buffer.
2014-07-02 16:05:23 +02:00
Michael Natterer 6ec5fb80e4 libgimpconfig: add API operating on GFiles instead of filenames
to GimpConfigInterface's wrappers, to GimpConfigWriter and to
GimpScanner.
2014-07-01 01:57:31 +02:00
Michael Natterer 8be52f6aa7 app, libgimp*: pass translated blurbs to GIMP_CONFIG_INSTALL_PROP_FOO()
instead of passing N_()-strings; and remove gettext() calls on these
strings when using them. Reduces complexitx, and fixes double- and
untranslated strings. Also enables to treat properties of GIMP and
GEGL objects the same way, which was totally broken before.
2014-05-14 23:34:01 +02:00
Daniel Sabo b54b59c9e8 Use EXTRA_foo_DEPENDENCIES for adding .def files
The foo_DEPENDENCIES rule replaces the default dependencies, where
EXTRA_foo_DEPENDENCIES just appends to it. This was causing libgimp
and libgimpui to build out of order.
2014-03-15 14:23:38 -07:00
Elle Stone a4821914d3 Bug 720045 - Add black point compensation to Preferences/Color Management
Make black point compensation configurable separately for both proof
and display.
2013-12-09 02:23:31 +01:00
Michael Natterer 697572ccc0 app,libgimp*: fix includes to follow our include policy
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
  finally acknowledging the fact that app/ depends on gdk-pixbuf almost
  globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
2013-10-15 01:58:39 +02:00
Michael Natterer 3cc53dab0b libgimpconfig: add gimp_scanner_parse_int64() 2013-06-28 22:02:29 +02:00
Michael Natterer ec786816bb */Makefile.am: merge INCLUDES into AM_CPPFLAGS
automake-1.13 finally warns about this anachronism.
2013-06-05 20:48:37 +02:00
Ville Skyttä 6b0d1038cc Bug 692641 - Various spelling fixes 2013-01-27 18:59:02 +01:00
Michael Natterer 0f7ac38682 Bug 684429 - Unable to edit text: error message states "problems..."
This fix is entirely sick, so is our method of serializing units,
which we write out as (unit foo bar) instead of (unit "foo bar"). The
assumption that caused this shit was that a unit's "identifier" is
really an identifier in the C-ish sense, when in fact it's just a
random user entered string.

Here, we try to parse at least the default units shipped with gimp,
and we add code to parse (unit "foo bar") in order to be compatible
with future correct unit serializing.
2012-10-04 23:56:49 +02:00
Michael Natterer f931f05006 libgimpconfig: support $(gimp_installation_dir) in config paths 2012-05-23 11:50:32 +02:00
Michael Natterer 486e76bdab libgimp*: use GIMP_API_VERSION in Makefile.am instead of hardcoding 2.0 2012-05-04 15:38:45 +02:00
Michael Natterer 7610e299ae Use GimpValueArray and GimpParamSpecValueArray
instead of the deprecated stuff from GLib.
2012-05-04 00:51:50 +02:00
Michael Natterer 3ad73b3658 libgimpcolor: add GdkPixbuf <-> GeglBuffer utility functions
and update tons of includes in libgimp and app.
2012-05-03 03:37:20 +02:00
Michael Natterer 3e119c5af7 libgimpcolor: add gimp_rgb[a]_set,get_pixel()
which converts from/to any pixel format using Babl. Added tons of
includes and CFLAGS now that libgimpcolor publically uses Babl.
2012-05-02 17:50:43 +02:00
Michael Natterer 056e09a6cb Remove the makefile.msc build system, it is unmaintained since 2008 2011-12-16 15:53:56 +01:00
Michael Natterer ebbad40885 Doc fixes in both source comments and gtk-doc files 2011-11-25 21:39:55 +01:00
Michael Natterer 847deffc86 libgimpbase: add gimp_scanner_parse_boolean()
and complete many api doc stubs.
2011-11-05 17:02:51 +01:00
Mukund Sivaraman 916e44fe58 libgimpconfig: Remove dead assignment 2011-10-04 14:15:13 +05:30
Michael Natterer cc47b2a600 libgimpwidgets/color: move the cairo color utility functions to libgimpcolor
Add CAIRO_CFLAGS to a lot of Makefiles to make this possible, and
because they pull in cairo via the libgimp headers.
2011-04-28 15:50:39 +02:00
Michael Natterer 844df2b4df libgimp*: add guards that #error out if individual files are included
This only helps to maintain proper includes in app/ and shouldn't
affect plug-ins at all, because these are supposed to only include the
main headers from libgimp/ since the beginning of time.

The gimpfootypes.h files do not have these guards, so we can continue
to maintain app/'s include policy that is very likely to error out if
wrong things are included.
2011-04-28 14:30:41 +02:00
Michael Natterer 6b30250353 libgimpconfig: don't crash if g_value_get_boxed() returns NULL 2010-09-25 16:02:02 +02:00
Michael Natterer 945641232e libgimpconfig: fix a lot of gtk-doc warnings 2010-06-29 22:19:11 +02:00
Michael Natterer 1af54c7874 libgimpconfig: move docs from template files to inline comments 2010-06-29 20:59:07 +02:00
Javier Jardón 525347d9f6 Remove deprecated glib symbol: g_mapped_free 2009-11-09 09:28:12 +01:00
Martin Nordholts d6820442b5 libgimpconfig: Also add gimp_config_serialize() to gimpconfig.def 2009-09-26 11:39:43 +02:00
Michael Schumacher 9f699e5441 Added missing export gimp_config_deserialize 2009-09-25 23:59:10 +02:00
Martin Nordholts a0923b62ee libgimpconfig: Add gimp_config_serialize() and _deserialize() 2009-09-19 18:00:03 +02:00
Martin Nordholts 5ad570e3cc Fix compilation errors
Fix compilation errors with obvious fixes.
2009-07-20 12:48:05 +02:00
Sven Neumann 4d14382ac8 check for fsync().
2009-03-17  Sven Neumann  <sven@sven>

	* configure.in: check for fsync().

	* libgimpconfig/gimpconfigwriter.c 
(gimp_config_writer_close_file):
	fsync temporary file if destination file exists.


svn path=/trunk/; revision=28172
2009-03-17 11:30:27 +00:00
Tor Lillqvist 244965fd36 Drop Windows code to remove target file before renaming. g_rename()
2009-03-17  Tor Lillqvist  <tml@iki.fi>

	* libgimpconfig/gimpconfigwriter.c
	(gimp_config_writer_close_file): Drop Windows code to remove
	target file before renaming. g_rename() nowadays takes care of
	allowing replacing existing files on Windows.


svn path=/trunk/; revision=28171
2009-03-17 11:28:29 +00:00
Martin Nordholts 4d7a6b10d1 Added .gitignore files generated with git svn create-ignore.
svn path=/trunk/; revision=27972
2009-01-31 11:37:44 +00:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann a9b1b41eef set the error in the GIMP_CONFIG_ERROR domain.
2008-11-12  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpconfig-path.c 
(gimp_config_path_expand_only):
	set the error in the GIMP_CONFIG_ERROR domain.


svn path=/trunk/; revision=27630
2008-11-12 11:57:07 +00:00
Sven Neumann 72b56f3ddf use g_set_error_literal() here as well.
2008-11-06  Sven Neumann  <sven@sven>

	* libgimpconfig/gimpconfigwriter.c 
(gimp_config_writer_linefeed):
	use g_set_error_literal() here as well.


svn path=/trunk/; revision=27564
2008-11-06 09:37:09 +00:00
Sven Neumann 02817081ff use NC_() to mark enum values for translation. Use a lower-case short form
2008-11-06  Sven Neumann  <sven@gimp.org>

	* tools/gimp-mkenums: use NC_() to mark enum values for 
translation.
	Use a lower-case short form of the type name as translation 
context.

	* libgimp/libgimp-intl.h: define the NC_() macro as noop.

	* libgimpbase/gimpbasetypes.[ch]
	* libgimpbase/gimpbase.def: added new functions to set and
	get a translation context on an enum type.

	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am:
	* libgimpconfig/Makefile.am
	* libgimpthumb/Makefile.am
	* libgimpwidgets/Makefile.am: register the translation context
	with the enum types.

	* app/display/display-enums.h
	* libgimpbase/gimpbaseenums.h
	* libgimpconfig/gimpcolorconfig-enums.h: removed old-style 
explicit
	translation context.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/plug-in/plug-in-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c
	* libgimpconfig/gimpcolorconfig-enums.c
	* libgimpwidgets/gimpwidgetsenums.c: regenerated.


svn path=/trunk/; revision=27562
2008-11-06 08:28:28 +00:00
Sven Neumann fe520925b7 app/base/Makefile.am app/core/Makefile.am app/display/Makefile.am
2008-11-03  Sven Neumann  <sven@gimp.org>

	
	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am: 
	* libgimpconfig/Makefile.am
	* libgimpthumb/Makefile.am
	* libgimpwidgets/Makefile.am: micro-optimization in the 
generated
	enum registration code.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/plug-in/plug-in-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c
	* libgimpconfig/gimpcolorconfig-enums.c
	* libgimpwidgets/gimpwidgetsenums.c: regenerated.


svn path=/trunk/; revision=27538
2008-11-03 21:38:13 +00:00
Michael Natterer 6865bb9e2b Bug 546924 – "New Image" misscalculating dimensions for non-pixel sized
2008-09-30  Michael Natterer  <mitch@gimp.org>

	Bug 546924 – "New Image" misscalculating dimensions for non-pixel
	sized templates

	* app/core/gimptemplate.h: added private param flag
	GIMP_TEMPLATE_PARAM_COPY_FIRST.

	* app/core/gimptemplate.c (gimp_template_class_init): set the flag
	on the resolution properties.

	* app/dialogs/image-new-dialog.c (image_new_template_changed):
	make sure the resolution properties are copied first.

	* libgimpconfig/gimpconfig-utils.c (gimp_config_sync): remove
	comment about fixing the template editor. That's not true any
	more.


svn path=/trunk/; revision=27091
2008-09-30 16:06:24 +00:00
Michael Natterer c65b09921a libgimpconfig/gimpconfig-serialize.[ch] add
2008-05-18  Michael Natterer  <mitch@gimp.org>

	* libgimpconfig/gimpconfig-serialize.[ch]
	* libgimpconfig/gimpconfig.def: add
	gimp_config_serialize_property_by_name().

	* app/gegl/gimpcolorbalanceconfig.c
	* app/gegl/gimpcurvesconfig.c
	* app/gegl/gimphuesaturationconfig.c
	* app/gegl/gimplevelsconfig.c: implement serialize() and
	deserialize() and make sure the properties which change when the
	channel/range property changes are handled correctly. Not too
	ugly but it's still a hack...


svn path=/trunk/; revision=25703
2008-05-18 19:13:28 +00:00