Commit Graph

114 Commits

Author SHA1 Message Date
Jehan be0e6b84e9 libgimpbase: do not "fix" paths in build environment.
When running GIMP in the build environment (even before it's installed), we
don't want to "fix" paths. We had the case in particular on the macOS CI where
the install PREFIX was a parent directory of the build directory and therefore
we were "fixing" some perfectly good constructed directories (set by meson) into
non-existing folder paths.

Additionally this codepath should only run when ENABLE_RELOCATABLE_RESOURCES is
set (even though this alone would not have fixed our CI issue because the macOS
build is relocatable).

Finally I am updating the gimp-data repository so that libraries are properly
found from the (now correct thanks to this commit) paths set by meson when
running gimp-console from within the build directory.
2024-03-28 00:19:10 +01:00
Jehan f5d2c5369c libgimpbase: fix annotations.
As per the changes in commit 005b3a05b8 and discussions in !800,
gimp_locale_directory() returns a string in the OS encoding for all but Windows
(UTF-8), i.e. the "filename" type in GIR annotations.
2023-01-24 19:59:40 +01:00
Luca Bacci 005b3a05b8 Make use of the gimp_bind_text_domain () util function 2023-01-24 14:48:44 +00:00
Luca Bacci 54b3e3956e Use SHGetKnownFolderPath instead of the deprecated SHGetSpecialFolderLocation 2023-01-24 14:48:44 +00:00
Luca Bacci afe9625bdb Simpler way to get the module HANDLE 2023-01-24 14:48:44 +00:00
Lukas Oberhuber 271435534f macos: support for homebrew build
Supports running gimp in homebrew builds which have more complex
structures of where things are placed.
2022-07-27 17:06:21 +00:00
Jehan bcdb1cdb6a Issue #7837: gimp_installation_directory() in macOS doesn't know about…
… extensions yet.
2022-02-09 12:47:37 +01:00
Emily Gonyer 3afa37cbc6 app, libgimp*, plug-ins: Changed gendered terms to be gender-neutral
Changed a handful of gendered terms to be gender-neutral, and one typo 
of 'he' to 'the' where appropriate.
2021-11-14 11:22:24 +00:00
Jehan 1873f0d65c libgimpbase: fix memory leak in gimp_installation_directory().
Argh I should have properly reviewed !392 (commit c264f0b705).
It was leaking the return value of a g_path_get_basename().
2021-01-19 12:04:53 +01:00
Jehan 58b98b941f libgimpbase: remove case of plug-ins binaries directly under plug-ins/.
In GIMP 3, plug-ins are mandatorily under a subdirectory. Though on GIMP
2.10.x, both cases are still possible. So only the previous commit
should be backported to gimp-2-10 branch.

See discussion in !392.
Thanks also to Christopher Nielsen for helping.
2021-01-19 11:40:00 +01:00
Pieter van Oostrum c264f0b705 gimp: macOS: fix for file export dialogs GIF and PNG. Authored by @pietervo, and he should be credited with this. 2021-01-19 10:36:40 +00:00
Niels De Graef 842dc7535f gir: (skip) functions with varargs
Bindings can't handle these, so they are not introspectable.
2020-05-21 13:49:38 +02:00
Jehan 6bc6a07b7e libgimpbase, plug-ins: fix all warnings to g_stat() calls.
The second parameter should be GStatBuf*, which will be defined to be
the right struct depending on the actual platform. Using `struct stat*`
was good on Linux but was outputting warnings on other platforms (at
least on Win32).
2019-09-22 13:52:37 +02:00
Michael Natterer 1bca89163d libgimpbase: remove gimp_personal_rc_file()
and port its remaining users to gimp_directory_file().
2019-09-21 18:08:13 +02:00
Michael Natterer a4775d5b2d libgimpbase: remove gimp_gtkrc() 2019-09-21 12:56:52 +02:00
Jehan ab6783902e libgimpbase: more (transfer) and (element-type) warnings fixed. 2019-07-28 10:09:46 +02:00
Michael Natterer ee79eb999f libgimpbase: minor cleanups while grepping for DEPRECATED 2019-07-20 02:40:49 +02:00
Jehan db00616888 libgimpbase: add gimp_installation_directory_file().
Fix previous commit.
Ahahah! Mitch, you didn't test your code before pushing! Bad boy! :P
2019-02-02 18:51:51 +01:00
Félix Piédallu fc8303dd0a (source modifs) Fix: Rename macros as it conflicts with Mingw headers.
* DATADIR -> GIMPDATADIR
* SYSCONFDIR -> GIMPSYSCONFDIR
* DATADIR -> SYSDATADIR (tools/)
2019-01-25 19:08:28 +00: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
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer 1671da428c libgimpbase: remove almost all deprecated compat cruft
Keep infrastructure for compat enums around because we will
mose definitely need it again.
2018-05-20 21:06:29 +02:00
Michael Natterer dbd9797a13 Switch to version 2.99/3.0 in a lot of places and depend on GTK+ 3.22
and lots of other newer libraries.
2018-05-20 21:06:26 +02:00
Jehan 070bcb8979 libgimpbase: strengthen other use of g_win32_locale_filename_from_utf8()
Let's make our various usages of this broken function more robust, or at
least return with errors when we can. But this is still seriously
broken. Inside gimp_locale_directory() though, there was nothing I could
do, so I just added a FIXME for at least keeping an eye on it.
2018-04-30 22:23:18 +02:00
Michael Natterer 8294ca9d21 Bug 784502 - Multiple identical path entries for resources cause...
...resources to be loaded and shown multiple times

Change gimp_path_parse() to filter out duplicate paths. This is the
function at the bottom which is used by everything else, so should
generically catch all duplicates.
2017-07-08 12:50:37 +02:00
Jehan cb02326284 libgimpbase: minor tab cleaning. 2017-05-23 18:09:41 +02:00
Jehan 8ac1e407c5 Bug 763202 - Create $XDG_DATA_HOME if it doesn't exist.
This has shown a problem especially on non-Linux platforms since XDG
is more of a Linux standard.
2016-06-13 03:34:26 +02:00
Jehan 0f67e21c98 themes: rename theme "Default" into "System".
Since we have many themes now, this new name better indicates that it
is meant to follow your desktop theme settings.
Also it will likely not remain the default theme.
2016-03-22 16:37:10 +01:00
Michael Natterer f2d581a536 Bug 761170 - Warnings building with clang
Fix a bunch of clang warnings.
2016-02-12 22:49:47 +01: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 b03d69dd40 libgimpbase, app: add variants of gimp_$foo_directory() which return GFiles
gimp_directory_file(), gimp_data_directory_file() etc. The new
functions take a variable list of path elements to the file,
the list has to be NULL-terminated. Remove the newly added
gimp_personal_rc_gfile(). Start using the new functions in app/.
2014-07-28 02:04:01 +02:00
Michael Natterer 78f797a3e4 libgimpbase: add gimp_personal_rc_gfile() 2014-07-01 16:06:51 +02:00
Michael Natterer 6e07c83978 Bug 722939 - asking for an absolute path as gimpdir results in a path...
...relative to the home folder

If an absolute path was given to the --with-gimpdir configure option,
use that path literally.
2014-01-25 19:03:40 +01:00
Michael Natterer 8dcbcfec9e libgimpbase: use g_win32_get_package_installation_directory_of_module()
instead of reimplementing it.
2013-01-27 22:38:35 +01:00
Michael Natterer b7361669e8 libgimpbase: clean up the linux relocation code
by removing all but the toplevel prefix getter from gimpreloc.c It was
1) confusing 2) sometimes trying to subsitute the runtime prefix twice
and 3) sometimes ignoring configure-given directories within the
configure-prefix. This should all be fixed now, and done in one less
place.
2013-01-27 22:26:29 +01:00
Jehan 057d5be970 Bug 688316 - get_special_folder reverted to exact same implementation as glib.
I used SHGetFolderLocation, deprecated, which I thought was a better idea than
SHGetSpecialFolderLocation, deprecated as well, but also unsupported. But it
apparently won't compile on XP. Reverts back to glib exact copy.
2013-01-24 01:09:32 +09:00
Jehan 60e0cfe55c Bug 166643 - gimp support for the XDG basedir spec
New configuration directory scheme, consistent across platforms, and
following standards.

UNIX platforms (except OSX): $XDG_CONFIG_HOME/GIMP/{GIMP_APP_VERSION}
Windows: %APPDATA%/GIMP/{GIMP_APP_VERSION}
OSX: NSApplicationSupportDirectory/GIMP/{GIMP_APP_VERSION}
2012-11-11 17:55:31 +01:00
Jehan 5f26f5402e libgimpbase: move g_get_home_dir() to the scope where it's used
Fixes warning: variable 'home' set but not used [-Wunused-but-set-variable]
2012-11-11 14:16:07 +01:00
Michael Natterer 04fa9e8237 libgimpbase: on OSX move gimpdir to "~/Library/Application Support"
not just ~/Library. This clearly needs some manual migration
instructions for the old wrong location.
2012-10-08 23:20:54 +02:00
Michael Natterer 010b28f39e libgimpbase: add gimp_installation_directory()
which returns the toplevel directory of the running GIMP installation.
2012-05-23 11:49:07 +02:00
Michael Natterer db1dda6e3f libgimpbase: implement relocation for OSX
Using [[NSBundle mainBundle] resourcePath]
2012-05-12 20:56:30 +02:00
Michael Natterer 4805f875ef libgimpbase: it's "GIMP" not "Gimp" 2012-05-12 16:48:05 +02:00
Michael Natterer 9112d68488 Move gimpdir and thumbnails to proper places on OSX
gimpdir goes to ~/Library/Gimp/x.y
thumbnails go to ~/Library/Caches/org.freedesktop.thumbnails

