Compare commits
383 commits
GIMP_3_2_0
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f749e3781 | ||
|
|
beb0d85224 | ||
|
|
f61c326e65 | ||
|
|
e58505f872 | ||
|
|
70cab79f3a | ||
|
|
62a8a8de8d | ||
|
|
aa7c2a55d6 | ||
|
|
edc7a14127 | ||
|
|
86740b51e8 | ||
|
|
a377367145 | ||
|
|
c88dad5036 | ||
|
|
4d6ee89a62 | ||
|
|
397e97dcf9 | ||
|
|
691785113a | ||
|
|
6c04ce939f | ||
|
|
a66d203d1b | ||
|
|
7ea9f7873b | ||
|
|
5a046df819 | ||
|
|
862bc8d2c1 | ||
|
|
dababa26d6 | ||
|
|
309f137ae0 | ||
|
|
941bfcf918 | ||
|
|
cf6871763c | ||
|
|
73440b1627 | ||
|
|
b9277e094a | ||
|
|
00e9ad2f77 | ||
|
|
cc849cf189 | ||
|
|
43a7d725bf | ||
|
|
608c4cca73 | ||
|
|
449889295f | ||
|
|
8c0fc54b80 | ||
|
|
2a3480cc1b | ||
|
|
6316479440 | ||
|
|
68fab913c6 | ||
|
|
abd22d0059 | ||
|
|
30ced82bf4 | ||
|
|
1fa1f2384b | ||
|
|
a85e5286fd | ||
|
|
7dc8fefbfd | ||
|
|
9cab16c193 | ||
|
|
f00bf531ae | ||
|
|
1332a755eb | ||
|
|
04ae810258 | ||
|
|
1107d0f7af | ||
|
|
088b1f2426 | ||
|
|
13e5fb2231 | ||
|
|
fd9484a8b8 | ||
|
|
864abd6be0 | ||
|
|
c1a228ea48 | ||
|
|
d88cd4cb7a | ||
|
|
b41deb138d | ||
|
|
620850715e | ||
|
|
60d8c4cbbe | ||
|
|
40ccc60d14 | ||
|
|
9aef11022a | ||
|
|
f788cdac9d | ||
|
|
e1abd061a9 | ||
|
|
9926795610 | ||
|
|
06aa66428d | ||
|
|
13e2823a03 | ||
|
|
65e06ab42b | ||
|
|
ee06c790c3 | ||
|
|
9cfccfb968 | ||
|
|
a9e1f665dd | ||
|
|
febeb89c55 | ||
|
|
65f4c6c47f | ||
|
|
e88053628a | ||
|
|
c034549574 | ||
|
|
d5b087d656 | ||
|
|
ff3c56ba1f | ||
|
|
c77e0b7faa | ||
|
|
37c11d1748 | ||
|
|
55256210f8 | ||
|
|
3e21884883 | ||
|
|
987dc52160 | ||
|
|
2637492ef1 | ||
|
|
4f69cd039c | ||
|
|
bfec7079f0 | ||
|
|
7c604fc722 | ||
|
|
27bb2a8721 | ||
|
|
2832b15f0a | ||
|
|
8af15d525a | ||
|
|
d63687aefd | ||
|
|
e7bca20795 | ||
|
|
48ecc40599 | ||
|
|
e79c142d1c | ||
|
|
26322f0f43 | ||
|
|
b402e7d73b | ||
|
|
2c8d91c3cc | ||
|
|
9257af7570 | ||
|
|
08121e09bd | ||
|
|
1dd77b6fdf | ||
|
|
2e7ab376bf | ||
|
|
bf9e206c39 | ||
|
|
9df9cf7ed1 | ||
|
|
ca7da0080a | ||
|
|
eaa472158c | ||
|
|
d025b02823 | ||
|
|
fe95ec6ecf | ||
|
|
f4969c2f80 | ||
|
|
f14f9516e2 | ||
|
|
dae02feed3 | ||
|
|
4643f7898f | ||
|
|
3807b2f311 | ||
|
|
8aeb5d6f53 | ||
|
|
a749329ab6 | ||
|
|
e97e3d0e35 | ||
|
|
55cf88f2c8 | ||
|
|
6f655967dc | ||
|
|
d5d0527955 | ||
|
|
127510cd81 | ||
|
|
657dceb3ed | ||
|
|
d254c5684c | ||
|
|
b5ca37f192 | ||
|
|
7ce3ed457e | ||
|
|
3668ee5562 | ||
|
|
ed3611efa6 | ||
|
|
fe185577e2 | ||
|
|
3c71c42c31 | ||
|
|
b9ec00c334 | ||
|
|
84c7274c70 | ||
|
|
6aaefa73c2 | ||
|
|
2d83568bb9 | ||
|
|
189598c330 | ||
|
|
499e18f84e | ||
|
|
1c59ad3f17 | ||
|
|
a146c4ae56 | ||
|
|
77682518b9 | ||
|
|
2066844166 | ||
|
|
6f33a6a896 | ||
|
|
8b9ee6d2a8 | ||
|
|
854caadbc3 | ||
|
|
2a341b815c | ||
|
|
c19ed5ca98 | ||
|
|
811c0c8546 | ||
|
|
ae0a6b028e | ||
|
|
82f4ffefa9 | ||
|
|
3b7a92fc5d | ||
|
|
e9a608a0f5 | ||
|
|
774c3988bb | ||
|
|
d6fa046f4f | ||
|
|
1116615856 | ||
|
|
ae339e180e | ||
|
|
0148fcbac1 | ||
|
|
79d37e234b | ||
|
|
74efec2b76 | ||
|
|
e6eeaba58e | ||
|
|
6300b7377f | ||
|
|
9b533c5099 | ||
|
|
9e664f140d | ||
|
|
94f77bd256 | ||
|
|
1cc5458558 | ||
|
|
a71ecd0dda | ||
|
|
8c0ce0cd64 | ||
|
|
c69549aff5 | ||
|
|
af1dac3c51 | ||
|
|
f4f1baf5ef | ||
|
|
f99fbdca8a | ||
|
|
0bbddc6cda | ||
|
|
f629be96a1 | ||
|
|
ee9447bf06 | ||
|
|
2bdc93281c | ||
|
|
4f1c6a2a8b | ||
|
|
8eae22306a | ||
|
|
1d4f942239 | ||
|
|
e2549ef383 | ||
|
|
3a4ceb0b3a | ||
|
|
66d5e9c9f9 | ||
|
|
497ffd8eff | ||
|
|
ec22a2f058 | ||
|
|
f8a5b2ebb9 | ||
|
|
69c32c89eb | ||
|
|
477c751562 | ||
|
|
e64058d23b | ||
|
|
2381ec5c7c | ||
|
|
3835167be6 | ||
|
|
0530069052 | ||
|
|
0834c7c954 | ||
|
|
41c9d8ce9c | ||
|
|
c8c420aa18 | ||
|
|
0cb6d9cf7b | ||
|
|
c6e8b5f7ec | ||
|
|
81f7b3ad6e | ||
|
|
6e5c6b83f0 | ||
|
|
963c896313 | ||
|
|
eb119759ca | ||
|
|
456de6761e | ||
|
|
476407cd1b | ||
|
|
aca680a1b1 | ||
|
|
4c085b947f | ||
|
|
160bb39912 | ||
|
|
fff91c4ce7 | ||
|
|
2f7b49dfea | ||
|
|
43c57af5d7 | ||
|
|
e0e4285b73 | ||
|
|
566d562b4f | ||
|
|
a0c065b02b | ||
|
|
807e21c6ab | ||
|
|
b3c40c7be1 | ||
|
|
6369574261 | ||
|
|
73b54f4b87 | ||
|
|
9bf31a4d55 | ||
|
|
ca20e2a341 | ||
|
|
2c8548e111 | ||
|
|
48e194532e | ||
|
|
daff399b4d | ||
|
|
91f78f58c4 | ||
|
|
c039f82640 | ||
|
|
424f090100 | ||
|
|
2012a9afc9 | ||
|
|
a7e39c16b1 | ||
|
|
75eb99dca3 | ||
|
|
d2f6867064 | ||
|
|
f3b14044e4 | ||
|
|
fa097df908 | ||
|
|
ac73289f18 | ||
|
|
9686f94f1d | ||
|
|
1437c84d07 | ||
|
|
061a7eada2 | ||
|
|
6661004e5e | ||
|
|
8da8d9a478 | ||
|
|
5046b0d3d5 | ||
|
|
69359272a4 | ||
|
|
ca5438c6da | ||
|
|
8bdb5cbfd7 | ||
|
|
d1662f8f2c | ||
|
|
a131100075 | ||
|
|
45a764504e | ||
|
|
a2c5d70c92 | ||
|
|
80d11e2104 | ||
|
|
c3cbd5c21f | ||
|
|
aed086ecfa | ||
|
|
4ad7e7bdd3 | ||
|
|
5575a0f6e1 | ||
|
|
f52ae69532 | ||
|
|
0de2a56176 | ||
|
|
01268d9f5e | ||
|
|
9ac87044ad | ||
|
|
d5e51bd464 | ||
|
|
4a0d99872a | ||
|
|
8d9a05b8bf | ||
|
|
3f17f528d1 | ||
|
|
7436b8dcbd | ||
|
|
76eaccc7b6 | ||
|
|
112276d8c8 | ||
|
|
7f67536f1a | ||
|
|
af44043108 | ||
|
|
78de1080ce | ||
|
|
63a57d68cb | ||
|
|
3a90c48d6e | ||
|
|
54e3a9777d | ||
|
|
2f76be13cb | ||
|
|
06d8bd6c54 | ||
|
|
cbc8150749 | ||
|
|
24e42dd1fc | ||
|
|
aba2a9b852 | ||
|
|
21721eafa3 | ||
|
|
1b9a3fcfb1 | ||
|
|
ef0a9822be | ||
|
|
ab0b041321 | ||
|
|
e75d758712 | ||
|
|
a791238394 | ||
|
|
f96b5f18d7 | ||
|
|
680ebede22 | ||
|
|
fdeb87946f | ||
|
|
1d4b1e098b | ||
|
|
0c6711a646 | ||
|
|
a2e19a8411 | ||
|
|
a62aeb3012 | ||
|
|
89be7ef6c7 | ||
|
|
4f76429885 | ||
|
|
3b5056e392 | ||
|
|
077be60a6a | ||
|
|
a506b72186 | ||
|
|
9a95de2cce | ||
|
|
59b6e92878 | ||
|
|
44b52efb3e | ||
|
|
37dd5755aa | ||
|
|
2c632ce957 | ||
|
|
279bf03839 | ||
|
|
b697dc8a48 | ||
|
|
7f39ea1fa9 | ||
|
|
a4fd6a6298 | ||
|
|
8c3a9dd4a8 | ||
|
|
cb9e1c9ac1 | ||
|
|
6a35db6ec2 | ||
|
|
16fc8d6306 | ||
|
|
f677365c72 | ||
|
|
e1e7df2951 | ||
|
|
85044d78d1 | ||
|
|
9231db6473 | ||
|
|
51f1de8844 | ||
|
|
9db6c35ac5 | ||
|
|
7a928ee3ed | ||
|
|
ccb3cc3ae8 | ||
|
|
e14f1d7f0b | ||
|
|
9ba96014bc | ||
|
|
047ab24186 | ||
|
|
e453dac63b | ||
|
|
8427c76467 | ||
|
|
e83eef67a9 | ||
|
|
92a860d5c9 | ||
|
|
7612363d8c | ||
|
|
5f5f6fd055 | ||
|
|
6d28b4852a | ||
|
|
c44c0dacde | ||
|
|
3264a67112 | ||
|
|
5251f29b55 | ||
|
|
bb3bf0ae5b | ||
|
|
34f980108d | ||
|
|
dd5349a9f5 | ||
|
|
2c2f9216bd | ||
|
|
a7032e8e05 | ||
|
|
91b840f557 | ||
|
|
b6d43ec0fe | ||
|
|
e0bd82f290 | ||
|
|
2557d6a178 | ||
|
|
337cfb6a31 | ||
|
|
f4d71a874a | ||
|
|
4ca657e728 | ||
|
|
5b5a39390a | ||
|
|
db36fa3371 | ||
|
|
040fac494e | ||
|
|
f4f83b973c | ||
|
|
b3eaf3a577 | ||
|
|
591518fdb1 | ||
|
|
a00a227f54 | ||
|
|
23a17ee000 | ||
|
|
487ee4f5da | ||
|
|
653d61e1cb | ||
|
|
7664cc7590 | ||
|
|
5ef15ef576 | ||
|
|
a08411f1ba | ||
|
|
5af6e7d249 | ||
|
|
ffb275bf2a | ||
|
|
625106a974 | ||
|
|
0454a81d23 | ||
|
|
20419baf21 | ||
|
|
70ae6af83b | ||
|
|
fdda75deb8 | ||
|
|
85ad553b09 | ||
|
|
c837fda1e4 | ||
|
|
b822a56d10 | ||
|
|
ad30eff447 | ||
|
|
b1d5bad01a | ||
|
|
d574292d68 | ||
|
|
1d6e8a3a9c | ||
|
|
7b09835370 | ||
|
|
71c3f29df8 | ||
|
|
375bdd7946 | ||
|
|
eec9d51236 | ||
|
|
4026ec4828 | ||
|
|
3a60f800d4 | ||
|
|
50627a445c | ||
|
|
0c49b92da9 | ||
|
|
be32a75ee9 | ||
|
|
9a7ec09dab | ||
|
|
ff647fccb0 | ||
|
|
59d0e82850 | ||
|
|
27af187e02 | ||
|
|
6ec98fac00 | ||
|
|
a03ccc91da | ||
|
|
b705bfb660 | ||
|
|
a19ef56214 | ||
|
|
7ff91e9a8d | ||
|
|
3d026f3d14 | ||
|
|
3fef9e5dc6 | ||
|
|
9fb127f684 | ||
|
|
2319bbe689 | ||
|
|
0a8e21c4b1 | ||
|
|
fb3e10f3a5 | ||
|
|
60d3caa2e2 | ||
|
|
2185168536 | ||
|
|
4828b2d3f7 | ||
|
|
8184f55c54 | ||
|
|
79f4d4ab0f | ||
|
|
06ae3fd5f1 | ||
|
|
ab05373a76 | ||
|
|
58ee4f3c97 | ||
|
|
2df481de31 | ||
|
|
a057c2340b | ||
|
|
81cdda873d | ||
|
|
82b327db47 |
312 changed files with 117129 additions and 115158 deletions
154
.gitlab-ci.yml
154
.gitlab-ci.yml
|
|
@ -131,7 +131,7 @@ stages:
|
|||
- <<: *CI_RELEASE
|
||||
before_script:
|
||||
- export GIMP_PREFIX="${CI_PROJECT_DIR}/_install-${RUNNER}"
|
||||
timeout: 30m
|
||||
timeout: 40m
|
||||
|
||||
.debian_environ: &ENVIRON
|
||||
# See: https://testing.developer.gimp.org/core/setup/build/#preparing-for-building
|
||||
|
|
@ -161,25 +161,25 @@ deps-debian-nonreloc:
|
|||
# Install deps
|
||||
- echo "FROM debian:${DEB_VERSION}" > Dockerfile
|
||||
- echo "WORKDIR $CI_PROJECT_DIR" >> Dockerfile
|
||||
## 'ca-certificates' is NOT a gimp dep, it is installed only to our Docker image work
|
||||
- echo "RUN apt-get update -qq && apt-get install -qq -y --no-install-recommends ca-certificates \\" >> Dockerfile
|
||||
## 'ca-certificates' and 'git' are NOT gimp deps, they are installed only to our Docker image work
|
||||
- echo "RUN apt-get update -qq && apt-get install -qq -y --no-install-recommends ca-certificates git \\" >> Dockerfile
|
||||
## Build-time only dependencies
|
||||
- echo "${TOOLCHAIN:-build-essential}
|
||||
appstream
|
||||
bison
|
||||
desktop-file-utils
|
||||
flex
|
||||
gettext
|
||||
gi-docgen
|
||||
git
|
||||
gobject-introspection
|
||||
libgtk-3-bin
|
||||
locales
|
||||
meson
|
||||
valac
|
||||
xsltproc \\" >> Dockerfile
|
||||
## Runtime dependencies
|
||||
- echo "at-spi2-core
|
||||
ffmpeg
|
||||
gettext
|
||||
gjs
|
||||
glib-networking
|
||||
graphviz
|
||||
|
|
@ -214,19 +214,19 @@ deps-debian-nonreloc:
|
|||
libqoi-dev
|
||||
librsvg2-dev
|
||||
libsuitesparse-dev
|
||||
libtiff-dev
|
||||
$UMFPACK
|
||||
libtiff-dev
|
||||
libunwind-dev
|
||||
libwebp-dev
|
||||
libwmf-dev
|
||||
libxmu-dev
|
||||
libxpm-dev
|
||||
locales
|
||||
mypaint-brushes
|
||||
poppler-data
|
||||
python3
|
||||
python3-gi
|
||||
python3-gi-cairo" >> Dockerfile
|
||||
python3-gi-cairo
|
||||
xdg-utils" >> Dockerfile
|
||||
- echo "RUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen" >> Dockerfile
|
||||
# Prepare environ
|
||||
- echo "FROM $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER}" > Dockerfile2;
|
||||
|
|
@ -245,7 +245,9 @@ deps-debian-nonreloc:
|
|||
## Build babl
|
||||
- echo "RUN printf \"\e[0Ksection_start:\`date +%s\`:babl_build[collapsed=true]\r\e[0KBuilding babl\n\"" >> Dockerfile2;
|
||||
- echo "RUN git clone --branch \"\$([ \"$CI_COMMIT_TAG\" ] && echo \"\$(git ls-remote --tags --exit-code --refs https://gitlab.gnome.org/GNOME/babl.git | grep -oi \"BABL_[0-9]*_[0-9]*_[0-9]*\" | sort --version-sort | tail -1)\" || echo \"master\")\" --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/babl.git" babl >> Dockerfile2;
|
||||
- echo "RUN meson setup babl/_build-${RUNNER} babl -Dprefix=\"${GIMP_PREFIX}\" $RELOCATABLE_OPTION $PKGCONF_RELOCATABLE_OPTION $WARN_AS_ERROR_ON_CI" >> Dockerfile2;
|
||||
# TODO: remove this line once we have a babl 0.1.126. Takes care of an option name change.
|
||||
- export BABL_RELOCATABLE_OPTION=$(([ $CI_COMMIT_TAG ] && (([ $RELOCATABLE_OPTION ] && echo -Drelocatable=enabled) || true)) || echo $RELOCATABLE_OPTION)
|
||||
- echo "RUN meson setup babl/_build-${RUNNER} babl -Dprefix=\"${GIMP_PREFIX}\" $BABL_RELOCATABLE_OPTION $PKGCONF_RELOCATABLE_OPTION $WARN_AS_ERROR_ON_CI" >> Dockerfile2;
|
||||
- echo "RUN ninja -C babl/_build-${RUNNER}" >> Dockerfile2;
|
||||
- echo "RUN ninja -C babl/_build-${RUNNER} install" >> Dockerfile2;
|
||||
- echo "RUN printf \"\e[0Ksection_end:\`date +%s\`:babl_build\r\e[0K\n\"" >> Dockerfile2;
|
||||
|
|
@ -269,7 +271,7 @@ deps-debian-nonreloc:
|
|||
- babl/_build-${RUNNER}/config.h
|
||||
- gegl/_build-${RUNNER}/meson-logs/meson-log.txt
|
||||
- gegl/_build-${RUNNER}/config.h
|
||||
expire_in: 2 hours
|
||||
expire_in: 4 hours
|
||||
|
||||
gimp-debian-nonreloc:
|
||||
extends: .debian-nonreloc
|
||||
|
|
@ -283,7 +285,7 @@ gimp-debian-nonreloc:
|
|||
- printf "\e[0Ksection_start:`date +%s`:gimp_build[collapsed=true]\r\e[0KBuilding GIMP\n"
|
||||
- meson setup _build-${RUNNER} -Dprefix="${GIMP_PREFIX}"
|
||||
-Dfile-plug-ins-test=true
|
||||
$MESON_OPTIONS
|
||||
$MESON_OPTIONS $WARN_AS_ERROR_ON_CI
|
||||
- cd _build-${RUNNER}
|
||||
- ninja
|
||||
- printf "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K\n"
|
||||
|
|
@ -342,7 +344,8 @@ deps-debian:
|
|||
image: !reference [deps-debian-nonreloc, image]
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
RELOCATABLE_OPTION: '-Drelocatable=enabled'
|
||||
RELOCATABLE_OPTION: '-Drelocatable-bundle=yes'
|
||||
#meson.build forces non-relocatable .pc. See: https://github.com/mesonbuild/meson/issues/14346
|
||||
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
|
||||
script:
|
||||
- !reference [deps-debian-nonreloc, script]
|
||||
|
|
@ -403,8 +406,8 @@ gimp-debian:
|
|||
MESON_DIST: 0
|
||||
before_script:
|
||||
- export GIMP_PREFIX="${CI_PROJECT_DIR}/_install"
|
||||
#30min is enough only if no module was updated/rebuilt, we need more time in case of module bumps
|
||||
timeout: 90m
|
||||
#40min is enough only if no module was updated/rebuilt, we need more time in case of module bumps
|
||||
timeout: 240m
|
||||
|
||||
deps-flatpak:
|
||||
extends: .flatpak
|
||||
|
|
@ -417,7 +420,7 @@ deps-flatpak:
|
|||
- flatpak-builder.log
|
||||
- babl-meson-log.txt
|
||||
- gegl-meson-log.txt
|
||||
expire_in: 2 hours
|
||||
expire_in: 4 hours
|
||||
|
||||
gimp-flatpak:
|
||||
extends: .flatpak
|
||||
|
|
@ -453,7 +456,7 @@ gimp-flatpak:
|
|||
variables:
|
||||
SNAPCRAFT_BASE_VERSION: "8_core24"
|
||||
RUNNER: x86_64_v3
|
||||
timeout: 30m
|
||||
timeout: 40m
|
||||
|
||||
deps-snap:
|
||||
extends: .snap
|
||||
|
|
@ -491,7 +494,7 @@ deps-snap:
|
|||
- _build-$RUNNER.tar
|
||||
- babl-meson-log.tar
|
||||
- gegl-meson-log.tar
|
||||
expire_in: 2 hours
|
||||
expire_in: 4 hours
|
||||
|
||||
gimp-snap:
|
||||
extends: .snap
|
||||
|
|
@ -526,7 +529,7 @@ gimp-snap:
|
|||
interruptible: true
|
||||
variables:
|
||||
INSTALLER_OPTION: '-Dwindows-installer=true'
|
||||
- if: '($CI_MERGE_REQUEST_LABELS =~ /.*Package:Microsoft Store.*/ || $CI_MERGE_REQUEST_DESCRIPTION =~ /.*Package:Microsoft Store.*/) && $CI_JOB_NAME !~ /.*eol.*/ && $CI_JOB_NAME !~ /.*installer.*/'
|
||||
- if: '($CI_MERGE_REQUEST_LABELS =~ /.*Package:Microsoft Store.*/ || $CI_MERGE_REQUEST_DESCRIPTION =~ /.*Package:Microsoft Store.*/) && $CI_JOB_NAME !~ /.*installer.*/'
|
||||
interruptible: true
|
||||
variables:
|
||||
STORE_OPTION: '-Dms-store=true'
|
||||
|
|
@ -537,11 +540,12 @@ gimp-snap:
|
|||
- if: '($GIMP_CI_WIN_INSTALLER != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_WIN_INSTALLER.*/) && $CI_JOB_NAME !~ /.*store.*/'
|
||||
variables:
|
||||
INSTALLER_OPTION: '-Dwindows-installer=true'
|
||||
- if: '($GIMP_CI_MS_STORE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_MS_STORE.*/) && $CI_JOB_NAME !~ /.*eol.*/ && $CI_JOB_NAME !~ /.*installer.*/'
|
||||
- if: '($GIMP_CI_MS_STORE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_MS_STORE.*/) && $CI_JOB_NAME !~ /.*installer.*/'
|
||||
variables:
|
||||
STORE_OPTION: '-Dms-store=true'
|
||||
- if: '($GIMP_CI_MESON_MSVC != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_MSVC.*/) && $CI_JOB_NAME !~ /.*installer.*/ && $CI_JOB_NAME !~ /.*store.*/ && $CI_JOB_NAME !~ /.*eol.*/ && $CI_JOB_NAME !~ /.*aarch64.*/'
|
||||
- if: '($GIMP_CI_MESON_MSVC != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_MSVC.*/) && $CI_JOB_NAME !~ /.*installer.*/ && $CI_JOB_NAME !~ /.*store.*/ && $CI_JOB_NAME !~ /.*aarch64.*/'
|
||||
variables:
|
||||
MSYS_ROOT: ""
|
||||
VCPKG_ROOT: "$CI_PROJECT_DIR/vcpkg"
|
||||
WARN_AS_ERROR_ON_CI: '-Dwerror=true'
|
||||
VARIANT: "-msvc"
|
||||
|
|
@ -562,23 +566,23 @@ gimp-snap:
|
|||
#meson.build forces non-relocatable .pc. See: https://github.com/mesonbuild/meson/issues/14346
|
||||
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
|
||||
before_script:
|
||||
- $GIMP_PREFIX = "$PWD\_install-$(if (-not $env:MSYSTEM_PREFIX) { $(((Get-WmiObject Win32_ComputerSystem).SystemType).Split('-')[0].Trim().ToLower()) } else { $env:MSYSTEM_PREFIX })"
|
||||
- if ("$VARIANT" -eq '-msvc') { if (-not (Test-Path $env:VCPKG_ROOT)) { git clone --depth 1 https://github.com/microsoft/vcpkg; .\vcpkg\bootstrap-vcpkg.bat }; pip install meson }
|
||||
- $GIMP_PREFIX = "$PWD\_install-$(((Get-WmiObject Win32_ComputerSystem).SystemType).Split('-')[0].Trim().ToLower())"
|
||||
- if ("$VARIANT" -eq '-msvc') { if (-not (Test-Path $env:VCPKG_ROOT)) { git clone --depth 1 https://github.com/microsoft/vcpkg; .\vcpkg\bootstrap-vcpkg.bat }; pip install --upgrade meson }
|
||||
- if ("$VARIANT" -eq '-msvc') { $VSINSTALLDIR = $(vswhere -products * -latest -property installationPath); Import-Module "$VSINSTALLDIR\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"; Enter-VsDevShell -VsInstallPath "$VSINSTALLDIR" -SkipAutomaticLocation -DevCmdArguments "-arch=$(((Get-WmiObject Win32_ComputerSystem).SystemType).Split('-')[0].Trim().ToLower())" }
|
||||
#30min is enough only on msys2 or if no vcpkg port was updated/rebuilt, we need more time in case of port bumps
|
||||
timeout: 150m
|
||||
#40min is enough only on msys2 or if no vcpkg port was updated/rebuilt, we need more time in case of port bumps
|
||||
timeout: 240m
|
||||
|
||||
.win_environ: &WIN_ENVIRON
|
||||
# See: https://testing.developer.gimp.org/core/setup/build/windows/#prepare-for-building
|
||||
- Write-Output "$([char]27)[0Ksection_start:$(Get-Date -UFormat %s -Millisecond 0):win_environ[collapsed=true]$([char]13)$([char]27)[0KPreparing build environment"
|
||||
## Build-time vars
|
||||
- $env:PKG_CONFIG_PATH = "$GIMP_PREFIX/lib/pkgconfig;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/lib/pkgconfig;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/share/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share/pkgconfig"
|
||||
- $env:XDG_DATA_DIRS = "$GIMP_PREFIX/share;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/share;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share"
|
||||
- $env:PKG_CONFIG_PATH = "$GIMP_PREFIX/lib/pkgconfig;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_HOST_TRIPLET/lib/pkgconfig;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_HOST_TRIPLET/share/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share/pkgconfig"
|
||||
- $env:XDG_DATA_DIRS = "$GIMP_PREFIX/share;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_HOST_TRIPLET/share;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share"
|
||||
## Runtime vars
|
||||
- $env:PATH = "$GIMP_PREFIX/bin;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/bin;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/bin;$env:PATH"
|
||||
- $env:GI_TYPELIB_PATH = "$GIMP_PREFIX/lib/girepository-1.0;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/lib/girepository-1.0;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/girepository-1.0"
|
||||
- $env:PATH = "$GIMP_PREFIX/bin;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_HOST_TRIPLET/bin;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/bin;$env:PATH"
|
||||
- $env:GI_TYPELIB_PATH = "$GIMP_PREFIX/lib/girepository-1.0;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_HOST_TRIPLET/lib/girepository-1.0;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/girepository-1.0"
|
||||
## MSVC-specific vars
|
||||
- if ($env:VCPKG_ROOT) { $env:CC='clang-cl'; $env:CXX='clang-cl'; $env:PKG_CONFIG="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\pkgconf\pkgconf.exe"; $env:PATH="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\glib;$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\gdk-pixbuf;$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\gettext\bin;$(Resolve-Path $env:VCPKG_ROOT\downloads\tools\perl\*.*\perl\bin -ErrorAction SilentlyContinue);$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\libxml2;$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\libxslt;$env:PATH"; $env:GIO_MODULE_DIR="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\plugins\glib-networking" }
|
||||
- if ($env:VCPKG_ROOT) { $env:CC='clang-cl'; $env:CXX='clang-cl'; $env:PKG_CONFIG="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_HOST_TRIPLET\tools\pkgconf\pkgconf.exe"; $env:PATH="$((Get-ChildItem "$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_HOST_TRIPLET\tools" -Recurse -Filter *.exe -ErrorAction SilentlyContinue | Select-Object -ExpandProperty DirectoryName -Unique) -join ';');$(Resolve-Path $env:VCPKG_ROOT\downloads\tools\perl\*.*\perl\bin -ErrorAction SilentlyContinue);$env:PATH"; $env:GIO_MODULE_DIR="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_HOST_TRIPLET\plugins\glib-networking"; $env:LIBHEIF_PLUGIN_PATH="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_HOST_TRIPLET\plugins\libheif" }
|
||||
- Write-Output "$([char]27)[0Ksection_end:$(Get-Date -UFormat %s -Millisecond 0):win_environ$([char]13)$([char]27)[0K"
|
||||
|
||||
deps-win:
|
||||
|
|
@ -591,7 +595,7 @@ deps-win:
|
|||
- _install-*/
|
||||
- babl/_build-*/meson-logs/meson-log.txt
|
||||
- gegl/_build-*/meson-logs/meson-log.txt
|
||||
expire_in: 2 hours
|
||||
expire_in: 4 hours
|
||||
|
||||
gimp-win:
|
||||
extends: .win
|
||||
|
|
@ -617,35 +621,6 @@ gimp-win:
|
|||
expire_in: 2 days
|
||||
|
||||
|
||||
## WINDOWS x86 legacy CI (native MSYS2) ##
|
||||
.win-eol:
|
||||
extends: .win
|
||||
parallel:
|
||||
matrix:
|
||||
- RUNNER: [win32-ps]
|
||||
variables:
|
||||
MSYSTEM_PREFIX: mingw32
|
||||
MINGW_PACKAGE_PREFIX: mingw-w64-i686
|
||||
|
||||
deps-win-eol:
|
||||
extends: .win-eol
|
||||
stage: !reference [deps-win, stage]
|
||||
script:
|
||||
- !reference [deps-win, script]
|
||||
artifacts: !reference [deps-win, artifacts]
|
||||
|
||||
gimp-win-eol:
|
||||
extends: .win-eol
|
||||
needs: ["deps-win-eol"]
|
||||
stage: !reference [gimp-win, stage]
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
script:
|
||||
- $env:PATH = "C:/msys64/usr/bin;" + $env:PATH
|
||||
- !reference [gimp-win, script]
|
||||
artifacts: !reference [gimp-win, artifacts]
|
||||
|
||||
|
||||
## macOS pipelines (MacPorts) ##
|
||||
.macos-inhouse:
|
||||
extends: .default
|
||||
|
|
@ -659,22 +634,27 @@ gimp-win-eol:
|
|||
variables:
|
||||
OPT_PREFIX: /opt/macports
|
||||
DMG_OPTION: '-Ddmg=true'
|
||||
- if: '($GIMP_CI_MESON_APPLECLANG != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_APPLECLANG.*/) && $CI_JOB_NAME !~ /.*-part.*/ && $CI_JOB_NAME !~ /.*dist-mac-.*/'
|
||||
- if: '($GIMP_CI_MESON_APPLECLANG != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_APPLECLANG.*/) && $CI_JOB_NAME !~ /.*x86_64.*/ && $CI_JOB_NAME !~ /.*dist-mac-.*/'
|
||||
variables:
|
||||
OPT_PREFIX: /opt/homebrew
|
||||
WARN_AS_ERROR_ON_CI: '-Dwerror=true'
|
||||
VARIANT: -homebrew
|
||||
parallel:
|
||||
matrix:
|
||||
- ARCH: [arm64, x86_64]
|
||||
tags:
|
||||
- macos
|
||||
- marathon
|
||||
variables:
|
||||
ARCH: arm64
|
||||
ORKA_RUNNER: tahoe-1
|
||||
#meson.build forces non-relocatable .pc. See: https://github.com/mesonbuild/meson/issues/14346
|
||||
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
|
||||
before_script:
|
||||
- export GIMP_PREFIX="$PWD/_install-$(uname -m)"
|
||||
- export GIMP_PREFIX="$PWD/_install-$ARCH"
|
||||
- export PATH="$OPT_PREFIX/bin:$PATH"
|
||||
timeout: 4h
|
||||
- if [ "$ARCH" = 'x86_64' ]; then softwareupdate --install-rosetta --agree-to-license; fi
|
||||
#4h is enough only on arm64 or if no macports port was updated/rebuilt, we need more time in case of port bumps
|
||||
timeout: 24h
|
||||
|
||||
.macos_environ: &MAC_ENVIRON
|
||||
- printf "\e[0Ksection_start:`date +%s`:macos_environ[collapsed=true]\r\e[0KPreparing build environment\n"
|
||||
|
|
@ -690,36 +670,39 @@ deps-macos-inhouse:
|
|||
extends: .macos-inhouse
|
||||
stage: dependencies
|
||||
cache:
|
||||
- key: $CI_PROJECT_NAMESPACE-$ARCH
|
||||
- key: $CI_PROJECT_NAMESPACE-$ARCH${VARIANT}
|
||||
unprotect: true
|
||||
paths:
|
||||
- macports-cached-$ARCH
|
||||
script:
|
||||
# Do not call sh since it is old bash on macOS, not the default zsh
|
||||
- zsh build/macos/1_build-deps-macports.sh
|
||||
- arch -${ARCH} zsh build/macos/1_build-deps-macports.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- _install-*
|
||||
# The full build dir is needed due to its .o for .dSYM creation on next job
|
||||
- babl/_build-*
|
||||
- gegl/_build-*
|
||||
expire_in: 2 hours
|
||||
expire_in: 4 hours
|
||||
|
||||
gimp-macos-inhouse:
|
||||
extends: .macos-inhouse
|
||||
needs: ["deps-macos-inhouse"]
|
||||
needs:
|
||||
- job: deps-macos-inhouse
|
||||
#to allow running Homebrew builds
|
||||
optional: true
|
||||
stage: build
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
cache:
|
||||
- key: $CI_PROJECT_NAMESPACE-$ARCH
|
||||
- key: $CI_PROJECT_NAMESPACE-$ARCH${VARIANT}
|
||||
unprotect: true
|
||||
paths:
|
||||
- macports-cached-$ARCH
|
||||
policy: pull
|
||||
script:
|
||||
# Do not call sh since it is old bash on macOS, not the default zsh
|
||||
- zsh build/macos/2_build-gimp-macports.sh
|
||||
- arch -${ARCH} zsh build/macos/2_build-gimp-macports.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- gimp-*.app
|
||||
|
|
@ -774,7 +757,6 @@ file-plug-in-tests:
|
|||
reports:
|
||||
junit: "_log/import-tests.xml"
|
||||
expire_in: 2 days
|
||||
timeout: 30m
|
||||
|
||||
meson-health:
|
||||
extends: .default
|
||||
|
|
@ -812,6 +794,7 @@ branches-check:
|
|||
extends: .default
|
||||
rules:
|
||||
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS == null && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH'
|
||||
interruptible: true
|
||||
stage: analysis
|
||||
variables:
|
||||
GIT_DEPTH: "0"
|
||||
|
|
@ -838,6 +821,33 @@ cppcheck:
|
|||
- report/
|
||||
expire_in: 8 days
|
||||
|
||||
issue-bot:
|
||||
rules:
|
||||
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" && ($GIMP_CI_MESON_CLANG != null || $GIMP_CI_MESON_MSVC != null || $GIMP_CI_MESON_APPLECLANG != null)
|
||||
when: on_failure
|
||||
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" && ($GIMP_CI_RASTER_ICONS != null || $GIMP_CI_CPPCHECK != null)
|
||||
when: on_failure
|
||||
needs:
|
||||
- job: gimp-debian-nonreloc
|
||||
optional: true
|
||||
- job: gimp-win
|
||||
optional: true
|
||||
- job: gimp-macos-inhouse
|
||||
optional: true
|
||||
- job: cppcheck
|
||||
optional: true
|
||||
stage: analysis
|
||||
image: registry.gitlab.com/gitlab-org/distribution/issue-bot:latest
|
||||
variables:
|
||||
ISSUE_BOT_API_TOKEN: $WILBER_BOT
|
||||
script:
|
||||
- LATEST_API_TOKEN=20270330
|
||||
- printf "(INFO) Token expire date is $(date -d "$LATEST_API_TOKEN" +"%x")\n"
|
||||
- if [ "$(date +%Y%m%d)" -ge "$LATEST_API_TOKEN" ]; then
|
||||
printf '\033[31m(ERROR)\033[0m API token for bot expired. Please ask the maintainer to issue a new one then save its value on WILBER_BOT protected var.\n';
|
||||
exit 1;
|
||||
fi
|
||||
- /issue-bot
|
||||
|
||||
## Ready-to-distribute ##
|
||||
|
||||
|
|
@ -938,7 +948,8 @@ include:
|
|||
project: GNOME/citemplates
|
||||
file: flatpak/flatpak_ci_initiative.yml
|
||||
#flatpak_ci_initiative.yml is extremely pervasive. See: https://gitlab.gnome.org/GNOME/citemplates/-/issues/35
|
||||
ref: 42fbc2526a7680b6a4f284a210e63e3973ea6dae
|
||||
#keep 'ref:' synced with submission section of build/linux/flatpak/3_dist-gimp-flatpakbuilder.sh
|
||||
ref: b8e6f8f5a6d2f39b2852d165cc2ab3550ac9e3fb
|
||||
|
||||
dist-flatpak-weekly:
|
||||
extends:
|
||||
|
|
@ -983,7 +994,6 @@ dist-installer-weekly:
|
|||
- job: gimp-win
|
||||
#to allow running outside 'GNOME/gimp' namespace (on MRs)
|
||||
optional: true
|
||||
- job: gimp-win-eol
|
||||
stage: distribution
|
||||
tags:
|
||||
- win32-ps
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ help in that regard:
|
|||
|
||||
15. GObject Introspection requires the following dependencies to be
|
||||
built and installed with introspection as well: babl, cairo,
|
||||
GdkPixbuf, GEGL, GIO, GLib, GObject and GTK.
|
||||
GdkPixbuf, GEGL, GIO, GLib, GObject, GTK and Gexiv2.
|
||||
|
||||
16. Windows builds can now generate backtrace logs upon a crash.
|
||||
The logs will be available in: %APPDATA%\GIMP\@GIMP_APP_VERSION@\CrashLog\
|
||||
|
|
@ -282,7 +282,8 @@ help in that regard:
|
|||
mypaint-brushes-2.0
|
||||
pangocairo @PANGO_REQUIRED_VERSION@
|
||||
poppler-data @POPPLER_DATA_REQUIRED_VERSION@
|
||||
PyGObject
|
||||
Pycairo
|
||||
PyGObject @PYGOBJECT_REQUIRED_VERSION@
|
||||
Python @PYTHON3_REQUIRED_VERSION@
|
||||
zlib
|
||||
|
||||
|
|
@ -310,7 +311,6 @@ help in that regard:
|
|||
openexr @OPENEXR_REQUIRED_VERSION@ OpenEXR
|
||||
OpenJPEG @OPENJPEG_REQUIRED_VERSION@ JPEG 2000
|
||||
qoi - QOI
|
||||
webkit @WEBKITGTK_REQUIRED_VERSION@ Help browser & webpage
|
||||
vala - Vala plug-ins
|
||||
|
||||
24. Summary of optional runtime dependencies:
|
||||
|
|
|
|||
1128
NEWS.pre-3-2
Normal file
1128
NEWS.pre-3-2
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -65,8 +65,19 @@ main (int argc,
|
|||
if (AttachConsole (ATTACH_PARENT_PROCESS) != 0 && ! g_getenv ("TERM") && ! g_getenv ("SHELL"))
|
||||
{
|
||||
/* 'r' is needed to prevent interleaving and '+' to support colors */
|
||||
#ifndef _UCRT
|
||||
freopen ("CONOUT$", "r+", stdout);
|
||||
freopen ("CONOUT$", "r+", stderr);
|
||||
#else
|
||||
FILE* fileOut;
|
||||
FILE* fileErr;
|
||||
|
||||
errno_t errOut = freopen_s (&fileOut, "CONOUT$", "r+", stdout);
|
||||
errno_t errErr = freopen_s (&fileErr, "CONOUT$", "r+", stderr);
|
||||
|
||||
if (errOut != 0 || errErr != 0)
|
||||
g_warning ("Failed to redirect streams to CONOUT$. stdout: %d, stderr: %d", errOut, errErr);
|
||||
#endif
|
||||
_flushall ();
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,11 +37,15 @@
|
|||
#include "core/gimplayer.h"
|
||||
#include "core/gimplayer-new.h"
|
||||
#include "core/gimplayermask.h"
|
||||
#include "core/gimplinklayer.h"
|
||||
#include "core/gimplist.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
|
||||
#include "path/gimppath-import.h"
|
||||
#include "path/gimpvectorlayer.h"
|
||||
|
||||
#include "text/gimptextlayer.h"
|
||||
|
||||
#include "widgets/gimpclipboard.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
|
@ -586,7 +590,60 @@ edit_fill_cmd_callback (GimpAction *action,
|
|||
gimp_fill_options_get_undo_desc (options));
|
||||
|
||||
for (iter = drawables; iter; iter = iter->next)
|
||||
gimp_drawable_edit_fill (iter->data, options, NULL);
|
||||
{
|
||||
/* Skip layers that can't be filled, like pixel-locked layers */
|
||||
if (gimp_item_is_content_locked (GIMP_ITEM (iter->data), NULL) ||
|
||||
gimp_item_is_link_layer (GIMP_ITEM (iter->data)))
|
||||
continue;
|
||||
|
||||
if (gimp_item_is_text_layer (iter->data) ||
|
||||
gimp_item_is_vector_layer (iter->data))
|
||||
{
|
||||
GimpPattern *pattern = NULL;
|
||||
GeglColor *color = NULL;
|
||||
|
||||
if (gimp_fill_options_get_style (options) == GIMP_FILL_STYLE_FG_COLOR)
|
||||
color = gimp_context_get_foreground (GIMP_CONTEXT (options));
|
||||
else if (gimp_fill_options_get_style (options) == GIMP_FILL_STYLE_BG_COLOR)
|
||||
color = gimp_context_get_background (GIMP_CONTEXT (options));
|
||||
else
|
||||
pattern = gimp_context_get_pattern (GIMP_CONTEXT (options));
|
||||
|
||||
if (color)
|
||||
{
|
||||
if (gimp_item_is_vector_layer (iter->data))
|
||||
{
|
||||
gimp_vector_layer_set (GIMP_VECTOR_LAYER (iter->data),
|
||||
NULL,
|
||||
"fill-style",
|
||||
GIMP_CUSTOM_STYLE_SOLID_COLOR,
|
||||
"fill-color",
|
||||
color, NULL);
|
||||
gimp_vector_layer_refresh (iter->data);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_text_layer_set (iter->data, NULL, "color", color,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
else if (pattern &&
|
||||
gimp_item_is_vector_layer (iter->data))
|
||||
{
|
||||
gimp_vector_layer_set (GIMP_VECTOR_LAYER (iter->data), NULL,
|
||||
"fill-style",
|
||||
GIMP_CUSTOM_STYLE_PATTERN,
|
||||
"fill-pattern",
|
||||
pattern,
|
||||
NULL);
|
||||
gimp_vector_layer_refresh (iter->data);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_drawable_edit_fill (iter->data, options, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
gimp_image_undo_group_end (image);
|
||||
gimp_image_flush (image);
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ gradient_editor_left_color_type_cmd_callback (GimpAction *action,
|
|||
gimp_gradient_editor_get_selection (editor, &gradient, &left, NULL);
|
||||
|
||||
if (gradient &&
|
||||
color_type >= 0 &&
|
||||
(gint) color_type >= 0 &&
|
||||
color_type !=
|
||||
gimp_gradient_segment_get_left_color_type (gradient, left))
|
||||
{
|
||||
|
|
@ -197,7 +197,7 @@ gradient_editor_right_color_type_cmd_callback (GimpAction *action,
|
|||
gimp_gradient_editor_get_selection (editor, &gradient, NULL, &right);
|
||||
|
||||
if (gradient &&
|
||||
color_type >= 0 &&
|
||||
(gint) color_type >= 0 &&
|
||||
color_type !=
|
||||
gimp_gradient_segment_get_right_color_type (gradient, right))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -321,15 +321,15 @@ app_run (const gchar *full_prog_name,
|
|||
if (gimp->be_verbose)
|
||||
g_print ("EXIT: %s\n", G_STRFUNC);
|
||||
|
||||
while (g_main_context_pending (NULL))
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
|
||||
g_clear_object (&app);
|
||||
|
||||
gimp_gegl_exit (gimp);
|
||||
|
||||
errors_exit ();
|
||||
|
||||
while (g_main_context_pending (NULL))
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
|
||||
g_object_unref (gimp);
|
||||
|
||||
gimp_debug_instances ();
|
||||
|
|
|
|||
|
|
@ -181,8 +181,9 @@ dump_gimprc_system (GimpConfig *rc,
|
|||
}
|
||||
else if (! strcmp (prop_spec->name, "mypaint-brush-path"))
|
||||
{
|
||||
gchar *path = g_strdup_printf ("@mypaint_brushes_dir@%s"
|
||||
gchar *path = g_strdup_printf ("%s%s"
|
||||
"~/.mypaint/brushes",
|
||||
MYPAINT_BRUSHES_DIR,
|
||||
G_SEARCHPATH_SEPARATOR_S);
|
||||
|
||||
gimp_config_writer_open (writer, "mypaint-brush-path");
|
||||
|
|
@ -215,7 +216,7 @@ static const gchar man_page_header[] =
|
|||
".B gimprc\n"
|
||||
"file is a configuration file read by GIMP when it starts up. There\n"
|
||||
"are two of these: one system-wide one stored in\n"
|
||||
"@gimpsysconfdir@/gimprc and a per-user @manpage_gimpdir@/gimprc\n"
|
||||
"%s/gimprc and a per-user %s/gimprc\n"
|
||||
"which may override system settings.\n"
|
||||
"\n"
|
||||
"Comments are introduced by a hash sign (#), and continue until the end\n"
|
||||
|
|
@ -257,22 +258,22 @@ static const gchar *man_page_path =
|
|||
".TP\n"
|
||||
".I gimp_dir\n"
|
||||
"The personal gimp directory which is set to the value of the environment\n"
|
||||
"variable GIMP3_DIRECTORY or to @manpage_gimpdir@.\n"
|
||||
"variable GIMP3_DIRECTORY or to %s.\n"
|
||||
".TP\n"
|
||||
".I gimp_data_dir\n"
|
||||
"Base for paths to shareable data, which is set to the value of the\n"
|
||||
"environment variable GIMP3_DATADIR or to the compiled-in default value\n"
|
||||
"@gimpdatadir@.\n"
|
||||
"%s.\n"
|
||||
".TP\n"
|
||||
".I gimp_plug_in_dir\n"
|
||||
"Base to paths for architecture-specific plug-ins and modules, which is set\n"
|
||||
"to the value of the environment variable GIMP3_PLUGINDIR or to the\n"
|
||||
"compiled-in default value @gimpplugindir@.\n"
|
||||
"compiled-in default value %s.\n"
|
||||
".TP\n"
|
||||
".I gimp_sysconf_dir\n"
|
||||
"Path to configuration files, which is set to the value of the environment\n"
|
||||
"variable GIMP3_SYSCONFDIR or to the compiled-in default value \n"
|
||||
"@gimpsysconfdir@.\n"
|
||||
"%s.\n"
|
||||
".TP\n"
|
||||
".I gimp_cache_dir\n"
|
||||
"Path to cached files, which is set to the value of the environment\n"
|
||||
|
|
@ -286,10 +287,10 @@ static const gchar *man_page_path =
|
|||
static const gchar man_page_footer[] =
|
||||
".SH FILES\n"
|
||||
".TP\n"
|
||||
".I @gimpsysconfdir@/gimprc\n"
|
||||
".I %s/gimprc\n"
|
||||
"System-wide configuration file\n"
|
||||
".TP\n"
|
||||
".I @manpage_gimpdir@/gimprc\n"
|
||||
".I %s/gimprc\n"
|
||||
"Per-user configuration file\n"
|
||||
"\n"
|
||||
".SH \"SEE ALSO\"\n"
|
||||
|
|
@ -307,7 +308,9 @@ dump_gimprc_manpage (GimpConfig *rc,
|
|||
guint i;
|
||||
|
||||
g_output_stream_printf (output, NULL, NULL, NULL,
|
||||
"%s", man_page_header);
|
||||
man_page_header,
|
||||
GIMPSYSCONFDIR,
|
||||
"$XDG_CONFIG_HOME" G_DIR_SEPARATOR_S GIMPDIR G_DIR_SEPARATOR_S GIMP_USER_VERSION);
|
||||
|
||||
klass = G_OBJECT_GET_CLASS (rc);
|
||||
property_specs = g_object_class_list_properties (klass, &n_property_specs);
|
||||
|
|
@ -353,8 +356,9 @@ dump_gimprc_manpage (GimpConfig *rc,
|
|||
}
|
||||
else if (! strcmp (prop_spec->name, "mypaint-brush-path"))
|
||||
{
|
||||
gchar *path = g_strdup_printf ("@mypaint_brushes_dir@%s"
|
||||
gchar *path = g_strdup_printf ("%s%s"
|
||||
"~/.mypaint/brushes",
|
||||
MYPAINT_BRUSHES_DIR,
|
||||
G_SEARCHPATH_SEPARATOR_S);
|
||||
|
||||
gimp_config_writer_open (writer, "mypaint-brush-path");
|
||||
|
|
@ -389,9 +393,15 @@ dump_gimprc_manpage (GimpConfig *rc,
|
|||
g_free (property_specs);
|
||||
|
||||
g_output_stream_printf (output, NULL, NULL, NULL,
|
||||
"%s", man_page_path);
|
||||
man_page_path,
|
||||
"$XDG_CONFIG_HOME" G_DIR_SEPARATOR_S GIMPDIR G_DIR_SEPARATOR_S GIMP_USER_VERSION,
|
||||
GIMPDATADIR,
|
||||
GIMPPLUGINDIR,
|
||||
GIMPSYSCONFDIR);
|
||||
g_output_stream_printf (output, NULL, NULL, NULL,
|
||||
"%s", man_page_footer);
|
||||
man_page_footer,
|
||||
GIMPSYSCONFDIR,
|
||||
"$XDG_CONFIG_HOME" G_DIR_SEPARATOR_S GIMPDIR G_DIR_SEPARATOR_S GIMP_USER_VERSION);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -198,8 +198,8 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
|
|||
GIMP_CONFIG_PROP_STRING (object_class, PROP_PREV_LANGUAGE,
|
||||
"prev-language",
|
||||
"Language used in previous run",
|
||||
NULL, NULL,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
PREV_LANGUAGE_BLURB,
|
||||
NULL, GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
/* This is the version of the config files, which must map to the
|
||||
* version of GIMP. It is used right now only to detect the last run
|
||||
|
|
@ -682,7 +682,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
|
|||
GIMP_CONFIG_PROP_STRING (object_class, PROP_LAST_RELEASE_COMMENT,
|
||||
"last-release-comment",
|
||||
"Comment for last release",
|
||||
LAST_KNOWN_RELEASE_BLURB,
|
||||
LAST_RELEASE_COMMENT_BLURB,
|
||||
NULL,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
|
|
|
|||
|
|
@ -525,7 +525,7 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
|
|||
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_SHOW_WELCOME_DIALOG,
|
||||
"show-welcome-dialog",
|
||||
"Show Welcome Dialog each time",
|
||||
NULL, TRUE,
|
||||
SHOW_WELCOME_DIALOG_BLURB, TRUE,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT |
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
|
|
|||
|
|
@ -20,6 +20,15 @@ _("When enabled, an image will become the active image when its image " \
|
|||
#define DYNAMICS_PATH_BLURB \
|
||||
_("Sets the dynamics search path.")
|
||||
|
||||
#define PREV_LANGUAGE_BLURB \
|
||||
_("Specifies the language the user interface was previously displayed in.")
|
||||
|
||||
#define LAST_RELEASE_COMMENT_BLURB \
|
||||
_("The comment for the last known release.")
|
||||
|
||||
#define SHOW_WELCOME_DIALOG_BLURB \
|
||||
_("Show a welcome dialog when GIMP starts.")
|
||||
|
||||
#define DYNAMICS_PATH_WRITABLE_BLURB ""
|
||||
|
||||
#define TOOL_PRESET_PATH_BLURB \
|
||||
|
|
@ -73,7 +82,7 @@ _("Context-dependent mouse pointers are helpful. They are enabled by " \
|
|||
|
||||
#define DEFAULT_TOOL_PRESET_BLURB \
|
||||
"Specify a default tool preset. The tool preset is searched for in the " \
|
||||
"specified tool prests path."
|
||||
"specified tool presets path."
|
||||
|
||||
#define CUSTOM_TITLE_BAR_BLURB \
|
||||
_("Merge menu and title bar (client-side decoration)")
|
||||
|
|
|
|||
|
|
@ -1224,6 +1224,7 @@ gimp_undo_type_get_type (void)
|
|||
{ GIMP_UNDO_GROUP_EDIT_PASTE, "GIMP_UNDO_GROUP_EDIT_PASTE", "group-edit-paste" },
|
||||
{ GIMP_UNDO_GROUP_EDIT_CUT, "GIMP_UNDO_GROUP_EDIT_CUT", "group-edit-cut" },
|
||||
{ GIMP_UNDO_GROUP_TEXT, "GIMP_UNDO_GROUP_TEXT", "group-text" },
|
||||
{ GIMP_UNDO_GROUP_VECTOR, "GIMP_UNDO_GROUP_VECTOR", "group-vector" },
|
||||
{ GIMP_UNDO_GROUP_TRANSFORM, "GIMP_UNDO_GROUP_TRANSFORM", "group-transform" },
|
||||
{ GIMP_UNDO_GROUP_PAINT, "GIMP_UNDO_GROUP_PAINT", "group-paint" },
|
||||
{ GIMP_UNDO_GROUP_PARASITE_ATTACH, "GIMP_UNDO_GROUP_PARASITE_ATTACH", "group-parasite-attach" },
|
||||
|
|
@ -1339,6 +1340,7 @@ gimp_undo_type_get_type (void)
|
|||
{ GIMP_UNDO_GROUP_EDIT_PASTE, NC_("undo-type", "Paste"), NULL },
|
||||
{ GIMP_UNDO_GROUP_EDIT_CUT, NC_("undo-type", "Cut"), NULL },
|
||||
{ GIMP_UNDO_GROUP_TEXT, NC_("undo-type", "Text"), NULL },
|
||||
{ GIMP_UNDO_GROUP_VECTOR, NC_("undo-type", "Vector"), NULL },
|
||||
{ GIMP_UNDO_GROUP_TRANSFORM, NC_("undo-type", "Transform"), NULL },
|
||||
{ GIMP_UNDO_GROUP_PAINT, NC_("undo-type", "Paint"), NULL },
|
||||
{ GIMP_UNDO_GROUP_PARASITE_ATTACH, NC_("undo-type", "Attach parasite"), NULL },
|
||||
|
|
|
|||
|
|
@ -571,6 +571,7 @@ typedef enum /*< pdb-skip >*/
|
|||
GIMP_UNDO_GROUP_EDIT_PASTE, /*< desc="Paste" >*/
|
||||
GIMP_UNDO_GROUP_EDIT_CUT, /*< desc="Cut" >*/
|
||||
GIMP_UNDO_GROUP_TEXT, /*< desc="Text" >*/
|
||||
GIMP_UNDO_GROUP_VECTOR, /*< desc="Vector" >*/
|
||||
GIMP_UNDO_GROUP_TRANSFORM, /*< desc="Transform" >*/
|
||||
GIMP_UNDO_GROUP_PAINT, /*< desc="Paint" >*/
|
||||
GIMP_UNDO_GROUP_PARASITE_ATTACH, /*< desc="Attach parasite" >*/
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
/* former base/ defines */
|
||||
|
||||
#define MAX_CHANNELS 4
|
||||
#define MAX_CHANNELS 5
|
||||
|
||||
#define RED 0
|
||||
#define GREEN 1
|
||||
|
|
|
|||
|
|
@ -38,6 +38,10 @@
|
|||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <spawn.h>
|
||||
#endif
|
||||
|
||||
#include "core-types.h"
|
||||
|
||||
#include "gimp-spawn.h"
|
||||
|
|
@ -167,7 +171,7 @@ gimp_spawn_async (gchar **argv,
|
|||
g_return_val_if_fail (argv != NULL, FALSE);
|
||||
g_return_val_if_fail (argv[0] != NULL, FALSE);
|
||||
|
||||
#ifdef HAVE_VFORK
|
||||
#if defined(HAVE_VFORK) && !defined(__APPLE__)
|
||||
if (flags == (G_SPAWN_LEAVE_DESCRIPTORS_OPEN |
|
||||
G_SPAWN_DO_NOT_REAP_CHILD |
|
||||
G_SPAWN_CHILD_INHERITS_STDIN))
|
||||
|
|
@ -232,7 +236,36 @@ gimp_spawn_async (gchar **argv,
|
|||
return TRUE;
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_VFORK */
|
||||
#elif defined(__APPLE__)
|
||||
if (flags == (G_SPAWN_LEAVE_DESCRIPTORS_OPEN |
|
||||
G_SPAWN_DO_NOT_REAP_CHILD |
|
||||
G_SPAWN_CHILD_INHERITS_STDIN))
|
||||
{
|
||||
pid_t pid;
|
||||
int status;
|
||||
extern char **environ;
|
||||
char **child_env = envp ? envp : environ;
|
||||
|
||||
/* posix_spawn combines fork and exec */
|
||||
status = posix_spawn (&pid, argv[0], NULL, NULL, argv, child_env);
|
||||
|
||||
if (status != 0)
|
||||
{
|
||||
g_set_error (error,
|
||||
G_SPAWN_ERROR,
|
||||
exec_err_to_g_error (status),
|
||||
_("Failed to execute child process “%s” (%s)"),
|
||||
argv[0],
|
||||
g_strerror (status));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (child_pid) *child_pid = pid;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
return g_spawn_async (NULL, argv, envp, flags, NULL, NULL, child_pid, error);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -398,6 +398,7 @@ user_install_detect_old (GimpUserInstall *install,
|
|||
migrate = g_file_test (snap_dir, G_FILE_TEST_IS_DIR);
|
||||
|
||||
if (! migrate &&
|
||||
g_getenv ("SNAP") != NULL &&
|
||||
g_file_test (g_getenv ("SNAP"), G_FILE_TEST_IS_DIR) &&
|
||||
g_getenv ("SNAP_USER_DATA") != NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -165,17 +165,17 @@ gimp_get_default_language (const gchar *category)
|
|||
|
||||
#ifdef G_OS_WIN32
|
||||
|
||||
p = getenv ("LC_ALL");
|
||||
p = (gchar *) g_getenv ("LC_ALL");
|
||||
if (p != NULL)
|
||||
lang = g_strdup (p);
|
||||
else
|
||||
{
|
||||
p = getenv ("LANG");
|
||||
p = (gchar *) g_getenv ("LANG");
|
||||
if (p != NULL)
|
||||
lang = g_strdup (p);
|
||||
else
|
||||
{
|
||||
p = getenv (category);
|
||||
p = (gchar *) g_getenv (category);
|
||||
if (p != NULL)
|
||||
lang = g_strdup (p);
|
||||
else
|
||||
|
|
@ -428,7 +428,11 @@ unescape_gstring (GString *string)
|
|||
{
|
||||
gchar buf[8];
|
||||
char_str (l, buf);
|
||||
#ifndef _UCRT
|
||||
strcpy (to, buf);
|
||||
#else
|
||||
strcpy_s (to, 8, buf);
|
||||
#endif
|
||||
to += strlen (buf) - 1;
|
||||
from = end;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
#include "core-types.h"
|
||||
|
||||
#include "gimpcoreapp.h"
|
||||
|
||||
#include "config/gimprc.h"
|
||||
|
||||
#include "gegl/gimp-babl.h"
|
||||
|
|
@ -1273,8 +1275,9 @@ gimp_image_opened (Gimp *gimp,
|
|||
}
|
||||
|
||||
GFile *
|
||||
gimp_get_temp_file (Gimp *gimp,
|
||||
const gchar *extension)
|
||||
gimp_get_temp_file (Gimp *gimp,
|
||||
const gchar *extension,
|
||||
GError **error)
|
||||
{
|
||||
static gint id = 0;
|
||||
static gint pid;
|
||||
|
|
@ -1293,13 +1296,24 @@ gimp_get_temp_file (Gimp *gimp,
|
|||
basename = g_strdup_printf ("gimp-temp-%d%d", pid, id++);
|
||||
|
||||
dir = gimp_file_new_for_config_path (GIMP_GEGL_CONFIG (gimp->config)->temp_path,
|
||||
NULL);
|
||||
error);
|
||||
if (dir == NULL)
|
||||
{
|
||||
g_free (basename);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (! g_file_query_exists (dir, NULL))
|
||||
{
|
||||
/* Try to make the temp directory if it doesn't exist.
|
||||
* Ignore any error.
|
||||
*/
|
||||
g_file_make_directory_with_parents (dir, NULL, NULL);
|
||||
if (! g_file_make_directory_with_parents (dir, NULL, error))
|
||||
{
|
||||
g_free (basename);
|
||||
g_object_unref (dir);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
file = g_file_get_child (dir, basename);
|
||||
g_free (basename);
|
||||
|
|
@ -1356,9 +1370,20 @@ gimp_exit_idle_cleanup_stray_images (Gimp *gimp)
|
|||
{
|
||||
GimpImage *image = image_iter->data;
|
||||
|
||||
/* TODO: localize after string freeze. */
|
||||
g_printerr ("INFO: a stray image seems to have been left around by a plug-in: \"%s\"",
|
||||
gimp_image_get_display_name (image));
|
||||
/* Plug-in developers are expected to free the images they
|
||||
* created, unless they add a display (while in GUI mode), in
|
||||
* which case the user gets ownership of the image and it will be
|
||||
* freed as any other image by the GUI.
|
||||
* On the other hand, images created from command lines are very
|
||||
* likely to still exist when the software exits, if it was closed
|
||||
* by the --quit argument, or run without an interface. This is
|
||||
* normal use case.
|
||||
*/
|
||||
if (! gimp_image_get_from_command_line (image) ||
|
||||
(! gimp->no_interface && ! gimp_core_app_get_quit (GIMP_CORE_APP (gimp->app))))
|
||||
/* TODO: localize after string freeze. */
|
||||
g_printerr ("INFO: a stray image seems to have been left around by a plug-in: \"%s\"\n",
|
||||
gimp_image_get_display_name (image));
|
||||
|
||||
g_object_unref (image);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -256,7 +256,8 @@ void gimp_image_opened (Gimp *gimp,
|
|||
GFile *file);
|
||||
|
||||
GFile * gimp_get_temp_file (Gimp *gimp,
|
||||
const gchar *extension);
|
||||
const gchar *extension,
|
||||
GError **error);
|
||||
|
||||
GimpDataFactory *
|
||||
gimp_get_data_factory (Gimp *gimp,
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ gimp_backtrace_exception_handler (PEXCEPTION_POINTERS info)
|
|||
|
||||
if (info->ExceptionRecord != NULL &&
|
||||
info->ExceptionRecord->ExceptionCode == EXCEPTION_SET_THREAD_NAME &&
|
||||
info->ExceptionRecord->NumberParameters *
|
||||
info->ExceptionRecord->NumberParameters *
|
||||
sizeof (ULONG_PTR) == sizeof (THREADNAME_INFO))
|
||||
{
|
||||
THREADNAME_INFO name_info;
|
||||
|
|
@ -644,7 +644,11 @@ utf8_copy_sized (char *dest,
|
|||
if (size == 0)
|
||||
return;
|
||||
|
||||
#ifndef _UCRT
|
||||
strncpy (dest, src, size);
|
||||
#else
|
||||
strncpy_s (dest, sizeof (dest), src, size);
|
||||
#endif
|
||||
|
||||
if (dest[size - 1] != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -841,6 +841,9 @@ gimp_brush_transform_blur (GimpTempBuf *buf,
|
|||
if (rw <= 0 || rh <= 0)
|
||||
return;
|
||||
|
||||
/* Making sure we have enough elements for acc array. */
|
||||
g_return_if_fail (components <= MAX_CHANNELS);
|
||||
|
||||
sums = g_new (Sums, width * height * components);
|
||||
|
||||
gegl_parallel_distribute_range (
|
||||
|
|
@ -866,7 +869,7 @@ gimp_brush_transform_blur (GimpTempBuf *buf,
|
|||
gint weighted_sum;
|
||||
gint leading_sum;
|
||||
gint leading_weighted_sum;
|
||||
} acc[components];
|
||||
} acc[MAX_CHANNELS];
|
||||
|
||||
memset (acc, 0, sizeof (acc));
|
||||
|
||||
|
|
@ -946,7 +949,7 @@ gimp_brush_transform_blur (GimpTempBuf *buf,
|
|||
gfloat weighted_sum;
|
||||
gint leading_sum;
|
||||
gint trailing_sum;
|
||||
} acc[components];
|
||||
} acc[MAX_CHANNELS];
|
||||
|
||||
memset (acc, 0, sizeof (acc));
|
||||
|
||||
|
|
|
|||
|
|
@ -142,8 +142,6 @@ static void gimp_channel_convert_type (GimpDrawable *drawable,
|
|||
gboolean push_undo,
|
||||
GimpProgress *progress);
|
||||
static void gimp_channel_invalidate_boundary (GimpDrawable *drawable);
|
||||
static void gimp_channel_get_active_components (GimpDrawable *drawable,
|
||||
gboolean *active);
|
||||
|
||||
static void gimp_channel_set_buffer (GimpDrawable *drawable,
|
||||
gboolean push_undo,
|
||||
|
|
@ -274,7 +272,6 @@ gimp_channel_class_init (GimpChannelClass *klass)
|
|||
|
||||
drawable_class->convert_type = gimp_channel_convert_type;
|
||||
drawable_class->invalidate_boundary = gimp_channel_invalidate_boundary;
|
||||
drawable_class->get_active_components = gimp_channel_get_active_components;
|
||||
drawable_class->set_buffer = gimp_channel_set_buffer;
|
||||
|
||||
klass->boundary = gimp_channel_real_boundary;
|
||||
|
|
@ -943,15 +940,6 @@ gimp_channel_invalidate_boundary (GimpDrawable *drawable)
|
|||
channel->bounds_known = FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_channel_get_active_components (GimpDrawable *drawable,
|
||||
gboolean *active)
|
||||
{
|
||||
/* Make sure that the alpha channel is not valid. */
|
||||
active[GRAY] = TRUE;
|
||||
active[ALPHA_G] = FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_channel_set_buffer (GimpDrawable *drawable,
|
||||
gboolean push_undo,
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
#include "gimpdrawablefilter.h"
|
||||
#include "gimpdrawablefiltermask.h"
|
||||
#include "gimpfilterstack.h"
|
||||
#include "gimpgrouplayer.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpimage-colormap.h"
|
||||
#include "gimpimage-undo-push.h"
|
||||
|
|
@ -322,7 +323,6 @@ gimp_drawable_class_init (GimpDrawableClass *klass)
|
|||
klass->estimate_memsize = gimp_drawable_real_estimate_memsize;
|
||||
klass->update_all = gimp_drawable_real_update_all;
|
||||
klass->invalidate_boundary = NULL;
|
||||
klass->get_active_components = NULL;
|
||||
klass->get_active_mask = gimp_drawable_real_get_active_mask;
|
||||
klass->supports_alpha = gimp_drawable_real_supports_alpha;
|
||||
klass->convert_type = gimp_drawable_real_convert_type;
|
||||
|
|
@ -1033,21 +1033,24 @@ gimp_drawable_real_set_buffer (GimpDrawable *drawable,
|
|||
old_has_alpha = gimp_drawable_has_alpha (drawable);
|
||||
}
|
||||
|
||||
if (extent->x != 0 || extent->y != 0)
|
||||
if (! GIMP_IS_GROUP_LAYER (drawable) && (extent->x != 0 || extent->y != 0))
|
||||
{
|
||||
/* Drawable buffers are always stored with a (0, 0) origin. When
|
||||
* setting a buffer with a different origin, we will assume we
|
||||
* instead want to update the offset a bit.
|
||||
* This may happen for instance when merging filters which may
|
||||
* render in negative coordinates.
|
||||
*
|
||||
* The only exception to this is group layers. Group layer's
|
||||
* boundaries will be determined by children layers, but the
|
||||
* render may extend outside the boundaries (if children have
|
||||
* effects).
|
||||
*/
|
||||
GeglBuffer *buffer2;
|
||||
GeglRectangle extent2 = { 0, 0, extent->width, extent->height };
|
||||
|
||||
buffer2 = gegl_buffer_new (&extent2, gegl_buffer_get_format (buffer));
|
||||
gimp_gegl_buffer_copy (buffer, extent, GEGL_ABYSS_NONE, buffer2, &extent2);
|
||||
|
||||
buffer = buffer2;
|
||||
buffer = g_object_new (GEGL_TYPE_BUFFER,
|
||||
"source", buffer,
|
||||
"shift-x", extent->x,
|
||||
"shift-y", extent->y,
|
||||
NULL);
|
||||
free_buffer = TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -1063,7 +1066,10 @@ gimp_drawable_real_set_buffer (GimpDrawable *drawable,
|
|||
"buffer", gimp_drawable_get_buffer (drawable),
|
||||
NULL);
|
||||
|
||||
gimp_item_set_offset (item, bounds->x + extent->x, bounds->y + extent->y);
|
||||
if (GIMP_IS_GROUP_LAYER (drawable))
|
||||
gimp_item_set_offset (item, bounds->x, bounds->y);
|
||||
else
|
||||
gimp_item_set_offset (item, bounds->x + extent->x, bounds->y + extent->y);
|
||||
gimp_item_set_size (item,
|
||||
bounds->width ? bounds->width :
|
||||
gegl_buffer_get_width (buffer),
|
||||
|
|
@ -1357,21 +1363,6 @@ gimp_drawable_invalidate_boundary (GimpDrawable *drawable)
|
|||
drawable_class->invalidate_boundary (drawable);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_drawable_get_active_components (GimpDrawable *drawable,
|
||||
gboolean *active)
|
||||
{
|
||||
GimpDrawableClass *drawable_class;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
|
||||
g_return_if_fail (active != NULL);
|
||||
|
||||
drawable_class = GIMP_DRAWABLE_GET_CLASS (drawable);
|
||||
|
||||
if (drawable_class->get_active_components)
|
||||
drawable_class->get_active_components (drawable, active);
|
||||
}
|
||||
|
||||
GimpComponentMask
|
||||
gimp_drawable_get_active_mask (GimpDrawable *drawable)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -60,8 +60,6 @@ struct _GimpDrawableClass
|
|||
gint height);
|
||||
void (* update_all) (GimpDrawable *drawable);
|
||||
void (* invalidate_boundary) (GimpDrawable *drawable);
|
||||
void (* get_active_components) (GimpDrawable *drawable,
|
||||
gboolean *active);
|
||||
GimpComponentMask (* get_active_mask) (GimpDrawable *drawable);
|
||||
gboolean (* supports_alpha) (GimpDrawable *drawable);
|
||||
void (* convert_type) (GimpDrawable *drawable,
|
||||
|
|
@ -135,8 +133,6 @@ void gimp_drawable_update_all (GimpDrawable *drawa
|
|||
void gimp_drawable_filters_changed (GimpDrawable *drawable);
|
||||
|
||||
void gimp_drawable_invalidate_boundary (GimpDrawable *drawable);
|
||||
void gimp_drawable_get_active_components (GimpDrawable *drawable,
|
||||
gboolean *active);
|
||||
GimpComponentMask gimp_drawable_get_active_mask (GimpDrawable *drawable);
|
||||
|
||||
gboolean gimp_drawable_supports_alpha (GimpDrawable *drawable);
|
||||
|
|
|
|||
|
|
@ -89,13 +89,13 @@ gimp_drawable_undo_class_init (GimpDrawableUndoClass *klass)
|
|||
|
||||
g_object_class_install_property (object_class, PROP_X,
|
||||
g_param_spec_int ("x", NULL, NULL,
|
||||
0, GIMP_MAX_IMAGE_SIZE, 0,
|
||||
-GIMP_MAX_IMAGE_SIZE, GIMP_MAX_IMAGE_SIZE, 0,
|
||||
GIMP_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
g_object_class_install_property (object_class, PROP_Y,
|
||||
g_param_spec_int ("y", NULL, NULL,
|
||||
0, GIMP_MAX_IMAGE_SIZE, 0,
|
||||
-GIMP_MAX_IMAGE_SIZE, GIMP_MAX_IMAGE_SIZE, 0,
|
||||
GIMP_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ gimp_gradient_load (GimpContext *context,
|
|||
gint right_color_type;
|
||||
gdouble left_rgba[4];
|
||||
gdouble right_rgba[4];
|
||||
gint n_matched;
|
||||
|
||||
seg = gimp_gradient_segment_new ();
|
||||
|
||||
|
|
@ -175,9 +176,16 @@ gimp_gradient_load (GimpContext *context,
|
|||
gegl_color_set_pixel (seg->left_color, babl_format ("R'G'B'A double"), left_rgba);
|
||||
gegl_color_set_pixel (seg->right_color, babl_format ("R'G'B'A double"), right_rgba);
|
||||
|
||||
switch (sscanf (end, "%d %d %d %d",
|
||||
&type, &color,
|
||||
&left_color_type, &right_color_type))
|
||||
#ifndef _UCRT
|
||||
n_matched = sscanf (end, "%d %d %d %d",
|
||||
&type, &color,
|
||||
&left_color_type, &right_color_type);
|
||||
#else
|
||||
n_matched = sscanf_s (end, "%d %d %d %d",
|
||||
&type, &color,
|
||||
&left_color_type, &right_color_type);
|
||||
#endif
|
||||
switch (n_matched)
|
||||
{
|
||||
case 4:
|
||||
seg->left_color_type = (GimpGradientColor) left_color_type;
|
||||
|
|
|
|||
|
|
@ -37,12 +37,13 @@
|
|||
#include "gimp-atomic.h"
|
||||
#include "gimp-parallel.h"
|
||||
#include "gimpasync.h"
|
||||
#include "gimpchannel.h"
|
||||
#include "gimpdrawable.h"
|
||||
#include "gimphistogram.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpwaitable.h"
|
||||
|
||||
|
||||
#define MAX_N_COMPONENTS 4
|
||||
#define N_DERIVED_CHANNELS 2
|
||||
|
||||
#define PIXELS_PER_THREAD \
|
||||
|
|
@ -144,7 +145,7 @@ gimp_histogram_class_init (GimpHistogramClass *klass)
|
|||
|
||||
g_object_class_install_property (object_class, PROP_N_COMPONENTS,
|
||||
g_param_spec_int ("n-components", NULL, NULL,
|
||||
0, MAX_N_COMPONENTS, 0,
|
||||
0, MAX_CHANNELS, 0,
|
||||
GIMP_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (object_class, PROP_N_BINS,
|
||||
|
|
@ -1281,19 +1282,29 @@ gimp_histogram_calculate_async_callback (GimpAsync *async,
|
|||
guint
|
||||
gimp_histogram_unique_colors (GimpDrawable *drawable)
|
||||
{
|
||||
GimpImage *image;
|
||||
const Babl *format;
|
||||
guint bpp;
|
||||
GeglBufferIterator *iter;
|
||||
GHashTable *hash_table;
|
||||
guint uniques = 0;
|
||||
gboolean selection_empty;
|
||||
GeglRectangle area;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), 0);
|
||||
|
||||
image = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
format = gimp_drawable_get_format (drawable);
|
||||
bpp = babl_format_get_bytes_per_pixel (format);
|
||||
|
||||
selection_empty = gimp_channel_is_empty (gimp_image_get_mask (image));
|
||||
if (! selection_empty)
|
||||
gimp_item_mask_intersect (GIMP_ITEM (drawable), &area.x, &area.y,
|
||||
&area.width, &area.height);
|
||||
|
||||
iter = gegl_buffer_iterator_new (gimp_drawable_get_buffer (drawable),
|
||||
NULL, 0, format,
|
||||
selection_empty ? NULL : &area,
|
||||
0, format,
|
||||
GEGL_ACCESS_READ, GEGL_ABYSS_NONE, 1);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -993,19 +993,18 @@ gimp_image_convert_profile_colormap (GimpImage *image,
|
|||
GimpProgress *progress)
|
||||
{
|
||||
GimpImagePrivate *private = GIMP_IMAGE_GET_PRIVATE (image);
|
||||
GimpColorTransformFlags flags = 0;
|
||||
/*GimpColorTransformFlags flags = 0;*/
|
||||
GimpPalette *palette;
|
||||
const Babl *space;
|
||||
const Babl *format;
|
||||
|
||||
/* TODO: current implementation ignores the black point compensation
|
||||
* choice because babl doesn't have BCP support yet.
|
||||
* Previous code was using gimp_color_transform_new() which used
|
||||
* LittleCMS directly instead.
|
||||
* This should be fixed.
|
||||
if (bpc)
|
||||
/* TODO: current implementation ignores the black point compensation
|
||||
* choice because babl doesn't have BCP support yet.
|
||||
* Previous code was using gimp_color_transform_new() which used
|
||||
* LittleCMS directly instead.
|
||||
* This should be fixed.
|
||||
*/
|
||||
flags |= GIMP_COLOR_TRANSFORM_FLAGS_BLACK_POINT_COMPENSATION;
|
||||
flags |= GIMP_COLOR_TRANSFORM_FLAGS_BLACK_POINT_COMPENSATION; */
|
||||
|
||||
palette = gimp_image_get_colormap_palette (image);
|
||||
space = gimp_image_get_layer_space (image);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include "core-types.h"
|
||||
|
||||
#include "path/gimpvectorlayer.h"
|
||||
|
||||
#include "gimp.h"
|
||||
#include "gimpcontext.h"
|
||||
#include "gimpguide.h"
|
||||
|
|
@ -120,6 +122,9 @@ gimp_image_crop (GimpImage *image,
|
|||
|
||||
list = g_list_next (list);
|
||||
|
||||
if (gimp_item_is_vector_layer (item))
|
||||
continue;
|
||||
|
||||
gimp_item_translate (item, -x, -y, TRUE);
|
||||
|
||||
if (crop_layers && ! gimp_item_is_content_locked (item, NULL))
|
||||
|
|
|
|||
|
|
@ -336,6 +336,11 @@ gimp_image_duplicate_paths (GimpImage *image,
|
|||
GimpPath *path = list->data;
|
||||
GimpPath *new_path;
|
||||
|
||||
/* If the path is attached to a vector layer, it will be
|
||||
* duplicated already */
|
||||
if (gimp_path_attached_to_vector_layer (path, image))
|
||||
continue;
|
||||
|
||||
new_path = GIMP_PATH (gimp_image_duplicate_item (GIMP_ITEM (path),
|
||||
new_image));
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
#include "core-types.h"
|
||||
|
||||
#include "path/gimpvectorlayer.h"
|
||||
|
||||
#include "gimp.h"
|
||||
#include "gimpchannel.h"
|
||||
#include "gimpcontainer.h"
|
||||
|
|
@ -234,6 +236,10 @@ gimp_image_flip_full (GimpImage *image,
|
|||
while ((item = gimp_object_queue_pop (queue)))
|
||||
{
|
||||
gboolean clip = FALSE;
|
||||
|
||||
/* Non-rasterized vector layers will be transformed when their path is */
|
||||
if (gimp_item_is_vector_layer (item))
|
||||
continue;
|
||||
|
||||
if (GIMP_IS_CHANNEL (item))
|
||||
clip = clip_result;
|
||||
|
|
|
|||
|
|
@ -148,6 +148,8 @@ struct _GimpImagePrivate
|
|||
|
||||
/* Signal emission accumulator */
|
||||
GimpImageFlushAccumulator flush_accum;
|
||||
|
||||
gboolean from_command_line;
|
||||
};
|
||||
|
||||
#define GIMP_IMAGE_GET_PRIVATE(image) (((GimpImage *) (image))->priv)
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@
|
|||
|
||||
#include "text/gimptextlayer.h"
|
||||
|
||||
#include "path/gimpvectorlayer.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
|
|
@ -115,6 +117,9 @@ gimp_image_resize_with_layers (GimpImage *image,
|
|||
{
|
||||
GimpItem *item = list->data;
|
||||
|
||||
if (gimp_item_is_vector_layer (item))
|
||||
continue;
|
||||
|
||||
gimp_item_translate (item, offset_x, offset_y, TRUE);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
#include "gimpsamplepoint.h"
|
||||
|
||||
#include "path/gimppath.h"
|
||||
#include "path/gimpvectorlayer.h"
|
||||
|
||||
|
||||
static void gimp_image_rotate_item_offset (GimpImage *image,
|
||||
|
|
@ -138,6 +139,10 @@ gimp_image_rotate (GimpImage *image,
|
|||
gint off_x;
|
||||
gint off_y;
|
||||
|
||||
/* Non-rasterized vector layers will be rotated when their path is */
|
||||
if (gimp_item_is_vector_layer (item))
|
||||
continue;
|
||||
|
||||
gimp_item_get_offset (item, &off_x, &off_y);
|
||||
|
||||
gimp_item_rotate (item, context, rotate_type, center_x, center_y, FALSE);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include "core-types.h"
|
||||
|
||||
#include "path/gimpvectorlayer.h"
|
||||
|
||||
#include "gimp.h"
|
||||
#include "gimpcontainer.h"
|
||||
#include "gimpguide.h"
|
||||
|
|
@ -106,6 +108,10 @@ gimp_image_scale (GimpImage *image,
|
|||
/* Scale all layers, channels (including selection mask), and paths */
|
||||
while ((item = gimp_object_queue_pop (queue)))
|
||||
{
|
||||
/* Non-rasterized vector layers will be transformed when their path is */
|
||||
if (gimp_item_is_vector_layer (item))
|
||||
continue;
|
||||
|
||||
if (! gimp_item_scale_by_factors (item,
|
||||
img_scale_w, img_scale_h,
|
||||
interpolation_type, progress))
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include "core-types.h"
|
||||
|
||||
#include "path/gimppath.h"
|
||||
#include "path/gimpvectorlayer.h"
|
||||
|
||||
#include "gimp.h"
|
||||
#include "gimp-transform-resize.h"
|
||||
|
|
@ -284,6 +285,10 @@ gimp_image_transform (GimpImage *image,
|
|||
{
|
||||
GimpTransformResize clip = GIMP_TRANSFORM_RESIZE_ADJUST;
|
||||
|
||||
/* Non-rasterized vector layers will be transformed when their path is */
|
||||
if (gimp_item_is_vector_layer (item))
|
||||
continue;
|
||||
|
||||
if (GIMP_IS_CHANNEL (item))
|
||||
clip = clip_result;
|
||||
|
||||
|
|
|
|||
|
|
@ -909,6 +909,8 @@ gimp_image_init (GimpImage *image)
|
|||
private->flush_accum.mask_changed = FALSE;
|
||||
private->flush_accum.floating_selection_changed = FALSE;
|
||||
private->flush_accum.preview_invalidated = FALSE;
|
||||
|
||||
private->from_command_line = FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -1388,6 +1390,8 @@ static void
|
|||
gimp_image_real_mode_changed (GimpImage *image)
|
||||
{
|
||||
gimp_projectable_structure_changed (GIMP_PROJECTABLE (image));
|
||||
|
||||
gimp_color_managed_profile_changed (GIMP_COLOR_MANAGED (image));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -3694,22 +3698,6 @@ gimp_image_get_component_active (GimpImage *image,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_image_get_active_array (GimpImage *image,
|
||||
gboolean *components)
|
||||
{
|
||||
GimpImagePrivate *private;
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (image));
|
||||
g_return_if_fail (components != NULL);
|
||||
|
||||
private = GIMP_IMAGE_GET_PRIVATE (image);
|
||||
|
||||
for (i = 0; i < MAX_CHANNELS; i++)
|
||||
components[i] = private->active[i];
|
||||
}
|
||||
|
||||
GimpComponentMask
|
||||
gimp_image_get_active_mask (GimpImage *image)
|
||||
{
|
||||
|
|
@ -3794,22 +3782,6 @@ gimp_image_get_component_visible (GimpImage *image,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_image_get_visible_array (GimpImage *image,
|
||||
gboolean *components)
|
||||
{
|
||||
GimpImagePrivate *private;
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (image));
|
||||
g_return_if_fail (components != NULL);
|
||||
|
||||
private = GIMP_IMAGE_GET_PRIVATE (image);
|
||||
|
||||
for (i = 0; i < MAX_CHANNELS; i++)
|
||||
components[i] = private->visible[i];
|
||||
}
|
||||
|
||||
GimpComponentMask
|
||||
gimp_image_get_visible_mask (GimpImage *image)
|
||||
{
|
||||
|
|
@ -6438,3 +6410,28 @@ gimp_image_get_converting (GimpImage *image)
|
|||
|
||||
return private->converting;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_image_set_from_command_line (GimpImage *image,
|
||||
gboolean from_command_line)
|
||||
{
|
||||
GimpImagePrivate *private;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (image));
|
||||
|
||||
private = GIMP_IMAGE_GET_PRIVATE (image);
|
||||
|
||||
private->from_command_line = from_command_line;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_image_get_from_command_line (GimpImage *image)
|
||||
{
|
||||
GimpImagePrivate *private;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
|
||||
|
||||
private = GIMP_IMAGE_GET_PRIVATE (image);
|
||||
|
||||
return private->from_command_line;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -237,8 +237,6 @@ void gimp_image_set_component_active (GimpImage *image,
|
|||
gboolean active);
|
||||
gboolean gimp_image_get_component_active (GimpImage *image,
|
||||
GimpChannelType type);
|
||||
void gimp_image_get_active_array (GimpImage *image,
|
||||
gboolean *components);
|
||||
GimpComponentMask gimp_image_get_active_mask (GimpImage *image);
|
||||
|
||||
void gimp_image_set_component_visible (GimpImage *image,
|
||||
|
|
@ -246,8 +244,6 @@ void gimp_image_set_component_visible (GimpImage *image,
|
|||
gboolean visible);
|
||||
gboolean gimp_image_get_component_visible (GimpImage *image,
|
||||
GimpChannelType type);
|
||||
void gimp_image_get_visible_array (GimpImage *image,
|
||||
gboolean *components);
|
||||
GimpComponentMask gimp_image_get_visible_mask (GimpImage *image);
|
||||
|
||||
|
||||
|
|
@ -512,3 +508,7 @@ void gimp_image_invalidate_previews (GimpImage *image);
|
|||
void gimp_image_set_converting (GimpImage *image,
|
||||
gboolean converting);
|
||||
gboolean gimp_image_get_converting (GimpImage *image);
|
||||
|
||||
void gimp_image_set_from_command_line (GimpImage *image,
|
||||
gboolean from_command_line);
|
||||
gboolean gimp_image_get_from_command_line (GimpImage *image);
|
||||
|
|
|
|||
|
|
@ -194,8 +194,6 @@ static void gimp_layer_convert_type (GimpDrawable *drawable,
|
|||
gboolean push_undo,
|
||||
GimpProgress *progress);
|
||||
static void gimp_layer_invalidate_boundary (GimpDrawable *drawable);
|
||||
static void gimp_layer_get_active_components (GimpDrawable *drawable,
|
||||
gboolean *active);
|
||||
static GimpComponentMask
|
||||
gimp_layer_get_active_mask (GimpDrawable *drawable);
|
||||
static void gimp_layer_set_buffer (GimpDrawable *drawable,
|
||||
|
|
@ -448,7 +446,6 @@ gimp_layer_class_init (GimpLayerClass *klass)
|
|||
drawable_class->supports_alpha = gimp_layer_supports_alpha;
|
||||
drawable_class->convert_type = gimp_layer_convert_type;
|
||||
drawable_class->invalidate_boundary = gimp_layer_invalidate_boundary;
|
||||
drawable_class->get_active_components = gimp_layer_get_active_components;
|
||||
drawable_class->get_active_mask = gimp_layer_get_active_mask;
|
||||
drawable_class->set_buffer = gimp_layer_set_buffer;
|
||||
drawable_class->get_bounding_box = gimp_layer_get_bounding_box;
|
||||
|
|
@ -1511,22 +1508,6 @@ gimp_layer_invalidate_boundary (GimpDrawable *drawable)
|
|||
floating_sel_invalidate (layer);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_layer_get_active_components (GimpDrawable *drawable,
|
||||
gboolean *active)
|
||||
{
|
||||
GimpLayer *layer = GIMP_LAYER (drawable);
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
const Babl *format = gimp_drawable_get_format (drawable);
|
||||
|
||||
/* first copy the image active channels */
|
||||
gimp_image_get_active_array (image, active);
|
||||
|
||||
if (gimp_drawable_has_alpha (drawable) &&
|
||||
gimp_layer_is_alpha_locked (layer, NULL))
|
||||
active[babl_format_get_n_components (format) - 1] = FALSE;
|
||||
}
|
||||
|
||||
static GimpComponentMask
|
||||
gimp_layer_get_active_mask (GimpDrawable *drawable)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -198,8 +198,15 @@ gimp_palette_load (GimpContext *context,
|
|||
{
|
||||
GeglColor *color = gegl_color_new ("black");
|
||||
guint8 rgb[3] = { 0 };
|
||||
#ifdef _UCRT
|
||||
gchar *context = NULL;
|
||||
#endif
|
||||
|
||||
#ifndef _UCRT
|
||||
tok = strtok (str, " \t");
|
||||
#else
|
||||
tok = strtok_s (str, " \t", &context);
|
||||
#endif
|
||||
if (tok)
|
||||
{
|
||||
if (atoi (tok) < 0 || atoi (tok) > 255)
|
||||
|
|
@ -216,7 +223,12 @@ gimp_palette_load (GimpContext *context,
|
|||
gimp_file_get_utf8_name (file), linenum);
|
||||
}
|
||||
|
||||
#ifndef _UCRT
|
||||
tok = strtok (NULL, " \t");
|
||||
#else
|
||||
tok = strtok_s (NULL, " \t", &context);
|
||||
#endif
|
||||
|
||||
if (tok)
|
||||
{
|
||||
if (atoi (tok) < 0 || atoi (tok) > 255)
|
||||
|
|
@ -233,7 +245,11 @@ gimp_palette_load (GimpContext *context,
|
|||
gimp_file_get_utf8_name (file), linenum);
|
||||
}
|
||||
|
||||
#ifndef _UCRT
|
||||
tok = strtok (NULL, " \t");
|
||||
#else
|
||||
tok = strtok_s (NULL, " \t", &context);
|
||||
#endif
|
||||
if (tok)
|
||||
{
|
||||
if (atoi (tok) < 0 || atoi (tok) > 255)
|
||||
|
|
@ -251,7 +267,11 @@ gimp_palette_load (GimpContext *context,
|
|||
}
|
||||
|
||||
/* optional name */
|
||||
#ifndef _UCRT
|
||||
tok = strtok (NULL, "\n");
|
||||
#else
|
||||
tok = strtok_s (NULL, "\n", &context);
|
||||
#endif
|
||||
|
||||
/* Historical .gpl format is sRGB. */
|
||||
gegl_color_set_pixel (color, babl_format ("R'G'B' u8"), rgb);
|
||||
|
|
@ -1391,28 +1411,51 @@ gimp_palette_load_sbz (GimpContext *context,
|
|||
if ((a = archive_read_new ()))
|
||||
{
|
||||
const gchar *name = gimp_file_get_utf8_name (file);
|
||||
int archive_ret;
|
||||
|
||||
archive_read_support_format_all (a);
|
||||
r = archive_read_open_filename (a, name, 10240);
|
||||
if (r != ARCHIVE_OK)
|
||||
{
|
||||
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
|
||||
_("Unable to read SBZ file: %s"),
|
||||
archive_error_string (a));
|
||||
|
||||
archive_read_free (a);
|
||||
|
||||
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
|
||||
_("Unable to read SBZ file"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
while (archive_read_next_header (a, &entry) == ARCHIVE_OK)
|
||||
while ((archive_ret = archive_read_next_header (a, &entry)) != ARCHIVE_EOF)
|
||||
{
|
||||
const gchar *lower = g_ascii_strdown (archive_entry_pathname (entry), -1);
|
||||
const char *pathname;
|
||||
gchar *lower;
|
||||
|
||||
if (archive_ret == ARCHIVE_RETRY)
|
||||
continue;
|
||||
else if (archive_ret == ARCHIVE_FATAL)
|
||||
break;
|
||||
|
||||
pathname = archive_entry_pathname (entry);
|
||||
lower = g_ascii_strdown (pathname, -1);
|
||||
if (g_str_has_suffix (lower, ".xml"))
|
||||
{
|
||||
entry_size = archive_entry_size (entry);
|
||||
xml_data = (gchar *) g_malloc (entry_size);
|
||||
if (xml_data == NULL)
|
||||
{
|
||||
entry_size = archive_entry_size (entry);
|
||||
xml_data = (gchar *) g_malloc (entry_size);
|
||||
|
||||
r = archive_read_data (a, xml_data, entry_size);
|
||||
r = archive_read_data (a, xml_data, entry_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* This format only seems to allow for 1 XML in the
|
||||
* zip, so if there are several, let's ignore it, yet
|
||||
* not completely silently.
|
||||
*/
|
||||
g_printerr ("Ignoring second XML file '%s' in SBZ palette: %s",
|
||||
pathname, gimp_file_get_utf8_name (file));
|
||||
}
|
||||
}
|
||||
else if (g_str_has_suffix (lower, ".icc") || g_str_has_suffix (lower, ".icm"))
|
||||
{
|
||||
|
|
@ -1438,6 +1481,18 @@ gimp_palette_load_sbz (GimpContext *context,
|
|||
g_list_append (sbz_data.embedded_profiles, sbz_profile);
|
||||
}
|
||||
}
|
||||
|
||||
g_free (lower);
|
||||
}
|
||||
|
||||
if (archive_ret == ARCHIVE_FATAL)
|
||||
{
|
||||
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
|
||||
_("Unable to read SBZ file: %s"),
|
||||
archive_error_string (a));
|
||||
|
||||
archive_read_free (a);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (xml_data)
|
||||
|
|
@ -1458,6 +1513,15 @@ gimp_palette_load_sbz (GimpContext *context,
|
|||
|
||||
g_free (xml_data);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
|
||||
_("Unable to open SBZ file"));
|
||||
|
||||
archive_read_free (a);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
r = archive_read_free (a);
|
||||
}
|
||||
|
|
@ -1491,30 +1555,55 @@ gimp_palette_load_procreate (GimpContext *context,
|
|||
if ((a = archive_read_new ()))
|
||||
{
|
||||
const gchar *name = gimp_file_get_utf8_name (file);
|
||||
int archive_ret;
|
||||
|
||||
archive_read_support_format_all (a);
|
||||
r = archive_read_open_filename (a, name, 10240);
|
||||
if (r != ARCHIVE_OK)
|
||||
{
|
||||
archive_read_free (a);
|
||||
|
||||
/* TODO: Translate after string freeze */
|
||||
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
|
||||
"Unable to read Procreate swatches file");
|
||||
_("Unable to read Procreate swatches file: %s"),
|
||||
archive_error_string (a));
|
||||
|
||||
archive_read_free (a);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
while (archive_read_next_header (a, &entry) == ARCHIVE_OK)
|
||||
while ((archive_ret = archive_read_next_header (a, &entry)) != ARCHIVE_EOF)
|
||||
{
|
||||
const gchar *lower = g_ascii_strdown (archive_entry_pathname (entry), -1);
|
||||
gchar *lower;
|
||||
|
||||
if (archive_ret == ARCHIVE_RETRY)
|
||||
continue;
|
||||
else if (archive_ret == ARCHIVE_FATAL)
|
||||
break;
|
||||
|
||||
/* Here we returned either with ARCHIVE_OK or ARCHIVE_WARN
|
||||
* which are both successes (we ignore the non-critical error
|
||||
* in the WARN case).
|
||||
*/
|
||||
|
||||
lower = g_ascii_strdown (archive_entry_pathname (entry), -1);
|
||||
if (g_str_has_suffix (lower, ".json"))
|
||||
{
|
||||
entry_size = archive_entry_size (entry);
|
||||
json_data = (gchar *) g_malloc (entry_size);
|
||||
|
||||
r = archive_read_data (a, json_data, entry_size);
|
||||
g_free (lower);
|
||||
break;
|
||||
}
|
||||
g_free (lower);
|
||||
}
|
||||
|
||||
if (archive_ret == ARCHIVE_FATAL)
|
||||
{
|
||||
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
|
||||
_("Unable to read Procreate swatches file: %s"),
|
||||
archive_error_string (a));
|
||||
|
||||
archive_read_free (a);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (json_data)
|
||||
|
|
@ -1656,8 +1745,8 @@ gimp_palette_load_procreate (GimpContext *context,
|
|||
GeglColor *color = gegl_color_new (NULL);
|
||||
const Babl *space = NULL;
|
||||
|
||||
if (profiles &&
|
||||
json_reader_read_member (reader, "colorProfile") &&
|
||||
if (json_reader_read_member (reader, "colorProfile") &&
|
||||
profiles &&
|
||||
json_reader_is_value (reader))
|
||||
{
|
||||
GList *profile_list;
|
||||
|
|
@ -1712,14 +1801,21 @@ gimp_palette_load_procreate (GimpContext *context,
|
|||
g_clear_object (&reader);
|
||||
g_clear_object (&parser);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
|
||||
_("Unable to read Procreate swatches file"));
|
||||
|
||||
archive_read_free (a);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
r = archive_read_free (a);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* TODO: Translate after string freeze */
|
||||
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
|
||||
"Unable to read Procreate swatches file");
|
||||
_("Unable to read Procreate swatches file"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -1735,69 +1831,77 @@ swatchbooker_load_start_element (GMarkupParseContext *context,
|
|||
GError **error)
|
||||
{
|
||||
SwatchBookerData *sbz_data = user_data;
|
||||
gchar *lower_elt_name;
|
||||
|
||||
sbz_data->copy_values = FALSE;
|
||||
sbz_data->color_model = NULL;
|
||||
sbz_data->color_space = NULL;
|
||||
|
||||
if (! strcmp (g_ascii_strdown (element_name, -1), "color"))
|
||||
lower_elt_name = g_ascii_strdown (element_name, -1);
|
||||
if (! strcmp (lower_elt_name, "color"))
|
||||
{
|
||||
sbz_data->in_color_tag = TRUE;
|
||||
}
|
||||
else if (! strcmp (g_ascii_strdown (element_name, -1), "dc:identifier"))
|
||||
else if (! strcmp (lower_elt_name, "dc:identifier"))
|
||||
{
|
||||
if (sbz_data->in_color_tag)
|
||||
sbz_data->copy_name = TRUE;
|
||||
}
|
||||
else if (! strcmp (g_ascii_strdown (element_name, -1), "values"))
|
||||
else if (! strcmp (lower_elt_name, "values"))
|
||||
{
|
||||
while (*attribute_names)
|
||||
{
|
||||
if (! strcmp (g_ascii_strdown (*attribute_names, -1), "model"))
|
||||
{
|
||||
sbz_data->color_model =
|
||||
g_strdup (g_ascii_strdown (*attribute_values, -1));
|
||||
}
|
||||
else if (! strcmp (g_ascii_strdown (*attribute_names, -1), "space"))
|
||||
{
|
||||
sbz_data->color_space = g_strdup (*attribute_values);
|
||||
}
|
||||
gchar *lower_att_name = g_ascii_strdown (*attribute_names, -1);
|
||||
|
||||
if (! strcmp (lower_att_name, "model"))
|
||||
sbz_data->color_model = g_ascii_strdown (*attribute_values, -1);
|
||||
else if (! strcmp (lower_att_name, "space"))
|
||||
sbz_data->color_space = g_strdup (*attribute_values);
|
||||
|
||||
attribute_names++;
|
||||
attribute_values++;
|
||||
|
||||
g_free (lower_att_name);
|
||||
}
|
||||
|
||||
sbz_data->copy_values = TRUE;
|
||||
}
|
||||
else if (! strcmp (g_ascii_strdown (element_name, -1), "book"))
|
||||
else if (! strcmp (lower_elt_name, "book"))
|
||||
{
|
||||
sbz_data->in_book_tag = TRUE;
|
||||
|
||||
while (*attribute_names)
|
||||
{
|
||||
if (! strcmp (g_ascii_strdown (*attribute_names, -1), "columns"))
|
||||
gchar *lower_att_name = g_ascii_strdown (*attribute_names, -1);
|
||||
|
||||
if (! strcmp (lower_att_name, "columns"))
|
||||
{
|
||||
gint columns = atoi (*attribute_values);
|
||||
|
||||
if (columns > 0)
|
||||
gimp_palette_set_columns (sbz_data->palette, columns);
|
||||
|
||||
g_free (lower_att_name);
|
||||
break;
|
||||
}
|
||||
|
||||
attribute_names++;
|
||||
attribute_values++;
|
||||
|
||||
g_free (lower_att_name);
|
||||
}
|
||||
}
|
||||
else if (! strcmp (g_ascii_strdown (element_name, -1), "swatch") &&
|
||||
else if (! strcmp (lower_elt_name, "swatch") &&
|
||||
sbz_data->in_book_tag)
|
||||
{
|
||||
while (*attribute_names)
|
||||
{
|
||||
if (! strcmp (g_ascii_strdown (*attribute_names, -1), "material"))
|
||||
gchar *lower_att_name = g_ascii_strdown (*attribute_names, -1);
|
||||
|
||||
if (! strcmp (lower_att_name, "material"))
|
||||
{
|
||||
GList *cols;
|
||||
gint original_id = 0;
|
||||
/*gint original_id = 0;*/
|
||||
|
||||
for (cols = gimp_palette_get_colors (sbz_data->palette);
|
||||
cols;
|
||||
|
|
@ -1813,15 +1917,21 @@ swatchbooker_load_start_element (GMarkupParseContext *context,
|
|||
sbz_data->sorted_position++;
|
||||
break;
|
||||
}
|
||||
original_id++;
|
||||
/*original_id++;*/
|
||||
}
|
||||
|
||||
g_free (lower_att_name);
|
||||
break;
|
||||
}
|
||||
|
||||
attribute_names++;
|
||||
attribute_values++;
|
||||
|
||||
g_free (lower_att_name);
|
||||
}
|
||||
}
|
||||
|
||||
g_free (lower_elt_name);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -1831,11 +1941,15 @@ swatchbooker_load_end_element (GMarkupParseContext *context,
|
|||
GError **error)
|
||||
{
|
||||
SwatchBookerData *sbz_data = user_data;
|
||||
gchar *lower_elt_name;
|
||||
|
||||
if (! strcmp (g_ascii_strdown (element_name, -1), "color"))
|
||||
lower_elt_name = g_ascii_strdown (element_name, -1);
|
||||
if (! strcmp (lower_elt_name, "color"))
|
||||
sbz_data->in_color_tag = FALSE;
|
||||
else if (! strcmp (g_ascii_strdown (element_name, -1), "book"))
|
||||
else if (! strcmp (lower_elt_name, "book"))
|
||||
sbz_data->in_book_tag = FALSE;
|
||||
|
||||
g_free (lower_elt_name);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ gimp_pickable_auto_shrink (GimpPickable *pickable,
|
|||
GeglBuffer *buffer;
|
||||
GeglRectangle rect;
|
||||
ColorsEqualFunc colors_equal_func;
|
||||
guchar bgcolor[MAX_CHANNELS] = { 0, 0, 0, 0 };
|
||||
guchar bgcolor[MAX_CHANNELS] = { 0 };
|
||||
guchar *buf = NULL;
|
||||
gint x1, y1, x2, y2;
|
||||
gint width, height;
|
||||
|
|
|
|||
|
|
@ -48,6 +48,9 @@ extern "C"
|
|||
(/* each thread costs as much as */ 64.0 * 64.0 /* pixels */)
|
||||
|
||||
|
||||
static gfloat *mask_row_buf = NULL;
|
||||
static gsize mask_row_buf_size = 0;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
gint x;
|
||||
|
|
@ -148,6 +151,9 @@ gimp_pickable_contiguous_region_by_seed (GimpPickable *pickable,
|
|||
|
||||
format = choose_format (src_buffer, select_criterion,
|
||||
&n_components, &has_alpha);
|
||||
|
||||
g_return_val_if_fail (n_components <= MAX_CHANNELS, NULL);
|
||||
|
||||
gegl_buffer_sample (src_buffer, x, y, NULL, start_col, format,
|
||||
GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
|
||||
|
||||
|
|
@ -186,6 +192,9 @@ gimp_pickable_contiguous_region_by_seed (GimpPickable *pickable,
|
|||
}
|
||||
g_clear_object (&src_buffer);
|
||||
|
||||
g_clear_pointer (&mask_row_buf, g_free);
|
||||
mask_row_buf_size = 0;
|
||||
|
||||
return mask_buffer;
|
||||
}
|
||||
|
||||
|
|
@ -228,6 +237,8 @@ gimp_pickable_contiguous_region_by_color (GimpPickable *pickable,
|
|||
format = choose_format (src_buffer, select_criterion,
|
||||
&n_components, &has_alpha);
|
||||
|
||||
g_return_val_if_fail (n_components <= MAX_CHANNELS, NULL);
|
||||
|
||||
gegl_color_get_pixel (color, format, start_col);
|
||||
|
||||
if (has_alpha)
|
||||
|
|
@ -689,6 +700,9 @@ gimp_pickable_contiguous_region_by_line_art (GimpPickable *pickable,
|
|||
if (free_src_buffer)
|
||||
g_object_unref (src_buffer);
|
||||
|
||||
g_clear_pointer (&mask_row_buf, g_free);
|
||||
mask_row_buf_size = 0;
|
||||
|
||||
return mask_buffer;
|
||||
}
|
||||
|
||||
|
|
@ -985,10 +999,19 @@ find_contiguous_segment (const gfloat *col,
|
|||
gfloat *row)
|
||||
{
|
||||
gfloat *s;
|
||||
gfloat mask_row_buf[src_extent->width];
|
||||
gfloat *mask_row = mask_row_buf - src_extent->x;
|
||||
gfloat *mask_row;
|
||||
gfloat diff;
|
||||
|
||||
if (mask_row_buf == NULL ||
|
||||
(gsize) src_extent->width > mask_row_buf_size)
|
||||
{
|
||||
mask_row_buf_size = src_extent->width;
|
||||
mask_row_buf = (gfloat *) g_realloc_n ((gpointer) mask_row_buf,
|
||||
mask_row_buf_size,
|
||||
sizeof (gfloat));
|
||||
}
|
||||
mask_row = mask_row_buf - src_extent->x;
|
||||
|
||||
#ifdef FETCH_ROW
|
||||
gegl_buffer_get (src_buffer, GEGL_RECTANGLE (0, initial_y, width, 1), 1.0,
|
||||
src_format,
|
||||
|
|
|
|||
|
|
@ -43,14 +43,18 @@
|
|||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static GimpMetadataRotationPolicy gimp_image_metadata_rotate_dialog (GimpImage *image,
|
||||
GimpContext *context,
|
||||
GtkWidget *parent,
|
||||
GExiv2Orientation orientation,
|
||||
gboolean *dont_ask);
|
||||
static GdkPixbuf * gimp_image_metadata_rotate_pixbuf (GdkPixbuf *pixbuf,
|
||||
GExiv2Orientation orientation);
|
||||
static GimpMetadataRotationPolicy gimp_image_metadata_rotate_dialog (GimpImage *image,
|
||||
GimpContext *context,
|
||||
GtkWidget *parent,
|
||||
GExiv2Orientation orientation,
|
||||
gboolean *dont_ask);
|
||||
static GdkPixbuf * gimp_image_metadata_rotate_pixbuf (GdkPixbuf *pixbuf,
|
||||
GExiv2Orientation orientation);
|
||||
static gboolean gimp_image_metadata_rotate_release (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
GtkDialog *dialog);
|
||||
|
||||
static void gimp_image_metadata_rotate_realize (GtkWidget *widget);
|
||||
|
||||
/* public functions */
|
||||
|
||||
|
|
@ -169,6 +173,7 @@ gimp_image_metadata_rotate_dialog (GimpImage *image,
|
|||
GdkPixbuf *rotated;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *image;
|
||||
GtkWidget *event_box;
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
|
||||
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
|
||||
|
|
@ -187,9 +192,22 @@ gimp_image_metadata_rotate_dialog (GimpImage *image,
|
|||
gtk_box_pack_end (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
image = gtk_image_new_from_pixbuf (pixbuf);
|
||||
gtk_box_pack_end (GTK_BOX (vbox), image, FALSE, FALSE, 0);
|
||||
gtk_widget_show (image);
|
||||
event_box = gtk_event_box_new ();
|
||||
image = gtk_image_new_from_pixbuf (pixbuf);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (event_box), image);
|
||||
gtk_box_pack_end (GTK_BOX (vbox), event_box, FALSE, FALSE, 0);
|
||||
gtk_widget_set_visible (image, TRUE);
|
||||
gtk_widget_set_visible (event_box, TRUE);
|
||||
|
||||
g_object_set_data (G_OBJECT (event_box), "metadata-rotation-response",
|
||||
GINT_TO_POINTER (GTK_RESPONSE_CANCEL));
|
||||
g_signal_connect_object (event_box, "button-release-event",
|
||||
G_CALLBACK (gimp_image_metadata_rotate_release),
|
||||
dialog, 0);
|
||||
g_signal_connect (event_box, "realize",
|
||||
G_CALLBACK (gimp_image_metadata_rotate_realize),
|
||||
NULL);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
|
||||
|
|
@ -204,11 +222,23 @@ gimp_image_metadata_rotate_dialog (GimpImage *image,
|
|||
|
||||
rotated = gimp_image_metadata_rotate_pixbuf (pixbuf, orientation);
|
||||
|
||||
image = gtk_image_new_from_pixbuf (rotated);
|
||||
event_box = gtk_event_box_new ();
|
||||
image = gtk_image_new_from_pixbuf (rotated);
|
||||
g_object_unref (rotated);
|
||||
|
||||
gtk_box_pack_end (GTK_BOX (vbox), image, FALSE, FALSE, 0);
|
||||
gtk_widget_show (image);
|
||||
gtk_container_add (GTK_CONTAINER (event_box), image);
|
||||
gtk_box_pack_end (GTK_BOX (vbox), event_box, FALSE, FALSE, 0);
|
||||
gtk_widget_set_visible (image, TRUE);
|
||||
gtk_widget_set_visible (event_box, TRUE);
|
||||
|
||||
g_object_set_data (G_OBJECT (event_box), "metadata-rotation-response",
|
||||
GINT_TO_POINTER (GTK_RESPONSE_OK));
|
||||
g_signal_connect_object (event_box, "button-release-event",
|
||||
G_CALLBACK (gimp_image_metadata_rotate_release),
|
||||
dialog, 0);
|
||||
g_signal_connect (event_box, "realize",
|
||||
G_CALLBACK (gimp_image_metadata_rotate_realize),
|
||||
NULL);
|
||||
}
|
||||
|
||||
label = g_object_new (GTK_TYPE_LABEL,
|
||||
|
|
@ -235,8 +265,8 @@ gimp_image_metadata_rotate_dialog (GimpImage *image,
|
|||
gtk_widget_destroy (dialog);
|
||||
|
||||
return (response == GTK_RESPONSE_OK) ?
|
||||
GIMP_METADATA_ROTATION_POLICY_ROTATE :
|
||||
GIMP_METADATA_ROTATION_POLICY_KEEP;
|
||||
GIMP_METADATA_ROTATION_POLICY_ROTATE :
|
||||
GIMP_METADATA_ROTATION_POLICY_KEEP;
|
||||
}
|
||||
|
||||
static GdkPixbuf *
|
||||
|
|
@ -291,3 +321,29 @@ gimp_image_metadata_rotate_pixbuf (GdkPixbuf *pixbuf,
|
|||
|
||||
return rotated;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gimp_image_metadata_rotate_release (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
GtkDialog *dialog)
|
||||
{
|
||||
gint response_id;
|
||||
|
||||
response_id =
|
||||
GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget),
|
||||
"metadata-rotation-response"));
|
||||
|
||||
gtk_dialog_response (dialog, response_id);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_image_metadata_rotate_realize (GtkWidget *widget)
|
||||
{
|
||||
GdkCursor *cursor;
|
||||
|
||||
cursor = gdk_cursor_new_from_name (gtk_widget_get_display (widget),
|
||||
"pointer");
|
||||
gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
|
||||
g_object_unref (cursor);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@
|
|||
#include "path/gimppath.h"
|
||||
#include "path/gimppath-import.h"
|
||||
#include "path/gimpvectorlayer.h"
|
||||
#include "path/gimpvectorlayeroptions.h"
|
||||
|
||||
#include "text/gimptext.h"
|
||||
#include "text/gimptextlayer.h"
|
||||
|
|
@ -438,15 +437,8 @@ gimp_display_shell_dnd_fill (GimpDisplayShell *shell,
|
|||
if (gimp_item_is_text_layer (iter->data) ||
|
||||
gimp_item_is_vector_layer (iter->data))
|
||||
{
|
||||
GimpVectorLayerOptions *vector_options = NULL;
|
||||
GimpFillOptions *vector_fill = NULL;
|
||||
GimpPattern *pattern = NULL;
|
||||
GeglColor *color = NULL;
|
||||
|
||||
if (gimp_item_is_vector_layer (iter->data))
|
||||
vector_options = gimp_vector_layer_get_options (iter->data);
|
||||
if (vector_options)
|
||||
vector_fill = vector_options->fill_options;
|
||||
GimpPattern *pattern = NULL;
|
||||
GeglColor *color = NULL;
|
||||
|
||||
if (gimp_fill_options_get_style (options) == GIMP_FILL_STYLE_FG_COLOR)
|
||||
color = gimp_context_get_foreground (GIMP_CONTEXT (options));
|
||||
|
|
@ -457,12 +449,13 @@ gimp_display_shell_dnd_fill (GimpDisplayShell *shell,
|
|||
|
||||
if (color)
|
||||
{
|
||||
if (vector_fill)
|
||||
if (gimp_item_is_vector_layer (iter->data))
|
||||
{
|
||||
gimp_context_set_foreground (GIMP_CONTEXT (vector_fill),
|
||||
color);
|
||||
gimp_fill_options_set_custom_style (vector_fill,
|
||||
GIMP_CUSTOM_STYLE_SOLID_COLOR);
|
||||
gimp_vector_layer_set (GIMP_VECTOR_LAYER (iter->data), NULL,
|
||||
"fill-style",
|
||||
GIMP_CUSTOM_STYLE_SOLID_COLOR,
|
||||
"fill-color",
|
||||
color, NULL);
|
||||
gimp_vector_layer_refresh (iter->data);
|
||||
}
|
||||
else
|
||||
|
|
@ -470,16 +463,14 @@ gimp_display_shell_dnd_fill (GimpDisplayShell *shell,
|
|||
gimp_text_layer_set (iter->data, NULL, "color", color, NULL);
|
||||
}
|
||||
}
|
||||
else if (pattern)
|
||||
else if (pattern &&
|
||||
gimp_item_is_vector_layer (iter->data))
|
||||
{
|
||||
if (vector_fill)
|
||||
{
|
||||
gimp_context_set_pattern (GIMP_CONTEXT (vector_fill),
|
||||
pattern);
|
||||
gimp_fill_options_set_custom_style (vector_fill,
|
||||
GIMP_CUSTOM_STYLE_PATTERN);
|
||||
gimp_vector_layer_refresh (iter->data);
|
||||
}
|
||||
gimp_vector_layer_set (GIMP_VECTOR_LAYER (iter->data), NULL,
|
||||
"fill-style", GIMP_CUSTOM_STYLE_PATTERN,
|
||||
"fill-pattern", pattern,
|
||||
NULL);
|
||||
gimp_vector_layer_refresh (iter->data);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -2005,7 +2005,7 @@ gimp_display_shell_rotate_gesture_maybe_get_state (GtkGestureRotate *gesture,
|
|||
* last_event happens to not have it. Thus we store the last valid state
|
||||
* and only update it if we get a valid state from last_event.
|
||||
*/
|
||||
guint state = 0;
|
||||
GdkModifierType state = 0;
|
||||
const GdkEvent *last_event;
|
||||
|
||||
last_event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
|
||||
|
|
|
|||
|
|
@ -371,7 +371,9 @@ gimp_image_window_constructed (GObject *object)
|
|||
GimpGuiConfig *config;
|
||||
GimpDeviceManager *device_manager;
|
||||
gboolean use_gtk_menubar = TRUE;
|
||||
#ifndef GDK_WINDOWING_QUARTZ
|
||||
gboolean use_app_menu = TRUE;
|
||||
#endif
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||
|
||||
|
|
@ -1144,7 +1146,11 @@ gimp_image_window_set_aux_info (GimpSessionManaged *session_managed,
|
|||
maximized = TRUE;
|
||||
|
||||
if (width)
|
||||
#ifndef _UCRT
|
||||
sscanf (aux->value, "%d", width);
|
||||
#else
|
||||
sscanf_s (aux->value, "%d", width);
|
||||
#endif
|
||||
|
||||
/* compat handling for right docks */
|
||||
if (! strcmp (aux->name, GIMP_IMAGE_WINDOW_RIGHT_DOCKS_POS))
|
||||
|
|
|
|||
|
|
@ -1944,7 +1944,13 @@ gimp_statusbar_shell_scaled (GimpDisplayShell *shell,
|
|||
sizeof (statusbar->cursor_format_str),
|
||||
"%%s%%.%df%%s%%.%df%%s",
|
||||
w_digits, h_digits);
|
||||
#ifndef _UCRT
|
||||
strcpy (statusbar->cursor_format_str_f, statusbar->cursor_format_str);
|
||||
#else
|
||||
strcpy_s (statusbar->cursor_format_str_f,
|
||||
sizeof (statusbar->cursor_format_str_f),
|
||||
statusbar->cursor_format_str);
|
||||
#endif
|
||||
g_snprintf (statusbar->length_format_str,
|
||||
sizeof (statusbar->length_format_str),
|
||||
"%%s%%.%df%%s", MAX (w_digits, h_digits));
|
||||
|
|
|
|||
|
|
@ -293,7 +293,9 @@ gimp_eek (const gchar *reason,
|
|||
gboolean use_handler)
|
||||
{
|
||||
GimpCoreConfig *config = the_errors_gimp->config;
|
||||
#if !defined(G_OS_WIN32) || !defined(GIMP_CONSOLE_COMPILATION)
|
||||
gboolean eek_handled = FALSE;
|
||||
#endif
|
||||
GimpDebugPolicy debug_policy;
|
||||
GList *iter;
|
||||
gint num_idx;
|
||||
|
|
|
|||
|
|
@ -690,11 +690,12 @@ file_open_from_command_line (Gimp *gimp,
|
|||
{
|
||||
success = TRUE;
|
||||
|
||||
gimp_image_set_from_command_line (image, TRUE);
|
||||
g_object_set_data_full (G_OBJECT (gimp), GIMP_FILE_OPEN_LAST_FILE_KEY,
|
||||
g_object_ref (file),
|
||||
(GDestroyNotify) g_object_unref);
|
||||
}
|
||||
else if (status != GIMP_PDB_SUCCESS && status != GIMP_PDB_CANCEL && display)
|
||||
else if (status != GIMP_PDB_SUCCESS && status != GIMP_PDB_CANCEL)
|
||||
{
|
||||
gimp_message (gimp, G_OBJECT (display), GIMP_MESSAGE_ERROR,
|
||||
_("Opening '%s' failed: %s"),
|
||||
|
|
@ -1007,8 +1008,7 @@ file_open_pre_check (Gimp *gimp,
|
|||
g_clear_error (error);
|
||||
if (error && ! *error)
|
||||
g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
|
||||
/* TODO: localize after string freeze ends. */
|
||||
"Cycling link detected with %s.",
|
||||
_("Circular reference detected with '%s'."),
|
||||
g_file_peek_path (file));
|
||||
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -258,13 +258,13 @@ file_remote_get_temp_file (Gimp *gimp,
|
|||
const gchar *ext = strchr (basename, '.');
|
||||
|
||||
if (ext && strlen (ext))
|
||||
temp_file = gimp_get_temp_file (gimp, ext + 1);
|
||||
temp_file = gimp_get_temp_file (gimp, ext + 1, NULL);
|
||||
|
||||
g_free (basename);
|
||||
}
|
||||
|
||||
if (! temp_file)
|
||||
temp_file = gimp_get_temp_file (gimp, "xxx");
|
||||
temp_file = gimp_get_temp_file (gimp, "xxx", NULL);
|
||||
|
||||
return temp_file;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -604,15 +604,17 @@ void
|
|||
gimp_update_check (GimpCoreConfig *config)
|
||||
{
|
||||
#ifdef PLATFORM_OSX
|
||||
const gchar *gimp_versions;
|
||||
const gchar *gimp_versions;
|
||||
NSMutableURLRequest *request;
|
||||
NSURLSession *session;
|
||||
|
||||
gimp_versions = gimp_get_version_url ();
|
||||
|
||||
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
|
||||
request = [[NSMutableURLRequest alloc] init];
|
||||
[request setURL:[NSURL URLWithString:@(gimp_versions)]];
|
||||
[request setHTTPMethod:@"GET"];
|
||||
|
||||
NSURLSession *session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
|
||||
session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
|
||||
/* completionHandler is called on a background thread */
|
||||
[[session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
|
||||
NSString *reply;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include <winnls.h>
|
||||
#endif
|
||||
#ifdef PLATFORM_OSX
|
||||
#include <Foundation/NSLocale.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
||||
#include "language.h"
|
||||
|
|
|
|||
55
app/main.c
55
app/main.c
|
|
@ -350,27 +350,26 @@ gimp_macos_setenv (const char * progname)
|
|||
gchar *etc_dir;
|
||||
size_t path_len;
|
||||
struct stat sb;
|
||||
gboolean need_pythonhome = TRUE;
|
||||
|
||||
bin_dir = g_path_get_dirname (resolved_path);
|
||||
tmp = g_strdup_printf ("%s/../Resources/lib", bin_dir);
|
||||
tmp = g_strdup_printf ("%s/lib", gimp_installation_directory());
|
||||
lib_dir = g_canonicalize_filename (tmp, NULL);
|
||||
g_free (tmp);
|
||||
tmp = g_strdup_printf ("%s/../Resources/share", bin_dir);
|
||||
tmp = g_strdup_printf ("%s/share", gimp_installation_directory());
|
||||
share_dir = g_canonicalize_filename (tmp, NULL);
|
||||
g_free (tmp);
|
||||
tmp = g_strdup_printf ("%s/../Resources/etc", bin_dir);
|
||||
tmp = g_strdup_printf ("%s/etc", gimp_installation_directory());
|
||||
etc_dir = g_canonicalize_filename (tmp, NULL);
|
||||
g_free (tmp);
|
||||
|
||||
/* Detect if we are running from bundle or from prefix */
|
||||
if (share_dir && !stat (share_dir, &sb) && S_ISDIR (sb.st_mode))
|
||||
if (g_str_has_suffix (bin_dir, "MacOS"))
|
||||
{
|
||||
g_print ("GIMP is started as MacOS application\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp = g_strdup_printf ("%s/../share", bin_dir);
|
||||
tmp = g_strdup_printf ("%s/share", gimp_installation_directory());
|
||||
share_dir = g_canonicalize_filename (tmp, NULL);
|
||||
g_free (tmp);
|
||||
if (share_dir && !stat (share_dir, &sb) && S_ISDIR (sb.st_mode))
|
||||
|
|
@ -379,7 +378,7 @@ gimp_macos_setenv (const char * progname)
|
|||
|
||||
g_print ("GIMP is started in the build directory\n");
|
||||
|
||||
tmp = g_strdup_printf ("%s/..", bin_dir); /* running in build dir */
|
||||
tmp = g_strdup_printf ("%s", gimp_installation_directory()); /* running in build dir */
|
||||
share_dir = g_canonicalize_filename (tmp, NULL);
|
||||
g_free (tmp);
|
||||
}
|
||||
|
|
@ -390,23 +389,6 @@ gimp_macos_setenv (const char * progname)
|
|||
}
|
||||
}
|
||||
|
||||
/* Detect we were built in homebrew for MacOS (for PYTHONHOME purposes) */
|
||||
tmp = g_strdup_printf ("%s/../Frameworks/Python.framework", share_dir);
|
||||
if (tmp && !stat (tmp, &sb) && S_ISDIR (sb.st_mode))
|
||||
{
|
||||
g_print ("GIMP was built with homebrew\n");
|
||||
need_pythonhome = FALSE;
|
||||
}
|
||||
g_free (tmp);
|
||||
/* Detect we were built in MacPorts for MacOS (for PYTHONHOME purposes) */
|
||||
tmp = g_strdup_printf ("%s/../Library/Frameworks/Python.framework", share_dir);
|
||||
if (tmp && !stat (tmp, &sb) && S_ISDIR (sb.st_mode))
|
||||
{
|
||||
g_print ("GIMP was built with MacPorts\n");
|
||||
need_pythonhome = FALSE;
|
||||
}
|
||||
g_free (tmp);
|
||||
|
||||
/* Minimum runtime paths */
|
||||
path_len = strlen (g_getenv ("PATH") ? g_getenv ("PATH") : "") + strlen (bin_dir) + 2;
|
||||
path = g_try_malloc (path_len);
|
||||
|
|
@ -469,12 +451,13 @@ gimp_macos_setenv (const char * progname)
|
|||
tmp = g_strdup_printf ("%s/girepository-1.0", lib_dir);
|
||||
g_setenv ("GI_TYPELIB_PATH", tmp, TRUE);
|
||||
g_free (tmp);
|
||||
if (need_pythonhome)
|
||||
tmp = g_strdup_printf ("%s/Frameworks/Python.framework/Versions/%s", gimp_installation_directory(), PYTHON_VERSION);
|
||||
if (tmp && !stat (tmp, &sb) && S_ISDIR (sb.st_mode))
|
||||
{
|
||||
tmp = g_strdup_printf ("%s/Library/Frameworks/Python.framework/Versions/%s", share_dir, PYTHON_VERSION);
|
||||
g_setenv ("PYTHONHOME", tmp, TRUE);
|
||||
g_free (tmp);
|
||||
}
|
||||
g_free (tmp);
|
||||
|
||||
g_free (lib_dir);
|
||||
g_free (share_dir);
|
||||
g_free (etc_dir);
|
||||
|
|
@ -587,12 +570,15 @@ main (int argc,
|
|||
#endif
|
||||
gint retval;
|
||||
gint i;
|
||||
#if defined(ENABLE_RELOCATABLE_RESOURCES) && defined(__APPLE__)
|
||||
gint newargc;
|
||||
#endif
|
||||
|
||||
gimp_attach_console_window ();
|
||||
|
||||
#if defined(ENABLE_RELOCATABLE_RESOURCES) && defined(__APPLE__)
|
||||
/* remove MacOS session identifier from the command line args */
|
||||
gint newargc = 0;
|
||||
newargc = 0;
|
||||
for (gint i = 0; i < argc; i++)
|
||||
{
|
||||
if (!g_str_has_prefix (argv[i], "-psn_"))
|
||||
|
|
@ -923,6 +909,8 @@ main (int argc,
|
|||
pdb_compat_mode,
|
||||
backtrace_file);
|
||||
|
||||
gimp_env_exit (FALSE);
|
||||
|
||||
g_free (backtrace_file);
|
||||
|
||||
g_clear_object (&system_gimprc_file);
|
||||
|
|
@ -976,8 +964,19 @@ gimp_attach_console_window (void)
|
|||
if (AttachConsole (ATTACH_PARENT_PROCESS) != 0)
|
||||
{
|
||||
/* 'r' is needed to prevent interleaving and '+' to support colors */
|
||||
#ifndef _UCRT
|
||||
freopen ("CONOUT$", "r+", stdout);
|
||||
freopen ("CONOUT$", "r+", stderr);
|
||||
#else
|
||||
FILE* fileOut;
|
||||
FILE* fileErr;
|
||||
|
||||
errno_t errOut = freopen_s (&fileOut, "CONOUT$", "r+", stdout);
|
||||
errno_t errErr = freopen_s (&fileErr, "CONOUT$", "r+", stderr);
|
||||
|
||||
if (errOut != 0 || errErr != 0)
|
||||
g_warning ("Failed to redirect streams to CONOUT$. stdout: %d, stderr: %d", errOut, errErr);
|
||||
#endif
|
||||
_flushall ();
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -587,8 +587,13 @@ gimp_curves_config_load_cruft (GimpCurvesConfig *config,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
#ifndef _UCRT
|
||||
if (sscanf (x_str, "%d", &index[i][j]) != 1 ||
|
||||
sscanf (y_str, "%d", &value[i][j]) != 1)
|
||||
#else
|
||||
if (sscanf_s (x_str, "%d", &index[i][j]) != 1 ||
|
||||
sscanf_s (y_str, "%d", &value[i][j]) != 1)
|
||||
#endif
|
||||
{
|
||||
g_set_error_literal (error,
|
||||
GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_PARSE,
|
||||
|
|
|
|||
|
|
@ -904,12 +904,21 @@ gimp_levels_config_load_cruft (GimpLevelsConfig *config,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
#ifndef _UCRT
|
||||
fields = sscanf (line, "%d %d %d %d %31s",
|
||||
&low_input[i],
|
||||
&high_input[i],
|
||||
&low_output[i],
|
||||
&high_output[i],
|
||||
float_buf);
|
||||
#else
|
||||
fields = sscanf_s (line, "%d %d %d %d %31s",
|
||||
&low_input[i],
|
||||
&high_input[i],
|
||||
&low_output[i],
|
||||
&high_output[i],
|
||||
float_buf, (unsigned) sizeof (float_buf));
|
||||
#endif
|
||||
|
||||
g_free (line);
|
||||
|
||||
|
|
|
|||
|
|
@ -591,7 +591,7 @@ struct PaintBuf : Base
|
|||
}
|
||||
};
|
||||
|
||||
static BasicDispatch<PaintBuf, ALGORITHM_PAINT_BUF> dispatch_paint_buf;
|
||||
static BasicDispatch<PaintBuf, ALGORITHM_PAINT_BUF> G_GNUC_UNUSED dispatch_paint_buf;
|
||||
|
||||
|
||||
/* PaintMask, dispatch_paint_mask():
|
||||
|
|
@ -691,7 +691,7 @@ struct DispatchStipple
|
|||
else
|
||||
visitor (identity<Stipple<Algorithm, FALSE>> ());
|
||||
}
|
||||
} static dispatch_stipple;
|
||||
} static G_GNUC_UNUSED dispatch_stipple;
|
||||
|
||||
|
||||
/* CompMask, dispatch_comp_mask(), has_comp_mask(), comp_mask_data():
|
||||
|
|
@ -734,7 +734,7 @@ struct CompMask : Base
|
|||
};
|
||||
};
|
||||
|
||||
static BasicDispatch<CompMask, ALGORITHM_COMP_MASK> dispatch_comp_mask;
|
||||
static BasicDispatch<CompMask, ALGORITHM_COMP_MASK> G_GNUC_UNUSED dispatch_comp_mask;
|
||||
|
||||
template <class Base>
|
||||
static constexpr gboolean
|
||||
|
|
@ -815,7 +815,7 @@ static BasicDispatch<
|
|||
TempCompMask,
|
||||
ALGORITHM_TEMP_COMP_MASK,
|
||||
decltype (dispatch_comp_mask)
|
||||
> dispatch_temp_comp_mask;
|
||||
> G_GNUC_UNUSED dispatch_temp_comp_mask;
|
||||
|
||||
|
||||
/* CompBuffer, dispatch_comp_buffer(), has_comp_buffer(), comp_buffer_data():
|
||||
|
|
@ -858,7 +858,7 @@ struct CompBuffer : Base
|
|||
};
|
||||
};
|
||||
|
||||
static BasicDispatch<CompBuffer, ALGORITHM_COMP_BUFFER> dispatch_comp_buffer;
|
||||
static BasicDispatch<CompBuffer, ALGORITHM_COMP_BUFFER> G_GNUC_UNUSED dispatch_comp_buffer;
|
||||
|
||||
template <class Base>
|
||||
static constexpr gboolean
|
||||
|
|
@ -939,7 +939,7 @@ static BasicDispatch<
|
|||
TempCompBuffer,
|
||||
ALGORITHM_TEMP_COMP_BUFFER,
|
||||
decltype (dispatch_comp_buffer)
|
||||
> dispatch_temp_comp_buffer;
|
||||
> G_GNUC_UNUSED dispatch_temp_comp_buffer;
|
||||
|
||||
|
||||
/* CanvasBufferIterator, DispatchCanvasBufferIterator:
|
||||
|
|
|
|||
|
|
@ -1287,10 +1287,10 @@ static const gchar *expand_props[] =
|
|||
"expand-mask-fill-type",
|
||||
};
|
||||
|
||||
static const gint max_n_props = (G_N_ELEMENTS (brush_props) +
|
||||
G_N_ELEMENTS (dynamics_props) +
|
||||
G_N_ELEMENTS (gradient_props) +
|
||||
G_N_ELEMENTS (expand_props));
|
||||
#define max_n_props (G_N_ELEMENTS (brush_props) + \
|
||||
G_N_ELEMENTS (dynamics_props) + \
|
||||
G_N_ELEMENTS (gradient_props) + \
|
||||
G_N_ELEMENTS (expand_props))
|
||||
|
||||
gboolean
|
||||
gimp_paint_options_is_prop (const gchar *prop_name,
|
||||
|
|
@ -1377,3 +1377,5 @@ gimp_paint_options_copy_props (GimpPaintOptions *src,
|
|||
g_value_unset (&values[n_props]);
|
||||
}
|
||||
}
|
||||
|
||||
#undef max_n_props
|
||||
|
|
|
|||
|
|
@ -246,8 +246,6 @@ gimp_smudge_start (GimpPaintCore *paint_core,
|
|||
dest_pickable_off_y = 0;
|
||||
}
|
||||
|
||||
pickable_buffer = gimp_pickable_get_buffer (dest_pickable);
|
||||
|
||||
n_strokes = gimp_symmetry_get_size (sym);
|
||||
for (i = 0; i < n_strokes; i++)
|
||||
{
|
||||
|
|
@ -280,6 +278,11 @@ gimp_smudge_start (GimpPaintCore *paint_core,
|
|||
if (! paint_buffer)
|
||||
continue;
|
||||
|
||||
/* Fetch the buffer _after_ gimp_paint_core_get_paint_buffer() as it
|
||||
* may have expanded the drawable when "Expand Layers" is enabled.
|
||||
*/
|
||||
pickable_buffer = gimp_pickable_get_buffer (dest_pickable);
|
||||
|
||||
gimp_smudge_accumulator_coords (paint_core, &coords, 0, &x, &y);
|
||||
|
||||
/* If clipped, prefill the smudge buffer with the color at the
|
||||
|
|
|
|||
|
|
@ -207,7 +207,8 @@ static gboolean parse_svg_length (const gchar *value,
|
|||
static gboolean parse_svg_viewbox (const gchar *value,
|
||||
gdouble *width,
|
||||
gdouble *height,
|
||||
GimpMatrix3 *matrix);
|
||||
GimpMatrix3 *matrix,
|
||||
gboolean scale);
|
||||
static gboolean parse_svg_transform (const gchar *value,
|
||||
GimpMatrix3 *matrix);
|
||||
static GList * parse_path_data (const gchar *data);
|
||||
|
|
@ -636,7 +637,7 @@ svg_handler_svg_start (SvgHandler *handler,
|
|||
gimp_matrix3_translate (matrix, x, y);
|
||||
}
|
||||
|
||||
if (viewbox && parse_svg_viewbox (viewbox, &w, &h, &box))
|
||||
if (viewbox && parse_svg_viewbox (viewbox, &w, &h, &box, parser->scale))
|
||||
{
|
||||
gimp_matrix3_mult (&box, matrix);
|
||||
}
|
||||
|
|
@ -1212,28 +1213,48 @@ static gboolean
|
|||
parse_svg_viewbox (const gchar *value,
|
||||
gdouble *width,
|
||||
gdouble *height,
|
||||
GimpMatrix3 *matrix)
|
||||
GimpMatrix3 *matrix,
|
||||
gboolean scale)
|
||||
{
|
||||
gdouble x, y, w, h;
|
||||
gchar *tok;
|
||||
gchar *str = g_strdup (value);
|
||||
gboolean success = FALSE;
|
||||
#ifdef _UCRT
|
||||
gchar *context = NULL;
|
||||
#endif
|
||||
|
||||
x = y = w = h = 0;
|
||||
|
||||
#ifndef _UCRT
|
||||
tok = strtok (str, ", \t");
|
||||
#else
|
||||
tok = strtok_s (str, ", \t", &context);
|
||||
#endif
|
||||
if (tok)
|
||||
{
|
||||
x = g_ascii_strtod (tok, NULL);
|
||||
#ifndef _UCRT
|
||||
tok = strtok (NULL, ", \t");
|
||||
#else
|
||||
tok = strtok_s (NULL, ", \t", &context);
|
||||
#endif
|
||||
if (tok)
|
||||
{
|
||||
y = g_ascii_strtod (tok, NULL);
|
||||
#ifndef _UCRT
|
||||
tok = strtok (NULL, ", \t");
|
||||
#else
|
||||
tok = strtok_s (NULL, ", \t", &context);
|
||||
#endif
|
||||
if (tok != NULL)
|
||||
{
|
||||
w = g_ascii_strtod (tok, NULL);
|
||||
#ifndef _UCRT
|
||||
tok = strtok (NULL, ", \t");
|
||||
#else
|
||||
tok = strtok_s (NULL, ", \t", &context);
|
||||
#endif
|
||||
if (tok)
|
||||
{
|
||||
h = g_ascii_strtod (tok, NULL);
|
||||
|
|
@ -1252,7 +1273,8 @@ parse_svg_viewbox (const gchar *value,
|
|||
|
||||
if (w > 0.0 && h > 0.0)
|
||||
{
|
||||
gimp_matrix3_scale (matrix, *width / w, *height / h);
|
||||
if (scale)
|
||||
gimp_matrix3_scale (matrix, *width / w, *height / h);
|
||||
}
|
||||
else /* disable rendering of the element */
|
||||
{
|
||||
|
|
|
|||
|
|
@ -113,6 +113,13 @@ static void gimp_vector_layer_scale (GimpItem *ite
|
|||
gint new_offset_y,
|
||||
GimpInterpolationType interp_type,
|
||||
GimpProgress *progress);
|
||||
static void gimp_vector_layer_resize (GimpItem *item,
|
||||
GimpContext *context,
|
||||
GimpFillType fill_type,
|
||||
gint new_width,
|
||||
gint new_height,
|
||||
gint offset_x,
|
||||
gint offset_y);
|
||||
static void gimp_vector_layer_flip (GimpItem *item,
|
||||
GimpContext *context,
|
||||
GimpOrientationType flip_type,
|
||||
|
|
@ -180,6 +187,7 @@ gimp_vector_layer_class_init (GimpVectorLayerClass *klass)
|
|||
item_class->duplicate = gimp_vector_layer_duplicate;
|
||||
item_class->rename = gimp_rasterizable_rename;
|
||||
item_class->scale = gimp_vector_layer_scale;
|
||||
item_class->resize = gimp_vector_layer_resize;
|
||||
item_class->flip = gimp_vector_layer_flip;
|
||||
item_class->rotate = gimp_vector_layer_rotate;
|
||||
item_class->transform = gimp_vector_layer_transform;
|
||||
|
|
@ -390,10 +398,10 @@ gimp_vector_layer_convert (GimpItem *item,
|
|||
|
||||
if (path)
|
||||
{
|
||||
gimp_item_convert (GIMP_ITEM (path), dest_image, GIMP_TYPE_PATH);
|
||||
GIMP_ITEM_GET_CLASS (path)->convert (GIMP_ITEM (path), dest_image,
|
||||
G_TYPE_FROM_INSTANCE (path));
|
||||
|
||||
if (! gimp_item_is_attached (GIMP_ITEM (path)) &&
|
||||
gimp_item_get_image (GIMP_ITEM (path)) == dest_image)
|
||||
if (! gimp_item_is_attached (GIMP_ITEM (path)))
|
||||
gimp_image_add_path (dest_image, path, NULL, -1, FALSE);
|
||||
}
|
||||
|
||||
|
|
@ -452,7 +460,7 @@ gimp_vector_layer_translate (GimpLayer *layer,
|
|||
{
|
||||
GimpVectorLayer *vector_layer = GIMP_VECTOR_LAYER (layer);
|
||||
|
||||
if (vector_layer->options && vector_layer->options->path)
|
||||
if (gimp_item_is_vector_layer (GIMP_ITEM (layer)))
|
||||
{
|
||||
gimp_item_translate (GIMP_ITEM (vector_layer->options->path),
|
||||
offset_x, offset_y, FALSE);
|
||||
|
|
@ -474,11 +482,14 @@ gimp_vector_layer_scale (GimpItem *item,
|
|||
{
|
||||
GimpVectorLayer *vector_layer = GIMP_VECTOR_LAYER (item);
|
||||
|
||||
if (vector_layer->options && vector_layer->options->path)
|
||||
if (gimp_item_is_vector_layer (item))
|
||||
{
|
||||
gimp_item_scale (GIMP_ITEM (vector_layer->options->path),
|
||||
new_width, new_height, new_offset_x, new_offset_y,
|
||||
interp_type, progress);
|
||||
gdouble scale_x = new_width / (gdouble) gimp_item_get_width (item);
|
||||
gdouble scale_y = new_height / (gdouble) gimp_item_get_height (item);
|
||||
|
||||
gimp_item_scale_by_factors (GIMP_ITEM (vector_layer->options->path),
|
||||
scale_x, scale_y,
|
||||
interp_type, progress);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -488,6 +499,31 @@ gimp_vector_layer_scale (GimpItem *item,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_vector_layer_resize (GimpItem *item,
|
||||
GimpContext *context,
|
||||
GimpFillType fill_type,
|
||||
gint new_width,
|
||||
gint new_height,
|
||||
gint offset_x,
|
||||
gint offset_y)
|
||||
{
|
||||
GimpVectorLayer *vector_layer = GIMP_VECTOR_LAYER (item);
|
||||
|
||||
if (gimp_item_is_vector_layer (item))
|
||||
{
|
||||
gimp_item_resize (GIMP_ITEM (vector_layer->options->path),
|
||||
context, fill_type, new_width, new_height,
|
||||
offset_x, offset_y);
|
||||
}
|
||||
else
|
||||
{
|
||||
GIMP_ITEM_CLASS (parent_class)->resize (item, context, fill_type,
|
||||
new_width, new_height, offset_x,
|
||||
offset_y);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_vector_layer_flip (GimpItem *item,
|
||||
GimpContext *context,
|
||||
|
|
@ -497,7 +533,7 @@ gimp_vector_layer_flip (GimpItem *item,
|
|||
{
|
||||
GimpVectorLayer *vector_layer = GIMP_VECTOR_LAYER (item);
|
||||
|
||||
if (vector_layer->options && vector_layer->options->path)
|
||||
if (gimp_item_is_vector_layer (item))
|
||||
{
|
||||
gimp_item_flip (GIMP_ITEM (vector_layer->options->path),
|
||||
context, flip_type, axis, clip_result);
|
||||
|
|
@ -519,7 +555,7 @@ gimp_vector_layer_rotate (GimpItem *item,
|
|||
{
|
||||
GimpVectorLayer *vector_layer = GIMP_VECTOR_LAYER (item);
|
||||
|
||||
if (vector_layer->options && vector_layer->options->path)
|
||||
if (gimp_item_is_vector_layer (item))
|
||||
{
|
||||
gimp_item_rotate (GIMP_ITEM (vector_layer->options->path),
|
||||
context, rotate_type, center_x, center_y, clip_result);
|
||||
|
|
@ -543,7 +579,7 @@ gimp_vector_layer_transform (GimpItem *item,
|
|||
{
|
||||
GimpVectorLayer *vector_layer = GIMP_VECTOR_LAYER (item);
|
||||
|
||||
if (vector_layer->options && vector_layer->options->path)
|
||||
if (gimp_item_is_vector_layer (item))
|
||||
{
|
||||
gimp_item_transform (GIMP_ITEM (vector_layer->options->path),
|
||||
context, matrix, direction, interp_type,
|
||||
|
|
@ -702,6 +738,49 @@ gimp_vector_layer_get_options (GimpVectorLayer *layer)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_vector_layer_set (GimpVectorLayer *layer,
|
||||
const gchar *undo_desc,
|
||||
const gchar *first_property_name,
|
||||
...)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpVectorLayerOptions *options;
|
||||
va_list var_args;
|
||||
|
||||
g_return_if_fail (gimp_item_is_vector_layer (GIMP_ITEM (layer)));
|
||||
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (layer)));
|
||||
|
||||
options = layer->options;
|
||||
|
||||
if (! options)
|
||||
return;
|
||||
|
||||
image = gimp_item_get_image (GIMP_ITEM (layer));
|
||||
|
||||
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_VECTOR, undo_desc);
|
||||
|
||||
g_object_freeze_notify (G_OBJECT (layer));
|
||||
|
||||
if (gimp_rasterizable_is_rasterized (GIMP_RASTERIZABLE (layer)))
|
||||
gimp_image_undo_push_drawable_mod (image, NULL,
|
||||
GIMP_DRAWABLE (layer), TRUE);
|
||||
|
||||
gimp_image_undo_push_vector_layer (image, undo_desc, layer, NULL);
|
||||
|
||||
va_start (var_args, first_property_name);
|
||||
g_object_set_valist (G_OBJECT (options), first_property_name,
|
||||
var_args);
|
||||
va_end (var_args);
|
||||
|
||||
if (gimp_rasterizable_is_rasterized (GIMP_RASTERIZABLE (layer)))
|
||||
gimp_rasterizable_restore (GIMP_RASTERIZABLE (layer));
|
||||
|
||||
g_object_thaw_notify (G_OBJECT (layer));
|
||||
|
||||
gimp_image_undo_group_end (image);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_vector_layer_refresh (GimpVectorLayer *layer)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -62,6 +62,11 @@ GimpPath * gimp_vector_layer_get_path (GimpVectorLayer *layer)
|
|||
|
||||
GimpVectorLayerOptions * gimp_vector_layer_get_options (GimpVectorLayer *layer);
|
||||
|
||||
void gimp_vector_layer_set (GimpVectorLayer *layer,
|
||||
const gchar *undo_desc,
|
||||
const gchar *first_property_name,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
|
||||
void gimp_vector_layer_refresh (GimpVectorLayer *layer);
|
||||
|
||||
gboolean gimp_item_is_vector_layer (GimpItem *item);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@
|
|||
#include "path-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpfilloptions.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimppattern.h"
|
||||
#include "core/gimpstrokeoptions.h"
|
||||
|
||||
#include "gimppath.h"
|
||||
|
|
@ -51,7 +53,11 @@ enum
|
|||
PROP_ENABLE_FILL,
|
||||
PROP_FILL_OPTIONS,
|
||||
PROP_ENABLE_STROKE,
|
||||
PROP_STROKE_OPTIONS
|
||||
PROP_STROKE_OPTIONS,
|
||||
/* Individual Fill Options */
|
||||
PROP_FILL_STYLE,
|
||||
PROP_FILL_COLOR,
|
||||
PROP_FILL_PATTERN
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -85,6 +91,7 @@ static void
|
|||
gimp_vector_layer_options_class_init (GimpVectorLayerOptionsClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GeglColor *black = gegl_color_new ("black");
|
||||
|
||||
object_class->constructor = gimp_vector_layer_options_constructor;
|
||||
object_class->finalize = gimp_vector_layer_options_finalize;
|
||||
|
|
@ -132,6 +139,28 @@ gimp_vector_layer_options_class_init (GimpVectorLayerOptionsClass *klass)
|
|||
GIMP_TYPE_STROKE_OPTIONS,
|
||||
G_PARAM_STATIC_STRINGS |
|
||||
GIMP_CONFIG_PARAM_AGGREGATE);
|
||||
|
||||
/* Alias for fill properties */
|
||||
GIMP_CONFIG_PROP_ENUM (object_class, PROP_FILL_STYLE,
|
||||
"fill-style",
|
||||
NULL, NULL,
|
||||
GIMP_TYPE_CUSTOM_STYLE,
|
||||
GIMP_CUSTOM_STYLE_SOLID_COLOR,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
GIMP_CONFIG_PROP_COLOR (object_class, PROP_FILL_COLOR,
|
||||
"fill-color",
|
||||
NULL, NULL,
|
||||
FALSE, black,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
GIMP_CONFIG_PROP_OBJECT (object_class, PROP_FILL_PATTERN,
|
||||
"fill-pattern",
|
||||
NULL, NULL,
|
||||
GIMP_TYPE_PATTERN,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
g_object_unref (black);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -218,6 +247,12 @@ gimp_vector_layer_options_get_property (GObject *object,
|
|||
g_value_set_object (value, options->stroke_options);
|
||||
break;
|
||||
|
||||
/* Alias for fill properties */
|
||||
case PROP_FILL_STYLE:
|
||||
case PROP_FILL_COLOR:
|
||||
case PROP_FILL_PATTERN:
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
break;
|
||||
|
|
@ -301,6 +336,24 @@ gimp_vector_layer_options_set_property (GObject *object,
|
|||
}
|
||||
break;
|
||||
|
||||
/* Alias for fill properties */
|
||||
case PROP_FILL_STYLE:
|
||||
if (options->fill_options)
|
||||
g_object_set (GIMP_FILL_OPTIONS (options->fill_options),
|
||||
"custom-style", g_value_get_enum (value),
|
||||
NULL);
|
||||
break;
|
||||
|
||||
case PROP_FILL_COLOR:
|
||||
gimp_context_set_foreground (GIMP_CONTEXT (options->fill_options),
|
||||
g_value_get_object (value));
|
||||
break;
|
||||
|
||||
case PROP_FILL_PATTERN:
|
||||
gimp_context_set_pattern (GIMP_CONTEXT (options->fill_options),
|
||||
g_value_get_object (value));
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -3735,7 +3735,7 @@ register_context_procs (GimpPDB *pdb)
|
|||
gimp_param_spec_unit ("line-width-unit",
|
||||
"line width unit",
|
||||
"The line width setting unit",
|
||||
FALSE,
|
||||
TRUE,
|
||||
FALSE,
|
||||
gimp_unit_inch (),
|
||||
GIMP_PARAM_READWRITE));
|
||||
|
|
|
|||
|
|
@ -219,7 +219,8 @@ temp_file_invoker (GimpProcedure *procedure,
|
|||
|
||||
if (success)
|
||||
{
|
||||
file = gimp_get_temp_file (gimp, extension);
|
||||
file = gimp_get_temp_file (gimp, extension, error);
|
||||
success = (file != NULL);
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success,
|
||||
|
|
@ -291,12 +292,18 @@ register_gimp_procs (GimpPDB *pdb)
|
|||
"gimp-quit");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Causes GIMP to exit gracefully.",
|
||||
"If there are unsaved images in an interactive GIMP session, the user will be asked for confirmation. If force is TRUE, the application is quit without querying the user to save any dirty images.",
|
||||
"If there are unsaved images in an interactive GIMP session, the user will be asked for confirmation. If force is TRUE, the application is quit without querying the user to save any dirty images.\n"
|
||||
"\n"
|
||||
"This procedure is deprecated without any replacement. Scripts and plug-ins should not request the main process to exit. If you wish to run GIMP non-interactively so that it exits immediately when the batch script ends, call the executable with option `--quit`.\n"
|
||||
"\n"
|
||||
"Deprecated: There is no replacement for this procedure.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Spencer Kimball & Peter Mattis",
|
||||
"Spencer Kimball & Peter Mattis",
|
||||
"1995-1996");
|
||||
gimp_procedure_set_deprecated (procedure,
|
||||
"NONE");
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_boolean ("force",
|
||||
"force",
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#include "internal-procs.h"
|
||||
|
||||
|
||||
/* 785 procedures registered total */
|
||||
/* 786 procedures registered total */
|
||||
|
||||
void
|
||||
internal_procs_init (GimpPDB *pdb)
|
||||
|
|
|
|||
|
|
@ -48,6 +48,38 @@
|
|||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static GimpValueArray *
|
||||
resources_loaded_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
const gchar *type_name;
|
||||
gboolean loaded = FALSE;
|
||||
|
||||
type_name = g_value_get_string (gimp_value_array_index (args, 0));
|
||||
|
||||
if (success)
|
||||
{
|
||||
if (g_type_from_name (type_name) == GIMP_TYPE_FONT)
|
||||
loaded = ! gimp->no_fonts;
|
||||
else
|
||||
loaded = ! gimp->no_data;
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
|
||||
if (success)
|
||||
g_value_set_boolean (gimp_value_array_index (return_vals, 1), loaded);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
resource_get_by_name_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
|
|
@ -510,6 +542,37 @@ register_resource_procs (GimpPDB *pdb)
|
|||
{
|
||||
GimpProcedure *procedure;
|
||||
|
||||
/*
|
||||
* gimp-resources-loaded
|
||||
*/
|
||||
procedure = gimp_procedure_new (resources_loaded_invoker, TRUE);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-resources-loaded");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Returns whether resource of a given type were loaded.",
|
||||
"Returns whether resources of a given type were loaded.\n"
|
||||
"In particular, it would return FALSE if GIMP was started with `--no-data` or `--no-fonts` for fonts.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Jehan",
|
||||
"Jehan",
|
||||
"2026");
|
||||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_string ("type-name",
|
||||
"type name",
|
||||
"The name of the resource type e.g. GimpFont",
|
||||
FALSE, FALSE, TRUE,
|
||||
NULL,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
g_param_spec_boolean ("loaded",
|
||||
"loaded",
|
||||
"Whether resources of @type_name were loaded",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-resource-get-by-name
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1851,7 +1851,7 @@ register_vector_layer_procs (GimpPDB *pdb)
|
|||
gimp_param_spec_unit ("unit",
|
||||
"unit",
|
||||
"The stroke width unit.",
|
||||
FALSE,
|
||||
TRUE,
|
||||
FALSE,
|
||||
gimp_unit_inch (),
|
||||
GIMP_PARAM_READWRITE));
|
||||
|
|
|
|||
|
|
@ -111,10 +111,6 @@ static gboolean gimp_plug_in_write (GIOChannel *channel,
|
|||
static gboolean gimp_plug_in_flush (GIOChannel *channel,
|
||||
gpointer data);
|
||||
|
||||
#if defined G_OS_WIN32 && defined WIN32_32BIT_DLL_FOLDER
|
||||
static void gimp_plug_in_set_dll_directory (const gchar *path);
|
||||
#endif
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
static void gimp_plug_in_close_waitpid (GPid pid,
|
||||
gint status,
|
||||
|
|
@ -361,39 +357,6 @@ gimp_plug_in_flush (GIOChannel *channel,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#if defined G_OS_WIN32 && defined WIN32_32BIT_DLL_FOLDER
|
||||
static void
|
||||
gimp_plug_in_set_dll_directory (const gchar *path)
|
||||
{
|
||||
LPWSTR w_path;
|
||||
const gchar *install_dir;
|
||||
gchar *bin_dir;
|
||||
LPWSTR w_bin_dir;
|
||||
DWORD BinaryType;
|
||||
|
||||
w_path = NULL;
|
||||
w_bin_dir = NULL;
|
||||
install_dir = gimp_installation_directory ();
|
||||
if (path &&
|
||||
(w_path = g_utf8_to_utf16 (path, -1, NULL, NULL, NULL)) &&
|
||||
GetBinaryTypeW (w_path, &BinaryType) &&
|
||||
BinaryType == SCS_32BIT_BINARY)
|
||||
bin_dir = g_build_filename (install_dir, WIN32_32BIT_DLL_FOLDER, NULL);
|
||||
else
|
||||
bin_dir = g_build_filename (install_dir, "bin", NULL);
|
||||
|
||||
w_bin_dir = g_utf8_to_utf16 (bin_dir, -1, NULL, NULL, NULL);
|
||||
if (w_bin_dir)
|
||||
{
|
||||
SetDllDirectoryW (w_bin_dir);
|
||||
g_free (w_bin_dir);
|
||||
}
|
||||
|
||||
g_free (bin_dir);
|
||||
g_free (w_path);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
static void
|
||||
gimp_plug_in_close_waitpid (GPid pid,
|
||||
|
|
@ -649,9 +612,6 @@ gimp_plug_in_open (GimpPlugIn *plug_in,
|
|||
/* Fork another process. We'll remember the process id so that we
|
||||
* can later use it to kill the filter if necessary.
|
||||
*/
|
||||
#if defined G_OS_WIN32 && defined WIN32_32BIT_DLL_FOLDER
|
||||
gimp_plug_in_set_dll_directory (argv[0]);
|
||||
#endif
|
||||
if (! gimp_spawn_async (argv, envp, spawn_flags, &plug_in->pid, &error))
|
||||
{
|
||||
gimp_message (plug_in->manager->gimp, NULL, GIMP_MESSAGE_ERROR,
|
||||
|
|
@ -690,10 +650,6 @@ gimp_plug_in_open (GimpPlugIn *plug_in,
|
|||
|
||||
cleanup:
|
||||
|
||||
#if defined G_OS_WIN32 && defined WIN32_32BIT_DLL_FOLDER
|
||||
gimp_plug_in_set_dll_directory (NULL);
|
||||
#endif
|
||||
|
||||
if (debug)
|
||||
g_free (argv);
|
||||
|
||||
|
|
|
|||
|
|
@ -588,7 +588,11 @@ file_convert_string (const gchar *instr,
|
|||
}
|
||||
|
||||
*tmpptr = '\0';
|
||||
#ifndef _UCRT
|
||||
sscanf ((gchar *) tmp, "%o", &k);
|
||||
#else
|
||||
sscanf_s ((gchar *) tmp, "%o", &k);
|
||||
#endif
|
||||
*(uout++) = k;
|
||||
break;
|
||||
|
||||
|
|
@ -626,7 +630,12 @@ file_check_single_magic (const gchar *offset,
|
|||
gchar num_operator;
|
||||
|
||||
/* Check offset */
|
||||
#ifndef _UCRT
|
||||
if (sscanf (offset, "%ld", &offs) != 1)
|
||||
#else
|
||||
if (sscanf_s (offset, "%ld", &offs) != 1)
|
||||
#endif
|
||||
|
||||
return FILE_MATCH_NONE;
|
||||
|
||||
/* Check type of test */
|
||||
|
|
@ -667,11 +676,23 @@ file_check_single_magic (const gchar *offset,
|
|||
if (g_ascii_isdigit (num_operator_ptr[1]))
|
||||
{
|
||||
if (num_operator_ptr[1] != '0') /* decimal */
|
||||
#ifndef _UCRT
|
||||
sscanf (num_operator_ptr+1, "%lu", &num_operator_val);
|
||||
#else
|
||||
sscanf_s (num_operator_ptr+1, "%lu", &num_operator_val);
|
||||
#endif
|
||||
else if (num_operator_ptr[2] == 'x') /* hexadecimal */
|
||||
#ifndef _UCRT
|
||||
sscanf (num_operator_ptr+3, "%lx", &num_operator_val);
|
||||
#else
|
||||
sscanf_s (num_operator_ptr+3, "%lx", &num_operator_val);
|
||||
#endif
|
||||
else /* octal */
|
||||
#ifndef _UCRT
|
||||
sscanf (num_operator_ptr+2, "%lo", &num_operator_val);
|
||||
#else
|
||||
sscanf_s (num_operator_ptr+2, "%lo", &num_operator_val);
|
||||
#endif
|
||||
|
||||
num_operator = *num_operator_ptr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1117,17 +1117,28 @@ extensions_parse (gchar *extensions)
|
|||
{
|
||||
gchar *extension;
|
||||
gchar *next_token;
|
||||
#ifdef _UCRT
|
||||
gchar *context = NULL;
|
||||
#endif
|
||||
|
||||
/* work on a copy */
|
||||
extensions = g_strdup (extensions);
|
||||
|
||||
next_token = extensions;
|
||||
#ifndef _UCRT
|
||||
extension = strtok (next_token, " \t,");
|
||||
#else
|
||||
extension = strtok_s (next_token, " \t,", &context);
|
||||
#endif
|
||||
|
||||
while (extension)
|
||||
{
|
||||
list = g_slist_prepend (list, g_strdup (extension));
|
||||
#ifndef _UCRT
|
||||
extension = strtok (NULL, " \t,");
|
||||
#else
|
||||
extension = strtok_s (NULL, " \t,", &context);
|
||||
#endif
|
||||
}
|
||||
|
||||
g_free (extensions);
|
||||
|
|
|
|||
|
|
@ -43,12 +43,12 @@ typedef struct
|
|||
gdouble min; /* minimal allowable slider value */
|
||||
gdouble max; /* maximal allowable slider value */
|
||||
|
||||
gboolean visible : 1; /* slider is visible */
|
||||
gboolean selectable : 1; /* slider is selectable */
|
||||
gboolean movable : 1; /* slider movable */
|
||||
gboolean removable : 1; /* slider is removable */
|
||||
guint visible : 1; /* slider is visible */
|
||||
guint selectable : 1; /* slider is selectable */
|
||||
guint movable : 1; /* slider movable */
|
||||
guint removable : 1; /* slider is removable */
|
||||
|
||||
gboolean autohide : 1; /* whether to autohide the slider */
|
||||
guint autohide : 1; /* whether to autohide the slider */
|
||||
GimpHandleType type; /* slider handle type */
|
||||
gdouble size; /* slider handle size, as a fraction of *
|
||||
* the default size */
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ gimp_font_factory_finalize (GObject *object)
|
|||
g_slist_free_full (GET_PRIVATE (font_factory)->fonts_renaming_config, (GDestroyNotify) g_free);
|
||||
g_free (GET_PRIVATE (font_factory)->sysconf);
|
||||
g_free (GET_PRIVATE (font_factory)->conf);
|
||||
g_object_unref (GET_PRIVATE (font_factory)->pango_context);
|
||||
g_clear_object (&GET_PRIVATE (font_factory)->pango_context);
|
||||
FcConfigDestroy (FcConfigGetCurrent ());
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
|
|
@ -867,7 +867,7 @@ gimp_font_factory_load_names (GimpFontFactory *factory)
|
|||
fd = g_open ((gchar *) file, O_RDONLY, 0);
|
||||
if (fd == -1)
|
||||
{
|
||||
g_string_append_printf (ignored_fonts, "- %s (access error: %s)\n", file, strerror (errno));
|
||||
g_string_append_printf (ignored_fonts, "- %s (access error: %s)\n", file, g_strerror (errno));
|
||||
n_ignored++;
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,6 +89,22 @@ gimp_text_from_parasite (const GimpParasite *parasite,
|
|||
gboolean has_markup = g_str_has_prefix (parasite_data, "(markup ");
|
||||
GimpParasite *new_parasite = NULL;
|
||||
GString *new_data;
|
||||
gboolean edited_data = FALSE;
|
||||
|
||||
if (! has_markup && strstr (parasite_data, "(markup \"\")") != NULL)
|
||||
{
|
||||
/* A bug in GIMP 3.2.2 may have created files with both a text
|
||||
* and an empty markup. Get rid of the markup which is invalid
|
||||
* anyway, so that it doesn't override the bare text.
|
||||
* See #16169.
|
||||
*/
|
||||
new_data = g_string_new (parasite_data);
|
||||
g_string_replace (new_data, "(markup \"\")", "", 1);
|
||||
parasite_data = g_string_free (new_data, FALSE);
|
||||
parasite_data_size = strlen (parasite_data) + 1;
|
||||
|
||||
edited_data = TRUE;
|
||||
}
|
||||
|
||||
*before_xcf_v19 = (strstr (parasite_data, "(font \"GimpFont\"") == NULL);
|
||||
/* This is for backward compatibility with older xcf files.
|
||||
|
|
@ -177,6 +193,14 @@ gimp_text_from_parasite (const GimpParasite *parasite,
|
|||
|
||||
g_string_free (new_data, TRUE);
|
||||
}
|
||||
else if (edited_data)
|
||||
{
|
||||
new_parasite = gimp_parasite_new (gimp_parasite_get_name (parasite),
|
||||
gimp_parasite_get_flags (parasite),
|
||||
parasite_data_size,
|
||||
parasite_data);
|
||||
parasite = new_parasite;
|
||||
}
|
||||
|
||||
if (error == NULL || *error == NULL)
|
||||
gimp_config_deserialize_parasite (GIMP_CONFIG (text),
|
||||
|
|
@ -185,6 +209,8 @@ gimp_text_from_parasite (const GimpParasite *parasite,
|
|||
error);
|
||||
|
||||
gimp_parasite_free (new_parasite);
|
||||
if (edited_data)
|
||||
g_free (parasite_data);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -106,11 +106,19 @@ gimp_text_font_name_from_xlfd (const gchar *xlfd)
|
|||
switch (*fields[i])
|
||||
{
|
||||
case 'i':
|
||||
#ifndef _UCRT
|
||||
strcpy (buffers[i], "italic");
|
||||
#else
|
||||
strcpy_s (buffers[i], sizeof (buffers[i]), "italic");
|
||||
#endif
|
||||
i++;
|
||||
break;
|
||||
case 'o':
|
||||
#ifndef _UCRT
|
||||
strcpy (buffers[i], "oblique");
|
||||
#else
|
||||
strcpy_s (buffers[i], sizeof (buffers[i]), "oblique");
|
||||
#endif
|
||||
i++;
|
||||
break;
|
||||
case 'r':
|
||||
|
|
|
|||
|
|
@ -112,6 +112,8 @@ struct _GimpEditSelectionTool
|
|||
|
||||
gdouble last_motion_x; /* Previous coords sent to _motion */
|
||||
gdouble last_motion_y;
|
||||
|
||||
gboolean saved_show_selection;
|
||||
};
|
||||
|
||||
struct _GimpEditSelectionToolClass
|
||||
|
|
@ -177,7 +179,8 @@ gimp_edit_selection_tool_init (GimpEditSelectionTool *edit_select)
|
|||
{
|
||||
GimpTool *tool = GIMP_TOOL (edit_select);
|
||||
|
||||
edit_select->first_move = TRUE;
|
||||
edit_select->first_move = TRUE;
|
||||
edit_select->saved_show_selection = FALSE;
|
||||
|
||||
gimp_tool_control_set_active_modifiers (tool->control,
|
||||
GIMP_TOOL_ACTIVE_MODIFIERS_SEPARATE);
|
||||
|
|
@ -228,6 +231,9 @@ gimp_edit_selection_tool_start (GimpTool *parent_tool,
|
|||
shell = gimp_display_get_shell (display);
|
||||
image = gimp_display_get_image (display);
|
||||
|
||||
edit_select->saved_show_selection =
|
||||
gimp_display_shell_get_show_selection (shell);
|
||||
|
||||
/* Make a check to see if it should be a floating selection translation */
|
||||
if ((edit_mode == GIMP_TRANSLATE_MODE_MASK_TO_LAYER ||
|
||||
edit_mode == GIMP_TRANSLATE_MODE_MASK_COPY_TO_LAYER) &&
|
||||
|
|
@ -244,6 +250,11 @@ gimp_edit_selection_tool_start (GimpTool *parent_tool,
|
|||
edit_mode = GIMP_TRANSLATE_MODE_FLOATING_SEL;
|
||||
}
|
||||
|
||||
/* Turn off "marching ants" when moving selections or floating layers
|
||||
* for better performance. */
|
||||
if (edit_mode == GIMP_TRANSLATE_MODE_FLOATING_SEL)
|
||||
gimp_display_shell_set_show_selection (shell, FALSE);
|
||||
|
||||
edit_select->edit_mode = edit_mode;
|
||||
|
||||
gimp_edit_selection_tool_start_undo_group (edit_select, image);
|
||||
|
|
@ -460,6 +471,9 @@ gimp_edit_selection_tool_button_release (GimpTool *tool,
|
|||
shell->equidistance_side_vertical = GIMP_ARRANGE_HFILL;
|
||||
shell->snapped_side_horizontal = GIMP_ARRANGE_HFILL;
|
||||
shell->snapped_side_vertical = GIMP_ARRANGE_HFILL;
|
||||
|
||||
gimp_display_shell_set_show_selection (shell,
|
||||
edit_select->saved_show_selection);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -612,6 +612,7 @@ gimp_selection_tool_start_edit (GimpSelectionTool *sel_tool,
|
|||
{
|
||||
GimpTool *tool;
|
||||
GimpSelectionOptions *options;
|
||||
GimpDisplayShell *shell;
|
||||
GError *error = NULL;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_SELECTION_TOOL (sel_tool), FALSE);
|
||||
|
|
@ -620,6 +621,7 @@ gimp_selection_tool_start_edit (GimpSelectionTool *sel_tool,
|
|||
|
||||
tool = GIMP_TOOL (sel_tool);
|
||||
options = GIMP_SELECTION_TOOL_GET_OPTIONS (sel_tool);
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
g_return_val_if_fail (gimp_tool_control_is_active (tool->control) == FALSE,
|
||||
FALSE);
|
||||
|
|
@ -658,6 +660,9 @@ gimp_selection_tool_start_edit (GimpSelectionTool *sel_tool,
|
|||
gimp_edit_selection_tool_start (tool, display, coords,
|
||||
edit_mode, FALSE);
|
||||
|
||||
/* Turn off selection for performance if moved as floating selection */
|
||||
gimp_display_shell_set_show_selection (shell, FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "tools-types.h"
|
||||
|
|
@ -538,14 +539,6 @@ gimp_text_tool_editor_key_press (GimpTextTool *text_tool,
|
|||
}
|
||||
}
|
||||
|
||||
if (gtk_im_context_filter_keypress (text_tool->im_context, kevent))
|
||||
{
|
||||
text_tool->needs_im_reset = TRUE;
|
||||
text_tool->x_pos = -1;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gimp_text_tool_convert_gdkkeyevent (text_tool, kevent);
|
||||
|
||||
gimp_text_tool_ensure_proxy (text_tool);
|
||||
|
|
@ -558,6 +551,14 @@ gimp_text_tool_editor_key_press (GimpTextTool *text_tool,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if (gtk_im_context_filter_keypress (text_tool->im_context, kevent))
|
||||
{
|
||||
text_tool->needs_im_reset = TRUE;
|
||||
text_tool->x_pos = -1;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gtk_text_buffer_get_iter_at_mark (buffer, &cursor,
|
||||
gtk_text_buffer_get_insert (buffer));
|
||||
gtk_text_buffer_get_iter_at_mark (buffer, &selection,
|
||||
|
|
@ -1357,6 +1358,13 @@ gimp_text_tool_change_size (GimpTextTool *text_tool,
|
|||
GtkTextBuffer *buffer = GTK_TEXT_BUFFER (text_tool->buffer);
|
||||
GtkTextIter start;
|
||||
GtkTextIter end;
|
||||
gdouble default_size;
|
||||
gdouble x_res, y_res;
|
||||
|
||||
gimp_image_get_resolution (text_tool->image, &x_res, &y_res);
|
||||
|
||||
default_size = gimp_units_to_points (text_tool->text->font_size,
|
||||
text_tool->text->unit, y_res);
|
||||
|
||||
if (! gtk_text_buffer_get_selection_bounds (buffer, &start, &end))
|
||||
{
|
||||
|
|
@ -1365,7 +1373,7 @@ gimp_text_tool_change_size (GimpTextTool *text_tool,
|
|||
|
||||
gtk_text_iter_order (&start, &end);
|
||||
gimp_text_buffer_change_size (text_tool->buffer, &start, &end,
|
||||
amount * PANGO_SCALE);
|
||||
amount * PANGO_SCALE, default_size * PANGO_SCALE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -32,12 +32,12 @@
|
|||
|
||||
#include "unique.h"
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
#if !defined(G_OS_WIN32) && !defined(PLATFORM_OSX)
|
||||
static gboolean gimp_unique_dbus_open (const gchar **filenames,
|
||||
gboolean as_new);
|
||||
static gboolean gimp_unique_dbus_batch_run (const gchar *batch_interpreter,
|
||||
const gchar **batch_commands);
|
||||
#else
|
||||
#elif defined(G_OS_WIN32)
|
||||
static gboolean gimp_unique_win32_open (const gchar **filenames,
|
||||
gboolean as_new);
|
||||
#endif
|
||||
|
|
@ -147,7 +147,7 @@ gimp_unique_win32_open (const gchar **filenames,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
#else
|
||||
#elif !defined(PLATFORM_OSX)
|
||||
|
||||
static gboolean
|
||||
gimp_unique_dbus_open (const gchar **filenames,
|
||||
|
|
|
|||
|
|
@ -632,6 +632,20 @@ gimp_action_get_display_accels (GimpAction *action)
|
|||
|
||||
accels = g_strdupv (GET_PRIVATE (action)->accels);
|
||||
|
||||
/* "windows-hide-docks" has no registered accelerator because Tab takes
|
||||
* precedence over standard accessibility usage across the whole software.
|
||||
* Inject a cosmetic display hint so the menu label and shortcut editor
|
||||
* both show "Tab" without registering a real accelerator.
|
||||
*/
|
||||
if ((accels == NULL || accels[0] == NULL) &&
|
||||
g_strcmp0 (gimp_action_get_name (action), "windows-hide-docks") == 0)
|
||||
{
|
||||
g_strfreev (accels);
|
||||
accels = g_new0 (gchar *, 2);
|
||||
accels[0] = gtk_accelerator_get_label (GDK_KEY_Tab, 0);
|
||||
return accels;
|
||||
}
|
||||
|
||||
for (i = 0; accels != NULL && accels[i] != NULL; i++)
|
||||
{
|
||||
guint accel_key = 0;
|
||||
|
|
|
|||
|
|
@ -369,7 +369,7 @@ gimp_colormap_editor_color_update (GimpColorDialog *dialog,
|
|||
{
|
||||
push_undo = TRUE;
|
||||
|
||||
if (state & gimp_get_toggle_behavior_mask ())
|
||||
if ((guint)state & (guint)gimp_get_toggle_behavior_mask ())
|
||||
gimp_context_set_background (image_editor->context, color);
|
||||
else
|
||||
gimp_context_set_foreground (image_editor->context, color);
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ gimp_container_tree_view_drop_status (GimpContainerTreeView *tree_view,
|
|||
target_list = gtk_drag_dest_get_target_list (GTK_WIDGET (tree_view->view));
|
||||
target_atom = gtk_drag_dest_find_target (GTK_WIDGET (tree_view->view),
|
||||
context, target_list);
|
||||
if (! gtk_target_list_find (target_list, target_atom, &src_type))
|
||||
if (! gtk_target_list_find (target_list, target_atom, (guint *) &src_type))
|
||||
goto drop_impossible;
|
||||
|
||||
switch (src_type)
|
||||
|
|
|
|||
|
|
@ -1229,7 +1229,7 @@ gimp_dashboard_init (GimpDashboard *dashboard)
|
|||
gimp_meter_set_history_resolution (GIMP_METER (meter),
|
||||
interval / 1000.0);
|
||||
gimp_meter_set_history_duration (GIMP_METER (meter),
|
||||
priv->history_duration / 1000.0);
|
||||
(gdouble) priv->history_duration / 1000.0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), meter, FALSE, FALSE, 0);
|
||||
gtk_widget_show (meter);
|
||||
|
||||
|
|
@ -2418,6 +2418,11 @@ static void
|
|||
gimp_dashboard_sample_memory_used (GimpDashboard *dashboard,
|
||||
Variable variable)
|
||||
{
|
||||
#ifdef TASK_VM_INFO_REV0_COUNT
|
||||
task_vm_info_data_t info;
|
||||
mach_msg_type_number_t infoCount;
|
||||
#endif
|
||||
|
||||
GimpDashboardPrivate *priv = dashboard->priv;
|
||||
VariableData *variable_data = &priv->variables[variable];
|
||||
|
||||
|
|
@ -2433,8 +2438,7 @@ gimp_dashboard_sample_memory_used (GimpDashboard *dashboard,
|
|||
variable_data->available = TRUE;
|
||||
variable_data->value.size = info.resident_size;
|
||||
#else
|
||||
task_vm_info_data_t info;
|
||||
mach_msg_type_number_t infoCount = TASK_VM_INFO_COUNT;
|
||||
infoCount = TASK_VM_INFO_COUNT;
|
||||
|
||||
if( task_info(mach_task_self (), TASK_VM_INFO,
|
||||
(task_info_t)&info, &infoCount ) != KERN_SUCCESS )
|
||||
|
|
@ -2585,7 +2589,11 @@ gimp_dashboard_sample_memory_used (GimpDashboard *dashboard,
|
|||
|
||||
buffer[size] = '\0';
|
||||
|
||||
#ifndef _UCRT
|
||||
if (sscanf (buffer, "%*u %llu %llu", &resident, &shared) != 2)
|
||||
#else
|
||||
if (sscanf_s (buffer, "%*u %llu %llu", &resident, &shared) != 2)
|
||||
#endif
|
||||
return;
|
||||
|
||||
variable_data->available = TRUE;
|
||||
|
|
@ -4970,7 +4978,7 @@ gimp_dashboard_set_history_duration (GimpDashboard *dashboard,
|
|||
if (group_data->meter)
|
||||
{
|
||||
gimp_meter_set_history_duration (group_data->meter,
|
||||
history_duration / 1000.0);
|
||||
(gdouble) history_duration / 1000.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -795,7 +795,11 @@ gimp_device_info_pad_action_map_foreach (GimpPadActions *pad_actions,
|
|||
label = g_strdup (gimp_action_get_label (action));
|
||||
accel_pos = g_utf8_strchr (label, -1, '_');
|
||||
if (accel_pos)
|
||||
#ifndef _UCRT
|
||||
strcpy (accel_pos, accel_pos + 1);
|
||||
#else
|
||||
strcpy_s (accel_pos, strlen (accel_pos), accel_pos + 1);
|
||||
#endif
|
||||
|
||||
gtk_pad_controller_set_action (controller,
|
||||
/* Action type enums are binary compatible */
|
||||
|
|
|
|||
|
|
@ -297,7 +297,6 @@ gimp_device_info_editor_constructed (GObject *object)
|
|||
* not break anything in this use case anyway).
|
||||
*/
|
||||
GimpCurve *curve;
|
||||
gchar *title;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *view;
|
||||
|
|
@ -305,22 +304,10 @@ gimp_device_info_editor_constructed (GObject *object)
|
|||
GtkWidget *combo;
|
||||
GtkWidget *button;
|
||||
|
||||
/* TODO: right now this string is split in 2 localized strings,
|
||||
* to avoid breaking string freeze. After GIMP 3.2, we should just
|
||||
* create the "Pressure Curve" string because that's our only
|
||||
* case so far.
|
||||
*/
|
||||
|
||||
/* e.g. "Pressure Curve" for mapping input device axes */
|
||||
title = g_strdup_printf (_("%s Curve"),
|
||||
_("Pressure"));
|
||||
|
||||
frame = gimp_frame_new (title);
|
||||
frame = gimp_frame_new (_("Pressure Curve"));
|
||||
gtk_box_pack_start (GTK_BOX (editor), frame, TRUE, TRUE, 0);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
g_free (title);
|
||||
|
||||
curve = gimp_device_info_get_curve (private->info, GDK_AXIS_PRESSURE);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
|
|
|||
|
|
@ -126,7 +126,6 @@ _gimp_drawable_tree_view_filter_editor_show (GimpDrawableTreeView *view,
|
|||
GimpDrawableTreeViewFiltersEditor *editor = view->editor;
|
||||
GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (view);
|
||||
GimpContainer *filters;
|
||||
GList *list;
|
||||
gint n_editable;
|
||||
gboolean visible = FALSE;
|
||||
|
||||
|
|
@ -285,17 +284,7 @@ _gimp_drawable_tree_view_filter_editor_show (GimpDrawableTreeView *view,
|
|||
}
|
||||
|
||||
filters = gimp_drawable_get_filters (drawable);
|
||||
|
||||
for (list = GIMP_LIST (filters)->queue->tail;
|
||||
list;
|
||||
list = g_list_previous (list))
|
||||
{
|
||||
if (GIMP_IS_DRAWABLE_FILTER (list->data))
|
||||
{
|
||||
if (gimp_filter_get_active (list->data))
|
||||
visible = TRUE;
|
||||
}
|
||||
}
|
||||
visible = gimp_drawable_has_visible_filters (drawable);
|
||||
|
||||
/* Set the initial value for the effect visibility toggle */
|
||||
g_signal_handlers_block_by_func (editor->visible_button,
|
||||
|
|
@ -444,6 +433,7 @@ gimp_drawable_filters_editor_set_sensitive (GimpDrawableTreeView *view)
|
|||
GimpContainer *filters;
|
||||
gboolean is_group = FALSE;
|
||||
gboolean is_editable = FALSE;
|
||||
gboolean is_temporary;
|
||||
gboolean has_visible_filters;
|
||||
gint index;
|
||||
|
||||
|
|
@ -451,6 +441,8 @@ gimp_drawable_filters_editor_set_sensitive (GimpDrawableTreeView *view)
|
|||
|
||||
index = gimp_container_get_child_index (filters,
|
||||
GIMP_OBJECT (editor->filter));
|
||||
is_temporary = (gimp_drawable_filter_get_temporary (editor->filter) ||
|
||||
! gimp_drawable_filter_get_mask (editor->filter));
|
||||
|
||||
/* do not allow merging down effects on group layers */
|
||||
if (gimp_viewable_get_children (GIMP_VIEWABLE (editor->drawable)))
|
||||
|
|
@ -462,10 +454,19 @@ gimp_drawable_filters_editor_set_sensitive (GimpDrawableTreeView *view)
|
|||
is_editable = (index >= first_editable &&
|
||||
index <= last_editable);
|
||||
|
||||
g_signal_handlers_block_by_func (editor->visible_button,
|
||||
gimp_drawable_filters_editor_visible_all_toggled,
|
||||
view);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->visible_button),
|
||||
has_visible_filters);
|
||||
g_signal_handlers_unblock_by_func (editor->visible_button,
|
||||
gimp_drawable_filters_editor_visible_all_toggled,
|
||||
view);
|
||||
|
||||
gtk_widget_set_sensitive (editor->visible_button,
|
||||
TRUE);
|
||||
gtk_widget_set_sensitive (editor->edit_button,
|
||||
is_editable);
|
||||
is_editable && ! is_temporary);
|
||||
gtk_widget_set_sensitive (editor->raise_button,
|
||||
index > first_editable);
|
||||
gtk_widget_set_sensitive (editor->lower_button,
|
||||
|
|
@ -473,10 +474,11 @@ gimp_drawable_filters_editor_set_sensitive (GimpDrawableTreeView *view)
|
|||
gtk_widget_set_sensitive (editor->merge_button,
|
||||
! is_group &&
|
||||
has_visible_filters &&
|
||||
! is_temporary &&
|
||||
(! GIMP_IS_RASTERIZABLE (editor->drawable) ||
|
||||
gimp_rasterizable_is_rasterized (GIMP_RASTERIZABLE (editor->drawable))));
|
||||
gtk_widget_set_sensitive (editor->remove_button,
|
||||
is_editable);
|
||||
is_editable && ! is_temporary);
|
||||
|
||||
if (is_group ||
|
||||
(GIMP_IS_RASTERIZABLE (editor->drawable) &&
|
||||
|
|
|
|||
|
|
@ -504,9 +504,17 @@ gimp_file_proc_view_pattern_from_extension (const gchar *extension,
|
|||
pattern = g_new (gchar, 6 + 4 * len);
|
||||
|
||||
if (is_meta)
|
||||
#ifndef _UCRT
|
||||
strcpy (pattern, "*.*.");
|
||||
#else
|
||||
strcpy_s (pattern, 6 + 4 * len, "*.*.");
|
||||
#endif
|
||||
else
|
||||
#ifndef _UCRT
|
||||
strcpy (pattern, "*.");
|
||||
#else
|
||||
strcpy_s (pattern, 6 + 4 * len, "*.");
|
||||
#endif
|
||||
|
||||
for (i = 0, p = pattern + 2; i < len; i++, p+= 4)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -190,8 +190,8 @@ gimp_fill_editor_constructed (GObject *object)
|
|||
"pattern-view-size");
|
||||
gimp_enum_radio_box_add (GTK_BOX (box), pattern_box,
|
||||
(editor->use_custom_style ?
|
||||
GIMP_CUSTOM_STYLE_PATTERN :
|
||||
GIMP_FILL_STYLE_PATTERN),
|
||||
(gint) GIMP_CUSTOM_STYLE_PATTERN :
|
||||
(gint) GIMP_FILL_STYLE_PATTERN),
|
||||
FALSE);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -729,7 +729,20 @@ gimp_help_get_locales (Gimp *gimp)
|
|||
static GFile *
|
||||
gimp_help_get_user_manual_basedir (void)
|
||||
{
|
||||
return gimp_data_directory_file ("help", NULL);
|
||||
GFile *user_dir;
|
||||
GFile *sys_dir;
|
||||
|
||||
/* 1. Help is on user settings (e.g. for AppImage, macOS .app) */
|
||||
user_dir = gimp_directory_file ("help", NULL);
|
||||
if (g_file_query_exists (user_dir, NULL))
|
||||
{
|
||||
return user_dir;
|
||||
}
|
||||
|
||||
/* 2. Fallback: help is on user installation */
|
||||
g_object_unref (user_dir);
|
||||
sys_dir = gimp_data_directory_file ("help", NULL);
|
||||
return sys_dir;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
#include "core/gimpchannel.h"
|
||||
#include "core/gimpcontainer.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpfilloptions.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimpimage-undo-push.h"
|
||||
#include "core/gimpimage.h"
|
||||
|
|
@ -53,7 +52,6 @@
|
|||
#include "core/gimptreehandler.h"
|
||||
|
||||
#include "path/gimpvectorlayer.h"
|
||||
#include "path/gimpvectorlayeroptions.h"
|
||||
|
||||
#include "text/gimptextlayer.h"
|
||||
|
||||
|
|
@ -757,25 +755,14 @@ gimp_layer_tree_view_drop_viewables (GimpContainerTreeView *view,
|
|||
gimp_item_is_vector_layer (GIMP_ITEM (dest_viewable)) &&
|
||||
GIMP_IS_PATTERN (src_viewable))
|
||||
{
|
||||
GimpVectorLayerOptions *vector_options = NULL;
|
||||
GimpFillOptions *vector_fill = NULL;
|
||||
gimp_vector_layer_set (GIMP_VECTOR_LAYER (dest_viewable), NULL,
|
||||
"fill-style", GIMP_CUSTOM_STYLE_PATTERN,
|
||||
"fill-pattern", GIMP_PATTERN (src_viewable),
|
||||
NULL);
|
||||
|
||||
vector_options =
|
||||
gimp_vector_layer_get_options (GIMP_VECTOR_LAYER (dest_viewable));
|
||||
if (vector_options)
|
||||
vector_fill = vector_options->fill_options;
|
||||
|
||||
if (vector_fill)
|
||||
{
|
||||
gimp_context_set_pattern (GIMP_CONTEXT (vector_fill),
|
||||
GIMP_PATTERN (src_viewable));
|
||||
gimp_fill_options_set_custom_style (vector_fill,
|
||||
GIMP_CUSTOM_STYLE_PATTERN);
|
||||
|
||||
gimp_vector_layer_refresh (GIMP_VECTOR_LAYER (dest_viewable));
|
||||
gimp_image_flush (gimp_item_tree_view_get_image (item_view));
|
||||
return;
|
||||
}
|
||||
gimp_vector_layer_refresh (GIMP_VECTOR_LAYER (dest_viewable));
|
||||
gimp_image_flush (gimp_item_tree_view_get_image (item_view));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -803,24 +790,14 @@ gimp_layer_tree_view_drop_color (GimpContainerTreeView *view,
|
|||
}
|
||||
else if (gimp_item_is_vector_layer (GIMP_ITEM (dest_viewable)))
|
||||
{
|
||||
GimpVectorLayerOptions *vector_options = NULL;
|
||||
GimpFillOptions *vector_fill = NULL;
|
||||
gimp_vector_layer_set (GIMP_VECTOR_LAYER (dest_viewable), NULL,
|
||||
"fill-style", GIMP_CUSTOM_STYLE_SOLID_COLOR,
|
||||
"fill-color", color,
|
||||
NULL);
|
||||
|
||||
vector_options =
|
||||
gimp_vector_layer_get_options (GIMP_VECTOR_LAYER (dest_viewable));
|
||||
if (vector_options)
|
||||
vector_fill = vector_options->fill_options;
|
||||
|
||||
if (vector_fill)
|
||||
{
|
||||
gimp_context_set_foreground (GIMP_CONTEXT (vector_fill), color);
|
||||
gimp_fill_options_set_custom_style (vector_fill,
|
||||
GIMP_CUSTOM_STYLE_SOLID_COLOR);
|
||||
|
||||
gimp_vector_layer_refresh (GIMP_VECTOR_LAYER (dest_viewable));
|
||||
gimp_image_flush (gimp_item_tree_view_get_image (item_view));
|
||||
return;
|
||||
}
|
||||
gimp_vector_layer_refresh (GIMP_VECTOR_LAYER (dest_viewable));
|
||||
gimp_image_flush (gimp_item_tree_view_get_image (item_view));
|
||||
return;
|
||||
}
|
||||
|
||||
GIMP_CONTAINER_TREE_VIEW_CLASS (parent_class)->drop_color (view, color,
|
||||
|
|
|
|||
|
|
@ -593,7 +593,7 @@ gimp_menu_section_items_changed (GMenuModel *model,
|
|||
GtkWidget *separator;
|
||||
gboolean found = FALSE;
|
||||
gint count = position;
|
||||
gint real_pos = 0;
|
||||
/*gint real_pos = 0;*/
|
||||
|
||||
separator = g_hash_table_lookup (menu->priv->sections, model);
|
||||
g_return_if_fail (separator != NULL);
|
||||
|
|
@ -601,7 +601,7 @@ gimp_menu_section_items_changed (GMenuModel *model,
|
|||
children = gtk_container_get_children (GTK_CONTAINER (menu));
|
||||
for (iter = children; iter; iter = iter->next)
|
||||
{
|
||||
real_pos++;
|
||||
/*real_pos++;*/
|
||||
|
||||
if (! found)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -599,7 +599,7 @@ gimp_modifiers_editor_notify_accelerator (GtkWidget *widget,
|
|||
GdkModifierType old_modifiers;
|
||||
GdkModifierType modifiers;
|
||||
|
||||
old_modifiers = (GdkModifierType) g_object_get_data (G_OBJECT (widget), "shortcut-modifiers");
|
||||
old_modifiers = (GdkModifierType) GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "shortcut-modifiers"));
|
||||
|
||||
shortcut = g_object_get_data (G_OBJECT (widget), "shortcut-button");
|
||||
combo = g_object_get_data (G_OBJECT (widget), "shortcut-action");
|
||||
|
|
|
|||
|
|
@ -588,8 +588,13 @@ gimp_selection_data_get_image (GtkSelectionData *selection,
|
|||
gint pid;
|
||||
gint ID;
|
||||
|
||||
#ifndef _UCRT
|
||||
if (sscanf (str, "%i:%i", &pid, &ID) == 2 &&
|
||||
pid == gimp_get_pid ())
|
||||
#else
|
||||
if (sscanf_s (str, "%i:%i", &pid, &ID) == 2 &&
|
||||
pid == gimp_get_pid ())
|
||||
#endif
|
||||
{
|
||||
return gimp_image_get_by_id (gimp, ID);
|
||||
}
|
||||
|
|
@ -639,8 +644,13 @@ gimp_selection_data_get_component (GtkSelectionData *selection,
|
|||
gint ID;
|
||||
gint ch;
|
||||
|
||||
#ifndef _UCRT
|
||||
if (sscanf (str, "%i:%i:%i", &pid, &ID, &ch) == 3 &&
|
||||
pid == gimp_get_pid ())
|
||||
#else
|
||||
if (sscanf_s (str, "%i:%i:%i", &pid, &ID, &ch) == 3 &&
|
||||
pid == gimp_get_pid ())
|
||||
#endif
|
||||
{
|
||||
GimpImage *image = gimp_image_get_by_id (gimp, ID);
|
||||
|
||||
|
|
@ -688,8 +698,13 @@ gimp_selection_data_get_item (GtkSelectionData *selection,
|
|||
gint pid;
|
||||
gint ID;
|
||||
|
||||
#ifndef _UCRT
|
||||
if (sscanf (str, "%i:%i", &pid, &ID) == 2 &&
|
||||
pid == gimp_get_pid ())
|
||||
#else
|
||||
if (sscanf_s (str, "%i:%i", &pid, &ID) == 2 &&
|
||||
pid == gimp_get_pid ())
|
||||
#endif
|
||||
{
|
||||
return gimp_item_get_by_id (gimp, ID);
|
||||
}
|
||||
|
|
@ -961,8 +976,13 @@ gimp_selection_data_get_object (GtkSelectionData *selection,
|
|||
gpointer object_addr;
|
||||
gint name_offset = 0;
|
||||
|
||||
#ifndef _UCRT
|
||||
if (sscanf (str, "%i:%p:%n", &pid, &object_addr, &name_offset) >= 2 &&
|
||||
pid == gimp_get_pid () && name_offset > 0)
|
||||
#else
|
||||
if (sscanf_s (str, "%i:%p:%n", &pid, &object_addr, &name_offset) >= 2 &&
|
||||
pid == gimp_get_pid () && name_offset > 0)
|
||||
#endif
|
||||
{
|
||||
const gchar *name = str + name_offset;
|
||||
|
||||
|
|
|
|||
|
|
@ -442,7 +442,8 @@ void
|
|||
gimp_text_buffer_change_size (GimpTextBuffer *buffer,
|
||||
const GtkTextIter *start,
|
||||
const GtkTextIter *end,
|
||||
gint count)
|
||||
gint count,
|
||||
gint default_size)
|
||||
{
|
||||
GtkTextIter iter;
|
||||
GtkTextIter span_start;
|
||||
|
|
@ -479,16 +480,19 @@ gimp_text_buffer_change_size (GimpTextBuffer *buffer,
|
|||
if (iter_size != span_size ||
|
||||
gtk_text_iter_compare (&iter, end) >= 0)
|
||||
{
|
||||
gint base_size = (span_size == 0) ? default_size : span_size;
|
||||
gint new_size = base_size + count;
|
||||
|
||||
if (span_size != 0)
|
||||
{
|
||||
gtk_text_buffer_remove_tag (GTK_TEXT_BUFFER (buffer), span_tag,
|
||||
&span_start, &span_end);
|
||||
}
|
||||
|
||||
if ((span_size + count) > 0)
|
||||
if (new_size > 0)
|
||||
{
|
||||
span_tag = gimp_text_buffer_get_size_tag (buffer,
|
||||
span_size + count);
|
||||
new_size);
|
||||
|
||||
gtk_text_buffer_apply_tag (GTK_TEXT_BUFFER (buffer), span_tag,
|
||||
&span_start, &span_end);
|
||||
|
|
@ -1376,7 +1380,11 @@ gimp_text_buffer_name_to_tag (GimpTextBuffer *buffer,
|
|||
guint r, g, b;
|
||||
guchar rgb[3];
|
||||
|
||||
#ifndef _UCRT
|
||||
sscanf (value, "#%02x%02x%02x", &r, &g, &b);
|
||||
#else
|
||||
sscanf_s (value, "#%02x%02x%02x", &r, &g, &b);
|
||||
#endif
|
||||
rgb[0] = r;
|
||||
rgb[1] = g;
|
||||
rgb[2] = b;
|
||||
|
|
|
|||
|
|
@ -91,7 +91,8 @@ void gimp_text_buffer_set_size (GimpTextBuffer *buff
|
|||
void gimp_text_buffer_change_size (GimpTextBuffer *buffer,
|
||||
const GtkTextIter *start,
|
||||
const GtkTextIter *end,
|
||||
gint amount);
|
||||
gint amount,
|
||||
gint default_size);
|
||||
|
||||
GtkTextTag * gimp_text_buffer_get_iter_baseline (GimpTextBuffer *buffer,
|
||||
const GtkTextIter *iter,
|
||||
|
|
|
|||
|
|
@ -923,7 +923,7 @@ gimp_window_set_hint (GtkWindow *window,
|
|||
|
||||
/* similar to what we have in libgimp/gimpui.c */
|
||||
/* TODO: Restore when we use it on Windows */
|
||||
#ifndef G_OS_WIN32
|
||||
#if !defined(G_OS_WIN32) && !defined(PLATFORM_OSX)
|
||||
static GdkWindow *
|
||||
gimp_get_foreign_window (gpointer window)
|
||||
{
|
||||
|
|
@ -2595,7 +2595,7 @@ gimp_window_set_transient_cb (GtkWidget *window,
|
|||
GdkEventAny *event G_GNUC_UNUSED,
|
||||
GBytes *handle)
|
||||
{
|
||||
#ifndef G_OS_WIN32
|
||||
#if !defined(G_OS_WIN32) && !defined(PLATFORM_OSX)
|
||||
gboolean transient_set = FALSE;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -2613,8 +2613,8 @@ xcf_load_layer_props (XcfInfo *info,
|
|||
{
|
||||
gimp_message (info->gimp, G_OBJECT (info->progress),
|
||||
GIMP_MESSAGE_WARNING,
|
||||
"XCF Warning: invalid link in XCF file. "
|
||||
"The link layer \"%s\" is downgraded to a raster layer.",
|
||||
_("XCF Warning: invalid link in XCF file. "
|
||||
"The link layer \"%s\" is downgraded to a raster layer."),
|
||||
gimp_object_get_name (*layer));
|
||||
}
|
||||
else
|
||||
|
|
@ -2633,8 +2633,8 @@ xcf_load_layer_props (XcfInfo *info,
|
|||
{
|
||||
gimp_message (info->gimp, G_OBJECT (info->progress),
|
||||
GIMP_MESSAGE_WARNING,
|
||||
"XCF Warning: cycling link detected in XCF file. "
|
||||
"The link layer \"%s\" is downgraded to a raster layer.",
|
||||
_("XCF Warning: circular reference detected in XCF file. "
|
||||
"The link layer \"%s\" is downgraded to a raster layer."),
|
||||
gimp_object_get_name (*layer));
|
||||
ignore = TRUE;
|
||||
break;
|
||||
|
|
@ -4939,7 +4939,7 @@ xcf_load_tile_rle (XcfInfo *info,
|
|||
{
|
||||
guchar *data = tile_data + i;
|
||||
gint size = tile_rect->width * tile_rect->height;
|
||||
gint count = 0;
|
||||
/*gint count = 0;*/
|
||||
guchar val;
|
||||
gint length;
|
||||
gint j;
|
||||
|
|
@ -4968,7 +4968,7 @@ xcf_load_tile_rle (XcfInfo *info,
|
|||
xcfdata += 2;
|
||||
}
|
||||
|
||||
count += length;
|
||||
/*count += length;*/
|
||||
size -= length;
|
||||
|
||||
if (size < 0)
|
||||
|
|
@ -5002,7 +5002,7 @@ xcf_load_tile_rle (XcfInfo *info,
|
|||
xcfdata += 2;
|
||||
}
|
||||
|
||||
count += length;
|
||||
/*count += length;*/
|
||||
size -= length;
|
||||
|
||||
if (size < 0)
|
||||
|
|
|
|||
|
|
@ -332,7 +332,11 @@ xcf_save_image (XcfInfo *info,
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifndef _UCRT
|
||||
strcpy (version_tag, "gimp xcf file");
|
||||
#else
|
||||
strcpy_s (version_tag, sizeof (version_tag), "gimp xcf file");
|
||||
#endif
|
||||
}
|
||||
|
||||
xcf_write_int8_check_error (info, (guint8 *) version_tag, 14, ;);
|
||||
|
|
@ -1861,7 +1865,7 @@ xcf_save_prop (XcfInfo *info,
|
|||
g_return_val_if_reached (FALSE);
|
||||
xcf_write_int32_check_error (info, &item_type, 1, va_end (args));
|
||||
|
||||
if (! gimp_item_list_is_pattern (set, &method))
|
||||
if (! gimp_item_list_is_pattern (set, (GimpSelectMethod *) &method))
|
||||
method = G_MAXUINT32;
|
||||
xcf_write_int32_check_error (info, &method, 1, va_end (args));
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ case $(readlink /proc/$$/exe) in
|
|||
esac
|
||||
set -e
|
||||
if [ "$0" != 'build/linux/appimage/3_dist-gimp-goappimage.sh' ] && [ $(basename "$PWD") != 'appimage' ]; then
|
||||
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir\n'
|
||||
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp source dir\n'
|
||||
exit 1
|
||||
elif [ $(basename "$PWD") = 'appimage' ]; then
|
||||
cd ../../..
|
||||
|
|
@ -380,6 +380,8 @@ conf_app GS_LIB "share/ghostscript/10*/Resource/Init"
|
|||
### file-wmf support
|
||||
bund_usr "$UNIX_PREFIX" "share/fonts/type1/urw-base35/Nimbus*" --dest "share/libwmf/fonts"
|
||||
bund_usr "$UNIX_PREFIX" "share/fonts/type1/urw-base35/StandardSymbols*" --dest "share/libwmf/fonts"
|
||||
### "Send by Email" support
|
||||
bund_usr "$UNIX_PREFIX" "bin/xdg-email"
|
||||
### Debug menu: if show_debug_menu is true in app/main.c or --show-debug-menu CLI option is set
|
||||
#### Image graph support
|
||||
bund_usr "$UNIX_PREFIX" "bin/libgvc*" --rename "bin/dot"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ elif [ $(basename "$PWD") = 'flatpak' ]; then
|
|||
cd ../../..
|
||||
fi
|
||||
if [ -z "$GITLAB_CI" ]; then
|
||||
git submodule update --init
|
||||
git submodule update --init || true #true is for this script work on tarballs too
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue