Commit Graph

467 Commits

Author SHA1 Message Date
Michael Natterer cc8fc0f90f libgimp*: add GI's .dirstamp to .gitigore 2019-08-03 19:50:17 +02:00
Niels De Graef 5f92ced1f3 Add (nullable) if applicable
Basically this commit makes sure that all return values that are marked
as "Returns:" also have a `(nullable)` annotation if it is mentioned on
the same line that NULL can also be returned.

This will prevent a few problems in GObject-introspection.
2019-08-03 07:53:47 +00:00
Niels De Graef 1dda60154c Use "Returns:" to annotate return values
To be able to annotate return values through GObject-introspection, you
need to make sure it is tagged with `Returns:` and not something else.
2019-08-03 07:53:47 +00:00
Michael Natterer c12c031f2d pdb, libgimp*: add (out caller-allocates) to all GimpRGB* return values 2019-08-01 15:39:13 +02:00
Michael Natterer 2d471ce049 libgimpconfig: fix float parsing in gimp_config_deserialize_fundamental() too 2019-07-30 18:36:20 +02:00
Michael Natterer c0fb66254e Use g_ascii_dtostr() instead of g_ascii_formatd()
The latter is broken and doesn't guarantee a decimal point with the
current bug. Also, g_ascii_dtostr() doesn't need the format parameter
and produces nicer output.
2019-07-30 15:57:36 +02:00
Michael Natterer 2c97bc8327 libgimpconfig: make gimp_scanner_parse_float() less strict
A number without a decimal point can be put into a gdouble just fine,
no need to refuse them. Moreover, g_ascii_dtostr() serializes doubles
without fractional part without a decimal point, and we are soon going
to use it.
2019-07-30 14:31:14 +02:00
Jehan 74a0da9aa0 libgimpconfig: fix a few more warnings.
Fixes these sorts of warnings:
> return value: Missing (element-type) annotation
> return value: Missing (transfer) annotation
2019-07-28 09:50:20 +02:00
Jehan 4e99c25902 libgimpconfig: fix introspection in gimpcolorconfig.c.
Several returned values had no documentation, and needed in particular
(transfer) annotations.

Fixes various warnings:
> return value: Missing (transfer) annotation
2019-07-27 23:55:30 +02:00
Jehan fb4c86a660 libgimp*: make more libgimp* libraries introspected.
Only libgimpwidgets is not introspected yet as it didn't work from
scratch and I don't have the time right now to look into it. Anyway with
all the others, we already have so many warnings during the GObject
Introspection step now that we have a lot of work to do already!
2019-07-27 20:25:20 +02:00
Michael Natterer aca5f806c4 libgimp*: lots of doc fixes and new docs for structs and enums 2019-07-24 01:18:30 +02:00
Michael Natterer d7d281bd97 libgimpconfig: fix previous commit to return the right error token 2019-06-20 15:01:29 +02:00
sarah f19844d0d1 enhancement: validate reference argument of gimp_scanner_parse_string before using it 2019-06-20 06:04:30 +00:00
Jehan 613bf7c5ab app, libgimpconfig: make various usage of g_file_replace() safer.
When an error occurs, we want to prevent overwriting any previous
version of the file by incomplete contents. So run
g_output_stream_close() with a cancelled GCancellable to do so.
See also discussion in #2565.
2018-11-26 15:50:38 +01:00
Michael Natterer a29f73bd9a Issue #2224 - Use the "Swap folder" setting for the GEGL cache
Move swap/cache and temporary files out the GIMP user config dir:

libgimpbase: add gimp_cache_directory() and gimp_temp_directory()
which return the new default values inside XDG_CACHE_HOME and the
system temp directory. Like all directories from gimpenv.[ch] the
values can be overridden by environment variables. Improve API docs
for all functions returning directories.

Add new config file substitutions ${gimp_cache_dir} and
${gimp_temp_dir}.

Document all the new stuff in the gimp and gimprc manpages.

app: default "swap-path" and "temp-path" to the new config file
substitutions. On startup and config changes, make sure that the swap
and temp directories actually exist.

In the preferences dialog, add reset buttons to all file path pages.
2018-11-18 18:10:34 +01:00
Ell 3b0040c043 app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()

g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58.  Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.

This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.

Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 14:39:56 -04:00
Jehan bc427479e0 libgimpconfig: update some description comments.
Second parameter of gimp_scanner_parse_token() and
gimp_scanner_parse_identifier() is not a return value. It is a value to
compare with.
2018-07-17 19:45:51 +02:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Ell 3b228afdbe libgimpconfig: allow writing empty data in gimp_config_writer_data() 2018-07-05 22:47:45 -04:00
Jehan a411ee7c38 libgimpconfig: forgot to update gimpconfig.def AGAIN!
Aaaaargh!
2018-07-03 02:01:20 +02:00
Jehan 9c05f10368 libgimpconfig: new API gimp_config_build_system_path().
This is the complementary of gimp_config_build_writable_path() to
properly get the system vs. user directories.
2018-07-02 21:16:14 +02:00
Ell e47ffefab2 libgimpcolor, libgimpconfig: remove deprecated interface functions
Remove the deprectaed foo_interface_get_type() functions, as per
the last two commits.
2018-05-27 05:59:39 -04:00
Ell 5f8643a6ee libgimpconfig: align GimpConfig with the rest of the interfaces
Unlike the last two commits, we don't port GimpConfig to
G_DEFINE_INTERFACE(), since we need to provide a base initializer
for it.  However, this commit aligns it with the rest of our
intefaces, by renaming gimp_config_interface_get_type() to
gimp_config_get_type(), and by performing class initialization for
the interface in a separate function than base initialization.

Keep gimp_config_interface_get_type() around as a deprecated
function, to maintain ABI compatibility.  It will be removed in a
separate commit in master, so that this commit can be easily
cherry-picked to gimp-2-10.
2018-05-27 05:56:34 -04:00
Michael Natterer 7990b1d57c libgimp: update all .def files 2018-05-25 22:13:33 +02:00
Michael Natterer bb2a9d119f libgimpconfig: move all GimpColorConfig members to private 2018-05-20 21:06:33 +02:00
Michael Natterer f4f106ad26 libimp*: add private pointers to all instance structs
even if we don't have private members (yet). Also make class padding 8
pointers in all headers. This commit moves nothing to private, it just
makes all headers consistent and adjusts .c files accordigly.
2018-05-20 21:06:33 +02:00
Michael Natterer 86e3f31a03 libgimpconfig: remove all deprecated cruft 2018-05-20 21:06:29 +02:00
luz.paz 69b2e84924 Source and trivial typos
Found via `codespell` and `grep`
2018-05-12 23:44:47 +02:00
Jehan d4404aa4bc libgimpconfig: fix the fix of the fix!
So apparently, it's "parenthesis" in singular.
Cf. commit 1b44812ab1.
2018-04-26 01:10:55 +02:00
Jehan 1b44812ab1 libgimpconfig: fix wrong typo fix.
Actually after re-reviewing previous commit, I found at least one wrong
fix in commit 4a77ff2d3d.
s/the opening parentheses/the opening parenthese/
2018-04-25 23:53:45 +02:00
luz.paz 4a77ff2d3d Bug 795557 - Misc. typo fixes in source, comments and doxygen (pt3)
Found via `codespell` and grep.
2018-04-25 23:49:06 +02:00
Jehan 08cc37271f libgimpconfig: create parent directories for config file if necessary.
The directory should be already created by GIMP. But just in case it is
not there, for whatever reason, don't just fail. Try and create all
parents.
2018-04-22 22:17:28 +02:00
Michael Natterer b021909a63 libgimpconfig: use g_object_new_with_properties() instead of g_object_newv() 2018-01-02 13:14:42 +01:00
Ell f7d6805ebb */Makefile.am: add abbreviations to generated enum files
Update the dprod production of generated enum files to include
abbreviated value descriptions, as per the previous commits.

Add a comment for translators above the abbreviated descriptions,
specifying the full description they abbreviate.
2017-11-30 03:10:14 -05:00
Ell 58fdaae3ad enums: add intermediate generated enum files to .gitignore 2017-08-24 15:35:27 -04:00
Michael Natterer 4a5b740828 libgimpconfig: add GIMP_CONFIG_PROP_INT64() and GIMP_CONFIG_PROP_UINT64()
While all serialize and deserialize code is supporting 64-bit ints for
quite a while, we didn't have convenience macros to install properties.
2017-07-23 15:17:12 +02:00
Jehan 7999cfbeef libgimp*: tab cleaning. 2017-06-17 11:38:18 +02:00
Michael Natterer caef6d0deb libgimp*: various doc fixes 2017-06-03 21:22:12 +02:00
Ell 3ca48a0b30 enums: don't use comments in generated enum recipes
Works in bash, but apparently not portable.
2017-06-02 11:15:43 -04:00
Ell f16ba7d1a7 libgimpconfig: remove negative value handling from gimp_scanner_parse_color()
Handled internally by gimp_scanner_parse_float(), since last commit.
2017-05-27 16:40:26 -04:00
Ell b8505a4eac libgimpconfig: fix negative float parsing 2017-05-27 15:50:56 -04:00
Ell 5bcde32caf enums: run gimp-mkenums from the build dir
Commit 1e6acbd4e1 modified the
generated enum recipes to run gimp-mkenums from the source
directory, instead of the build directory, so that only the
basenames of the corresponding header files would appear in
the comment at the top of the generated files.  This was a
mistake -- $(GIMP_MKENUMS) is expecting to be invoked from the
build directory.