The thumbnail location is not standardized yet, but is the only
location that makes sense. Also fix user install to search old
gimpdirs to migrate in both Library and the classic location.
Remove the obsolete CABON_CFLAGS from all makefiles.
2012-05-12 14:39:44 +02:00
Mukund Sivaraman 1d3ae408b6 libgimpbase: Fix macro name so the dllexports happen on win32 2011-12-04 10:25:27 +05:30
Michael Natterer a1b69f8f9e libgimpbase: fix Win32 import/export of the gimp_foo_version variables
My last "cleanup" of this stuff was obviously completely bogus.
2011-08-29 20:29:27 +02:00
Michael Natterer 2337d44018 libgimpbase: s/LIBGIMP_COMPILATION/GIMP_BASE_COMPILATION/ in gimpenv.*
because the latter is now generically defined for the new include guards.
2011-04-28 19:34:22 +02:00
Michael Natterer fcfb7cf160 Use the new g_[s]list_free_full() instead of foreach() and free() 2011-03-07 17:11:28 +01:00
Michael Natterer 3411c7b63a libgimpbase: move docs from template files to inline comments
and remove all template files. Also fixed all gtk-doc warnings
and fixed/added some docs.
2010-06-29 19:16:51 +02:00
Martin Nordholts 5d9dde1d47 libgimpbase: Support changing GIMP2_DIRECTORY at run-time
In order to be able to change GIMP2_DIRECTORY during run-time, check
for changes to GIMP2_DIRECTORY in gimp_directory().

This is typically useful in test case where you could read from one
GIMP2_DIRECTORY at start-up and then write to a different
GIMP2_DIRECTORY at shut down.

The documentation for this function does not suggest that the value is
cached and thus the old behavior can be considered a bug. It is hard
to imagine why anyone would change GIMP2_DIRECTORY at run-time in a
script for example and *not* expect gimp_directory() to return the
updated gimp_dir.
2010-01-29 18:33:21 +01: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