mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
Compare commits
180 Commits
alxsa-pvr-
...
b24cf08467
Author | SHA1 | Date | |
---|---|---|---|
|
b24cf08467 | ||
|
d8d73266bc | ||
|
356c2baec5 | ||
|
aea7042aa1 | ||
|
97944a5415 | ||
|
a5182a010f | ||
|
9c2c5ff183 | ||
|
f09007507f | ||
|
2b91551f4e | ||
|
4221bb76da | ||
|
cbe56ff388 | ||
|
7cec3f52b9 | ||
|
81c67e5614 | ||
|
67fa72a94e | ||
|
6587256c3a | ||
|
ad9dbf2c8b | ||
|
2f0bfc569b | ||
|
36330a271a | ||
|
baa4825880 | ||
|
8c910c2b6b | ||
|
a025cfe41b | ||
|
41035c7589 | ||
|
7275569079 | ||
|
dfafb7c6f2 | ||
|
25d1b7f8c3 | ||
|
0edf615333 | ||
|
daf23e1a50 | ||
|
b633b4b9c7 | ||
|
cfa3fd6bb7 | ||
|
669685d1d8 | ||
|
f032153596 | ||
|
13639b1d3d | ||
|
eb0bfe7bdb | ||
|
393ca59e79 | ||
|
3a698a05a1 | ||
|
f4a7da1ee3 | ||
|
bb9d8df855 | ||
|
78e68efd06 | ||
|
2fa82d51ee | ||
|
f223dae9fe | ||
|
9daf5d2e5d | ||
|
789af76a32 | ||
|
f9ba343558 | ||
|
014aa5ae6f | ||
|
47eac319b1 | ||
|
3bde6195f6 | ||
|
b0689f565b | ||
|
1e46438ced | ||
|
2b32496195 | ||
|
de62139894 | ||
|
f774ad7f16 | ||
|
f53a843c3d | ||
|
46d9a09698 | ||
|
355d695607 | ||
|
714e9041d8 | ||
|
24c8f86c85 | ||
|
f50145c155 | ||
|
7f8298467b | ||
|
23a9758a7b | ||
|
0af9261980 | ||
|
77d25750a7 | ||
|
155e951fa6 | ||
|
5a22a9b931 | ||
|
2187f0a49c | ||
|
91418131a0 | ||
|
645d23cd37 | ||
|
28fa2e5fc7 | ||
|
c13bf1af19 | ||
|
9337c55599 | ||
|
947995248a | ||
|
abcfbfbca5 | ||
|
b121ddd6f8 | ||
|
ba1de3b68e | ||
|
6552e3200d | ||
|
4d97212cf9 | ||
|
54b64252df | ||
|
c79db4c15a | ||
|
cecb937a0b | ||
|
fe4dbeb911 | ||
|
fdb4111e3f | ||
|
72533aaf8e | ||
|
ccc4eacac3 | ||
|
8e9b7bfce6 | ||
|
17552c0e11 | ||
|
f428089947 | ||
|
6260590cf4 | ||
|
c5e77fb8bb | ||
|
b50781730c | ||
|
2b669917c2 | ||
|
7d22110cfb | ||
|
86cc15cbf0 | ||
|
865e6363e1 | ||
|
789d82355c | ||
|
82cb3ae6fe | ||
|
1a7f673b7d | ||
|
8f57d4bdff | ||
|
aa9e437d42 | ||
|
ec4daa643e | ||
|
308963c271 | ||
|
4d0fef9482 | ||
|
d5f3fa77db | ||
|
dbf0c39bb3 | ||
|
56f72c24ba | ||
|
a0676125a1 | ||
|
c472800eae | ||
|
a9cab5d374 | ||
|
63b4d69e48 | ||
|
70bf795dfb | ||
|
a7c4320312 | ||
|
ae7bbbedbf | ||
|
5bc2f26cb0 | ||
|
cacb8d2035 | ||
|
c8ed51bb52 | ||
|
264a65e0b3 | ||
|
e27353216c | ||
|
49fc3ad0bd | ||
|
5b71d1a10d | ||
|
06bcef3273 | ||
|
17b23b6f26 | ||
|
413114f9d0 | ||
|
c2f0afb4bd | ||
|
b945d77ed7 | ||
|
7c04605d14 | ||
|
25edb3cc64 | ||
|
b773c3ac48 | ||
|
9551519f23 | ||
|
a9d2700631 | ||
|
5375ca63d5 | ||
|
78acdd8882 | ||
|
b5dda733dc | ||
|
e17567d001 | ||
|
4a0ea33bc5 | ||
|
a2d106e3fa | ||
|
4ebd340688 | ||
|
15f047f6c0 | ||
|
484d0fbcf4 | ||
|
b70186bc99 | ||
|
4a656a1db0 | ||
|
cb565344e9 | ||
|
c8971ac2ae | ||
|
3ec63979d8 | ||
|
c72e36c6a2 | ||
|
5ccc525281 | ||
|
84eaa94842 | ||
|
bc7cc0b698 | ||
|
602300ec8e | ||
|
64e276c3b5 | ||
|
96394377e6 | ||
|
a926e013da | ||
|
2d74278860 | ||
|
e1e4c0f400 | ||
|
5fc3c29f5c | ||
|
de4fb3470c | ||
|
ddfce634a8 | ||
|
527f4964fe | ||
|
be2e47114d | ||
|
11b81e25a4 | ||
|
4ca05cb38d | ||
|
bb9aad1e87 | ||
|
4dceeb174a | ||
|
9819457f31 | ||
|
7c947ef1af | ||
|
03beda6e2a | ||
|
a7d867c8bc | ||
|
6584f92748 | ||
|
593f0abf09 | ||
|
a734b4a3a4 | ||
|
0fd280db5c | ||
|
443d0a2f7b | ||
|
ed01c1b7f4 | ||
|
904f283932 | ||
|
9026d18039 | ||
|
8a5825b66f | ||
|
71caf7eb05 | ||
|
bf6092c728 | ||
|
6d74a880f9 | ||
|
1a953c5c73 | ||
|
1564efb519 | ||
|
3e96397770 | ||
|
c8cf2219ce |
283
.gitlab-ci.yml
283
.gitlab-ci.yml
@@ -13,7 +13,7 @@ spec:
|
||||
test_pipeline:
|
||||
description: 'Pipelines used only for testing'
|
||||
options:
|
||||
- GIMP_CI_MESON_GCC #trigger the Debian GCC build (rare usefulness)
|
||||
- GIMP_CI_MESON_CLANG #trigger the Debian Clang build (rare usefulness)
|
||||
- GIMP_CI_RASTER_ICONS #trigger the Debian Clang build without vector icons (rare usefulness)
|
||||
- GIMP_CI_CPPCHECK #trigger cppcheck (static code analysis)
|
||||
- none
|
||||
@@ -30,7 +30,7 @@ workflow:
|
||||
##################################################
|
||||
|
||||
## 1. On MERGE REQUESTS, the following are triggered:
|
||||
## - Abbreviated Linux Clang build
|
||||
## - Abbreviated Linux build
|
||||
## - Building quality tests (static code analysis)
|
||||
## - clang-format (static code analysis)
|
||||
## - Execution tests (dynamic code analysis)
|
||||
@@ -44,7 +44,7 @@ workflow:
|
||||
# GitLab is quite sensitive about rules 'if' order so be careful
|
||||
|
||||
## 3. On COMMITS except tags.
|
||||
## - Linux Clang build
|
||||
## - Linux build
|
||||
## - Building quality tests (static code analysis)
|
||||
## - Execution tests (dynamic code analysis)
|
||||
## - Source tarball
|
||||
@@ -84,6 +84,7 @@ workflow:
|
||||
image: $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER}
|
||||
variables:
|
||||
DEB_VERSION: "bookworm"
|
||||
UMFPACK: libumfpack5
|
||||
RUNNER: "x86_64_v3"
|
||||
# Common cloning procedure
|
||||
GIT_DEPTH: "1"
|
||||
@@ -102,27 +103,30 @@ stages:
|
||||
- analysis
|
||||
- distribution
|
||||
|
||||
## AppImage CI (Debian) ##
|
||||
.debian:
|
||||
|
||||
## Common GNU/Linux 64-bit CI (Debian) ##
|
||||
.debian-nonreloc:
|
||||
extends: .default
|
||||
rules:
|
||||
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:AppImage.*/'
|
||||
interruptible: true
|
||||
- if: '$GIMP_CI_APPIMAGE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_APPIMAGE.*/'
|
||||
- <<: *CI_MERGE
|
||||
- <<: *CI_COMMIT
|
||||
variables: {}
|
||||
- if: '$GIMP_CI_MESON_CLANG != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_CLANG.*/'
|
||||
variables:
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
CC_LD: lld
|
||||
CXX_LD: lld
|
||||
TOOLCHAIN: "clang lld"
|
||||
VARIANT: -clang
|
||||
- if: '$GIMP_CI_RASTER_ICONS != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_RASTER_ICONS.*/'
|
||||
variables:
|
||||
MESON_OPTIONS: "-Dvector-icons=false"
|
||||
VARIANT: "-raster"
|
||||
- <<: *CI_RELEASE
|
||||
parallel:
|
||||
matrix:
|
||||
- RUNNER: [aarch64, x86_64_v3]
|
||||
tags:
|
||||
- $RUNNER
|
||||
variables:
|
||||
CC: "clang"
|
||||
CXX: "clang++"
|
||||
CC_LD: lld
|
||||
CXX_LD: lld
|
||||
before_script:
|
||||
- export GIMP_PREFIX="${CI_PROJECT_DIR}/_install-${RUNNER}"
|
||||
timeout: 20m
|
||||
timeout: 30m
|
||||
|
||||
.debian_environ: &ENVIRON
|
||||
# See: https://testing.developer.gimp.org/core/setup/build/#preparing-for-building
|
||||
@@ -138,13 +142,12 @@ stages:
|
||||
- export GI_TYPELIB_PATH="${GIMP_PREFIX}/${LIB_DIR}/${LIB_SUBDIR}girepository-1.0${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
|
||||
- printf "\e[0Ksection_end:`date +%s`:environ\r\e[0K\n"
|
||||
|
||||
deps-debian:
|
||||
extends: .debian
|
||||
deps-debian-nonreloc:
|
||||
extends: .debian-nonreloc
|
||||
stage: dependencies
|
||||
image: quay.io/buildah/stable
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
|
||||
script:
|
||||
- export BUILDAH_FORMAT=docker
|
||||
- export STORAGE_DRIVER=vfs
|
||||
@@ -158,16 +161,15 @@ deps-debian:
|
||||
- echo "RUN apt-get install -qq -y --no-install-recommends ca-certificates" >> Dockerfile
|
||||
## Build-time only dependencies
|
||||
- echo "RUN apt-get install -qq -y --no-install-recommends \\" >> Dockerfile
|
||||
- echo "appstream
|
||||
- echo "${TOOLCHAIN:-build-essential}
|
||||
appstream
|
||||
bison
|
||||
clang
|
||||
desktop-file-utils
|
||||
flex
|
||||
gi-docgen
|
||||
git
|
||||
gobject-introspection
|
||||
libgtk-3-bin
|
||||
lld
|
||||
meson
|
||||
valac
|
||||
xsltproc" >> Dockerfile
|
||||
@@ -180,6 +182,7 @@ deps-debian:
|
||||
glib-networking
|
||||
graphviz
|
||||
graphviz-dev
|
||||
gvfs
|
||||
iso-codes
|
||||
libaa1-dev
|
||||
libappstream-dev
|
||||
@@ -193,6 +196,7 @@ deps-debian:
|
||||
libgtk-3-dev
|
||||
libgudev-1.0-dev
|
||||
libheif-dev
|
||||
$LIBHEIF_PLUGINS
|
||||
libjson-glib-dev
|
||||
libjxl-dev
|
||||
liblcms2-dev
|
||||
@@ -208,7 +212,7 @@ deps-debian:
|
||||
librsvg2-dev
|
||||
libsuitesparse-dev
|
||||
libtiff-dev
|
||||
libumfpack5
|
||||
$UMFPACK
|
||||
libunwind-dev
|
||||
libwebp-dev
|
||||
libwmf-dev
|
||||
@@ -225,10 +229,12 @@ deps-debian:
|
||||
- echo "RUN printf \"\e[0Ksection_start:`date +%s`:environ[collapsed=true]\r\e[0KPreparing build environment\n\"" >> Dockerfile2;
|
||||
- echo "ENV PKG_CONFIG_PATH=\"${GIMP_PREFIX}/lib/$([ "$(uname -m)" = 'aarch64' ] && echo "aarch64-linux-gnu/" || echo "x86_64-linux-gnu/")pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}\"" >> Dockerfile2;
|
||||
- echo "ENV XDG_DATA_DIRS=\"${GIMP_PREFIX}/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}\"" >> Dockerfile2;
|
||||
- echo "ENV CC=\"$CC\"" >> Dockerfile2;
|
||||
- echo "ENV CXX=\"$CXX\"" >> Dockerfile2;
|
||||
- echo "ENV CC_LD=\"$CC_LD\"" >> Dockerfile2;
|
||||
- echo "ENV CXX_LD=\"$CXX_LD\"" >> Dockerfile2;
|
||||
- if [ "$VARIANT" = "-clang" ]; then
|
||||
echo "ENV CC=\"$CC\"" >> Dockerfile2;
|
||||
echo "ENV CXX=\"$CXX\"" >> Dockerfile2;
|
||||
echo "ENV CC_LD=\"$CC_LD\"" >> Dockerfile2;
|
||||
echo "ENV CXX_LD=\"$CXX_LD\"" >> Dockerfile2;
|
||||
fi
|
||||
- echo "ENV CLICOLOR_FORCE=\"1\"" >> Dockerfile2;
|
||||
- echo "RUN printf \"\e[0Ksection_end:`date +%s`:environ\r\e[0K\n\"" >> Dockerfile2;
|
||||
# Build some dependencies
|
||||
@@ -258,11 +264,88 @@ deps-debian:
|
||||
- gegl/_build-${RUNNER}/config.h
|
||||
expire_in: 2 hours
|
||||
|
||||
gimp-debian-nonreloc:
|
||||
extends: .debian-nonreloc
|
||||
needs: ["deps-debian-nonreloc"]
|
||||
stage: build
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
script:
|
||||
- *ENVIRON
|
||||
# Check building
|
||||
- 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
|
||||
- cd _build-${RUNNER}
|
||||
- ninja
|
||||
- printf "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K\n"
|
||||
# Check execution
|
||||
- printf "\e[0Ksection_start:`date +%s`:gimp_test[collapsed=true]\r\e[0KTesting GIMP execution\n"
|
||||
- ninja test
|
||||
- printf "\e[0Ksection_end:`date +%s`:gimp_test\r\e[0K\n"
|
||||
# Check source
|
||||
- printf "\e[0Ksection_start:`date +%s`:gimp_tar[collapsed=true]\r\e[0KChecking GIMP source\n"
|
||||
- if [ $(git diff |wc -l) -ne 0 ]; then
|
||||
printf "ERROR. A generated file was updated without the source:\n";
|
||||
git diff;
|
||||
exit 1;
|
||||
fi
|
||||
- if [ "$VARIANT" != "-clang" ] && [ "$VARIANT" != "-raster" ] && [ "$CI_PIPELINE_SOURCE" != "merge_request_event" ]; then
|
||||
ninja dist > ninja_dist.log 2>&1 || { cat ninja_dist.log; exit 1; };
|
||||
fi
|
||||
- printf "\e[0Ksection_end:`date +%s`:gimp_tar\r\e[0K\n"
|
||||
# Check install
|
||||
- printf "\e[0Ksection_start:`date +%s`:gimp_install[collapsed=true]\r\e[0KChecking GIMP installation\n"
|
||||
- ninja install > ninja_install.log 2>&1 || { cat ninja_install.log; exit 1; };
|
||||
- printf "\e[0Ksection_end:`date +%s`:gimp_install\r\e[0K\n"
|
||||
artifacts:
|
||||
paths:
|
||||
- _install-${RUNNER}/
|
||||
- _build-${RUNNER}/meson-logs/meson-log.txt
|
||||
- _build-${RUNNER}/meson-dist/
|
||||
- _build-${RUNNER}/config.h
|
||||
reports:
|
||||
junit: "_build-${RUNNER}/meson-logs/testlog.junit.xml"
|
||||
expire_in: 2 days
|
||||
|
||||
|
||||
## AppImage CI (Debian) ##
|
||||
.debian:
|
||||
extends: .debian-nonreloc
|
||||
rules:
|
||||
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:AppImage.*/'
|
||||
interruptible: true
|
||||
- if: '$GIMP_CI_APPIMAGE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_APPIMAGE.*/'
|
||||
- <<: *CI_RELEASE
|
||||
parallel:
|
||||
matrix:
|
||||
- RUNNER: [aarch64, x86_64_v3]
|
||||
tags:
|
||||
- $RUNNER
|
||||
variables:
|
||||
#FIXME: remove this variables: key and go back to relying on .default DEB_VERSION on GIMP 3.3/3.4
|
||||
DEB_VERSION: "trixie"
|
||||
UMFPACK: libumfpack6
|
||||
LIBHEIF_PLUGINS: "libheif-plugin-dav1d libheif-plugin-aomenc libheif-plugin-libde265 libheif-plugin-x265 libheif-plugin-j2kdec libheif-plugin-j2kenc"
|
||||
|
||||
deps-debian:
|
||||
extends: .debian
|
||||
stage: !reference [deps-debian-nonreloc, stage]
|
||||
image: !reference [deps-debian-nonreloc, image]
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
|
||||
script:
|
||||
- !reference [deps-debian-nonreloc, script]
|
||||
artifacts: !reference [deps-debian-nonreloc, artifacts]
|
||||
|
||||
gimp-debian:
|
||||
extends: .debian
|
||||
needs: ["deps-debian"]
|
||||
stage: build
|
||||
stage: !reference [gimp-debian-nonreloc, stage]
|
||||
variables:
|
||||
#FIXME: remove this variables: key and go back to relying on gimp-debian-nonreloc variables: on GIMP 3.3/3.4
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
script:
|
||||
- *ENVIRON
|
||||
@@ -292,85 +375,6 @@ gimp-debian:
|
||||
expire_in: 2 days
|
||||
|
||||
|
||||
## GNU/Linux 64-bit CIs (Debian) ##
|
||||
.debian-nonreloc:
|
||||
extends: .debian
|
||||
rules:
|
||||
- <<: *CI_MERGE
|
||||
- <<: *CI_COMMIT
|
||||
variables: {}
|
||||
- if: '$GIMP_CI_MESON_GCC != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_GCC.*/'
|
||||
variables:
|
||||
CC: "cc"
|
||||
CXX: "c++"
|
||||
CC_LD: bfd
|
||||
CXX_LD: bfd
|
||||
VARIANT: "-gcc"
|
||||
- if: '$GIMP_CI_RASTER_ICONS != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_RASTER_ICONS.*/'
|
||||
variables:
|
||||
MESON_OPTIONS: "-Dvector-icons=false"
|
||||
VARIANT: "-raster"
|
||||
- <<: *CI_RELEASE
|
||||
parallel:
|
||||
matrix:
|
||||
- RUNNER: x86_64_v3
|
||||
tags: []
|
||||
|
||||
deps-debian-nonreloc:
|
||||
extends: .debian-nonreloc
|
||||
stage: !reference [deps-debian, stage]
|
||||
image: !reference [deps-debian, image]
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
script:
|
||||
- !reference [deps-debian, script]
|
||||
artifacts: !reference [deps-debian, artifacts]
|
||||
|
||||
gimp-debian-nonreloc:
|
||||
extends: .debian-nonreloc
|
||||
needs: ["deps-debian-nonreloc"]
|
||||
stage: !reference [gimp-debian, stage]
|
||||
variables: !reference [gimp-debian, variables]
|
||||
script:
|
||||
- *ENVIRON
|
||||
# Check building
|
||||
- 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
|
||||
- cd _build-${RUNNER}
|
||||
- ninja
|
||||
- printf "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K\n"
|
||||
# Check execution
|
||||
- printf "\e[0Ksection_start:`date +%s`:gimp_test[collapsed=true]\r\e[0KTesting GIMP execution\n"
|
||||
- ninja test
|
||||
- printf "\e[0Ksection_end:`date +%s`:gimp_test\r\e[0K\n"
|
||||
# Check source
|
||||
- printf "\e[0Ksection_start:`date +%s`:gimp_tar[collapsed=true]\r\e[0KChecking GIMP source\n"
|
||||
- if [ $(git diff |wc -l) -ne 0 ]; then
|
||||
printf "ERROR. A generated file was updated without the source:\n";
|
||||
git diff;
|
||||
exit 1;
|
||||
fi
|
||||
- if [ "$VARIANT" != "-gcc" ] && [ "$VARIANT" != "-raster" ] && [ "$CI_PIPELINE_SOURCE" != "merge_request_event" ]; then
|
||||
ninja dist > ninja_dist.log 2>&1 || { cat ninja_dist.log; exit 1; };
|
||||
fi
|
||||
- printf "\e[0Ksection_end:`date +%s`:gimp_tar\r\e[0K\n"
|
||||
# Check install
|
||||
- printf "\e[0Ksection_start:`date +%s`:gimp_install[collapsed=true]\r\e[0KChecking GIMP installation\n"
|
||||
- ninja install > ninja_install.log 2>&1 || { cat ninja_install.log; exit 1; };
|
||||
- printf "\e[0Ksection_end:`date +%s`:gimp_install\r\e[0K\n"
|
||||
artifacts:
|
||||
paths:
|
||||
- _install-${RUNNER}/
|
||||
- _build-${RUNNER}/meson-logs/meson-log.txt
|
||||
- _build-${RUNNER}/meson-dist/
|
||||
- _build-${RUNNER}/config.h
|
||||
reports:
|
||||
junit: "_build-${RUNNER}/meson-logs/testlog.junit.xml"
|
||||
expire_in: 2 days
|
||||
|
||||
|
||||
## Flatpak CI (Fedora) ##
|
||||
.flatpak:
|
||||
extends: .default
|
||||
@@ -391,7 +395,7 @@ gimp-debian-nonreloc:
|
||||
MESON_DIST: 0
|
||||
before_script:
|
||||
- export GIMP_PREFIX="${CI_PROJECT_DIR}/_install"
|
||||
timeout: 90m
|
||||
timeout: 30m
|
||||
|
||||
deps-flatpak:
|
||||
extends: .flatpak
|
||||
@@ -400,8 +404,7 @@ deps-flatpak:
|
||||
- sh build/linux/flatpak/1_build-deps-flatpakbuilder.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- _build-$RUNNER.tar
|
||||
- flatpak-builder.log
|
||||
- _build-$RUNNER.tar.zst
|
||||
- babl-meson-log.tar
|
||||
- gegl-meson-log.tar
|
||||
expire_in: 2 hours
|
||||
@@ -439,7 +442,7 @@ gimp-flatpak:
|
||||
variables:
|
||||
SNAPCRAFT_BASE_VERSION: "8_core24"
|
||||
RUNNER: x86_64_v3
|
||||
timeout: 20m
|
||||
timeout: 30m
|
||||
|
||||
deps-snap:
|
||||
extends: .snap
|
||||
@@ -529,10 +532,7 @@ gimp-snap:
|
||||
STORE_OPTION: '-Dms-store=true'
|
||||
parallel:
|
||||
matrix:
|
||||
- RUNNER: windows-aarch64
|
||||
MSYSTEM_PREFIX: clangarm64
|
||||
- RUNNER: win32-ps
|
||||
MSYSTEM_PREFIX: clang64
|
||||
- RUNNER: [windows-aarch64, win32-ps]
|
||||
tags:
|
||||
- $RUNNER
|
||||
variables:
|
||||
@@ -540,9 +540,9 @@ gimp-snap:
|
||||
#meson.build forces non-relocatable .pc. See: https://github.com/mesonbuild/meson/issues/14346
|
||||
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
|
||||
before_script:
|
||||
# FIXME:'gimpenv' have buggy code about Windows paths. See: https://gitlab.gnome.org/GNOME/gimp/-/issues/12284
|
||||
- $GIMP_PREFIX = "$PWD\_install-$MSYSTEM_PREFIX".Replace('\', '/')
|
||||
timeout: 40m
|
||||
- if (-not $env:MSYSTEM_PREFIX) { $env:MSYSTEM_PREFIX = if ((Get-WmiObject Win32_ComputerSystem).SystemType -like 'ARM64*') { 'clangarm64' } else { 'clang64' }}
|
||||
- $GIMP_PREFIX = "$PWD\_install-$env:MSYSTEM_PREFIX"
|
||||
timeout: 30m
|
||||
|
||||
.win_environ: &WIN_ENVIRON
|
||||
# See: https://testing.developer.gimp.org/core/setup/build/windows/#prepare-for-building
|
||||
@@ -562,9 +562,9 @@ deps-win:
|
||||
- build\windows\1_build-deps-msys2.ps1
|
||||
artifacts:
|
||||
paths:
|
||||
- _install-$MSYSTEM_PREFIX/
|
||||
- babl/_build-$MSYSTEM_PREFIX/meson-logs/meson-log.txt
|
||||
- gegl/_build-$MSYSTEM_PREFIX/meson-logs/meson-log.txt
|
||||
- _install-*/
|
||||
- babl/_build-*/meson-logs/meson-log.txt
|
||||
- gegl/_build-*/meson-logs/meson-log.txt
|
||||
expire_in: 2 hours
|
||||
|
||||
gimp-win:
|
||||
@@ -580,14 +580,14 @@ gimp-win:
|
||||
- build\windows\2_build-gimp-msys2.ps1
|
||||
artifacts:
|
||||
paths:
|
||||
- gimp-$MSYSTEM_PREFIX/
|
||||
- _build-$MSYSTEM_PREFIX/meson-logs/meson-log.txt
|
||||
- _build-$MSYSTEM_PREFIX/done-dll.list
|
||||
- gimp-*/
|
||||
- _build-*/meson-logs/meson-log.txt
|
||||
- _build-*/done-dll.list
|
||||
# Needed by dist-installer-weekly and dist-store-weekly
|
||||
- _build-$MSYSTEM_PREFIX/config.h
|
||||
- _build-$MSYSTEM_PREFIX/plug-ins/file_associations.list
|
||||
- _build-$MSYSTEM_PREFIX/build/windows/installer/
|
||||
- _build-$MSYSTEM_PREFIX/build/windows/store/
|
||||
- _build-*/config.h
|
||||
- _build-*/plug-ins/file_associations.list
|
||||
- _build-*/build/windows/installer/
|
||||
- _build-*/build/windows/store/
|
||||
expire_in: 2 days
|
||||
|
||||
|
||||
@@ -596,12 +596,10 @@ gimp-win:
|
||||
extends: .win
|
||||
parallel:
|
||||
matrix:
|
||||
- RUNNER: win32-ps
|
||||
MSYSTEM_PREFIX: mingw32
|
||||
- RUNNER: [win32-ps]
|
||||
variables:
|
||||
MSYSTEM_PREFIX: mingw32
|
||||
MINGW_PACKAGE_PREFIX: mingw-w64-i686
|
||||
CC: cc
|
||||
CXX: c++
|
||||
|
||||
deps-win-eol:
|
||||
extends: .win-eol
|
||||
@@ -671,6 +669,8 @@ meson-health:
|
||||
- <<: *CI_MERGE
|
||||
- <<: *CI_COMMIT
|
||||
stage: analysis
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
script:
|
||||
- apt-get update -qq
|
||||
- apt-get install -qq -y --no-install-recommends git shellcheck devscripts
|
||||
@@ -695,6 +695,19 @@ clang-format:
|
||||
- fetch_origin.log
|
||||
expire_in: 2 days
|
||||
|
||||
branches-check:
|
||||
extends: .default
|
||||
rules:
|
||||
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS == null && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH'
|
||||
stage: analysis
|
||||
variables:
|
||||
GIT_DEPTH: "0"
|
||||
script:
|
||||
- apt-get update -qq
|
||||
- apt-get install -qq -y --no-install-recommends git
|
||||
- sh .gitlab/check_dead_branches.sh
|
||||
allow_failure: true
|
||||
|
||||
cppcheck:
|
||||
extends: .default
|
||||
rules:
|
||||
|
42
.gitlab/check_dead_branches.sh
Normal file
42
.gitlab/check_dead_branches.sh
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
printf "\e[0Ksection_start:`date +%s`:branch_check[collapsed=false]\r\e[0KChecking for dead branches\n"
|
||||
git branch -r | grep -v 'origin/HEAD' | grep -v "origin/$CI_DEFAULT_BRANCH" | while IFS= read remote_branch; do
|
||||
remote_branch=$(printf "%s\n" "$remote_branch" | sed 's/^ *//;s/ *$//')
|
||||
branch_name=$(printf "%s\n" "$remote_branch" | sed 's|origin/||')
|
||||
|
||||
# NOT CHECKING
|
||||
## Skip old stable branches
|
||||
if echo "$branch_name" | grep -q "^gimp-[0-9]-" || [ "$branch_name" = "gnome-2-2" ] || [ "$branch_name" = "gnome-2-4" ]; then
|
||||
printf "\033[33m(SKIP)\033[0m: $branch_name is a snapshot of $CI_DEFAULT_BRANCH but no problem\n"
|
||||
continue
|
||||
fi
|
||||
## Skip recently created branches
|
||||
if [ "$(git rev-parse "$remote_branch")" = "$(git rev-parse "$CI_COMMIT_SHA")" ]; then
|
||||
printf "\033[33m(SKIP)\033[0m: $branch_name is identical to $CI_DEFAULT_BRANCH but no problem\n"
|
||||
continue
|
||||
fi
|
||||
|
||||
# CHECKING
|
||||
## Check: merge-base
|
||||
if git merge-base --is-ancestor "$remote_branch" "$CI_COMMIT_SHA"; then
|
||||
printf "\033[31m(ERROR)\033[0m: $branch_name is fully merged into $CI_DEFAULT_BRANCH (via git merge-base)\n"
|
||||
touch 'dead_branch'
|
||||
continue
|
||||
fi
|
||||
## Fallback check: cherry
|
||||
cherry_output=$(git cherry "$CI_COMMIT_SHA" "$remote_branch")
|
||||
if [ -z "$(printf "%s\n" "$cherry_output" | grep '^+')" ]; then
|
||||
printf "\033[31m(ERROR)\033[0m: $branch_name is fully merged into $CI_DEFAULT_BRANCH (via git cherry)\n"
|
||||
touch 'dead_branch'
|
||||
continue
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -f "dead_branch" ]; then
|
||||
printf " Please delete the merged branches\n"
|
||||
exit 1
|
||||
else
|
||||
printf '(INFO): All branches are organized.\n'
|
||||
fi
|
||||
printf "\e[0Ksection_end:`date +%s`:branch_check\r\e[0K\n"
|
@@ -24,7 +24,7 @@ https://gitlab.gnome.org/GNOME/gimp/-/issues/?sort=updated_desc&state=all&label_
|
||||
- "Be considerate and respectful". This is our main rule.
|
||||
E.g. avoid negative emotional writing which only generates more upsetting
|
||||
interactions.
|
||||
- Stay on topic by writting only one bug per report created.
|
||||
- Stay on topic by writing only one bug per report created.
|
||||
- Add full (not cropped) screenshots or other files using the clip button on GitLab. -->
|
||||
|
||||
### Reproduction
|
||||
|
@@ -12,4 +12,4 @@
|
||||
Only human created works please!
|
||||
|
||||
- You can request the devs to allow installable packages to be
|
||||
generated from this MR by writting ~Package: in the comments -->
|
||||
generated from this MR by writing ~Package: in the comments -->
|
||||
|
@@ -5,7 +5,18 @@
|
||||
|
||||
# CHECK SCRIPTS RUNNED BY MESON (ALL OSes)
|
||||
printf "\e[0Ksection_start:`date +%s`:nonunix_test[collapsed=false]\r\e[0KChecking for non-Unix compatibility\n"
|
||||
diff=$(git diff -U0 --no-color "${newest_common_ancestor_sha}" -- '*.build' '*.py' | grep -E '^\+[^+]' | sed 's/^+//')
|
||||
diff=$(git diff -U0 --no-color --submodule=diff "${newest_common_ancestor_sha}" \
|
||||
| awk '
|
||||
/^diff --git a\/.*\.(build|py)/ {
|
||||
sub(/^diff --git a\//, "", $0)
|
||||
sub(/ b\/.*$/, "", $0)
|
||||
file = $0
|
||||
next
|
||||
}
|
||||
/^\+[^+]/ && file != "" {
|
||||
print file ":" substr($0, 2)
|
||||
}
|
||||
')
|
||||
|
||||
## List of commonly used utilities on Unix world
|
||||
## See the context: https://gitlab.gnome.org/GNOME/gimp/-/issues/11385
|
||||
@@ -168,10 +179,21 @@ printf "\e[0Ksection_end:`date +%s`:nonunix_test\r\e[0K\n"
|
||||
# 1) contain bash shebang or are called by bash;
|
||||
# 2) contain bashisms.
|
||||
printf "\e[0Ksection_start:`date +%s`:unix_test[collapsed=false]\r\e[0KChecking for Unix portability (optional)\n"
|
||||
diff=$(git diff -U0 --no-color "${newest_common_ancestor_sha}" | grep -E '^\+[^+]' | sed 's/^+//')
|
||||
diff=$(git diff -U0 --no-color --submodule=diff "${newest_common_ancestor_sha}" \
|
||||
| awk '
|
||||
/^diff --git a\// {
|
||||
sub(/^diff --git a\//, "", $0)
|
||||
sub(/ b\/.*$/, "", $0)
|
||||
file = $0
|
||||
next
|
||||
}
|
||||
/^\+[^+]/ && file != "" {
|
||||
print file ":" substr($0, 2)
|
||||
}
|
||||
')
|
||||
|
||||
## Check shebang and external call (1)
|
||||
echo "$diff" | grep -E '^#!\s*/usr/bin/env\s+bash|^#!\s*/(usr/bin|bin)/bash(\s|$)' && found_bashism='extrinsic_bashism'
|
||||
echo "$diff" | grep -E '#!\s*/usr/bin/env\s+bash|#!\s*/(usr/bin|bin)/bash(\s|$)' && found_bashism='extrinsic_bashism'
|
||||
echo "$diff" | grep -E "bash\s+.*\.sh" && found_bashism='extrinsic_bashism'
|
||||
|
||||
## Check content with shellcheck and checkbashisms (2)
|
||||
|
@@ -201,7 +201,7 @@ help in that regard:
|
||||
* HEIC: e.g. libde265 and libx265 support (for
|
||||
respectively decoding and encoding of HEVC).
|
||||
* AVIF: e.g. libaom decoder and encoder (for AV1 encoding and
|
||||
decoding), prefered over rav1e.
|
||||
decoding), preferred over rav1e.
|
||||
* HEJ2: OpenJPEG (for JPEG2000 inside HEIF).
|
||||
|
||||
If you don't compile libheif with the correct flags (see libheif
|
||||
@@ -489,5 +489,5 @@ reconfiguration:
|
||||
% ninja reconfigure
|
||||
|
||||
Verify that the optional features you wanted are now shown as `true`,
|
||||
otherwise follow similar advices than above to make sure they are
|
||||
otherwise follow similar advice as above to make sure they are
|
||||
visible to your setup.
|
||||
|
76
NEWS
76
NEWS
@@ -6,6 +6,82 @@
|
||||
This is the development branch of GIMP.
|
||||
|
||||
|
||||
Overview of Changes from GIMP 3.1.4 to GIMP 3.2-RC1
|
||||
===================================================
|
||||
|
||||
Core:
|
||||
|
||||
- macOS: "Quit" from the dock's right-click menu will now follow our
|
||||
standard Quit procedure, by intercepting the
|
||||
applicationShouldTerminate signal, instead of forcing the
|
||||
application to close (hence losing unsaved changes).
|
||||
- "Add Layer Mask" will now have an "Edit mask immediately" checkbox
|
||||
allowing to decide whether to go into Edit Mask state or not. This
|
||||
setting is saved across repetitive actions, as all other settings in
|
||||
this dialog.
|
||||
|
||||
Graphical User Interface:
|
||||
|
||||
- "Monitor Linked Image" and "Discard Link Information" menu items
|
||||
added to Layer menu when the selected layer is a link layer.
|
||||
- The GimpColorHexEntry will now update the chosen color as you type.
|
||||
- Use a standard, yet extended, AppMenu on macOS.
|
||||
|
||||
Plug-Ins:
|
||||
|
||||
- file-compressor: add zip decompression support. This allows support
|
||||
for .hgt.zip files, as well as other formats compressed with zip.
|
||||
|
||||
API:
|
||||
|
||||
- The following libgimpbase API are now deprecated:
|
||||
* gimp_pixpipe_params_init
|
||||
* gimp_pixpipe_params_parse
|
||||
* gimp_pixpipe_params_build
|
||||
* gimp_pixpipe_params_free
|
||||
- New libgimp functions:
|
||||
* gimp_vector_layer_get_enable_fill
|
||||
* gimp_vector_layer_get_enable_stroke
|
||||
* gimp_vector_layer_get_fill_color
|
||||
* gimp_vector_layer_get_path
|
||||
* gimp_vector_layer_get_stroke_cap_style
|
||||
* gimp_vector_layer_get_stroke_color
|
||||
* gimp_vector_layer_get_stroke_dash_offset
|
||||
* gimp_vector_layer_get_stroke_dash_pattern
|
||||
* gimp_vector_layer_get_stroke_join_style
|
||||
* gimp_vector_layer_get_stroke_miter_limit
|
||||
* gimp_vector_layer_get_stroke_width
|
||||
* gimp_vector_layer_get_stroke_width_unit
|
||||
* gimp_vector_layer_set_enable_fill
|
||||
* gimp_vector_layer_set_enable_stroke
|
||||
* gimp_vector_layer_set_fill_color
|
||||
* gimp_vector_layer_set_stroke_cap_style
|
||||
* gimp_vector_layer_set_stroke_color
|
||||
* gimp_vector_layer_set_stroke_dash_offset
|
||||
* gimp_vector_layer_set_stroke_dash_pattern
|
||||
* gimp_vector_layer_set_stroke_join_style
|
||||
* gimp_vector_layer_set_stroke_miter_limit
|
||||
* gimp_vector_layer_set_stroke_width
|
||||
* gimp_vector_layer_set_stroke_width_unit
|
||||
* gimp_item_is_vector_layer
|
||||
* gimp_item_id_is_link_layer
|
||||
* gimp_item_is_link_layer
|
||||
* gimp_link_layer_discard
|
||||
* gimp_link_layer_get_by_id
|
||||
* gimp_link_layer_get_file
|
||||
* gimp_link_layer_get_type
|
||||
* gimp_link_layer_monitor
|
||||
* gimp_link_layer_new
|
||||
* gimp_link_layer_set_file
|
||||
* gimp_param_link_layer_get_type
|
||||
* gimp_param_spec_link_layer
|
||||
* gimp_procedure_add_link_layer_argument
|
||||
* gimp_procedure_add_link_layer_aux_argument
|
||||
* gimp_procedure_add_link_layer_return_value
|
||||
* gimp_link_layer_get_mime_type
|
||||
- New libgimp class: GimpLinkLayer
|
||||
|
||||
|
||||
Overview of Changes from GIMP 3.1.2 to GIMP 3.1.4
|
||||
=================================================
|
||||
|
||||
|
@@ -307,13 +307,8 @@ gint n_dialogs_dockable_actions = G_N_ELEMENTS (dialogs_dockable_actions);
|
||||
static const GimpStringActionEntry dialogs_toplevel_actions[] =
|
||||
{
|
||||
{ "dialogs-preferences", GIMP_ICON_PREFERENCES_SYSTEM,
|
||||
#if defined(PLATFORM_OSX)
|
||||
NC_("dialogs-action", "_Settings..."),
|
||||
NC_("dialogs-action", "_Settings..."),
|
||||
#else
|
||||
NC_("dialogs-action", "_Preferences"),
|
||||
NC_("dialogs-action", "_Preferences"),
|
||||
#endif
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the preferences dialog"),
|
||||
"gimp-preferences-dialog",
|
||||
@@ -360,8 +355,6 @@ static const GimpStringActionEntry dialogs_toplevel_actions[] =
|
||||
{ "dialogs-about", GIMP_ICON_HELP_ABOUT,
|
||||
#if defined(G_OS_WIN32)
|
||||
NC_("dialogs-action", "About GIMP"),
|
||||
#elif defined(PLATFORM_OSX)
|
||||
NC_("dialogs-action", "About"),
|
||||
#else /* UNIX: use GNOME HIG */
|
||||
NC_("dialogs-action", "_About"),
|
||||
#endif
|
||||
|
@@ -824,7 +824,7 @@ filters_actions_setup (GimpActionGroup *group)
|
||||
* operations end up generating the same action name. Typically we
|
||||
* don't want a third-party operation called "my-op" to have the same
|
||||
* action name than "my_op" (which is to say that one will be
|
||||
* overrided by the other).
|
||||
* overridden by the other).
|
||||
*/
|
||||
g_free (action_name);
|
||||
action_name = g_strdup_printf ("filters-%s-%d", formatted_op_name, i++);
|
||||
|
@@ -150,6 +150,7 @@ static void layers_add_mask_callback (GtkWidget *dialog,
|
||||
GimpAddMaskType add_mask_type,
|
||||
GimpChannel *channel,
|
||||
gboolean invert,
|
||||
gboolean edit_mask,
|
||||
gpointer user_data);
|
||||
static void layers_scale_callback (GtkWidget *dialog,
|
||||
GimpViewable *viewable,
|
||||
@@ -1568,6 +1569,7 @@ layers_mask_add_cmd_callback (GimpAction *action,
|
||||
widget,
|
||||
config->layer_add_mask_type,
|
||||
config->layer_add_mask_invert,
|
||||
config->layer_add_mask_edit_mask,
|
||||
layers_add_mask_callback,
|
||||
NULL);
|
||||
|
||||
@@ -1643,7 +1645,9 @@ layers_mask_add_last_vals_cmd_callback (GimpAction *action,
|
||||
if (config->layer_add_mask_invert)
|
||||
gimp_channel_invert (GIMP_CHANNEL (mask), FALSE);
|
||||
|
||||
gimp_layer_add_mask (iter->data, mask, TRUE, NULL);
|
||||
gimp_layer_add_mask (iter->data, mask,
|
||||
config->layer_add_mask_edit_mask,
|
||||
TRUE, NULL);
|
||||
}
|
||||
|
||||
gimp_image_undo_group_end (image);
|
||||
@@ -1760,7 +1764,7 @@ layers_mask_show_cmd_callback (GimpAction *action,
|
||||
{
|
||||
/* if switching "show mask" on, and any selected layer's
|
||||
* mask is already visible, bail out because that's
|
||||
* exactly the logic we use in the ui for multile
|
||||
* exactly the logic we use in the ui for multiple
|
||||
* visible layer masks.
|
||||
*/
|
||||
return;
|
||||
@@ -1811,7 +1815,7 @@ layers_mask_disable_cmd_callback (GimpAction *action,
|
||||
{
|
||||
/* if switching "disable mask" on, and any selected
|
||||
* layer's mask is already disabled, bail out because
|
||||
* that's exactly the logic we use in the ui for multile
|
||||
* that's exactly the logic we use in the ui for multiple
|
||||
* disabled layer masks.
|
||||
*/
|
||||
return;
|
||||
@@ -2591,6 +2595,7 @@ layers_add_mask_callback (GtkWidget *dialog,
|
||||
GimpAddMaskType add_mask_type,
|
||||
GimpChannel *channel,
|
||||
gboolean invert,
|
||||
gboolean edit_mask,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (layers->data));
|
||||
@@ -2600,8 +2605,9 @@ layers_add_mask_callback (GtkWidget *dialog,
|
||||
GError *error = NULL;
|
||||
|
||||
g_object_set (config,
|
||||
"layer-add-mask-type", add_mask_type,
|
||||
"layer-add-mask-invert", invert,
|
||||
"layer-add-mask-type", add_mask_type,
|
||||
"layer-add-mask-invert", invert,
|
||||
"layer-add-mask-edit-mask", edit_mask,
|
||||
NULL);
|
||||
|
||||
gimp_image_undo_group_start (image,
|
||||
@@ -2617,7 +2623,7 @@ layers_add_mask_callback (GtkWidget *dialog,
|
||||
if (config->layer_add_mask_invert)
|
||||
gimp_channel_invert (GIMP_CHANNEL (mask), FALSE);
|
||||
|
||||
if (! gimp_layer_add_mask (iter->data, mask, TRUE, &error))
|
||||
if (! gimp_layer_add_mask (iter->data, mask, edit_mask, TRUE, &error))
|
||||
{
|
||||
gimp_message_literal (image->gimp,
|
||||
G_OBJECT (dialog), GIMP_MESSAGE_WARNING,
|
||||
|
@@ -101,6 +101,6 @@ libappactions = static_library('appactions',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Actions"',
|
||||
dependencies: [
|
||||
gegl, gdk_pixbuf, gtk3,
|
||||
gegl, gdk_pixbuf, gtk3, gexiv2,
|
||||
],
|
||||
)
|
||||
|
@@ -81,6 +81,7 @@ enum
|
||||
|
||||
PROP_LAYER_ADD_MASK_TYPE,
|
||||
PROP_LAYER_ADD_MASK_INVERT,
|
||||
PROP_LAYER_ADD_MASK_EDIT_MASK,
|
||||
|
||||
PROP_LAYER_MERGE_TYPE,
|
||||
PROP_LAYER_MERGE_ACTIVE_GROUP_ONLY,
|
||||
@@ -389,6 +390,13 @@ gimp_dialog_config_class_init (GimpDialogConfigClass *klass)
|
||||
FALSE,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_LAYER_ADD_MASK_EDIT_MASK,
|
||||
"layer-add-mask-edit-mask",
|
||||
"Default layer mask: edit mask immediately",
|
||||
LAYER_ADD_MASK_EDIT_MASK,
|
||||
TRUE,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
GIMP_CONFIG_PROP_ENUM (object_class, PROP_LAYER_MERGE_TYPE,
|
||||
"layer-merge-type",
|
||||
"Default layer merge type",
|
||||
@@ -716,6 +724,9 @@ gimp_dialog_config_set_property (GObject *object,
|
||||
case PROP_LAYER_ADD_MASK_INVERT:
|
||||
config->layer_add_mask_invert = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_LAYER_ADD_MASK_EDIT_MASK:
|
||||
config->layer_add_mask_edit_mask = g_value_get_boolean (value);
|
||||
break;
|
||||
|
||||
case PROP_LAYER_MERGE_TYPE:
|
||||
config->layer_merge_type = g_value_get_enum (value);
|
||||
@@ -908,6 +919,9 @@ gimp_dialog_config_get_property (GObject *object,
|
||||
case PROP_LAYER_ADD_MASK_INVERT:
|
||||
g_value_set_boolean (value, config->layer_add_mask_invert);
|
||||
break;
|
||||
case PROP_LAYER_ADD_MASK_EDIT_MASK:
|
||||
g_value_set_boolean (value, config->layer_add_mask_edit_mask);
|
||||
break;
|
||||
|
||||
case PROP_LAYER_MERGE_TYPE:
|
||||
g_value_set_enum (value, config->layer_merge_type);
|
||||
|
@@ -78,6 +78,7 @@ struct _GimpDialogConfig
|
||||
|
||||
GimpAddMaskType layer_add_mask_type;
|
||||
gboolean layer_add_mask_invert;
|
||||
gboolean layer_add_mask_edit_mask;
|
||||
|
||||
GimpMergeType layer_merge_type;
|
||||
gboolean layer_merge_active_group_only;
|
||||
|
@@ -659,6 +659,9 @@ _("Sets the default mask for the 'Add Layer Mask' dialog.")
|
||||
#define LAYER_ADD_MASK_INVERT_BLURB \
|
||||
_("Sets the default 'invert mask' state for the 'Add Layer Mask' dialog.")
|
||||
|
||||
#define LAYER_ADD_MASK_EDIT_MASK \
|
||||
_("Sets the default 'edit mask' state for the 'Add Layer Mask' dialog.")
|
||||
|
||||
#define LAYER_MERGE_TYPE_BLURB \
|
||||
_("Sets the default merge type for the 'Merge Visible Layers' dialog.")
|
||||
|
||||
|
@@ -44,7 +44,7 @@ libappconfig = static_library('appconfig',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Config"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf, gio, gio_specific, libmypaint,
|
||||
cairo, gegl, gdk_pixbuf, gexiv2, gio, gio_specific, libmypaint,
|
||||
],
|
||||
)
|
||||
|
||||
|
@@ -353,7 +353,7 @@ gimp_transform_resize_crop (const GimpVector2 *orig_points,
|
||||
|
||||
if (r.area == 0)
|
||||
{
|
||||
/* saveguard if something went wrong, adjust and give warning */
|
||||
/* safeguard if something went wrong, adjust and give warning */
|
||||
gimp_transform_resize_adjust (orig_points, n_points,
|
||||
x1, y1, x2, y2);
|
||||
g_printerr ("no rectangle found by algorithm, no cropping done\n");
|
||||
|
@@ -605,7 +605,7 @@ gimp_get_fill_params (GimpContext *context,
|
||||
* @start_y:
|
||||
* @end_x:
|
||||
* @end_y:
|
||||
* @n_snap_lines: Number evenly disributed lines to snap to.
|
||||
* @n_snap_lines: Number evenly distributed lines to snap to.
|
||||
* @offset_angle: The angle by which to offset the lines, in degrees.
|
||||
* @xres: The horizontal resolution.
|
||||
* @yres: The vertical resolution.
|
||||
|
@@ -271,7 +271,7 @@ gimp_brush_pipe_select_brush (GimpBrush *brush,
|
||||
break;
|
||||
|
||||
case PIPE_SELECT_ANGULAR:
|
||||
/* Coords angle is already nomalized,
|
||||
/* Coords angle is already normalized,
|
||||
* offset by 90 degrees is still needed
|
||||
* because hoses were made PS compatible*/
|
||||
ix = (gint) RINT ((1.0 - current_coords->direction + 0.25) * pipe->rank[i]) % pipe->rank[i];
|
||||
@@ -351,8 +351,10 @@ gimp_brush_pipe_set_params (GimpBrushPipe *pipe,
|
||||
{
|
||||
GimpPixPipeParams params;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gimp_pixpipe_params_init (¶ms);
|
||||
gimp_pixpipe_params_parse (paramstring, ¶ms);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
pipe->dimension = params.dim;
|
||||
pipe->rank = g_new0 (gint, pipe->dimension);
|
||||
@@ -384,7 +386,9 @@ gimp_brush_pipe_set_params (GimpBrushPipe *pipe,
|
||||
pipe->index[i] = 0;
|
||||
}
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gimp_pixpipe_params_free (¶ms);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
pipe->params = g_strdup (paramstring);
|
||||
}
|
||||
|
@@ -152,7 +152,7 @@ gimp_id_table_insert (GimpIdTable *id_table, gpointer data)
|
||||
* @data: The data to associate with the id
|
||||
*
|
||||
* Insert data in the id table with a specific ID. If data already
|
||||
* exsts with the given ID, this function fails.
|
||||
* exists with the given ID, this function fails.
|
||||
*
|
||||
* Returns: The used ID if successful, -1 if it was already in use.
|
||||
**/
|
||||
|
@@ -960,6 +960,7 @@ gimp_image_undo_push_layer_mask_add (GimpImage *image,
|
||||
GIMP_DIRTY_IMAGE_STRUCTURE,
|
||||
"item", layer,
|
||||
"layer-mask", mask,
|
||||
"edit-mask", FALSE,
|
||||
NULL);
|
||||
}
|
||||
|
||||
@@ -982,6 +983,7 @@ gimp_image_undo_push_layer_mask_remove (GimpImage *image,
|
||||
GIMP_DIRTY_IMAGE_STRUCTURE,
|
||||
"item", layer,
|
||||
"layer-mask", mask,
|
||||
"edit-mask", gimp_layer_get_edit_mask (layer),
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
@@ -3012,7 +3012,7 @@ gimp_image_get_xcf_version (GimpImage *image,
|
||||
/* The blending space variant corresponding to SPACE_RGB_PERCEPTUAL in <3.0
|
||||
* corresponds to R'G'B'A which is NON_LINEAR in babl. Perceptual in babl is
|
||||
* R~G~B~A, >= 3.0 the code, comments and usage matches the existing enum value
|
||||
* as being NON_LINEAR and new layers created use the new interger value for
|
||||
* as being NON_LINEAR and new layers created use the new integer value for
|
||||
* PERCEPTUAL.
|
||||
*/
|
||||
version = MAX (23, version);
|
||||
@@ -3166,7 +3166,7 @@ gimp_image_get_xcf_version (GimpImage *image,
|
||||
|
||||
/* Note: user unit storage was changed in XCF 21, but we can still
|
||||
* easily save older XCF (we use the unit name for both singular and
|
||||
* plural forms). Therefore we don't bump the XCF version unecessarily
|
||||
* plural forms). Therefore we don't bump the XCF version unnecessarily
|
||||
* and don't add any test.
|
||||
*/
|
||||
|
||||
|
@@ -991,10 +991,10 @@ gimp_layer_duplicate (GimpItem *item,
|
||||
|
||||
mask = gimp_item_duplicate (GIMP_ITEM (layer->mask),
|
||||
G_TYPE_FROM_INSTANCE (layer->mask));
|
||||
gimp_layer_add_mask (new_layer, GIMP_LAYER_MASK (mask), FALSE, NULL);
|
||||
gimp_layer_add_mask (new_layer, GIMP_LAYER_MASK (mask),
|
||||
layer->edit_mask, FALSE, NULL);
|
||||
|
||||
new_layer->apply_mask = layer->apply_mask;
|
||||
new_layer->edit_mask = layer->edit_mask;
|
||||
new_layer->show_mask = layer->show_mask;
|
||||
}
|
||||
}
|
||||
@@ -1917,6 +1917,7 @@ gimp_layer_get_mask (GimpLayer *layer)
|
||||
GimpLayerMask *
|
||||
gimp_layer_add_mask (GimpLayer *layer,
|
||||
GimpLayerMask *mask,
|
||||
gboolean edit_mask,
|
||||
gboolean push_undo,
|
||||
GError **error)
|
||||
{
|
||||
@@ -1958,7 +1959,7 @@ gimp_layer_add_mask (GimpLayer *layer,
|
||||
|
||||
layer->mask = g_object_ref_sink (mask);
|
||||
layer->apply_mask = TRUE;
|
||||
layer->edit_mask = TRUE;
|
||||
layer->edit_mask = edit_mask;
|
||||
layer->show_mask = FALSE;
|
||||
|
||||
gimp_layer_mask_set_layer (mask, layer);
|
||||
|
@@ -159,6 +159,7 @@ GimpLayerMask * gimp_layer_create_mask (GimpLayer *layer,
|
||||
GimpChannel *channel);
|
||||
GimpLayerMask * gimp_layer_add_mask (GimpLayer *layer,
|
||||
GimpLayerMask *mask,
|
||||
gboolean edit_mask,
|
||||
gboolean push_undo,
|
||||
GError **error);
|
||||
void gimp_layer_apply_mask (GimpLayer *layer,
|
||||
|
@@ -33,7 +33,8 @@
|
||||
enum
|
||||
{
|
||||
PROP_0,
|
||||
PROP_LAYER_MASK
|
||||
PROP_LAYER_MASK,
|
||||
PROP_EDIT_MASK
|
||||
};
|
||||
|
||||
|
||||
@@ -83,6 +84,11 @@ gimp_layer_mask_undo_class_init (GimpLayerMaskUndoClass *klass)
|
||||
GIMP_TYPE_LAYER_MASK,
|
||||
GIMP_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
g_object_class_install_property (object_class, PROP_EDIT_MASK,
|
||||
g_param_spec_boolean ("edit-mask", NULL, NULL,
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -114,6 +120,9 @@ gimp_layer_mask_undo_set_property (GObject *object,
|
||||
case PROP_LAYER_MASK:
|
||||
layer_mask_undo->layer_mask = g_value_dup_object (value);
|
||||
break;
|
||||
case PROP_EDIT_MASK:
|
||||
layer_mask_undo->edit_mask = g_value_get_boolean (value);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
@@ -134,6 +143,9 @@ gimp_layer_mask_undo_get_property (GObject *object,
|
||||
case PROP_LAYER_MASK:
|
||||
g_value_set_object (value, layer_mask_undo->layer_mask);
|
||||
break;
|
||||
case PROP_EDIT_MASK:
|
||||
g_value_set_boolean (value, layer_mask_undo->edit_mask);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
@@ -175,13 +187,15 @@ gimp_layer_mask_undo_pop (GimpUndo *undo,
|
||||
{
|
||||
/* remove layer mask */
|
||||
|
||||
layer_mask_undo->edit_mask = gimp_layer_get_edit_mask (layer);
|
||||
gimp_layer_apply_mask (layer, GIMP_MASK_DISCARD, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* restore layer mask */
|
||||
|
||||
gimp_layer_add_mask (layer, layer_mask_undo->layer_mask, FALSE, NULL);
|
||||
gimp_layer_add_mask (layer, layer_mask_undo->layer_mask,
|
||||
layer_mask_undo->edit_mask, FALSE, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -36,6 +36,7 @@ struct _GimpLayerMaskUndo
|
||||
GimpItemUndo parent_instance;
|
||||
|
||||
GimpLayerMask *layer_mask;
|
||||
gboolean edit_mask;
|
||||
};
|
||||
|
||||
struct _GimpLayerMaskUndoClass
|
||||
|
@@ -76,6 +76,7 @@ struct _GimpLinkPrivate
|
||||
GimpImageBaseType base_type;
|
||||
GimpPrecision precision;
|
||||
GimpPlugInProcedure *load_proc;
|
||||
const gchar *mime_type;
|
||||
};
|
||||
|
||||
static void gimp_link_finalize (GObject *object);
|
||||
@@ -298,8 +299,8 @@ gimp_link_update_buffer (GimpLink *link,
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpPDBStatusType status;
|
||||
const gchar *mime_type = NULL;
|
||||
|
||||
link->p->mime_type = NULL;
|
||||
image = file_open_image (link->p->gimp,
|
||||
gimp_get_user_context (link->p->gimp),
|
||||
progress,
|
||||
@@ -313,7 +314,8 @@ gimp_link_update_buffer (GimpLink *link,
|
||||
*/
|
||||
GIMP_RUN_NONINTERACTIVE,
|
||||
&link->p->is_vector,
|
||||
&status, &mime_type, &real_error);
|
||||
&status, &link->p->mime_type,
|
||||
&real_error);
|
||||
|
||||
if (image && status == GIMP_PDB_SUCCESS)
|
||||
{
|
||||
@@ -635,6 +637,14 @@ gimp_link_set_absolute_path (GimpLink *link,
|
||||
link->p->absolute_path = absolute_path;
|
||||
}
|
||||
|
||||
const gchar *
|
||||
gimp_link_get_mime_type (GimpLink *link)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_LINK (link), NULL);
|
||||
|
||||
return link->p->mime_type;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_link_freeze (GimpLink *link)
|
||||
{
|
||||
|
@@ -73,6 +73,9 @@ void gimp_link_set_file (GimpLink *layer,
|
||||
gboolean gimp_link_get_absolute_path (GimpLink *link);
|
||||
void gimp_link_set_absolute_path (GimpLink *link,
|
||||
gboolean absolute_path);
|
||||
|
||||
const gchar * gimp_link_get_mime_type (GimpLink *link);
|
||||
|
||||
void gimp_link_freeze (GimpLink *link);
|
||||
void gimp_link_thaw (GimpLink *link);
|
||||
gboolean gimp_link_is_monitored (GimpLink *link);
|
||||
|
@@ -36,6 +36,7 @@
|
||||
#include "gimpimage.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayermask.h"
|
||||
#include "gimplinklayer.h"
|
||||
#include "gimppalette.h"
|
||||
#include "gimpparamspecs.h"
|
||||
#include "gimppattern.h"
|
||||
|
@@ -512,17 +512,24 @@ about_dialog_add_update (GimpAboutDialog *dialog,
|
||||
|
||||
if (config->check_update_timestamp > 0)
|
||||
{
|
||||
gchar *subtext;
|
||||
gchar *time;
|
||||
|
||||
datetime = g_date_time_new_from_unix_local (config->check_update_timestamp);
|
||||
gchar *subtext;
|
||||
gchar *time;
|
||||
#if defined(PLATFORM_OSX)
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
|
||||
NSDate *current_date = [NSDate date];
|
||||
NSString *formatted_date;
|
||||
NSString *formatted_time;
|
||||
#elif defined(G_OS_WIN32)
|
||||
SYSTEMTIME st;
|
||||
int date_len, time_len;
|
||||
wchar_t *date_buf = NULL;
|
||||
wchar_t *time_buf = NULL;
|
||||
#endif
|
||||
|
||||
datetime = g_date_time_new_from_unix_local (config->check_update_timestamp);
|
||||
|
||||
#if defined(PLATFORM_OSX)
|
||||
formatter.locale = [NSLocale currentLocale];
|
||||
|
||||
formatter.dateStyle = NSDateFormatterShortStyle;
|
||||
@@ -546,11 +553,6 @@ about_dialog_add_update (GimpAboutDialog *dialog,
|
||||
[formatter release];
|
||||
[pool drain];
|
||||
#elif defined(G_OS_WIN32)
|
||||
SYSTEMTIME st;
|
||||
int date_len, time_len;
|
||||
wchar_t *date_buf = NULL;
|
||||
wchar_t *time_buf = NULL;
|
||||
|
||||
GetLocalTime (&st);
|
||||
|
||||
date_len = GetDateFormatEx (LOCALE_NAME_USER_DEFAULT, 0, &st,
|
||||
|
@@ -249,9 +249,14 @@ file_open_dialog_open_image (GtkWidget *dialog,
|
||||
|
||||
if (! image && status != GIMP_PDB_SUCCESS && status != GIMP_PDB_CANCEL)
|
||||
{
|
||||
gimp_message (gimp, G_OBJECT (dialog), GIMP_MESSAGE_ERROR,
|
||||
_("Opening '%s' failed:\n\n%s"),
|
||||
gimp_file_get_utf8_name (file), error->message);
|
||||
if (error)
|
||||
gimp_message (gimp, G_OBJECT (dialog), GIMP_MESSAGE_ERROR,
|
||||
_("Opening '%s' failed:\n\n%s"),
|
||||
gimp_file_get_utf8_name (file), error->message);
|
||||
else
|
||||
gimp_message (gimp, G_OBJECT (dialog), GIMP_MESSAGE_ERROR,
|
||||
_("Opening '%s' failed."),
|
||||
gimp_file_get_utf8_name (file));
|
||||
g_clear_error (&error);
|
||||
}
|
||||
|
||||
|
@@ -50,6 +50,7 @@ struct _LayerAddMaskDialog
|
||||
GimpAddMaskType add_mask_type;
|
||||
GimpChannel *channel;
|
||||
gboolean invert;
|
||||
gboolean edit_mask;
|
||||
GimpAddMaskCallback callback;
|
||||
gpointer user_data;
|
||||
};
|
||||
@@ -73,12 +74,14 @@ layer_add_mask_dialog_new (GList *layers,
|
||||
GtkWidget *parent,
|
||||
GimpAddMaskType add_mask_type,
|
||||
gboolean invert,
|
||||
gboolean edit_mask,
|
||||
GimpAddMaskCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
LayerAddMaskDialog *private;
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *frame;
|
||||
GtkWidget *combo;
|
||||
GtkWidget *button;
|
||||
@@ -98,6 +101,7 @@ layer_add_mask_dialog_new (GList *layers,
|
||||
private->layers = layers;
|
||||
private->add_mask_type = add_mask_type;
|
||||
private->invert = invert;
|
||||
private->edit_mask = edit_mask;
|
||||
private->callback = callback;
|
||||
private->user_data = user_data;
|
||||
|
||||
@@ -180,15 +184,28 @@ layer_add_mask_dialog_new (GList *layers,
|
||||
gimp_container_view_set_1_selected (GIMP_CONTAINER_VIEW (combo),
|
||||
GIMP_VIEWABLE (channel));
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 1);
|
||||
gtk_box_pack_end (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
button = gtk_check_button_new_with_mnemonic (_("In_vert mask"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), private->invert);
|
||||
gtk_box_pack_end (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
g_signal_connect (button, "toggled",
|
||||
G_CALLBACK (gimp_toggle_button_update),
|
||||
&private->invert);
|
||||
|
||||
button = gtk_check_button_new_with_mnemonic (_("_Edit mask immediately"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), private->edit_mask);
|
||||
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
g_signal_connect (button, "toggled",
|
||||
G_CALLBACK (gimp_toggle_button_update),
|
||||
&private->edit_mask);
|
||||
|
||||
return dialog;
|
||||
}
|
||||
|
||||
@@ -224,6 +241,7 @@ layer_add_mask_dialog_response (GtkWidget *dialog,
|
||||
private->add_mask_type,
|
||||
private->channel,
|
||||
private->invert,
|
||||
private->edit_mask,
|
||||
private->user_data);
|
||||
}
|
||||
else
|
||||
|
@@ -23,6 +23,7 @@ typedef void (* GimpAddMaskCallback) (GtkWidget *dialog,
|
||||
GimpAddMaskType add_mask_type,
|
||||
GimpChannel *channel,
|
||||
gboolean invert,
|
||||
gboolean edit_mask,
|
||||
gpointer user_data);
|
||||
|
||||
|
||||
@@ -31,5 +32,6 @@ GtkWidget * layer_add_mask_dialog_new (GList *layers,
|
||||
GtkWidget *parent,
|
||||
GimpAddMaskType add_mask_type,
|
||||
gboolean invert,
|
||||
gboolean edit_mask,
|
||||
GimpAddMaskCallback callback,
|
||||
gpointer user_data);
|
||||
|
@@ -125,7 +125,7 @@ static void palette_import_image_remove (GimpContainer *container,
|
||||
GimpImage *image,
|
||||
ImportDialog *private);
|
||||
static void palette_import_make_palette (ImportDialog *private);
|
||||
|
||||
static void palette_import_file_set_filters (GtkFileChooser *file_chooser);
|
||||
|
||||
/* public functions */
|
||||
|
||||
@@ -282,13 +282,15 @@ palette_import_dialog_new (GimpContext *context)
|
||||
|
||||
/* Palette file name entry */
|
||||
private->file_chooser = gtk_file_chooser_button_new (_("Select Palette File"),
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN);
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN);
|
||||
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 4,
|
||||
NULL, 0.0, 0.5, private->file_chooser, 1);
|
||||
gtk_size_group_add_widget (size_group, private->file_chooser);
|
||||
|
||||
g_object_unref (size_group);
|
||||
/* Set valid palette files filters */
|
||||
palette_import_file_set_filters (GTK_FILE_CHOOSER (private->file_chooser));
|
||||
|
||||
g_object_unref (size_group);
|
||||
|
||||
/* The "Import" frame */
|
||||
|
||||
@@ -893,3 +895,62 @@ palette_import_make_palette (ImportDialog *private)
|
||||
! (palette &&
|
||||
gimp_palette_get_n_colors (palette) > 0));
|
||||
}
|
||||
|
||||
static void
|
||||
palette_import_file_set_filters (GtkFileChooser *file_chooser)
|
||||
{
|
||||
GtkFileFilter *filter;
|
||||
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_set_name (filter, _("All palette files (*.*)"));
|
||||
gtk_file_filter_add_pattern (filter, "*");
|
||||
gtk_file_chooser_add_filter (file_chooser, filter);
|
||||
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_set_name (filter, _("GIMP Palette (*.gpl)"));
|
||||
gtk_file_filter_add_pattern (filter, "*.gpl");
|
||||
gtk_file_filter_add_pattern (filter, "*.GPL");
|
||||
gtk_file_chooser_add_filter (file_chooser, filter);
|
||||
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_set_name (filter, _("Adobe Color Table (*.act)"));
|
||||
gtk_file_filter_add_pattern (filter, "*.act");
|
||||
gtk_file_filter_add_pattern (filter, "*.ACT");
|
||||
gtk_file_chooser_add_filter (file_chooser, filter);
|
||||
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_set_name (filter, _("Adobe Color Swatch (*.aco)"));
|
||||
gtk_file_filter_add_pattern (filter, "*.aco");
|
||||
gtk_file_filter_add_pattern (filter, "*.ACO");
|
||||
gtk_file_chooser_add_filter (file_chooser, filter);
|
||||
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_set_name (filter, _("Adobe Color Book (*.acb)"));
|
||||
gtk_file_filter_add_pattern (filter, "*.acb");
|
||||
gtk_file_filter_add_pattern (filter, "*.ACB");
|
||||
gtk_file_chooser_add_filter (file_chooser, filter);
|
||||
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_set_name (filter, _("Adobe Swatch Exchange (*.ase)"));
|
||||
gtk_file_filter_add_pattern (filter, "*.ase");
|
||||
gtk_file_filter_add_pattern (filter, "*.ASE");
|
||||
gtk_file_chooser_add_filter (file_chooser, filter);
|
||||
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_set_name (filter, _("Cascading Style Sheet (*.css)"));
|
||||
gtk_file_filter_add_pattern (filter, "*.css");
|
||||
gtk_file_filter_add_pattern (filter, "*.CSS");
|
||||
gtk_file_chooser_add_filter (file_chooser, filter);
|
||||
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_set_name (filter, _("JASC or RIFF Palette (*.pal)"));
|
||||
gtk_file_filter_add_pattern (filter, "*.pal");
|
||||
gtk_file_filter_add_pattern (filter, "*.PAL");
|
||||
gtk_file_chooser_add_filter (file_chooser, filter);
|
||||
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_set_name (filter, _("SwatchBooker (*.sbz)"));
|
||||
gtk_file_filter_add_pattern (filter, "*.sbz");
|
||||
gtk_file_filter_add_pattern (filter, "*.SBZ");
|
||||
gtk_file_chooser_add_filter (file_chooser, filter);
|
||||
}
|
||||
|
@@ -2476,6 +2476,9 @@ prefs_dialog_new (Gimp *gimp,
|
||||
prefs_check_button_add (object, "layer-add-mask-invert",
|
||||
_("Invert mask"),
|
||||
GTK_BOX (vbox2));
|
||||
prefs_check_button_add (object, "layer-add-mask-edit-mask",
|
||||
_("Edit mask immediately"),
|
||||
GTK_BOX (vbox2));
|
||||
|
||||
/* Merge Layers Dialog */
|
||||
vbox2 = prefs_frame_new (_("Merge Layers Dialog"),
|
||||
|
@@ -539,16 +539,16 @@ welcome_dialog_create_welcome_page (Gimp *gimp,
|
||||
/* "globe with meridians" emoticone in UTF-8. */
|
||||
"\xf0\x9f\x8c\x90",
|
||||
_("GIMP website"), "https://www.gimp.org/");
|
||||
welcome_add_link (GTK_GRID (grid), 0, &row,
|
||||
/* "graduation cap" emoticone in UTF-8. */
|
||||
"\xf0\x9f\x8e\x93",
|
||||
_("Tutorials"),
|
||||
"https://www.gimp.org/tutorials/");
|
||||
welcome_add_link (GTK_GRID (grid), 0, &row,
|
||||
/* "open book" emoticone in UTF-8. */
|
||||
"\xf0\x9f\x93\x96",
|
||||
_("Documentation"),
|
||||
"https://docs.gimp.org/");
|
||||
welcome_add_link (GTK_GRID (grid), 0, &row,
|
||||
/* "graduation cap" emoticone in UTF-8. */
|
||||
"\xf0\x9f\x8e\x93",
|
||||
_("Community Tutorials"),
|
||||
"https://www.gimp.org/tutorials/");
|
||||
|
||||
/* XXX: should we add API docs for plug-in developers once it's
|
||||
* properly set up? */
|
||||
@@ -1125,10 +1125,19 @@ welcome_dialog_create_release_page (Gimp *gimp,
|
||||
|
||||
tmp = g_strdup_printf (GIMP_VERSION);
|
||||
if (GIMP_MINOR_VERSION % 2 == 0 && ! strstr (tmp, "RC"))
|
||||
release_link = g_strdup_printf ("https://www.gimp.org/release-notes/gimp-%d.%d.html",
|
||||
GIMP_MAJOR_VERSION, GIMP_MINOR_VERSION);
|
||||
{
|
||||
if (GIMP_MICRO_VERSION == 0 && ! strstr (tmp, "RC"))
|
||||
release_link = g_strdup_printf ("https://www.gimp.org/release-notes/gimp-%d.%d.html",
|
||||
GIMP_MAJOR_VERSION, GIMP_MINOR_VERSION);
|
||||
else
|
||||
release_link = g_strdup_printf ("https://www.gimp.org/release/%d.%d.%d/",
|
||||
GIMP_MAJOR_VERSION, GIMP_MINOR_VERSION,
|
||||
GIMP_MICRO_VERSION);
|
||||
}
|
||||
else
|
||||
release_link = g_strdup ("https://www.gimp.org/");
|
||||
{
|
||||
release_link = g_strdup ("https://www.gimp.org/");
|
||||
}
|
||||
g_free (tmp);
|
||||
|
||||
widget = gtk_link_button_new_with_label (release_link, _("Learn more"));
|
||||
@@ -1382,7 +1391,7 @@ welcome_dialog_release_item_activated (GtkListBox *listbox,
|
||||
{
|
||||
GList *windows = gimp_get_image_windows (gimp);
|
||||
|
||||
/* Losing forcus on the welcome dialog on purpose for the main GUI
|
||||
/* Losing focus on the welcome dialog on purpose for the main GUI
|
||||
* to be more readable.
|
||||
*/
|
||||
if (windows)
|
||||
|
@@ -378,7 +378,7 @@ gimp_canvas_layer_boundary_set_layers (GimpCanvasLayerBoundary *boundary,
|
||||
}
|
||||
|
||||
if (x1 != (gint) x ||
|
||||
x1 != (gint) y ||
|
||||
y1 != (gint) y ||
|
||||
(x2 - x1) != (gint) w ||
|
||||
(y2 - y1) != (gint) h ||
|
||||
edit_mask != private->edit_mask)
|
||||
|
@@ -246,7 +246,7 @@ gimp_display_shell_scale_get_image_size (GimpDisplayShell *shell,
|
||||
* @w:
|
||||
* @h:
|
||||
*
|
||||
* Gets the screen-space boudning box of the image, after it has
|
||||
* Gets the screen-space bounding box of the image, after it has
|
||||
* been transformed (i.e., scaled, rotated, and scrolled).
|
||||
**/
|
||||
void
|
||||
@@ -290,7 +290,7 @@ gimp_display_shell_scale_get_image_bounds (GimpDisplayShell *shell,
|
||||
* @w:
|
||||
* @h:
|
||||
*
|
||||
* Gets the screen-space boudning box of the image, after it has
|
||||
* Gets the screen-space bounding box of the image, after it has
|
||||
* been scaled and scrolled, but before it has been rotated.
|
||||
**/
|
||||
void
|
||||
@@ -320,7 +320,7 @@ gimp_display_shell_scale_get_image_unrotated_bounds (GimpDisplayShell *shell,
|
||||
* @w:
|
||||
* @h:
|
||||
*
|
||||
* Gets the screen-space boudning box of the image content, after it has
|
||||
* Gets the screen-space bounding box of the image content, after it has
|
||||
* been transformed (i.e., scaled, rotated, and scrolled).
|
||||
**/
|
||||
void
|
||||
@@ -375,7 +375,7 @@ gimp_display_shell_scale_get_image_bounding_box (GimpDisplayShell *shell,
|
||||
* @w:
|
||||
* @h:
|
||||
*
|
||||
* Gets the screen-space boudning box of the image content, after it has
|
||||
* Gets the screen-space bounding box of the image content, after it has
|
||||
* been scaled and scrolled, but before it has been rotated.
|
||||
**/
|
||||
void
|
||||
@@ -1289,9 +1289,9 @@ gimp_display_shell_scale_image_starts_to_fit (GimpDisplayShell *shell,
|
||||
&new_scale_width,
|
||||
&new_scale_height);
|
||||
|
||||
*vertically = (current_scale_width > shell->disp_width &&
|
||||
*horizontally = (current_scale_width > shell->disp_width &&
|
||||
new_scale_width <= shell->disp_width);
|
||||
*horizontally = (current_scale_height > shell->disp_height &&
|
||||
*vertically = (current_scale_height > shell->disp_height &&
|
||||
new_scale_height <= shell->disp_height);
|
||||
}
|
||||
|
||||
|
@@ -1052,7 +1052,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
|
||||
|
||||
if (gimp_display_shell_key_to_state (kevent->keyval) == GDK_MOD1_MASK)
|
||||
/* Make sure the picked layer is reset. */
|
||||
shell->picked_layer = NULL;
|
||||
g_clear_weak_pointer (&shell->picked_layer);
|
||||
|
||||
switch (kevent->keyval)
|
||||
{
|
||||
@@ -1151,7 +1151,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
|
||||
statusbar = gimp_display_shell_get_statusbar (shell);
|
||||
gimp_statusbar_pop_temp (statusbar);
|
||||
|
||||
shell->picked_layer = NULL;
|
||||
g_clear_weak_pointer (&shell->picked_layer);
|
||||
shell->mod_action = GIMP_MODIFIER_ACTION_NONE;
|
||||
}
|
||||
else if (shell->mod_action != GIMP_MODIFIER_ACTION_NONE &&
|
||||
@@ -1767,7 +1767,7 @@ gimp_display_shell_start_scrolling (GimpDisplayShell *shell,
|
||||
_("Layer picked: '%s'"),
|
||||
gimp_object_get_name (layer));
|
||||
}
|
||||
shell->picked_layer = layer;
|
||||
g_set_weak_pointer (&shell->picked_layer, layer);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@@ -920,6 +920,7 @@ gimp_display_shell_finalize (GObject *object)
|
||||
g_clear_object (&shell->no_image_options);
|
||||
g_clear_pointer (&shell->title, g_free);
|
||||
g_clear_pointer (&shell->status, g_free);
|
||||
g_clear_weak_pointer (&shell->picked_layer);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
@@ -464,12 +464,10 @@ gimp_image_window_constructed (GObject *object)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef GDK_WINDOWING_QUARTZ
|
||||
/* Docs says that macOS always returns FALSE but we actually want to create
|
||||
* our custom macOS menu.
|
||||
*/
|
||||
#ifdef GDK_WINDOWING_QUARTZ
|
||||
menus_quartz_app_menu (private->gimp);
|
||||
#else
|
||||
use_app_menu = gtk_application_prefers_app_menu (GTK_APPLICATION (private->gimp->app));
|
||||
#endif /* !GDK_WINDOWING_QUARTZ */
|
||||
|
||||
if (use_app_menu)
|
||||
{
|
||||
@@ -482,6 +480,7 @@ gimp_image_window_constructed (GObject *object)
|
||||
gtk_application_set_app_menu (GTK_APPLICATION (private->gimp->app),
|
||||
G_MENU_MODEL (app_menu_model));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Create the hbox that contains docks and images */
|
||||
private->hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
@@ -706,7 +705,7 @@ gimp_image_window_configure_event (GtkWidget *widget,
|
||||
if (GTK_WIDGET_CLASS (parent_class)->configure_event)
|
||||
GTK_WIDGET_CLASS (parent_class)->configure_event (widget, event);
|
||||
|
||||
/* If the window size has changed, make sure additoinal logic is run
|
||||
/* If the window size has changed, make sure additional logic is run
|
||||
* in the display shell's size-allocate
|
||||
*/
|
||||
if (event->width != current_width ||
|
||||
|
@@ -558,7 +558,7 @@ gimp_tool_polygon_fit_segment (GimpToolPolygon *polygon,
|
||||
|
||||
dest_end = &dest_points[n_points - 1];
|
||||
|
||||
/* Transate to origin */
|
||||
/* Translate to origin */
|
||||
gimp_vector2_sub (&origo_translation_offset,
|
||||
&vector2_zero,
|
||||
&dest_points[0]);
|
||||
|
@@ -122,6 +122,6 @@ libappdisplay = static_library('appdisplay',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Display"',
|
||||
dependencies: [
|
||||
gegl, gtk3, cairo,
|
||||
gegl, gtk3, cairo, gexiv2
|
||||
],
|
||||
)
|
||||
|
@@ -215,15 +215,19 @@ file_gih_pipe_to_image (Gimp *gimp,
|
||||
* described in the header" means) -- mitch
|
||||
*/
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gimp_pixpipe_params_init (¶ms);
|
||||
gimp_pixpipe_params_parse (pipe->params, ¶ms);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
params.cellwidth = gimp_image_get_width (image);
|
||||
params.cellheight = gimp_image_get_height (image);
|
||||
params.cols = 1;
|
||||
params.rows = 1;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
paramstring = gimp_pixpipe_params_build (¶ms);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
if (paramstring)
|
||||
{
|
||||
parasite = gimp_parasite_new ("gimp-brush-pipe-parameters",
|
||||
@@ -235,7 +239,9 @@ file_gih_pipe_to_image (Gimp *gimp,
|
||||
g_free (paramstring);
|
||||
}
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gimp_pixpipe_params_free (¶ms);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
}
|
||||
|
||||
return image;
|
||||
@@ -262,8 +268,10 @@ file_gih_image_to_pipe (GimpImage *image,
|
||||
"spacing", spacing,
|
||||
NULL);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gimp_pixpipe_params_init (¶ms);
|
||||
gimp_pixpipe_params_parse (paramstring, ¶ms);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
image_width = gimp_image_get_width (image);
|
||||
image_height = gimp_image_get_height (image);
|
||||
@@ -353,7 +361,9 @@ file_gih_image_to_pipe (GimpImage *image,
|
||||
|
||||
g_list_free (brushes);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gimp_pixpipe_params_free (¶ms);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
gimp_brush_pipe_set_params (pipe, paramstring);
|
||||
|
||||
|
@@ -16,6 +16,7 @@ libappfiledata = static_library('appfiledata',
|
||||
cairo,
|
||||
gdk_pixbuf,
|
||||
gegl,
|
||||
gexiv2,
|
||||
libarchive,
|
||||
],
|
||||
)
|
||||
|
@@ -139,7 +139,7 @@ file_open_image (Gimp *gimp,
|
||||
}
|
||||
}
|
||||
|
||||
if (! file_open_valid_permissions (file, error))
|
||||
if (g_file_is_native (file) && ! file_open_valid_permissions (file, error))
|
||||
return NULL;
|
||||
|
||||
if (! file_proc)
|
||||
@@ -248,7 +248,15 @@ file_open_image (Gimp *gimp,
|
||||
{
|
||||
if (image)
|
||||
{
|
||||
/* Only set the load procedure if it hasn't already been set. */
|
||||
/* Only set the load procedure if it hasn't already been set.
|
||||
* The reason is that we want to know the information of the
|
||||
* inner format, in case loading the file went through
|
||||
* intermediate container file formats procedures, typically
|
||||
* the procedures registered by the file-compressor plug-in.
|
||||
*
|
||||
* E.g. it could be used for our compressed XCF, but also for
|
||||
* commonly compressed formats such as .hgt.zip.
|
||||
*/
|
||||
if (! gimp_image_get_load_proc (image))
|
||||
gimp_image_set_load_proc (image, file_proc);
|
||||
|
||||
@@ -789,7 +797,7 @@ file_open_link_image (Gimp *gimp,
|
||||
GIMP_FILE_PROCEDURE_GROUP_OPEN,
|
||||
file, error);
|
||||
|
||||
if (! file_open_valid_permissions (file, error))
|
||||
if (g_file_is_native (file) && ! file_open_valid_permissions (file, error))
|
||||
return NULL;
|
||||
|
||||
if (g_file_is_native (file) && file_proc != NULL)
|
||||
@@ -815,7 +823,9 @@ file_open_link_image (Gimp *gimp,
|
||||
layer = gimp_link_layer_new (image, link);
|
||||
gimp_image_add_layer (image, layer, NULL, 0, FALSE);
|
||||
|
||||
gimp_image_set_load_proc (image, gimp_link_get_load_proc (link));
|
||||
if (! gimp_image_get_load_proc (image))
|
||||
gimp_image_set_load_proc (image, gimp_link_get_load_proc (link));
|
||||
|
||||
file_proc = gimp_image_get_load_proc (image);
|
||||
if (mime_type)
|
||||
*mime_type = g_slist_nth_data (file_proc->mime_types_list, 0);
|
||||
@@ -945,14 +955,11 @@ file_open_file_proc_is_import (GimpPlugInProcedure *file_proc)
|
||||
|
||||
proc_name = gimp_object_get_name (file_proc);
|
||||
|
||||
return (g_strcmp0 (proc_name, "gimp-xcf-load") != 0 &&
|
||||
/* Assuming that all file-compressor file are XCF.
|
||||
* So far, this is always true with current file-compressor
|
||||
* implementation.
|
||||
*/
|
||||
g_strcmp0 (proc_name, "file-gz-load") != 0 &&
|
||||
g_strcmp0 (proc_name, "file-bz2-load") != 0 &&
|
||||
g_strcmp0 (proc_name, "file-xz-load") != 0);
|
||||
/* Even when loading through an intermediate container format plug-in
|
||||
* (e.g. file-compressor), the stored procedure shall be the inner
|
||||
* format.
|
||||
*/
|
||||
return (g_strcmp0 (proc_name, "gimp-xcf-load") != 0);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@@ -11,6 +11,6 @@ libappfile = static_library('appfile',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-File"',
|
||||
dependencies: [
|
||||
gegl, gdk_pixbuf,
|
||||
gegl, gdk_pixbuf, gexiv2
|
||||
],
|
||||
)
|
||||
|
@@ -56,5 +56,6 @@ libappgegl = static_library('appgegl',
|
||||
cairo,
|
||||
gegl,
|
||||
gdk_pixbuf,
|
||||
gexiv2
|
||||
],
|
||||
)
|
||||
|
@@ -343,12 +343,9 @@ gimp_check_updates_process (const gchar *source,
|
||||
parser = json_parser_new ();
|
||||
if (! json_parser_load_from_data (parser, file_contents, file_length, &error))
|
||||
{
|
||||
gchar *uri = g_file_get_uri (G_FILE (source));
|
||||
|
||||
g_printerr ("%s: parsing of %s failed: %s\n", G_STRFUNC,
|
||||
uri, error->message);
|
||||
source, error->message);
|
||||
|
||||
g_free (uri);
|
||||
g_free (file_contents);
|
||||
g_clear_object (&parser);
|
||||
g_clear_error (&error);
|
||||
@@ -417,8 +414,30 @@ gimp_check_updates_callback (GObject *source,
|
||||
{
|
||||
gchar *uri = g_file_get_uri (G_FILE (source));
|
||||
|
||||
#ifndef GIMP_CONSOLE_COMPILATION
|
||||
if (error->domain == G_IO_ERROR &&
|
||||
error->code == G_IO_ERROR_NOT_SUPPORTED)
|
||||
{
|
||||
#ifndef G_OS_WIN32
|
||||
g_message ("%s: loading of %s failed: %s\n\n%s",
|
||||
G_STRFUNC, uri, error->message,
|
||||
_("Perhaps you are missing GIO backends and need "
|
||||
"to install GVFS?"));
|
||||
#else
|
||||
g_message ("%s: loading of %s failed: %s\n\n%s",
|
||||
G_STRFUNC, uri, error->message,
|
||||
_("Perhaps you are missing GIO backends."));
|
||||
#endif /* G_OS_WIN32 */
|
||||
}
|
||||
else
|
||||
{
|
||||
g_printerr ("%s: loading of %s failed: %s\n", G_STRFUNC,
|
||||
uri, error->message);
|
||||
}
|
||||
#else
|
||||
g_printerr ("%s: loading of %s failed: %s\n", G_STRFUNC,
|
||||
uri, error->message);
|
||||
#endif /* GIMP_CONSOLE_COMPILATION */
|
||||
|
||||
g_free (uri);
|
||||
g_clear_error (&error);
|
||||
|
@@ -41,6 +41,10 @@
|
||||
|
||||
#include "file/file-open.h"
|
||||
|
||||
#include "menus/menus.h"
|
||||
|
||||
#include "widgets/gimpuimanager.h"
|
||||
|
||||
#include "gimpdbusservice.h"
|
||||
#include "gui-unique.h"
|
||||
#include "themes.h"
|
||||
@@ -56,14 +60,19 @@ static HWND proxy_window = NULL;
|
||||
|
||||
#elif defined (GDK_WINDOWING_QUARTZ)
|
||||
|
||||
static void gui_unique_quartz_init (Gimp *gimp);
|
||||
static void gui_unique_quartz_exit (void);
|
||||
static void gui_unique_quartz_init (Gimp *gimp);
|
||||
static void gui_unique_quartz_exit (void);
|
||||
static gboolean gui_unique_quartz_trigger_quit (gpointer data);
|
||||
|
||||
@interface GimpAppleEventHandler : NSObject {}
|
||||
- (void) handleEvent:(NSAppleEventDescriptor *) inEvent
|
||||
andReplyWith:(NSAppleEventDescriptor *) replyEvent;
|
||||
@end
|
||||
|
||||
@interface GimpAppDelegate : NSObject <NSApplicationDelegate>
|
||||
@end
|
||||
|
||||
|
||||
static Gimp *unique_gimp = NULL;
|
||||
static GimpAppleEventHandler *event_handler = NULL;
|
||||
static void (^themeChangeHandler) (NSNotification *) = NULL;
|
||||
@@ -339,6 +348,15 @@ gui_unique_quartz_idle_open (GFile *file)
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation GimpAppDelegate
|
||||
- (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication *) sender
|
||||
{
|
||||
g_idle_add ((GSourceFunc) gui_unique_quartz_trigger_quit, unique_gimp);
|
||||
|
||||
return NSTerminateCancel;
|
||||
}
|
||||
@end
|
||||
|
||||
static void
|
||||
gui_unique_quartz_init (Gimp *gimp)
|
||||
{
|
||||
@@ -375,6 +393,13 @@ gui_unique_quartz_init (Gimp *gimp)
|
||||
andSelector: @selector (handleEvent: andReplyWith:)
|
||||
forEventClass: kCoreEventClass
|
||||
andEventID: kAEOpenDocuments];
|
||||
|
||||
/* When quitting the application using "Quit" from the dock's right-click menu,
|
||||
* GIMP does not follow our standard quit procedure. Instead, macOS forces the
|
||||
* application to close, which may result in losing unsaved changes.
|
||||
* This delegate intercepts the applicationShouldTerminate call and uses our
|
||||
* existing quit code, preventing macOS from handling the shutdown directly. */
|
||||
[NSApp setDelegate:[[GimpAppDelegate alloc] init]];
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -399,6 +424,17 @@ gui_unique_quartz_exit (void)
|
||||
event_handler = NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gui_unique_quartz_trigger_quit (gpointer data)
|
||||
{
|
||||
Gimp *gimp = (Gimp *)data;
|
||||
GimpUIManager *ui_manager = menus_get_image_manager_singleton (gimp);
|
||||
|
||||
gimp_ui_manager_activate_action (ui_manager, "file", "file-quit");
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static void
|
||||
|
@@ -220,7 +220,7 @@ icon_themes_current_prefer_symbolic (Gimp *gimp)
|
||||
* override the "prefer-symbolic-icons" property, not only to avoid
|
||||
* discrepancies, but even more to avoid weird cases where we end up using
|
||||
* icons from the system icon theme while the chosen theme has the right icon
|
||||
* (yet simply not in the prefered style). See Issue #9410.
|
||||
* (yet simply not in the preferred style). See Issue #9410.
|
||||
*/
|
||||
if (gtk_icon_theme_has_icon (icon_theme, GIMP_ICON_WILBER) &&
|
||||
! gtk_icon_theme_has_icon (icon_theme, GIMP_ICON_WILBER "-symbolic"))
|
||||
|
@@ -31,7 +31,7 @@ libappgui = static_library('appgui',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-GUI"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf, gio_specific, gtk3
|
||||
cairo, gegl, gdk_pixbuf, gexiv2, gio_specific, gtk3
|
||||
],
|
||||
install: false,
|
||||
)
|
||||
|
@@ -805,7 +805,7 @@ language_get_system_lang_id (void)
|
||||
#elif defined PLATFORM_OSX
|
||||
NSString *langs;
|
||||
|
||||
/* In macOS, the user sets a list of prefered languages and the
|
||||
/* In macOS, the user sets a list of preferred languages and the
|
||||
* software respects this preference order. I.e. that just storing the
|
||||
* top-prefered lang would not be enough. What if GIMP didn't have
|
||||
* translations for it, then it would fallback to the second lang. If
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -475,7 +475,7 @@ gimp_early_configuration (void)
|
||||
if (user_gimprc)
|
||||
user_gimprc_file = g_file_new_for_commandline_arg (user_gimprc);
|
||||
|
||||
/* GimpEarlyRc is reponsible for reading "gimprc" files for the
|
||||
/* GimpEarlyRc is responsible for reading "gimprc" files for the
|
||||
* sole purpose of getting some configuration data that is needed
|
||||
* in the early initialization phase
|
||||
*/
|
||||
@@ -761,10 +761,10 @@ main (int argc,
|
||||
|
||||
/* The GIMP option group is just an empty option group, created for
|
||||
* the sole purpose of running a post-parse hook before any other of
|
||||
* dependant libraries are run. This makes it possible to apply
|
||||
* dependent libraries are run. This makes it possible to apply
|
||||
* options from configuration data obtained from "gimprc" files,
|
||||
* before other libraries have a chance to run some of their
|
||||
* intialization code.
|
||||
* initialization code.
|
||||
*/
|
||||
gimp_group = g_option_group_new ("gimp", "", "", NULL, NULL);
|
||||
g_option_group_set_parse_hooks (gimp_group, NULL,
|
||||
|
@@ -20,6 +20,10 @@
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#ifdef PLATFORM_OSX
|
||||
#include <AppKit/AppKit.h>
|
||||
#endif
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
||||
#include "menus-types.h"
|
||||
@@ -52,7 +56,11 @@
|
||||
|
||||
/* private variables */
|
||||
|
||||
static gboolean menurc_deleted = FALSE;
|
||||
static gboolean menurc_deleted = FALSE;
|
||||
|
||||
#ifdef PLATFORM_OSX
|
||||
static Gimp *unique_gimp = NULL;
|
||||
#endif
|
||||
|
||||
|
||||
/* public functions */
|
||||
@@ -542,3 +550,115 @@ menus_get_image_manager_singleton (Gimp *gimp)
|
||||
|
||||
return image_ui_manager;
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_OSX
|
||||
@interface GimpappMenuHandler : NSObject
|
||||
@end
|
||||
|
||||
@implementation GimpappMenuHandler
|
||||
+ (void) gimpShowAbout:(id) sender
|
||||
{
|
||||
GimpUIManager *ui_manager = menus_get_image_manager_singleton (unique_gimp);
|
||||
|
||||
gimp_ui_manager_activate_action (ui_manager, "dialogs", "dialogs-about");
|
||||
}
|
||||
|
||||
+ (void) gimpShowWelcomeDialog:(id) sender
|
||||
{
|
||||
GimpUIManager *ui_manager = menus_get_image_manager_singleton (unique_gimp);
|
||||
|
||||
gimp_ui_manager_activate_action (ui_manager, "dialogs", "dialogs-welcome");
|
||||
}
|
||||
|
||||
+ (void) gimpShowPreferences:(id) sender
|
||||
{
|
||||
GimpUIManager *ui_manager = menus_get_image_manager_singleton (unique_gimp);
|
||||
|
||||
gimp_ui_manager_activate_action (ui_manager, "dialogs", "dialogs-preferences");
|
||||
}
|
||||
|
||||
+ (void) gimpShowInputDevices:(id) sender
|
||||
{
|
||||
GimpUIManager *ui_manager = menus_get_image_manager_singleton (unique_gimp);
|
||||
|
||||
gimp_ui_manager_activate_action (ui_manager, "dialogs", "dialogs-input-devices");
|
||||
}
|
||||
|
||||
+ (void) gimpShowKeyboardShortcuts:(id) sender
|
||||
{
|
||||
GimpUIManager *ui_manager = menus_get_image_manager_singleton (unique_gimp);
|
||||
|
||||
gimp_ui_manager_activate_action (ui_manager, "dialogs", "dialogs-keyboard-shortcuts");
|
||||
}
|
||||
|
||||
+ (void) gimpQuit:(id) sender
|
||||
{
|
||||
GimpUIManager *ui_manager = menus_get_image_manager_singleton (unique_gimp);
|
||||
|
||||
gimp_ui_manager_activate_action (ui_manager, "file", "file-quit");
|
||||
}
|
||||
@end
|
||||
|
||||
void
|
||||
menus_quartz_app_menu (Gimp *gimp)
|
||||
{
|
||||
NSMenu *main_menu;
|
||||
NSMenuItem *app_menu_item;
|
||||
NSMenu *app_menu;
|
||||
NSInteger last_index;
|
||||
NSMenuItem *item;
|
||||
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
|
||||
unique_gimp = gimp;
|
||||
|
||||
main_menu = [NSApp mainMenu];
|
||||
app_menu_item = [main_menu itemAtIndex:0];
|
||||
app_menu = [app_menu_item submenu];
|
||||
|
||||
/* On macOS, some standard menu items (e.g. "Hide", "Hide Others", "Show All", "Quit")
|
||||
* are automatically provided by the system rather than created by our application.
|
||||
* For the items we need to customize, we override their default behavior with our own
|
||||
* implementations. In addition, we extend the menu with extra entries specific to
|
||||
* our application’s functionality. */
|
||||
|
||||
[app_menu setTitle:@"GIMP"];
|
||||
|
||||
/* About */
|
||||
item = [app_menu itemAtIndex:0];
|
||||
[item setTarget:[GimpappMenuHandler class]];
|
||||
[item setAction:@selector (gimpShowAbout:)];
|
||||
|
||||
/* Welcome Dialog */
|
||||
item = [[NSMenuItem alloc] initWithTitle:@"Welcome Dialog"
|
||||
action:@selector (gimpShowWelcomeDialog:)
|
||||
keyEquivalent:@""];
|
||||
[item setTarget:[GimpappMenuHandler class]];
|
||||
[app_menu insertItem:item atIndex:1];
|
||||
|
||||
/* Settings */
|
||||
item = [app_menu itemAtIndex:3];
|
||||
[item setTarget:[GimpappMenuHandler class]];
|
||||
[item setAction:@selector (gimpShowPreferences:)];
|
||||
|
||||
/* Input Devices */
|
||||
item = [[NSMenuItem alloc] initWithTitle:@"Input Devices"
|
||||
action:@selector (gimpShowInputDevices:)
|
||||
keyEquivalent:@""];
|
||||
[item setTarget:[GimpappMenuHandler class]];
|
||||
[app_menu insertItem:item atIndex:4];
|
||||
|
||||
/* Keyboard Shortcuts */
|
||||
item = [[NSMenuItem alloc] initWithTitle:@"Keyboard Shortcuts"
|
||||
action:@selector (gimpShowKeyboardShortcuts:)
|
||||
keyEquivalent:@""];
|
||||
[item setTarget:[GimpappMenuHandler class]];
|
||||
[app_menu insertItem:item atIndex:5];
|
||||
|
||||
/* Quit */
|
||||
last_index = [app_menu numberOfItems] - 1;
|
||||
item = [app_menu itemAtIndex:last_index];
|
||||
[item setTarget:[GimpappMenuHandler class]];
|
||||
[item setAction:@selector (gimpQuit:)];
|
||||
}
|
||||
#endif
|
||||
|
@@ -31,3 +31,7 @@ void menus_remove (Gimp *gimp);
|
||||
|
||||
GimpMenuFactory * menus_get_global_menu_factory (Gimp *gimp);
|
||||
GimpUIManager * menus_get_image_manager_singleton (Gimp *gimp);
|
||||
|
||||
#ifdef PLATFORM_OSX
|
||||
void menus_quartz_app_menu (Gimp *gimp);
|
||||
#endif
|
||||
|
@@ -16,6 +16,6 @@ libappmenus = static_library('appmenus',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Menus"',
|
||||
dependencies: [
|
||||
gegl, gtk3
|
||||
gegl, gtk3, gexiv2
|
||||
],
|
||||
)
|
||||
|
@@ -25,6 +25,6 @@ libapplayermodeslegacy = static_library('applayermodeslegacy',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Layer-Modes-Legacy"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf,
|
||||
cairo, gegl, gdk_pixbuf, gexiv2
|
||||
],
|
||||
)
|
||||
|
@@ -50,5 +50,6 @@ libapplayermodes = static_library('applayermodes',
|
||||
cairo,
|
||||
gegl,
|
||||
gdk_pixbuf,
|
||||
gexiv2
|
||||
],
|
||||
)
|
||||
|
@@ -66,7 +66,7 @@ libappoperations = static_library('appoperations',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Operations"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf,
|
||||
cairo, gegl, gdk_pixbuf, gexiv2
|
||||
],
|
||||
)
|
||||
|
||||
|
@@ -63,6 +63,6 @@ libapppaint = static_library('apppaint',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Paint"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf, libmypaint,
|
||||
cairo, gegl, gdk_pixbuf, gexiv2, libmypaint,
|
||||
],
|
||||
)
|
||||
|
@@ -144,10 +144,9 @@ gimp_path_export (GimpImage *image,
|
||||
|
||||
g_string_append_printf (str,
|
||||
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n"
|
||||
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 20010904//EN\"\n"
|
||||
" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n"
|
||||
"\n"
|
||||
"<svg xmlns=\"http://www.w3.org/2000/svg\"\n");
|
||||
"<svg xmlns=\"http://www.w3.org/2000/svg\"\n"
|
||||
" xmlns:svg=\"http://www.w3.org/2000/svg\"\n"
|
||||
" version=\"1.1\"\n");
|
||||
|
||||
g_string_append (str, " ");
|
||||
gimp_path_export_image_size (image, str);
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,67 +1,69 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpvectorlayer.h
|
||||
*
|
||||
* Copyright 2006 Hendrik Boom
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_VECTOR_LAYER_H__
|
||||
#define __GIMP_VECTOR_LAYER_H__
|
||||
|
||||
|
||||
#include "core/gimplayer.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_VECTOR_LAYER (gimp_vector_layer_get_type ())
|
||||
#define GIMP_VECTOR_LAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_VECTOR_LAYER, GimpVectorLayer))
|
||||
#define GIMP_VECTOR_LAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_VECTOR_LAYER, GimpVectorLayerClass))
|
||||
#define GIMP_IS_VECTOR_LAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_VECTOR_LAYER))
|
||||
#define GIMP_IS_VECTOR_LAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_VECTOR_LAYER))
|
||||
#define GIMP_VECTOR_LAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_VECTOR_LAYER, GimpVectorLayerClass))
|
||||
|
||||
|
||||
typedef struct _GimpVectorLayerClass GimpVectorLayerClass;
|
||||
|
||||
struct _GimpVectorLayer
|
||||
{
|
||||
GimpLayer parent_instance;
|
||||
|
||||
GimpVectorLayerOptions *options;
|
||||
gboolean modified;
|
||||
};
|
||||
|
||||
struct _GimpVectorLayerClass
|
||||
{
|
||||
GimpLayerClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_vector_layer_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GimpVectorLayer * gimp_vector_layer_new (GimpImage *image,
|
||||
GimpPath *path,
|
||||
GimpContext *context);
|
||||
|
||||
GimpPath * gimp_vector_layer_get_path (GimpVectorLayer *layer);
|
||||
|
||||
void gimp_vector_layer_refresh (GimpVectorLayer *layer);
|
||||
void gimp_vector_layer_discard (GimpVectorLayer *layer);
|
||||
|
||||
gboolean gimp_item_is_vector_layer (GimpItem *item);
|
||||
|
||||
|
||||
#endif /* __GIMP_VECTOR_LAYER_H__ */
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpvectorlayer.h
|
||||
*
|
||||
* Copyright 2006 Hendrik Boom
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_VECTOR_LAYER_H__
|
||||
#define __GIMP_VECTOR_LAYER_H__
|
||||
|
||||
|
||||
#include "core/gimplayer.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_VECTOR_LAYER (gimp_vector_layer_get_type ())
|
||||
#define GIMP_VECTOR_LAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_VECTOR_LAYER, GimpVectorLayer))
|
||||
#define GIMP_VECTOR_LAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_VECTOR_LAYER, GimpVectorLayerClass))
|
||||
#define GIMP_IS_VECTOR_LAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_VECTOR_LAYER))
|
||||
#define GIMP_IS_VECTOR_LAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_VECTOR_LAYER))
|
||||
#define GIMP_VECTOR_LAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_VECTOR_LAYER, GimpVectorLayerClass))
|
||||
|
||||
|
||||
typedef struct _GimpVectorLayerClass GimpVectorLayerClass;
|
||||
|
||||
struct _GimpVectorLayer
|
||||
{
|
||||
GimpLayer parent_instance;
|
||||
|
||||
GimpVectorLayerOptions *options;
|
||||
gboolean modified;
|
||||
};
|
||||
|
||||
struct _GimpVectorLayerClass
|
||||
{
|
||||
GimpLayerClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_vector_layer_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GimpVectorLayer * gimp_vector_layer_new (GimpImage *image,
|
||||
GimpPath *path,
|
||||
GimpContext *context);
|
||||
|
||||
GimpPath * gimp_vector_layer_get_path (GimpVectorLayer *layer);
|
||||
|
||||
GimpVectorLayerOptions * gimp_vector_layer_get_options (GimpVectorLayer *layer);
|
||||
|
||||
void gimp_vector_layer_refresh (GimpVectorLayer *layer);
|
||||
void gimp_vector_layer_discard (GimpVectorLayer *layer);
|
||||
|
||||
gboolean gimp_item_is_vector_layer (GimpItem *item);
|
||||
|
||||
|
||||
#endif /* __GIMP_VECTOR_LAYER_H__ */
|
||||
|
@@ -22,6 +22,6 @@ libapppath = static_library('apppath',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Path"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf,
|
||||
cairo, gegl, gdk_pixbuf, gexiv2
|
||||
],
|
||||
)
|
||||
|
@@ -84,8 +84,17 @@ file_load_invoker (GimpProcedure *procedure,
|
||||
gimp_value_array_index (new_args, 1));
|
||||
|
||||
for (i = 2; i < proc->num_args; i++)
|
||||
if (G_IS_PARAM_SPEC_STRING (proc->args[i]))
|
||||
g_value_set_static_string (gimp_value_array_index (new_args, i), "");
|
||||
if (GIMP_IS_PARAM_SPEC_CHOICE (proc->args[i]))
|
||||
{
|
||||
GParamSpecString *string_spec = G_PARAM_SPEC_STRING (proc->args[i]);
|
||||
|
||||
g_value_set_static_string (gimp_value_array_index (new_args, i),
|
||||
string_spec->default_value);
|
||||
}
|
||||
else if (G_IS_PARAM_SPEC_STRING (proc->args[i]))
|
||||
{
|
||||
g_value_set_static_string (gimp_value_array_index (new_args, i), "");
|
||||
}
|
||||
|
||||
return_vals =
|
||||
gimp_pdb_execute_procedure_by_name_args (gimp->pdb,
|
||||
@@ -103,7 +112,16 @@ file_load_invoker (GimpProcedure *procedure,
|
||||
{
|
||||
GimpImage *image =
|
||||
g_value_get_object (gimp_value_array_index (return_vals, 1));
|
||||
gimp_image_set_load_proc (image, file_proc);
|
||||
|
||||
if (! gimp_image_get_load_proc (image))
|
||||
/* Leave the initial load procedure if it already exists as
|
||||
* it will give information about the source format. See
|
||||
* similar code in file_open_image().
|
||||
*/
|
||||
gimp_image_set_load_proc (image, file_proc);
|
||||
|
||||
if (! gimp_image_get_file (image))
|
||||
gimp_image_set_imported_file (image, file);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -223,7 +223,7 @@ temp_file_invoker (GimpProcedure *procedure,
|
||||
error ? *error : NULL);
|
||||
|
||||
if (success)
|
||||
g_value_set_object (gimp_value_array_index (return_vals, 1), file);
|
||||
g_value_take_object (gimp_value_array_index (return_vals, 1), file);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
|
@@ -2318,13 +2318,15 @@ image_get_file_invoker (GimpProcedure *procedure,
|
||||
if (success)
|
||||
{
|
||||
file = gimp_image_get_any_file (image);
|
||||
if (file)
|
||||
g_object_ref (file);
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
|
||||
if (success)
|
||||
g_value_set_object (gimp_value_array_index (return_vals, 1), file);
|
||||
g_value_take_object (gimp_value_array_index (return_vals, 1), file);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
@@ -2396,13 +2398,15 @@ image_get_xcf_file_invoker (GimpProcedure *procedure,
|
||||
if (success)
|
||||
{
|
||||
file = gimp_image_get_file (image);
|
||||
if (file)
|
||||
g_object_ref (file);
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
|
||||
if (success)
|
||||
g_value_set_object (gimp_value_array_index (return_vals, 1), file);
|
||||
g_value_take_object (gimp_value_array_index (return_vals, 1), file);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
@@ -2425,13 +2429,15 @@ image_get_imported_file_invoker (GimpProcedure *procedure,
|
||||
if (success)
|
||||
{
|
||||
file = gimp_image_get_imported_file (image);
|
||||
if (file)
|
||||
g_object_ref (file);
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
|
||||
if (success)
|
||||
g_value_set_object (gimp_value_array_index (return_vals, 1), file);
|
||||
g_value_take_object (gimp_value_array_index (return_vals, 1), file);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
@@ -2454,13 +2460,15 @@ image_get_exported_file_invoker (GimpProcedure *procedure,
|
||||
if (success)
|
||||
{
|
||||
file = gimp_image_get_exported_file (image);
|
||||
if (file)
|
||||
g_object_ref (file);
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
|
||||
if (success)
|
||||
g_value_set_object (gimp_value_array_index (return_vals, 1), file);
|
||||
g_value_take_object (gimp_value_array_index (return_vals, 1), file);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
|
@@ -30,26 +30,26 @@
|
||||
#include "internal-procs.h"
|
||||
|
||||
|
||||
/* 729 procedures registered total */
|
||||
/* 759 procedures registered total */
|
||||
|
||||
void
|
||||
internal_procs_init (GimpPDB *pdb)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_PDB (pdb));
|
||||
|
||||
register_brush_procs (pdb);
|
||||
register_brush_select_procs (pdb);
|
||||
register_brush_procs (pdb);
|
||||
register_brushes_procs (pdb);
|
||||
register_buffer_procs (pdb);
|
||||
register_channel_procs (pdb);
|
||||
register_context_procs (pdb);
|
||||
register_debug_procs (pdb);
|
||||
register_display_procs (pdb);
|
||||
register_drawable_procs (pdb);
|
||||
register_drawable_color_procs (pdb);
|
||||
register_drawable_edit_procs (pdb);
|
||||
register_drawable_filter_procs (pdb);
|
||||
register_drawable_select_procs (pdb);
|
||||
register_drawable_procs (pdb);
|
||||
register_dynamics_procs (pdb);
|
||||
register_edit_procs (pdb);
|
||||
register_file_procs (pdb);
|
||||
@@ -59,12 +59,11 @@ internal_procs_init (GimpPDB *pdb)
|
||||
register_fonts_procs (pdb);
|
||||
register_gimp_procs (pdb);
|
||||
register_gimprc_procs (pdb);
|
||||
register_gradient_procs (pdb);
|
||||
register_gradient_select_procs (pdb);
|
||||
register_gradient_procs (pdb);
|
||||
register_gradients_procs (pdb);
|
||||
register_group_layer_procs (pdb);
|
||||
register_help_procs (pdb);
|
||||
register_image_procs (pdb);
|
||||
register_image_autocrop_procs (pdb);
|
||||
register_image_color_profile_procs (pdb);
|
||||
register_image_convert_procs (pdb);
|
||||
@@ -74,17 +73,19 @@ internal_procs_init (GimpPDB *pdb)
|
||||
register_image_select_procs (pdb);
|
||||
register_image_transform_procs (pdb);
|
||||
register_image_undo_procs (pdb);
|
||||
register_item_procs (pdb);
|
||||
register_image_procs (pdb);
|
||||
register_item_transform_procs (pdb);
|
||||
register_item_procs (pdb);
|
||||
register_layer_procs (pdb);
|
||||
register_link_layer_procs (pdb);
|
||||
register_message_procs (pdb);
|
||||
register_paint_tools_procs (pdb);
|
||||
register_palette_procs (pdb);
|
||||
register_palette_select_procs (pdb);
|
||||
register_palette_procs (pdb);
|
||||
register_palettes_procs (pdb);
|
||||
register_path_procs (pdb);
|
||||
register_pattern_procs (pdb);
|
||||
register_pattern_select_procs (pdb);
|
||||
register_pattern_procs (pdb);
|
||||
register_patterns_procs (pdb);
|
||||
register_pdb_procs (pdb);
|
||||
register_plug_in_procs (pdb);
|
||||
|
@@ -24,19 +24,19 @@ void internal_procs_init (GimpPDB *pdb);
|
||||
|
||||
/* Forward declarations for registering PDB procs */
|
||||
|
||||
void register_brush_procs (GimpPDB *pdb);
|
||||
void register_brush_select_procs (GimpPDB *pdb);
|
||||
void register_brush_procs (GimpPDB *pdb);
|
||||
void register_brushes_procs (GimpPDB *pdb);
|
||||
void register_buffer_procs (GimpPDB *pdb);
|
||||
void register_channel_procs (GimpPDB *pdb);
|
||||
void register_context_procs (GimpPDB *pdb);
|
||||
void register_debug_procs (GimpPDB *pdb);
|
||||
void register_display_procs (GimpPDB *pdb);
|
||||
void register_drawable_procs (GimpPDB *pdb);
|
||||
void register_drawable_color_procs (GimpPDB *pdb);
|
||||
void register_drawable_edit_procs (GimpPDB *pdb);
|
||||
void register_drawable_filter_procs (GimpPDB *pdb);
|
||||
void register_drawable_select_procs (GimpPDB *pdb);
|
||||
void register_drawable_procs (GimpPDB *pdb);
|
||||
void register_dynamics_procs (GimpPDB *pdb);
|
||||
void register_edit_procs (GimpPDB *pdb);
|
||||
void register_file_procs (GimpPDB *pdb);
|
||||
@@ -46,12 +46,11 @@ void register_font_select_procs (GimpPDB *pdb);
|
||||
void register_fonts_procs (GimpPDB *pdb);
|
||||
void register_gimp_procs (GimpPDB *pdb);
|
||||
void register_gimprc_procs (GimpPDB *pdb);
|
||||
void register_gradient_procs (GimpPDB *pdb);
|
||||
void register_gradient_select_procs (GimpPDB *pdb);
|
||||
void register_gradient_procs (GimpPDB *pdb);
|
||||
void register_gradients_procs (GimpPDB *pdb);
|
||||
void register_group_layer_procs (GimpPDB *pdb);
|
||||
void register_help_procs (GimpPDB *pdb);
|
||||
void register_image_procs (GimpPDB *pdb);
|
||||
void register_image_autocrop_procs (GimpPDB *pdb);
|
||||
void register_image_color_profile_procs (GimpPDB *pdb);
|
||||
void register_image_convert_procs (GimpPDB *pdb);
|
||||
@@ -61,17 +60,19 @@ void register_image_sample_points_procs (GimpPDB *pdb);
|
||||
void register_image_select_procs (GimpPDB *pdb);
|
||||
void register_image_transform_procs (GimpPDB *pdb);
|
||||
void register_image_undo_procs (GimpPDB *pdb);
|
||||
void register_item_procs (GimpPDB *pdb);
|
||||
void register_image_procs (GimpPDB *pdb);
|
||||
void register_item_transform_procs (GimpPDB *pdb);
|
||||
void register_item_procs (GimpPDB *pdb);
|
||||
void register_layer_procs (GimpPDB *pdb);
|
||||
void register_link_layer_procs (GimpPDB *pdb);
|
||||
void register_message_procs (GimpPDB *pdb);
|
||||
void register_paint_tools_procs (GimpPDB *pdb);
|
||||
void register_palette_procs (GimpPDB *pdb);
|
||||
void register_palette_select_procs (GimpPDB *pdb);
|
||||
void register_palette_procs (GimpPDB *pdb);
|
||||
void register_palettes_procs (GimpPDB *pdb);
|
||||
void register_path_procs (GimpPDB *pdb);
|
||||
void register_pattern_procs (GimpPDB *pdb);
|
||||
void register_pattern_select_procs (GimpPDB *pdb);
|
||||
void register_pattern_procs (GimpPDB *pdb);
|
||||
void register_patterns_procs (GimpPDB *pdb);
|
||||
void register_pdb_procs (GimpPDB *pdb);
|
||||
void register_plug_in_procs (GimpPDB *pdb);
|
||||
|
@@ -35,6 +35,7 @@
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpitem.h"
|
||||
#include "core/gimplayermask.h"
|
||||
#include "core/gimplinklayer.h"
|
||||
#include "core/gimplist.h"
|
||||
#include "core/gimpparamspecs.h"
|
||||
#include "core/gimpselection.h"
|
||||
@@ -244,6 +245,39 @@ item_id_is_group_layer_invoker (GimpProcedure *procedure,
|
||||
return return_vals;
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
item_id_is_link_layer_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
gint item_id;
|
||||
gboolean text_layer = FALSE;
|
||||
|
||||
item_id = g_value_get_int (gimp_value_array_index (args, 0));
|
||||
|
||||
if (success)
|
||||
{
|
||||
GimpItem *item = gimp_item_get_by_id (gimp, item_id);
|
||||
|
||||
text_layer = (GIMP_IS_LAYER (item) &&
|
||||
! gimp_item_is_removed (item) &&
|
||||
gimp_item_is_link_layer (item));
|
||||
}
|
||||
|
||||
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), text_layer);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
item_id_is_channel_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
@@ -1287,6 +1321,37 @@ register_item_procs (GimpPDB *pdb)
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-item-id-is-link-layer
|
||||
*/
|
||||
procedure = gimp_procedure_new (item_id_is_link_layer_invoker, FALSE);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-item-id-is-link-layer");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Returns whether the item ID is a link layer.",
|
||||
"This procedure returns %TRUE if the specified item ID is a link layer.\n"
|
||||
"\n"
|
||||
"*Note*: in most use cases, you should not use this function. See [func@Gimp.Item.id_is_layer] for a discussion on alternatives.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Jehan",
|
||||
"Jehan",
|
||||
"2025");
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_int ("item-id",
|
||||
"item id",
|
||||
"The item ID",
|
||||
G_MININT32, G_MAXINT32, 0,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
g_param_spec_boolean ("text-layer",
|
||||
"text layer",
|
||||
"TRUE if the item is a text layer, FALSE otherwise.",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-item-id-is-channel
|
||||
*/
|
||||
|
@@ -622,7 +622,7 @@ layer_add_mask_invoker (GimpProcedure *procedure,
|
||||
if (gimp_pdb_item_is_floating (GIMP_ITEM (mask),
|
||||
gimp_item_get_image (GIMP_ITEM (layer)),
|
||||
error))
|
||||
success = (gimp_layer_add_mask (layer, mask, TRUE, error) == mask);
|
||||
success = (gimp_layer_add_mask (layer, mask, TRUE, TRUE, error) == mask);
|
||||
else
|
||||
success = FALSE;
|
||||
}
|
||||
|
427
app/pdb/link-layer-cmds.c
Normal file
427
app/pdb/link-layer-cmds.c
Normal file
@@ -0,0 +1,427 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995-2003 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* NOTE: This file is auto-generated by pdbgen.pl. */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "stamp-pdbgen.h"
|
||||
|
||||
#include <gegl.h>
|
||||
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
||||
#include "pdb-types.h"
|
||||
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimplink.h"
|
||||
#include "core/gimplinklayer.h"
|
||||
#include "core/gimpparamspecs.h"
|
||||
|
||||
#include "gimppdb.h"
|
||||
#include "gimppdberror.h"
|
||||
#include "gimpprocedure.h"
|
||||
#include "internal-procs.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static GimpValueArray *
|
||||
link_layer_new_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
GimpImage *image;
|
||||
GFile *file;
|
||||
GimpLinkLayer *layer = NULL;
|
||||
|
||||
image = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
file = g_value_get_object (gimp_value_array_index (args, 1));
|
||||
|
||||
if (success)
|
||||
{
|
||||
if (file == NULL)
|
||||
{
|
||||
g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT,
|
||||
_("Failed to create link layer"));
|
||||
|
||||
success = FALSE;
|
||||
}
|
||||
|
||||
if (success)
|
||||
{
|
||||
GimpLink *link;
|
||||
|
||||
link = gimp_link_new (gimp, file, 0, 0, TRUE, NULL, error);
|
||||
|
||||
if (link == NULL)
|
||||
{
|
||||
success = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
layer = GIMP_LINK_LAYER (gimp_link_layer_new (image, link));
|
||||
|
||||
if (! layer)
|
||||
{
|
||||
g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT,
|
||||
_("Failed to create link layer"));
|
||||
|
||||
success = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
g_clear_object (&link);
|
||||
}
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
|
||||
if (success)
|
||||
g_value_set_object (gimp_value_array_index (return_vals, 1), layer);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
link_layer_discard_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLinkLayer *layer;
|
||||
|
||||
layer = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
|
||||
if (success)
|
||||
{
|
||||
gimp_link_layer_discard (layer);
|
||||
}
|
||||
|
||||
return gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
link_layer_monitor_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLinkLayer *layer;
|
||||
|
||||
layer = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
|
||||
if (success)
|
||||
{
|
||||
gimp_link_layer_monitor (layer);
|
||||
}
|
||||
|
||||
return gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
link_layer_get_file_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
GimpLinkLayer *layer;
|
||||
GFile *file = NULL;
|
||||
|
||||
layer = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
|
||||
if (success)
|
||||
{
|
||||
file = g_object_ref (gimp_link_get_file (gimp_link_layer_get_link (layer), NULL, NULL));
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
|
||||
if (success)
|
||||
g_value_take_object (gimp_value_array_index (return_vals, 1), file);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
link_layer_set_file_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLinkLayer *layer;
|
||||
GFile *file;
|
||||
|
||||
layer = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
file = g_value_get_object (gimp_value_array_index (args, 1));
|
||||
|
||||
if (success)
|
||||
{
|
||||
GimpLink *link = gimp_link_new (gimp, file, 0, 0, TRUE, NULL, error);
|
||||
|
||||
if (link)
|
||||
{
|
||||
gimp_link_layer_set_link (layer, link, TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
success = FALSE;
|
||||
}
|
||||
|
||||
g_clear_object (&link);
|
||||
}
|
||||
|
||||
return gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
link_layer_get_mime_type_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
GimpLinkLayer *layer;
|
||||
gchar *mimetype = NULL;
|
||||
|
||||
layer = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
|
||||
if (success)
|
||||
{
|
||||
mimetype = g_strdup (gimp_link_get_mime_type (gimp_link_layer_get_link (layer)));
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
|
||||
if (success)
|
||||
g_value_take_string (gimp_value_array_index (return_vals, 1), mimetype);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
|
||||
void
|
||||
register_link_layer_procs (GimpPDB *pdb)
|
||||
{
|
||||
GimpProcedure *procedure;
|
||||
|
||||
/*
|
||||
* gimp-link-layer-new
|
||||
*/
|
||||
procedure = gimp_procedure_new (link_layer_new_invoker, FALSE);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-link-layer-new");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Creates a new link layer.",
|
||||
"This procedure creates a link layer monitoring the specified @file.\n"
|
||||
"\n"
|
||||
"The new layer still needs to be added to the image as this is not automatic. Add the new layer with the [method@Image.insert_layer] method.\n"
|
||||
"\n"
|
||||
"The arguments are kept as simple as necessary for the basic case. All link attributes, however, can be modified with the appropriate `gimp_link_layer_set_*()` procedures.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Jehan",
|
||||
"Jehan",
|
||||
"2025");
|
||||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_image ("image",
|
||||
"image",
|
||||
"The image",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_object ("file",
|
||||
"file",
|
||||
"The file this link layer will monitor",
|
||||
G_TYPE_FILE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_link_layer ("layer",
|
||||
"layer",
|
||||
"The new link layer. The object belongs to libgimp and you should not free it.",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-link-layer-discard
|
||||
*/
|
||||
procedure = gimp_procedure_new (link_layer_discard_invoker, FALSE);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-link-layer-discard");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Discard the link layer information.",
|
||||
"Discards the link information. This makes the layer behave like a normal layer.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Jehan",
|
||||
"Jehan",
|
||||
"2025");
|
||||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_link_layer ("layer",
|
||||
"layer",
|
||||
"The link layer",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-link-layer-monitor
|
||||
*/
|
||||
procedure = gimp_procedure_new (link_layer_monitor_invoker, FALSE);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-link-layer-monitor");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Retrieve the link layer information.",
|
||||
"Retrieve the link information. This makes the layer behave like a link layer after the link information has been discarded.\n"
|
||||
"Since the source file will be monitored again, it may change the layer's render.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Jehan",
|
||||
"Jehan",
|
||||
"2025");
|
||||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_link_layer ("layer",
|
||||
"layer",
|
||||
"The link layer",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-link-layer-get-file
|
||||
*/
|
||||
procedure = gimp_procedure_new (link_layer_get_file_invoker, FALSE);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-link-layer-get-file");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Get the monitored file.",
|
||||
"This procedure returns the file which is being monitored.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Jehan",
|
||||
"Jehan",
|
||||
"2025");
|
||||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_link_layer ("layer",
|
||||
"layer",
|
||||
"The link layer",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
g_param_spec_object ("file",
|
||||
"file",
|
||||
"The monitored file",
|
||||
G_TYPE_FILE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-link-layer-set-file
|
||||
*/
|
||||
procedure = gimp_procedure_new (link_layer_set_file_invoker, FALSE);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-link-layer-set-file");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Set the monitored file.",
|
||||
"This procedure sets the file to be monitored. It may change the layer's render.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Jehan",
|
||||
"Jehan",
|
||||
"2025");
|
||||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_link_layer ("layer",
|
||||
"layer",
|
||||
"The link layer",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_object ("file",
|
||||
"file",
|
||||
"The file to monitor",
|
||||
G_TYPE_FILE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-link-layer-get-mime-type
|
||||
*/
|
||||
procedure = gimp_procedure_new (link_layer_get_mime_type_invoker, FALSE);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-link-layer-get-mime-type");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Get the mime type of the monitored file.",
|
||||
"This procedure returns the mime type of the file which is being monitored by @layer.\n"
|
||||
"\n"
|
||||
"Note that this will be the real mime type, corresponding to our format support, as returned by the [class@Gimp.LoadProcedure] which actually performs the external image file import.\n"
|
||||
"\n"
|
||||
"This function may also return %NULL in case of error (for instance if the external file doesn't exist anymore).",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Jehan",
|
||||
"Jehan",
|
||||
"2025");
|
||||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_link_layer ("layer",
|
||||
"layer",
|
||||
"The link layer",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_string ("mimetype",
|
||||
"mimetype",
|
||||
"The mime type of the monitored file",
|
||||
FALSE, FALSE, FALSE,
|
||||
NULL,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
}
|
@@ -49,6 +49,7 @@ libappinternalprocs_sources = [
|
||||
'item-cmds.c',
|
||||
'item-transform-cmds.c',
|
||||
'layer-cmds.c',
|
||||
'link-layer-cmds.c',
|
||||
'message-cmds.c',
|
||||
'paint-tools-cmds.c',
|
||||
'palette-cmds.c',
|
||||
@@ -74,7 +75,7 @@ libapppdb = static_library('apppdb',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-PDB"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf,
|
||||
cairo, gegl, gdk_pixbuf, gexiv2
|
||||
],
|
||||
)
|
||||
|
||||
@@ -84,7 +85,7 @@ libappinternalprocs = static_library('appinternalprocs',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-PDB"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf, pangocairo, pango,
|
||||
cairo, gegl, gdk_pixbuf, gexiv2, pangocairo, pango,
|
||||
],
|
||||
sources: [
|
||||
pdbgen
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -40,6 +40,7 @@
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimplayer.h"
|
||||
#include "core/gimplayermask.h"
|
||||
#include "core/gimplinklayer.h"
|
||||
#include "core/gimppalette.h"
|
||||
#include "core/gimppattern.h"
|
||||
#include "core/gimpselection.h"
|
||||
|
@@ -56,6 +56,6 @@ libappplugin = static_library('appplug-in',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Plug-In"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf,
|
||||
cairo, gegl, gdk_pixbuf, gexiv2,
|
||||
],
|
||||
)
|
||||
|
@@ -28,6 +28,6 @@ libapppropgui = static_library('apppropgui',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-PropGUI"',
|
||||
dependencies: [
|
||||
gegl, gtk3,
|
||||
gegl, gtk3, gexiv2
|
||||
],
|
||||
)
|
||||
|
@@ -464,7 +464,7 @@ sanity_check_babl (void)
|
||||
|
||||
#define BABL_REQUIRED_MAJOR 0
|
||||
#define BABL_REQUIRED_MINOR 1
|
||||
#define BABL_REQUIRED_MICRO 114
|
||||
#define BABL_REQUIRED_MICRO 116
|
||||
|
||||
babl_get_version (&babl_major_version,
|
||||
&babl_minor_version,
|
||||
@@ -502,7 +502,7 @@ sanity_check_gegl (void)
|
||||
|
||||
#define GEGL_REQUIRED_MAJOR 0
|
||||
#define GEGL_REQUIRED_MINOR 4
|
||||
#define GEGL_REQUIRED_MICRO 62
|
||||
#define GEGL_REQUIRED_MICRO 64
|
||||
|
||||
gegl_get_version (&gegl_major_version,
|
||||
&gegl_minor_version,
|
||||
|
@@ -53,7 +53,9 @@ void
|
||||
gimp_init_signal_handlers (gchar **backtrace_file)
|
||||
{
|
||||
time_t t;
|
||||
#ifdef G_OS_WIN32
|
||||
#if defined(G_OS_WIN32) && defined(ENABLE_RELOCATABLE_RESOURCES)
|
||||
gchar *bin_dir;
|
||||
size_t codeview_path_len;
|
||||
gchar *codeview_path;
|
||||
#endif
|
||||
gchar *filename;
|
||||
@@ -63,11 +65,23 @@ gimp_init_signal_handlers (gchar **backtrace_file)
|
||||
#endif
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#ifdef ENABLE_RELOCATABLE_RESOURCES
|
||||
/* FIXME: https://github.com/jrfonseca/drmingw/issues/91 */
|
||||
codeview_path = g_build_filename (gimp_installation_directory (),
|
||||
"bin", NULL);
|
||||
bin_dir = g_build_filename (gimp_installation_directory (), "bin", NULL);
|
||||
codeview_path_len = strlen (g_getenv ("_NT_SYMBOL_PATH") ? g_getenv ("_NT_SYMBOL_PATH") : "") + strlen (bin_dir) + 2;
|
||||
codeview_path = g_try_malloc (codeview_path_len);
|
||||
if (codeview_path == NULL)
|
||||
{
|
||||
g_warning ("Failed to allocate memory");
|
||||
}
|
||||
if (g_getenv ("_NT_SYMBOL_PATH"))
|
||||
g_snprintf (codeview_path, codeview_path_len, "%s;%s", bin_dir, g_getenv ("_NT_SYMBOL_PATH"));
|
||||
else
|
||||
g_snprintf (codeview_path, codeview_path_len, "%s", bin_dir);
|
||||
g_setenv ("_NT_SYMBOL_PATH", codeview_path, TRUE);
|
||||
g_free (codeview_path);
|
||||
g_free (bin_dir);
|
||||
#endif
|
||||
|
||||
/* This has to be the non-roaming directory (i.e., the local
|
||||
directory) as backtraces correspond to the binaries on this
|
||||
|
@@ -398,7 +398,7 @@ crop_tool_can_crop (GimpTestFixture *fixture,
|
||||
gint cropped_w = 20;
|
||||
gint cropped_h = 30;
|
||||
|
||||
/* Fit display and pause and let it stabalize (two idlings seems to
|
||||
/* Fit display and pause and let it stabilize (two idlings seems to
|
||||
* always be enough)
|
||||
*/
|
||||
gimp_ui_manager_activate_action (gimp_test_utils_get_ui_manager (gimp),
|
||||
|
@@ -430,8 +430,9 @@ gimp_create_mainimage (Gimp *gimp,
|
||||
NULL /*channel*/);
|
||||
gimp_layer_add_mask (layer,
|
||||
layer_mask,
|
||||
FALSE /*push_undo*/,
|
||||
NULL /*error*/);
|
||||
TRUE /* edit_mask */,
|
||||
FALSE /* push_undo */,
|
||||
NULL /* error */);
|
||||
|
||||
/* Image compression type
|
||||
*
|
||||
|
@@ -1190,10 +1190,7 @@ gimp_font_get_sample_string (PangoContext *context,
|
||||
*/
|
||||
hb_font = hb_font_create_sub_font (hb_font);
|
||||
hb_ft_font_set_funcs (hb_font);
|
||||
/* TODO: use hb_ft_font_lock_face/hb_ft_font_unlock_face() when we
|
||||
* bump to harfbuzz >= 2.6.5.
|
||||
*/
|
||||
face = hb_ft_font_get_face (hb_font);
|
||||
face = hb_ft_font_lock_face (hb_font);
|
||||
|
||||
/* Are there actual cases where this function could return NULL while
|
||||
* it's not a bug in the code?
|
||||
@@ -1281,6 +1278,7 @@ gimp_font_get_sample_string (PangoContext *context,
|
||||
}
|
||||
}
|
||||
|
||||
hb_ft_font_unlock_face (hb_font);
|
||||
hb_font_destroy (hb_font);
|
||||
g_object_unref (font);
|
||||
|
||||
|
@@ -42,6 +42,6 @@ libapptext = static_library('apptext',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Text"',
|
||||
dependencies: [
|
||||
gegl, gdk_pixbuf, harfbuzz, pangocairo, pangoft2,
|
||||
gegl, gdk_pixbuf, gexiv2, harfbuzz, pangocairo, pangoft2,
|
||||
],
|
||||
)
|
||||
|
@@ -374,17 +374,19 @@ gimp_align_options_gui (GimpToolOptions *tool_options)
|
||||
GObject *config = G_OBJECT (tool_options);
|
||||
GimpAlignOptions *options = GIMP_ALIGN_OPTIONS (tool_options);
|
||||
GtkWidget *vbox = gimp_tool_options_gui (tool_options);
|
||||
GtkWidget *vbox2;
|
||||
GtkWidget *widget;
|
||||
GtkWidget *section_vbox;
|
||||
GtkWidget *items_grid;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *align_hbox;
|
||||
GtkWidget *frame;
|
||||
GtkWidget *combo;
|
||||
gchar *text;
|
||||
gint n = 0;
|
||||
|
||||
/* Selected objects */
|
||||
frame = gimp_frame_new (_("Targets"));
|
||||
frame = gimp_frame_new (_("Align"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
@@ -396,25 +398,14 @@ gimp_align_options_gui (GimpToolOptions *tool_options)
|
||||
gtk_container_add (GTK_CONTAINER (section_vbox), items_grid);
|
||||
gtk_widget_show (items_grid);
|
||||
|
||||
widget = gimp_prop_check_button_new (config, "align-contents", NULL);
|
||||
widget = gimp_prop_expanding_frame_new (config, "align-layers",
|
||||
NULL, widget, NULL);
|
||||
widget = gimp_prop_check_button_new (config, "align-layers", NULL);
|
||||
gtk_grid_attach (GTK_GRID (items_grid), widget, 0, 0, 1, 1);
|
||||
|
||||
widget = gimp_prop_check_button_new (config, "align-paths", NULL);
|
||||
gtk_grid_attach (GTK_GRID (items_grid), widget, 0, 1, 1, 1);
|
||||
|
||||
options->priv->pivot_selector = gimp_pivot_selector_new (0.0, 0.0, 1.0, 1.0);
|
||||
gtk_widget_set_tooltip_text (options->priv->pivot_selector,
|
||||
_("Set anchor point of targets"));
|
||||
gimp_pivot_selector_set_position (GIMP_PIVOT_SELECTOR (options->priv->pivot_selector),
|
||||
options->priv->pivot_x, options->priv->pivot_y);
|
||||
gtk_grid_attach (GTK_GRID (items_grid), options->priv->pivot_selector, 1, 0, 1, 2);
|
||||
gtk_widget_show (options->priv->pivot_selector);
|
||||
|
||||
g_signal_connect (options->priv->pivot_selector, "changed",
|
||||
G_CALLBACK (gimp_align_options_pivot_changed),
|
||||
options);
|
||||
widget = gimp_prop_check_button_new (config, "align-contents", NULL);
|
||||
gtk_grid_attach (GTK_GRID (items_grid), widget, 0, 2, 1, 1);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gtk_box_pack_start (GTK_BOX (section_vbox), hbox, FALSE, FALSE, 0);
|
||||
@@ -438,18 +429,12 @@ gimp_align_options_gui (GimpToolOptions *tool_options)
|
||||
|
||||
widget = gtk_label_new (NULL);
|
||||
gtk_box_pack_start (GTK_BOX (section_vbox), widget, FALSE, FALSE, 0);
|
||||
gtk_widget_show (widget);
|
||||
if (options->priv->selected_guides)
|
||||
gtk_widget_set_visible (widget, TRUE);
|
||||
else
|
||||
gtk_widget_set_visible (widget, FALSE);
|
||||
options->priv->selected_guides_label = widget;
|
||||
|
||||
/* Align frame */
|
||||
frame = gimp_frame_new (_("Align"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
section_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||
gtk_container_add (GTK_CONTAINER (frame), section_vbox);
|
||||
gtk_widget_show (section_vbox);
|
||||
|
||||
/* Align frame: reference */
|
||||
combo = gimp_prop_enum_combo_box_new (config, "align-reference", 0, 0);
|
||||
gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Relative to"));
|
||||
@@ -459,7 +444,10 @@ gimp_align_options_gui (GimpToolOptions *tool_options)
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gtk_box_pack_start (GTK_BOX (section_vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
if (options->align_reference == GIMP_ALIGN_REFERENCE_PICK)
|
||||
gtk_widget_set_visible (hbox, TRUE);
|
||||
else
|
||||
gtk_widget_set_visible (hbox, FALSE);
|
||||
options->priv->reference_box = hbox;
|
||||
|
||||
widget = gtk_image_new_from_icon_name (GIMP_ICON_CURSOR, GTK_ICON_SIZE_BUTTON);
|
||||
@@ -472,14 +460,21 @@ gimp_align_options_gui (GimpToolOptions *tool_options)
|
||||
|
||||
widget = gtk_label_new (NULL);
|
||||
gtk_box_pack_start (GTK_BOX (section_vbox), widget, FALSE, FALSE, 0);
|
||||
gtk_widget_show (widget);
|
||||
options->priv->reference_label = widget;
|
||||
|
||||
/* Align frame: buttons */
|
||||
align_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gtk_box_pack_start (GTK_BOX (section_vbox), align_hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_set_visible (align_hbox, TRUE);
|
||||
|
||||
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||
gtk_widget_set_valign (vbox2, GTK_ALIGN_CENTER);
|
||||
gtk_container_add (GTK_CONTAINER (align_hbox), vbox2);
|
||||
gtk_widget_set_visible (vbox2, TRUE);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gtk_box_pack_start (GTK_BOX (section_vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_set_visible (hbox, TRUE);
|
||||
|
||||
n = 0;
|
||||
options->priv->align_ver_button[n++] =
|
||||
@@ -495,8 +490,8 @@ gimp_align_options_gui (GimpToolOptions *tool_options)
|
||||
_("Align anchor points of targets on right edge of reference"));
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gtk_box_pack_start (GTK_BOX (section_vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_set_visible (hbox, TRUE);
|
||||
|
||||
n = 0;
|
||||
options->priv->align_hor_button[n++] =
|
||||
@@ -511,6 +506,19 @@ gimp_align_options_gui (GimpToolOptions *tool_options)
|
||||
gimp_align_options_button_new (options, GIMP_ALIGN_BOTTOM, hbox,
|
||||
_("Align anchor points of targets on bottom of reference"));
|
||||
|
||||
/* Anchor points square */
|
||||
options->priv->pivot_selector = gimp_pivot_selector_new (0.0, 0.0, 1.0, 1.0);
|
||||
gtk_widget_set_tooltip_text (options->priv->pivot_selector,
|
||||
_("Set anchor point of targets"));
|
||||
gimp_pivot_selector_set_position (GIMP_PIVOT_SELECTOR (options->priv->pivot_selector),
|
||||
options->priv->pivot_x, options->priv->pivot_y);
|
||||
gtk_container_add (GTK_CONTAINER (align_hbox), options->priv->pivot_selector);
|
||||
gtk_widget_set_visible (options->priv->pivot_selector, TRUE);
|
||||
|
||||
g_signal_connect (options->priv->pivot_selector, "changed",
|
||||
G_CALLBACK (gimp_align_options_pivot_changed),
|
||||
options);
|
||||
|
||||
/* Distribute frame */
|
||||
frame = gimp_frame_new (_("Distribute"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
@@ -842,6 +850,7 @@ gimp_align_options_update_area (GimpAlignOptions *options)
|
||||
gtk_widget_hide (options->priv->reference_box);
|
||||
}
|
||||
gtk_label_set_markup (GTK_LABEL (options->priv->reference_label), text);
|
||||
gtk_widget_set_visible (options->priv->reference_label, (text) ? TRUE: FALSE);
|
||||
g_free (text);
|
||||
}
|
||||
|
||||
|
@@ -39,6 +39,7 @@
|
||||
#include "core/gimpimageproxy.h"
|
||||
#include "core/gimpitem.h"
|
||||
#include "core/gimplineart.h"
|
||||
#include "core/gimplinklayer.h"
|
||||
#include "core/gimppickable.h"
|
||||
#include "core/gimppickable-contiguous-region.h"
|
||||
#include "core/gimpprogress.h"
|
||||
@@ -50,6 +51,8 @@
|
||||
|
||||
#include "operations/layer-modes/gimp-layer-modes.h"
|
||||
|
||||
#include "path/gimpvectorlayer.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
@@ -620,7 +623,21 @@ gimp_bucket_fill_tool_button_press (GimpTool *tool,
|
||||
return;
|
||||
}
|
||||
|
||||
if (gimp_item_is_content_locked (GIMP_ITEM (drawable), &locked_item))
|
||||
if (gimp_item_is_link_layer (GIMP_ITEM (drawable)))
|
||||
{
|
||||
gimp_tool_message_literal (tool, display,
|
||||
_("Link layers must be rasterized "
|
||||
"before they can be painted on."));
|
||||
return;
|
||||
}
|
||||
else if (gimp_item_is_vector_layer (GIMP_ITEM (drawable)))
|
||||
{
|
||||
gimp_tool_message_literal (tool, display,
|
||||
_("Vector layers must be rasterized "
|
||||
"before they can be painted on."));
|
||||
return;
|
||||
}
|
||||
else if (gimp_item_is_content_locked (GIMP_ITEM (drawable), &locked_item))
|
||||
{
|
||||
gimp_tool_message_literal (tool, display,
|
||||
_("The selected layer's pixels are locked."));
|
||||
|
@@ -562,48 +562,50 @@ gimp_filter_tool_control (GimpTool *tool,
|
||||
|
||||
case GIMP_TOOL_ACTION_COMMIT:
|
||||
if (filter_tool->filter)
|
||||
drawable = gimp_drawable_filter_get_drawable (filter_tool->filter);
|
||||
|
||||
/* TODO: Expand non-destructive editing to other drawables
|
||||
* besides layers and channels */
|
||||
if ((! GIMP_IS_LAYER (drawable) && ! GIMP_IS_CHANNEL (drawable)) ||
|
||||
GIMP_IS_LAYER_MASK (drawable) ||
|
||||
(! filter_tool->existing_filter && options->merge_filter))
|
||||
non_destructive = FALSE;
|
||||
|
||||
if (filter_tool->operation)
|
||||
{
|
||||
gegl_node_get (filter_tool->operation,
|
||||
"operation", &operation_name,
|
||||
NULL);
|
||||
drawable = gimp_drawable_filter_get_drawable (filter_tool->filter);
|
||||
|
||||
if (! g_strcmp0 (operation_name, "gegl:nop"))
|
||||
/* TODO: Expand non-destructive editing to other drawables
|
||||
* besides layers and channels */
|
||||
if ((! GIMP_IS_LAYER (drawable) && ! GIMP_IS_CHANNEL (drawable)) ||
|
||||
GIMP_IS_LAYER_MASK (drawable) ||
|
||||
(! filter_tool->existing_filter && options->merge_filter))
|
||||
non_destructive = FALSE;
|
||||
|
||||
/* TODO: Once we can serialize GimpDrawable, remove so that filters with
|
||||
* aux nodes can be non-destructive */
|
||||
if (gegl_node_has_pad (filter_tool->operation, "aux") ||
|
||||
/* GEGL graph is dangerous even without using third-party
|
||||
* effects, because it may run any effect. E.g. it can
|
||||
* run sink effects overwriting any local files with user
|
||||
* rights. We leave a way in through an environment
|
||||
* variable because it is a useful tool for GEGL ops
|
||||
* developers but it should only be set while knowing what
|
||||
* you are doing.
|
||||
*/
|
||||
(g_strcmp0 (operation_name, "gegl:gegl") == 0 &&
|
||||
g_getenv ("GIMP_ALLOW_GEGL_GRAPH_LAYER_EFFECT") == NULL))
|
||||
non_destructive = FALSE;
|
||||
if (filter_tool->operation)
|
||||
{
|
||||
gegl_node_get (filter_tool->operation,
|
||||
"operation", &operation_name,
|
||||
NULL);
|
||||
|
||||
g_free (operation_name);
|
||||
if (! g_strcmp0 (operation_name, "gegl:nop"))
|
||||
non_destructive = FALSE;
|
||||
|
||||
/* TODO: Once we can serialize GimpDrawable, remove so that
|
||||
* filters with aux nodes can be non-destructive */
|
||||
if (gegl_node_has_pad (filter_tool->operation, "aux") ||
|
||||
/* GEGL graph is dangerous even without using third-party
|
||||
* effects, because it may run any effect. E.g. it can
|
||||
* run sink effects overwriting any local files with user
|
||||
* rights. We leave a way in through an environment
|
||||
* variable because it is a useful tool for GEGL ops
|
||||
* developers but it should only be set while knowing what
|
||||
* you are doing.
|
||||
*/
|
||||
(g_strcmp0 (operation_name, "gegl:gegl") == 0 &&
|
||||
g_getenv ("GIMP_ALLOW_GEGL_GRAPH_LAYER_EFFECT") == NULL))
|
||||
non_destructive = FALSE;
|
||||
|
||||
g_free (operation_name);
|
||||
}
|
||||
|
||||
/* Ensure that filters applied to group, vector or link layers are
|
||||
* non-destructive */
|
||||
if (GIMP_IS_GROUP_LAYER (drawable) ||
|
||||
gimp_item_is_vector_layer (GIMP_ITEM (drawable)) ||
|
||||
gimp_item_is_link_layer (GIMP_ITEM (drawable)))
|
||||
non_destructive = TRUE;
|
||||
}
|
||||
|
||||
/* Ensure that filters applied to group, vector or link layers are non-destructive */
|
||||
if (GIMP_IS_GROUP_LAYER (drawable) ||
|
||||
gimp_item_is_vector_layer (GIMP_ITEM (drawable)) ||
|
||||
gimp_item_is_link_layer (GIMP_ITEM (drawable)))
|
||||
non_destructive = TRUE;
|
||||
|
||||
gimp_filter_tool_commit (filter_tool, non_destructive);
|
||||
break;
|
||||
}
|
||||
|
@@ -127,6 +127,8 @@ static void gimp_mybrush_tool_cursor_update (GimpTool *tool,
|
||||
options->view_zoom = (gimp_zoom_model_get_factor (shell->zoom) > 0.0f) ?
|
||||
gimp_zoom_model_get_factor (shell->zoom) : 1.0f;
|
||||
options->view_rotation = shell->rotate_angle;
|
||||
|
||||
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, display);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -143,6 +143,6 @@ libapptools = static_library('apptools',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Tools"',
|
||||
dependencies: [
|
||||
gegl, gtk3,
|
||||
gegl, gtk3, gexiv2,
|
||||
],
|
||||
)
|
||||
|
@@ -1218,7 +1218,8 @@ gimp_dashboard_init (GimpDashboard *dashboard)
|
||||
/* group meter */
|
||||
if (group_info->has_meter)
|
||||
{
|
||||
GeglColor *color = gegl_color_new (NULL);
|
||||
GeglColor *color = gegl_color_new (NULL);
|
||||
gdouble interval = priv->update_interval;
|
||||
|
||||
meter = gimp_meter_new (priv->gimp, group_data->n_meter_values);
|
||||
group_data->meter = GIMP_METER (meter);
|
||||
@@ -1226,7 +1227,7 @@ gimp_dashboard_init (GimpDashboard *dashboard)
|
||||
g_dgettext (NULL, group_info->description),
|
||||
NULL);
|
||||
gimp_meter_set_history_resolution (GIMP_METER (meter),
|
||||
priv->update_interval / 1000.0);
|
||||
interval / 1000.0);
|
||||
gimp_meter_set_history_duration (GIMP_METER (meter),
|
||||
priv->history_duration / 1000.0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), meter, FALSE, FALSE, 0);
|
||||
@@ -3318,7 +3319,7 @@ gimp_dashboard_field_to_string (GimpDashboard *dashboard,
|
||||
const FieldInfo *field_info = &group_info->fields[field];
|
||||
const VariableInfo *variable_info = &variables[field_info->variable];
|
||||
const VariableData *variable_data = &priv->variables[field_info->variable];
|
||||
/* Tranlators: "N/A" is an abbreviation for "not available" */
|
||||
/* Translators: "N/A" is an abbreviation for "not available" */
|
||||
const gchar *str = C_("dashboard-value", "N/A");
|
||||
gboolean static_str = TRUE;
|
||||
gboolean show_limit = TRUE;
|
||||
@@ -4922,8 +4923,10 @@ gimp_dashboard_set_update_interval (GimpDashboard *dashboard,
|
||||
|
||||
if (group_data->meter)
|
||||
{
|
||||
gdouble interval = update_interval;
|
||||
|
||||
gimp_meter_set_history_resolution (group_data->meter,
|
||||
update_interval / 1000.0);
|
||||
interval / 1000.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -31,7 +31,7 @@
|
||||
{ "XdndDirectSave0", 0, GIMP_DND_TYPE_XDS }
|
||||
|
||||
#define GIMP_TARGET_COLOR \
|
||||
{ "application/x-color", 0, GIMP_DND_TYPE_COLOR }
|
||||
{ "application/x-geglcolor", 0, GIMP_DND_TYPE_COLOR }
|
||||
|
||||
#define GIMP_TARGET_SVG \
|
||||
{ "image/svg", 0, GIMP_DND_TYPE_SVG }
|
||||
|
@@ -2011,7 +2011,7 @@ control_compress_left (GimpGradient *gradient,
|
||||
range_l = range_r = drag_seg;
|
||||
}
|
||||
|
||||
/* Calculate left bound for dragged hadle */
|
||||
/* Calculate left bound for dragged handle */
|
||||
|
||||
if (drag_seg == range_l)
|
||||
lbound = range_l->prev->left + 2.0 * EPSILON;
|
||||
|
@@ -2245,7 +2245,7 @@ gimp_item_tree_view_popover_button_press (GtkWidget *widget,
|
||||
|
||||
/* Also immediately pass a release event at same position.
|
||||
* Without this, we get weird pointer as though a quick drag'n
|
||||
* drop occured.
|
||||
* drop occurred.
|
||||
*/
|
||||
new_event->type = GDK_BUTTON_RELEASE;
|
||||
gtk_main_do_event (new_event);
|
||||
|
@@ -222,7 +222,7 @@ gimp_palette_view_button_press (GtkWidget *widget,
|
||||
gimp_palette_view_select_entry (view, entry);
|
||||
|
||||
/* Usually the menu is provided by a GimpEditor.
|
||||
* Make sure it's also run by returning FALSE here */
|
||||
* Make sure it's also run by returning FALSE here */
|
||||
return FALSE;
|
||||
}
|
||||
else if (bevent->button == 1)
|
||||
|
@@ -386,7 +386,7 @@ gimp_shortcut_button_focus_out_event (GimpShortcutButton* button,
|
||||
gpointer user_data)
|
||||
{
|
||||
/* On losing focus, we untoggle, so we don't have to grab anything.
|
||||
* Let's avoid cases with several shortcut buttons all grabing the
|
||||
* Let's avoid cases with several shortcut buttons all grabbing the
|
||||
* same shortcuts for instance.
|
||||
*/
|
||||
if (button->priv->timer != 0)
|
||||
|
@@ -161,13 +161,12 @@ gimp_view_renderer_palette_render (GimpViewRenderer *renderer,
|
||||
|
||||
if ((y % renderpal->cell_height) == 0)
|
||||
{
|
||||
guchar rgba[4];
|
||||
gint n = 0;
|
||||
guchar *d = row;
|
||||
|
||||
for (x = 0; x < renderer->width; x++, d += 4)
|
||||
{
|
||||
guchar rgba[4];
|
||||
|
||||
if ((x % renderpal->cell_width) == 0)
|
||||
{
|
||||
if (list && n < renderpal->columns &&
|
||||
|
@@ -922,6 +922,8 @@ 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
|
||||
static GdkWindow *
|
||||
gimp_get_foreign_window (gpointer window)
|
||||
{
|
||||
@@ -938,6 +940,7 @@ gimp_get_foreign_window (gpointer window)
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
gimp_window_set_transient_for (GtkWindow *window,
|
||||
@@ -2592,7 +2595,9 @@ gimp_window_set_transient_cb (GtkWidget *window,
|
||||
GdkEventAny *event G_GNUC_UNUSED,
|
||||
GBytes *handle)
|
||||
{
|
||||
#ifndef G_OS_WIN32
|
||||
gboolean transient_set = FALSE;
|
||||
#endif
|
||||
|
||||
g_return_if_fail (handle != NULL);
|
||||
|
||||
|
@@ -280,6 +280,6 @@ libappwidgets = static_library('appwidgets',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Widgets"',
|
||||
dependencies: [
|
||||
gegl, gtk3,
|
||||
gegl, gtk3, gexiv2,
|
||||
],
|
||||
)
|
||||
|
@@ -13,6 +13,6 @@ libappxcf = static_library('appxcf',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-XCF"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf, zlib
|
||||
cairo, gegl, gdk_pixbuf, gexiv2, zlib
|
||||
],
|
||||
)
|
||||
|
@@ -1234,10 +1234,9 @@ xcf_load_add_masks (GimpImage *image)
|
||||
show_mask = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (layer),
|
||||
"gimp-layer-mask-show"));
|
||||
|
||||
gimp_layer_add_mask (layer, mask, FALSE, NULL);
|
||||
gimp_layer_add_mask (layer, mask, edit_mask, FALSE, NULL);
|
||||
|
||||
gimp_layer_set_apply_mask (layer, apply_mask, FALSE);
|
||||
gimp_layer_set_edit_mask (layer, edit_mask);
|
||||
gimp_layer_set_show_mask (layer, show_mask, FALSE);
|
||||
|
||||
g_object_set_data (G_OBJECT (layer), "gimp-layer-mask", NULL);
|
||||
|
@@ -179,14 +179,18 @@ bund_usr ()
|
||||
$(dirname $(echo /$2 | sed "s|*|no_scape|g"))"
|
||||
;;
|
||||
esac
|
||||
unset not_found_tpath found_tpath
|
||||
for path in $search_path; do
|
||||
expanded_path=$(echo $(echo $path | sed "s|no_scape|*|g"))
|
||||
if [ ! -d "$expanded_path" ]; then
|
||||
if (echo ${2##*/} | grep -q '\*' && echo "$(echo $expanded_path/${2##*/})" | grep -q '\*') || (! echo ${2##*/} | grep -q '\*' && [ ! -e "$expanded_path/${2##*/}" ]); then
|
||||
not_found_tpath=true
|
||||
continue
|
||||
else
|
||||
found_tpath=true
|
||||
fi
|
||||
|
||||
#Copy found targets from search_path to bundle dir
|
||||
for target_path in $(find $expanded_path -maxdepth 1 -name ${2##*/}); do
|
||||
for target_path in $(find -L $expanded_path -maxdepth 1 -name ${2##*/} 2>/dev/null); do
|
||||
dest_path="$(dirname $(echo $target_path | sed -e "s|^$1/|${USR_DIR}/|" -e t -e "s|^/|${USR_DIR}/|"))"
|
||||
output_dest_path="$dest_path"
|
||||
if [ "$3" = '--dest' ] || [ "$3" = '--rename' ]; then
|
||||
@@ -238,6 +242,11 @@ bund_usr ()
|
||||
done
|
||||
done
|
||||
|
||||
if [ "$not_found_tpath" ] && [ -z "$found_tpath" ] && [ "$3" != '--bundler' ] && [ "$5" != '--bundler' ]; then
|
||||
printf "\033[31m(ERROR)\033[0m: not found $2 in none of the search paths.\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#Undo the tweak done above
|
||||
cd ..
|
||||
rm -r limbo
|
||||
@@ -295,6 +304,7 @@ prep_pkg "xapps-common"
|
||||
bund_usr "$UNIX_PREFIX" "share/glib-*/schemas"
|
||||
### Glib commonly required modules
|
||||
bund_usr "$UNIX_PREFIX" "lib/gvfs/*.so"
|
||||
bund_usr "$UNIX_PREFIX" "lib/libproxy/libpxbackend*.so" --dest "${LIB_DIR}/${LIB_SUBDIR}"
|
||||
bund_usr "$UNIX_PREFIX" "lib/gio/modules/*"
|
||||
conf_app GIO_MODULE_DIR "${LIB_DIR}/${LIB_SUBDIR}gio/modules"
|
||||
conf_app GIO_EXTRA_MODULES "" --no-expand
|
||||
@@ -315,6 +325,7 @@ conf_app GTK_PATH "${LIB_DIR}/${LIB_SUBDIR}gtk-3.0"
|
||||
prep_pkg "ibus-gtk3"
|
||||
bund_usr "$UNIX_PREFIX" "lib/gtk-3.0/*.*.*/immodules/*.so" --bundler
|
||||
conf_app GTK_IM_MODULE_FILE "${LIB_DIR}/${LIB_SUBDIR}gtk-3.0/*.*.*/immodules.cache"
|
||||
conf_app GTK_MODULES "" --no-expand
|
||||
|
||||
## Core features
|
||||
bund_usr "$GIMP_PREFIX" "lib/libbabl*"
|
||||
@@ -330,20 +341,35 @@ lang_list=$(echo $(ls po/*.po | sed -e 's|po/||g' -e 's|.po||g' | sort) | tr '\n
|
||||
for lang in $lang_list; do
|
||||
bund_usr "$GIMP_PREFIX" share/locale/$lang/LC_MESSAGES
|
||||
# Needed for eventually used widgets, GTK inspector etc
|
||||
bund_usr "$UNIX_PREFIX" share/locale/$lang/LC_MESSAGES/gtk3*.mo
|
||||
if ! echo "$(echo $UNIX_PREFIX/share/locale/$lang/LC_MESSAGES/gtk3*.mo)" | grep -q '\*'; then
|
||||
bund_usr "$UNIX_PREFIX" share/locale/$lang/LC_MESSAGES/gtk3*.mo
|
||||
fi
|
||||
# For language list in text tool options
|
||||
bund_usr "$UNIX_PREFIX" share/locale/$lang/LC_MESSAGES/iso_639*3.mo
|
||||
if ! echo "$(echo $UNIX_PREFIX/share/locale/$lang/LC_MESSAGES/iso_639*3.mo)" | grep -q '\*'; then
|
||||
bund_usr "$UNIX_PREFIX" share/locale/$lang/LC_MESSAGES/iso_639*3.mo
|
||||
fi
|
||||
done
|
||||
bund_usr "$GIMP_PREFIX" "etc/gimp"
|
||||
|
||||
## Other features and plug-ins
|
||||
### mypaint brushes
|
||||
bund_usr "$UNIX_PREFIX" "share/mypaint-data/2.0"
|
||||
####https://salsa.debian.org/multimedia-team/mypaint-brushes/-/merge_requests/2
|
||||
for myb in $(find "$USR_DIR/share/mypaint-data/2.0/brushes/Dieterle" -iname "*.myb"); do
|
||||
sed -i -e 's|surfacemap_x|gridmap_x|g' -e 's|surfacemap_y|gridmap_y|g' $myb;
|
||||
done
|
||||
### Needed for 'th' word breaking in Text tool etc
|
||||
bund_usr "$UNIX_PREFIX" "share/libthai"
|
||||
conf_app LIBTHAI_DICTDIR "share/libthai"
|
||||
### Needed for file-heif work
|
||||
bund_usr "$UNIX_PREFIX" "lib/libheif/plugins/*.so"
|
||||
conf_app LIBHEIF_PLUGIN_PATH "${LIB_DIR}/${LIB_SUBDIR}libheif/plugins"
|
||||
### Needed for full CJK and Cyrillic support in file-pdf
|
||||
bund_usr "$UNIX_PREFIX" "share/poppler"
|
||||
### Needed for file-ps work. See: #14785
|
||||
bund_usr "$UNIX_PREFIX" "share/ghostscript/*/iccprofiles/*.icc"
|
||||
bund_usr "$UNIX_PREFIX" "share/ghostscript/*/Resource/Init"
|
||||
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"
|
||||
@@ -358,9 +384,6 @@ if [ "$GIMP_UNSTABLE" ] || [ -z "$GIMP_RELEASE" ]; then
|
||||
### Needed for GTK inspector
|
||||
bund_usr "$UNIX_PREFIX" "lib/libEGL*"
|
||||
bund_usr "$UNIX_PREFIX" "lib/libGL*"
|
||||
bund_usr "$UNIX_PREFIX" "lib/dri*"
|
||||
#TODO: remove this on Debian Trixie (which have Mesa 24.2)
|
||||
conf_app LIBGL_DRIVERS_PATH "${LIB_DIR}/${LIB_SUBDIR}dri"
|
||||
fi
|
||||
### Debug dialog
|
||||
bund_usr "$GIMP_PREFIX" "bin/gimp-debug-tool*" --dest "libexec"
|
||||
@@ -374,7 +397,8 @@ wipe_usr ${LIB_DIR}/*.pyc
|
||||
conf_app PYTHONDONTWRITEBYTECODE "1" --no-expand
|
||||
#### JavaScript plug-ins support
|
||||
bund_usr "$UNIX_PREFIX" "bin/gjs*"
|
||||
bund_usr "$UNIX_PREFIX" "lib/gjs/girepository-1.0/Gjs*" --dest "${LIB_DIR}/${LIB_SUBDIR}girepository-1.0"
|
||||
bund_usr "$UNIX_PREFIX" "lib/gjs/girepository-*/Gjs*.typelib" --dest "${LIB_DIR}/${LIB_SUBDIR}girepository-1.0"
|
||||
bund_usr "$UNIX_PREFIX" "lib/girepository-*/GioUnix*.typelib"
|
||||
####FIXME: lua crashes with loop: See: #11895
|
||||
#bund_usr "$UNIX_PREFIX" "bin/luajit" --rename "lua"
|
||||
#bund_usr "$UNIX_PREFIX" "lib/liblua5.1-lgi*"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user