Switch back to running gimp-mkenums from the build directory.  To
avoid including the relative path from the build directory to the
source directory in the generated file, add a @basename@ production
variable to gimp-mkenums, which exapnds to the basename of the
input file, and use it instead of @filename@ in the recipes for the
generated enum files.
2017-05-22 20:29:18 -04:00
Ell f9fa0d1b18 enums: don't write generated enum files to src-dir if unchanged
When regenerating an enum file, don't copy it back to the source
directory if it hasn't actually changed.  This allows using a read-
only source directory where the enum header is newer than the
generated file, as long as they're not really out of sync.

OTOH, *do* touch the generated source-dir file even when unchanged,
in order to avoid re-running its recipe on the next build, however,
allow this to silently fail (which is harmless).
2017-05-22 17:58:04 -04:00
Michael Natterer 05874c1268 libgimpconfig: don't gimp_rgb_clamp() in gimp_scanner_parse_color()
so config files can now contain oog RGB values too.
2017-05-19 02:05:57 +02:00
Michael Natterer f807cbe10b libgimpconfig: change GimpColorConfig's out-of-gamut color to magenta
I have no clue why it was some gray.
2017-05-16 22:43:21 +02:00
Ell 1e6acbd4e1 enums: generate enum files in source dir
We check them into git, so this makes it easier to keep them in
sync when using a separate build directory.

Case in point -- this commit also syncs a few enum files that went
out-of-sync with their headers.
2017-05-06 17:26:16 -04:00
Michael Natterer 7111eadf3b libgimpconfig: gimp_config_reset_properties(): reset only changed properties
This avoids a lot of useless notifications when resetting an object,
and fixes e.g. the "reset tool options" behavior of GimpTransformTool,
which did completely reset itself instead of just behaving like all
non-default options had changed.

And probably breaks some things that were relying on these redundant
notifications.
2017-02-09 12:38:10 +01:00
Michael Natterer 4fb62427a2 libgimpconfig: better compat enum handling in gimp_config_deserialize_enum()
The compat enum's GType is now attached to the original enum's GType,
not to the individual GParamSpec.
2017-01-08 20:16:47 +01:00
Michael Natterer 7ab80eaa09 libgimpconfig: support "compat enums" in gimp_config_deserialize_enum()
If the enum value is not found among the nicks and names of the
GParamSpec's actual enum type, check if it has a "gimp-compat-enum"
GType attached as QData, and try the lookup there.
2017-01-06 23:09:39 +01:00
Michael Natterer 865d8796e0 libgimpconfig: gimp_scanner_parse_color(): parse nevative color values
instead of choking and aborting parsing of the entire config file. The
negative values are still clamped away after parsing, but at least we
properly read them now.
2016-10-18 22:34:51 +02:00
Michael Natterer bafe4419c6 libgimpconfig: (de)serialize GFile properties as config paths
so they are found in relocated prefixes / user configs.
2016-10-17 18:55:50 +02:00
Michael Natterer 1e69bbdef6 libgimpconfig: don't unref the GFile in gimp_config_serialize_value()
g_value_get_object() doesn't return a new reference, so it must
not be dropped. Fixes random crashes when a profile was chosen
in a GimpTemplate (e.g. in new image or prefs). Spotted by Elle.
2016-10-12 22:39:31 +02:00
Piotr Drąg f2e63397af Fix a typo in a translatable string ("represantation") 2016-10-02 13:47:50 +02:00
Michael Natterer 0524b60228 app: consistently treat GimpColorConfig profile paths as config paths
and use gimp_file_new_for_config_path() and _get_config_path() when
dealing with them. We used a weird mix of config paths and plain
(filesystem encoded) paths, waiting to to break on umlauts or
whatever. The code in gimpcolorconfig.c was particularly bad.
2016-10-01 00:29:44 +02:00
Michael Natterer d36d956770 libgimpconfig: add gimp_file_new_for_config_path() and _get_config_path()
Which turn a UTF-8 encoded config path directly into a GFile and back,
using gimp_config_path_expand() and _unexpand().
2016-09-30 22:03:34 +02:00
Michael Natterer ada5fe977b Bug 772025 - Incomplete toolrc file causes GIMP to hang
gimp_config_deserialize_properties(): don't loop infinitely when
encountering EOF in a truncated file.
2016-09-28 18:32:25 +02:00
Michael Natterer ce4c4a44a6 libgimpconfig: fix typo: s/next level/nest level/ 2016-09-28 18:29:38 +02:00
Michael Natterer b63fed76eb libgimpconfig: serialize empty value arrays as (property-name 0)
not (property-name NULL), which means nothing to the parser.
A "0" simply means an array with zero values.
2016-09-14 00:56:17 +02:00
Michael Natterer 42647ec6d6 libgimpconfig: forgot debug output in gimp_config_path_unexpand_only() 2016-09-04 15:25:45 +02:00
Michael Natterer 6b391156be libgimpconfig: add gimp_config_path_unexpand()
which is the opposite of gimp_config_path_expand() and replaces all
occurances of well-known gimprc paths with their respective
identifiers such as ${gimp_data_directory}, ${gimp_directory} etc.
2016-09-01 00:39:34 +02:00
Richard Kreckel dd9b0fc55b Bug 768044 - Fix many typos
This fixes many typos in comments and one in a user-visible string (msgid
"center abscisse" changed to "center abscissa" in affected po files. too).
2016-06-26 00:35:24 +02:00
Alexandre Prokoudine 6eb777a615 Bring soft-proofing consistence to blurbs 2016-06-08 23:46:09 +03:00
Michael Natterer 8634418be5 libgimpconfig: commit regenerated enums.c file 2016-06-08 00:02:03 +02:00
Alexandre Prokoudine 3e01419b0c Introduce consistent use of 'soft-proofing' in user-visible messages 2016-06-08 00:21:51 +03:00
Michael Natterer 4b18b1ac39 libgimpconfig: rename gimpcolorconfig-enums.[ch] to gimpconfigenums.[ch]
It makes no sense to do this differently than in all other of our
libraries.
2016-06-06 21:05:16 +02:00
Michael Natterer a743ae712b libgimpconfig: add "optimize" options for display and softproofing
Honor them in gimp_widget_get_color_transform() and make them
configurable in prefs. The code and GUI avoid the negation in
the lcms "NOOPTIMIZE" flag.
2016-06-06 01:15:26 +02:00
Michael Natterer 8abf1aab5e libgimpconfig: add getters for all GimpColorConfig members
and use them instead of peeking the public object struct.
2016-06-05 23:58:02 +02:00
Michael Natterer fcf5b708e5 libgimpwidgets: rename gimp_color_config_get_printer_color_profile()
to gimp_color_config_get_simulation_color_profile(), along with
various internal "printer" strings. Also reduce the number of
user-visible "print" stuff from the preferences color management page.
2016-06-05 18:00:24 +02:00
Michael Natterer 060c03a119 libgimpconfig: don't include gimpcolorconfig-enums.h in gimpcolorconfig.c
gimpcolortypes.h already includes it.
2016-05-25 21:34:49 +02:00
Michael Natterer 335727dd26 libgimpwidgets: change the tooltip of GimpColorConfig:mode
to say "How images are displayed on screen." instead of "Mode of
operation for color management.". The old text was never accurate.
2016-05-16 17:38:49 +02:00
Alexandre Prokoudine e66ec72a3f Fix a user-visible typo 2016-05-10 01:08:14 +03:00
Michael Natterer 64fb18453c libgimpconfig: add support for (de)serializing GFile properties
Use g_file_get_parse_name() and g_file_parse_name() in order to turn
them into strings and back. Not really sure if we will end up needing
this, but I need it for current hacking. It's clean code and easy
enough to revert, so no harm done in either case.
2016-05-08 23:08:38 +02:00
Michael Natterer f11e1d141d libgimpconfig: deprecate all GIMP_CONFIG_INSTALL_PROP_FOO() macros 2016-04-17 00:12:33 +01:00
Michael Natterer d17fa32ca2 libgimpconfig: port to GIMP_CONFIG_PROP_FOO() 2016-04-17 00:12:10 +01:00
Michael Natterer 47ef3be145 Initialize GValues with G_VALUE_INIT instead of { 0, } 2016-03-26 15:59:26 +01:00
Michael Natterer a3f127bf5f libgimpconfig: add a new set of macros to register serialitable properties
The old GIMP_CONFIG_INSTALL_PROP_FOO() have the problem of always
passing NULL as the GParamSpec's "nick". I have no clue what we were
thinking back then, but this has always been a major design flaw
because (among other problems) it makes it impossible to fully
auto-generate GUIs based on properties.

Added GIMP_CONFIG_PROP_FOO() macros which do have a "nick" parameter,
will deprecate the old macros as soon as everything is ported.
2016-02-09 23:25:44 +01:00
Michael Natterer 5cbe6f2003 libgimpconfig: add a preferred gray profile to GimpColorConfig 2015-12-14 01:54:00 +01:00
Michael Natterer 77dac3ea60 Bug 555562 - GIMP should ask before applying working space profile
Get rid of the "configurable RGB working space profile".

Instead, turn GimpColorConfig's "rgb-profile" property into a
"Preferred RGB profile" thing that is only a hint and never used
without explicit user interaction. Present it next to the built-in
profile in the profile combo boxes and call it "Preferred" in the
prefs dialog and its tooltip.

Most importantly, don't use it as the image's profile when the image
is not tagged with a profile. Untagged images are now always in the
sRGB or linear RGB built-in color spaces.

This commit reduces the "Apply color profile" dialog on file import to
a simple "Convert to built-in RGB", but that dialog is about to be
moved to the core and improved anyway.
2015-08-20 16:02:22 +02:00
Michael Natterer c102dde92b libgimpcolor, *: change GimpColorProfile to be a GObject
it used to be a typedef to gpointer and actually was a cmsHPROFILE.

Change its API to be more "standard", remove the public close()
function. The object caches both the cmsHPROFILE and the data/length
ICC blob, so conversions between the two become obsolete (simply call
get_lcms_profile() or get_icc_profile()).

Adapt everything to the new API, but port it in a naive way for now,
the code doesn't take advantage of the new possibilities yet (like
refcounting).
2015-07-10 22:53:59 +02:00
Michael Natterer 3565b33019 libgimpconfig: rename the new GimpColorConfig profile accessor functions
gimp_color_config_get_foo_profile() -> get_foo_color_profile()

because the old names clash with possible future accessors for the raw
filename properties.
2015-06-03 09:57:34 +02:00
Michael Natterer 4910c28957 libgimpcolor: rename the gimp_lcms_*() functions to gimp_color_profile_*()
because it doesn't make sense to call the typedef GimpColorProfile
but the function namespace gimp_lcms_*().
2015-06-03 09:41:23 +02:00
Michael Natterer 8005eea835 Remove the "GIMP" from all "Since: GIMP 2.x" API doc comments
because it confuses gtk-doc and breaks some links. Also change the
"Index of new symbols in GIMP 2.x" sections to be what seems to be the
modern standard (looked at the GLib and GTK+ docs), and update some
other stuff.
2015-05-31 21:18:09 +02:00
Michael Natterer 24da0007a4 libgimp*: some API doc fixes 2015-05-31 14:40:20 +02:00
Michael Natterer 393e3e0b0b libgimpconfig: fix error codes and messages in GimpColorConfig 2015-05-20 14:47:44 +02:00
Michael Natterer ce3429d643 libgimpconfig: validate profile filenames when setting them on GimpColorConfig
and don't allow wrong files to be set.
2015-05-20 12:20:58 +02:00
Michael Natterer 54553487f2 libgimpconfig: add functions to get GimpColorProfiles to GimpColorConfig
gimp_color_config_get_rgb,cmyk,display,printer_profile()
2015-05-06 16:32:17 +02:00
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
Tor Lillqvist 08edb87340 Add gimp_config_copy.
2008-02-08  Tor Lillqvist  <tml@novell.com>

	* libgimpconfig/gimpconfig.def: Add gimp_config_copy.


svn path=/trunk/; revision=24831
2008-02-08 08:08:43 +00:00
Michael Natterer 69d2abcb29 add new method GimpConfigInterface::copy() which by default calls
2008-02-01  Michael Natterer  <mitch@gimp.org>

	* libgimpconfig/gimpconfig-iface.[ch]: add new method
	GimpConfigInterface::copy() which by default calls
	gimp_config_sync() but is overridable for objects which are not
	entirely property-defined or otherwise evil.

	Freeze/thaw property notifications in deserialize() and reset().

	* libgimpconfig/gimpconfig-utils.c (gimp_config_sync): freeze/thaw
	property notifications on the dest object.


svn path=/trunk/; revision=24767
2008-02-01 11:44:45 +00:00
Michael Natterer ff95dd50d6 fix API docs.
2008-01-28  Michael Natterer  <mitch@gimp.org>

	* libgimpconfig/gimpconfig-serialize.c
	(gimp_config_serialize_property): fix API docs.


svn path=/trunk/; revision=24736
2008-01-28 18:55:21 +00:00
Sven Neumann 52581ec851 changed default value for using the system monitor profile. Many users
2007-11-16  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpcolorconfig.c: changed default value for using
	the system monitor profile. Many users seem to have broken monitor
	profiles and it's hard to figure out how to fix this (bug #496890).

svn path=/trunk/; revision=24170
2007-11-16 13:27:07 +00:00
Sven Neumann 91d29f48b2 initialize GimpRGB, just to be sure.
2007-10-27  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpscanner.c (gimp_scanner_parse_color):
	initialize GimpRGB, just to be sure.


svn path=/trunk/; revision=23975
2007-10-27 20:13:17 +00:00
Sven Neumann 5f7bf16e57 declared the fields as public so that they show up in the API
2007-10-27  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpcolorconfig.h (struct _GimpColorConfig):
	declared the fields as public so that they show up in the API
	documentation.


svn path=/trunk/; revision=23965
2007-10-27 14:06:03 +00:00
Sven Neumann 0add284387 use a neutral gray as the default out-of-gamut warning color.
2007-10-07  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpcolorconfig.c: use a neutral gray as the
	default out-of-gamut warning color.


svn path=/trunk/; revision=23754
2007-10-07 10:00:22 +00:00
Sven Neumann 169c7dbc46 added settings for marking out-of-gamut colors in the Print Simulation
2007-10-05  Sven Neumann  <sven@gimp.org>

        * libgimpconfig/gimpcolorconfig.[ch]: added settings for marking
        out-of-gamut colors in the Print Simulation (bug #476824).

        * app/dialogs/preferences-dialog.c: added a check-button for the
        out-of-gamut warning and tweaked the layout of the Color Management
        page to make the relationship of the settings more obvious.

        * modules/cdisplay_lcms.c: mark out-of-gamut colors.


svn path=/trunk/; revision=23729
2007-10-05 08:21:27 +00:00
Sven Neumann a9efcaa935 don't free the writer struct too early.
2007-07-17  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpconfigwriter.c (gimp_config_writer_finish):
	don't free the writer struct too early.


svn path=/trunk/; revision=22939
2007-07-17 06:21:54 +00:00
Sven Neumann 09578ea070 removed extra check for gthread and fold it into the GLIB and GTK checks.
2007-06-25  Sven Neumann  <sven@gimp.org>

	* configure.in: removed extra check for gthread and fold it into
	the GLIB and GTK checks.

	* */Makefile.am: changed accordingly.

	* app/main.c (main): always call g_thread_init().

svn path=/trunk/; revision=22832
2007-06-25 12:41:59 +00:00
Sven Neumann 9528a82b96 if an error occured while writing the file, propagate the error and return
2007-06-21  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpconfigwriter.c (gimp_config_writer_finish):
	if an error occured while writing the file, propagate the error
	and return FALSE.
	(gimp_config_writer_flush): improved error message.


svn path=/trunk/; revision=22821
2007-06-21 19:55:40 +00:00
Michael Natterer b0c8362f85 be forward-compatible by skipping unknown object properties.
2007-06-04  Michael Natterer  <mitch@gimp.org>

	* libgimpconfig/gimpconfig-deserialize.c: be forward-compatible by
	skipping unknown object properties.

	* app/config/gimprc-deserialize.c: synced code with
	libgimpconfig (same stuff should look the same).

	* app/config/gimprc.c: whitespace.


svn path=/trunk/; revision=22698
2007-06-04 10:38:25 +00:00
Sven Neumann 3b9f1cc4fa libgimpconfig/gimpscanner.c allocate structs using GSlice.
2007-05-22  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpscanner.c
	* libgimpwidgets/gimpwidgets.c: allocate structs using GSlice.


svn path=/trunk/; revision=22581
2007-05-22 17:58:02 +00:00
Sven Neumann 65f80e1825 use GSlice for the GimpConfigWriter struct.
2007-05-22  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpconfigwriter.c: use GSlice for the
	GimpConfigWriter struct.

svn path=/trunk/; revision=22561
2007-05-22 11:34:58 +00:00