Adding upstream version 3.0.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
This commit is contained in:
parent
1c8b56a4f5
commit
554424e00a
6822 changed files with 5440542 additions and 0 deletions
51
.clang-format
Normal file
51
.clang-format
Normal file
|
@ -0,0 +1,51 @@
|
|||
# For more information, see:
|
||||
#
|
||||
# https://clang.llvm.org/docs/ClangFormat.html
|
||||
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
||||
#
|
||||
---
|
||||
|
||||
BasedOnStyle: GNU
|
||||
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignArrayOfStructures: Left
|
||||
AlignConsecutiveAssignments: AcrossComments
|
||||
AlignConsecutiveDeclarations: AcrossComments
|
||||
AlignConsecutiveBitFields: AcrossComments
|
||||
AlignConsecutiveMacros: AcrossComments
|
||||
AlignEscapedNewlines: Left
|
||||
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AlwaysBreakAfterReturnType: AllDefinitions
|
||||
BinPackArguments: true
|
||||
# Uncomment when our CI uses LLVM 20.
|
||||
# See: https://github.com/llvm/llvm-project/issues/117830
|
||||
# BinPackParameters: AlwaysOnePerLine
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: GNU
|
||||
BreakBeforeTernaryOperators: false
|
||||
IndentWidth: 2
|
||||
PointerAlignment: Right
|
||||
UseTab: Never
|
||||
|
||||
SpaceBeforeParens: Always
|
||||
SpaceAfterLogicalNot: true
|
||||
SpaceAfterCStyleCast: true
|
||||
|
||||
# Our column limit is more around 80 characters but we want to avoid
|
||||
# this rule to be over-agressive. So for clang-format, let's use a
|
||||
# higher limit. Then let's put some biggish penalties on breaking on
|
||||
# assignment, or parentheses, or other similar cases. Actually with such
|
||||
# limits, if clang-format really ends up re-formatting, there might be
|
||||
# something better to do code-wise (i.e. we might be in an akwardly
|
||||
# over-nested block case).
|
||||
ColumnLimit: 80
|
||||
PenaltyBreakAssignment: 60
|
||||
PenaltyBreakBeforeFirstCallParameter: 100
|
||||
PenaltyBreakOpenParenthesis: 40
|
||||
PenaltyExcessCharacter: 1
|
||||
# Strings are more often longer by usage, so let's give these slightly
|
||||
# more space to breath.
|
||||
PenaltyBreakString: 60
|
||||
PenaltyReturnTypeOnItsOwnLine: 50
|
4
.dir-locals.el
Normal file
4
.dir-locals.el
Normal file
|
@ -0,0 +1,4 @@
|
|||
((c-mode . ((c-file-style . "GNU")
|
||||
(c-basic-offset . 2)
|
||||
(indent-tabs-mode . nil)
|
||||
(show-trailing-whitespace . t))))
|
797
.gitlab-ci.yml
Normal file
797
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,797 @@
|
|||
spec:
|
||||
inputs:
|
||||
distribution_pipeline:
|
||||
description: 'Pipelines that creates installable GIMP'
|
||||
options:
|
||||
- GIMP_CI_APPIMAGE #trigger the appimage making.
|
||||
- GIMP_CI_FLATPAK #trigger the flatpak build and publishing (base but slow)
|
||||
- GIMP_CI_WIN_INSTALLER #trigger all native MSYS2 builds then creates Inno Windows installer (base but slow)
|
||||
- GIMP_CI_MS_STORE #trigger arm64 and x64 native MSYS2 builds then creates a .msixbundle (base but slow)
|
||||
- none
|
||||
default: 'none'
|
||||
test_pipeline:
|
||||
description: 'Pipelines used only for testing'
|
||||
options:
|
||||
- GIMP_CI_MESON_GCC #trigger the Debian GCC 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
|
||||
default: 'none'
|
||||
---
|
||||
|
||||
workflow:
|
||||
auto_cancel:
|
||||
on_new_commit: interruptible
|
||||
|
||||
|
||||
##################################################
|
||||
# There are five "TYPES" of pipelines on our CI: #
|
||||
##################################################
|
||||
|
||||
## 1. On MERGE REQUESTS, the following are triggered:
|
||||
## - Abbreviated Linux Clang build (base & fast)
|
||||
## - clang-format (static code analysis)
|
||||
## - Execution tests (dynamic code analysis)
|
||||
.pipeline_merge: &CI_MERGE
|
||||
if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
||||
interruptible: true
|
||||
variables: {}
|
||||
|
||||
## 2. LABELED MERGE REQUESTS (search for $CI_MERGE_REQUEST_LABELS =~ /.*Package).
|
||||
#'interruptible: true' needs to be hardcoded on job rules
|
||||
# GitLab is quite sensitive about rules 'if' order so be careful
|
||||
|
||||
## 3. On COMMITS except tags.
|
||||
## - Linux Clang build (base & fast)
|
||||
## - Execution tests (dynamic code analysis)
|
||||
## - Source tarball (base & fast)
|
||||
## - Developer documentation (base & fast)
|
||||
.pipeline_commit: &CI_COMMIT
|
||||
if: '$CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS == null && $CI_COMMIT_TAG == null'
|
||||
interruptible: true
|
||||
variables: {}
|
||||
|
||||
## 4. RELEASES.
|
||||
## - Source tarball (base & fast)
|
||||
## - Developer documentation (base & fast)
|
||||
## - Inno Windows installer (base but slow)
|
||||
## - MS Store .msixupload (base but slow)
|
||||
.pipeline_release: &CI_RELEASE
|
||||
if: '$CI_COMMIT_TAG != null'
|
||||
interruptible: false
|
||||
variables: {}
|
||||
|
||||
.default:
|
||||
## 5. On CUSTOM builds though web GUI, API or schedules.
|
||||
## Scheduled CI ($CI_PIPELINE_SOURCE == "schedule") will run regularly all
|
||||
## the 'distribution_pipeline' and 'test_pipeline' above. To run them without
|
||||
## waiting for schedules: https://gitlab.gnome.org/GNOME/gimp/-/pipelines/new
|
||||
interruptible: false
|
||||
|
||||
|
||||
# Common jobs behavior
|
||||
retry:
|
||||
max: 1
|
||||
when:
|
||||
- 'runner_system_failure'
|
||||
- 'scheduler_failure'
|
||||
needs: []
|
||||
# Default Docker image (unless otherwise defined)
|
||||
image: debian:${DEB_VERSION}
|
||||
variables:
|
||||
DEB_VERSION: "bookworm"
|
||||
# Common cloning procedure
|
||||
GIT_DEPTH: "1"
|
||||
GIT_SUBMODULE_STRATEGY: none
|
||||
# Enable colorful output when supported (e.g. ninja, cppcheck)
|
||||
CLICOLOR_FORCE: "1"
|
||||
# Common artifacts behavior
|
||||
artifacts:
|
||||
name: "${CI_JOB_NAME_SLUG}${VARIANT}-${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHORT_SHA}"
|
||||
when: always
|
||||
|
||||
|
||||
stages:
|
||||
- dependencies
|
||||
- gimp
|
||||
- analysis
|
||||
- distribution
|
||||
|
||||
## AppImage CI (Debian) ##
|
||||
.debian:
|
||||
extends: .default
|
||||
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_v2]
|
||||
tags:
|
||||
- $RUNNER
|
||||
image: $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER}
|
||||
variables:
|
||||
CC: "clang"
|
||||
CXX: "clang++"
|
||||
CC_LD: lld
|
||||
CXX_LD: lld
|
||||
before_script:
|
||||
- export GIMP_PREFIX="${CI_PROJECT_DIR}/_install-${RUNNER}"
|
||||
timeout: 20m
|
||||
|
||||
.debian_environ: &ENVIRON
|
||||
- echo -e "\e[0Ksection_start:`date +%s`:environ[collapsed=true]\r\e[0KPreparing build environment"
|
||||
- gcc -print-multi-os-directory 2>/dev/null | grep ./ && export LIB_DIR=$(gcc -print-multi-os-directory | sed 's/\.\.\///g') || export LIB_DIR="lib"
|
||||
- gcc -print-multiarch 2>/dev/null | grep . && export LIB_SUBDIR=$(echo $(gcc -print-multiarch)'/')
|
||||
## Build-time vars
|
||||
- export PKG_CONFIG_PATH="${GIMP_PREFIX}/${LIB_DIR}/${LIB_SUBDIR}pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
|
||||
- export XDG_DATA_DIRS="${GIMP_PREFIX}/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}"
|
||||
## Runtime vars
|
||||
- export PATH="${GIMP_PREFIX}/bin:$PATH"
|
||||
- export LD_LIBRARY_PATH="${GIMP_PREFIX}/${LIB_DIR}/${LIB_SUBDIR}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
||||
- export GI_TYPELIB_PATH="${GIMP_PREFIX}/${LIB_DIR}/${LIB_SUBDIR}girepository-1.0${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
|
||||
- echo -e "\e[0Ksection_end:`date +%s`:environ\r\e[0K"
|
||||
|
||||
deps-debian:
|
||||
extends: .debian
|
||||
stage: dependencies
|
||||
image:
|
||||
name: gcr.io/kaniko-project/executor:debug
|
||||
entrypoint: [""]
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
UMFPACK: libumfpack5
|
||||
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
|
||||
script:
|
||||
- export container=docker
|
||||
- mkdir -p /kaniko/.docker
|
||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
||||
# Install deps
|
||||
- echo "FROM debian:${DEB_VERSION}" > Dockerfile
|
||||
- echo "RUN echo -e \"\e[0Ksection_start:0000000001:deps_install[collapsed=true]\r\e[0KInstalling dependencies provided by Debian $DEB_VERSION\"" >> Dockerfile
|
||||
- echo "RUN apt-get update -qq" >> Dockerfile
|
||||
## 'ca-certificates' is NOT a gimp dep, it is installed only to our Docker image work
|
||||
- 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
|
||||
ccache
|
||||
clang
|
||||
desktop-file-utils
|
||||
gi-docgen
|
||||
git
|
||||
gobject-introspection
|
||||
libgtk-3-bin
|
||||
lld
|
||||
meson
|
||||
valac
|
||||
xauth
|
||||
xsltproc
|
||||
xvfb" >> Dockerfile
|
||||
## Runtime dependencies
|
||||
- echo "RUN apt-get install -qq -y --no-install-recommends \\" >> Dockerfile
|
||||
- echo "at-spi2-core
|
||||
ffmpeg
|
||||
gettext
|
||||
gjs
|
||||
glib-networking
|
||||
graphviz
|
||||
graphviz-dev
|
||||
iso-codes
|
||||
libaa1-dev
|
||||
libappstream-glib-dev
|
||||
libarchive-dev
|
||||
libbz2-dev
|
||||
libcfitsio-dev
|
||||
libgexiv2-dev
|
||||
libgirepository1.0-dev
|
||||
libgs10
|
||||
libgs-dev
|
||||
libgtk-3-dev
|
||||
libgudev-1.0-dev
|
||||
libheif-dev
|
||||
libjson-glib-dev
|
||||
libjxl-dev
|
||||
liblcms2-dev
|
||||
liblzma-dev
|
||||
libmaxflow-dev
|
||||
libmng-dev
|
||||
libmypaint-dev
|
||||
libomp-dev
|
||||
libopenexr-dev
|
||||
libopenjp2-7-dev
|
||||
libpoppler-glib-dev
|
||||
libqoi-dev
|
||||
libraw-dev
|
||||
librsvg2-dev
|
||||
libspiro-dev
|
||||
libsuitesparse-dev
|
||||
libtiff-dev
|
||||
$UMFPACK
|
||||
libunwind-dev
|
||||
libwebp-dev
|
||||
libwmf-dev
|
||||
libxmu-dev
|
||||
libxpm-dev
|
||||
mypaint-brushes
|
||||
poppler-data
|
||||
python3
|
||||
python3-gi
|
||||
python3-gi-cairo" >> Dockerfile
|
||||
- echo "RUN echo -e \"\e[0Ksection_end:0000000002:deps_install\r\e[0K\"" >> Dockerfile
|
||||
# Prepare environ
|
||||
- echo "FROM $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER}" > Dockerfile2;
|
||||
- echo "RUN echo -e \"\e[0Ksection_start:`date +%s`:environ[collapsed=true]\r\e[0KPreparing build environment\"" >> Dockerfile2;
|
||||
- export LIB_DIR="lib";
|
||||
- export LIB_SUBDIR=$([ "$(uname -m)" = 'aarch64' ] && echo "aarch64-linux-gnu/" || echo "x86_64-linux-gnu/");
|
||||
- echo "ENV PKG_CONFIG_PATH=\"${GIMP_PREFIX}/${LIB_DIR}/${LIB_SUBDIR}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;
|
||||
- echo "ENV CLICOLOR_FORCE=\"1\"" >> Dockerfile2;
|
||||
- echo "RUN echo -e \"\e[0Ksection_end:`date +%s`:environ\r\e[0K\"" >> Dockerfile2;
|
||||
# Build some dependencies
|
||||
## Build babl
|
||||
- echo "RUN echo -e \"\e[0Ksection_start:`date +%s`:babl_build[collapsed=true]\r\e[0KBuilding babl\"" >> Dockerfile2;
|
||||
- echo "RUN git clone --branch \"\$([ \"$CI_COMMIT_TAG\" ] && echo \"\$(git ls-remote --tags --exit-code --refs https://gitlab.gnome.org/GNOME/babl.git | grep -oi \"BABL_[0-9]*_[0-9]*_[0-9]*\" | sort --version-sort | tail -1)\" || echo \"master\")\" --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/babl.git" $CI_PROJECT_DIR/babl >> Dockerfile2;
|
||||
- echo "RUN meson setup $CI_PROJECT_DIR/babl/_build-${RUNNER} $CI_PROJECT_DIR/babl -Dprefix=\"${GIMP_PREFIX}\" $PKGCONF_RELOCATABLE_OPTION" >> Dockerfile2;
|
||||
- echo "RUN ninja -C $CI_PROJECT_DIR/babl/_build-${RUNNER}" >> Dockerfile2;
|
||||
- echo "RUN ninja -C $CI_PROJECT_DIR/babl/_build-${RUNNER} install" >> Dockerfile2;
|
||||
- echo "RUN echo -e \"\e[0Ksection_end:`date +%s`:babl_build\r\e[0K\"" >> Dockerfile2;
|
||||
## Build GEGL
|
||||
- echo "RUN echo -e \"\e[0Ksection_start:`date +%s`:gegl_build[collapsed=true]\r\e[0KBuilding gegl\"" >> Dockerfile2;
|
||||
- echo "RUN git clone --branch \"\$([ \"$CI_COMMIT_TAG\" ] && echo \"\$(git ls-remote --tags --exit-code --refs https://gitlab.gnome.org/GNOME/gegl.git | grep -oi \"GEGL_[0-9]*_[0-9]*_[0-9]*\" | sort --version-sort | tail -1)\" || echo \"master\")\" --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/gegl.git" $CI_PROJECT_DIR/gegl >> Dockerfile2;
|
||||
- echo "RUN meson setup $CI_PROJECT_DIR/gegl/_build-${RUNNER} $CI_PROJECT_DIR/gegl -Dprefix=\"${GIMP_PREFIX}\" $PKGCONF_RELOCATABLE_OPTION $WORKSHOP_OPTION" >> Dockerfile2;
|
||||
- echo "RUN ninja -C $CI_PROJECT_DIR/gegl/_build-${RUNNER}" >> Dockerfile2;
|
||||
- echo "RUN ninja -C $CI_PROJECT_DIR/gegl/_build-${RUNNER} install" >> Dockerfile2;
|
||||
- echo "RUN echo -e \"\e[0Ksection_end:`date +%s`:gegl_build\r\e[0K\"" >> Dockerfile2;
|
||||
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER} --cache=true --cache-ttl=120h --image-fs-extract-retry 1 --verbosity=warn
|
||||
- if [ -f 'Dockerfile2' ]; then /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile2 --destination build-debian-${DEB_VERSION}-${RUNNER}-temp --cache=false --no-push --verbosity=warn; fi
|
||||
artifacts:
|
||||
paths:
|
||||
- _install-${RUNNER}/
|
||||
- babl/_build-${RUNNER}/meson-logs/meson-log.txt
|
||||
- babl/_build-${RUNNER}/config.h
|
||||
- gegl/_build-${RUNNER}/meson-logs/meson-log.txt
|
||||
- gegl/_build-${RUNNER}/config.h
|
||||
expire_in: 2 hours
|
||||
|
||||
gimp-debian:
|
||||
extends: .debian
|
||||
needs: ["deps-debian"]
|
||||
stage: gimp
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
script:
|
||||
- *ENVIRON
|
||||
# Build GIMP
|
||||
- echo -e "\e[0Ksection_start:`date +%s`:gimp_build[collapsed=true]\r\e[0KBuilding GIMP"
|
||||
- meson setup _build-${RUNNER} -Dprefix="${GIMP_PREFIX}"
|
||||
-Dpkgconfig.relocatable=true
|
||||
-Drelocatable-bundle=yes
|
||||
-Dcheck-update=yes
|
||||
-Dbuild-id=org.gimp.GIMP_official.AppImage.$(uname -m)
|
||||
- cd _build-${RUNNER}
|
||||
- ninja
|
||||
- echo -e "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K"
|
||||
# Create bundle
|
||||
- echo -e "\e[0Ksection_start:`date +%s`:gimp_bundle[collapsed=true]\r\e[0KCreating bundle"
|
||||
- ninja install &> ninja_install.log || cat ninja_install.log
|
||||
- cd ..
|
||||
- bash build/linux/appimage/3_dist-gimp-goappimage.sh --bundle-only &> goappimage.log || cat goappimage.log
|
||||
- echo -e "\e[0Ksection_end:`date +%s`:gimp_bundle\r\e[0K"
|
||||
artifacts:
|
||||
paths:
|
||||
- AppDir*/
|
||||
- appimageignore*
|
||||
- _build-${RUNNER}/meson-logs/meson-log.txt
|
||||
- _build-${RUNNER}/config.h
|
||||
expire_in: 2 days
|
||||
|
||||
|
||||
## GNU/Linux 64-bit CIs (Debian) ##
|
||||
.debian-x64:
|
||||
extends: .debian
|
||||
rules:
|
||||
- <<: *CI_MERGE
|
||||
- <<: *CI_COMMIT
|
||||
- if: '$GIMP_CI_MESON_CLANG != null'
|
||||
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"
|
||||
- if: '$GIMP_CI_SOURCES != null'
|
||||
- <<: *CI_RELEASE
|
||||
parallel:
|
||||
matrix:
|
||||
- RUNNER: x86_64_v2
|
||||
tags: []
|
||||
|
||||
deps-debian-x64:
|
||||
extends: .debian-x64
|
||||
stage: !reference [deps-debian, stage]
|
||||
image: !reference [deps-debian, image]
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
WORKSHOP_OPTION: '-Dworkshop=true'
|
||||
script:
|
||||
- !reference [deps-debian, script]
|
||||
artifacts: !reference [deps-debian, artifacts]
|
||||
|
||||
gimp-debian-x64:
|
||||
extends: .debian-x64
|
||||
needs: ["deps-debian-x64"]
|
||||
stage: !reference [gimp-debian, stage]
|
||||
variables: !reference [gimp-debian, variables]
|
||||
script:
|
||||
- *ENVIRON
|
||||
# Check building
|
||||
- echo -e "\e[0Ksection_start:`date +%s`:gimp_build[collapsed=true]\r\e[0KBuilding GIMP"
|
||||
- meson setup _build-${RUNNER} -Dprefix="${GIMP_PREFIX}"
|
||||
-Dfile-plug-ins-test=true
|
||||
$MESON_OPTIONS
|
||||
- cd _build-${RUNNER}
|
||||
- ninja
|
||||
- echo -e "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K"
|
||||
# Check execution
|
||||
- echo -e "\e[0Ksection_start:`date +%s`:gimp_test[collapsed=true]\r\e[0KTesting GIMP execution"
|
||||
- ninja test
|
||||
- echo -e "\e[0Ksection_end:`date +%s`:gimp_test\r\e[0K"
|
||||
# Check source
|
||||
- echo -e "\e[0Ksection_start:`date +%s`:gimp_tar[collapsed=true]\r\e[0KChecking GIMP source"
|
||||
- if [ $(git diff |wc -l) -ne 0 ]; then
|
||||
echo "ERROR. A generated file was updated without the source:";
|
||||
git diff;
|
||||
exit 1;
|
||||
fi
|
||||
- if [ "$VARIANT" != "-gcc" ] && [ "$VARIANT" != "-raster" ] && [ "$CI_PIPELINE_SOURCE" != "merge_request_event" ]; then
|
||||
ninja dist &> ninja_dist.txt || cat ninja_dist.txt;
|
||||
fi
|
||||
- echo -e "\e[0Ksection_end:`date +%s`:gimp_tar\r\e[0K"
|
||||
# Check install
|
||||
- echo -e "\e[0Ksection_start:`date +%s`:gimp_install[collapsed=true]\r\e[0KChecking GIMP installation"
|
||||
- ninja install &> ninja_install.txt || cat ninja_install.txt;
|
||||
- echo -e "\e[0Ksection_end:`date +%s`:gimp_install\r\e[0K"
|
||||
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 ##
|
||||
.flatpak-x64:
|
||||
extends: .default
|
||||
rules:
|
||||
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Flatpak.*/'
|
||||
interruptible: true
|
||||
- if: '$GIMP_CI_FLATPAK != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_FLATPAK.*/'
|
||||
tags:
|
||||
- flatpak
|
||||
image: 'quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master'
|
||||
before_script:
|
||||
- export GIMP_PREFIX="${CI_PROJECT_DIR}/_install"
|
||||
timeout: 40m
|
||||
|
||||
deps-flatpak-x64:
|
||||
extends: .flatpak-x64
|
||||
stage: dependencies
|
||||
#https://gitlab.gnome.org/Infrastructure/Infrastructure/-/issues/1502
|
||||
#cache:
|
||||
#key: ${CI_JOB_NAME_SLUG}
|
||||
#paths:
|
||||
#- .flatpak-builder/
|
||||
script:
|
||||
- bash build/linux/flatpak/1_build-deps-flatpak.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- .flatpak-builder.tar
|
||||
- flatpak-builder.log
|
||||
- babl-meson-log.tar
|
||||
- gegl-meson-log.tar
|
||||
expire_in: 2 hours
|
||||
|
||||
gimp-flatpak-x64:
|
||||
extends: .flatpak-x64
|
||||
needs: ["deps-flatpak-x64"]
|
||||
stage: gimp
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
script:
|
||||
- bash build/linux/flatpak/2_build-gimp-flatpak.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- repo.tar
|
||||
- gimp-meson-log.tar
|
||||
expire_in: 2 days
|
||||
|
||||
|
||||
## WINDOWS pipelines (native MSYS2) ##
|
||||
.win:
|
||||
extends: .default
|
||||
rules:
|
||||
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Windows Installer.*/ && $CI_MERGE_REQUEST_LABELS =~ /.*Package:Microsoft Store.*/'
|
||||
interruptible: true
|
||||
variables:
|
||||
INSTALLER_OPTION: '-Dwindows-installer=true'
|
||||
STORE_OPTION: '-Dms-store=true'
|
||||
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Windows Installer.*/'
|
||||
interruptible: true
|
||||
variables:
|
||||
INSTALLER_OPTION: '-Dwindows-installer=true'
|
||||
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Microsoft Store.*/ && $CI_JOB_NAME =~ /.*64.*/ && $CI_JOB_NAME !~ /.*installer.*/'
|
||||
interruptible: true
|
||||
variables:
|
||||
STORE_OPTION: '-Dms-store=true'
|
||||
- if: '$GIMP_CI_WIN_INSTALLER != null && $GIMP_CI_MS_STORE != null'
|
||||
variables:
|
||||
INSTALLER_OPTION: '-Dwindows-installer=true'
|
||||
STORE_OPTION: '-Dms-store=true'
|
||||
- if: '$GIMP_CI_WIN_INSTALLER != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_WIN_INSTALLER.*/'
|
||||
variables:
|
||||
INSTALLER_OPTION: '-Dwindows-installer=true'
|
||||
- if: '$GIMP_CI_MS_STORE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_MS_STORE.*/ && $CI_JOB_NAME =~ /.*64.*/ && $CI_JOB_NAME !~ /.*installer.*/'
|
||||
variables:
|
||||
STORE_OPTION: '-Dms-store=true'
|
||||
- <<: *CI_RELEASE
|
||||
variables:
|
||||
INSTALLER_OPTION: '-Dwindows-installer=true'
|
||||
STORE_OPTION: '-Dms-store=true'
|
||||
parallel:
|
||||
matrix:
|
||||
- RUNNER: windows-aarch64
|
||||
MSYSTEM_PREFIX: clangarm64
|
||||
- RUNNER: win32-ps
|
||||
MSYSTEM_PREFIX: clang64
|
||||
tags:
|
||||
- $RUNNER
|
||||
variables:
|
||||
MSYS_ROOT: 'C:/msys64'
|
||||
CC: cc
|
||||
CXX: c++
|
||||
#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
|
||||
|
||||
.win_environ: &WIN_ENVIRON
|
||||
- Write-Output "$([char]27)[0Ksection_start:$(Get-Date -UFormat %s -Millisecond 0):win_environ[collapsed=true]$([char]13)$([char]27)[0KPreparing build environment"
|
||||
## Build-time vars
|
||||
- $env:PKG_CONFIG_PATH = "$GIMP_PREFIX/lib/pkgconfig;$MSYS_ROOT/$MSYSTEM_PREFIX/lib/pkgconfig;$MSYS_ROOT/$MSYSTEM_PREFIX/share/pkgconfig"
|
||||
- $env:XDG_DATA_DIRS = "$GIMP_PREFIX/share;$MSYS_ROOT/$MSYSTEM_PREFIX/share"
|
||||
## Runtime vars
|
||||
- $env:PATH = "$GIMP_PREFIX/bin;$MSYS_ROOT/$MSYSTEM_PREFIX/bin;" + $env:PATH
|
||||
- $env:GI_TYPELIB_PATH = "$GIMP_PREFIX/lib/girepository-1.0;$MSYS_ROOT/$MSYSTEM_PREFIX/lib/girepository-1.0"
|
||||
- Write-Output "$([char]27)[0Ksection_end:$(Get-Date -UFormat %s -Millisecond 0):win_environ$([char]13)$([char]27)[0K"
|
||||
|
||||
deps-win:
|
||||
extends: .win
|
||||
stage: dependencies
|
||||
script:
|
||||
- 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
|
||||
expire_in: 2 hours
|
||||
|
||||
gimp-win:
|
||||
extends: .win
|
||||
needs: ["deps-win"]
|
||||
stage: gimp
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
script:
|
||||
- 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
|
||||
# Needed by dist-installer-weekly and dist-store-weekly
|
||||
- _build-$MSYSTEM_PREFIX/config.h
|
||||
- _build-$MSYSTEM_PREFIX/build/windows/installer/
|
||||
- _build-$MSYSTEM_PREFIX/build/windows/store/
|
||||
expire_in: 2 days
|
||||
|
||||
|
||||
## WINDOWS x86 legacy CI (native MSYS2) ##
|
||||
.win-x86:
|
||||
extends: .win
|
||||
rules:
|
||||
- !reference [.win, rules]
|
||||
- if: '$GIMP_CI_MSYS2_WIN32 != null'
|
||||
parallel:
|
||||
matrix:
|
||||
- RUNNER: win32-ps
|
||||
MSYSTEM_PREFIX: mingw32
|
||||
variables:
|
||||
MINGW_PACKAGE_PREFIX: mingw-w64-i686
|
||||
CC: cc
|
||||
CXX: c++
|
||||
|
||||
deps-win-x86:
|
||||
extends: .win-x86
|
||||
stage: !reference [deps-win, stage]
|
||||
script:
|
||||
- !reference [deps-win, script]
|
||||
artifacts: !reference [deps-win, artifacts]
|
||||
|
||||
gimp-win-x86:
|
||||
extends: .win-x86
|
||||
needs: ["deps-win-x86"]
|
||||
stage: !reference [gimp-win, stage]
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
script:
|
||||
- $env:PATH = "C:/msys64/usr/bin;" + $env:PATH
|
||||
- !reference [gimp-win, script]
|
||||
artifacts: !reference [gimp-win, artifacts]
|
||||
|
||||
|
||||
## Analysis ##
|
||||
|
||||
file-plug-in-tests:
|
||||
# FIXME: Do we need another job testing this under Windows? MSYS2 usually has
|
||||
# the latest deps. It might be a good idea to test that too, maybe weekly?
|
||||
extends: .debian-x64
|
||||
rules:
|
||||
# Don't run on release since the plug-in doesn't get installed in releases
|
||||
- <<: *CI_MERGE
|
||||
- <<: *CI_COMMIT
|
||||
needs: ["gimp-debian-x64"]
|
||||
stage: analysis
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
GIMP_TESTS_DATA_FOLDER: "$CI_PROJECT_DIR/_data/gimp-test-images/"
|
||||
GIMP_TESTS_LOG_FILE: "$CI_PROJECT_DIR/_log/import-tests.log"
|
||||
REGRESSION_STRING: "Total number of regressions: 0"
|
||||
cache:
|
||||
key: $CI_JOB_NAME
|
||||
paths:
|
||||
- _data
|
||||
script:
|
||||
- API_VER=$(grep GIMP_PKGCONFIG_VERSION _build*/config.h | head -1 | sed 's/^.*"\([^"]*\)"$/\1/')
|
||||
- APP_VER=$(grep GIMP_APP_VERSION _build*/config.h | head -1 | sed 's/^.*"\([^"]*\)"$/\1/')
|
||||
- *ENVIRON
|
||||
- pkg-config --variable=gimplibdir gimp-${API_VER} 2>/dev/null | grep . && PLUG_IN_DIR=$(echo $(pkg-config --variable=gimplibdir gimp-${API_VER})'/plug-ins/')
|
||||
- export PYTHONPATH="${PLUG_IN_DIR}test-file-plug-ins"
|
||||
- export GIMP_TESTS_CONFIG_FILE="${PLUG_IN_DIR}test-file-plug-ins/tests/batch-config.ini"
|
||||
- mkdir _log
|
||||
- mkdir _data && cd _data
|
||||
- git clone --depth=${GIT_DEPTH} https://gitlab.gnome.org/Infrastructure/gimp-test-images.git gimp-test-images
|
||||
- cd ..
|
||||
- cat ${PLUG_IN_DIR}test-file-plug-ins/batch-import-tests.py | gimp-console-${APP_VER} -idf --batch-interpreter python-fu-eval -b - --quit
|
||||
- if [ $(grep -c "${REGRESSION_STRING}" "${GIMP_TESTS_LOG_FILE}") -ne 1 ]; then
|
||||
echo "There are file import regressions. Check the log at ${GIMP_TESTS_LOG_FILE}!";
|
||||
exit 1;
|
||||
fi
|
||||
# FIXME No export testing for now until it's more developed. A limited test
|
||||
# can be done from the plug-in for bmp export.
|
||||
artifacts:
|
||||
paths:
|
||||
- _log/
|
||||
reports:
|
||||
junit: "_log/import-tests.xml"
|
||||
expire_in: 2 days
|
||||
|
||||
meson-health:
|
||||
extends: .default
|
||||
rules:
|
||||
- <<: *CI_MERGE
|
||||
- <<: *CI_COMMIT
|
||||
stage: analysis
|
||||
script:
|
||||
- apt-get update
|
||||
- apt-get install -y git
|
||||
- bash .gitlab/run_meson_health_diff.sh
|
||||
|
||||
clang-format:
|
||||
extends: .default
|
||||
rules:
|
||||
- <<: *CI_MERGE
|
||||
stage: analysis
|
||||
script:
|
||||
- apt-get update
|
||||
- apt-get install -y clang-format
|
||||
git
|
||||
- .gitlab/run_style_check_diff.sh
|
||||
allow_failure: true
|
||||
artifacts:
|
||||
when: on_failure
|
||||
paths:
|
||||
- fetch_upstream.log
|
||||
- fetch_origin.log
|
||||
expire_in: 2 days
|
||||
|
||||
cppcheck:
|
||||
extends: .default
|
||||
rules:
|
||||
- if: '$GIMP_CI_CPPCHECK != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_CPPCHECK.*/'
|
||||
stage: analysis
|
||||
script:
|
||||
- apt-get update
|
||||
- apt-get install -y cppcheck
|
||||
- cppcheck -q -j8 --enable=all --force --output-file=cppcheck.xml --xml --xml-version=2
|
||||
-i _build -i babl -i gegl -i _install -i .local -i .cache -i gimp-x64 .
|
||||
- mkdir report
|
||||
- cppcheck-htmlreport --source-dir=. --title=gimp --file=cppcheck.xml --report-dir=report
|
||||
artifacts:
|
||||
paths:
|
||||
- report/
|
||||
expire_in: 8 days
|
||||
|
||||
|
||||
## Ready-to-distribute ##
|
||||
|
||||
sources-debian:
|
||||
extends: .default
|
||||
rules:
|
||||
- <<: *CI_COMMIT
|
||||
- if: '$GIMP_CI_SOURCES != null'
|
||||
- <<: *CI_RELEASE
|
||||
needs: ["gimp-debian-x64"]
|
||||
stage: distribution
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
script:
|
||||
- mv _build*/meson-dist/gimp-*.tar.xz .
|
||||
- FILENAME=`ls gimp-*.tar.xz` &&
|
||||
sha256sum gimp-*.tar.xz > ${FILENAME}.SHA256SUMS &&
|
||||
sha512sum gimp-*.tar.xz > ${FILENAME}.SHA512SUMS
|
||||
artifacts:
|
||||
paths:
|
||||
- gimp-*.tar.xz
|
||||
- gimp-*.tar.xz.SHA256SUMS
|
||||
- gimp-*.tar.xz.SHA512SUMS
|
||||
expire_in: 2 days
|
||||
|
||||
dev-docs:
|
||||
extends: .default
|
||||
rules:
|
||||
- <<: *CI_COMMIT
|
||||
- if: '$GIMP_CI_SOURCES != null'
|
||||
- <<: *CI_RELEASE
|
||||
needs: ["deps-debian-x64", "gimp-debian-x64"]
|
||||
stage: distribution
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
script:
|
||||
- apt-get update
|
||||
- apt-get install -y xz-utils
|
||||
- export GIMP_PREFIX=$(echo $PWD/_install*)
|
||||
- BABL_VER=$(grep BABL_VERSION babl/_build*/config.h | head -1 | sed 's/^.*"\([^"]*\)"$/\1/') &&
|
||||
BABL_API_VER=$(grep BABL_API_VERSION babl/_build*/config.h | head -1 | sed 's/^.*"\([^"]*\)"$/\1/') &&
|
||||
DIR_NAME=babl-api-docs-$BABL_VER &&
|
||||
mkdir $DIR_NAME &&
|
||||
mv "${GIMP_PREFIX}/share/doc/babl-$BABL_API_VER" $DIR_NAME/ &&
|
||||
TAR_NAME="$DIR_NAME.tar.xz" &&
|
||||
tar --dereference -cJf ${TAR_NAME} $DIR_NAME &&
|
||||
sha256sum $TAR_NAME > ${TAR_NAME}.SHA256SUMS &&
|
||||
sha512sum $TAR_NAME > ${TAR_NAME}.SHA512SUMS
|
||||
- GEGL_MAJ_VER=$(grep GEGL_MAJOR_VERSION gegl/_build*/config.h |head -1 |sed 's/^[^0-9]*\([0-9]*\).*$/\1/') &&
|
||||
GEGL_MIN_VER=$(grep GEGL_MINOR_VERSION gegl/_build*/config.h |head -1 |sed 's/^[^0-9]*\([0-9]*\).*$/\1/') &&
|
||||
GEGL_MIC_VER=$(grep GEGL_MICRO_VERSION gegl/_build*/config.h |head -1 |sed 's/^[^0-9]*\([0-9]*\).*$/\1/') &&
|
||||
GEGL_VER="$GEGL_MAJ_VER.$GEGL_MIN_VER.$GEGL_MIC_VER" &&
|
||||
GEGL_API_VER="$GEGL_MAJ_VER.$GEGL_MIN_VER" &&
|
||||
DIR_NAME=gegl-api-docs-$GEGL_VER &&
|
||||
mkdir $DIR_NAME &&
|
||||
mv "${GIMP_PREFIX}/share/doc/gegl-$GEGL_API_VER" $DIR_NAME/ &&
|
||||
TAR_NAME="$DIR_NAME.tar.xz" &&
|
||||
tar --dereference -cJf ${TAR_NAME} $DIR_NAME &&
|
||||
sha256sum $TAR_NAME > ${TAR_NAME}.SHA256SUMS &&
|
||||
sha512sum $TAR_NAME > ${TAR_NAME}.SHA512SUMS
|
||||
- GIMP_VER=$(grep GIMP_VERSION _build*/config.h | head -1 | sed 's/^.*"\([^"]*\)"$/\1/') &&
|
||||
APP_VER=$(echo $GIMP_VER | sed 's/\([0-9]\+\.[0-9]\+\)\..*/\1/') &&
|
||||
DIR_NAME=gimp-api-docs-$GIMP_VER &&
|
||||
mkdir $DIR_NAME &&
|
||||
mv "${GIMP_PREFIX}/share/doc/gimp-$APP_VER" $DIR_NAME/reference &&
|
||||
TAR_NAME="$DIR_NAME.tar.xz" &&
|
||||
tar --dereference -cJf ${TAR_NAME} $DIR_NAME &&
|
||||
sha256sum $TAR_NAME > ${TAR_NAME}.SHA256SUMS &&
|
||||
sha512sum $TAR_NAME > ${TAR_NAME}.SHA512SUMS
|
||||
artifacts:
|
||||
paths:
|
||||
- babl-api-docs-*.tar.xz
|
||||
- babl-api-docs-*.tar.xz.SHA256SUMS
|
||||
- babl-api-docs-*.tar.xz.SHA512SUMS
|
||||
- gegl-api-docs-*.tar.xz
|
||||
- gegl-api-docs-*.tar.xz.SHA256SUMS
|
||||
- gegl-api-docs-*.tar.xz.SHA512SUMS
|
||||
- gimp-api-docs-*.tar.xz
|
||||
- gimp-api-docs-*.tar.xz.SHA256SUMS
|
||||
- gimp-api-docs-*.tar.xz.SHA512SUMS
|
||||
expire_in: 2 days
|
||||
|
||||
dist-appimage-weekly:
|
||||
extends: .default
|
||||
rules:
|
||||
- !reference [.debian, rules]
|
||||
needs: ["gimp-debian"]
|
||||
stage: distribution
|
||||
script:
|
||||
- bash build/linux/appimage/3_dist-gimp-goappimage.sh
|
||||
artifacts:
|
||||
expose_as: 'Linux appimage'
|
||||
paths:
|
||||
- build/linux/appimage/_Output/
|
||||
expire_in: 8 days
|
||||
|
||||
include:
|
||||
project: 'GNOME/citemplates'
|
||||
file: 'flatpak/flatpak_ci_initiative.yml'
|
||||
|
||||
dist-flatpak-weekly:
|
||||
extends:
|
||||
- .default
|
||||
- .publish_nightly
|
||||
rules:
|
||||
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Flatpak.*/'
|
||||
interruptible: true
|
||||
- if: '$GIMP_CI_FLATPAK != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_FLATPAK.*/'
|
||||
needs: ["gimp-flatpak-x64"]
|
||||
stage: distribution
|
||||
script:
|
||||
- bash build/linux/flatpak/3_dist-gimp-flatpak.sh
|
||||
artifacts:
|
||||
expose_as: 'Linux flatpak'
|
||||
paths:
|
||||
- build/linux/flatpak/_Output/
|
||||
expire_in: 8 days
|
||||
|
||||
dist-installer-weekly:
|
||||
extends: .default
|
||||
rules:
|
||||
- !reference [.win, rules]
|
||||
needs: ["gimp-win", "gimp-win-x86"]
|
||||
stage: distribution
|
||||
tags:
|
||||
- windows-aarch64
|
||||
variables:
|
||||
MSYS_ROOT: 'C:/msys64'
|
||||
script:
|
||||
- build/windows/installer/3_dist-gimp-inno.ps1
|
||||
artifacts:
|
||||
expose_as: 'Windows exe'
|
||||
paths:
|
||||
- build/windows/installer/_Output/
|
||||
- inno.log
|
||||
expire_in: 8 days
|
||||
|
||||
dist-store-weekly:
|
||||
extends: .default
|
||||
rules:
|
||||
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Microsoft Store.*/'
|
||||
interruptible: true
|
||||
- if: '$GIMP_CI_MS_STORE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_MS_STORE.*/'
|
||||
- <<: *CI_RELEASE
|
||||
needs: ["gimp-win"]
|
||||
stage: distribution
|
||||
tags:
|
||||
- win32-ps
|
||||
script:
|
||||
- build\windows\store\3_dist-gimp-winsdk.ps1
|
||||
artifacts:
|
||||
expose_as: 'Windows msix'
|
||||
paths:
|
||||
- build/windows/store/_Output/
|
||||
- winsdk.log
|
||||
expire_in: 8 days
|
49
.gitlab/issue_templates/Default.md
Normal file
49
.gitlab/issue_templates/Default.md
Normal file
|
@ -0,0 +1,49 @@
|
|||
<!-- ⚠️ IMPORTANT: READ ME! ⚠️
|
||||
This is the default template for bug reports.
|
||||
For feature requests or performance issues, please switch instead to the appropriate template in the "Choose a template" list.
|
||||
|
||||
It is important that you fill all the fields of the template.
|
||||
|
||||
There are a few issues we get reports about quite frequently. If you want to check if what you have encountered is among these, please see:
|
||||
https://gitlab.gnome.org/GNOME/gimp/-/issues/?sort=updated_desc&state=all&label_name%5B%5D=Duplication%20target&first_page_size=100
|
||||
|
||||
**Code of Conduct**: "Be considerate and respectful" is our main rule.
|
||||
E.g. avoid negative emotional writing which only generates more upsetting
|
||||
interactions. Thanks!
|
||||
-->
|
||||
|
||||
### Environment/Versions
|
||||
|
||||
- GIMP version number:
|
||||
- Package: <!--[flatpak? Installer from gimp.org? If another installer, tell us where from] (write it after the > symbol)-->
|
||||
- Operating System: <!--[Windows? macOS? Linux? All? Add OS versions too] (write it after the > symbol) -->
|
||||
- (if Linux) Display system: <!--[X11? Wayland? Which compositor and version?] (write it after the > symbol) -->
|
||||
|
||||
<!--Note: bug reporters are expected to have verified the bug still exists
|
||||
either in the last stable version of GIMP or on updated development code
|
||||
(master branch).-->
|
||||
|
||||
### Description of the bug
|
||||
|
||||
<!--Please describe your issue with details.
|
||||
Add full (not cropped) screenshots or other files if needed.(write it after the > symbol)-->
|
||||
|
||||
### Reproduction
|
||||
|
||||
Is the bug reproducible? <!--[Always / Randomly / Happened only once ] (write it after the > symbol)-->
|
||||
|
||||
Reproduction steps:
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
…
|
||||
|
||||
Expected result:
|
||||
|
||||
Actual result:
|
||||
|
||||
### Additional information
|
||||
|
||||
If you have a backtrace for a crash or a warning, paste it here.
|
17
.gitlab/issue_templates/feature.md
Normal file
17
.gitlab/issue_templates/feature.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
**Operating System:** <!--[Windows? macOS? Linux? All?] (write it after the > symbol) -->
|
||||
|
||||
### Description of the feature
|
||||
|
||||
<!-- Please describe your feature with details. Also:
|
||||
- If the feature is UI-related, please DO NOT REPORT HERE but on
|
||||
gimp-ux: https://gitlab.gnome.org/Teams/GIMP/Design/gimp-ux/-/issues;
|
||||
- If the feature is about some image file format on GIMP, first check if it
|
||||
is not already listed on https://developer.gimp.org/core/standards/images,
|
||||
then you can make the request, ideally linking relevant resources (e.g. specs);
|
||||
- If you have a patch, see: https://developer.gimp.org/core/submit-patch/ -->
|
||||
|
||||
### Use cases
|
||||
|
||||
<!-- Explain the use cases or problems to solve.
|
||||
If you are unsure, you should first discuss with the community in the forums
|
||||
or talk with the developers on IRC: https://www.gimp.org/discuss.html -->
|
34
.gitlab/issue_templates/performance.md
Normal file
34
.gitlab/issue_templates/performance.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
### Environment/Versions
|
||||
|
||||
- GIMP Version:
|
||||
- Package: <!--[flatpak? Installer from gimp.org? If another installer, tell us where from] (write it after the > symbol)-->
|
||||
- Operating System: <!--[Windows? macOS? Linux? All?] (write it after the > symbol) -->
|
||||
|
||||
<!-- Note: bug reporters are expected to have verified the bug still exists
|
||||
either in the last stable version of GIMP or on updated development code
|
||||
(master branch). -->
|
||||
|
||||
### Issue Description
|
||||
|
||||
<!-- Please provide a general description of the issue. -->
|
||||
|
||||
### Performance Log
|
||||
|
||||
<!-- Please record a performance log demonstrating the issue, and attach it to the report.
|
||||
For more information, see
|
||||
|
||||
https://developer.gimp.org/core/debug/performance-logs/
|
||||
|
||||
-->
|
||||
|
||||
### Performance Log Description
|
||||
|
||||
<!-- Please describe in detail the actions performed in the performance log.
|
||||
If you added empty event markers to the log, please provide a description for them here.
|
||||
If you recorded a screencast while recording the log, please attach it here. -->
|
||||
|
||||
### Additional Information
|
||||
|
||||
<!-- If there is any additional information, please provide it here. -->
|
||||
|
||||
/label ~"1. Performance"
|
12
.gitlab/merge_request_templates/default.md
Normal file
12
.gitlab/merge_request_templates/default.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
<!-- Contribution guidelines:
|
||||
|
||||
- Follow our coding style, which is mostly the GNU coding style
|
||||
with some specificities: see [Coding Style](https://developer.gimp.org/core/coding_style/).
|
||||
|
||||
- Make sure no trailing spaces or tabs are left out.
|
||||
|
||||
- Check the following option when making your request:
|
||||
"*Allow commits from members who can merge to the target branch.*"
|
||||
|
||||
- No AI-generated contents allowed (neither code nor text, images…).
|
||||
Only human created works please! -->
|
167
.gitlab/run_meson_health_diff.sh
Normal file
167
.gitlab/run_meson_health_diff.sh
Normal file
|
@ -0,0 +1,167 @@
|
|||
#!/bin/bash
|
||||
|
||||
source .gitlab/search-common-ancestor.sh
|
||||
|
||||
diff=$(git diff -U0 --no-color "${newest_common_ancestor_sha}" -- '*.build' '*.py' | grep -E '^\+[^+]' | sed 's/^+//')
|
||||
|
||||
|
||||
#List of commonly used utilities on Unix world
|
||||
#See the context: https://gitlab.gnome.org/GNOME/gimp/-/issues/11385
|
||||
coreutils_array=(
|
||||
".sh"
|
||||
"'sh'"
|
||||
"'bash'"
|
||||
"'\['"
|
||||
"'arch'"
|
||||
"'awk'"
|
||||
"'b2sum'"
|
||||
"'base32'"
|
||||
"'base64'"
|
||||
"'basename'"
|
||||
"'basenc'"
|
||||
"'cat'"
|
||||
"'chcon'"
|
||||
"'chgrp'"
|
||||
"'chmod'"
|
||||
"'chown'"
|
||||
"'chroot'"
|
||||
"'cksum'"
|
||||
"'cmp'"
|
||||
"'comm'"
|
||||
"'cp'"
|
||||
"'csplit'"
|
||||
"'cut'"
|
||||
"'date'"
|
||||
"'dd'"
|
||||
"'df'"
|
||||
"'diff'"
|
||||
"'dir'"
|
||||
"'dircolors'"
|
||||
"'dirname'"
|
||||
"'du'"
|
||||
"'echo'"
|
||||
"'env'"
|
||||
"'expand'"
|
||||
"'expr'"
|
||||
"'factor'"
|
||||
"'false'"
|
||||
"'find'"
|
||||
"'fmt'"
|
||||
"'fold'"
|
||||
"'gkill'"
|
||||
"'grep'"
|
||||
"'groups'"
|
||||
"'head'"
|
||||
"'hostid'"
|
||||
"'hostname'"
|
||||
"'id'"
|
||||
"'install'"
|
||||
"'join'"
|
||||
"'link'"
|
||||
"'ln'"
|
||||
"'logname'"
|
||||
"'ls'"
|
||||
"'md5sum'"
|
||||
"'mkdir'"
|
||||
"'mkfifo'"
|
||||
"'mknod'"
|
||||
"'mktemp'"
|
||||
"'mv'"
|
||||
"'nice'"
|
||||
"'nl'"
|
||||
"'nohup'"
|
||||
"'nproc'"
|
||||
"'numfmt'"
|
||||
"'od'"
|
||||
"'paste'"
|
||||
"'pathchk'"
|
||||
"'pinky'"
|
||||
"'pr'"
|
||||
"'printenv'"
|
||||
"'printf'"
|
||||
"'ptx'"
|
||||
"'pwd'"
|
||||
"'readlink'"
|
||||
"'realpath'"
|
||||
"'rm'"
|
||||
"'rmdir'"
|
||||
"'runcon'"
|
||||
"'sed'"
|
||||
"'seq'"
|
||||
"'sha1sum'"
|
||||
"'sha224sum'"
|
||||
"'sha256sum'"
|
||||
"'sha384sum'"
|
||||
"'sha512sum'"
|
||||
"'shred'"
|
||||
"'shuf'"
|
||||
"'sleep'"
|
||||
"'sort'"
|
||||
"'split'"
|
||||
"'stat'"
|
||||
"'stdbuf'"
|
||||
"'stty'"
|
||||
"'sum'"
|
||||
"'sync'"
|
||||
"'tac'"
|
||||
"'tail'"
|
||||
"'tee'"
|
||||
"'test'"
|
||||
"'timeout'"
|
||||
"'touch'"
|
||||
"'tr'"
|
||||
"'true'"
|
||||
"'truncate'"
|
||||
"'tsort'"
|
||||
"'tty'"
|
||||
"'uname'"
|
||||
"'unexpand'"
|
||||
"'uniq'"
|
||||
"'unlink'"
|
||||
"'users'"
|
||||
"'vdir'"
|
||||
"'wc'"
|
||||
"'who'"
|
||||
"'whoami'"
|
||||
"'yes'"
|
||||
)
|
||||
|
||||
for coreutil in "${coreutils_array[@]}"; do
|
||||
if echo "$diff" | grep -q "$coreutil"; then
|
||||
found_coreutils+=" $coreutil"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$found_coreutils" ]; then
|
||||
echo -e '\033[31m(ERROR)\033[0m: Seems that you are trying to add an Unix-specific dependency to be called by Meson.'
|
||||
echo " Please, port to Python (which is crossplatform), your use of:${found_coreutils}."
|
||||
fi
|
||||
|
||||
|
||||
#Limited list of commonly used utilities on Windows world
|
||||
ntutils_array=(
|
||||
".bat"
|
||||
".cmd"
|
||||
".ps1"
|
||||
"'cmd'"
|
||||
"'powershell'"
|
||||
)
|
||||
|
||||
for ntutil in "${ntutils_array[@]}"; do
|
||||
if echo "$diff" | grep -q "$ntutil"; then
|
||||
found_ntutils+=" $ntutil"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$found_ntutils" ]; then
|
||||
echo -e '\033[31m(ERROR)\033[0m: Seems that you are trying to add a NT-specific dependency to be called by Meson.'
|
||||
echo " Please, port to Python (which is crossplatform), your use of:${found_ntutils}."
|
||||
fi
|
||||
|
||||
|
||||
if [ "$found_coreutils" ] || [ "$found_ntutils" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 'Meson .build files are alright regarding crossplatform.'
|
||||
exit 0
|
30
.gitlab/run_style_check_diff.sh
Executable file
30
.gitlab/run_style_check_diff.sh
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
ancestor_horizon=28 # days (4 weeks)
|
||||
|
||||
echo ""
|
||||
echo "This script may be wrong. You may disregard it if it conflicts with"
|
||||
echo "https://gitlab.gnome.org/GNOME/gimp/-/blob/master/CODING_STYLE.md"
|
||||
|
||||
clang-format --version
|
||||
|
||||
# Wrap everything in a subshell so we can propagate the exit status.
|
||||
(
|
||||
|
||||
source .gitlab/search-common-ancestor.sh
|
||||
|
||||
git diff -U0 --no-color "${newest_common_ancestor_sha}" | clang-format-diff -p1 > format-diff.log
|
||||
)
|
||||
exit_status=$?
|
||||
|
||||
[ ${exit_status} == 0 ] || exit ${exit_status}
|
||||
|
||||
format_diff="$(<format-diff.log)"
|
||||
|
||||
if [ -n "${format_diff}" ]; then
|
||||
cat format-diff.log
|
||||
exit 1
|
||||
fi
|
||||
|
39
.gitlab/search-common-ancestor.sh
Normal file
39
.gitlab/search-common-ancestor.sh
Normal file
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
ancestor_horizon=28 # days (4 weeks)
|
||||
|
||||
# We need to add a new remote for the upstream target branch, since this script
|
||||
# could be running in a personal fork of the repository which has out of date
|
||||
# branches.
|
||||
#
|
||||
# Limit the fetch to a certain date horizon to limit the amount of data we get.
|
||||
# If the branch was forked from origin/main before this horizon, it should
|
||||
# probably be rebased.
|
||||
if ! git ls-remote --exit-code upstream >/dev/null 2>&1 ; then
|
||||
git remote add upstream https://gitlab.gnome.org/GNOME/gimp.git
|
||||
fi
|
||||
git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%d)" upstream &> ./fetch_upstream.log
|
||||
|
||||
# Work out the newest common ancestor between the detached HEAD that this CI job
|
||||
# has checked out, and the upstream target branch (which will typically be
|
||||
# `upstream/main` or `upstream/glib-2-62`).
|
||||
# `${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}` or `${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}`
|
||||
# are only defined if we’re running in a merge request pipeline,
|
||||
# fall back to `${CI_DEFAULT_BRANCH}` or `${CI_COMMIT_BRANCH}` respectively
|
||||
# otherwise.
|
||||
|
||||
# add patch-origin
|
||||
git remote add patch-origin ${CI_MERGE_REQUEST_SOURCE_PROJECT_URL:-${CI_PROJECT_URL}}
|
||||
|
||||
source_branch="${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-${CI_COMMIT_BRANCH}}"
|
||||
git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%d)" patch-origin "${source_branch}" &> ./fetch_origin.log
|
||||
|
||||
newest_common_ancestor_sha=$(diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "upstream/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_DEFAULT_BRANCH}}") <(git rev-list --first-parent "patch-origin/${source_branch}") | head -1)
|
||||
if [ -z "${newest_common_ancestor_sha}" ]; then
|
||||
echo "Couldn’t find common ancestor with upstream main branch. This typically"
|
||||
echo "happens if you branched from main a long time ago. Please update"
|
||||
echo "your clone, rebase, and re-push your branch."
|
||||
exit 1
|
||||
fi
|
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
[submodule "gimp-data"]
|
||||
path = gimp-data
|
||||
url = https://gitlab.gnome.org/GNOME/gimp-data.git
|
||||
shallow = true
|
4
.kateconfig
Normal file
4
.kateconfig
Normal file
|
@ -0,0 +1,4 @@
|
|||
kate: indent-mode cstyle;
|
||||
kate: indent-width 2; tab-width 8;
|
||||
kate: tab-indents off; replace-tabs on;
|
||||
kate: remove-trailing-spaces modified;
|
11
.vscode/settings.json
vendored
Normal file
11
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"C_Cpp.clang_format_fallbackStyle": "GNU",
|
||||
"editor.rulers": [
|
||||
80
|
||||
],
|
||||
"editor.tabSize": 2,
|
||||
"editor.renderControlCharacters": true,
|
||||
"editor.renderWhitespace": "trailing",
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"files.eol": "\n"
|
||||
}
|
402
AUTHORS
Normal file
402
AUTHORS
Normal file
|
@ -0,0 +1,402 @@
|
|||
-- This file is generated from authors.xml, do not edit it directly. --
|
||||
|
||||
GIMP was originally written by:
|
||||
|
||||
Spencer Kimball
|
||||
Peter Mattis
|
||||
|
||||
|
||||
The current maintainers are:
|
||||
|
||||
Michael Natterer
|
||||
Jehan
|
||||
|
||||
|
||||
The following people have contributed code to GIMP:
|
||||
|
||||
Lauri Alanko
|
||||
Fredrik Alströmer
|
||||
Shawn Amundson
|
||||
Sven Anders
|
||||
Henrik Brix Andersen
|
||||
Karl-Johan Andersson
|
||||
Rob Antonishen
|
||||
Nicola Archibald
|
||||
Timm Bäder
|
||||
Luis Barrancos
|
||||
Jerry Baker
|
||||
John Beale
|
||||
Zach Beane
|
||||
Tom Bech
|
||||
Daniel P. Berrange
|
||||
Marc Bless
|
||||
Edward Blevins
|
||||
Reagan Blundell
|
||||
Jacob Boerema
|
||||
Hendrik Boom
|
||||
Xavier Bouchoux
|
||||
Richard Bowers
|
||||
Roberto Boyd
|
||||
Stanislav Brabec
|
||||
Hans Breuer
|
||||
Simon Budig
|
||||
João S. O. Bueno
|
||||
Seth Burgess
|
||||
Brent Burton
|
||||
Francisco Bustamante
|
||||
Albert Cahalan
|
||||
George J. Carrette
|
||||
Marco Ciampa
|
||||
Sean Cier
|
||||
Winston Chang
|
||||
Stephane Chauveau
|
||||
Zbigniew Chyla
|
||||
Lars-Peter Clausen
|
||||
Sven Claussner
|
||||
Branko Collin
|
||||
Ed Connel
|
||||
Piers Cornwell
|
||||
David Costanzo
|
||||
Daniel Cotting
|
||||
Jay Cox
|
||||
Kevin Cozens
|
||||
Jeremiah Darais
|
||||
Shubham Daule
|
||||
Michael Deal
|
||||
Alexia Death
|
||||
Brian Degenhardt
|
||||
Karine Delvare
|
||||
Andreas Dilger
|
||||
Nicholas Doyle
|
||||
Austin Donnelly
|
||||
Scott Draves
|
||||
Daniel Dunbar
|
||||
Marek Dvoroznak
|
||||
Misha Dynin
|
||||
Daniel Eddeland
|
||||
Daniel Egger
|
||||
Ulf-D. Ehlert
|
||||
Gil Eliyahu
|
||||
Tobias Ellinghaus
|
||||
Ell
|
||||
Morton Eriksen
|
||||
Larry Ewing
|
||||
Dirk Farin
|
||||
Idriss Fekir
|
||||
Pedro Alonso Ferrer
|
||||
Nick Fetchak
|
||||
Piotr Filiciak
|
||||
Shlomi Fish
|
||||
Sylvain Foret
|
||||
David Forsyth
|
||||
Raphael Francois
|
||||
Gerald Friedland
|
||||
Jochen Friedrich
|
||||
Daniel Richard G
|
||||
Jordi Gay
|
||||
Jim Geuther
|
||||
GG
|
||||
Graeme Gill
|
||||
Pedro Gimeno
|
||||
Richard Gitschlag
|
||||
Scott Goehring
|
||||
Heiko Goller
|
||||
Marcelo de Gomensoro Malheiros
|
||||
Saul Goode
|
||||
David Gowers
|
||||
Niels De Graef
|
||||
Cameron Gregory
|
||||
Stanislav Grinkov
|
||||
Eric Grivel
|
||||
Stephen Griffiths
|
||||
Pavel Grinfeld
|
||||
Dov Grobgeld
|
||||
Michael Hammel
|
||||
Julien Hardelin
|
||||
Tim Harder
|
||||
Marcus Heese
|
||||
Robert Helgesson
|
||||
Michael Henning
|
||||
James Henstridge
|
||||
Eric Hernes
|
||||
Lukasz Hladowski
|
||||
David Hodson
|
||||
Christoph Hoegl
|
||||
Wolfgang Hofer
|
||||
Éric Hoffman
|
||||
Patrick Horgan
|
||||
Alan Horkan
|
||||
Daniel Hornung
|
||||
Christopher Howard
|
||||
Jan Hubička
|
||||
Alexander Hämmerle
|
||||
HJ Imbens
|
||||
Barak Itkin
|
||||
Ben Jackson
|
||||
Tim Janik
|
||||
Kristian Jantz
|
||||
Javier Jardón
|
||||
Tim Jedlicka
|
||||
Róman Joost
|
||||
Alexander Jones
|
||||
Geert Jordaens
|
||||
Aurimas Juška
|
||||
Povilas Kanapickas
|
||||
Malay Keshav
|
||||
Andrew Kieschnick
|
||||
Peter Kirchgessner
|
||||
Philipp Klaus
|
||||
David Koblas
|
||||
Daniel Kobras
|
||||
Øyvind Kolås
|
||||
Lloyd Konneker
|
||||
Robert L Krawitz
|
||||
Kretynofil
|
||||
Christian Krippendorf
|
||||
Hartmut Kuhse
|
||||
Tuomas Kuosmanen
|
||||
Olof S Kylander
|
||||
Philip Lafleur
|
||||
Chris Lahey
|
||||
Eric Lamarque
|
||||
Nick Lamb
|
||||
Marco Lamberto
|
||||
Jens Lautenbacher
|
||||
Laramie Leavitt
|
||||
Roman Lebedev
|
||||
Tom Lechner
|
||||
Elliot Lee
|
||||
Marc Lehmann
|
||||
Simone Karin Lehmann
|
||||
Ray Lehtiniemi
|
||||
Tobias Lenz
|
||||
Frederic Leroy
|
||||
Raph Levien
|
||||
Bruno Lopes
|
||||
Wing Tung Leung
|
||||
Dave Lichterman
|
||||
Adrian Likins
|
||||
lillolollo
|
||||
Tor Lillqvist
|
||||
Ingo Lütkebohle
|
||||
Nikc M.
|
||||
Josh MacDonald
|
||||
Ed Mackey
|
||||
Vidar Madsen
|
||||
Mikael Magnusson
|
||||
Luidnel Maignan
|
||||
Ian Main
|
||||
Thomas Manni
|
||||
Kjartan Maraas
|
||||
John Marshall
|
||||
Kelly Martin
|
||||
Torsten Martinsen
|
||||
Pascal Massimino
|
||||
Johannes Matschke
|
||||
Takeshi Matsuyama
|
||||
Gordon Matzigkeit
|
||||
Téo Mazars
|
||||
Robert McHardy
|
||||
Gregory McLean
|
||||
Richard McLean
|
||||
Jörn Meier
|
||||
Mike Melancon
|
||||
Federico Mena Quintero
|
||||
Loren Merritt
|
||||
Jim Meyer
|
||||
James Mitchell
|
||||
Hirotsuna Mizuno
|
||||
Chris Mohler
|
||||
Chris Moller
|
||||
David Monniaux
|
||||
Christopher Montgomery
|
||||
Tim Mooney
|
||||
Adam D Moss
|
||||
Simon Müller
|
||||
Tobias Mueller
|
||||
Michael Muré
|
||||
Lionel N.
|
||||
Balazs Nagy
|
||||
Yukihiro Nakai
|
||||
Shuji Narazaki
|
||||
Felix Natter
|
||||
David Neary
|
||||
David Necas
|
||||
Sven Neumann
|
||||
Andreas Neustifter
|
||||
Tim Newsome
|
||||
Jon Nordby
|
||||
Martin Nordholts
|
||||
Stephen Robert Norris
|
||||
Daniel Novomeský
|
||||
Erik Nygren
|
||||
Miles O'Neal
|
||||
Lukas Oberhuber
|
||||
David Odin
|
||||
Nelson A. de Oliveira
|
||||
Victor Oliveira
|
||||
Yoshio Ono
|
||||
Thom van Os
|
||||
Garry R. Osgood
|
||||
Nathan Osman
|
||||
Benjamin Otte
|
||||
Petr Ovtchenkov
|
||||
Alan Paeth
|
||||
Jay Painter
|
||||
Juan Palacios
|
||||
Ville Pätsi
|
||||
Akkana Peck
|
||||
Asbjorn Pettersen
|
||||
Félix Piédallu
|
||||
Mike Phillips
|
||||
Nils Philippsen
|
||||
Ari Pollak
|
||||
Mircea Purdea
|
||||
Liam Quin
|
||||
Raphaël Quinet
|
||||
John Ralls
|
||||
Dennis Ranke
|
||||
Tom Rathborne
|
||||
Debarshi Ray
|
||||
Martin Renold
|
||||
Jens Restemeier
|
||||
Kristian Rietveld
|
||||
Maurits Rijk
|
||||
Daniel Risacher
|
||||
Clarence Risher
|
||||
Gilles Rochefort
|
||||
James Robinson
|
||||
Stefan Röllin
|
||||
Guillermo S. Romero
|
||||
Marco Rossini
|
||||
Tim Rowley
|
||||
Karthikeyan S
|
||||
Daniel Sabo
|
||||
Oleksii Samorukov
|
||||
Mike Schaeffer
|
||||
John Schlag
|
||||
Norbert Schmitz
|
||||
Thorsten Schnier
|
||||
Enrico Schröder
|
||||
Alexander Schulz
|
||||
Michael Schumacher
|
||||
Tracy Scott
|
||||
Craig Setera
|
||||
Elad Shahar
|
||||
shark0r
|
||||
Peter Sikking
|
||||
RyōTa SimaMoto
|
||||
Ted Shaneyfelt
|
||||
Aaron Sherman
|
||||
SHIRAKAWA Akira
|
||||
Jernej Simončič
|
||||
Manish Singh
|
||||
Mukund Sivaraman
|
||||
William Skaggs
|
||||
Daniel Skarda
|
||||
Ville Sokk
|
||||
Kevin Sookocheff
|
||||
Adam Spiers
|
||||
Jakub Steiner
|
||||
Omari Stephens
|
||||
Tobias Stoeckmann
|
||||
Elle Stone
|
||||
Nathan Summers
|
||||
Mike Sweet
|
||||
Bogdan Szczurek
|
||||
Eiichi Takamori
|
||||
Tal Trachtman
|
||||
Tristan Tarrant
|
||||
Michael Taylor
|
||||
Owen Taylor
|
||||
Ian Tester
|
||||
Andy Thomas
|
||||
Mason Thomas
|
||||
Benoit Touchette
|
||||
Patrice Tremblay
|
||||
Kevin Turner
|
||||
Andreas Turtschan
|
||||
Massimo Valentini
|
||||
Brion Vibber
|
||||
Helvetix Victorinox
|
||||
Thorsten Vollmer
|
||||
Clayton Walker
|
||||
Rebecca Walter
|
||||
Martin Weber
|
||||
Rupert Weber
|
||||
James Wang
|
||||
Kris Wehner
|
||||
Nigel Wetten
|
||||
Alexis Wilhelm
|
||||
Calvin Williamson
|
||||
Matthew Wilson
|
||||
woob
|
||||
Karl Günter Wünsch
|
||||
Andrew Wyatt
|
||||
Yoshinori Yamakawa
|
||||
Shirasaki Yasuhiro
|
||||
Mihail Zenkov
|
||||
Zhenfeng Zhao
|
||||
Simon Zilliken
|
||||
Przemyslaw Zych
|
||||
Robert Ögren
|
||||
|
||||
|
||||
The following people have contributed art to GIMP:
|
||||
|
||||
Lapo Calamandrei
|
||||
Paul Davey
|
||||
Patrick David
|
||||
Alexia Death
|
||||
Aurore Derriennic
|
||||
Philipp Haegi
|
||||
Aryeom Han
|
||||
Tuomas Kuosmanen
|
||||
Karl La Rocca
|
||||
Andreas Nilsson
|
||||
Ville Pätsi
|
||||
Denis Rangelov
|
||||
Mike Schaeffer
|
||||
Sevenix
|
||||
Carol Spears
|
||||
Klaus Staedtler
|
||||
Jakub Steiner
|
||||
William Szilveszter
|
||||
|
||||
|
||||
The following people have helped to document GIMP:
|
||||
|
||||
Ignacio AntI
|
||||
Žygimantas Beručka
|
||||
Jacob Boerema
|
||||
Carey Bunks
|
||||
Marco Ciampa
|
||||
Sven Claussner
|
||||
Patrick David
|
||||
Dust
|
||||
Ulf-D. Ehlert
|
||||
Alessandro Falappa
|
||||
Jakub Friedl
|
||||
Niels De Graef
|
||||
Michael Hammel
|
||||
Julien Hardelin
|
||||
Simon Janes
|
||||
Róman Joost
|
||||
Hans de Jonge
|
||||
Lloyd Konneker
|
||||
Semka Kuloviæ-Debals
|
||||
Karin Kylander
|
||||
Olof S Kylander
|
||||
Jean-Pierre Litzler
|
||||
Vitaly Lomov
|
||||
Ed Mackey
|
||||
Ian Main
|
||||
Akkana Peck
|
||||
Pierre Perrier
|
||||
Alexandre Prokoudine
|
||||
Manuel Quiñones
|
||||
James Robinson
|
||||
Nickolay V. Shmyrev
|
||||
Patrycja Stawiarska
|
||||
Kolbjørn Stuestøl
|
||||
Axel Wernicke
|
674
COPYING
Normal file
674
COPYING
Normal file
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/philosophy/why-not-lgpl.html>.
|
3329
ChangeLog.pre-1-0
Normal file
3329
ChangeLog.pre-1-0
Normal file
File diff suppressed because it is too large
Load diff
28795
ChangeLog.pre-1-2
Normal file
28795
ChangeLog.pre-1-2
Normal file
File diff suppressed because it is too large
Load diff
61186
ChangeLog.pre-2-0
Normal file
61186
ChangeLog.pre-2-0
Normal file
File diff suppressed because it is too large
Load diff
21166
ChangeLog.pre-2-2
Normal file
21166
ChangeLog.pre-2-2
Normal file
File diff suppressed because it is too large
Load diff
42277
ChangeLog.pre-2-4
Normal file
42277
ChangeLog.pre-2-4
Normal file
File diff suppressed because it is too large
Load diff
16113
ChangeLog.pre-2-6
Normal file
16113
ChangeLog.pre-2-6
Normal file
File diff suppressed because it is too large
Load diff
5959
ChangeLog.pre-git
Normal file
5959
ChangeLog.pre-git
Normal file
File diff suppressed because it is too large
Load diff
497
INSTALL
Normal file
497
INSTALL
Normal file
|
@ -0,0 +1,497 @@
|
|||
--------------------------------------
|
||||
Installation instructions for GIMP 3.0
|
||||
--------------------------------------
|
||||
|
||||
There are some basic steps to building and installing GIMP.
|
||||
|
||||
GIMP 3.0 replaces earlier GIMP 2.10.x versions. It is advised to
|
||||
uninstall them before installing GIMP 3.0. Since libgimp* libraries
|
||||
and data are all versioned anyway, it is possible to keep your older
|
||||
GIMP 2.x installation in parallel to GIMP 3.0 on a same prefix.
|
||||
|
||||
GIMP 3.0 is not backward compatible with GIMP 2.10 and earlier
|
||||
versions. Plug-ins and scripts written for GIMP 2.10, 2.8, 2.6 or
|
||||
earlier GIMP 2.x versions will not work because the API changed.
|
||||
|
||||
The most important part is to make sure the requirements for a build
|
||||
are fulfilled. We depend on a number of tools and libraries which are
|
||||
listed below. For libraries this means you need to also have the
|
||||
header files installed.
|
||||
|
||||
This file is generated (versions are filled by our build system) and
|
||||
focuses on keeping an up-to-date list of dependencies intended to
|
||||
packagers, contributors or whoever wants to compile GIMP from source.
|
||||
Building and running self-built software often requires more setup, in
|
||||
particular environment variables so that your system knows where to
|
||||
find the various pieces of the software. The following document can
|
||||
help in that regard:
|
||||
|
||||
https://developer.gimp.org/core/setup/build/
|
||||
|
||||
|
||||
******************************************************************
|
||||
* Unless you are experienced with building software from source, *
|
||||
* you should not attempt to build all these libraries yourself! *
|
||||
* We suggest that you check if your distributor has development *
|
||||
* packages of them and use these instead. *
|
||||
******************************************************************
|
||||
|
||||
|
||||
1. You need to have installed a recent version of pkg-config available from:
|
||||
|
||||
https://www.freedesktop.org/software/pkgconfig/
|
||||
|
||||
The compatible pkgconf utility would also work.
|
||||
|
||||
2. You need gettext version 0.19.8 or newer. Older versions did not have support yet
|
||||
for certain file formats.
|
||||
|
||||
3. You need to have GEGL version 0.4.62 or newer and babl version
|
||||
0.1.114 or newer. You can get them from https://gegl.org/ or clone
|
||||
them from the GNOME git repository:
|
||||
|
||||
https://gitlab.gnome.org/GNOME/babl.git
|
||||
https://gitlab.gnome.org/GNOME/gegl.git
|
||||
|
||||
GEGL must be built with Cairo support, i.e. -Dcairo=enabled option (required
|
||||
for some mandatory operations such as "gegl:npd").
|
||||
|
||||
Introspection must be enabled for both babl and GEGL with -Denable-gir=true
|
||||
and -Dintrospection=true respectively. The only case where we don't build
|
||||
GIR data is when cross-compiling because of the difficulty to make cross-tools
|
||||
for GObject Introspection.
|
||||
Nevertheless if you have working GIR cross-tools, you can force the expected
|
||||
behavior with GIMP's meson option -Dcan-crosscompile-gir=true
|
||||
|
||||
Optional:
|
||||
|
||||
- build GEGL with libumfpack (SuiteSparse) (`-Dumfpack=enabled`)
|
||||
for alternative Matting engine "gegl:matting-levin" and OpenEXR
|
||||
library (`-Dopenexr=enabled`) for OpenEXR format support.
|
||||
- build GEGL with maxflow (https://github.com/gerddie/maxflow) and
|
||||
the option -Dworkshop=true in order to be able to select the
|
||||
experimental Paint Select tool in the Playground (operation
|
||||
"gegl:paint-select" is needed).
|
||||
- The "Show Image Graph" item in the "Debug" menu (hidden by
|
||||
default on stable release) requires the GEGL operation
|
||||
"gegl:introspect" which is always built but deactivated unless
|
||||
the `dot` tool from graphviz is available (runtime dependency).
|
||||
|
||||
4. You need to have installed GTK version 3.24.0 or newer.
|
||||
GIMP also needs a recent version of GLib (>= 2.70.0), GDK-Pixbuf
|
||||
(>= 2.30.8), and Pango (>= 1.50.0). Sources for these can be grabbed
|
||||
from https://download.gnome.org/sources/.
|
||||
|
||||
5. We use cairo >= 1.14.0, which is hosted at
|
||||
https://www.cairographics.org/.
|
||||
|
||||
6. We require PangoCairo, a Pango backend using Cairo. Make sure you
|
||||
have Cairo, FreeType2 and fontconfig installed before you compile
|
||||
Pango. GIMP depends on freetype2 being newer than version 2.1.7
|
||||
and fontconfig 2.12.4 or newer. Older versions are known to have
|
||||
bugs that seriously affect the stability of GIMP.
|
||||
|
||||
On Windows, we recommend fontconfig 2.13.95 (or over) where support
|
||||
of fonts in user directory (Windows 1809 feature) appeared.
|
||||
|
||||
We also require HarfBuzz 2.8.2 or newer, an OpenType text shaping
|
||||
tool. As this is a dependency for Pango, you will likely have it
|
||||
installed, but you may have to install a development package for
|
||||
the headers.
|
||||
|
||||
7. The file-compressor plug-in requires zlib, libbzip2, and liblzma to
|
||||
be installed. All these libraries are required dependencies.
|
||||
|
||||
8. For metadata access GIMP requires the gexiv2 0.14.0 or newer library.
|
||||
It is hosted at: https://gitlab.gnome.org/GNOME/gexiv2/
|
||||
|
||||
9. libpng, libjpeg, libtiff, librsvg and lcms are hard dependencies
|
||||
that can not be disabled. poppler is also a hard dependency because
|
||||
PDF is too common nowadays for it to be an option (at least for
|
||||
import); and poppler-data (CJK and Cyrillic support in PDF) is also
|
||||
required because no languages should be considered "second class
|
||||
citizen". If we support PDF, let's support it properly, i.e.
|
||||
exhaustively.
|
||||
|
||||
There might be some issues with librsvg, based on the fact newer
|
||||
versions are in Rust which is not buildable on all platforms. Yet
|
||||
SVG support was deemed too important to be considered "optional"
|
||||
for a decent graphics activity. Nevertheless a packager really
|
||||
intent to have GIMP running on an architecture with no Rust support
|
||||
could still:
|
||||
|
||||
1) easily patch out the file-svg plug-in from build system;
|
||||
2) build GIMP with -Dvector-icons=false. Ironically librsvg is
|
||||
needed at build time for this option, in order to create PNG
|
||||
variants of icons (making librsvg unneeded at runtime). So all it
|
||||
takes is to have a build machine with librsvg to create the PNG
|
||||
icons, package and deliver them for machines without librsvg.
|
||||
|
||||
This is the compromise we came with, i.e. officially making SVG a
|
||||
first-class file format, yet explaining how you could ignore it if
|
||||
you really wanted or needed to.
|
||||
|
||||
10. For MyPaint brushes, brushlib (libmypaint) 1.3.0 is used.
|
||||
The libmypaint repository is hosted at:
|
||||
|
||||
https://github.com/mypaint/libmypaint
|
||||
|
||||
If installing from repository, do not install the master branch!
|
||||
Checkout the last tag "v1.y.z" from `libmypaint-v1` branch instead
|
||||
(for instance "v1.6.1" tag at time of writing), or simply install
|
||||
from a tarball or from your favorite package manager.
|
||||
|
||||
In particular, do NOT install tags or release tarballs versioned
|
||||
"v2.y.z". GIMP depends on the version 1 of libmypaint and is
|
||||
incompatible with the version 2 (which is still experimental anyway
|
||||
and has no stable release at time of writing).
|
||||
|
||||
11. We also need the mypaint-brushes data package:
|
||||
|
||||
https://github.com/mypaint/mypaint-brushes
|
||||
|
||||
If installing from repository, install from branch "v1.3.x" or the
|
||||
last tag "v1.y.z" (e.g. "v1.3.1" at time of writing).
|
||||
In particular do NOT install from `master` branch which installs
|
||||
brushes incompatible with GIMP (the `master` branch and v2 brushes
|
||||
are targeted to software using recent libmypaint which GIMP wasn't
|
||||
ported to yet).
|
||||
|
||||
Also this is a data packages and therefore it will install the
|
||||
pkg-config file inside `$PREFIX/share/pkgconfig/`. If you install
|
||||
mypaint-brushes from repository in a non-standard prefix, you will
|
||||
have to make sure your $PKG_CONFIG_PATH environment variable also
|
||||
lists `$PREFIX/share/pkgconfig/`.
|
||||
|
||||
12. GIMP uses GLib's GIO library to handle file URIs and any I/O in
|
||||
general, transparently, regardless where the file is stored, i.e.
|
||||
locally, remotely, with which scheme, and so on. GIO in turn
|
||||
supports various backends through modules. We don't know all the
|
||||
modules available but since HTTP and HTTPS are so pervasive
|
||||
nowadays, we kind of consider a least GIO modules for these schemes
|
||||
mandatory (it allows to open from a pasted URL or just drag'n drop
|
||||
from e.g. a browser).
|
||||
|
||||
For HTTP support (and many other schemes), on Linux at least, you
|
||||
should install `gvfs`:
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gvfs/
|
||||
|
||||
It is unclear whether `gvfs` can be built and installed on other
|
||||
platforms such as Windows and macOS.
|
||||
|
||||
For HTTPS support, you should install `glib-networking`:
|
||||
|
||||
https://gitlab.gnome.org/GNOME/glib-networking
|
||||
|
||||
Of course there might be more modules providing support of more
|
||||
storage backends. Ideally GIMP would have support to load from any
|
||||
backend so packaging together with more GIO modules or recommending
|
||||
them in a package manager would be ideal. In any case, installing
|
||||
the ones for HTTP and HTTPS seems like the minimum nowadays.
|
||||
|
||||
13. You may want to install other third party libraries or programs
|
||||
that are needed for some of the available plug-ins. We recommend
|
||||
to check that the following libraries are installed: openjpeg,
|
||||
libmng, libwmf, libaa and libgs (Ghostscript).
|
||||
|
||||
14. HEIF support depends on the libheif library. If you don't have
|
||||
access to pre-built packages, the code is available at:
|
||||
|
||||
https://github.com/strukturag/libheif
|
||||
|
||||
GIMP supports several HEIF variants (different coding formats in
|
||||
the HEIF container), so you should make sure you build libheif with
|
||||
proper encoders and decoders for these:
|
||||
|
||||
* 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.
|
||||
* HEJ2: OpenJPEG (for JPEG2000 inside HEIF).
|
||||
|
||||
If you don't compile libheif with the correct flags (see libheif
|
||||
README which has a table of supported codecs), the plug-in is
|
||||
mostly useless.
|
||||
If HEIF support doesn't look like it works on relocatable
|
||||
environments, the environment variable LIBHEIF_PLUGIN_PATH may be
|
||||
what you are looking for.
|
||||
|
||||
15. GObject Introspection requires the following dependencies to be
|
||||
built and installed with introspection as well: babl, cairo,
|
||||
GdkPixbuf, GEGL, GIO, GLib, GObject and GTK.
|
||||
|
||||
16. Windows builds can now generate backtrace logs upon a crash.
|
||||
The logs will be available in: %APPDATA%\GIMP@GIMP_APP_VERSION@\CrashLog\
|
||||
The feature depends on Dr.MinGW's ExcHndl library:
|
||||
|
||||
https://github.com/jrfonseca/drmingw
|
||||
|
||||
17. Optional step if compiling GIMP from git (unneeded from tarball): you need
|
||||
to initialize submodules with command `git submodule update --init`.
|
||||
|
||||
18. Configure GIMP by running `meson _build`. You may want to pass some
|
||||
options to it, see below.
|
||||
|
||||
19. Build GIMP by running `ninja -C _build'.
|
||||
|
||||
20. Install GIMP by running `ninja -C _build install'. In order to
|
||||
avoid clashes with other versions of GIMP, we install a binary
|
||||
called gimp-3.0. By default there's also a link created so that
|
||||
you can type 'gimp' to start gimp-3.0.
|
||||
|
||||
21. Summary of required packages and what version you need:
|
||||
|
||||
Package Name Version
|
||||
|
||||
appstream-glib 0.7.7
|
||||
ATK 2.4.0
|
||||
babl 0.1.114
|
||||
cairo 1.14.0
|
||||
Fontconfig 2.12.4
|
||||
freetype2 2.1.7
|
||||
GDK-PixBuf 2.30.8
|
||||
GEGL 0.4.62
|
||||
gexiv2 0.14.0
|
||||
GIO
|
||||
GLib 2.70.0
|
||||
glib-networking
|
||||
GTK 3.24.0
|
||||
gvfs (on Linux)
|
||||
HarfBuzz 2.8.2
|
||||
json-glib 1.2.6
|
||||
libarchive
|
||||
libbzip2
|
||||
libjpeg
|
||||
liblzma 5.0.0
|
||||
libmypaint 1.3.0
|
||||
libpng 1.6.25
|
||||
libpoppler-glib 0.69.0
|
||||
librsvg 2.40.6
|
||||
libtiff 4.0.0
|
||||
Little CMS 2.8
|
||||
mypaint-brushes-1.0
|
||||
pangocairo 1.50.0
|
||||
poppler-data 0.4.9
|
||||
PyGObject
|
||||
Python >=3.6
|
||||
zlib
|
||||
|
||||
22. Summary of optional packages:
|
||||
|
||||
Package Name Version Feature
|
||||
|
||||
cairo-pdf 1.12.2 PDF export
|
||||
cfitsio - FITS
|
||||
iso-codes - Language selection
|
||||
ExcHndl - Crash logs on Windows with Dr. MinGW
|
||||
gs - ghostscript
|
||||
libaa - ASCII art
|
||||
libheif 1.15.1 HEIF (HEIC, AVIF)
|
||||
libilbm - Amiga IFF/ILBM
|
||||
libjxl 0.7.0 JPEG XL
|
||||
libmng - MNG
|
||||
libwebp 0.6.0 WebP (built with --enable-libwebpmux and --enable-libwebpdemux)
|
||||
libwmf 0.2.8 WMF
|
||||
libXcursor - X11 Mouse Cursor
|
||||
libxpm - XPM
|
||||
openexr 1.6.1 OpenEXR
|
||||
OpenJPEG 2.1.0 JPEG 2000
|
||||
qoi - QOI
|
||||
webkit 2.20.3 Help browser & webpage
|
||||
vala - Vala plug-ins
|
||||
|
||||
23. Summary of optional runtime dependencies:
|
||||
|
||||
darktable >= 1.7, with lua support enabled for raw loading
|
||||
RawTherapee >= 5.2 for raw loading
|
||||
xdg-email for sending emails
|
||||
sendmail for sending emails if --with-sendmail enabled
|
||||
gdb or lldb for our new bug-reporting dialog
|
||||
"gegl:matting-levin" GEGL operation for alternative matting engine
|
||||
GJS for Javascript plug-ins
|
||||
dot for "Show Image Graph" (unstable branches)
|
||||
xdg-desktop-portal implemented for your desktop for various D-Bus API (screenshot, color-picking…)
|
||||
|
||||
24. Summary of experimental or unmaintained dependencies:
|
||||
|
||||
Lua 5.1 (or LuaJIT) and LGI: Lua plug-in example is disabled by
|
||||
default because of stability issues with the Lua binding.
|
||||
|
||||
Webkit-GTK 2.20.3: the Help Browser and Webpage
|
||||
plug-ins are disabled for lack of maintenance and issues with
|
||||
Webkit-GTK
|
||||
|
||||
|
||||
|
||||
Generic instructions for configuring and compiling auto-configured
|
||||
packages are included below. Here is an illustration of commands that
|
||||
might be used to build and install GIMP. The actual configuration,
|
||||
compilation and installation output is not shown.
|
||||
|
||||
% tar xvf gimp-3.0.4.tar.xz # unpack the sources
|
||||
% cd gimp-3.0.4 # change to the toplevel directory
|
||||
% meson setup _build # `configure' step
|
||||
% ninja -C _build # build GIMP
|
||||
% ninja -C _build install # install GIMP
|
||||
|
||||
|
||||
The `configure' step examines your system, and adapts GIMP to run on
|
||||
it. The script has many options, some of which are described in the
|
||||
generic instructions included at the end of this file. All of the
|
||||
options can be listed using the command `meson configure' if you
|
||||
successfully configured already, or by reading the file `meson_options.txt`.
|
||||
There are several special options the GIMP configure script recognizes.
|
||||
These are:
|
||||
|
||||
-Dvector-icons=false This option installs raster icons instead of
|
||||
vector icons.
|
||||
|
||||
-Drelocatable-bundle=yes This option forces GIMP to search some
|
||||
resources (e.g. MyPaint brushes or libwmf fonts) relatively to the
|
||||
running prefix, rather than using build-time paths.
|
||||
|
||||
-Dansi=true This option causes stricter ANSI C checking to be
|
||||
performed when compiling with GCC. The default is for strict
|
||||
checking to be disabled. NOTE: This option is intended primarily as
|
||||
a convenience for developers.
|
||||
|
||||
-Dgimpdir=DIR. This option changes the default directory GIMP uses to
|
||||
search for its configuration files from $XDG_CONFIG_HOME/GIMP/3.0/
|
||||
(per XDG Base Directory Specification, $XDG_CONFIG_HOME defaults to
|
||||
the directory .config/ in the user's home directory) to
|
||||
$XDG_CONFIG_HOME/DIR/3.0/.
|
||||
If DIR is an absolute path, the directory will be changed to DIR.
|
||||
|
||||
-Dshmem-type=[none|sysv|posix|win32|auto]. This option allows you to
|
||||
specify how image data is transported between the core and plug-ins.
|
||||
Usually the best way to do this is detected automatically.
|
||||
|
||||
-Daa=disabled The AA plug-in needs libaa and configure checks for
|
||||
its presence. Use -Daa=disabled if you run into problems.
|
||||
|
||||
-Dxpm=disabled The XPM plug-in needs libxpm and configure checks
|
||||
for its presence. If for some reason you don't want to build the
|
||||
XPM plug-in even though the library is installed, use
|
||||
-Dxpm=disabled to disable it explicitly.
|
||||
|
||||
-Dmng=disabled The MNG plug-in needs libmng and configure checks
|
||||
for its presence. If for some reason you don't want to build the
|
||||
MNG plug-in even though the library is installed, use
|
||||
-Dmng=disabled to disable it explicitly.
|
||||
|
||||
-Dwmf=disabled The WMF plug-in needs libwmf2 and configure checks for
|
||||
its presence. Use -Dwmf=disabled if you run into problems.
|
||||
|
||||
-Dwebkit-unmaintained=true We do not recommend to install the Help
|
||||
browser and Webpage plug-ins anymore. If for some reason you want
|
||||
these anyway, you can force the build with this explicit option.
|
||||
|
||||
-Dprint=false If for some reason you don't want to build the Print
|
||||
plug-in based on the GtkPrint API, you can build with -Dprint=false.
|
||||
|
||||
-Dalsa=disabled If you don't want to compile ALSA support into the
|
||||
MIDI input controller module, you can use the -Dalsa=disabled option.
|
||||
|
||||
-Dlinux-input=disabled If you don't want to compile the Linux Input
|
||||
controller module, you can use the -Dlinux-input=disabled option.
|
||||
|
||||
-Dgi-docgen=enabled|disabled This option controls whether the libgimp
|
||||
C API references will be created using gi-docgen.
|
||||
|
||||
-Denable-multiproc=false This option allows you to disable support for
|
||||
multiple processors. It is enabled by default.
|
||||
|
||||
-Dwith-sendmail[=PATH] This option is used to tell GIMP to send email
|
||||
through sendmail instead of xdg-email. You can optionally indicate
|
||||
where to find the sendmail command. Otherwise sendmail will simply
|
||||
be searched in your $PATH at runtime.
|
||||
|
||||
-Denable-default-bin=false Use this option if you don't want to make
|
||||
gimp-3.0 the default GIMP installation. Otherwise a link called
|
||||
gimp pointing to the gimp-3.0 executable will be installed.
|
||||
|
||||
-Denable-console-bin=false Use this option if you don't want the
|
||||
gimp-console binary to be built in addition to the standard binary.
|
||||
gimp-console is useful for command-line batch mode or as a server.
|
||||
|
||||
-Djavascript=disabled If for some reason you don't want to install the
|
||||
JavaScript plug-ins, you can use -Djavascript=false.
|
||||
|
||||
-Dlua=true Lua binding is experimental because of stability issues.
|
||||
You may test the feature by enabling it.
|
||||
|
||||
-Dvala-plugins=disabled If for some reason you don't want to install the
|
||||
Vala plug-ins, you can use -Dvala-plugins=disabled.
|
||||
|
||||
|
||||
This list is manually maintained. To get an exhaustive listing of options,
|
||||
read `meson_options.txt'.
|
||||
Additionally meson supports a wide range of common built-in options. See
|
||||
documentation: https://mesonbuild.com/Builtin-options.html
|
||||
|
||||
The `ninja' command builds several things:
|
||||
- A bunch of public libraries in the directories starting with 'libgimp'.
|
||||
- The plug-in programs in the 'plug-ins' directory.
|
||||
- Some modules in the 'modules' subdirectory.
|
||||
- The main GIMP program 'gimp-3.0' in `app'.
|
||||
|
||||
The `ninja install' command installs the GIMP header files associated
|
||||
with the libgimp libraries, the plug-ins, some data files and the GIMP
|
||||
executable. After running `ninja install' and assuming the build process
|
||||
was successful you should be able to run `gimp'.
|
||||
|
||||
|
||||
When configure fails
|
||||
======================
|
||||
|
||||
The most important is to read the error output displayed by meson, as it
|
||||
will very likely tell you the exact problem.
|
||||
|
||||
A detailed log of the meson output is written to the file meson-logs/meson-log.txt.
|
||||
This may help diagnose problems.
|
||||
|
||||
The configuration step verify that various tools are installed, such as:
|
||||
C and C++ compilers, pkg-config or pkgconf (tools that replaces the old
|
||||
foo-config scripts), and more. Make sure these are installed.
|
||||
|
||||
Then it will try to search for various libraries, by looking up a `.pc`
|
||||
file (used to get information on installation details). For instance if
|
||||
pkg-config could not find the file 'gtk+-3.0.pc' that gets installed
|
||||
with GTK, verify that the development package of GTK+3 is installed or
|
||||
that you have a version equal or higher than the required version.
|
||||
|
||||
If you installed a supported version of a dependency but the configure
|
||||
step still cannot find it, you may need to add the location of the .pc
|
||||
file to the environment variable PKG_CONFIG_PATH before running meson
|
||||
setup.
|
||||
|
||||
When you use custom installation prefixes for dependencies, you will
|
||||
likely need to set more environment variables, such as LD_LIBRARY_PATH
|
||||
or GI_TYPELIB_PATH, either for the configuration to succeed, the build
|
||||
itself or to start GIMP at all.
|
||||
Please check out our building tutorial for more in-depth details:
|
||||
|
||||
https://developer.gimp.org/core/setup/build/
|
||||
|
||||
|
||||
About optional features
|
||||
=======================
|
||||
|
||||
When the configure step succeeds, it will display a summary of which
|
||||
optional features or plug-ins will be installed.
|
||||
|
||||
There are some GIMP features, in particular for the support of more
|
||||
recent or less used image formats, that need additional third-party
|
||||
libraries installed on your system. You need the related libraries and
|
||||
header files installed for these, otherwise the compiled GIMP will be a
|
||||
minimal version without these features.
|
||||
|
||||
Once you installed them, run the following command to trigger a
|
||||
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
|
||||
visible to your setup.
|
49
LICENSE
Normal file
49
LICENSE
Normal file
|
@ -0,0 +1,49 @@
|
|||
* The GIMP application core, and other portions of the official GIMP
|
||||
distribution not explicitly licensed otherwise, are licensed under
|
||||
the GNU GENERAL PUBLIC LICENSE -- see the 'COPYING' file in this
|
||||
directory for details.
|
||||
|
||||
[ The below explicit exemption, we hope, clears up the GIMP
|
||||
developers' position concerning an ambiguity with the GNU General
|
||||
Public License concerning what constitutes a 'mere aggregation'
|
||||
versus a combined or derived work. The intention is to make it
|
||||
clear that arbitrarily-licensed programs such as GIMP plug-ins do
|
||||
not automatically assume the GNU General Public License (GPL)
|
||||
themselves simply because of their invocation of (or by) procedures
|
||||
implemented in GPL-licensed code, via libgimp or a similar interface
|
||||
to methods provided by the pdb: ]
|
||||
|
||||
* If you create a program which invokes (or provides) methods within
|
||||
(or for) the GPL GIMP application core through the medium of libgimp
|
||||
or another implementation of the 'procedural database' (pdb) serial
|
||||
protocol, then the GIMP developers' position is that this is a 'mere
|
||||
aggregation' of the program invoking the method and the program
|
||||
implementing the method as per section 2 of the GNU General Public
|
||||
License.
|
||||
|
||||
* 'libgimp' and the other GIMP libraries are licensed under the
|
||||
GNU LESSER GENERAL PUBLIC LICENSE -- see the 'COPYING' file in the
|
||||
libgimp directory for details.
|
||||
|
||||
* Icon themes are licensed under Creative Commons by-sa 3.0 or 4.0. See
|
||||
the 'COPYING' files in icons/Symbolic and icons/Color respectively.
|
||||
|
||||
* Any data used in artworks, such as brushes, patterns and the like, and more
|
||||
broadly likely all data inside the data/ folder should be under a CC0 license
|
||||
(Creative Commons Zero) or equivalent, i.e. "No rights Reserved", because GIMP
|
||||
contributors clearly don't intend to claim any right on anyone's work just
|
||||
because they used GIMP and its default data.
|
||||
We cannot clearly give proper licensing on all existing data, prior to the
|
||||
addition of this note in the LICENSE file (for historical reasons, simply
|
||||
because their contributors are since long gone), though we can say that an
|
||||
uncountable number of users have used these for dozens of years and never had
|
||||
legal problems as far as we know (it is anyway unclear whether anyone could
|
||||
really claim any right for very basic brush or pattern usage). Since 2015, we
|
||||
even have a clear FAQ entry to explicitly say the GIMP project has no
|
||||
intention whatsoever to put restrictions on people's work:
|
||||
https://www.gimp.org/docs/userfaq.html#can-i-use-gimp-commercially
|
||||
|
||||
Therefore any new data file under the data/ folder will be expected to be CC0.
|
||||
All contributors are expected to read the LICENSE file and therefore are
|
||||
implicitly agreeing to license their data under CC0 by contributing it as core
|
||||
GIMP data.
|
10
MAINTAINERS
Normal file
10
MAINTAINERS
Normal file
|
@ -0,0 +1,10 @@
|
|||
Currently active maintainers
|
||||
----------------------------
|
||||
|
||||
Michael Natterer
|
||||
E-mail: mitch@gimp.org
|
||||
Userid: mitch
|
||||
|
||||
Jehan
|
||||
E-mail: jehan@girinstud.io
|
||||
Userid: Jehan
|
161
NEWS
Normal file
161
NEWS
Normal file
|
@ -0,0 +1,161 @@
|
|||
------------------------------
|
||||
GNU Image Manipulation Program
|
||||
Development Branch
|
||||
------------------------------
|
||||
|
||||
This is the development branch of GIMP.
|
||||
|
||||
|
||||
Overview of Changes from GIMP 3.0.2 to GIMP 3.0.4
|
||||
=================================================
|
||||
|
||||
Core:
|
||||
|
||||
- Make maximum radius for generated brushes consistent across
|
||||
codebase.
|
||||
- Use NDE filter name for undo history.
|
||||
- Module loading improved to be better cross-platform (in particular
|
||||
on macOS both .so and .dylib modules are supported).
|
||||
- Code compliant with GCC 15 (C23).
|
||||
- Filter size updated when its drawable is rotated.
|
||||
- Font loading (at startup) optimized.
|
||||
- Set the proper program name for KDE/Wayland to map the process to
|
||||
the correct desktop file.
|
||||
- "windows-display-*" are hidden from the Shortcuts dialog (they are
|
||||
not meant to be remapped).
|
||||
- Editing non-destructive effects now triggers undo steps.
|
||||
- When migrating from GIMP 2.x to GIMP 3, shortcuts for actions
|
||||
"edit-paste-as-new-layer*" are now converted to "edit-paste-merged*"
|
||||
(and not "edit-paste*" anymore which was confusing and
|
||||
counter-productive).
|
||||
|
||||
Graphical User Interface:
|
||||
|
||||
- Highlight selected device in GimpDeviceStatus.
|
||||
- Various theme leak fixes.
|
||||
- UX improvement: GimpViewableDialog (e.g. Fill/Stroke path and more)
|
||||
now has "OK" as default response.
|
||||
- Icon size settings now also applying to Move and Transform icon
|
||||
boxes.
|
||||
- Commit hash is now shown in About dialog in all non-release builds
|
||||
(i.e. even in stable series, when we are in-between releases).
|
||||
- Hide Force slider for Pencil Tool (rather than just making it
|
||||
insensitive).
|
||||
- Define merged titlebar icon colors.
|
||||
- Keep menubar color consistent when out of focus.
|
||||
- We don't show Fx icon for tool-based filters.
|
||||
- Updated splash without micro version in it.
|
||||
- Removed size restrictions on Display Filters.
|
||||
- Don't show hidden tools on toolbox tooltips.
|
||||
- Fix "Keep above" Window Manager hint.
|
||||
- Multi-Window mode on Windows: dock windows' title bars now adapt to
|
||||
the Windows system theme colors too.
|
||||
- Show palette name in Palette Color Selector.
|
||||
|
||||
Tools:
|
||||
|
||||
- MyPaint Brush: have consistent options layout compared to other
|
||||
paint tools.
|
||||
- Scissors Select Tool: close the curve on Enter, similar to the Path
|
||||
tool.
|
||||
- Path Tool: connect path on click in design mode.
|
||||
|
||||
Plug-ins:
|
||||
|
||||
- Restore GUI to Difference Clouds script. This had been lost since
|
||||
GIMP 2.8!
|
||||
- Fixes in various file format support, such as: DDS, SVG, TIFF, PSD,
|
||||
BMP, ICO…
|
||||
- Screenshot dropdowns replaced by radio buttons, as part of a new UX
|
||||
decision that choice settings with 2 or 3 choices should be dropdown
|
||||
(faster 1-click access), unless there are a lot more settings making
|
||||
the dialog too crowded already.
|
||||
|
||||
PDB:
|
||||
|
||||
- Make "gimp-plug-ins-query" public again (yet still not available in
|
||||
libgimp).
|
||||
|
||||
Build:
|
||||
|
||||
- Windows Installer:
|
||||
* Make the installer aware of Install, Reinstall and Update modes.
|
||||
* Add Repair mode to Windows installer: in particular we can now fix
|
||||
installations when the previous install directory cannot be
|
||||
accessed anymore.
|
||||
* The feature to delete the config folder on Windows uninstall will
|
||||
now make a backup on the Desktop first (allowing people to delete
|
||||
it themselves, move it, or even restore it later if needed).
|
||||
* Uninstalling while GIMP is running is made impossible (among other
|
||||
issues, it was causing partial uninstallation).
|
||||
* Downgrading is only possible by uninstalling first.
|
||||
* Development warning is shown in dev build of stable series too.
|
||||
* Add fractional scaling support to Installer welcome image.
|
||||
* Restore points now have a timeout to prevent stuckness.
|
||||
- Our AppImage won't ship debug symbols anymore. Better debugging can
|
||||
be set with: export DEBUGINFOD_URLS="https://debuginfod.debian.net"
|
||||
- Windows builds:
|
||||
* Ship babl/GEGL and libgimp headers, static libs and pkg-config
|
||||
files for plug-in developers.
|
||||
* Dedicated file icon for XCF files.
|
||||
* Generate native .pdb CodeView symbols on Windows (smaller debug
|
||||
data files, usable by MSIX and better debugging ability), except
|
||||
on x86 (32-bit).
|
||||
- Crossbuilds are dropped from CI.
|
||||
- Shell scripts used in the meson build are ported to Python (more
|
||||
portable and much faster on some platforms, in particular Windows).
|
||||
- Some build scripts were moved around for reorganization.
|
||||
- Depency requirement bumped:
|
||||
* babl 0.1.114
|
||||
* GEGL 0.4.62
|
||||
- New "Inputs" feature for simpler Gitlab pipelines running.
|
||||
- Some in-repository documentation was cleaned up.
|
||||
|
||||
|
||||
Overview of Changes from GIMP 3.0.0 to GIMP 3.0.2
|
||||
=================================================
|
||||
|
||||
This is a bug-fix only release.
|
||||
|
||||
Core:
|
||||
|
||||
- Mark some strings translatable.
|
||||
- Fix crash when choosing a brush in grid view.
|
||||
- Windows: temporary revert of some Input Device handling code which
|
||||
was breaking pressure sensitivity for some graphics tablets (though
|
||||
this revert may make issues with the eraser tip).
|
||||
- Fix crash when choosing a non-existing font in text tool options.
|
||||
|
||||
Tools:
|
||||
|
||||
- Reorder Line Art Detection options per design decision.
|
||||
|
||||
Graphical User Interface:
|
||||
|
||||
- Keep headerbar color consistent when out of focus.
|
||||
- Histogram uses the luminance value of the foreground color as a
|
||||
threshold to lighten or darken the border color for contrast with
|
||||
the histogram itself.
|
||||
- Improve separation between panels in dark theme.
|
||||
- Add default response for GimpQueryBox dialogues.
|
||||
- Spacing between toolbox widgets improved.
|
||||
- GimpSpinScale slider colors inverted.
|
||||
- New icons: "gimp-toggle-on" and "gimp-toggle-off" and using them in
|
||||
the Search Action's list as icons for toggle actions.
|
||||
|
||||
Plug-ins:
|
||||
|
||||
- Python Console uses the luminance of the background color for error
|
||||
text.
|
||||
- Metadata Editor: fix buffer overflow.
|
||||
- Gradient Flare: fix crash when setting the size to 0.
|
||||
- Screenshot: X11 implementation is bypassed (in favor of portals)
|
||||
when running on XWayland.
|
||||
|
||||
Build:
|
||||
|
||||
- Various packaging fixes and cleanup.
|
||||
- The Windows installer now prompts (only in user installation) about
|
||||
deleting GIMP config files when uninstalling.
|
||||
- GEGL 0.4.58 is now our minimum requirement.
|
||||
- Windows installer: create Restore Point on system-wide install.
|
807
NEWS.pre-2-0
Normal file
807
NEWS.pre-2-0
Normal file
|
@ -0,0 +1,807 @@
|
|||
|
||||
The GNU Image Manipulation Program Version 1.3
|
||||
A Colorspace Odyssey
|
||||
|
||||
|
||||
GIMP 1.3 used to be the development branch of The GIMP. Here's where
|
||||
the development took place on the road to GIMP version 2.0. This file
|
||||
lists the changes for each release in this development cycle.
|
||||
|
||||
|
||||
Bugs fixed in GIMP 2.0.0
|
||||
========================
|
||||
- 137766: compress text undo steps (Sven)
|
||||
- 137876: set a default height for dock windows (Sven, Simon)
|
||||
- 137502: check for buggy intltool versions (Raphael)
|
||||
- 137930: portability fix for Solaris (Sven)
|
||||
- 137968: workaround GIOChannel misfeature on win32 (Tor)
|
||||
- 137957: bugfix in floating selection code (Sven, Mitch)
|
||||
- 136868: fixed alien glow arrow script (Simon)
|
||||
|
||||
|
||||
Bugs fixed in GIMP 2.0rc1
|
||||
=========================
|
||||
- 136124: count animation frames starting with 1 (Simon)
|
||||
- 122519: allow to share paint options between tools (Mitch)
|
||||
- 136227: allow to toggle the histogram scale from the tool dialogs (Sven)
|
||||
- 136303: fixed translation of preview widget (Sven)
|
||||
- 136321: fixed bug in Plasma plug-in (Sven)
|
||||
- 136371: fixed a crash caused by gimp_query_boolean_box (Sven)
|
||||
- 119905: configurable undo preview size (Sven)
|
||||
- 136524: fixed Shadow Bevel script (Yosh)
|
||||
- 136535: enable i18n in SVG plug-in (Yuheng Xie, Sven)
|
||||
- 136081: allow to use the webbrowser to access help (Brix, Sven)
|
||||
- 128588: resurrected Save button in input devices dialog (Simon)
|
||||
- 136489: added boolean return values to gimp_edit_[cut|copy] (Mitch)
|
||||
- 136706: added missing i18n in IfsCompose plug-in (Sven)
|
||||
- 136713: added missing i18n in ImageMap plug-in (Sven)
|
||||
- 131965: cancel tools instead of resetting when image becomes dirty (Mitch)
|
||||
- 12253: only cancel tool operation if tool is active on the image that
|
||||
is becoming dirty (Mitch)
|
||||
- 136343: fixed wrong function prototypes (Mitch)
|
||||
- 136636: workaround a GDK problem on win32 (Mitch)
|
||||
- 136747: fixed problem in gimp-print configure check (Yosh)
|
||||
- 136850: fixed crash when toggling tool preview (Sven)
|
||||
- 136937: allow translation of tool-option menus (Sven)
|
||||
- 136645: fixed crash when dropping pattern on a text layer (Sven)
|
||||
- 136907: fixed off-by-one error in gimp_pixel_fetcher_get_pixel() (Simon)
|
||||
- 73610: improvements to Script-Fu error reporting (Kevin Cozen)
|
||||
- 136702: made supersampling in transform tools optional (Raphael, Mitch)
|
||||
- 118356: keep the font size fixed when changing the unit (Sven)
|
||||
- 136623: don't set the text color on modified text layers (Sven)
|
||||
- 135023: show mask state on unselected layers also (Simon)
|
||||
- 137076: don't discard session info for dialogs hidden with Tab (Mitch)
|
||||
- 124176: use a counter to track undo_[freeze|thaw] (Simon)
|
||||
- 128833: don't make tool dialogs transient to the image window (Sven)
|
||||
- 64835: on startup test if a swap file can be created (Simon, Raphael)
|
||||
- 136909, 137242, 81479: update the menus when a plug-in finished (Simon)
|
||||
- 137435: fixed sort order in plug-in menus for broken locales (Simon)
|
||||
- 137529: don't crash on invalid brush hoses (Simon)
|
||||
- 136996: search help pages in the users locale (Sven)
|
||||
- 137151: make accelerators work in gtk+-2.4 if there's no menubar (Mitch)
|
||||
- 136623, 136645: properly handle modifications to text layers (Sven)
|
||||
- 130985, 120021: implemented text undo (Sven)
|
||||
- 137612: improve tooltips for GimpScaleEntry (Sven)
|
||||
- 137737: show all user interface elements in the Jigsaw plug-in (Sven)
|
||||
- 137753: added a shortcut for the Path tool (Simon)
|
||||
- 137754: added a menu entry and shortcut for "Path to Selection" (Simon)
|
||||
- 137170: fixed crash with floating selections on quick-mask (Simon, Sven)
|
||||
- 137786: duplicate the text when duplicating a text layer (Sven)
|
||||
- 137566: fixed off-by-one errors on the canvas (Pedro)
|
||||
|
||||
Other contributions:
|
||||
Jakub Steiner, Eric Pierce
|
||||
|
||||
|
||||
Bugs fixed in GIMP 2.0pre4
|
||||
==========================
|
||||
- 128825: Improved misleading debug output and hide it in the stable branch
|
||||
(Raphael)
|
||||
- 133467: Fixed autoshrink selection (Mitch)
|
||||
- 131634: Fixed text-circle script-fu (David Odin)
|
||||
- 133532: Quit the imagemap plug-in when it is finished (Sven)
|
||||
- 133456: Disallow editing of data objects which have no save functionality
|
||||
(Mitch)
|
||||
- 113142: Don't attempt to render the display out of bounds (Mitch)
|
||||
- 133763: Fix use of EXEEXT in tiff checks (Yosh)
|
||||
- 131044: Attempt to read layer names from TIFF files (Pablo d'Angelo)
|
||||
- 133490: Fixed handling of missing pluginrc file (Sven)
|
||||
- 121074: Suppress some harmless warnings in the stable branch (Sven)
|
||||
- 132351: Fixed harmless iscissors tool warnings (Sven)
|
||||
- 97999: Indicate progress when scaling a drawable (Sven)
|
||||
- 133244: Fixed crash in Curve Bend plug-in (Wolfgang Hofer)
|
||||
- 133818: Added a runtime check for fontconfig >= 2.2.0 (Mitch)
|
||||
- 130636: Fixed undo handling in Add Bevel script (Simon)
|
||||
- 133067: Connect the text tool font with the global font selector (Sven)
|
||||
- 133958: Made color values in color picker selectable (Mariano Suárez-Alvarez)
|
||||
- 125283: Have configure warn when gimp-print is older than 4.2.6 (Sven)
|
||||
- 112012: Use default preview if none can be generated (Mitch)
|
||||
- 124969: Improve text tool logic (Sven)
|
||||
- 121033: Ensure that non-indexed images cannot have a colormap (Mitch)
|
||||
- 132356: Curves tool trapped the mouse (Mitch)
|
||||
- 123321: UTF-8 and zero-size layer bug (Adam Moss, Daniel Rogers, Piotr
|
||||
Krysiuk)
|
||||
- 134274: Behave correctly for edit and delete functions for data files (Mitch)
|
||||
- 134285: Improve snap behaviour for grid and guides (Simon)
|
||||
- 134274: Fix data file initialisation routine (Mitch)
|
||||
- 134423: Fix GIF plug-in when used without display (Sven)
|
||||
- 134419: Fix undo button behaviour in GFig plug-in (Sven)
|
||||
- 134562: Ensure tile cache cannot write to freed memory (Mitch)
|
||||
- 134512: Exclude undo stack from size of memory in an image when scaling
|
||||
(Sven)
|
||||
- 134694: Fix bug in Preferences (Mitch)
|
||||
- 134410: Make drawing of straight lines better for fuzzy brushes (Simon)
|
||||
- 125303: Remove per-channel gray point picker from levels dialog (Dave
|
||||
Neary)
|
||||
- 134752: Improve clipboard buffer detection between different images in
|
||||
the same GIMP instance (Mitch)
|
||||
- 122049: Validate numerical input in pygimp plug-ins, and fix the Sphere
|
||||
plug-in (Dave Neary, Florian Traverse)
|
||||
- 130568: Mostly fix Van Gogh (LIC) plug-in (Simon)
|
||||
- 70673: Let Curves and Levels widgets scale with the dialog (Sven)
|
||||
- 135059: Remember the preview setting for all ImageMap tools (Sven)
|
||||
- 135630: Don't make the resolution calibration dialog modal (Sven, Pedro)
|
||||
- 133266: Saner max. value for the blend tool's supersampling (Sven, Pedro)
|
||||
- 135866: Fix displacement handling in bumpmap plug-in (Pedro, Joao)
|
||||
- 135994: Fix offsets when scaling or resizing vectors (Simon)
|
||||
- 133453: Experiments with global shortcuts (Mitch, Simon)
|
||||
|
||||
Other contributions:
|
||||
Manish Singh, Michael Natterer, Sven Neumann, Henrik Brix Andersen,
|
||||
Jakub Steiner, Simon Budig
|
||||
|
||||
|
||||
Bugs fixed in GIMP 2.0pre3
|
||||
==========================
|
||||
- 127451: Anchor floating selection when creating a text layer (Mitch)
|
||||
- 50649: Allow to call script-fu scripts from plug-ins (Mitch)
|
||||
- 132617: Improved gimp-remote behaviour (Sven)
|
||||
- 132036: Fixed issues with libart scan conversion (Simon)
|
||||
- 132041: Made info window not grab the focus (Mitch)
|
||||
- 132077: Redraw layer boundary when using transform tools (Mitch)
|
||||
- 132089: Flip tool misbehaviours (Mitch)
|
||||
- 132032: User interface issues with Plugin Details (David Odin)
|
||||
- 132145: Use default values when stroking from the PDB (Mitch)
|
||||
- 132162: Anchoring a floating selection on a channel (Mitch)
|
||||
- 132271: Mosaic filter on selections (Simon)
|
||||
- 132322: gimp-levels on grayscale images (Mitch)
|
||||
- 132329: Info window doesn't show initial values (Shlomi Fish)
|
||||
- 118084: Info window not updated in automatic mode (Shlomi Fish)
|
||||
- 132495: Positioning of glyphs that extend the logical rectangle (Sven)
|
||||
- 108659: Use g_spawn in postscript plug-in (Peter Kirchgessner)
|
||||
- 132508: Problems with path tool in Edit mode (Simon)
|
||||
- 132504: Fixed unsharp mask script (Mitch)
|
||||
- 132595: Don't draw the selection if it's hidden (Sven)
|
||||
- 132027: Crash in gimpressionist (Sven)
|
||||
- 132596: Use default values for color DND (Mitch)
|
||||
- 132493: Tuned Comic Logo script (Pedro Gimeno)
|
||||
- 132649: Allow to fill the whole selection using bucket-fill (Mitch)
|
||||
- 131902: Improved handling of missing tags in TIFF loader (Andrey Kiselev)
|
||||
- 93806: Validate script-fu input (Yosh)
|
||||
- 132214: Differentiate writable and readonly data directories (Mitch)
|
||||
- 131964: Zoom ratio problem (Simon)
|
||||
- 132969: Set help-id for tool on tool options dock (Mitch)
|
||||
- 132999: Make assembler code PIC safe (Yosh)
|
||||
- 119878: Use the same keyboard shortcuts in all GIMP windows
|
||||
(except the toolbox window) (Mitch)
|
||||
- 131975 &
|
||||
- 132297: Disable some warnings while loading TIFFs (Raphael)
|
||||
- 129529: Add a "randomize" toggle to random number widget (Dave Neary)
|
||||
- 133099: Duplicate PDB entries problem (Mitch)
|
||||
- 133122: Disallow renaming of layer masks and some floating selections (Mitch)
|
||||
- 130118: Allow non-UTF8 characters in the GIMP home directory (Mitch)
|
||||
- 122026: Workaround a bug in gdk_draw_segments() (David Odin)
|
||||
- 133280: Remove deleted scripts from the menu (Mitch)
|
||||
- 133270: Replace deprecated enum values in scripts (Kevin Cozens)
|
||||
- 133180: Sort menu entries for save and load procedures (Mitch)
|
||||
- 131563: Use percentages for zoom ratios (Simon, Sven)
|
||||
|
||||
Other contributions:
|
||||
Manish Singh, Tor Lillqvist, Jakub Steiner, Michael Natterer,
|
||||
Sven Neumann, Kevin Cozens
|
||||
|
||||
|
||||
Bugs fixed in GIMP 2.0pre2
|
||||
==========================
|
||||
- 130828: Compile error with gcc 2.95 (Adrian Bunk)
|
||||
- 35335: Curve tool doesn't conserve black (Simon)
|
||||
- 130866: Remove multiple PNG entries in file type dropdown (Brix)
|
||||
- 106991: Add mnemonics for all menu items (finished by Mitch)
|
||||
- 130869: Add smaller image templates (Dave Neary)
|
||||
- 130916: Handle multiline texts better (Mitch)
|
||||
- 120424: Add dirty flag to default image title (Brix)
|
||||
- 130912: Fix rounding errors in JPEG plug-in (keith@goatman.me.uk)
|
||||
- 131016: Add support for layer offsets in multipage tiff loading (Pablo
|
||||
d'Angelo)
|
||||
- 124073: Modify behaviour of zoom tool to avoid funny fractions (Dave Neary,
|
||||
Simon)
|
||||
- 131088: fix select-to-pattern script-fu (Mitch)
|
||||
- 82478: Fix zoom handling in fractal explorer (Pedro Gimeno)
|
||||
- 115793: Make thumbnail preview of indexed images match display (Pedro Gimeno)
|
||||
- 130471: Handle RGBA images correctly in the CEL plug-in (Dov Grobgeld)
|
||||
- 131109: Remove EMX specific code (Sven)
|
||||
- 130118: Handle GIMP2_DIRECTORY with non-UTF-8 characters correctly (Tor
|
||||
Lillqvist, Sven)
|
||||
- 82465: Make preview match image when image is greyscale (Sven)
|
||||
- 92586: Force SF_IMAGE value to reflect the selected image (Sven)
|
||||
- 116765: Fix selection artifacts while moving selections (Pedro Gimeno, Mitch)
|
||||
- 131215: Only call bind_textdomain_codeset when available (Reinhard Geissler)
|
||||
- 125141: Resolve API issues with GimpPixelFetcher and GimpRegionIterator
|
||||
(David Odin, Maurits Rijk)
|
||||
- 109078: Fix histogram for graylevel images (Pedro Gimeno, Mitch)
|
||||
- 131146: Fix drag & drop of patterns to layer masks (Dave Neary, Mitch)
|
||||
- 128112: Use a better error message if help files are not present (Mitch)
|
||||
- 78732: Don't paste outside the visible screen, if possible (Mitch)
|
||||
- 131561: Make "Condensed" fonts available for use (Manish Singh)
|
||||
- 71922: Fix SuperNova preview for Alpha channel (David Odin)
|
||||
- 82464: Fix SuperNova preview for greyscale images (David Odin)
|
||||
- 121966: Fix SuperNova plug-in (David Odin)
|
||||
- 110610: Allow user to choose file formats even if the current image type is
|
||||
not supported by them (Pedro Gimeno)
|
||||
- 131980: Fix crash in crop tool (David Odin, Sven)
|
||||
- 131030: Allow saving data without pre-multiplying by alpha channel in tiff
|
||||
plug-in (Pablo d'Angelo, Dave Neary)
|
||||
- 125864: Guides behave correctly when spacing is set to 1px (Brix)
|
||||
- 131721: Fix handling of alpha channels across undo steps (Mitch)
|
||||
- 128025: Fix behaviour when there is a floating selection (Mitch)
|
||||
- 131076: Make fuzzy select tool respect alpha channel in indexed mode (Mitch)
|
||||
- 131779: Improve indexed scaling dialog (Mitch)
|
||||
- 127673: Overlapping widgets in gradient editor (Mitch)
|
||||
|
||||
Other contributions:
|
||||
David Odin, Manish Singh, Simon Budig, Michael Natterer, Sven Neumann,
|
||||
Tor Lillqvist, Henrik Brix Andersen
|
||||
|
||||
|
||||
Overview of Changes in GIMP 2.0pre1
|
||||
===================================
|
||||
- Persistent user preferences for PNG save [Yosh]
|
||||
- Replaced old "About" dialog [Simon]
|
||||
- Allow removal of text attributes from text layer [Sven]
|
||||
- Add optimisation option to png (clear transparent pixels) [Joao]
|
||||
- Add POSIX shared memory implementation, and use it on MacOS X [Yosh]
|
||||
- Dashed selection and path stroking [Simon]
|
||||
- Grey picker in Levels dialog conserves lightness [Bolsh]
|
||||
- Created a library for handling thumbnails [Sven]
|
||||
- Support for multipage TIFFs [Andrey Kiselev]
|
||||
- Added a channel mixer plug-in [Martin Guldahl, Yosh]
|
||||
- PDB cleanup and compatibility mode [Mitch]
|
||||
- Cleaned up libgimp API [David Odin]
|
||||
- Lots of bug fixes
|
||||
|
||||
Other contributors:
|
||||
Adam Moss, Jakub Steiner, Helvetix Victorinox, Pedro Gimeno, Adrian
|
||||
Bunk, Abel Cheung, Maurits Rijk, Ville Pätsi, Marco Munari, Shlomi
|
||||
Fish, Jakub Steiner, Raphaël Quinet, David Gowers, Michael Schumacher
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.23
|
||||
==================================
|
||||
- Color proof display filter using ICC profiles written by Banlu Kemiyatorn
|
||||
- New gimprc options to work around window management problems [Sven, Brix]
|
||||
- Fixes for using GIMP on Xinerama setups [Sven]
|
||||
- Numerous libgimp* API cleanups [Mitch, Sven]
|
||||
- Theme switching in the preferences dialog [Mitch]
|
||||
- Added a small theme [Mitch]
|
||||
- Cleanup and unification of message strings [Mitch]
|
||||
- 64bit clean libgimp API [Yosh]
|
||||
- New plug-in color selector using color-selector modules [Mitch]
|
||||
- GimpCanvas drawing abstraction [Sven]
|
||||
- Added DICOM file plug-in by Dov Grobgeld
|
||||
- Imported new WMF plug-in from libwmf2 [Sven, Mitch]
|
||||
- A session name can be given on the command-line [Sven]
|
||||
- Allow to move image windows and docks between screens [Mitch, Sven]
|
||||
- Fixed multi-head issues [Mitch]
|
||||
- Allow to merge visible paths [Simon]
|
||||
- Redone GimpDialog API [Mitch]
|
||||
- Load GIMP brush format version 3 [Sven]
|
||||
- Allow to use GIMP without any fonts [Sven]
|
||||
- Improved animoptimize plug-in [Raphaël]
|
||||
- Lots of bug fixes
|
||||
|
||||
Other contributors:
|
||||
Ville Pätsi, Eric Pierce, Tor Lillqvist, Henrik Brix Andersen,
|
||||
Manish Singh, Dom Lachowicz, Francis James Franklin, Dave Neary,
|
||||
Maurits Rijk, Joao S. O. Bueno, Michael Schumacher, Daniel Rogers,
|
||||
Hans Breuer, Jakub Steiner
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.22
|
||||
==================================
|
||||
- Made GIMP compile and work with gtk+-2.3 [Yosh]
|
||||
- Replaced histogram tool with a histogram dialog [Sven]
|
||||
- Multi-head safety [Sven, Yosh]
|
||||
- Changes for future compatibility of text layers [Sven]
|
||||
- Histogram scale configurable for all tools and defaults to linear [Sven]
|
||||
- Better default settings
|
||||
- Completed configurability of normal and fullscreen view [Sven, Bolsh]
|
||||
- GimpConfig cleanups and improvements [Mitch, Sven]
|
||||
- Allow to configure the default grid in your gimprc [Brix]
|
||||
- Improved session handling; store more settings like the position of
|
||||
dock panes and the selected page in the dockbook [Mitch]
|
||||
- Auto-scrolling for DND in list views [Mitch]
|
||||
- Refresh rendering of paint strokes more often [Mitch]
|
||||
- Refactored handling of modifier keys for tools [Mitch]
|
||||
- Changed the redo shortcut to Ctrl-Y [Sven]
|
||||
- Numerous plug-in cleanups [Maurits, Bolsh]
|
||||
- Code documentation [Bolsh, Helvetix, Sven, Mitch]
|
||||
- Lots of bug fixes
|
||||
|
||||
Other contributors:
|
||||
Ville Pätsi, Simon Budig, Tor Lillqvist, Pedro Gimeno, Seth Burgess,
|
||||
Jakub Steiner, David Odin, Ed Halley, Wolfgang Hofer, Vesa Halttunen
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.21
|
||||
==================================
|
||||
- Allow to save tool options as named presets [Mitch].
|
||||
- Stroke paths using libart [Simon, Bolsh, Mitch, Sven, Ville]
|
||||
- Better looking and more accessible dockables [Mitch, Sven]
|
||||
- Fixes for right-to-left rendering [Sven, Mitch]
|
||||
- Rewritten webbroswer plug-in [Brix]
|
||||
- Much improved path tool [Simon, Mitch]
|
||||
- Export GIMP paths to SVG [Sven, Simon]
|
||||
- Import SVG paths as GIMP paths [Sven, Simon]
|
||||
- Added SVG file plug-in from librsvg and improved it [Sven]
|
||||
- Store new vectors in XCF [Simon, Mitch]
|
||||
- Allow to toggle visibility of paths in path list [Mitch]
|
||||
- Move tool now also moves paths [Mitch]
|
||||
- Some progress towards gimp-console, a gtk-less GIMP for batch mode [Mitch]
|
||||
- Improved Decompose/Compose plug-ins [Alexey Dyachenko, Sven]
|
||||
- More SIMD compositing code [Helvetix]
|
||||
- Right mouse buttons now also cancels paint operations [Mitch]
|
||||
- More internal code cleanup and documentation [Mitch, Sven]
|
||||
- Documented libgimpmath [DindinX]
|
||||
- Lots of bug fixes
|
||||
|
||||
Other contributors:
|
||||
Adam D. Moss, Dom Lachowicz, Manish Singh, Jakub Steiner,
|
||||
Christian Neumair, Seth Burgess, Maurits Rijk, David Necas,
|
||||
Tor Lillqvist, Ville Pätsi, Morten Eriksen, Pedro Gimeno
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.20
|
||||
==================================
|
||||
- Improved documentation of the app directory [Mitch, Sven]
|
||||
- Image update optimizations [Mitch]
|
||||
- font-map script improvements [Sven]
|
||||
- PDB API to access fonts [Sven]
|
||||
- Portability fixes for x86-64 [Yosh]
|
||||
- Enabled SSE and SSE2 compositing code [Helvetix]
|
||||
- GimpSelection class added [Mitch]
|
||||
- Pullout parameter added to RGB->CMYK conversions [Sven]
|
||||
- Basic framework for future help system in place [Mitch]
|
||||
- Screenshot plug-in rewritten [Brix]
|
||||
- Font list updates on the fly [Yosh]
|
||||
- Generic interface for stroking selections and paths [Mitch]
|
||||
- Further improvements to the path tool [Simon]
|
||||
- Remove libgck from public API [Mitch]
|
||||
- Lots of bug fixes
|
||||
|
||||
Other contributors:
|
||||
Maurits Rijk, Ville Pätsi, Larry Ewing, Dmitry G. Mastrukov,
|
||||
Pedro Gimeno, Raphaël Quinet, S. Mukund, Andy Wallis, Carl Adams,
|
||||
Tino Schwarz, Tor Lillqvist, Emmet Caulfield, Guillermo S. Romero,
|
||||
Dave Neary, Wolfgang Hofer
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.19
|
||||
==================================
|
||||
- Migration towards new gimp-help system [Mitch]
|
||||
- Deletion of anchor points on a path [Simon]
|
||||
- Path stroke moving [Simon]
|
||||
- Path stroke splitting by deleting an edge (Ctrl-click while in
|
||||
Delete mode) [Simon]
|
||||
- Drag path edges modifies curve [Simon]
|
||||
- DInsertion of points on path edges [Simon]
|
||||
- Joining two stroke paths is possible (Shift-Ctrl-Alt-Click on
|
||||
the second end-point) [Simon]
|
||||
- Polygonal paths [Simon]
|
||||
- Improved new composite functions and enabled them by default [Helvetix]
|
||||
- UTF-8 validate all strings coming in from the PDB [Yosh, Mitch]
|
||||
- Paint-core improvements and bug-fixes [Jay Cox]
|
||||
- Added more mnemonics [Brix]
|
||||
- Lots of bug fixes
|
||||
|
||||
Other contributors:
|
||||
Adam D. Moss, Tor Lillqvist, Jakub Steiner, Alan Horkan,
|
||||
Avi Bercovich, S. Mukund, Maurits Rijk, Guillermo S. Romero,
|
||||
Seth Burgess, Wolfgang Hofer, Ville Pätsi, Sven Neumann
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.18
|
||||
==================================
|
||||
- Made a bunch of improvements to the path tool [Simon]
|
||||
- Added lots of mnemonnics for plug-ins [Brix]
|
||||
- Build fixes for Win32 [Hans, Tor]
|
||||
- Improvements to the grid [Brix]
|
||||
- Improved compiler checks for MMX code [Helvetix, Sven]
|
||||
- Allow patent-free compression for GIF [Cameron]
|
||||
- Add several edge detection algorithms to the edge tool [Bolsh]
|
||||
- Fixed handle leak in plug-ins on Win32 [Tor]
|
||||
- Changed default quality for jpegs [Raphaël]
|
||||
- Add changing opacity via cursor keys [Simon]
|
||||
- Fix text tool outlines [Mitch]
|
||||
- Serialize/deserialize documentation [Sven]
|
||||
- Colourcube analysis plug-in added [Yosh]
|
||||
- Lots of code clean-up in displayshell [Mitch]
|
||||
- Camp organisation [Sven, Mitch]
|
||||
- Added a working gimp.spec for building RPMs [drc]
|
||||
- Lots of bug fixes
|
||||
|
||||
Other contributors:
|
||||
Maurits Rijk, Raphaël Quinet, Adam Moss
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.17
|
||||
==================================
|
||||
- Made the text tool optionally create a path [Sven, Mitch]
|
||||
- Added the ability to reverse gradients to the blend tool [Mitch]
|
||||
- Added dithering to the blend tool [Alastair M. Robinson]
|
||||
- Changed all(?) GIMP-1.4 references to GIMP-2.0 [Sven]
|
||||
- Allow to transform paths using the transform tools [Mitch]
|
||||
- Added a simple CMYK color selector [Sven]
|
||||
- Added naive RGB <-> CMYK conversion routines [Sven]
|
||||
- Generalized paint tools [Mitch]
|
||||
- Finally a brush-shaped cursor for all paint tools [Mitch]
|
||||
- Started to integrate new composite functions [Helvetix]
|
||||
- Made the style for dockable tabs configurable [Mitch]
|
||||
- Some preparations for text transformations [Sven]
|
||||
- Store grid settings in XCF [Brix]
|
||||
- Redone assembly checks and run-time checks for CPU features [Sven]
|
||||
- Added lots of mnemonics to the menus [Jimmac]
|
||||
- Support for comments in PNG files [Sven]
|
||||
- Constified the libgimp API and adapted all plug-ins [Yosh, Sven]
|
||||
- Cleaned up the brush/font/gradient/pattern selector API [Mitch]
|
||||
- Support for patterns with alpha channel [Bolsh]
|
||||
- Lots of bug fixes
|
||||
|
||||
Other contributors:
|
||||
Eric Pierce, Joao S. O. Bueno, Tor Lillqvist, Damien Carbery,
|
||||
Maurits Rijk
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.16
|
||||
==================================
|
||||
- Vector tool improvements [Simon]
|
||||
- Import GDynText layers [Sven]
|
||||
- Save and load text layers to/from XCF files [Sven]
|
||||
- Added the ability to show a grid over the canvas [Brix]
|
||||
- Keep EXIF data in JPEG files using libexif [Bolsh]
|
||||
- Changed a couple of gimprc defaults [Bolsh]
|
||||
- Updated PS keybindings (ps-menurc) [Eric Pierce]
|
||||
- Clarified the semantics of EXTENSION and PLUGIN [Mitch]
|
||||
- Updates to the Win32 build system [Hans]
|
||||
- Improved brush/pattern/font/gradient selectors in libgimp [Sven]
|
||||
- Improved handling of transparency in GIF files [Adam]
|
||||
- Cleaned up and improved the message dialogs and error console [Mitch]
|
||||
- Added a sample sessionrc [Sven]
|
||||
- Lots of bug fixes
|
||||
|
||||
Other contributors:
|
||||
Yohei Honda, Elad Shahar, Dave Neary, Jakub Steiner
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.15
|
||||
==================================
|
||||
|
||||
- Removed color correction tools from toolbox again [Sven]
|
||||
- Factored out color-picking code into a GimpColorTool class [Sven]
|
||||
- Updates to the Win32 build system [Tor Lillqvist, Hans Breuer]
|
||||
- Removed the need for special casing for some platforms [Yosh, Sven]
|
||||
- Added item rotation (90, 180, 270 degrees) [Sven, Mitch]
|
||||
- Load old paths as new vector objects [Mitch]
|
||||
- Apply transformations to linked items [Mitch]
|
||||
- Generalized item transformations [Mitch]
|
||||
- Improved session management [Mitch]
|
||||
- Speed up fonts query [Yosh]
|
||||
- Backed out pluggable tools [Sven]
|
||||
- Lots of bug fixes
|
||||
|
||||
Other contributors:
|
||||
Branko Collin, Pedro Gimeno, Dave Neary, Raphaël Quinet, Maurits Rijk,
|
||||
Adam D. Moss, Jakub Steiner
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.14
|
||||
==================================
|
||||
|
||||
- Better resampling for the transform tools [OEyvind Kolaas]
|
||||
- Added MNG save plug-in [S. Mukund]
|
||||
- Added framework for image templates [Mitch]
|
||||
- Vector tool improvements [Simon]
|
||||
- Improved look and feel if layer previews are disabled [Mitch, Sven, Jimmac]
|
||||
- Keyboard navigation for grid views [Sven]
|
||||
- List and grid views for fonts [Mitch, Sven]
|
||||
- Some text tool improvements [Sven]
|
||||
- Moved gimp-gap into it's own CVS module [Yosh, Sven]
|
||||
- More icons in even more sizes [Jimmac, Mitch, Sven]
|
||||
- I18n header cleanup [Sven]
|
||||
- Lots of bug fixes
|
||||
|
||||
Other contributors:
|
||||
Pedro Gimeno, Owen, Raphaël Quinet
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.13
|
||||
==================================
|
||||
|
||||
- New tree-view based popup to select brushes, gradients and such [Mitch]
|
||||
- Added color pickers to levels tool for easier color correction [Sven]
|
||||
- Allow to create channels from an image's color component [Sven, Mitch]
|
||||
- Added a full-screen mode for the image window [Sven, Mitch]
|
||||
- Added a simple config file writer to GimpConfig [Sven]
|
||||
- Moved gimp-perl into it's own CVS module [Yosh]
|
||||
- Migrated all core dialogs from GtkList to GtkTreeView [Mitch]
|
||||
- Refactored the GimpDisplayShell update/draw code [Mitch, Sven]
|
||||
- Rewrote the Undo History as a GimpDockable [Mitch]
|
||||
- Lots of bug fixes
|
||||
|
||||
Other contributors:
|
||||
Sunil Mohan Adapa, Tor Lillqvist, Jay Cox, Dave Neary, Michael J. Hammel,
|
||||
Toralf Lund, Raphaël Quinet, Hans Breuer, Tuomas Kuosmanen, David Necas,
|
||||
Jakub Steiner, Simon Budig
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.12
|
||||
==================================
|
||||
|
||||
- Improved and cleaned up undo system [Mitch]
|
||||
- Added hooks for plug-in debugging [Yosh]
|
||||
- Redesigned the tool options code [Mitch]
|
||||
- Converted the API reference to DocBook XML [Sven]
|
||||
- Lots of text tool changes [Sven]
|
||||
- Factored common code out of a number of plug-ins [Maurits]
|
||||
- Cleaned up and improved the code that handles the plug-ins [Mitch]
|
||||
- Finished colorblindness display filter using the algorithm contributed
|
||||
by Alex Wade and Robert Dougherty.
|
||||
- Updated the gimprc man-page, or actually, wrote a tool that does it [Sven]
|
||||
- Improved the code that handles all the menus [Mitch]
|
||||
- Added new PSD save plug-in [Bolsh]
|
||||
- Added back SphereDesigner plug-in [Sven]
|
||||
- More plug-ins cleaned up [Maurits, Sven]
|
||||
- Reorganized startup code [Yosh]
|
||||
- Portability fixes for 64bit platforms [Yosh, Sven]
|
||||
- Handle large swap files (>2GB) [Sven]
|
||||
- Updates to the Win32 build system [Tor Lillqvist, Hans Breuer]
|
||||
- More work on the vectors tool [Simon, Mitch]
|
||||
- Lots of bug fixes
|
||||
|
||||
Other contributors:
|
||||
Garry R. Osgood, Jakub Steiner, Simon Budig, Henrik Brix Andersen,
|
||||
Akkana, Carol Spears, Seth Burgess, Nathan Summers, David Necas,
|
||||
Cameron Gregory, Larry Ewing
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.11
|
||||
==================================
|
||||
|
||||
- Allow to stroke bezier curves with the vectors tool [Simon]
|
||||
- Added a first draft of a display filter that simulates
|
||||
color-deficient vision [Mitch, Sven]
|
||||
- Added an optional menubar per display [Mitch]
|
||||
- Added PDB functions needed by GAP [Wolfgang Hofer, Sven]
|
||||
- Updated the Win32 build system [Tor Lillqvist, Hans Breuer]
|
||||
- Factored common code out of a number of plug-ins [Maurits]
|
||||
- Use g_rand* functions wherever random numbers are needed [Bolsh]
|
||||
- GimpPressionist plug-in cleaned up [Maurits]
|
||||
- Finally landed the new gimprc code based on GimpConfig [Sven, Mitch]
|
||||
- Added widgets for views on object properties [Mitch]
|
||||
- Reimplemented the preferences dialog using GimpConfig [Mitch]
|
||||
- Transform tool cleanup [Mitch]
|
||||
- Modify the environment of plug-ins according to files installed with the
|
||||
plug-ins. Allows to install Python modules into the GIMP tree. [Yosh]
|
||||
- Start plug-ins using g_spawn_async() [Yosh]
|
||||
- Lots of bug fixes.
|
||||
|
||||
Other contributors:
|
||||
Jim Meyer, Jakub Steiner, Guillermo S. Romero, Henrik Brix Andersen,
|
||||
Nathan Summers, Jeroen Lamain
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.10
|
||||
==================================
|
||||
|
||||
- Text tool can load text files now [Sven]
|
||||
- Some unfinished work on the imagemap tools and related widgets [Sven]
|
||||
- Undeprecated ink tool [Bolsh, Sven]
|
||||
- Slightly tweaked the look and feel of the toolbox [Mitch, Sven]
|
||||
- Ported module loading to GTypeModule [Mitch]
|
||||
- Resurrected the water color selector [Mitch]
|
||||
- Reworked module browser [Mitch]
|
||||
- Moved generic datafile loading to LibGimpBase [Mitch]
|
||||
- Added GimpColorScale widget [Mitch, Sven]
|
||||
- Added GimpPickButton widget [Mitch]
|
||||
- Added a color selector dock [Mitch]
|
||||
- Added new layer modes (Softlight, Grain Extract, Grain Merge) [UnNamed]
|
||||
- Included Gimp-Python with the tarball (try --enable-python)
|
||||
- Lots of bug fixes
|
||||
|
||||
Other contributors:
|
||||
Maurits Rijk, Michael Niedermayer, Garry R. Osgood, David Necas,
|
||||
Toby Smith, Raphaël Quinet, Dave Neary, Jim Meyer
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.9
|
||||
=================================
|
||||
|
||||
- Some minor improvements to the text tool [Sven]
|
||||
- Started to cleanup DND code [Mitch]
|
||||
- Added GimpViewableDialog [Mitch]
|
||||
- Improved UI of color adjustment tools [Mitch]
|
||||
- Added new icons [Jimmac, Mitch]
|
||||
- Added GimpSelectionEditor, a view on the current selection [Mitch]
|
||||
- Improved imagemap plug-in [Maurits]
|
||||
- GUI cleanups [Mitch, Sven, Maurits]
|
||||
- Build fixes [Hans, Yosh, Sven]
|
||||
- Lots of bug fixes
|
||||
|
||||
Other contributors:
|
||||
James Henstridge, Dave Neary, Simon Budig
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.8
|
||||
=================================
|
||||
|
||||
- Lots of plug-ins cleaned up and improved [Maurits]
|
||||
- More work on the help browser [Sven]
|
||||
- Core code cleanup [Mitch, Sven]
|
||||
- Improved icons [Jimmac]
|
||||
- Fixed permissions of shared memory segments
|
||||
- Build fixes [Yosh, Sven]
|
||||
- Bug fixes
|
||||
|
||||
Other contributors:
|
||||
Dave Neary, Zbigniew Chyla, Simon Budig
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.7
|
||||
=================================
|
||||
|
||||
- Build fixes
|
||||
- Bug fixes
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.6
|
||||
=================================
|
||||
|
||||
- Support tile cache > 4GB on machines with 64bit long integers [Sven]
|
||||
- Added support for large files (> 2GB) [Sven]
|
||||
- Cleaned up configure, updated to autoconf-2.52 [Sven]
|
||||
- Temporary switch to the Move tool when Space is pressed [Mitch]
|
||||
- More cleanup of display code [Mitch]
|
||||
- Added mnemonics to lots of plug-ins and fixed some bugs [Maurits Rijk]
|
||||
- Added new PDB function gimp_image_get_name and corrected behaviour of
|
||||
gimp_image_get_filename [Yosh, Sven]
|
||||
- Navigation dialog redone as a dockable [Mitch]
|
||||
- Updated print plug-in to new version and depend on libgimpprint [Sven]
|
||||
- Generalized and improved the new config framework; use it for parasites,
|
||||
documents and devices [Mitch, Sven]
|
||||
- Started to port the help browser to GtkHtml2 [Sven]
|
||||
- Finished implementation of the Thumbnail Managing Standard [Mitch, Sven]
|
||||
- Improved Open dialog using the new thumbnails [Mitch, Sven]
|
||||
- Use UTF-8 encoded URIs where we used to use filenames [Mitch]
|
||||
- Plug-in fixes [Iccii]
|
||||
- Added shortcuts to crop layer or image to selection boundary [Mitch]
|
||||
- Changes for build on Win32 [Tor Lillqvist, Hans Breuer]
|
||||
- Started framework for tools loaded as modules or plug-ins [Nathan]
|
||||
- Lots of bugfixes
|
||||
- More stuff not mentioned here (see the ChangeLog)
|
||||
|
||||
Other contributors:
|
||||
Zbigniew Chyla, OEyvind Kolaas, Nick Lamb, David Monniaux, Raphaël Quinet,
|
||||
Jakub Steiner, Simon Budig
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.5
|
||||
=================================
|
||||
|
||||
- Improved tool options and made them dockable [Mitch]
|
||||
- Cleanup of brush, gradient, pattern and palette PDB functions [Mitch]
|
||||
- Autogenerate libgimp/gimp_pdb.h [Yosh]
|
||||
- Converted the toolbox to a dock [Mitch]
|
||||
- Resurrected display filter modules [Mitch]
|
||||
- Plug-in code cleanup (colorify) [Maurits Rijk]
|
||||
- New menu icons [Jimmac, Mitch]
|
||||
- New widgets to choose from enum values [Sven]
|
||||
- Enum cleanups [Yosh, Sven]
|
||||
- Resizeable docks [Mitch]
|
||||
- Parse unitrc and document history using GScanner [Mitch]
|
||||
- Fixes for build on Win32 [Hans]
|
||||
- Treeviewified user installation dialog [Yosh]
|
||||
- Bugfixes
|
||||
- More stuff not mentioned here (see the ChangeLog)
|
||||
|
||||
Other Contributors:
|
||||
Rebecca Walter, Tuomas Kuosmanen, Marcel Telka
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.4
|
||||
=================================
|
||||
|
||||
- Improved image status bar and image title [Mitch]
|
||||
- Updated thumbnail code according to changes in proposed standard [Sven]
|
||||
- Implemented init_proc in plug-ins [Nathan]
|
||||
- Allow to choose interpolation for individual transformations [Mitch]
|
||||
- More framework for tool plug-ins, landed a first tool [Nathan]
|
||||
- Started core/UI separation for the paint tools [Mitch]
|
||||
- Win32 fixes [Hans Breuer]
|
||||
- Plug-in code cleanups (aa, colortoalpha, glasstile, guillotine, vinvert,
|
||||
pagecurl) [Maurits Rijk, Sven]
|
||||
- I18n changes, we now use glib-gettextize and intltoolize [Sven]
|
||||
- New layer mask initialization modes [Mitch]
|
||||
- Colorpicker, Transform tool and PDB fixes [Mitch]
|
||||
- Factored out paint code from the paint tools [Mitch]
|
||||
- New vectors infrastructure [Simon]
|
||||
- First draft of a new vectors tool [Simon, Mitch]
|
||||
- Scanline conversion (Path to selection etc.) changed to use libart [Simon]
|
||||
- Undo cleanups [Mitch]
|
||||
- Changed tips file format to XML [Sven]
|
||||
- Added desktop file for GNOME-2 [Sven]
|
||||
- Added GimpItem class to generalize core code even further [Mitch]
|
||||
- Improved preferences dialog [Mitch, Sven, Jimmac]
|
||||
- New tool icons [Jimmac]
|
||||
- Editor widgets for brushes, gradients and palettes [Mitch]
|
||||
- Revival of the API reference [Sven]
|
||||
- Bugfixes
|
||||
- More stuff not mentioned here (see the ChangeLog)
|
||||
|
||||
Other Contributors:
|
||||
Manish Singh, Rebecca Walter, Guillermo S. Romero
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.3
|
||||
=================================
|
||||
|
||||
- Most of the code is free of deprecated GTK+ calls now [Mitch, Yosh, Sven]
|
||||
- More use of stock icons [Sven, Mitch]
|
||||
- New RGB->Indexed quantizer [Adam]
|
||||
- Framework for pluggable tools [Nathan]
|
||||
- More tool system cleanups [Mitch]
|
||||
- Improved image status bar [Mitch]
|
||||
- GimpObjects now know their memory footprint [Mitch]
|
||||
- GimpUnit cleanup [Sven]
|
||||
- Message proofreading [Bex]
|
||||
- configure.in should work with autoconf-2.5 [Raja R Harinath]
|
||||
- Bugfixes
|
||||
- More stuff not mentioned here (see the ChangeLog)
|
||||
|
||||
Other Contributors:
|
||||
Simon Budig
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.2
|
||||
=================================
|
||||
|
||||
- Cleanup of display and tools [Mitch]
|
||||
- Improvements to tools UI [Mitch]
|
||||
- Reenabled brush pipes [Mitch]
|
||||
- Started to reorganize menus [Mitch]
|
||||
- Cleanup of internal enums [Sven]
|
||||
- New config file framework (yet unused) [Sven]
|
||||
- Fixes to the Undo and PixelRegion code [Kelly]
|
||||
- Optimization and cleanup of the paint-funcs [Daniel]
|
||||
- Message proofreading [Bex]
|
||||
- Most stuff compiles with -DGTK_DISABLE_DEPRECATED [Mitch]
|
||||
- More stuff not mentioned here (see the ChangeLog)
|
||||
|
||||
Other Contributors:
|
||||
Guillermo S. Romero, David Neary, David Odin, Roger Leigh,
|
||||
Ville Pätsi.
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.1
|
||||
=================================
|
||||
|
||||
- Follow GTK+-2.0 and Pango API changes [Yosh, Mitch, Sven]
|
||||
- Added Color Erase paint mode [Simon Budig]
|
||||
- Proofreading of messages [Rebecca Walter]
|
||||
- Improvements to container views [Mitch]
|
||||
- Improved tool options [Mitch]
|
||||
- Made --no-interface mode work without calling gtk_init() [Mitch]
|
||||
- Reworked paint_funcs [Daniel Egger]
|
||||
- Added SF-DIRNAME script-fu parameter [Matteo Nastasi]
|
||||
- Lots of internal cleanups [Mitch, Sven]
|
||||
- More stuff not mentioned here (see the ChangeLog)
|
||||
|
||||
Other Contributors:
|
||||
Guillermo S. Romero, David Neary
|
||||
|
||||
|
||||
Overview of Changes in GIMP 1.3.0
|
||||
=================================
|
||||
|
||||
- Ported almost everything to the GTK+-2.0 API. Check the file INSTALL
|
||||
to learn what libraries we require in detail.
|
||||
- Cleaned up the core a lot. The app directory is now broken up into
|
||||
subdirectories that define subsystems with defined dependencies.
|
||||
- Separated GUI from core functionality in almost all places.
|
||||
- The core object system does not depend on GTK+ any more.
|
||||
- Rewrote large parts of the user interface in a more generic way.
|
||||
- Started to rewrite the text tool (completely broken at the moment)
|
||||
- Lots of changes in the tool system. All paint tool PDB wrappers are
|
||||
broken at the moment.
|
||||
- Split up libgimp and libgimpui in a bunch of smaller utility
|
||||
libraries for plug-ins and the core.
|
||||
- Removed GIMP 1.0 compatibility wrappers.
|
||||
- Lots of stuff not mentioned here. See the file ChangeLog for more info.
|
1184
NEWS.pre-2-10
Normal file
1184
NEWS.pre-2-10
Normal file
File diff suppressed because it is too large
Load diff
578
NEWS.pre-2-2
Normal file
578
NEWS.pre-2-2
Normal file
|
@ -0,0 +1,578 @@
|
|||
The GNU Image Manipulation Program Version 2.2
|
||||
----------------------------------------------
|
||||
|
||||
This is version 2.2 of The GIMP. Version 2.2 is an update on GIMP 2.0.
|
||||
GIMP 2.2 is fully backward compatible to GIMP 2.0. Plug-ins and
|
||||
scripts written for GIMP 2.0 will continue to work and don't need to
|
||||
be changed nor recompiled to be used with GIMP 2.2. We do however
|
||||
hope that plug-in authors will update their plug-ins for GIMP 2.2 and
|
||||
adapt the GUI changes we did with this version.
|
||||
|
||||
Please follow the installation instructions in INSTALL.
|
||||
|
||||
|
||||
Overview of Changes in GIMP 2.2.0 (since 2.2-pre2 was released)
|
||||
=================================
|
||||
|
||||
- More work on GFig plug-in.
|
||||
|
||||
- Build fixes for Win32 and IRIX.
|
||||
|
||||
- Added --no-splash command-line option for gimp-remote.
|
||||
|
||||
- More tweaks to the migration of user settings.
|
||||
|
||||
- Improved input controller modules, added ALSA support to the MIDI module.
|
||||
|
||||
- Allow to transform layers with masks.
|
||||
|
||||
- Let the histogram respect the selection.
|
||||
|
||||
- Added gimp_edit_copy_visible as a replacement for the "Copy Visible" script.
|
||||
|
||||
- Improved color dithering routines.
|
||||
|
||||
- Lots of bug fixes and some optimizations.
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Michael Natterer, Sven Neumann, David Odin, Manish Singh, Kevin Cozens,
|
||||
Joao S. O. Bueno, Karine Proot, Tim Mooney, Wolfgang Hofer, Simon Budig,
|
||||
Bill Skaggs, Øyvind Kolås, Adam D. Moss, Brion Vibber, Maurits Rijk,
|
||||
Bill Luhtala, Philip Lafleur
|
||||
|
||||
|
||||
|
||||
Overview of Changes in GIMP 2.2-pre2
|
||||
====================================
|
||||
|
||||
- More work on GFig (still more to come here).
|
||||
|
||||
- Improvements and fixes to the migration of user settings.
|
||||
|
||||
- Final touches to the new PDB APIs.
|
||||
|
||||
- Ported some more item factories to GtkUIManager.
|
||||
|
||||
- Added new PDB function gimp_layer_from_mask().
|
||||
|
||||
- User interface cleanup in IFS Fractal plug-in (former IfsCompose).
|
||||
|
||||
- Allow file plug-ins to provide a way to access an image thumbnail if
|
||||
the file format provides one or can be rendered at small sizes.
|
||||
|
||||
- Load and save EXIF thumbnails in JPEG files.
|
||||
|
||||
- Render in small resolution when creating a thumbnail for a
|
||||
Postscript or PDF document or from an SVG or WMF image file.
|
||||
|
||||
- Allow to import Photoshop (.act) palette files.
|
||||
|
||||
- Added a Print Size dialog to bring back missing functionality from 2.0.
|
||||
|
||||
- Several improvements to the GIMP Python bindins.
|
||||
|
||||
- Guard the core better against misbehaving scripts and plug-ins.
|
||||
|
||||
- Changed the way that Script-Fu scripts register their menus (in a
|
||||
backward compatible way).
|
||||
|
||||
- Added ALSA support for the MIDI controller module.
|
||||
|
||||
- Resurrected the glob plug-in.
|
||||
|
||||
- Lots of bug fixes and some optimizations.
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Michael Natterer, Sven Neumann, David Odin, Manish Singh, Kevin Cozens,
|
||||
Joao S. O. Bueno, Geert Jordaens, David Gowers, Øyvind Kolås, Cai Qian,
|
||||
Simon Budig, Jakub Steiner, Philip Lafleur, Nickolay V. Shmyrev,
|
||||
Karine Proot, S. Mukund, Dave Neary, Keith Goatman
|
||||
|
||||
|
||||
|
||||
Overview of Changes in GIMP 2.2-pre1
|
||||
====================================
|
||||
|
||||
- Added more plug-in previews (Displace, Color To Alpha, Newsprint)
|
||||
and ported existing previews to the new widgets (Glass Tiles).
|
||||
|
||||
- Added preview to WMF loader plug-in.
|
||||
|
||||
- Added Retinex plug-in for color normalization.
|
||||
|
||||
- Added plug-in to load and save raw image data (_not_ the raw format
|
||||
used by some digital cameras)
|
||||
|
||||
- Added a GUI to configure controller modules.
|
||||
|
||||
- Let lots of core dialogs remember their last values and add
|
||||
shortcuts to run with the last values w/o opening the dialog.
|
||||
|
||||
- Added new PDB API for drawable transformations.
|
||||
|
||||
- Register all libgimp enums to allow language bindings such as
|
||||
Script-Fu to access them using GType introspection.
|
||||
|
||||
- Improved how we attach user-visible strings to enums registered with
|
||||
the type system. Added API to access these strings to libgimpbase.
|
||||
|
||||
- Cleanups to the new GFig GUI (still work in progress).
|
||||
|
||||
- HIGification of the ImageMap plug-in.
|
||||
|
||||
- Cleaned up dialogs code.
|
||||
|
||||
- Added Auto Whitebalance menu item.
|
||||
|
||||
- Redid Scale and Resize dialogs.
|
||||
|
||||
- Added code to migrate user settings from ~/.gimp-2.0.
|
||||
|
||||
- lots of bug fixes.
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Michael Natterer, Sven Neumann, David Odin, Manish Singh, Kevin Cozens,
|
||||
Joao S. O. Bueno, Geert Jordaens, Yeti, Karine Proot, Øyvind Kolås,
|
||||
Simon Budig
|
||||
|
||||
|
||||
|
||||
Overview of Changes in GIMP 2.1.7
|
||||
=================================
|
||||
|
||||
- Added even more plug-in previews (Value Propagate, Cubism, Colorify)
|
||||
and ported existing previews to the new widgets (AlienMap2, FlareFX,
|
||||
Jigsaw, NL Filter, Waves, Scatter HSV).
|
||||
|
||||
- More PDB API cleanups.
|
||||
|
||||
- Allow to specify the batch interpreter on the command-line.
|
||||
|
||||
- Improved selection-round script and moved it to the Select menu.
|
||||
|
||||
- Don't switch the active layer when using the Move tool.
|
||||
|
||||
- Updated libgimpthumb to support local thumbnails as introduced by
|
||||
version 0.7 of the thumbnail spec.
|
||||
|
||||
- Automatically create thumbnails from the Open dialog.
|
||||
|
||||
- Added entries next to most viewable buttons.
|
||||
|
||||
- Added a bunch of scripts to manipulate guides.
|
||||
|
||||
- Improved confirmation and warning dialogs.
|
||||
|
||||
- Lots of bug fixes.
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Michael Natterer, Sven Neumann, David Odin, Manish Singh, Kevin Cozens,
|
||||
Alan Horkan, Jakub Steiner
|
||||
|
||||
|
||||
|
||||
Overview of Changes in GIMP 2.1.6
|
||||
=================================
|
||||
|
||||
- Added more drawable previews (Color Exchange, DOG, Deinterlace,
|
||||
Engrave, Oilify, Ripple, Shift).
|
||||
|
||||
- Added new preview widget that shows a scaled view of the full
|
||||
drawable. Use it for Apply Lens, Blinds, Channel Mixer, Destripe,
|
||||
Emboss, Illusion, Map Color, Max RGB, Plasma, Polar, Solid Noise,
|
||||
Supernova, Whirl and Pinch.
|
||||
|
||||
- Added "Open as Layer" functionality to the menus.
|
||||
|
||||
- Implemented the recent-file-spec for shared storage of a list of
|
||||
recently used files (really URIs).
|
||||
|
||||
- Cleaned up plug-in procedure handling. Added the possibility to let
|
||||
plug-ins and scripts run using a private GimpContext.
|
||||
|
||||
- Added multi-line text entries for Script-Fu and Gimp-Python.
|
||||
|
||||
- Cleaned up PDB API for brushes, gradients, palettes and patterns.
|
||||
Deprecated lots of functions and added saner replacements. Added
|
||||
gimp-context-* PDB namespace with replacements for some of the
|
||||
deprecated stuff.
|
||||
|
||||
- Let GimpView handle pixbuf previews. Added a (themable) drop shadow
|
||||
to image-file previews.
|
||||
|
||||
- Cleaned up the dbbrowser and plugindetails code and GUI and factored
|
||||
out common code. Renamed both executables and menu entries.
|
||||
|
||||
- Made tools cancelable with <Escape>.
|
||||
|
||||
- Dim the outer (to be cropped) area when using the Crop tool.
|
||||
|
||||
- Let GimpDialog add a help button to give easier access to the help pages.
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Michael Natterer, Sven Neumann, David Odin, Maurits Rijk, Dave Neary,
|
||||
Manish Singh, Robert Oegren, Kevin Cozens, Kevin Turner, Dov Grobgeld,
|
||||
Joao S. O. Bueno, Michael Schumacher, Jonathan Levi, Daniel Egger
|
||||
|
||||
|
||||
|
||||
Overview of Changes in GIMP 2.1.5
|
||||
=================================
|
||||
|
||||
- Ask the user to save the image when closing the last display.
|
||||
|
||||
- Restored compatibility of the wire protocol that was accidentally
|
||||
broken in 2.1.4.
|
||||
|
||||
- Added layer and mask actions to allow to create keybindings for them.
|
||||
|
||||
- Preview widget improvements:
|
||||
* let the preview expand with the plug-in dialog
|
||||
* added a navigation popup similar to the one in the image window
|
||||
* respect the selection and show how it will affect the filter
|
||||
* added API to draw to a GimpDrawablePreview from a GimpPixelRgn
|
||||
|
||||
- Added preview to more plug-ins: Cartoon, Apply Canvas, Photocopy,
|
||||
Motion Blur,
|
||||
|
||||
- Ported the Bumpmap plug-in preview to GimpDrawablePreview.
|
||||
|
||||
- Removed -u linker hacks from all Makefiles.
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Michael Natterer, Sven Neumann, David Odin, Manish Singh, Simon
|
||||
Budig, Nathan Summers, Alan Horkan, David Gowers, Bill Skaggs,
|
||||
Joao S. O. Bueno, Peter Kirchgessner
|
||||
|
||||
|
||||
|
||||
Overview of Changes in GIMP 2.1.4
|
||||
=================================
|
||||
|
||||
- Rewritten internal handling of progress indicators. Embed progress
|
||||
bars to the File Open dialog to reduce annoying dialogs popping up.
|
||||
|
||||
- Added an API for plug-ins to embed a progress bar. Let the Script-Fu
|
||||
dialog swallow the progress bars created by running the script.
|
||||
|
||||
- Ported remaining plug-ins and modules to GimpPreviewArea and removed
|
||||
GimpOldPreview.
|
||||
|
||||
- Show progress while converting from RGB to Indexed Colors.
|
||||
|
||||
- Added new plug-ins Cartoon, Neon, Photocopy and Softglow.
|
||||
|
||||
- Let color selectors adapt to the given size.
|
||||
|
||||
- Import basic SVG shapes as paths.
|
||||
|
||||
- Improved GIH and guillotine plug-ins.
|
||||
|
||||
- Added GimpMessageBox widget. Collect error messages in a single
|
||||
dialog to reduce popups.
|
||||
|
||||
- Renamed the core GimpPreview widget to GimpView.
|
||||
|
||||
- Added a GimpPreview widget to libgimpwidgets. This is an abstract
|
||||
class that combines a GimpPreviewArea with scrollbars and a "Preview"
|
||||
toggle button.
|
||||
|
||||
- Added GimpDrawablePreview derived from GimpPreview.
|
||||
|
||||
- Improved previews in Unsharp Mask, Scatter RGB, Sharpen, Spread and
|
||||
Grid plug-ins.
|
||||
|
||||
- Added previews to Edge, Gaussian Blur, Neon, Soft Glow, Sobel and
|
||||
Selective Gaussian Blur.
|
||||
|
||||
- Added a logarithmic mode for the slider in a GimpScaleEntry.
|
||||
|
||||
- Script-Fu code cleanups.
|
||||
|
||||
- Fixed composite assembly code.
|
||||
|
||||
- Pass user settings for the checkerboard to plug-ins.
|
||||
|
||||
- Image comment, if any, is now shown within the info window.
|
||||
|
||||
- New function "Fit Canvas to Layers" (gimp_image_resize_to_layers)
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Michael Natterer, Sven Neumann, David Odin, Shlomi Fish, Bill Skaggs,
|
||||
Simon Budig, Ari Pollak, Spencer Kimball, Michael Schumacher, Joao
|
||||
S. O. Bueno, Manish Singh, Helvetix Victorinox, Kevin Cozens
|
||||
|
||||
|
||||
|
||||
Overview of Changes in GIMP 2.1.3
|
||||
=================================
|
||||
|
||||
- Cleanups to the MMX code and the composite subsystem in general
|
||||
|
||||
- Cleanups and fixes to Gimpressionst plug-in (bug #148088)
|
||||
|
||||
- Redone light settings GUI for Lighting plug-in.
|
||||
|
||||
- Added keyboard shortcut editor to preferences dialog (bug #142922)
|
||||
|
||||
- Implemented the callbacks for the various "Clear saved foobar now"
|
||||
buttons in the preferences dialog.
|
||||
|
||||
- Added support for loading gradients from SVG files. This allows to
|
||||
share gradient definitions with Inkscape and Sodipodi (bug #148127)
|
||||
|
||||
- Added parsers for the various ways to define a color in SVG to
|
||||
libgimpcolor.
|
||||
|
||||
- Added GimpColorHexEntry widget to libgimpwidgets. It displays colors
|
||||
in hexadecimal represention and takes hex and SVG color names as input.
|
||||
|
||||
- Added GimpCellRendererColor and GimpCellRendererToggle to libgimpwidgets.
|
||||
|
||||
- Renamed GimpColor boxed type to GimpRGB and moved it to libgimpcolor.
|
||||
|
||||
- Moved GIMP_TYPE_UNIT and GIMP_TYPE_MEMSIZE to libgimpbase.
|
||||
|
||||
- Fixes to the BMP loader plug-in (bug #143682).
|
||||
|
||||
- Fixes to the Decompose plug-in (bug #147603).
|
||||
|
||||
- Added palette selector widgets to libgimpui.
|
||||
|
||||
- Allow to disable mnemonics in menus (bug #120034).
|
||||
|
||||
- Ported TWAIN plug-in to Mac OS X (bug #147962).
|
||||
|
||||
- Support motion event history as provided by some input device drivers.
|
||||
|
||||
- Let the undo system know more specifically what an undo step
|
||||
does. Use that info to keep tools active across modifications to
|
||||
the image that don't affect the tool (bug #109561).
|
||||
|
||||
- Changed default config for keyboard controller to allow scrolling
|
||||
the display using the cursor keys (#53988).
|
||||
|
||||
- Added GimpPreviewArea widget as replacement for the deprecated
|
||||
GtkPreview widget. Ported most plug-ins to the new widget.
|
||||
|
||||
- Added shapes for generated brushes and allow for softer brushes.
|
||||
|
||||
- Allow to specify the aspect ratio in the scale tool.
|
||||
|
||||
- Lots of bug fixes and other goodies. Check the ChangeLog for details.
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Michael Natterer, Sven Neumann, Helvetix Victorinox, Shlomi Fish,
|
||||
Bill Skaggs, Brion Vibber, Raphael Quinet, Simon Budig, David Odin,
|
||||
Manish Singh, Hans Breuer, Michael Schumacher, Dave Neary
|
||||
|
||||
|
||||
|
||||
Overview of Changes in GIMP 2.1.2
|
||||
=================================
|
||||
|
||||
- Further improvements to the new input controllers; added a keyboard
|
||||
controller.
|
||||
|
||||
- Show image preview in GFig plug-in, started a complete overhaul.
|
||||
|
||||
- Added Difference of Gaussians edge detection plug-in.
|
||||
|
||||
- Added more possibilities for drag'n'drop:
|
||||
* layers dialog accepts URI, color and pattern drops
|
||||
* path dialog takes and offers DND of SVG data
|
||||
|
||||
- Implemented PDB function gimp-path-get-point-at-dist.
|
||||
|
||||
- Allow to use the color picker to edit palettes (as in gimp-1.2).
|
||||
|
||||
- Improvements and code cleanup in gimpressionist plug-in.
|
||||
|
||||
- Allow to cut'n'paste image data between GIMP and other applications
|
||||
(for example Abiword) using the system clipboard.
|
||||
|
||||
- List unsaved images in Quit dialog.
|
||||
|
||||
- Completed core/gui separation. Optionally build a gimp-console
|
||||
application that behaves like 'gimp --no-interface' and doesn't link
|
||||
to GTK+ at all.
|
||||
|
||||
- Deprecated GimpPixmap and ported almost all users to GtkImage.
|
||||
|
||||
- Moved display projection code into a GimpProjection object. This means
|
||||
there's finally only a single projection per image.
|
||||
|
||||
- Introduced GimpPickable interface and implemented it for all core
|
||||
objects that you can pick colors from.
|
||||
|
||||
- Write smaller indexed MNG files.
|
||||
|
||||
- Fixed issues with the internal statusbar API.
|
||||
|
||||
- Allow for multiple light sources in the Lighting plug-in.
|
||||
|
||||
- Redone file type selection in file load/save dialogs.
|
||||
|
||||
- Removed HRZ plug-in.
|
||||
|
||||
- Improved developers documentation.
|
||||
|
||||
- Improved quality of antialiasing in the ellipse select tool.
|
||||
|
||||
- Lots of bug fixes and other goodies. Check the ChangeLog for details.
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Michael Natterer, Sven Neumann, Philip Lafleur, William Skaggs,
|
||||
Geert Jordaens, Simon Budig, Roman Joost, Michael Schumacher,
|
||||
Shlomi Fish, Hans Breuer, Brion Vibber, Robert Oegren, Kevin
|
||||
Cozens, Helvetix Victorinox
|
||||
|
||||
|
||||
|
||||
Overview of Changes in GIMP 2.1.1
|
||||
=================================
|
||||
|
||||
- Added support for loading patterns in formats supported by GdkPixbuf
|
||||
(most notably PNG and JPEG).
|
||||
|
||||
- Use ARGB cursors when supported by the windowing system. Added nice
|
||||
new tool cursors.
|
||||
|
||||
- Added previews to Solid Noise and Unsharp Mask plug-ins.
|
||||
|
||||
- Improvements for painting with pressure-sensitive devices.
|
||||
|
||||
- Added preview for transform tools.
|
||||
|
||||
- Merged the Gaussian Blur plug-ins.
|
||||
|
||||
- Simplified the Blur plug-in.
|
||||
|
||||
- Reorganized the Preferences dialog.
|
||||
|
||||
- Dispatch Enter, Return, Backspace and Delete key events to the tools
|
||||
and use them where it makes sense.
|
||||
|
||||
- Some optimizations to the tile system, the gradient rendering and to
|
||||
the cubic interpolation routine.
|
||||
|
||||
- Show the brush outline while painting.
|
||||
|
||||
- Added an interface that allows to add controller modules. Such a module
|
||||
can dispatch events to The GIMP which are mapped to actions by a
|
||||
user-configurable mapping table. Added controller modules for mouse
|
||||
wheel, midi and linux_input devices.
|
||||
|
||||
- Applied HIG capitalization style to all(?) dialogs.
|
||||
|
||||
- Lots of bug fixes and other goodies. Check the ChangeLog for details.
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Michael Natterer, Sven Neumann, Manish Singh, Philip Lafleur,
|
||||
William Skaggs, Geert Jordaens, Yeti, Dave Neary, Jakub Steiner,
|
||||
David Gowers, Henrik Brix Andersen, Simon Budig, Pedro Gimeno,
|
||||
lots of translators and the contributors that I accidentally missed...
|
||||
|
||||
|
||||
|
||||
Overview of Changes in GIMP 2.1.0
|
||||
=================================
|
||||
|
||||
GIMP 2.1.0 includes the following enhancements over GIMP 2.0:
|
||||
|
||||
- Major user interface improvements.
|
||||
|
||||
* Large parts of the GIMP user interface have been changed to
|
||||
comply better with the GNOME Human Interface Guidelines. This is
|
||||
an ongoing effort and the interface may still be inconsistent in
|
||||
a few places.
|
||||
|
||||
* Users are now allowed to clear the undo history.
|
||||
|
||||
* The unit to be used for the rulers and the coordinates display is now
|
||||
a display property and can be changed in the statusbar of the image
|
||||
window.
|
||||
|
||||
* New widgets and frameworks provided by GTK+ 2.4 are used; this means
|
||||
|
||||
+ uses the new GtkFileChooser dialog, vastly improving the file
|
||||
dialogs.
|
||||
+ includes port of menus to GtkUIManager, which creates all core
|
||||
menus from XML files at runtime. This means that menu items can
|
||||
be rearranged by users simply by editing these files.
|
||||
+ uses a global accelerator table in all docks and image windows.
|
||||
This means that a hotkey will do the same thing regardless of
|
||||
which dock or image window you are using.
|
||||
+ adds replacement widgets based on GtkComboBox for most uses of
|
||||
GtkOptionMenu (GimpUnitMenu remains to be ported)
|
||||
+ adds GimpContainerEntry, a GtkEntry with completion based on
|
||||
the contents of a GimpContainer.
|
||||
+ makes the order and visibility of tools in the toolbox configurable
|
||||
+ allows keeping toolbox and dock windows above other windows (if
|
||||
the WM supports this hint)
|
||||
|
||||
* The toolbox now has an optional preview of the active image.
|
||||
|
||||
* The image window now accepts file/uri drops.
|
||||
|
||||
- More internal cleanup and refactoring of the core object model.
|
||||
|
||||
- The brush rendering code has been separated from the generic paint
|
||||
tool code. The ink tool is now a paint tool (it can do straight
|
||||
lines) and the new infrastructure allows to implement new kinds of
|
||||
paint methods like vector based painting.
|
||||
|
||||
- Gradients can now be created, deleted, renamed and edited through
|
||||
the PDB.
|
||||
|
||||
- Some changes to plug-ins.
|
||||
|
||||
* Plug-ins can now register the same procedures in multiple places (the
|
||||
API to register menu entries has been changed in a backward-compatible
|
||||
fashion).
|
||||
|
||||
* Plug-ins can now optionally register a menu icon.
|
||||
|
||||
* File plug-ins can now register a mime-type.
|
||||
|
||||
* All plug-in dialogs have been reviewed and changed to make them
|
||||
comply better with the GNOME Human Interface Guidelines.
|
||||
|
||||
* All plug-ins that need to access files use the new GtkFileChooser
|
||||
dialog.
|
||||
|
||||
* The obsolete AlienMap and GIcon plug-ins were removed. AlienMap2
|
||||
does everything than AlienMap did, and the GIMP-specific GIcon format
|
||||
has not been used by anything for quite some time now.
|
||||
|
||||
* A plug-in to load and save windows icon files has been added.
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Michael Natterer, Sven Neumann, Maurits Rijk, Manish Singh,
|
||||
Henrik Brix Andersen, Philip Lafleur, Raphael Quinet, Simon Budig,
|
||||
William Skaggs, Shlomi Fish, Kevin Cozens, Jakub Steiner, Dave Neary,
|
||||
Daniel Kobras, Jordi Gay, Yeti, Marco Munari, David Necas, Nils
|
||||
Philippsen, Soeren Wedel Nielsen, Joao S. O. Bueno, lots of translators
|
||||
and the contributors that I accidentally missed...
|
570
NEWS.pre-2-4
Normal file
570
NEWS.pre-2-4
Normal file
|
@ -0,0 +1,570 @@
|
|||
------------------------------
|
||||
GNU Image Manipulation Program
|
||||
Development Branch
|
||||
------------------------------
|
||||
|
||||
This used to be the development branch that lead to GIMP 2.4.
|
||||
|
||||
|
||||
Changes in GIMP 2.4.0
|
||||
=====================
|
||||
|
||||
- further improved the rectangle select and crop tools
|
||||
- allow to mark out-of-gamut colors when doing a soft proof
|
||||
- bug fixes
|
||||
|
||||
|
||||
Changes in GIMP 2.4.0-rc3
|
||||
=========================
|
||||
|
||||
- use the new format for storing recently used files
|
||||
- added conversion options to the color profile conversion plug-in
|
||||
- allow to disable the toolbox menu on all platforms
|
||||
- further improved handling of the JPEG settings
|
||||
- switch tabs when hovering over them
|
||||
- added a PDB function to remove the alpha channel from a layer
|
||||
- plug-in previews remember the state of the Preview checkbox (bug #478657)
|
||||
- allow to grow the image/layer using the Crop tool
|
||||
- bug fixes
|
||||
|
||||
|
||||
Changes in GIMP 2.4.0-rc2
|
||||
=========================
|
||||
|
||||
- more improvements and bug fixes in the rectangle tools
|
||||
- antialias the display for zoom levels between 100% and 200%
|
||||
- fix zoomed-out display problems
|
||||
- improve handling of JPEG settings
|
||||
- fix script-fu error reporting
|
||||
- on OS X, get rid of menubars in windows and use the global menubar
|
||||
- fix plug-ins using GimpZoomPreview
|
||||
- throw properly catchable exceptions from foreign script-fu function
|
||||
(like PDB wrappers)
|
||||
- bug fixes
|
||||
|
||||
|
||||
Changes in GIMP 2.4.0-rc1
|
||||
=========================
|
||||
|
||||
- further improvement to the Print plug-in
|
||||
- completed the color management functionality for 2.4
|
||||
- store JPEG setting with the image and use them when saving as JPEG
|
||||
- further improved the rectangle tools, in particular handling of the
|
||||
fixed aspect ratio
|
||||
- added color profile selector widget
|
||||
- further improved the display quality for zoomed-out views
|
||||
|
||||
|
||||
Changes in GIMP 2.3.19
|
||||
======================
|
||||
|
||||
- support long layer names in PSD files
|
||||
- improved EXIF handling in the JPEG file plug-in
|
||||
- added control for the playback speed in the Animation Playback plug-in
|
||||
- avoid needless image preview invalidation
|
||||
- allow to edit the image comment in the Image Properties dialog
|
||||
- further improved rectangle tools
|
||||
- made JPEG save parameters user-configurable
|
||||
- avoid color conversions between identical ICC color profiles
|
||||
- improved Print plug-in
|
||||
- improved loading and saving of indexed TGA images
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Changes in GIMP 2.3.18
|
||||
======================
|
||||
|
||||
- temporarily show the hidden image statusbar while the progress is active
|
||||
- added support for loading .abr v6 Photoshop brushes
|
||||
- improved usability of color scales
|
||||
- improved display quality of zoomed-out image view
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Changes in GIMP 2.3.17
|
||||
======================
|
||||
|
||||
- improved import of multi-page TIFF files
|
||||
- reduced rounding errors in Blur routines (core and plug-ins)
|
||||
- further improved parameter checks in the PDB
|
||||
- added support for loading .abr v2 Photoshop brushes
|
||||
- improved border behavior of the Blur tool
|
||||
- show the brush outline at the Clone tool's source position
|
||||
- added libgimpbase API to retrieve the user's Pictures folder
|
||||
- add a shortcut to the user's Pictures folder to the file-chooser dialog
|
||||
- improved the quality of the Motion Blur filter
|
||||
- save paths in TIFF files
|
||||
- let the Screenshot plug-in name the new layer after the window
|
||||
- use memory slices to reduce memory fragmentation
|
||||
- some code cleanup
|
||||
- lots of bug fixes
|
||||
|
||||
|
||||
Changes in GIMP 2.3.16
|
||||
======================
|
||||
|
||||
- make the XOR color configurable as a workaround for broken drivers
|
||||
- allow to assign keyboard shortcuts to procedures without menu entry
|
||||
- allow to configure the height of the preview area in data editors
|
||||
- improved file detection in TGA plug-in
|
||||
- improved brush scaling code, now also scales up
|
||||
- converted standard pixmap brushes to parametric ones
|
||||
- improved zoom tool behavior
|
||||
- D-Bus methods now have a return value indicating success or failure
|
||||
- added more menu tooltips
|
||||
- allow procedures to request the display ID they are being called from
|
||||
- depend on GTK+ >= 2.10.6 and use some of the new functions in GTK+ 2.10
|
||||
- allow filename passed on the command-line to be opened as new images
|
||||
- various optimizations
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Changes in GIMP 2.3.15
|
||||
======================
|
||||
|
||||
- added keyboard control to rectangle tools and improved their tool options
|
||||
- improved console handling on Win32
|
||||
- support large XCF files (> 2GB) on Win32 also
|
||||
- cleanup of the internal undo system
|
||||
- ask before overwriting files, not only for image files
|
||||
- added "Revert Zoom" functionality
|
||||
- added GimpStringComboBox widget to libgimpwidgets
|
||||
- added HAL support for hotplug of Linux Input devices
|
||||
- added support for shaped windows to the Screenshot plug-in
|
||||
- improved handling of incomplete PNG files
|
||||
- categorize contributors into active and inactive
|
||||
- added controller module for DirectInput controllers on Win32
|
||||
- speed up transform tools
|
||||
- improved tool cancellation framework
|
||||
- fixed Select -> Border behaviour and added option for 'sticky image edges'
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Changes in GIMP 2.3.14
|
||||
======================
|
||||
|
||||
- added actions to control brush spacing
|
||||
- polished appearance of image window
|
||||
- scale the brush's spacing when scaling the brush
|
||||
- save tool presets when they are changed
|
||||
- improved handling of vectors in the Python bindings
|
||||
- allow for auto-cropping the result of the transform tools
|
||||
- added GimpRatioEntry widget and use it in the rectangle tool options
|
||||
- added functions to transform between preview and image coordinates
|
||||
- added PDB functions to validate display, drawable, image and vectors IDs
|
||||
- added HSL color model to Decompose and Compose plug-ins
|
||||
- further improved status bar messages for tools
|
||||
- on systems with D-Bus build gimp-remote functionality into gimp executable
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Changes in GIMP 2.3.13
|
||||
======================
|
||||
|
||||
- show information about embedded color profiles in Image Properties dialog
|
||||
- allow to apply color profiles on load (still work in progress)
|
||||
- new vectors PDB API to replace the old path API
|
||||
- added "Auntie Alias" plug-in for antialiasing on lineart
|
||||
- added Edit->Fade operation
|
||||
- added Rounded Corners option to Rectangle Select tool
|
||||
- improved WinIcon plug-in (now loads and saves 24 bit and Vista icons)
|
||||
- merged gimp-tiny-fu; replaces Script-Fu Scheme interpreter with TinyScheme
|
||||
- remember unit and interpolation type in scale and resize dialogs
|
||||
- changed default interpolation type to Cubic
|
||||
- show comment in Image Properties dialog
|
||||
- when loading in image as layers, don't merge the layers
|
||||
- added experimental palette color selector module
|
||||
- don't save thumbnails that don't match the image
|
||||
- increased tool handle sizes for better usability
|
||||
- implemented brush scaling from the tool options (only downscaling yet)
|
||||
- import paths embedded into TIFF files
|
||||
- support vectors in the Script-Fu and Python-Fu user interfaces
|
||||
- added PDB functions to retrieve position of layers/channels/vectors
|
||||
- added side pane with table of contents to the Help Browser
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Changes in GIMP 2.3.12
|
||||
======================
|
||||
|
||||
- merged the Perspective Clone tool
|
||||
- allow to pan the image view using the Space bar
|
||||
- show a thumbnail in the "Rotate JPEG?" query dialog
|
||||
- added file information to the Image Properties dialog
|
||||
- more work on the new selection tools
|
||||
- give immediate feedback when tool modifier keys are pressed
|
||||
- added Lens Distortion plug-in
|
||||
- internationalize Python binding and Python plug-ins
|
||||
- improved internal message infrastructure, use the statusbar for warnings
|
||||
- added an URL loader backend based on libcurl
|
||||
- build a color-managed CMYK color selector if lcms is available
|
||||
- localize Script-Fu procedure descriptions
|
||||
- lots of user interface polishing
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Changes in GIMP 2.3.11
|
||||
======================
|
||||
|
||||
- depend on newer versions of glib, gtk+ and pango and use some of the new
|
||||
features in these libraries
|
||||
- made Ctrl-P the default shortcut for Print
|
||||
- show progress when loading/saving XCF files
|
||||
- added support for 16/32 bit bitmaps and alpha channel to the BMP plug-in
|
||||
- if possible, detect the number of CPUs
|
||||
- allow to disable the build of the Script-Fu extension
|
||||
- many improvements to the Python bindings and the pygimp user interface
|
||||
- made message dialogs transient for the progress window
|
||||
- added PDB API for creating a selection from vectors
|
||||
- further improved status bar messages for tools
|
||||
- derive ByColorSelect and FuzzySelect tools from a common base class
|
||||
- finer control over select-by-color functionality
|
||||
- minor optimizations in the drawing code
|
||||
- abstract brush outline drawing into the common base class GimpBrushTool
|
||||
- store sample points in XCF files
|
||||
- added extended PDB API for selection procedures
|
||||
- added convenience API to libgimp that creates a layer from a GdkPixbuf
|
||||
- added midpoint handles to Scale tool for scaling with fixed width or height
|
||||
- let color picker tools select a matching color in the Palette Editor
|
||||
- allow to use foreground and background color in gradients
|
||||
- added first draft of a new Healing Brush tool
|
||||
- abstract clone tool functionality into the common base class GimpSourceTool
|
||||
- improvements to the new selection tools
|
||||
- don't wake up the gimp every so often
|
||||
- added GimpHintBox widget to libgimpwidgets
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Changes in GIMP 2.3.10
|
||||
======================
|
||||
|
||||
- added support for a registration color in the Decompose plug-in
|
||||
- the Align tool now also aligns to guides
|
||||
- allow use of CSS color notation in Script-Fu
|
||||
- more work on the new selection tools
|
||||
- let Fractal Explorer work on grayscale and give it a larger preview
|
||||
- speed up Value Invert plug-in
|
||||
- added strong undo/redo functions bound to Shift-Ctrl-[ZY]
|
||||
- use radio items for the image mode menu
|
||||
- applied Tango style on the default iconset
|
||||
- added plug-in for colormap manipulation
|
||||
- allow plug-ins to register in Layers, Channels, Vectors and Colormap dialog
|
||||
- added load plug-in to open desktop links
|
||||
- removed print plug-ins and started work on a replacement using the
|
||||
new GTK+ Print API
|
||||
- added replacements for gimp_foo_select widgets, akin to GimpFontSelectButton
|
||||
- introduced translation context to a number of colliding strings
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Changes in GIMP 2.3.9
|
||||
=====================
|
||||
|
||||
- better interpolation for "smooth" curves in the Curve tool
|
||||
- added an Auto button to the Threshold tool that picks a suitable value
|
||||
- simplified user installation, only display a dialog in case of an error
|
||||
- added Red Eye Removal plug-in
|
||||
- added thumbnail loader to GIF load plug-in
|
||||
- declared even more data as const
|
||||
- refactoring of the PDB and plug-in management code
|
||||
- allow Merge to work on a single layer
|
||||
- added a way to remove all keyboard shortcuts from the Preferences dialog
|
||||
- added menu items for "Text to Path", "Text along Path" and "Text to
|
||||
Selection"
|
||||
- allow to initialize a new layer mask with any of the image's channels
|
||||
- added clipboard brush and clipboard pattern
|
||||
- added scripts to sort color palettes
|
||||
- swap meanings of "dilate" and "erode" which have been wrong for a long time
|
||||
- show Clone tool source location while painting
|
||||
- use GtkFileChooserButton in place of GimpFileEntry
|
||||
- added script to reverse the order of layers
|
||||
- added "Sample merged" and "Selected Pixels only" options to Palette import
|
||||
- added actions to select palette and colormap colors
|
||||
- new environment variable to control which batch interpreter to use
|
||||
- give plug-ins access to the CPU detection so that they can use MMX code
|
||||
- speed up Selective Gaussian Blur plug-in
|
||||
- improved tool cursors, added edge resizing cursors
|
||||
- improved behaviour of new selection tools
|
||||
- allow to reset all gimprc values from the Preferences dialog
|
||||
- optionally show guides in the Crop tool
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Changes in GIMP 2.3.8
|
||||
=====================
|
||||
|
||||
- added new tile primitive Triangle to Mosaic plug-in
|
||||
- speed up Gaussian Blur plug-in
|
||||
- suppress redundant progress updates from plug-ins
|
||||
- changed some gimprc and sessionrc default values (window hints,
|
||||
fullscreen mode)
|
||||
- do not focus transform tool dialogs on map
|
||||
- renamed Magnify tool to Zoom tool and added some missing tool shortcuts
|
||||
- added a submenu with recently used plug-ins to the Filters menu
|
||||
- fixed look-up table used for Contrast adjustments
|
||||
- improved the user interface of the Animation Playback plug-in
|
||||
- added framework for describing menu entries in the statusbar
|
||||
- added lots of helpful blurbs to procedures and core actions
|
||||
- remove color from the Watercolor selector if Shift is being pressed
|
||||
- ported PDB internals to GParamSpec and GValue
|
||||
- speedup and UI improvements for the SIOX tool
|
||||
- added parasite getters and settors for vectors
|
||||
- made PSD load and save plug-ins 64bit clean
|
||||
- some string review
|
||||
- ported ellipse select tool to the new rectangle tool
|
||||
- added basic support for layer masks to the PSD save plug-in
|
||||
- avoid relocations by declaring more data as const
|
||||
- new application icons in more sizes and as a SVG
|
||||
- provide script-specific samples instead of hard-coding "Aa" for font preview
|
||||
- build the Screenshot plug-in on all platforms
|
||||
- allow to discard invisible layers when merging visible layers
|
||||
- nicer output from gimp-procedural-db-dump
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Changes in GIMP 2.3.7
|
||||
=====================
|
||||
|
||||
- depend on GTK+ 2.8, use some of the new features
|
||||
- removed workarounds for problems in GTK+ 2.6
|
||||
- moved Align Visible Layers to the Image menu
|
||||
- started to add a new vectors PDB API
|
||||
- make it more obvious that docks can be rearranged by drag and drop
|
||||
- modified the behaviour of the Tab key
|
||||
- added --license command-line option
|
||||
- improved dither matrix for RGB->Indexed conversion
|
||||
- added PDB API to stroke with any paint method
|
||||
- gave some plug-ins more sensible names
|
||||
- keep settings of brush/pattern/font/... button popups across sessions
|
||||
- reduced number of memory allocations by declaring some strings as static
|
||||
- some improvements to the plug-in preview widgets
|
||||
- added links to important topics in the user manual
|
||||
- let the configure script display a summary of options
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Changes in GIMP 2.3.6
|
||||
=====================
|
||||
|
||||
- even faster application startup
|
||||
- binary relocatibility on Linux by means of binreloc
|
||||
- be more verbose when being asked for it
|
||||
- select color index when picking from an indexed drawable
|
||||
- allow to migrate windows between displays
|
||||
- mouse-wheel scrolling and zooming in plug-in previews
|
||||
- added keyboard shortcuts ([ and ]) for changing the brush radius
|
||||
- improved Oilify plug-in
|
||||
- made the IWarp plug-in preview resizeable
|
||||
- added alignment mode for cloning from a fixed location source
|
||||
- completed core/ui separation of paint tools and paint methods
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Changes in GIMP 2.3.5
|
||||
=====================
|
||||
|
||||
- optionally add jitter to paint strokes
|
||||
- implemented Snap to Path
|
||||
- added PDB API to access the Image Grid
|
||||
- ease access to Keyboard Shortcuts editor
|
||||
- optimizations to the Tile Cache and Undo/Redo implementations
|
||||
- more work on the Buffer PDB API
|
||||
- bug fixes to the new zoomable plug-in previews
|
||||
- optimization of the SIOX algorithm
|
||||
- menu reorganisation in the Toolbox menu
|
||||
- export "Open As Layer" to the PDB as file-load-layer
|
||||
- added keyboard control for the Curves tool
|
||||
- load and save embedded ICC profiles from/to PNG images
|
||||
- improved appearance of some tool icons on dark background
|
||||
- added PDB API to get and set path visibility
|
||||
- let data editors follow the active brush, palette and gradient (optional)
|
||||
- some rearrangements in the new toplevel Colors menu
|
||||
- speed up reloading of data files
|
||||
- allow to copy the location of data files to the clipboard
|
||||
- allow to disable saving of the document history in the preferences
|
||||
- slightly faster application startup
|
||||
- more use of ngettext for plural forms
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Changes in GIMP 2.3.4
|
||||
=====================
|
||||
|
||||
- allow plug-ins and scripts to register menu entries in the <Brushes>,
|
||||
<Gradients>, <Palettes>, <Patterns> and <Fonts> menus
|
||||
- replaced Selection to Brush/Pattern scripts with scripts that paste
|
||||
a new brush/pattern from the content of the clipboard
|
||||
- allow to easily close all opened images
|
||||
- added a first version of a Print plug-in using libgnomeprint
|
||||
- improved Sphere Designer plug-in
|
||||
- improved Compose plug-in
|
||||
- added a zoomable preview widget for plug-ins
|
||||
- implement copy and paste of paths as SVG
|
||||
- use new stock icons introduced with GTK+ 2.6
|
||||
- allow to zoom in/out using the +/- keys on the numerical keypad
|
||||
- make it easier to drop dockables below the toolbox
|
||||
- set plug-in dialogs transient to the window they have been called from
|
||||
- added PDB function to obtain handles to the image and progress windows
|
||||
- export named buffers to the PDB
|
||||
- easier access to the popup menu in empty container views
|
||||
- use ngettext for plural forms
|
||||
- implement "Sample Merged" for the Clone tool
|
||||
- various Win32 fixes
|
||||
- fixed capitalization for better HIG compliance
|
||||
- use a descriptive verb instead of "OK" as button label in most dialogs
|
||||
- redone About dialog to be more informative
|
||||
- take the default unit from the locale settings
|
||||
- moved color-related tools and plug-ins to a new toplevel Colors menu
|
||||
- let the gnomevfs plug-in use GNOME authentication manager if available
|
||||
- rewritten Crop tool (work in progress)
|
||||
- added page selector to the Postscript Import plug-in
|
||||
- added preview to Checkerboard and Threshold Alpha plug-ins
|
||||
- more PDB procedure and parameter name canonicalization
|
||||
- touched up new path tool cursors and added one for the Join operation
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Changes in GIMP 2.3.3
|
||||
=====================
|
||||
|
||||
- improved new GimpPageSelector widget
|
||||
- minor improvements to the Procedure and Plug-In browsers
|
||||
- set alternative button order in some places that were missed earlier
|
||||
- added SIOX algorithm for foreground extraction
|
||||
- fixed most gcc 4.0 warnings
|
||||
- improved Cursor view and Sample Points functionality
|
||||
- prepared code and UI for more layer lock types
|
||||
- added new PDF import plug-in based on libpoppler
|
||||
- undeprecated and improved palette editor, added cursor navigation
|
||||
- show more information in the Image Properties dialog
|
||||
- added prototype of SIOX foreground selection tool
|
||||
- fixed build of MMX code on gcc 4.0
|
||||
- moved procedure browser to libgimpwidgets as GimpProcBrowserDialog
|
||||
- canonicalize PDB procedure and parameter names
|
||||
- use the coefficients from the sRGB spec when calculating luminance
|
||||
- allow to remove alpha channel from a layer
|
||||
- added more different cursors for the paths tool
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Changes in GIMP 2.3.2
|
||||
=====================
|
||||
|
||||
- more standard way of dealing with translation of the startup tips
|
||||
- allow to use the selected font in the text tool's text editor
|
||||
- some minor UI changes for HIG compliance
|
||||
- redid the framework that deals with installing desktop files
|
||||
- started to reorganize menus, mainly plug-ins and scripts
|
||||
- renamed "Scatter RGB" and "Scatter HSV" to "RGB Noise" and "HSV Noise"
|
||||
- allow to clear the document history
|
||||
- don't normalize the result in the Laplace plug-in (bug #306874)
|
||||
- ported FractalExplorer GUI to GtkTreeView, getting rid of the last
|
||||
XPM icons that were being used
|
||||
- added an option to Motion Blur to blur outwards
|
||||
- added support for the proposed ICC Profiles In X Specification
|
||||
- added new widget GimpEnumLabel to libgimpwidgets
|
||||
- let the lcms display filter module show information about the used
|
||||
color profiles
|
||||
- improved drawing of the brush outline
|
||||
- fixed build of Python language binding on Win32
|
||||
- allow plug-ins to access the user's color management configuration
|
||||
- added new widget GimpPageSelector to libgimpwidgets
|
||||
- reenabled the Debug menu
|
||||
- load and save ICC color profiles from/to JPEG images
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Changes in GIMP 2.3.1
|
||||
=====================
|
||||
|
||||
- allow to copy and paste SVG between GIMP and other applications
|
||||
- added a utility for testing and debugging clipboard operations
|
||||
- more work on the new vectors PDB API
|
||||
- made screen edges active in the image display in fullscreen mode
|
||||
- made file and color selection dialogs transient to their parent windows
|
||||
- moved browser widget from Procedure Browser plug-in to libgimpwidgets
|
||||
- allow more search types in the Procedure Browser
|
||||
- reduced size of the Colors dockable by moving the hex entry down
|
||||
- added object properties to GimpColorArea and GimpColorButton
|
||||
- changed default for RGB->Indexed conversion to not to any dithering
|
||||
- allow to paste a new image using Ctrl-V on the toolbox
|
||||
- show previews of dash presets in Stroke Options dialog
|
||||
- Escape key cancels the window selection in the Screenshot plug-in
|
||||
- allow to operate the Brightness Contrast tool by clicking and dragging
|
||||
on the canvas
|
||||
- improved Sample Points dockable
|
||||
- added first draft of new align tool
|
||||
- turned image and drawable combo boxes in libgimpui into real widgets
|
||||
- further improved Python bindings
|
||||
- nicer DND icons for viewables
|
||||
- allow to hide the button-bar found at the bottom of most dockables
|
||||
- turned font selection in libgimpui into a real widget
|
||||
- added support for BMP files with alpha channel (RGBA)
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Changes in GIMP 2.3.0
|
||||
=====================
|
||||
|
||||
- added Recompose plug-in
|
||||
- added rectangle tool in GFig plug-in
|
||||
- improved palette editor color DND
|
||||
- improved EXIF handling in JPEG plug-in
|
||||
- smoother autoscrolling in image display
|
||||
- added Snap to Canvas Border and Snap to Path (yet unimplemented)
|
||||
- added previews to Mosaic, Pixelize and Sparkle plug-ins
|
||||
- added Lanczos interpolation method
|
||||
- added Open as Image menu entries to brushes and patterns dialogs
|
||||
- improved drag-n-drop of drawables within GIMP
|
||||
- added a prototype of a new rectangular select tool
|
||||
- moved a bunch of enums from core into libgimpbase
|
||||
- moved GimpConfig functionality from core into libgimpconfig
|
||||
- moved GimpEnumStore and GimpEnumComboBox to libgimpwidgets
|
||||
- moved convenience constructors for property views to libgimpwidgets
|
||||
- ported ImageMap plug-in to action based menus.
|
||||
- first steps towards color management
|
||||
- use GOptionContext for command-line parsing
|
||||
- added a gnome-vfs backend for the uri plug-in (former url plug-in)
|
||||
- prepared code for accessing remote files in the file-chooser
|
||||
- let all dialogs obey the gtk-alternative-button-order setting
|
||||
- extended GimpProgress PDB API
|
||||
- improved file type handling in file save dialog
|
||||
- resurrected threaded pixel processor and enable it by default
|
||||
- parallelized a few more internal functions
|
||||
- speed up gradient dithering
|
||||
- improved PSD save plug-in
|
||||
- improved Python bindings
|
||||
- allow to resize layers with the image
|
||||
- allow to control letter spacing in the text tool
|
||||
- added path-on-path functionality, use it to implement Text on Path
|
||||
- improved gradient editor
|
||||
- allow to import paths from a string
|
||||
- ported all code to gstdio wrappers
|
||||
- added infrastructure for color sample points
|
||||
- added first draft of a metadata editor plug-in
|
||||
- speed up burn compositing function
|
||||
- added Altivec versions of some compositing functions
|
||||
- added PDB API to control the number of columns in a palette
|
||||
- allow to control hue overlap in Hue-Saturation tool
|
||||
- added a PDB API to register menu branches
|
||||
- added missing mnemonics
|
||||
- improved Screenshot plug-in
|
||||
- allow to drag brushes/patterns/gradients... to the selectors in Script-Fu
|
||||
- allow to save images by dragging them to a filemanager that supports the
|
||||
XDS protocol
|
||||
- optimizations in the Color Deficiency display filter
|
||||
- transfer the clipboard content to a clipboard manager on exit
|
||||
- moved cursor info out of the Info window into a dockable
|
||||
- moved remaining bits of the Info Window to a new Image Properties dialog
|
||||
- build and install gimp-console by default
|
||||
- allow to drag and drop image data into GIMP
|
||||
- use the statusbar more to display hints and info about the tool state
|
||||
- resurrected --no-data functionality
|
||||
- zoom to the cursor position instead of the display center
|
||||
- some improvements to the Helpbrowser plug-in
|
||||
- load PS brushes in the .abr format
|
||||
- allow to choose between different algorithms for Desaturate
|
||||
- added thumbnail loader to Winicon plug-in
|
||||
- improved configuration of input controllers
|
||||
- added an option to make the dock windows transient to the active image display
|
||||
- lots of code cleanup and bug-fixes
|
254
NEWS.pre-2-6
Normal file
254
NEWS.pre-2-6
Normal file
|
@ -0,0 +1,254 @@
|
|||
------------------------------
|
||||
GNU Image Manipulation Program
|
||||
Development Branch
|
||||
------------------------------
|
||||
|
||||
This is the unstable development branch of GIMP. Here we are working
|
||||
towards the next stable release, which will be GIMP 2.6.
|
||||
|
||||
|
||||
Changes in GIMP 2.6.0
|
||||
=====================
|
||||
|
||||
- further improved error reporting and parameter checks for some procedures
|
||||
- fixed printing of indexed images (bug #552609)
|
||||
- further code cleanup in Script-Fu extension
|
||||
- improved Brightness->Contrast -> Levels -> Curves parameter conversion
|
||||
- made the font size in the docks configurable in the gtkrc file
|
||||
- renamed File->New submenu to File->Create
|
||||
- moved the "Use GEGL" check-box to the Colors menu
|
||||
- added new scale procedures allowing to specify the interpolation
|
||||
explicitly (bug #486977)
|
||||
- lots of bug fixes
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Sven Neumann, Michael Natterer, Martin Nordholts, Simon Budig,
|
||||
Tor Lillqvist, Barak Itkin
|
||||
|
||||
|
||||
|
||||
Changes in GIMP 2.5.4
|
||||
=====================
|
||||
|
||||
- improved look and feel of the Navigation dialog and navigation popups
|
||||
- improved positioning of the image in the image window
|
||||
- by default turned off use of GEGL for color operations
|
||||
- moved the "Use GEGL" checkbox to the Debug menu
|
||||
- optimized the new scaling code
|
||||
- various fixes to the Python bindings
|
||||
- added Python bindings for most GIMP widgets to the gimpui module
|
||||
- merged GimpHRuler and GimpVRuler classes into GimpRuler
|
||||
- added Search entry to the Keyboard Shortcuts and Input Controller
|
||||
configuration dialogs
|
||||
- allow to drop images (in addition to URIs) on the empty image window
|
||||
- improved error handling in Script-Fu
|
||||
- merged upstream TinyScheme changes into Script-Fu interpreter
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Sven Neumann, Michael Natterer, Martin Nordholts, Tor Lillqvist,
|
||||
Lars-Peter Clausen, Michael Schumacher, Kevin Cozens, Barak Itkin,
|
||||
David Gowers, Dennis Ranke
|
||||
|
||||
|
||||
|
||||
Changes in GIMP 2.5.3
|
||||
=====================
|
||||
|
||||
- some fixes for the 64-bit Windows platform
|
||||
- optionally emulate brush dynamics when stroking a path or selection
|
||||
- further work on the scroll-beyond-image-borders feature, improving the
|
||||
behavior of the image display when zooming or when the image size changes
|
||||
- added links to the user manual to the Tips dialog
|
||||
- largely rewritten scaling code improves scaling quality, in particular
|
||||
when scaling down
|
||||
- allow to copy-on-write from the image projection
|
||||
- added "Paste as new layer" to Edit menu
|
||||
- added "New from visible" to the Layer menu allowing to create a new
|
||||
layer from the image projection
|
||||
- added new procedure 'gimp-layer-new-from-visible'.
|
||||
- renamed all file plug-in executables to a have a file prefix
|
||||
- changed the HSV color selector to use the GtkHSV widget
|
||||
- changed the default for the 'trust-dirty-flag' gimprc property
|
||||
- dropped the "Starburst" logo script
|
||||
- improved the behavior of the zoom button in the upper right corner of
|
||||
the image window
|
||||
- allow PDB procedures to pass an error message with their return values
|
||||
- changed all file plug-ins to pass their error messages with the
|
||||
return values instead of raising an error dialog
|
||||
- adapt the display of the pointer position in the statusbar to the
|
||||
pointer precision of the active tool
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Sven Neumann, Michael Natterer, Martin Nordholts, Alexia Death,
|
||||
Tor Lillqvist, Geert Jordaens, Daniel Eddeland, Aurimas Juška,
|
||||
Róman Joost, Luidnel Maignan, Barak Itkin, Aurore Derriennic
|
||||
|
||||
|
||||
|
||||
Changes in GIMP 2.5.2
|
||||
=====================
|
||||
|
||||
- final touches on the combined Freehand/Polygon Select tool
|
||||
- added a dialog for managing Color tool settings
|
||||
- prepared the code for changes in the upcoming GTK+ release
|
||||
- improved popup scale button
|
||||
- mark the center of rectangles/bounding rectangles during moves
|
||||
- added dialog to query for using the online user manual
|
||||
- allow to map dynamics to hardness for the Eraser tool
|
||||
- provide gimp-remote functionality on Windows
|
||||
- disable the build and install of the gimp-remote tool by default
|
||||
- allow to scroll beyond the image borders
|
||||
- added new PDB data type for transferring color arrays
|
||||
- added new PDB function gimp-palette-get-colors
|
||||
- added text search to the Help Browser plug-in
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Sven Neumann, Michael Natterer, Martin Nordholts, Manish Singh,
|
||||
Lars-Peter Clausen, Alexia Death, Tor Lillqvist, Róman Joost,
|
||||
Jakub Steiner
|
||||
|
||||
|
||||
Changes in GIMP 2.5.1
|
||||
=====================
|
||||
|
||||
- further improvements to the status bar
|
||||
- made the center point of rectangles snap to the grid and rulers
|
||||
- improved Alpha to Logo filters
|
||||
- better cursor feedback in the Intelligent Scissors tool
|
||||
- rotate JPEG thumbnails according to the EXIF orientation
|
||||
- improved event smoothing for paint tools
|
||||
- prepared PSP plug-in to deal with newer versions of the file format
|
||||
- allow plug-ins to work in parallel on different layers of the same image
|
||||
- pass through GEGL command-line options
|
||||
- added 22 new variations to the Flame plugin
|
||||
- only show operations from relevant categories in the GEGL tool
|
||||
- allow to enter the zoom ratio in the status bar
|
||||
- don't keep the file-chooser dialogs around
|
||||
- ported scan-convert code to Cairo, removing libart dependency
|
||||
- allow the paint velocity to affect brush size, opacity and the like
|
||||
- allow for random variations of the brush size, opacity and the like
|
||||
- renamed Dialogs menu to Windows
|
||||
- keep a list of recently closed docks in the Windows menu
|
||||
- allow to go from Brightness-Contrast to Levels to Curves
|
||||
- improved the handling of color tool settings
|
||||
- merged the new Polygon Selection tool with the Freehand Select tool
|
||||
- allow to lock dockables
|
||||
- made Desaturate into a tool with preview in the image window
|
||||
- ported translation contexts to msgctxt
|
||||
- added GimpRuler widgets, an improved version of GtkRuler
|
||||
- moving the selection mask now commits a pending rectangle selection
|
||||
- added keyboard shortcut for resetting the brush scale (Backslash)
|
||||
- ported the Help Browser plug-in to WebKit
|
||||
- allow to use the online user manual
|
||||
- added new translation (Icelandic)
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Sven Neumann, Michael Natterer, Martin Nordholts, Øyvind Kolås,
|
||||
Alexia Death, Ulf-D. Ehlert, Daniel Hornung, Michael Deal, Aurimas Juška,
|
||||
Luis Barrancos
|
||||
|
||||
|
||||
|
||||
Changes in GIMP 2.5.0
|
||||
=====================
|
||||
|
||||
Core:
|
||||
|
||||
- improved rectangle tool drawing for narrow mode
|
||||
- ported lots (but not all) drawing code to Cairo
|
||||
- optimized image rendering by using pre-multiplied alpha
|
||||
- use new GLib features such as GRegex
|
||||
- use new GTK+ features such as the new GtkTooltip API
|
||||
- much improved GimpCurve object
|
||||
- cleaner and smaller tool options
|
||||
- enable brush scaling for the Smudge tool
|
||||
- added debugging framework that can be enabled at run-time
|
||||
- depend on GEGL and use it optionally in some color operations
|
||||
- optional GEGL processing for all color tools
|
||||
- add proper settings objects for all color tools
|
||||
- add list of recently used settings to all color tools
|
||||
- added experimental GEGL tool to use arbitrary GEGL operations
|
||||
- event filtering and smoothing for better paint tool performance
|
||||
- added motion constraints in the Move Tool
|
||||
- some operations do not any longer automatically add an alpha channel
|
||||
- some preparation for tagging resource files
|
||||
- cutting a selection doesn't clear the selection any longer
|
||||
- added new polygon select tool
|
||||
- load brushes and other data files recursively (search through subdirs)
|
||||
- started work on language selector for the text tool (unfinished)
|
||||
- allow to set opacity of the transform tool preview
|
||||
- merged toolbox menu into the image menu
|
||||
- always keep an image window around
|
||||
- improved image statusbar
|
||||
- dropped 'documents' in favor of ~/.recently-used.xbel
|
||||
- started to work on text box functionality in the text tool
|
||||
- numerous bug fixes and cleanups
|
||||
|
||||
|
||||
Plug-ins:
|
||||
|
||||
- dicom: improved handling of 16 bit image data
|
||||
- help: use GIO to access the help index
|
||||
- print: moved Page Setup out of the Print dialog
|
||||
- psd-load: rewritten, cleaner and more features
|
||||
- randomize: added previews
|
||||
- ripple: added a Phase Shift control
|
||||
- screenshot: optionally add the mouse cursor image on an extra layer
|
||||
- uri: use GIO/GVfs where available
|
||||
- whirlpinch: allow a larger range for the whirl angle
|
||||
|
||||
|
||||
Python binding:
|
||||
|
||||
- allow to specify colors using CSS color names
|
||||
- added new method Image.new_layer()
|
||||
|
||||
|
||||
Script-Fu:
|
||||
|
||||
- enforce R5RS syntax for 'let'
|
||||
- improved Frosty Logo script
|
||||
|
||||
|
||||
PDB:
|
||||
|
||||
- added new text layer API
|
||||
- added gimp-vectors-export-to-file and gimp-vectors-export-to-string
|
||||
- added procedure to test for existence of a procedure in the PDB
|
||||
- improved error handling for procedures
|
||||
|
||||
|
||||
Libraries:
|
||||
|
||||
- added some Cairo utilities
|
||||
- allow to use markup in tooltips
|
||||
- libgimpthumb doesn't any longer depend on other GIMP libraries
|
||||
|
||||
|
||||
Miscellaneous:
|
||||
|
||||
- use the gimptool program on Unix, too, instead of the gimptool script
|
||||
- create the list of supported MIME types at compile-time
|
||||
- gimp shows library versions when called with '--version --verbose'
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Sven Neumann, Michael Natterer, Martin Nordholts, Bill Skaggs,
|
||||
Øyvind Kolås, Manish Singh, Kevin Cozens, Alexia Death, Tor Lillqvist,
|
||||
Marcus Heese, John Marshall, Joao S. O. Bueno, Jakub Steiner,
|
||||
Simon Budig, Tom Lechner, Hans Breuer, ...
|
642
NEWS.pre-2-8
Normal file
642
NEWS.pre-2-8
Normal file
|
@ -0,0 +1,642 @@
|
|||
------------------------------
|
||||
GNU Image Manipulation Program
|
||||
Development Branch
|
||||
------------------------------
|
||||
|
||||
This used to be the development branch that lead to GIMP 2.8.
|
||||
|
||||
|
||||
Changes in GIMP 2.8.0
|
||||
=====================
|
||||
|
||||
|
||||
Core:
|
||||
|
||||
- Add our own GimpOperationBrightnessContrast because GEGL one is different
|
||||
|
||||
|
||||
Plug-ins:
|
||||
|
||||
- Fix some GFig rendering issues
|
||||
|
||||
|
||||
Source and build system:
|
||||
|
||||
- Depend on Babl 0.1.10, GEGL 0.2.0 and some other new library versions
|
||||
|
||||
|
||||
General:
|
||||
|
||||
- Bug fixes
|
||||
- Translation updates
|
||||
|
||||
|
||||
Changes in GIMP 2.7.5
|
||||
=====================
|
||||
|
||||
|
||||
UI:
|
||||
|
||||
- Minor application menu fixes on the Mac
|
||||
- Make the toolbox arbitrarily resizable again
|
||||
- Add axis labels to the dynamics curves to make them more obvious
|
||||
- Fix dockable showing to do the right thing in both MWM and SWM
|
||||
- Fix some glitches in the tool preset UI, like proper sensitivity
|
||||
|
||||
|
||||
Core:
|
||||
|
||||
- Restore autoshrink functionality in the rectangle tools
|
||||
- Allow smudge to work with dynamic brushes
|
||||
- Make sure tool presets and tool options are consistent after loading
|
||||
- Add automatic tags for the folders a file lives in
|
||||
- Make the default Quick Mask color configurable
|
||||
- Fix Color Balance so the "range" setting actually makes a difference
|
||||
|
||||
|
||||
Plug-ins:
|
||||
|
||||
- Proper toplevel item sorting in the help browser
|
||||
- Use libraries instead of launching programs in file-compressor
|
||||
- Use the Ghostscript library instead of launching ghostscript
|
||||
- Allow to switch off antialiasing when importing from PDF
|
||||
- Embed the page setup in the main print dialog
|
||||
- Port Gfig to cairo
|
||||
|
||||
|
||||
Libgimp:
|
||||
|
||||
- Add PDB API to modify a lot of paint and ink options
|
||||
|
||||
|
||||
Data:
|
||||
|
||||
- Add a new set of default brushes and tool presets from Ramon Miranda
|
||||
|
||||
|
||||
Developer documentation:
|
||||
|
||||
- Update everything including app/ so all functions appear again
|
||||
|
||||
|
||||
Source and build system:
|
||||
|
||||
- Remove the unmaintained makefile.msc build system
|
||||
- Explicitly link plug-ins to -lm when needed
|
||||
- Also create .xz tarballs
|
||||
|
||||
|
||||
General:
|
||||
|
||||
- Lots of bug fixes
|
||||
- Tons and tons of translation updates
|
||||
|
||||
|
||||
Changes in GIMP 2.7.4
|
||||
=====================
|
||||
|
||||
|
||||
UI:
|
||||
|
||||
- Add a close button to image tabs in single-window mode
|
||||
- Improve the transform tools' undo strings to be more descriptive
|
||||
- Render the layer's "eye" icon in inconsistent state if the layer is
|
||||
visible, but one of its parents isn't
|
||||
- Add proper stacking for canvas items, so things don't hide each other
|
||||
- Make sure single-window-mode and multi-window-mode are always saved
|
||||
consistently in sessionrc
|
||||
|
||||
|
||||
Core:
|
||||
|
||||
- Fix "render_image_tile_fault: assertion `tile[4] != NULL' failed"
|
||||
warnings that occurred for some image sizes
|
||||
- Fix attachment of the floating selection when the gegl projection
|
||||
is enabled
|
||||
- Replace heal algorithm with a new one by Jean-Yves Couleaud that
|
||||
works much better
|
||||
- Make resource sub-folders show up in UI as tags, allowing users
|
||||
to easily locate resource collections they may have installed
|
||||
- Fix graphics tablet canvas interaction by moving from
|
||||
gdk_pointer_grab() to gtk_grab_add() for most grabs
|
||||
- Stop using motion hints, they are a concept from the dark ages
|
||||
|
||||
|
||||
Libgimp:
|
||||
|
||||
- Add a basic paint dynamics PDB interface
|
||||
|
||||
|
||||
Plug-ins:
|
||||
|
||||
- Make writing color space information to BMP files optional
|
||||
- PSD loader now reads and imports working paths
|
||||
|
||||
|
||||
Script-Fu:
|
||||
|
||||
- Lots and lots of undeprecations
|
||||
|
||||
|
||||
Developer documentation:
|
||||
|
||||
- Add devel-docs/gegl-porting-plan.txt
|
||||
|
||||
|
||||
Source and build system:
|
||||
|
||||
- Make git-version.h generation work in shallow git clones
|
||||
- Modernize use of autotools a bit, maintainer-mode and pdbgen
|
||||
are now enabled by default
|
||||
|
||||
|
||||
General:
|
||||
|
||||
- Make gimptool install scripts in the correct system-wide directory
|
||||
- Fix lots and lots of stuff found by static code analysis
|
||||
|
||||
|
||||
Changes in GIMP 2.7.3
|
||||
=====================
|
||||
|
||||
|
||||
UI:
|
||||
|
||||
- Use GimpSpinScales instead of scale entries in all dockable widgets
|
||||
- Allow the spin scale to control a range larger than its scale's range
|
||||
- Implement RTL mode in GimpSpinScale
|
||||
- Add lots of tooltips to tool options
|
||||
- Allow to drop more things to the empty image window, and simply
|
||||
create new images from them
|
||||
- Cage tool: allow to add handle to the cage when clicking on an edge
|
||||
- Cage tool: allow to remove selected handles from the cage by hitting delete
|
||||
- Remember column widths in multi-column dock windows
|
||||
- Support starting GIMP in single-window mode
|
||||
- When the brush is shared among paint tools, also share all
|
||||
brush-modifying paint options
|
||||
- Use ALT+number and ALT+Tab shortcuts to navigate between images
|
||||
in both single- and multi-window mode
|
||||
- Make 'Export to' always activatable and fall back to 'Export...' if
|
||||
no export target has been set yet
|
||||
- In single-window mode, add new dockable dialogs to the image window
|
||||
instead of in a new window
|
||||
- When switching on single-window mode, put docks in the image window
|
||||
depending on what side of the window they originally had
|
||||
- When switching off single-window mode, distribute dock windows
|
||||
better
|
||||
- Add a canvas item for the transform grid, fixing a major speed
|
||||
regression, and add the same guides options as in the rectangle tools
|
||||
- Don't unmaximize the single-window mode image window when closing
|
||||
images
|
||||
- Resurrect the "You can drop dockable dialogs here" help string
|
||||
below the toolbox
|
||||
- Make pick-and-move with the Move Tool work for layers in a layer
|
||||
group
|
||||
|
||||
|
||||
Core:
|
||||
|
||||
- Add GimpMotionBuffer which abstracts away stroke smoothing behind
|
||||
a simple API and takes it out of GimpDisplayShell
|
||||
- Add a GimpIdTable utility class
|
||||
- Add a GimpDockContainer interface
|
||||
- Add a GimpSessionManaged interface
|
||||
- Add GimpCanvasRectangleGuides which makes the rectangle tool's
|
||||
guides draw properly
|
||||
|
||||
|
||||
Libgimp:
|
||||
|
||||
- Make libgimp depend on GdkPixbuf
|
||||
- Add API to create layers from cairo surfaces
|
||||
- Make it impossible to include individual files from any GIMP
|
||||
library. This was always forbidden and designed so it most
|
||||
probably breaks, but now it reliably breaks using #error
|
||||
- Deprecate the "set_sensitive" logic and use g_object_bind_property()
|
||||
|
||||
|
||||
Plug-ins:
|
||||
|
||||
- Use poppler's cairo API to load PDFs, the pixbuf API is removed
|
||||
- Port screenshot from GdkPixbuf to cairo
|
||||
- Fix the annoying parser build warnings in imagemap
|
||||
- Add a check-for-deprecated-procedures-in-script-fu make target
|
||||
- Update libpng code to not use deprecated API (file-mng and file-png)
|
||||
- Add an Item class to pygimp
|
||||
- Correct/update some labels and defaults in the JPEG plug-in's save dialog UI
|
||||
- Fix "Bug 596410 - gimp-image-get-filename returns NULL for imported files"
|
||||
|
||||
|
||||
Developer documentation:
|
||||
|
||||
- Many updates
|
||||
|
||||
|
||||
Source and build system:
|
||||
|
||||
- Make cairo a global dependency, starting at libgimpcolor
|
||||
- Require poppler >= 0.12.4
|
||||
- Remove gimp-remote for good, it has been disabled for years
|
||||
|
||||
|
||||
General:
|
||||
|
||||
- Some more undeprecations now that we use GTK+ 2.24
|
||||
- Fix lots of warnings that are new in -Wall in GCC 4.6
|
||||
- Lots of bug fixes and cleanup
|
||||
- Lots of translation updates
|
||||
|
||||
|
||||
Changes in GIMP 2.7.2
|
||||
=====================
|
||||
|
||||
|
||||
UI:
|
||||
|
||||
- A lot of undeprecations due to GTK+ 2.22 and 2.24
|
||||
- Lots and lots of cairo porting, calls to gdk_draw_* are gone
|
||||
- Merge the cage transform tool from GSoC
|
||||
- Remove the old bitmap cursors completely and always use RGBA cursors
|
||||
also for compat cursors for old X servers
|
||||
- Add new GimpCanvasItem infrastructure with subclasses for everything
|
||||
that needs to be drawn on the canvas and port all tools to canvas items,
|
||||
this is a huge change that touches all tools and almost all display
|
||||
code, and which finally gets rid of XOR drawing altogether
|
||||
- Switch from purely idle-rendering the display to something that ensures
|
||||
a minimum framerate, so we don't fail to update under heavy load
|
||||
- Make the text tool handle RTL mode better
|
||||
- Change GimpColorMapEditor to use the newly added proxy GimpPalette
|
||||
- Replace the brush scale control in tool options by a brush size
|
||||
one that works in pixels, and does the right thing when the brush
|
||||
changes
|
||||
- Add new widget GimpSpinScale which is a scale with number entry,
|
||||
and use it in all tool options
|
||||
- Make the brush, pattern etc. selectors in tool options more
|
||||
compact and allow to directly jump to the editor dialogs
|
||||
- Make handle sizes in tools consistent
|
||||
- Add an on-canvas progress and use it for tool progress instead of
|
||||
the statusbar
|
||||
- Add a new GimpToolPalette class with lots of code that was
|
||||
in GimpToolBox
|
||||
- Allow to properly drop into and after a layer group
|
||||
- Refactor and clean up the dynamics editor widget, and add colors
|
||||
for the curves
|
||||
- Add support for F2 to rename items in lists
|
||||
- Clean up GimpDeviceStatus internally and visually
|
||||
- Allow to set GimpToolPreset's icon using the new GimpIconPicker widget
|
||||
- Make the text tool's style overlay show default values from the
|
||||
text object if there is no style active at the cursor position/selection
|
||||
- Show the the text size's unit in the text style overlay
|
||||
- Make tool dialogs transient to the image window again
|
||||
- Consistently add a "gimp-" prefix to all window roles
|
||||
- Make the preset buttons in tool options work on the global tool
|
||||
presets instead of the removed per-tool preset lists
|
||||
- Add GimpControllerMouse, which allows to bind extra mouse buttons to
|
||||
arbitrary actions
|
||||
|
||||
|
||||
Core:
|
||||
|
||||
- Add uniform API to turn any GimpItem's outline into a selection
|
||||
- Add support for color tags in text layers
|
||||
- Remove the selection_control() stuff from GimpImage and with it
|
||||
maybe last piece of UI code still not properly separated
|
||||
- Add more validation code for XCF loading
|
||||
- Add accessors to GimpPalette and use them globally
|
||||
- Keep a proxy GimpPalette around for the image's colormap
|
||||
- Don't scale SVGs when pasting or importing them
|
||||
- A lot of changes to the input device handling code, partly
|
||||
merged from the gtk3-port branch, add GimpDeviceManager class
|
||||
- Add smoothing of paint strokes
|
||||
- Fix display filters to work on a cairo surface
|
||||
- Fix and enhance GimpImage's URI/filename handling API
|
||||
- Unset "removed" flag on items when they get added back to
|
||||
the image from the undo stack
|
||||
- Change item creation to properly use GObject properties and
|
||||
remove item_configure() and drawable_configure()
|
||||
- Refactor tool event handling and move lots of stuff into
|
||||
utility functions
|
||||
- Clean up GimpViewRenderer API
|
||||
- Implement transforms on group layers
|
||||
- Clean up the transform tool a lot, and refactor away old junk
|
||||
- Tool and tool event cleanup: enforce tool activate/halt invariants,
|
||||
consistently shutdown all tools in control(HALT), and many other
|
||||
tool fixes
|
||||
- Remove GimpToolPresets object, this functionality got merged into
|
||||
the new GimpToolPreset system
|
||||
- Rename GimpFilteredContainer to GimpTaggedContainer and add a new
|
||||
GimpFilteredContainer parent class which is a generic filter
|
||||
- Remove the concept of an "offset" from TileManager and instead
|
||||
pass around the offsets explicitly when needed, like when
|
||||
transforming
|
||||
- Move GimpBezier desc from vectors/ to core/ and add API to create
|
||||
one from sorted BoundSegs
|
||||
- Change GimpBrush boundary API to return a GimpBezierDesc
|
||||
- Add GimpBrushCache object and use it to cache a brush's transformed
|
||||
pixels and its outline, remove the caching code from GimpBrushCore
|
||||
- Add GimpBezierDesc based API to GimpScanConvert and use it
|
||||
|
||||
|
||||
GEGL:
|
||||
|
||||
- Add operations and gegl infrastructure for the cage tool
|
||||
- Disable View -> Use GEGL as we will not have time to finish the
|
||||
GEGL projection code for GIMP 2.8
|
||||
|
||||
|
||||
Libgimp:
|
||||
|
||||
- Introduce an "item" type in the PDB and libgimp and deprecate
|
||||
lots of old API in favor of item API
|
||||
- Add procedures to create, traverse and manipulate layer trees
|
||||
- Add more state to the context API, and deprecate functions with
|
||||
too many parameters in favor of simpler ones that use context states,
|
||||
particularly the entire transform and selection API
|
||||
- Move GimpUnitStore and GimpUnitComboBox to libgimpwidgets, and
|
||||
use them in GimpSizeEntry, deprecate GimpUnitMenu.
|
||||
- Deprecate gimp_min_colors() and gimp_install_cmap()
|
||||
- Add API that enables GimpRuler to track motion events by itself
|
||||
- Add new selection API and deprecate all old selection functions
|
||||
- Move around and rename all parasite functions, deprecate the old ones
|
||||
- Add a generated PDB file in the "gimp" namespace and get rid
|
||||
of "gimpmisc"
|
||||
- Add unit conversion functions to libgimpbase
|
||||
- Add function to reset a plug-in's context to default values
|
||||
|
||||
|
||||
Plug-ins:
|
||||
|
||||
- Make script-fu server IPv6 aware
|
||||
- Follow libgimp deprecations in plug-ins and scripts
|
||||
- Add PDF export plugin
|
||||
- Lots of cairo porting here too
|
||||
- UTF-8 fixes in script-fu
|
||||
- Set the progress to 1.0 when done
|
||||
- Merge a lot of upstream fixes into script-fu's Tinyscheme
|
||||
- Add "New Layer" option to MapObject
|
||||
- Support loading of 16-bit raw PPM files
|
||||
- Add web-page, a new plug-in which renders images of web pages
|
||||
- Fix some more plug-ins to not warn if applied on an empty region
|
||||
|
||||
|
||||
Data:
|
||||
|
||||
- Remove "Untitled" from palette names entries
|
||||
|
||||
|
||||
Developer documentation:
|
||||
|
||||
- Move libgimp documentation from templates to inline comments
|
||||
- Generate standard deprecated sections
|
||||
|
||||
|
||||
Source and build system:
|
||||
|
||||
- Add more code documentation
|
||||
- Add more unit tests and refactor existing ones to use global
|
||||
test utility functions
|
||||
- Add a manifest to executables (app and plug-ins, Win32)
|
||||
- Depend on GLib 2.28, GTK+ 2.24, Cairo 1.10
|
||||
- Make WebKit available to all plug-ins, not just the help browser
|
||||
- Run UI tests on Xvfb if available
|
||||
- Check for GdkPixbuf separately because it's now a separate library
|
||||
- Allow tests to use uninstalled plug-ins from the build dir
|
||||
- Remove, comment out, or build for GIMP_UNSTABLE some stuff that
|
||||
should not be in a stable release
|
||||
|
||||
|
||||
General:
|
||||
|
||||
- Improve safety on Win32 by calling SetDllDirectory() and
|
||||
SetProcessDEPPolicy()
|
||||
- Switch from GtkObject::destroy() to GObject::dispose() all over
|
||||
the place
|
||||
- Various changes that make maintaining the gtk3-port branch easier,
|
||||
such as s/GtkAnchorType/GimpHandleAnchor/ and s/GtkObject/GtkAdjustment/
|
||||
- Don't use gtk_container_add() for adding to GtkBoxes
|
||||
- Inherit from GtkBox directly, not from GtkHBox/GtkVBox
|
||||
- Add namespace to the ink blob types and functions
|
||||
- Remove all useless calls to gtk_range_set_update_policy()
|
||||
- Use GObject::constructed() instead of GObject::constructor() all
|
||||
over the place
|
||||
- Move more members to private and add accessors for them
|
||||
- Stop using GdkNativeWindow, use guint32 instead
|
||||
- Plug memory leaks
|
||||
- Remove ps-menurc, we are not a PS clone
|
||||
- Use the new g_[s]list_free_full() instead of foreach() and free()
|
||||
- Don't use newly deprecated GTK+ API
|
||||
- Use the new GDK_KEY_foo key names
|
||||
- Lots of bug fixes and cleanup
|
||||
- Lots of translation updates
|
||||
|
||||
|
||||
Changes in GIMP 2.7.1
|
||||
=====================
|
||||
|
||||
|
||||
UI:
|
||||
|
||||
- Add "lock content" button to the layers, channels and paths dialogs,
|
||||
make the lock buttons more compact
|
||||
- Refuse to edit locked items
|
||||
- Add support for layer groups
|
||||
- Improve internals and GUI of the save/export functionality
|
||||
- Move the shortcut dialog's "clear" button into the entry
|
||||
- Clean up UI code by introducing GimpDockWindow and GimpImageWindow
|
||||
classes
|
||||
- Support multi-column dock windows
|
||||
- Get rid of docking bars, use highlights in existing widget hierarchy instead
|
||||
- Remove toolbox-window-hint gimprc setting and use dock-window-hint
|
||||
for both toolbox and docks instead
|
||||
- Move GimpDock::default-height style property to GimpDockWindow
|
||||
- Polish save+export path-part precedence rules
|
||||
- Merge the GSoC 2009 Advanced GUI for Brush Dynamics project
|
||||
- Default to non-fixed-aspect in Canvas Size dialog
|
||||
- Add a still incomplete and Single-window mode
|
||||
- Have an Export button, not Save, in export dialogs
|
||||
- Improve Free Select Tool handle highlighting
|
||||
- Support changing user interface language from preferences
|
||||
- Update ps-menurc with PS CS4 keyboard shortcuts
|
||||
- Reduce spacing around canvas and use it for the canvas itself
|
||||
- Put name of active dockables in dock window titles
|
||||
- Don't have Toolbox in list of Recently Closed Docks, handle that
|
||||
directly in the Windows menu
|
||||
- Support selecting and tagging multiple objects in resource lists
|
||||
- Improve on-canvas text editing and text attribute setting
|
||||
- Add GimpContainerTreeStore and use it in all GtkTreeStore based views
|
||||
- Add a new default "automatic" tab style that makes sure dockable tabs
|
||||
always show as much detail as possible
|
||||
- Remove the dockable title bar and add the menu arrow button next to the
|
||||
notebook tabs
|
||||
- Add an icon for the desaturate tool
|
||||
- Add 'Rule of fifths' crop guide overlay
|
||||
- Make Alt+Click on layers not affect active layer
|
||||
|
||||
|
||||
Core:
|
||||
|
||||
- Make all GimpItems lockable so their contents can't be changed
|
||||
- Make more sense when naming imported layers
|
||||
- Make group layers work except for layer masks and save them in
|
||||
the XCF
|
||||
- Change GimpProjectable::update to GimpProjectable:invalidate
|
||||
- Make sure we don't mix font backends (and crash) by explicitly
|
||||
asking for FT/Fontconfig backends
|
||||
- Move members of GimpObject to a private struct
|
||||
- gimp_object_get_name() takes a gconstpointer now, remove casts
|
||||
from all callers
|
||||
- Let drawables connect to their floating selection's "update" signal
|
||||
instead of letting the image do this job
|
||||
- Fix brush rotation artifacts at even 90 degree rotation
|
||||
- Don't leak shared tile memory on Solaris
|
||||
- Add a PDB procedure to access a text layer's markup
|
||||
- Remove legacy cruft from pdbgen and make sure number ranges are correct
|
||||
- Move all image creation functions to a common file
|
||||
- Add translation context to all undo descriptions
|
||||
|
||||
|
||||
GEGL:
|
||||
|
||||
- Make sure all nodes are added to their resp. graphs
|
||||
- Use GEGL for layer scaling if use-gegl is TRUE
|
||||
|
||||
|
||||
Plug-ins:
|
||||
|
||||
- Updated script-fu's scheme to latest upstream fixes
|
||||
- Don't store image-specific print settings globally
|
||||
- Add fundamental OpenRaster (.ora) import and export support
|
||||
- Add RGB565 support to the csource plug-in
|
||||
|
||||
|
||||
Data:
|
||||
|
||||
- Add texture/grunge brushes made by Johannes Engelhardt
|
||||
|
||||
|
||||
Developer documentation:
|
||||
|
||||
- Explain GimpContext
|
||||
- Add SVG graphic with GIMP application core module dependencies
|
||||
- Add a schedule for 2.8 development
|
||||
|
||||
|
||||
Source and build system:
|
||||
|
||||
- Add more code documentation
|
||||
- Clean up subsystem linking dependencies in app/
|
||||
- Add unit testing framework in app/tests/ and some basic tests,
|
||||
including basic UI tests and XCF tests
|
||||
- Tentatively introduce usage of using Glade + GtkBuilder
|
||||
- Depend on GLib 2.24.0 and GTK+ 2.20.0
|
||||
- Add git commit hash in --verbose --version output
|
||||
- Don't version control gtk-doc.m4, get it from gtkdocize
|
||||
- Add GimpObject tracking code
|
||||
- Plug memory leaks
|
||||
- Lots of bug fixes and cleanup
|
||||
- Lots of translation updates
|
||||
|
||||
|
||||
Changes in GIMP 2.7.0
|
||||
=====================
|
||||
|
||||
UI:
|
||||
- Change the Text Tool to perform text editing on-canvas (GSoC 2008)
|
||||
and add the ability to mix different text styles in the same layer
|
||||
- Add support for tagging GIMP resources such as brushes and allow
|
||||
filtering based on these tags (GSoC 2008)
|
||||
- Separate the activities of saving an image and exporting it, there is
|
||||
now a 'File->Export...' for example
|
||||
- Port file plug-ins to new export API which gets rid of many
|
||||
annoying export dialogs
|
||||
- Add a simple parser to size entry widgets, images can be scaled
|
||||
to e.g. "50%" or "2 * 37px + 10in"
|
||||
- Arrange layer modes into more logical and useful groups
|
||||
- Added support for rotation of brushes
|
||||
- Make the Pointer dockable show information about selection position
|
||||
and size
|
||||
- Get rid of the Tools dockable and move toolbox configuration to
|
||||
Preferences
|
||||
- Allow closing the toolbox without closing the whole application
|
||||
- Add status bar feedback for keyboard changes to brush parameters
|
||||
- Add diagonal guides to the Crop Tool
|
||||
- New docks are created at the pointer position
|
||||
- Add support for printing crop marks for images
|
||||
- Move 'Text along path' from tool options to text context menu
|
||||
- Change default shortcuts for "Shrink Wrap" and "Fit in Window" to
|
||||
Ctrl+J and Ctrl+Shift+J respectively since the previous shortcuts
|
||||
are now used for the save+export feature
|
||||
- Make Alt+Click on layers in Layers dockable create a selection from
|
||||
the layer
|
||||
- Allow to specify written language in the Text Tool
|
||||
- Support custom mapping curves for input device properties like "Pressure"
|
||||
- New desktop launcher icon
|
||||
- Add 'Windows→Hide docks' menu item that does what 'Tab' does and also displays
|
||||
its state. Make the state persistent across sessions, too.
|
||||
- Make dock window title separators translatable
|
||||
|
||||
|
||||
Plug-ins:
|
||||
|
||||
- Map the 'Linear Dodge' layer mode in PSD files to the 'Addition'
|
||||
layer mode in GIMP
|
||||
- Add JPEG2000 load plug-in
|
||||
- Add X11 mouse cursor plug-in
|
||||
- Add support for loading 16bit (RGB565) raw data
|
||||
- Add palette exporter for CSS, PHP, Python, txt and Java, accessed
|
||||
through palette context menu
|
||||
- Add plug-in API for getting image URI, for manipulating size of
|
||||
text layers, for getting and setting text layer hint, and for
|
||||
unified export dialog appearance
|
||||
- Add an 'As Animation' toggle to the GIF export options
|
||||
- Add 'active_vectors' getsetter to Python 'gimp.Image'
|
||||
|
||||
|
||||
Data:
|
||||
|
||||
- Add large variants of round brushes and remove duplicate and
|
||||
useless brushes
|
||||
- Add "FG to BG (Hardedge)" gradient
|
||||
|
||||
|
||||
GEGL:
|
||||
|
||||
- Port the projection code, the code that composes a single image
|
||||
from a stack of layers, to GEGL
|
||||
- Port layer modes to GEGL
|
||||
- Port the floating selection code to GEGL
|
||||
- Refactor the layer stack code to prepare for layer groups later
|
||||
- Prepare better and more intuitive handling of the floating
|
||||
selection
|
||||
- Add File->Debug->Show Image Graph that show the GEGL graph of an
|
||||
image
|
||||
- Allow to benchmark projection performance with
|
||||
File->Debug->Benchmark Projection
|
||||
- When using GEGL for the projection, use CIELCH instead of HSV/HSL
|
||||
for color based layer modes
|
||||
|
||||
|
||||
Core:
|
||||
|
||||
- Make painting strokes Catmull-Rom Spline interpolated
|
||||
- Add support for arbitrary affine transforms of brushes
|
||||
- Add support for brush dynamics to depend on tilt
|
||||
- Add aspect ratio to brush dynamics
|
||||
- Add infrastructure to soon support vector layers (GSoC 2006)
|
||||
- Rearrange legacy layer mode code to increase maintainability
|
||||
- Drop support for the obsolete GnomeVFS file-uri backend
|
||||
- Allow to dump keyboard shortcuts with File->Debug->Dump Keyboard
|
||||
Shortcuts
|
||||
- Prepare data structures for layer groups
|
||||
- Remove gimprc setting "menu-mnemonics",
|
||||
"GtkSettings:gtk-enable-mnemonics" shall be used instead
|
||||
- Remove "transient-docks" gimprc setting, the 'Utility window' hint
|
||||
and a sane window manager does a better job
|
||||
- Remove "web-browser" gimprc setting and use gtk_show_uri() instead
|
||||
|
||||
|
||||
General:
|
||||
|
||||
- Changed license to (L)GPLv3+
|
||||
- Use the automake 1.11 feature 'silent build rules' by default
|
||||
- Lots of bug fixes and cleanup
|
3519
NEWS.pre-3-0
Normal file
3519
NEWS.pre-3-0
Normal file
File diff suppressed because it is too large
Load diff
99
README
Normal file
99
README
Normal file
|
@ -0,0 +1,99 @@
|
|||
------------------------------
|
||||
GNU Image Manipulation Program
|
||||
3.0 Stable Branch
|
||||
------------------------------
|
||||
|
||||
This is a stable release in the GIMP 3.0 series.
|
||||
|
||||
If you think you found a bug in this version, please make sure that it
|
||||
hasn't been reported earlier and that it is not just new stuff that is
|
||||
still being worked on and obviously not quite finished yet. If neither
|
||||
of these, please report it!
|
||||
|
||||
If you want to hack on GIMP, please read the file devel-docs/README.md.
|
||||
For detailed installation instructions, see the file INSTALL.
|
||||
|
||||
|
||||
1. Web Resources
|
||||
================
|
||||
|
||||
GIMP's home page is at:
|
||||
|
||||
https://www.gimp.org/
|
||||
|
||||
Please be sure to visit this site for information, documentation,
|
||||
tutorials, news, etc. All things GIMP-ish are available from there.
|
||||
|
||||
The latest version of GIMP can be found at:
|
||||
|
||||
https://www.gimp.org/downloads/
|
||||
|
||||
We also have a website dedicated to documentation at:
|
||||
|
||||
https://docs.gimp.org/
|
||||
|
||||
|
||||
2. Contributing
|
||||
===============
|
||||
|
||||
GIMP source code can be found at:
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gimp/
|
||||
|
||||
Resources for contributors:
|
||||
|
||||
https://developer.gimp.org/
|
||||
|
||||
In particular, you may want to look in the "Core Development" section. Some
|
||||
articles of particular interest for newcomers could be:
|
||||
|
||||
* Setting up your developer environment: https://developer.gimp.org/core/setup/
|
||||
* GIMP Coding Style: https://developer.gimp.org/core/coding_style/
|
||||
* Submit your first patch: https://developer.gimp.org/core/submit-patch/
|
||||
|
||||
|
||||
3. Discussion Channels
|
||||
======================
|
||||
|
||||
We have several discussion channels dedicated to GIMP user and
|
||||
development discussion. There is more info at:
|
||||
|
||||
https://www.gimp.org/discuss.html
|
||||
|
||||
For the real junkies, there are IRC channels (e.g. #gimp or #gimp-user)
|
||||
devoted to GIMP on GIMPNet (a private free software oriented network).
|
||||
Many of the developers hang out there. Some of the GIMPNet servers are:
|
||||
|
||||
irc.gimp.org:6667
|
||||
irc.us.gimp.org:6667
|
||||
irc.eu.gimp.org:6667
|
||||
|
||||
More discussion channels, such as forums, will be listed on the above
|
||||
"discuss" page when they are moderated by a team member.
|
||||
Links to archives of former discussion methods (e.g. mailing lists) are
|
||||
also included in that page.
|
||||
|
||||
4. Customizing
|
||||
==============
|
||||
|
||||
The look of GIMP's interface can be customized like any other GTK+ app
|
||||
by editing files in `${XDG_CONFIG_HOME}/gtk-3.0/` (settings.ini and
|
||||
gtk.css in particular) or by using "themes" (ready-made customizations).
|
||||
Additionally, GIMP reads `${XDG_CONFIG_HOME}/GIMP/3.0/gimp.css` so you
|
||||
can have settings that only apply to GIMP.
|
||||
|
||||
You can also manually change the keybindings to any of your choice by
|
||||
editing: `${XDG_CONFIG_HOME}/GIMP/3.0/shortcutsrc`.
|
||||
|
||||
|
||||
Have fun,
|
||||
|
||||
Spencer Kimball
|
||||
Peter Mattis
|
||||
Federico Mena
|
||||
Manish Singh
|
||||
Sven Neumann
|
||||
Michael Natterer
|
||||
Dave Neary
|
||||
Martin Nordholts
|
||||
Jehan
|
65
README.i18n
Normal file
65
README.i18n
Normal file
|
@ -0,0 +1,65 @@
|
|||
This file contains some important hints for translators.
|
||||
|
||||
|
||||
The current status of the GIMP translation can be checked at
|
||||
|
||||
https://l10n.gnome.org/module/gimp
|
||||
|
||||
|
||||
Translation of the GNU Image Manipulation Program is handled by the
|
||||
GNOME Translation Project (see https://l10n.gnome.org/). If you want to
|
||||
help, we suggest that you get in touch with the translation team of
|
||||
your language (see https://l10n.gnome.org/teams/).
|
||||
|
||||
|
||||
GIMP is different
|
||||
|
||||
GIMP is a complex application which has a bunch of scripts and
|
||||
plug-ins that all want to be internationalized. Therefore there is
|
||||
not one catalog but many. For a full translation of GIMP's UI, you
|
||||
will have to add translations for the following catalogs:
|
||||
|
||||
po/gimp30.pot -- the core
|
||||
po-libgimp/gimp30-libgimp.pot -- the libgimp library
|
||||
po-plugins/gimp30-std-plugins.pot -- the C plug-ins
|
||||
po-python/gimp30-python.pot -- the pygimp plug-ins
|
||||
po-script-fu/gimp30-script-fu.pot -- the script-fu scripts
|
||||
po-tips/gimp30-tips.pot -- the startup tips
|
||||
po-windows-installer/gimp30-windows-installer.pot -- the windows installer
|
||||
|
||||
If you are looking for the translations of gimp-perl, please note that
|
||||
gimp-perl has been moved into it's own git module called
|
||||
gimp-perl.
|
||||
|
||||
|
||||
GIMP Tips dialog
|
||||
|
||||
In addition to message catalogs GIMP provides a file with tips that
|
||||
are displayed in the Tips dialog. This file is in XML format and can
|
||||
be found in the tips directory. The english tips messages are
|
||||
extracted from gimp-tips.xml.in so translators can use the usual
|
||||
tools to create a <lang>.po file that holds the translations. All
|
||||
translations are then merged into gimp-tips.xml with language
|
||||
identifiers taken from the po filename.
|
||||
|
||||
GIMP needs to know what language it should select from gimp-tips.xml.
|
||||
Therefore, there's the special message "tips-locale:C" in the main
|
||||
message catalog that needs to be translated correctly. For a german
|
||||
translation of the tips this would look like this:
|
||||
|
||||
#: ../app/dialogs/tips-parser.c:188
|
||||
msgid "tips-locale:C"
|
||||
msgstr "tips-locale:de"
|
||||
|
||||
|
||||
Localization of third-party plug-ins
|
||||
|
||||
Third-party plug-ins (plug-ins that are not distributed with GIMP)
|
||||
can't have their messages in the gimp-std-plugins textdomain. We
|
||||
have therefore provided a mechanism that allows plug-ins to install
|
||||
their own message catalogs and tell GIMP to bind to that
|
||||
textdomain. This is necessary so that GIMP can correctly translate
|
||||
the menu paths the plug-in registers. Basically the plug-in has to
|
||||
call gimp_plugin_domain_add() or gimp_domain_plugin_add_with_path()
|
||||
before it registers any functions. Have a look at the script-fu
|
||||
plug-in to see how this is done in detail.
|
102
app-tools/gimp-debug-tool.c
Normal file
102
app-tools/gimp-debug-tool.c
Normal file
|
@ -0,0 +1,102 @@
|
|||
/* gimpdebug
|
||||
* Copyright (C) 2018 Jehan <jehan@gimp.org>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* GimpDebug simply displays a dialog with debug data (backtraces,
|
||||
* version, etc.), proposing to create a bug report. The reason why it
|
||||
* is a separate executable is simply that when the program crashed,
|
||||
* even though some actions are possible before exit() by catching fatal
|
||||
* errors and signals, it may not be possible to allocate memory
|
||||
* anymore. Therefore creating a new dialog is an impossible action.
|
||||
* So we call instead a separate program, then exit.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <gio/gio.h>
|
||||
#include <glib.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "app/widgets/gimpcriticaldialog.h"
|
||||
|
||||
|
||||
|
||||
int
|
||||
main (int argc,
|
||||
char **argv)
|
||||
{
|
||||
const gchar *program;
|
||||
const gchar *pid;
|
||||
const gchar *reason;
|
||||
const gchar *message;
|
||||
const gchar *bt_file = NULL;
|
||||
const gchar *last_version = NULL;
|
||||
const gchar *release_date = NULL;
|
||||
gchar *trace = NULL;
|
||||
gchar *error;
|
||||
GtkWidget *dialog;
|
||||
|
||||
if (argc != 6 && argc != 8)
|
||||
{
|
||||
g_print ("Usage: gimp-debug-tool-2.0 [PROGRAM] [PID] [REASON] [MESSAGE] [BT_FILE] "
|
||||
"([LAST_VERSION] [RELEASE_TIMESTAMP])\n");
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
program = argv[1];
|
||||
pid = argv[2];
|
||||
reason = argv[3];
|
||||
message = argv[4];
|
||||
|
||||
error = g_strdup_printf ("%s: %s", reason, message);
|
||||
|
||||
bt_file = argv[5];
|
||||
g_file_get_contents (bt_file, &trace, NULL, NULL);
|
||||
|
||||
if (trace == NULL || strlen (trace) == 0)
|
||||
exit (EXIT_FAILURE);
|
||||
|
||||
if (argc == 8)
|
||||
{
|
||||
last_version = argv[6];
|
||||
release_date = argv[7];
|
||||
}
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
dialog = gimp_critical_dialog_new (_("GIMP Crash Debug"), last_version,
|
||||
release_date ? g_ascii_strtoll (release_date, NULL, 10) : -1);
|
||||
gimp_critical_dialog_add (dialog, error, trace, TRUE, program,
|
||||
g_ascii_strtoull (pid, NULL, 10));
|
||||
g_free (error);
|
||||
g_free (trace);
|
||||
g_signal_connect (dialog, "delete-event",
|
||||
G_CALLBACK (gtk_main_quit), NULL);
|
||||
g_signal_connect (dialog, "destroy",
|
||||
G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
gtk_main ();
|
||||
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
40
app-tools/meson.build
Normal file
40
app-tools/meson.build
Normal file
|
@ -0,0 +1,40 @@
|
|||
if platform_windows or platform_osx
|
||||
gimp_debug_tool_dir = get_option('bindir')
|
||||
else
|
||||
gimp_debug_tool_dir = get_option('libexecdir')
|
||||
endif
|
||||
|
||||
|
||||
gimp_debug_tool = executable('gimp-debug-tool' + exec_ver,
|
||||
'gimp-debug-tool.c',
|
||||
include_directories: rootInclude,
|
||||
dependencies: [
|
||||
fontconfig,
|
||||
gio,
|
||||
gegl,
|
||||
gtk3,
|
||||
],
|
||||
link_with: [
|
||||
libapp,
|
||||
libappwidgets,
|
||||
libgimpbase,
|
||||
],
|
||||
install: true,
|
||||
install_dir: gimp_debug_tool_dir
|
||||
)
|
||||
|
||||
if enable_default_bin
|
||||
if not platform_windows
|
||||
install_symlink(fs.name(gimp_debug_tool.full_path()).replace(exec_ver, ''),
|
||||
pointing_to: fs.name(gimp_debug_tool.full_path()),
|
||||
install_dir: gimp_debug_tool_dir)
|
||||
install_symlink(fs.name(gimp_debug_tool.full_path()).replace(exec_ver, '-@0@'.format(api_version_major)),
|
||||
pointing_to: fs.name(gimp_debug_tool.full_path()),
|
||||
install_dir: gimp_debug_tool_dir)
|
||||
else
|
||||
meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3]))',
|
||||
gimp_debug_tool.full_path(), get_option('prefix'), fs.name(gimp_debug_tool.name()).replace(exec_ver, '.exe'))
|
||||
meson.add_install_script(python, '-c', 'from shutil import copy2; from pathlib import Path; from sys import argv; copy2(argv[1], str(Path(argv[2]) / "bin" / argv[3].replace("@0@", argv[4])))',
|
||||
gimp_debug_tool.full_path(), get_option('prefix'), fs.name(gimp_debug_tool.name()).replace(exec_ver, '-@0@.exe'), api_version_major.to_string())
|
||||
endif
|
||||
endif
|
53
app/about.h
Normal file
53
app/about.h
Normal file
|
@ -0,0 +1,53 @@
|
|||
/* 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
|
||||
* 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 __ABOUT_H__
|
||||
#define __ABOUT_H__
|
||||
|
||||
|
||||
#define GIMP_ACRONYM \
|
||||
_("GIMP")
|
||||
|
||||
#define GIMP_NAME \
|
||||
_("GNU Image Manipulation Program")
|
||||
|
||||
/* The year of the last commit (UTC) will be inserted into this string. */
|
||||
#define GIMP_COPYRIGHT \
|
||||
_("Copyright © 1995-%s\n" \
|
||||
"Spencer Kimball, Peter Mattis and the GIMP Development Team")
|
||||
|
||||
/* TRANSLATORS: do not end the license URL with a dot, because it would
|
||||
* be in the link. Because of technical limitations, make sure the URL
|
||||
* ends with a space, a newline or is end of text.
|
||||
* Cf. bug 762282.
|
||||
*/
|
||||
#define GIMP_LICENSE \
|
||||
_("GIMP 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." \
|
||||
"\n\n" \
|
||||
"GIMP 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." \
|
||||
"\n\n" \
|
||||
"You should have received a copy of the GNU General Public License " \
|
||||
"along with GIMP. If not, see: https://www.gnu.org/licenses/")
|
||||
|
||||
|
||||
#endif /* __ABOUT_H__ */
|
56
app/actions/actions-types.h
Normal file
56
app/actions/actions-types.h
Normal file
|
@ -0,0 +1,56 @@
|
|||
/* 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
|
||||
* 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 __ACTIONS_TYPES_H__
|
||||
#define __ACTIONS_TYPES_H__
|
||||
|
||||
|
||||
#include "dialogs/dialogs-types.h"
|
||||
#include "tools/tools-types.h"
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GIMP_ACTION_SELECT_SET = 0,
|
||||
GIMP_ACTION_SELECT_SET_TO_DEFAULT = -1,
|
||||
GIMP_ACTION_SELECT_FIRST = -2,
|
||||
GIMP_ACTION_SELECT_LAST = -3,
|
||||
GIMP_ACTION_SELECT_SMALL_PREVIOUS = -4,
|
||||
GIMP_ACTION_SELECT_SMALL_NEXT = -5,
|
||||
GIMP_ACTION_SELECT_PREVIOUS = -6,
|
||||
GIMP_ACTION_SELECT_NEXT = -7,
|
||||
GIMP_ACTION_SELECT_SKIP_PREVIOUS = -8,
|
||||
GIMP_ACTION_SELECT_SKIP_NEXT = -9,
|
||||
GIMP_ACTION_SELECT_PERCENT_PREVIOUS = -10,
|
||||
GIMP_ACTION_SELECT_PERCENT_NEXT = -11,
|
||||
GIMP_ACTION_SELECT_FLAT_PREVIOUS = -12,
|
||||
GIMP_ACTION_SELECT_FLAT_NEXT = -13,
|
||||
} GimpActionSelectType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GIMP_SAVE_MODE_SAVE,
|
||||
GIMP_SAVE_MODE_SAVE_AS,
|
||||
GIMP_SAVE_MODE_SAVE_A_COPY,
|
||||
GIMP_SAVE_MODE_SAVE_AND_CLOSE,
|
||||
GIMP_SAVE_MODE_EXPORT,
|
||||
GIMP_SAVE_MODE_EXPORT_AS,
|
||||
GIMP_SAVE_MODE_OVERWRITE
|
||||
} GimpSaveMode;
|
||||
|
||||
|
||||
#endif /* __ACTIONS_TYPES_H__ */
|
858
app/actions/actions.c
Normal file
858
app/actions/actions.c
Normal file
|
@ -0,0 +1,858 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontainer.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpitem.h"
|
||||
#include "core/gimptooloptions.h"
|
||||
#include "core/gimptoolinfo.h"
|
||||
|
||||
#include "widgets/gimpactionfactory.h"
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpcontainereditor.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimpdock.h"
|
||||
#include "widgets/gimpdockable.h"
|
||||
#include "widgets/gimpdockwindow.h"
|
||||
#include "widgets/gimpimageeditor.h"
|
||||
#include "widgets/gimpitemtreeview.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
#include "display/gimpimagewindow.h"
|
||||
#include "display/gimpnavigationeditor.h"
|
||||
#include "display/gimpstatusbar.h"
|
||||
|
||||
#include "dialogs/dialogs.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "brush-editor-actions.h"
|
||||
#include "brushes-actions.h"
|
||||
#include "buffers-actions.h"
|
||||
#include "channels-actions.h"
|
||||
#include "colormap-actions.h"
|
||||
#include "context-actions.h"
|
||||
#include "cursor-info-actions.h"
|
||||
#include "dashboard-actions.h"
|
||||
#include "debug-actions.h"
|
||||
#include "dialogs-actions.h"
|
||||
#include "dock-actions.h"
|
||||
#include "dockable-actions.h"
|
||||
#include "documents-actions.h"
|
||||
#include "drawable-actions.h"
|
||||
#include "dynamics-actions.h"
|
||||
#include "dynamics-editor-actions.h"
|
||||
#include "edit-actions.h"
|
||||
#include "error-console-actions.h"
|
||||
#include "file-actions.h"
|
||||
#include "filters-actions.h"
|
||||
#include "fonts-actions.h"
|
||||
#include "gradient-editor-actions.h"
|
||||
#include "gradients-actions.h"
|
||||
#include "help-actions.h"
|
||||
#include "image-actions.h"
|
||||
#include "images-actions.h"
|
||||
#include "layers-actions.h"
|
||||
#include "mypaint-brushes-actions.h"
|
||||
#include "palette-editor-actions.h"
|
||||
#include "palettes-actions.h"
|
||||
#include "paths-actions.h"
|
||||
#include "patterns-actions.h"
|
||||
#include "plug-in-actions.h"
|
||||
#include "quick-mask-actions.h"
|
||||
#include "sample-points-actions.h"
|
||||
#include "select-actions.h"
|
||||
#include "templates-actions.h"
|
||||
#include "text-editor-actions.h"
|
||||
#include "text-tool-actions.h"
|
||||
#include "tool-options-actions.h"
|
||||
#include "tool-presets-actions.h"
|
||||
#include "tool-preset-editor-actions.h"
|
||||
#include "tools-actions.h"
|
||||
#include "vector-toolpath-actions.h"
|
||||
#include "view-actions.h"
|
||||
#include "windows-actions.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
/* global variables */
|
||||
|
||||
GimpActionFactory *global_action_factory = NULL;
|
||||
|
||||
|
||||
/* private variables */
|
||||
|
||||
static const GimpActionFactoryEntry action_groups[] =
|
||||
{
|
||||
{ "brush-editor", N_("Brush Editor"), GIMP_ICON_BRUSH,
|
||||
brush_editor_actions_setup,
|
||||
brush_editor_actions_update },
|
||||
{ "brushes", N_("Brushes"), GIMP_ICON_BRUSH,
|
||||
brushes_actions_setup,
|
||||
brushes_actions_update },
|
||||
{ "buffers", N_("Buffers"), GIMP_ICON_BUFFER,
|
||||
buffers_actions_setup,
|
||||
buffers_actions_update },
|
||||
{ "channels", N_("Channels"), GIMP_ICON_CHANNEL,
|
||||
channels_actions_setup,
|
||||
channels_actions_update },
|
||||
{ "colormap", N_("Colormap"), GIMP_ICON_COLORMAP,
|
||||
colormap_actions_setup,
|
||||
colormap_actions_update },
|
||||
{ "context", N_("Context"), GIMP_ICON_DIALOG_TOOL_OPTIONS /* well... */,
|
||||
context_actions_setup,
|
||||
context_actions_update },
|
||||
{ "cursor-info", N_("Pointer Information"), NULL,
|
||||
cursor_info_actions_setup,
|
||||
cursor_info_actions_update },
|
||||
{ "dashboard", N_("Dashboard"), GIMP_ICON_DIALOG_DASHBOARD,
|
||||
dashboard_actions_setup,
|
||||
dashboard_actions_update },
|
||||
{ "debug", N_("Debug"), NULL,
|
||||
debug_actions_setup,
|
||||
debug_actions_update },
|
||||
{ "dialogs", N_("Dialogs"), NULL,
|
||||
dialogs_actions_setup,
|
||||
dialogs_actions_update },
|
||||
{ "dock", N_("Dock"), NULL,
|
||||
dock_actions_setup,
|
||||
dock_actions_update },
|
||||
{ "dockable", N_("Dockable"), NULL,
|
||||
dockable_actions_setup,
|
||||
dockable_actions_update },
|
||||
{ "documents", N_("Document History"), NULL,
|
||||
documents_actions_setup,
|
||||
documents_actions_update },
|
||||
{ "drawable", N_("Drawable"), GIMP_ICON_LAYER,
|
||||
drawable_actions_setup,
|
||||
drawable_actions_update },
|
||||
{ "dynamics", N_("Paint Dynamics"), GIMP_ICON_DYNAMICS,
|
||||
dynamics_actions_setup,
|
||||
dynamics_actions_update },
|
||||
{ "dynamics-editor", N_("Paint Dynamics Editor"), GIMP_ICON_DYNAMICS,
|
||||
dynamics_editor_actions_setup,
|
||||
dynamics_editor_actions_update },
|
||||
{ "edit", N_("Edit"), GIMP_ICON_EDIT,
|
||||
edit_actions_setup,
|
||||
edit_actions_update },
|
||||
{ "error-console", N_("Error Console"), GIMP_ICON_DIALOG_WARNING,
|
||||
error_console_actions_setup,
|
||||
error_console_actions_update },
|
||||
{ "file", N_("File"), "text-x-generic",
|
||||
file_actions_setup,
|
||||
file_actions_update },
|
||||
{ "filters", N_("Filters"), GIMP_ICON_GEGL,
|
||||
filters_actions_setup,
|
||||
filters_actions_update },
|
||||
{ "fonts", N_("Fonts"), GIMP_ICON_FONT,
|
||||
fonts_actions_setup,
|
||||
fonts_actions_update },
|
||||
{ "gradient-editor", N_("Gradient Editor"), GIMP_ICON_GRADIENT,
|
||||
gradient_editor_actions_setup,
|
||||
gradient_editor_actions_update },
|
||||
{ "gradients", N_("Gradients"), GIMP_ICON_GRADIENT,
|
||||
gradients_actions_setup,
|
||||
gradients_actions_update },
|
||||
{ "tool-presets", N_("Tool Presets"), GIMP_ICON_TOOL_PRESET,
|
||||
tool_presets_actions_setup,
|
||||
tool_presets_actions_update },
|
||||
{ "tool-preset-editor", N_("Tool Preset Editor"), GIMP_ICON_TOOL_PRESET,
|
||||
tool_preset_editor_actions_setup,
|
||||
tool_preset_editor_actions_update },
|
||||
{ "help", N_("Help"), "help-browser",
|
||||
help_actions_setup,
|
||||
help_actions_update },
|
||||
{ "image", N_("Image"), GIMP_ICON_IMAGE,
|
||||
image_actions_setup,
|
||||
image_actions_update },
|
||||
{ "images", N_("Images"), GIMP_ICON_IMAGE,
|
||||
images_actions_setup,
|
||||
images_actions_update },
|
||||
{ "layers", N_("Layers"), GIMP_ICON_LAYER,
|
||||
layers_actions_setup,
|
||||
layers_actions_update },
|
||||
{ "mypaint-brushes", N_("MyPaint Brushes"), GIMP_ICON_MYPAINT_BRUSH,
|
||||
mypaint_brushes_actions_setup,
|
||||
mypaint_brushes_actions_update },
|
||||
{ "palette-editor", N_("Palette Editor"), GIMP_ICON_PALETTE,
|
||||
palette_editor_actions_setup,
|
||||
palette_editor_actions_update },
|
||||
{ "palettes", N_("Palettes"), GIMP_ICON_PALETTE,
|
||||
palettes_actions_setup,
|
||||
palettes_actions_update },
|
||||
{ "patterns", N_("Patterns"), GIMP_ICON_PATTERN,
|
||||
patterns_actions_setup,
|
||||
patterns_actions_update },
|
||||
{ "plug-in", N_("Plug-ins"), GIMP_ICON_PLUGIN,
|
||||
plug_in_actions_setup,
|
||||
plug_in_actions_update },
|
||||
{ "quick-mask", N_("Quick Mask"), GIMP_ICON_QUICK_MASK_ON,
|
||||
quick_mask_actions_setup,
|
||||
quick_mask_actions_update },
|
||||
{ "sample-points", N_("Sample Points"), GIMP_ICON_SAMPLE_POINT,
|
||||
sample_points_actions_setup,
|
||||
sample_points_actions_update },
|
||||
{ "select", N_("Select"), GIMP_ICON_SELECTION,
|
||||
select_actions_setup,
|
||||
select_actions_update },
|
||||
{ "templates", N_("Templates"), GIMP_ICON_TEMPLATE,
|
||||
templates_actions_setup,
|
||||
templates_actions_update },
|
||||
{ "text-tool", N_("Text Tool"), GIMP_ICON_EDIT,
|
||||
text_tool_actions_setup,
|
||||
text_tool_actions_update },
|
||||
{ "text-editor", N_("Text Editor"), GIMP_ICON_EDIT,
|
||||
text_editor_actions_setup,
|
||||
text_editor_actions_update },
|
||||
{ "tool-options", N_("Tool Options"), GIMP_ICON_DIALOG_TOOL_OPTIONS,
|
||||
tool_options_actions_setup,
|
||||
tool_options_actions_update },
|
||||
{ "tools", N_("Tools"), GIMP_ICON_DIALOG_TOOLS,
|
||||
tools_actions_setup,
|
||||
tools_actions_update },
|
||||
{ "vector-toolpath", N_("Path Toolpath"), GIMP_ICON_PATH,
|
||||
vector_toolpath_actions_setup,
|
||||
vector_toolpath_actions_update },
|
||||
{ "paths", N_("Paths"), GIMP_ICON_PATH,
|
||||
paths_actions_setup,
|
||||
paths_actions_update },
|
||||
{ "view", N_("View"), GIMP_ICON_VISIBLE,
|
||||
view_actions_setup,
|
||||
view_actions_update },
|
||||
{ "windows", N_("Windows"), NULL,
|
||||
windows_actions_setup,
|
||||
windows_actions_update }
|
||||
};
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
actions_init (Gimp *gimp)
|
||||
{
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
g_return_if_fail (global_action_factory == NULL);
|
||||
|
||||
global_action_factory = gimp_action_factory_new (gimp);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (action_groups); i++)
|
||||
gimp_action_factory_group_register (global_action_factory,
|
||||
action_groups[i].identifier,
|
||||
gettext (action_groups[i].label),
|
||||
action_groups[i].icon_name,
|
||||
action_groups[i].setup_func,
|
||||
action_groups[i].update_func);
|
||||
}
|
||||
|
||||
void
|
||||
actions_exit (Gimp *gimp)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
g_return_if_fail (global_action_factory != NULL);
|
||||
g_return_if_fail (global_action_factory->gimp == gimp);
|
||||
|
||||
g_clear_object (&global_action_factory);
|
||||
}
|
||||
|
||||
Gimp *
|
||||
action_data_get_gimp (gpointer data)
|
||||
{
|
||||
Gimp *result = NULL;
|
||||
static gboolean recursion = FALSE;
|
||||
|
||||
if (! data || recursion)
|
||||
return NULL;
|
||||
|
||||
recursion = TRUE;
|
||||
|
||||
if (GIMP_IS_GIMP (data))
|
||||
result = data;
|
||||
|
||||
if (! result)
|
||||
{
|
||||
GimpDisplay *display = action_data_get_display (data);
|
||||
|
||||
if (display)
|
||||
result = display->gimp;
|
||||
}
|
||||
|
||||
if (! result)
|
||||
{
|
||||
GimpContext *context = action_data_get_context (data);
|
||||
|
||||
if (context)
|
||||
result = context->gimp;
|
||||
}
|
||||
|
||||
recursion = FALSE;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
GimpContext *
|
||||
action_data_get_context (gpointer data)
|
||||
{
|
||||
GimpContext *result = NULL;
|
||||
static gboolean recursion = FALSE;
|
||||
|
||||
if (! data || recursion)
|
||||
return NULL;
|
||||
|
||||
recursion = TRUE;
|
||||
|
||||
if (GIMP_IS_DOCK (data))
|
||||
result = gimp_dock_get_context ((GimpDock *) data);
|
||||
else if (GIMP_IS_DOCK_WINDOW (data))
|
||||
result = gimp_dock_window_get_context (((GimpDockWindow *) data));
|
||||
else if (GIMP_IS_CONTAINER_VIEW (data))
|
||||
result = gimp_container_view_get_context ((GimpContainerView *) data);
|
||||
else if (GIMP_IS_CONTAINER_EDITOR (data))
|
||||
result = gimp_container_view_get_context (((GimpContainerEditor *) data)->view);
|
||||
else if (GIMP_IS_IMAGE_EDITOR (data))
|
||||
result = ((GimpImageEditor *) data)->context;
|
||||
else if (GIMP_IS_NAVIGATION_EDITOR (data))
|
||||
result = ((GimpNavigationEditor *) data)->context;
|
||||
|
||||
if (! result)
|
||||
{
|
||||
Gimp *gimp = action_data_get_gimp (data);
|
||||
|
||||
if (gimp)
|
||||
result = gimp_get_user_context (gimp);
|
||||
}
|
||||
|
||||
recursion = FALSE;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
GimpImage *
|
||||
action_data_get_image (gpointer data)
|
||||
{
|
||||
GimpImage *result = NULL;
|
||||
static gboolean recursion = FALSE;
|
||||
|
||||
if (! data || recursion)
|
||||
return NULL;
|
||||
|
||||
recursion = TRUE;
|
||||
|
||||
if (GIMP_IS_ITEM_TREE_VIEW (data))
|
||||
{
|
||||
result = gimp_item_tree_view_get_image ((GimpItemTreeView *) data);
|
||||
recursion = FALSE;
|
||||
return result;
|
||||
}
|
||||
else if (GIMP_IS_IMAGE_EDITOR (data))
|
||||
{
|
||||
result = ((GimpImageEditor *) data)->image;
|
||||
recursion = FALSE;
|
||||
return result;
|
||||
}
|
||||
|
||||
if (! result)
|
||||
{
|
||||
GimpDisplay *display = action_data_get_display (data);
|
||||
|
||||
if (display)
|
||||
result = gimp_display_get_image (display);
|
||||
}
|
||||
|
||||
if (! result)
|
||||
{
|
||||
GimpContext *context = action_data_get_context (data);
|
||||
|
||||
if (context)
|
||||
result = gimp_context_get_image (context);
|
||||
}
|
||||
|
||||
recursion = FALSE;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
GimpDisplay *
|
||||
action_data_get_display (gpointer data)
|
||||
{
|
||||
GimpDisplay *result = NULL;
|
||||
static gboolean recursion = FALSE;
|
||||
|
||||
if (! data || recursion)
|
||||
return NULL;
|
||||
|
||||
recursion = TRUE;
|
||||
|
||||
if (GIMP_IS_DISPLAY (data))
|
||||
result = data;
|
||||
else if (GIMP_IS_IMAGE_WINDOW (data))
|
||||
{
|
||||
GimpDisplayShell *shell = gimp_image_window_get_active_shell (data);
|
||||
result = shell ? shell->display : NULL;
|
||||
}
|
||||
|
||||
if (! result)
|
||||
{
|
||||
GimpContext *context = action_data_get_context (data);
|
||||
|
||||
if (context)
|
||||
result = gimp_context_get_display (context);
|
||||
}
|
||||
|
||||
recursion = FALSE;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
GimpDisplayShell *
|
||||
action_data_get_shell (gpointer data)
|
||||
{
|
||||
GimpDisplayShell *result = NULL;
|
||||
static gboolean recursion = FALSE;
|
||||
|
||||
if (! data || recursion)
|
||||
return NULL;
|
||||
|
||||
recursion = TRUE;
|
||||
|
||||
if (! result)
|
||||
{
|
||||
GimpDisplay *display = action_data_get_display (data);
|
||||
|
||||
if (display)
|
||||
result = gimp_display_get_shell (display);
|
||||
}
|
||||
|
||||
recursion = FALSE;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
action_data_get_widget (gpointer data)
|
||||
{
|
||||
GtkWidget *result = NULL;
|
||||
static gboolean recursion = FALSE;
|
||||
|
||||
if (! data || recursion)
|
||||
return NULL;
|
||||
|
||||
recursion = TRUE;
|
||||
|
||||
if (GTK_IS_WIDGET (data))
|
||||
result = data;
|
||||
|
||||
if (! result)
|
||||
{
|
||||
GimpDisplay *display = action_data_get_display (data);
|
||||
|
||||
if (display)
|
||||
result = GTK_WIDGET (gimp_display_get_shell (display));
|
||||
}
|
||||
|
||||
if (! result)
|
||||
result = dialogs_get_toolbox ();
|
||||
|
||||
recursion = FALSE;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
gint
|
||||
action_data_sel_count (gpointer data)
|
||||
{
|
||||
if (GIMP_IS_CONTAINER_EDITOR (data))
|
||||
{
|
||||
GimpContainerEditor *editor;
|
||||
|
||||
editor = GIMP_CONTAINER_EDITOR (data);
|
||||
return gimp_container_view_get_selected (editor->view, NULL, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* action_select_value:
|
||||
* @select_type:
|
||||
* @value:
|
||||
* @min:
|
||||
* max:
|
||||
* def:
|
||||
* small_inc:
|
||||
* inc:
|
||||
* skip_inc:
|
||||
* delta_factor:
|
||||
* wrap:
|
||||
*
|
||||
* For any valid enum @value (which are all negative), the corresponding
|
||||
* action computes the semantic value (default, first, next, etc.).
|
||||
* For a positive @value, it is considered as a per-thousand value
|
||||
* between the @min and @max (possibly wrapped if @wrap is set, clamped
|
||||
* otherwise), allowing to compute the returned value.
|
||||
*
|
||||
* Returns: the computed value to use for the action.
|
||||
*/
|
||||
gdouble
|
||||
action_select_value (GimpActionSelectType select_type,
|
||||
gdouble value,
|
||||
gdouble min,
|
||||
gdouble max,
|
||||
gdouble def,
|
||||
gdouble small_inc,
|
||||
gdouble inc,
|
||||
gdouble skip_inc,
|
||||
gdouble delta_factor,
|
||||
gboolean wrap)
|
||||
{
|
||||
switch (select_type)
|
||||
{
|
||||
case GIMP_ACTION_SELECT_SET_TO_DEFAULT:
|
||||
value = def;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_FIRST:
|
||||
value = min;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_LAST:
|
||||
value = max;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_SMALL_PREVIOUS:
|
||||
value -= small_inc;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_SMALL_NEXT:
|
||||
value += small_inc;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_PREVIOUS:
|
||||
value -= inc;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_NEXT:
|
||||
value += inc;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_SKIP_PREVIOUS:
|
||||
value -= skip_inc;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_SKIP_NEXT:
|
||||
value += skip_inc;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_PERCENT_PREVIOUS:
|
||||
g_return_val_if_fail (delta_factor >= 0.0, value);
|
||||
value /= (1.0 + delta_factor);
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_PERCENT_NEXT:
|
||||
g_return_val_if_fail (delta_factor >= 0.0, value);
|
||||
value *= (1.0 + delta_factor);
|
||||
break;
|
||||
|
||||
default:
|
||||
if ((gint) select_type >= 0)
|
||||
value = (gdouble) select_type * (max - min) / 1000.0 + min;
|
||||
else
|
||||
g_return_val_if_reached (value);
|
||||
break;
|
||||
}
|
||||
|
||||
if (wrap)
|
||||
{
|
||||
while (value < min)
|
||||
value = max - (min - value);
|
||||
|
||||
while (value > max)
|
||||
value = min + (value - max);
|
||||
}
|
||||
else
|
||||
{
|
||||
value = CLAMP (value, min, max);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
void
|
||||
action_select_property (GimpActionSelectType select_type,
|
||||
GimpDisplay *display,
|
||||
GObject *object,
|
||||
const gchar *property_name,
|
||||
gdouble small_inc,
|
||||
gdouble inc,
|
||||
gdouble skip_inc,
|
||||
gdouble delta_factor,
|
||||
gboolean wrap)
|
||||
{
|
||||
GParamSpec *pspec;
|
||||
|
||||
g_return_if_fail (display == NULL || GIMP_IS_DISPLAY (display));
|
||||
g_return_if_fail (G_IS_OBJECT (object));
|
||||
g_return_if_fail (property_name != NULL);
|
||||
|
||||
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (object),
|
||||
property_name);
|
||||
|
||||
if (G_IS_PARAM_SPEC_DOUBLE (pspec))
|
||||
{
|
||||
gdouble value;
|
||||
|
||||
g_object_get (object, property_name, &value, NULL);
|
||||
|
||||
value = action_select_value (select_type,
|
||||
value,
|
||||
G_PARAM_SPEC_DOUBLE (pspec)->minimum,
|
||||
G_PARAM_SPEC_DOUBLE (pspec)->maximum,
|
||||
G_PARAM_SPEC_DOUBLE (pspec)->default_value,
|
||||
small_inc, inc, skip_inc, delta_factor, wrap);
|
||||
|
||||
g_object_set (object, property_name, value, NULL);
|
||||
|
||||
if (display)
|
||||
{
|
||||
const gchar *blurb = g_param_spec_get_blurb (pspec);
|
||||
|
||||
if (blurb)
|
||||
{
|
||||
/* value description and new value shown in the status bar */
|
||||
action_message (display, object, _("%s: %.2f"), blurb, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (G_IS_PARAM_SPEC_INT (pspec))
|
||||
{
|
||||
gint value;
|
||||
|
||||
g_object_get (object, property_name, &value, NULL);
|
||||
|
||||
value = action_select_value (select_type,
|
||||
value,
|
||||
G_PARAM_SPEC_INT (pspec)->minimum,
|
||||
G_PARAM_SPEC_INT (pspec)->maximum,
|
||||
G_PARAM_SPEC_INT (pspec)->default_value,
|
||||
small_inc, inc, skip_inc, delta_factor, wrap);
|
||||
|
||||
g_object_set (object, property_name, value, NULL);
|
||||
|
||||
if (display)
|
||||
{
|
||||
const gchar *blurb = g_param_spec_get_blurb (pspec);
|
||||
|
||||
if (blurb)
|
||||
{
|
||||
/* value description and new value shown in the status bar */
|
||||
action_message (display, object, _("%s: %d"), blurb, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
g_return_if_reached ();
|
||||
}
|
||||
}
|
||||
|
||||
GimpObject *
|
||||
action_select_object (GimpActionSelectType select_type,
|
||||
GimpContainer *container,
|
||||
GimpObject *current)
|
||||
{
|
||||
gint select_index;
|
||||
gint n_children;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_CONTAINER (container), NULL);
|
||||
g_return_val_if_fail (current == NULL || GIMP_IS_OBJECT (current), NULL);
|
||||
|
||||
if (! current &&
|
||||
select_type != GIMP_ACTION_SELECT_FIRST &&
|
||||
select_type != GIMP_ACTION_SELECT_LAST)
|
||||
return NULL;
|
||||
|
||||
n_children = gimp_container_get_n_children (container);
|
||||
|
||||
if (n_children == 0)
|
||||
return NULL;
|
||||
|
||||
switch (select_type)
|
||||
{
|
||||
case GIMP_ACTION_SELECT_FIRST:
|
||||
select_index = 0;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_LAST:
|
||||
select_index = n_children - 1;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_PREVIOUS:
|
||||
select_index = gimp_container_get_child_index (container, current) - 1;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_NEXT:
|
||||
select_index = gimp_container_get_child_index (container, current) + 1;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_SKIP_PREVIOUS:
|
||||
select_index = gimp_container_get_child_index (container, current) - 10;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_SKIP_NEXT:
|
||||
select_index = gimp_container_get_child_index (container, current) + 10;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_FLAT_PREVIOUS:
|
||||
/* XXX We only support this case and the next for GimpItem
|
||||
* containers.
|
||||
*/
|
||||
g_return_val_if_fail (GIMP_IS_ITEM (current), NULL);
|
||||
select_index = gimp_container_get_child_index (container, current) - 1;
|
||||
if (select_index < 0)
|
||||
{
|
||||
GimpItem *parent = gimp_item_get_parent (GIMP_ITEM (current));
|
||||
|
||||
if (parent)
|
||||
return GIMP_OBJECT (parent);
|
||||
else
|
||||
return current;
|
||||
}
|
||||
else
|
||||
{
|
||||
GimpObject *prev;
|
||||
GimpContainer *prev_container;
|
||||
|
||||
prev = gimp_container_get_child_by_index (container, select_index);
|
||||
while ((prev_container = gimp_viewable_get_children (GIMP_VIEWABLE (prev))) != NULL)
|
||||
{
|
||||
if (gimp_viewable_get_expanded (GIMP_VIEWABLE (prev)))
|
||||
{
|
||||
gint n_prev_children;
|
||||
|
||||
n_prev_children = gimp_container_get_n_children (prev_container);
|
||||
if (n_prev_children > 0)
|
||||
{
|
||||
select_index = n_prev_children - 1;
|
||||
container = prev_container;
|
||||
prev = gimp_container_get_child_by_index (container, select_index);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_FLAT_NEXT:
|
||||
{
|
||||
GimpContainer *current_container;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_ITEM (current), NULL);
|
||||
|
||||
if ((current_container = gimp_viewable_get_children (GIMP_VIEWABLE (current))) != NULL &&
|
||||
gimp_viewable_get_expanded (GIMP_VIEWABLE (current)) &&
|
||||
gimp_container_get_n_children (current_container) > 0)
|
||||
{
|
||||
select_index = 0;
|
||||
container = current_container;
|
||||
}
|
||||
else
|
||||
{
|
||||
select_index = gimp_container_get_child_index (container, current) + 1;
|
||||
if (select_index >= n_children)
|
||||
{
|
||||
while (TRUE)
|
||||
{
|
||||
GimpItem *parent;
|
||||
GimpContainer *parent_container;
|
||||
gint n_parent_children;
|
||||
|
||||
parent = gimp_item_get_parent (GIMP_ITEM (current));
|
||||
if (parent == NULL)
|
||||
break;
|
||||
|
||||
parent_container = gimp_item_get_container (parent);
|
||||
n_parent_children = gimp_container_get_n_children (parent_container);
|
||||
if (gimp_container_get_child_index (parent_container, GIMP_OBJECT (parent)) + 1 < n_parent_children)
|
||||
{
|
||||
container = parent_container;
|
||||
select_index = gimp_container_get_child_index (parent_container, GIMP_OBJECT (parent)) + 1;
|
||||
break;
|
||||
}
|
||||
|
||||
current = GIMP_OBJECT (parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if ((gint) select_type >= 0)
|
||||
select_index = (gint) select_type;
|
||||
else
|
||||
g_return_val_if_reached (current);
|
||||
break;
|
||||
}
|
||||
|
||||
n_children = gimp_container_get_n_children (container);
|
||||
select_index = CLAMP (select_index, 0, n_children - 1);
|
||||
|
||||
return gimp_container_get_child_by_index (container, select_index);
|
||||
}
|
||||
|
||||
void
|
||||
action_message (GimpDisplay *display,
|
||||
GObject *object,
|
||||
const gchar *format,
|
||||
...)
|
||||
{
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
GimpStatusbar *statusbar = gimp_display_shell_get_statusbar (shell);
|
||||
const gchar *icon_name = NULL;
|
||||
va_list args;
|
||||
|
||||
if (GIMP_IS_TOOL_OPTIONS (object))
|
||||
{
|
||||
GimpToolInfo *tool_info = GIMP_TOOL_OPTIONS (object)->tool_info;
|
||||
|
||||
icon_name = gimp_viewable_get_icon_name (GIMP_VIEWABLE (tool_info));
|
||||
}
|
||||
else if (GIMP_IS_VIEWABLE (object))
|
||||
{
|
||||
icon_name = gimp_viewable_get_icon_name (GIMP_VIEWABLE (object));
|
||||
}
|
||||
|
||||
va_start (args, format);
|
||||
gimp_statusbar_push_temp_valist (statusbar, GIMP_MESSAGE_INFO,
|
||||
icon_name, format, args);
|
||||
va_end (args);
|
||||
}
|
119
app/actions/actions.h
Normal file
119
app/actions/actions.h
Normal file
|
@ -0,0 +1,119 @@
|
|||
/* 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
|
||||
* 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 __ACTIONS_H__
|
||||
#define __ACTIONS_H__
|
||||
|
||||
|
||||
extern GimpActionFactory *global_action_factory;
|
||||
|
||||
|
||||
void actions_init (Gimp *gimp);
|
||||
void actions_exit (Gimp *gimp);
|
||||
|
||||
Gimp * action_data_get_gimp (gpointer data);
|
||||
GimpContext * action_data_get_context (gpointer data);
|
||||
GimpImage * action_data_get_image (gpointer data);
|
||||
GimpDisplay * action_data_get_display (gpointer data);
|
||||
GimpDisplayShell * action_data_get_shell (gpointer data);
|
||||
GtkWidget * action_data_get_widget (gpointer data);
|
||||
gint action_data_sel_count (gpointer data);
|
||||
|
||||
gdouble action_select_value (GimpActionSelectType select_type,
|
||||
gdouble value,
|
||||
gdouble min,
|
||||
gdouble max,
|
||||
gdouble def,
|
||||
gdouble small_inc,
|
||||
gdouble inc,
|
||||
gdouble skip_inc,
|
||||
gdouble delta_factor,
|
||||
gboolean wrap);
|
||||
void action_select_property (GimpActionSelectType select_type,
|
||||
GimpDisplay *display,
|
||||
GObject *object,
|
||||
const gchar *property_name,
|
||||
gdouble small_inc,
|
||||
gdouble inc,
|
||||
gdouble skip_inc,
|
||||
gdouble delta_factor,
|
||||
gboolean wrap);
|
||||
GimpObject * action_select_object (GimpActionSelectType select_type,
|
||||
GimpContainer *container,
|
||||
GimpObject *current);
|
||||
void action_message (GimpDisplay *display,
|
||||
GObject *object,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF(3,4);
|
||||
|
||||
|
||||
#define return_if_no_gimp(gimp,data) \
|
||||
gimp = action_data_get_gimp (data); \
|
||||
if (! gimp) \
|
||||
return
|
||||
|
||||
#define return_if_no_context(context,data) \
|
||||
context = action_data_get_context (data); \
|
||||
if (! context) \
|
||||
return
|
||||
|
||||
#define return_if_no_image(image,data) \
|
||||
image = action_data_get_image (data); \
|
||||
if (! image) \
|
||||
return
|
||||
|
||||
#define return_if_no_display(display,data) \
|
||||
display = action_data_get_display (data); \
|
||||
if (! display) \
|
||||
return
|
||||
|
||||
#define return_if_no_shell(shell,data) \
|
||||
shell = action_data_get_shell (data); \
|
||||
if (! shell) \
|
||||
return
|
||||
|
||||
#define return_if_no_widget(widget,data) \
|
||||
widget = action_data_get_widget (data); \
|
||||
if (! widget) \
|
||||
return
|
||||
|
||||
#define return_if_no_drawables(image,drawables,data) \
|
||||
return_if_no_image (image,data); \
|
||||
drawables = gimp_image_get_selected_drawables (image); \
|
||||
if (! drawables) \
|
||||
return
|
||||
|
||||
#define return_if_no_layers(image,layers,data) \
|
||||
return_if_no_image (image,data); \
|
||||
layers = gimp_image_get_selected_layers (image); \
|
||||
if (! layers) \
|
||||
return
|
||||
|
||||
#define return_if_no_channels(image,channels,data) \
|
||||
return_if_no_image (image,data); \
|
||||
channels = gimp_image_get_selected_channels (image); \
|
||||
if (! channels) \
|
||||
return
|
||||
|
||||
#define return_if_no_paths(image,paths,data) \
|
||||
return_if_no_image (image,data); \
|
||||
paths = gimp_image_get_selected_paths (image); \
|
||||
if (! paths) \
|
||||
return
|
||||
|
||||
|
||||
#endif /* __ACTIONS_H__ */
|
76
app/actions/brush-editor-actions.c
Normal file
76
app/actions/brush-editor-actions.c
Normal file
|
@ -0,0 +1,76 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpbrusheditor.h"
|
||||
|
||||
#include "brush-editor-actions.h"
|
||||
#include "data-editor-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpToggleActionEntry brush_editor_toggle_actions[] =
|
||||
{
|
||||
{ "brush-editor-edit-active", GIMP_ICON_LINKED,
|
||||
NC_("brush-editor-action", "Edit Active Brush"), NULL, { NULL }, NULL,
|
||||
data_editor_edit_active_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_BRUSH_EDITOR_EDIT_ACTIVE }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
brush_editor_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_toggle_actions (group, "brush-editor-action",
|
||||
brush_editor_toggle_actions,
|
||||
G_N_ELEMENTS (brush_editor_toggle_actions));
|
||||
}
|
||||
|
||||
void
|
||||
brush_editor_actions_update (GimpActionGroup *group,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (user_data);
|
||||
gboolean edit_active = FALSE;
|
||||
|
||||
edit_active = gimp_data_editor_get_edit_active (data_editor);
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
#define SET_ACTIVE(action,condition) \
|
||||
gimp_action_group_set_action_active (group, action, (condition) != 0)
|
||||
|
||||
SET_ACTIVE ("brush-editor-edit-active", edit_active);
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
#undef SET_ACTIVE
|
||||
}
|
27
app/actions/brush-editor-actions.h
Normal file
27
app/actions/brush-editor-actions.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* 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
|
||||
* 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 __BRUSH_EDITOR_ACTIONS_H__
|
||||
#define __BRUSH_EDITOR_ACTIONS_H__
|
||||
|
||||
|
||||
void brush_editor_actions_setup (GimpActionGroup *group);
|
||||
void brush_editor_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __BRUSH_EDITOR_ACTIONS_H__ */
|
145
app/actions/brushes-actions.c
Normal file
145
app/actions/brushes-actions.c
Normal file
|
@ -0,0 +1,145 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimpbrushgenerated.h"
|
||||
#include "core/gimpcontext.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "brushes-actions.h"
|
||||
#include "data-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry brushes_actions[] =
|
||||
{
|
||||
{ "brushes-open-as-image", GIMP_ICON_DOCUMENT_OPEN,
|
||||
NC_("brushes-action", "_Open Brush as Image"), NULL, { NULL },
|
||||
NC_("brushes-action", "Open brush as image"),
|
||||
data_open_as_image_cmd_callback,
|
||||
GIMP_HELP_BRUSH_OPEN_AS_IMAGE },
|
||||
|
||||
{ "brushes-new", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("brushes-action", "_New Brush"), NULL, { NULL },
|
||||
NC_("brushes-action", "Create a new brush"),
|
||||
data_new_cmd_callback,
|
||||
GIMP_HELP_BRUSH_NEW },
|
||||
|
||||
{ "brushes-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
|
||||
NC_("brushes-action", "D_uplicate Brush"), NULL, { NULL },
|
||||
NC_("brushes-action", "Duplicate this brush"),
|
||||
data_duplicate_cmd_callback,
|
||||
GIMP_HELP_BRUSH_DUPLICATE },
|
||||
|
||||
{ "brushes-copy-location", GIMP_ICON_EDIT_COPY,
|
||||
NC_("brushes-action", "Copy Brush _Location"), NULL, { NULL },
|
||||
NC_("brushes-action", "Copy brush file location to clipboard"),
|
||||
data_copy_location_cmd_callback,
|
||||
GIMP_HELP_BRUSH_COPY_LOCATION },
|
||||
|
||||
{ "brushes-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
|
||||
NC_("brushes-action", "Show in _File Manager"), NULL, { NULL },
|
||||
NC_("brushes-action", "Show brush file location in the file manager"),
|
||||
data_show_in_file_manager_cmd_callback,
|
||||
GIMP_HELP_BRUSH_SHOW_IN_FILE_MANAGER },
|
||||
|
||||
{ "brushes-delete", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("brushes-action", "_Delete Brush"), NULL, { NULL },
|
||||
NC_("brushes-action", "Delete this brush"),
|
||||
data_delete_cmd_callback,
|
||||
GIMP_HELP_BRUSH_DELETE },
|
||||
|
||||
{ "brushes-refresh", GIMP_ICON_VIEW_REFRESH,
|
||||
NC_("brushes-action", "_Refresh Brushes"), NULL, { NULL },
|
||||
NC_("brushes-action", "Refresh brushes"),
|
||||
data_refresh_cmd_callback,
|
||||
GIMP_HELP_BRUSH_REFRESH }
|
||||
};
|
||||
|
||||
static const GimpStringActionEntry brushes_edit_actions[] =
|
||||
{
|
||||
{ "brushes-edit", GIMP_ICON_EDIT,
|
||||
NC_("brushes-action", "_Edit Brush..."), NULL, { NULL },
|
||||
NC_("brushes-action", "Edit this brush"),
|
||||
"gimp-brush-editor",
|
||||
GIMP_HELP_BRUSH_EDIT }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
brushes_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "brushes-action",
|
||||
brushes_actions,
|
||||
G_N_ELEMENTS (brushes_actions));
|
||||
|
||||
gimp_action_group_add_string_actions (group, "brushes-action",
|
||||
brushes_edit_actions,
|
||||
G_N_ELEMENTS (brushes_edit_actions),
|
||||
data_edit_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
brushes_actions_update (GimpActionGroup *group,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpContext *context = action_data_get_context (user_data);
|
||||
GimpBrush *brush = NULL;
|
||||
GimpData *data = NULL;
|
||||
GFile *file = NULL;
|
||||
|
||||
if (context)
|
||||
{
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (action_data_sel_count (user_data) > 1)
|
||||
{
|
||||
brush = NULL;
|
||||
}
|
||||
|
||||
if (brush)
|
||||
{
|
||||
data = GIMP_DATA (brush);
|
||||
|
||||
file = gimp_data_get_file (data);
|
||||
}
|
||||
}
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
|
||||
|
||||
SET_SENSITIVE ("brushes-edit", brush);
|
||||
SET_SENSITIVE ("brushes-open-as-image", file && ! GIMP_IS_BRUSH_GENERATED (brush));
|
||||
SET_SENSITIVE ("brushes-duplicate", brush && gimp_data_is_duplicatable (data));
|
||||
SET_SENSITIVE ("brushes-copy-location", file);
|
||||
SET_SENSITIVE ("brushes-show-in-file-manager", file);
|
||||
SET_SENSITIVE ("brushes-delete", brush && gimp_data_is_deletable (data));
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
}
|
27
app/actions/brushes-actions.h
Normal file
27
app/actions/brushes-actions.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* 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
|
||||
* 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 __BRUSHES_ACTIONS_H__
|
||||
#define __BRUSHES_ACTIONS_H__
|
||||
|
||||
|
||||
void brushes_actions_setup (GimpActionGroup *group);
|
||||
void brushes_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __BRUSHES_ACTIONS_H__ */
|
132
app/actions/buffers-actions.c
Normal file
132
app/actions/buffers-actions.c
Normal file
|
@ -0,0 +1,132 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimpcontext.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "buffers-actions.h"
|
||||
#include "buffers-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry buffers_actions[] =
|
||||
{
|
||||
{ "buffers-paste-as-new-image", GIMP_ICON_EDIT_PASTE_AS_NEW,
|
||||
NC_("buffers-action", "Paste Buffer as _New Image"), NULL, { NULL },
|
||||
NC_("buffers-action", "Paste the selected buffer as a new image"),
|
||||
buffers_paste_as_new_image_cmd_callback,
|
||||
GIMP_HELP_BUFFER_PASTE_AS_NEW_IMAGE },
|
||||
|
||||
{ "buffers-delete", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("buffers-action", "_Delete Buffer"), NULL, { NULL },
|
||||
NC_("buffers-action", "Delete the selected buffer"),
|
||||
buffers_delete_cmd_callback,
|
||||
GIMP_HELP_BUFFER_DELETE }
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry buffers_paste_actions[] =
|
||||
{
|
||||
{ "buffers-paste", GIMP_ICON_EDIT_PASTE,
|
||||
NC_("buffers-action", "_Paste Buffer"), NULL, { NULL },
|
||||
NC_("buffers-action", "Paste the selected buffer"),
|
||||
GIMP_PASTE_TYPE_FLOATING, FALSE,
|
||||
GIMP_HELP_BUFFER_PASTE },
|
||||
|
||||
{ "buffers-paste-in-place", GIMP_ICON_EDIT_PASTE,
|
||||
NC_("buffers-action", "Paste Buffer In Pl_ace"), NULL, { NULL },
|
||||
NC_("buffers-action", "Paste the selected buffer at its original position"),
|
||||
GIMP_PASTE_TYPE_FLOATING_IN_PLACE, FALSE,
|
||||
GIMP_HELP_BUFFER_PASTE_IN_PLACE },
|
||||
|
||||
{ "buffers-paste-into", GIMP_ICON_EDIT_PASTE_INTO,
|
||||
NC_("buffers-action", "Paste Buffer _Into The Selection"), NULL, { NULL },
|
||||
NC_("buffers-action", "Paste the selected buffer into the selection"),
|
||||
GIMP_PASTE_TYPE_FLOATING_INTO, FALSE,
|
||||
GIMP_HELP_BUFFER_PASTE_INTO },
|
||||
|
||||
{ "buffers-paste-into-in-place", GIMP_ICON_EDIT_PASTE_INTO,
|
||||
NC_("buffers-action", "Paste Buffer Into The Selection In Place"), NULL, { NULL },
|
||||
NC_("buffers-action",
|
||||
"Paste the selected buffer into the selection at its original position"),
|
||||
GIMP_PASTE_TYPE_FLOATING_INTO_IN_PLACE, FALSE,
|
||||
GIMP_HELP_BUFFER_PASTE_INTO_IN_PLACE },
|
||||
|
||||
{ "buffers-paste-as-new-layer", GIMP_ICON_EDIT_PASTE_AS_NEW,
|
||||
NC_("buffers-action", "Paste Buffer as New _Layer"), NULL, { NULL },
|
||||
NC_("buffers-action", "Paste the selected buffer as a new layer"),
|
||||
GIMP_PASTE_TYPE_NEW_LAYER, FALSE,
|
||||
GIMP_HELP_BUFFER_PASTE_AS_NEW_LAYER },
|
||||
|
||||
{ "buffers-paste-as-new-layer-in-place", GIMP_ICON_EDIT_PASTE_AS_NEW,
|
||||
NC_("buffers-action", "Paste Buffer as New Layer in Place"), NULL, { NULL },
|
||||
NC_("buffers-action",
|
||||
"Paste the selected buffer as a new layer at its original position"),
|
||||
GIMP_PASTE_TYPE_NEW_LAYER_IN_PLACE, FALSE,
|
||||
GIMP_HELP_BUFFER_PASTE_AS_NEW_LAYER_IN_PLACE },
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
buffers_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "buffers-action",
|
||||
buffers_actions,
|
||||
G_N_ELEMENTS (buffers_actions));
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "buffers-action",
|
||||
buffers_paste_actions,
|
||||
G_N_ELEMENTS (buffers_paste_actions),
|
||||
buffers_paste_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
buffers_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context = action_data_get_context (data);
|
||||
GimpBuffer *buffer = NULL;
|
||||
|
||||
if (context)
|
||||
buffer = gimp_context_get_buffer (context);
|
||||
|
||||
#define SET_SENSITIVE(action,condition,reason) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0, reason)
|
||||
|
||||
SET_SENSITIVE ("buffers-paste", buffer, _("No selected buffer"));
|
||||
SET_SENSITIVE ("buffers-paste-in-place", buffer, _("No selected buffer"));
|
||||
SET_SENSITIVE ("buffers-paste-into", buffer, _("No selected buffer"));
|
||||
SET_SENSITIVE ("buffers-paste-into-in-place", buffer, _("No selected buffer"));
|
||||
SET_SENSITIVE ("buffers-paste-as-new-layer", buffer, _("No selected buffer"));
|
||||
SET_SENSITIVE ("buffers-paste-as-new-layer-in-place", buffer, _("No selected buffer"));
|
||||
SET_SENSITIVE ("buffers-paste-as-new-image", buffer, _("No selected buffer"));
|
||||
SET_SENSITIVE ("buffers-delete", buffer, _("No selected buffer"));
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
}
|
27
app/actions/buffers-actions.h
Normal file
27
app/actions/buffers-actions.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* 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
|
||||
* 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 __BUFFERS_ACTIONS_H__
|
||||
#define __BUFFERS_ACTIONS_H__
|
||||
|
||||
|
||||
void buffers_actions_setup (GimpActionGroup *group);
|
||||
void buffers_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __BUFFERS_ACTIONS_H__ */
|
143
app/actions/buffers-commands.c
Normal file
143
app/actions/buffers-commands.c
Normal file
|
@ -0,0 +1,143 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimp-edit.h"
|
||||
#include "core/gimpcontainer.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
|
||||
#include "widgets/gimpcontainereditor.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimpcontainerview-utils.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
#include "display/gimpdisplayshell-transform.h"
|
||||
|
||||
#include "buffers-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
buffers_paste_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContainer *container;
|
||||
GimpContext *context;
|
||||
GimpBuffer *buffer;
|
||||
GimpPasteType paste_type = (GimpPasteType) g_variant_get_int32 (value);
|
||||
|
||||
container = gimp_container_view_get_container (editor->view);
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
|
||||
buffer = gimp_context_get_buffer (context);
|
||||
|
||||
if (buffer && gimp_container_have (container, GIMP_OBJECT (buffer)))
|
||||
{
|
||||
GimpDisplay *display = gimp_context_get_display (context);
|
||||
GimpImage *image = NULL;
|
||||
gint x = -1;
|
||||
gint y = -1;
|
||||
gint width = -1;
|
||||
gint height = -1;
|
||||
|
||||
if (display)
|
||||
{
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
|
||||
gimp_display_shell_untransform_viewport (
|
||||
shell,
|
||||
! gimp_display_shell_get_infinite_canvas (shell),
|
||||
&x, &y, &width, &height);
|
||||
|
||||
image = gimp_display_get_image (display);
|
||||
}
|
||||
else
|
||||
{
|
||||
image = gimp_context_get_image (context);
|
||||
}
|
||||
|
||||
if (image)
|
||||
{
|
||||
GList *drawables = gimp_image_get_selected_drawables (image);
|
||||
|
||||
g_list_free (gimp_edit_paste (image, drawables,
|
||||
GIMP_OBJECT (buffer), paste_type,
|
||||
context, FALSE,
|
||||
x, y, width, height));
|
||||
|
||||
gimp_image_flush (image);
|
||||
g_list_free (drawables);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
buffers_paste_as_new_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContainer *container;
|
||||
GimpContext *context;
|
||||
GimpBuffer *buffer;
|
||||
|
||||
container = gimp_container_view_get_container (editor->view);
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
|
||||
buffer = gimp_context_get_buffer (context);
|
||||
|
||||
if (buffer && gimp_container_have (container, GIMP_OBJECT (buffer)))
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (editor);
|
||||
GimpImage *new_image;
|
||||
|
||||
new_image = gimp_edit_paste_as_new_image (context->gimp,
|
||||
GIMP_OBJECT (buffer),
|
||||
context);
|
||||
gimp_create_display (context->gimp, new_image,
|
||||
gimp_unit_pixel (), 1.0,
|
||||
G_OBJECT (gimp_widget_get_monitor (widget)));
|
||||
g_object_unref (new_image);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
buffers_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
|
||||
gimp_container_view_remove_active (editor->view);
|
||||
}
|
33
app/actions/buffers-commands.h
Normal file
33
app/actions/buffers-commands.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
/* 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
|
||||
* 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 __BUFFERS_COMMANDS_H__
|
||||
#define __BUFFERS_COMMANDS_H__
|
||||
|
||||
|
||||
void buffers_paste_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void buffers_paste_as_new_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void buffers_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __BUFFERS_COMMANDS_H__ */
|
349
app/actions/channels-actions.c
Normal file
349
app/actions/channels-actions.c
Normal file
|
@ -0,0 +1,349 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpitem.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpcomponenteditor.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "channels-actions.h"
|
||||
#include "channels-commands.h"
|
||||
#include "items-actions.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry channels_actions[] =
|
||||
{
|
||||
{ "channels-edit-attributes", GIMP_ICON_EDIT,
|
||||
NC_("channels-action", "_Edit Channel Attributes..."), NULL, { NULL },
|
||||
NC_("channels-action", "Edit the channel's name, color and opacity"),
|
||||
channels_edit_attributes_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_EDIT },
|
||||
|
||||
{ "channels-new", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("channels-action", "_New Channel..."), NULL, { NULL },
|
||||
NC_("channels-action", "Create a new channel"),
|
||||
channels_new_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_NEW },
|
||||
|
||||
{ "channels-new-last-values", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("channels-action", "_New Channel"), NULL, { NULL },
|
||||
NC_("channels-action", "Create a new channel with last used values"),
|
||||
channels_new_last_vals_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_NEW },
|
||||
|
||||
{ "channels-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
|
||||
NC_("channels-action", "D_uplicate Channels"), NULL, { NULL },
|
||||
NC_("channels-action",
|
||||
"Create duplicates of selected channels and add them to the image"),
|
||||
channels_duplicate_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_DUPLICATE },
|
||||
|
||||
{ "channels-delete", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("channels-action", "_Delete Channels"), NULL, { NULL },
|
||||
NC_("channels-action", "Delete selected channels"),
|
||||
channels_delete_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_DELETE },
|
||||
|
||||
{ "channels-raise", GIMP_ICON_GO_UP,
|
||||
NC_("channels-action", "_Raise Channels"), NULL, { NULL },
|
||||
NC_("channels-action", "Raise these channels one step in the channel stack"),
|
||||
channels_raise_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_RAISE },
|
||||
|
||||
{ "channels-raise-to-top", GIMP_ICON_GO_TOP,
|
||||
NC_("channels-action", "Raise Channels to _Top"), NULL, { NULL },
|
||||
NC_("channels-action",
|
||||
"Raise these channels to the top of the channel stack"),
|
||||
channels_raise_to_top_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_RAISE_TO_TOP },
|
||||
|
||||
{ "channels-lower", GIMP_ICON_GO_DOWN,
|
||||
NC_("channels-action", "_Lower Channels"), NULL, { NULL },
|
||||
NC_("channels-action", "Lower these channels one step in the channel stack"),
|
||||
channels_lower_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_LOWER },
|
||||
|
||||
{ "channels-lower-to-bottom", GIMP_ICON_GO_BOTTOM,
|
||||
NC_("channels-action", "Lower Channels to _Bottom"), NULL, { NULL },
|
||||
NC_("channels-action",
|
||||
"Lower these channels to the bottom of the channel stack"),
|
||||
channels_lower_to_bottom_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_LOWER_TO_BOTTOM }
|
||||
};
|
||||
|
||||
static const GimpToggleActionEntry channels_toggle_actions[] =
|
||||
{
|
||||
{ "channels-visible", GIMP_ICON_VISIBLE,
|
||||
NC_("channels-action", "Toggle Channel _Visibility"), NULL, { NULL }, NULL,
|
||||
channels_visible_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_CHANNEL_VISIBLE },
|
||||
|
||||
{ "channels-lock-content", GIMP_ICON_LOCK_CONTENT,
|
||||
NC_("channels-action", "L_ock Pixels of Channel"), NULL, { NULL }, NULL,
|
||||
channels_lock_content_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_CHANNEL_LOCK_PIXELS },
|
||||
|
||||
{ "channels-lock-position", GIMP_ICON_LOCK_POSITION,
|
||||
NC_("channels-action", "L_ock Position of Channel"), NULL, { NULL }, NULL,
|
||||
channels_lock_position_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_CHANNEL_LOCK_POSITION }
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry channels_color_tag_actions[] =
|
||||
{
|
||||
{ "channels-color-tag-none", GIMP_ICON_EDIT_CLEAR,
|
||||
NC_("channels-action", "None"), NULL, { NULL },
|
||||
NC_("channels-action", "Channel Color Tag: Clear"),
|
||||
GIMP_COLOR_TAG_NONE, FALSE,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG },
|
||||
|
||||
{ "channels-color-tag-blue", NULL,
|
||||
NC_("channels-action", "Blue"), NULL, { NULL },
|
||||
NC_("channels-action", "Channel Color Tag: Set to Blue"),
|
||||
GIMP_COLOR_TAG_BLUE, FALSE,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG },
|
||||
|
||||
{ "channels-color-tag-green", NULL,
|
||||
NC_("channels-action", "Green"), NULL, { NULL },
|
||||
NC_("channels-action", "Channel Color Tag: Set to Green"),
|
||||
GIMP_COLOR_TAG_GREEN, FALSE,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG },
|
||||
|
||||
{ "channels-color-tag-yellow", NULL,
|
||||
NC_("channels-action", "Yellow"), NULL, { NULL },
|
||||
NC_("channels-action", "Channel Color Tag: Set to Yellow"),
|
||||
GIMP_COLOR_TAG_YELLOW, FALSE,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG },
|
||||
|
||||
{ "channels-color-tag-orange", NULL,
|
||||
NC_("channels-action", "Orange"), NULL, { NULL },
|
||||
NC_("channels-action", "Channel Color Tag: Set to Orange"),
|
||||
GIMP_COLOR_TAG_ORANGE, FALSE,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG },
|
||||
|
||||
{ "channels-color-tag-brown", NULL,
|
||||
NC_("channels-action", "Brown"), NULL, { NULL },
|
||||
NC_("channels-action", "Channel Color Tag: Set to Brown"),
|
||||
GIMP_COLOR_TAG_BROWN, FALSE,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG },
|
||||
|
||||
{ "channels-color-tag-red", NULL,
|
||||
NC_("channels-action", "Red"), NULL, { NULL },
|
||||
NC_("channels-action", "Channel Color Tag: Set to Red"),
|
||||
GIMP_COLOR_TAG_RED, FALSE,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG },
|
||||
|
||||
{ "channels-color-tag-violet", NULL,
|
||||
NC_("channels-action", "Violet"), NULL, { NULL },
|
||||
NC_("channels-action", "Channel Color Tag: Set to Violet"),
|
||||
GIMP_COLOR_TAG_VIOLET, FALSE,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG },
|
||||
|
||||
{ "channels-color-tag-gray", NULL,
|
||||
NC_("channels-action", "Gray"), NULL, { NULL },
|
||||
NC_("channels-action", "Channel Color Tag: Set to Gray"),
|
||||
GIMP_COLOR_TAG_GRAY, FALSE,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG }
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry channels_to_selection_actions[] =
|
||||
{
|
||||
{ "channels-selection-replace", GIMP_ICON_SELECTION_REPLACE,
|
||||
NC_("channels-action", "Channels to Sele_ction"), NULL, { NULL },
|
||||
NC_("channels-action", "Replace the selection with selected channels"),
|
||||
GIMP_CHANNEL_OP_REPLACE, FALSE,
|
||||
GIMP_HELP_CHANNEL_SELECTION_REPLACE },
|
||||
|
||||
{ "channels-selection-add", GIMP_ICON_SELECTION_ADD,
|
||||
NC_("channels-action", "_Add Channels to Selection"), NULL, { NULL },
|
||||
NC_("channels-action", "Add selected channels to the current selection"),
|
||||
GIMP_CHANNEL_OP_ADD, FALSE,
|
||||
GIMP_HELP_CHANNEL_SELECTION_ADD },
|
||||
|
||||
{ "channels-selection-subtract", GIMP_ICON_SELECTION_SUBTRACT,
|
||||
NC_("channels-action", "_Subtract Channels from Selection"), NULL, { NULL },
|
||||
NC_("channels-action", "Subtract selected channels from the current selection"),
|
||||
GIMP_CHANNEL_OP_SUBTRACT, FALSE,
|
||||
GIMP_HELP_CHANNEL_SELECTION_SUBTRACT },
|
||||
|
||||
{ "channels-selection-intersect", GIMP_ICON_SELECTION_INTERSECT,
|
||||
NC_("channels-action", "_Intersect Channels with Selection"), NULL, { NULL },
|
||||
NC_("channels-action", "Intersect selected channels with the current selection and each other"),
|
||||
GIMP_CHANNEL_OP_INTERSECT, FALSE,
|
||||
GIMP_HELP_CHANNEL_SELECTION_INTERSECT }
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry channels_select_actions[] =
|
||||
{
|
||||
{ "channels-select-top", NULL,
|
||||
NC_("channels-action", "Select _Top Channel"), NULL, { NULL },
|
||||
NC_("channels-action", "Select the topmost channel"),
|
||||
GIMP_ACTION_SELECT_FIRST, FALSE,
|
||||
GIMP_HELP_CHANNEL_TOP },
|
||||
|
||||
{ "channels-select-bottom", NULL,
|
||||
NC_("channels-action", "Select _Bottom Channel"), NULL, { NULL },
|
||||
NC_("channels-action", "Select the bottommost channel"),
|
||||
GIMP_ACTION_SELECT_LAST, FALSE,
|
||||
GIMP_HELP_CHANNEL_BOTTOM },
|
||||
|
||||
{ "channels-select-previous", NULL,
|
||||
NC_("channels-action", "Select _Previous Channels"), NULL, { NULL },
|
||||
NC_("channels-action", "Select the channels above the selected channels"),
|
||||
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
|
||||
GIMP_HELP_CHANNEL_PREVIOUS },
|
||||
|
||||
{ "channels-select-next", NULL,
|
||||
NC_("channels-action", "Select _Next Channels"), NULL, { NULL },
|
||||
NC_("channels-action", "Select the channels below the selected channels"),
|
||||
GIMP_ACTION_SELECT_NEXT, FALSE,
|
||||
GIMP_HELP_CHANNEL_NEXT }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
channels_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "channels-action",
|
||||
channels_actions,
|
||||
G_N_ELEMENTS (channels_actions));
|
||||
|
||||
gimp_action_group_add_toggle_actions (group, "channels-action",
|
||||
channels_toggle_actions,
|
||||
G_N_ELEMENTS (channels_toggle_actions));
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "channels-action",
|
||||
channels_color_tag_actions,
|
||||
G_N_ELEMENTS (channels_color_tag_actions),
|
||||
channels_color_tag_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "channels-action",
|
||||
channels_to_selection_actions,
|
||||
G_N_ELEMENTS (channels_to_selection_actions),
|
||||
channels_to_selection_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "channels-action",
|
||||
channels_select_actions,
|
||||
G_N_ELEMENTS (channels_select_actions),
|
||||
channels_select_cmd_callback);
|
||||
|
||||
items_actions_setup (group, "channels");
|
||||
}
|
||||
|
||||
void
|
||||
channels_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image = action_data_get_image (data);
|
||||
gboolean fs = FALSE;
|
||||
gboolean component = FALSE;
|
||||
GList *selected_channels = NULL;
|
||||
gint n_selected_channels = 0;
|
||||
gint n_channels = 0;
|
||||
gboolean have_prev = FALSE; /* At least 1 selected channel has a previous sibling. */
|
||||
gboolean have_next = FALSE; /* At least 1 selected channel has a next sibling. */
|
||||
gboolean first_selected = FALSE; /* First channel is selected */
|
||||
gboolean last_selected = FALSE; /* Last channel is selected */
|
||||
|
||||
if (image)
|
||||
{
|
||||
fs = (gimp_image_get_floating_selection (image) != NULL);
|
||||
|
||||
if (GIMP_IS_COMPONENT_EDITOR (data))
|
||||
{
|
||||
if (GIMP_COMPONENT_EDITOR (data)->clicked_component != -1)
|
||||
component = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
GList *iter;
|
||||
|
||||
selected_channels = gimp_image_get_selected_channels (image);
|
||||
n_selected_channels = g_list_length (selected_channels);
|
||||
n_channels = gimp_image_get_n_channels (image);
|
||||
|
||||
for (iter = selected_channels; iter; iter = iter->next)
|
||||
{
|
||||
GList *channel_list;
|
||||
GList *list;
|
||||
|
||||
channel_list = gimp_item_get_container_iter (GIMP_ITEM (iter->data));
|
||||
|
||||
list = g_list_find (channel_list, iter->data);
|
||||
|
||||
if (list)
|
||||
{
|
||||
if (gimp_item_get_index (list->data) == 0)
|
||||
first_selected = TRUE;
|
||||
if (gimp_item_get_index (list->data) == n_channels - 1)
|
||||
last_selected = TRUE;
|
||||
|
||||
if (g_list_previous (list))
|
||||
have_prev = TRUE;
|
||||
if (g_list_next (list))
|
||||
have_next = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
|
||||
|
||||
SET_SENSITIVE ("channels-edit-attributes", !fs && n_selected_channels == 1);
|
||||
|
||||
SET_SENSITIVE ("channels-new", !fs && image);
|
||||
SET_SENSITIVE ("channels-new-last-values", !fs && image);
|
||||
SET_SENSITIVE ("channels-duplicate", !fs && (n_selected_channels > 0 || component));
|
||||
SET_SENSITIVE ("channels-delete", !fs && n_selected_channels > 0);
|
||||
|
||||
SET_SENSITIVE ("channels-raise", !fs && n_selected_channels > 0 && have_prev && !first_selected);
|
||||
SET_SENSITIVE ("channels-raise-to-top", !fs && n_selected_channels > 0 && have_prev);
|
||||
SET_SENSITIVE ("channels-lower", !fs && n_selected_channels > 0 && have_next && !last_selected);
|
||||
SET_SENSITIVE ("channels-lower-to-bottom", !fs && n_selected_channels > 0 && have_next);
|
||||
|
||||
SET_SENSITIVE ("channels-selection-replace", !fs && (n_selected_channels > 0 || component));
|
||||
SET_SENSITIVE ("channels-selection-add", !fs && (n_selected_channels > 0 || component));
|
||||
SET_SENSITIVE ("channels-selection-subtract", !fs && (n_selected_channels > 0 || component));
|
||||
SET_SENSITIVE ("channels-selection-intersect", !fs && (n_selected_channels > 0 || component));
|
||||
|
||||
SET_SENSITIVE ("channels-select-top", !fs && n_channels > 0 && (n_selected_channels == 0 || have_prev));
|
||||
SET_SENSITIVE ("channels-select-bottom", !fs && n_channels > 0 && (n_selected_channels == 0 || have_next));
|
||||
SET_SENSITIVE ("channels-select-previous", !fs && n_selected_channels > 0 && have_prev);
|
||||
SET_SENSITIVE ("channels-select-next", !fs && n_selected_channels > 0 && have_next);
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
|
||||
items_actions_update (group, "channels", selected_channels);
|
||||
}
|
27
app/actions/channels-actions.h
Normal file
27
app/actions/channels-actions.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* 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
|
||||
* 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 __CHANNELS_ACTIONS_H__
|
||||
#define __CHANNELS_ACTIONS_H__
|
||||
|
||||
|
||||
void channels_actions_setup (GimpActionGroup *group);
|
||||
void channels_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __CHANNELS_ACTIONS_H__ */
|
743
app/actions/channels-commands.c
Normal file
743
app/actions/channels-commands.c
Normal file
|
@ -0,0 +1,743 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "config/gimpdialogconfig.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpchannel.h"
|
||||
#include "core/gimpchannel-select.h"
|
||||
#include "core/gimpcontainer.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpdrawable-fill.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
|
||||
#include "widgets/gimpaction.h"
|
||||
#include "widgets/gimpcolorpanel.h"
|
||||
#include "widgets/gimpcomponenteditor.h"
|
||||
#include "widgets/gimpdock.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "dialogs/dialogs.h"
|
||||
#include "dialogs/channel-options-dialog.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "channels-commands.h"
|
||||
#include "items-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
#define RGBA_EPSILON 1e-6
|
||||
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
static void channels_new_callback (GtkWidget *dialog,
|
||||
GimpImage *image,
|
||||
GimpChannel *channel,
|
||||
GimpContext *context,
|
||||
const gchar *channel_name,
|
||||
GeglColor *channel_color,
|
||||
gboolean save_selection,
|
||||
gboolean channel_visible,
|
||||
GimpColorTag channel_color_tag,
|
||||
gboolean channel_lock_content,
|
||||
gboolean channel_lock_position,
|
||||
gboolean channel_lock_visibility,
|
||||
gpointer user_data);
|
||||
static void channels_edit_attributes_callback (GtkWidget *dialog,
|
||||
GimpImage *image,
|
||||
GimpChannel *channel,
|
||||
GimpContext *context,
|
||||
const gchar *channel_name,
|
||||
GeglColor *channel_color,
|
||||
gboolean save_selection,
|
||||
gboolean channel_visible,
|
||||
GimpColorTag channel_color_tag,
|
||||
gboolean channel_lock_content,
|
||||
gboolean channel_lock_position,
|
||||
gboolean channel_lock_visibility,
|
||||
gpointer user_data);
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
channels_edit_attributes_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
GList *channels;
|
||||
GtkWidget *widget;
|
||||
GtkWidget *dialog;
|
||||
return_if_no_channels (image, channels, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
#define EDIT_DIALOG_KEY "gimp-channel-edit-attributes-dialog"
|
||||
|
||||
if (g_list_length (channels) != 1)
|
||||
return;
|
||||
|
||||
channel = channels->data;
|
||||
dialog = dialogs_get_dialog (G_OBJECT (channel), EDIT_DIALOG_KEY);
|
||||
|
||||
if (! dialog)
|
||||
{
|
||||
GimpItem *item = GIMP_ITEM (channel);
|
||||
|
||||
dialog = channel_options_dialog_new (image, channel,
|
||||
action_data_get_context (data),
|
||||
widget,
|
||||
_("Channel Attributes"),
|
||||
"gimp-channel-edit",
|
||||
GIMP_ICON_EDIT,
|
||||
_("Edit Channel Attributes"),
|
||||
GIMP_HELP_CHANNEL_EDIT,
|
||||
_("Edit Channel Color"),
|
||||
_("_Fill opacity:"),
|
||||
FALSE,
|
||||
gimp_object_get_name (channel),
|
||||
channel->color,
|
||||
gimp_item_get_visible (item),
|
||||
gimp_item_get_color_tag (item),
|
||||
gimp_item_get_lock_content (item),
|
||||
gimp_item_get_lock_position (item),
|
||||
gimp_item_get_lock_visibility (item),
|
||||
channels_edit_attributes_callback,
|
||||
NULL);
|
||||
|
||||
dialogs_attach_dialog (G_OBJECT (channel), EDIT_DIALOG_KEY, dialog);
|
||||
}
|
||||
|
||||
gtk_window_present (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
||||
void
|
||||
channels_new_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GtkWidget *widget;
|
||||
GtkWidget *dialog;
|
||||
return_if_no_image (image, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
#define NEW_DIALOG_KEY "gimp-channel-new-dialog"
|
||||
|
||||
dialog = dialogs_get_dialog (G_OBJECT (image), NEW_DIALOG_KEY);
|
||||
|
||||
if (! dialog)
|
||||
{
|
||||
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
|
||||
|
||||
dialog = channel_options_dialog_new (image, NULL,
|
||||
action_data_get_context (data),
|
||||
widget,
|
||||
_("New Channel"),
|
||||
"gimp-channel-new",
|
||||
GIMP_ICON_CHANNEL,
|
||||
_("Create a New Channel"),
|
||||
GIMP_HELP_CHANNEL_NEW,
|
||||
_("New Channel Color"),
|
||||
_("_Fill opacity:"),
|
||||
TRUE,
|
||||
config->channel_new_name,
|
||||
config->channel_new_color,
|
||||
TRUE,
|
||||
GIMP_COLOR_TAG_NONE,
|
||||
FALSE,
|
||||
FALSE,
|
||||
FALSE,
|
||||
channels_new_callback,
|
||||
NULL);
|
||||
|
||||
dialogs_attach_dialog (G_OBJECT (image), NEW_DIALOG_KEY, dialog);
|
||||
}
|
||||
|
||||
gtk_window_present (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
||||
void
|
||||
channels_new_last_vals_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
GimpDialogConfig *config;
|
||||
return_if_no_image (image, data);
|
||||
|
||||
config = GIMP_DIALOG_CONFIG (image->gimp->config);
|
||||
|
||||
channel = gimp_channel_new (image,
|
||||
gimp_image_get_width (image),
|
||||
gimp_image_get_height (image),
|
||||
config->channel_new_name,
|
||||
config->channel_new_color);
|
||||
|
||||
gimp_drawable_fill (GIMP_DRAWABLE (channel),
|
||||
action_data_get_context (data),
|
||||
GIMP_FILL_TRANSPARENT);
|
||||
|
||||
gimp_image_add_channel (image, channel,
|
||||
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
void
|
||||
channels_raise_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *channels;
|
||||
GList *iter;
|
||||
GList *raised_channels = NULL;
|
||||
return_if_no_channels (image, channels, data);
|
||||
|
||||
for (iter = channels; iter; iter = iter->next)
|
||||
{
|
||||
gint index;
|
||||
|
||||
index = gimp_item_get_index (iter->data);
|
||||
if (index > 0)
|
||||
{
|
||||
raised_channels = g_list_prepend (raised_channels, iter->data);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_image_flush (image);
|
||||
g_list_free (raised_channels);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
gimp_image_undo_group_start (image,
|
||||
GIMP_UNDO_GROUP_ITEM_DISPLACE,
|
||||
ngettext ("Raise Channel",
|
||||
"Raise Channels",
|
||||
g_list_length (raised_channels)));
|
||||
raised_channels = g_list_reverse (raised_channels);
|
||||
for (iter = raised_channels; iter; iter = iter->next)
|
||||
gimp_image_raise_item (image, iter->data, NULL);
|
||||
|
||||
gimp_image_flush (image);
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
g_list_free (raised_channels);
|
||||
}
|
||||
|
||||
void
|
||||
channels_raise_to_top_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *channels;
|
||||
GList *iter;
|
||||
GList *raised_channels = NULL;
|
||||
return_if_no_channels (image, channels, data);
|
||||
|
||||
for (iter = channels; iter; iter = iter->next)
|
||||
{
|
||||
gint index;
|
||||
|
||||
index = gimp_item_get_index (iter->data);
|
||||
if (index > 0)
|
||||
raised_channels = g_list_prepend (raised_channels, iter->data);
|
||||
}
|
||||
|
||||
gimp_image_undo_group_start (image,
|
||||
GIMP_UNDO_GROUP_ITEM_DISPLACE,
|
||||
ngettext ("Raise Channel to Top",
|
||||
"Raise Channels to Top",
|
||||
g_list_length (raised_channels)));
|
||||
|
||||
for (iter = raised_channels; iter; iter = iter->next)
|
||||
gimp_image_raise_item_to_top (image, iter->data);
|
||||
|
||||
gimp_image_flush (image);
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
g_list_free (raised_channels);
|
||||
}
|
||||
|
||||
void
|
||||
channels_lower_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *channels;
|
||||
GList *iter;
|
||||
GList *lowered_channels = NULL;
|
||||
return_if_no_channels (image, channels, data);
|
||||
|
||||
for (iter = channels; iter; iter = iter->next)
|
||||
{
|
||||
GList *layer_list;
|
||||
gint index;
|
||||
|
||||
layer_list = gimp_item_get_container_iter (GIMP_ITEM (iter->data));
|
||||
index = gimp_item_get_index (iter->data);
|
||||
if (index < g_list_length (layer_list) - 1)
|
||||
{
|
||||
lowered_channels = g_list_prepend (lowered_channels, iter->data);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_image_flush (image);
|
||||
g_list_free (lowered_channels);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
gimp_image_undo_group_start (image,
|
||||
GIMP_UNDO_GROUP_ITEM_DISPLACE,
|
||||
ngettext ("Lower Channel",
|
||||
"Lower Channels",
|
||||
g_list_length (lowered_channels)));
|
||||
|
||||
for (iter = lowered_channels; iter; iter = iter->next)
|
||||
gimp_image_lower_item (image, iter->data, NULL);
|
||||
|
||||
gimp_image_flush (image);
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
g_list_free (lowered_channels);
|
||||
}
|
||||
|
||||
void
|
||||
channels_lower_to_bottom_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *channels;
|
||||
GList *iter;
|
||||
GList *lowered_channels = NULL;
|
||||
return_if_no_channels (image, channels, data);
|
||||
|
||||
for (iter = channels; iter; iter = iter->next)
|
||||
{
|
||||
GList *layer_list;
|
||||
gint index;
|
||||
|
||||
layer_list = gimp_item_get_container_iter (GIMP_ITEM (iter->data));
|
||||
index = gimp_item_get_index (iter->data);
|
||||
if (index < g_list_length (layer_list) - 1)
|
||||
lowered_channels = g_list_prepend (lowered_channels, iter->data);
|
||||
}
|
||||
|
||||
gimp_image_undo_group_start (image,
|
||||
GIMP_UNDO_GROUP_ITEM_DISPLACE,
|
||||
ngettext ("Lower Channel to Bottom",
|
||||
"Lower Channels to Bottom",
|
||||
g_list_length (lowered_channels)));
|
||||
|
||||
for (iter = lowered_channels; iter; iter = iter->next)
|
||||
gimp_image_lower_item_to_bottom (image, iter->data);
|
||||
|
||||
gimp_image_flush (image);
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
g_list_free (lowered_channels);
|
||||
}
|
||||
|
||||
void
|
||||
channels_duplicate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image = NULL;
|
||||
GList *channels;
|
||||
GimpChannel *parent = GIMP_IMAGE_ACTIVE_PARENT;
|
||||
|
||||
if (GIMP_IS_COMPONENT_EDITOR (data))
|
||||
{
|
||||
GimpChannelType component;
|
||||
GimpChannel *new_channel;
|
||||
const gchar *desc;
|
||||
gchar *name;
|
||||
|
||||
return_if_no_image (image, data);
|
||||
|
||||
component = GIMP_COMPONENT_EDITOR (data)->clicked_component;
|
||||
|
||||
gimp_enum_get_value (GIMP_TYPE_CHANNEL_TYPE, component,
|
||||
NULL, NULL, &desc, NULL);
|
||||
|
||||
name = g_strdup_printf (_("%s Channel Copy"), desc);
|
||||
|
||||
new_channel = gimp_channel_new_from_component (image, component,
|
||||
name, NULL);
|
||||
|
||||
/* copied components are invisible by default so subsequent copies
|
||||
* of components don't affect each other
|
||||
*/
|
||||
gimp_item_set_visible (GIMP_ITEM (new_channel), FALSE, FALSE);
|
||||
gimp_image_add_channel (image, new_channel, parent, -1, TRUE);
|
||||
|
||||
g_free (name);
|
||||
}
|
||||
else
|
||||
{
|
||||
GList *new_channels = NULL;
|
||||
GList *iter;
|
||||
|
||||
return_if_no_channels (image, channels, data);
|
||||
|
||||
channels = g_list_copy (channels);
|
||||
gimp_image_undo_group_start (image,
|
||||
GIMP_UNDO_GROUP_CHANNEL_ADD,
|
||||
_("Duplicate channels"));
|
||||
for (iter = channels; iter; iter = iter->next)
|
||||
{
|
||||
GimpChannel *new_channel;
|
||||
|
||||
new_channel = GIMP_CHANNEL (gimp_item_duplicate (GIMP_ITEM (iter->data),
|
||||
G_TYPE_FROM_INSTANCE (iter->data)));
|
||||
|
||||
/* use the actual parent here, not GIMP_IMAGE_ACTIVE_PARENT because
|
||||
* the latter would add a duplicated group inside itself instead of
|
||||
* above it
|
||||
*/
|
||||
gimp_image_add_channel (image, new_channel,
|
||||
gimp_channel_get_parent (iter->data),
|
||||
gimp_item_get_index (iter->data),
|
||||
TRUE);
|
||||
new_channels = g_list_prepend (new_channels, new_channel);
|
||||
}
|
||||
|
||||
gimp_image_set_selected_channels (image, new_channels);
|
||||
g_list_free (channels);
|
||||
g_list_free (new_channels);
|
||||
|
||||
gimp_image_undo_group_end (image);
|
||||
}
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
void
|
||||
channels_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *channels;
|
||||
GList *iter;
|
||||
return_if_no_channels (image, channels, data);
|
||||
|
||||
channels = g_list_copy (channels);
|
||||
if (g_list_length (channels) > 1)
|
||||
{
|
||||
gchar *undo_name;
|
||||
|
||||
undo_name = g_strdup_printf (C_("undo-type", "Remove %d Channels"),
|
||||
g_list_length (channels));
|
||||
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_IMAGE_ITEM_REMOVE,
|
||||
undo_name);
|
||||
}
|
||||
|
||||
for (iter = channels; iter; iter = iter->next)
|
||||
gimp_image_remove_channel (image, iter->data, TRUE, NULL);
|
||||
|
||||
if (g_list_length (channels) > 1)
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
g_list_free (channels);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
void
|
||||
channels_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpChannelOps op;
|
||||
GimpImage *image;
|
||||
|
||||
op = (GimpChannelOps) g_variant_get_int32 (value);
|
||||
|
||||
if (GIMP_IS_COMPONENT_EDITOR (data))
|
||||
{
|
||||
GimpChannelType component;
|
||||
return_if_no_image (image, data);
|
||||
|
||||
component = GIMP_COMPONENT_EDITOR (data)->clicked_component;
|
||||
|
||||
gimp_channel_select_component (gimp_image_get_mask (image), component,
|
||||
op, FALSE, 0.0, 0.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
GList *channels;
|
||||
GList *iter;
|
||||
return_if_no_channels (image, channels, data);
|
||||
|
||||
gimp_image_undo_group_start (image,
|
||||
GIMP_UNDO_GROUP_DRAWABLE_MOD,
|
||||
_("Channels to selection"));
|
||||
|
||||
for (iter = channels; iter; iter = iter->next)
|
||||
{
|
||||
gimp_item_to_selection (iter->data, op, TRUE, FALSE, 0.0, 0.0);
|
||||
|
||||
if (op == GIMP_CHANNEL_OP_REPLACE && iter == channels)
|
||||
op = GIMP_CHANNEL_OP_ADD;
|
||||
}
|
||||
|
||||
gimp_image_undo_group_end (image);
|
||||
}
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
void
|
||||
channels_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *channels;
|
||||
return_if_no_channels (image, channels, data);
|
||||
|
||||
items_visible_cmd_callback (action, value, image, channels);
|
||||
}
|
||||
|
||||
void
|
||||
channels_lock_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *channels;
|
||||
return_if_no_channels (image, channels, data);
|
||||
|
||||
items_lock_content_cmd_callback (action, value, image, channels);
|
||||
}
|
||||
|
||||
void
|
||||
channels_lock_position_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *channels;
|
||||
return_if_no_channels (image, channels, data);
|
||||
|
||||
items_lock_position_cmd_callback (action, value, image, channels);
|
||||
}
|
||||
|
||||
void
|
||||
channels_color_tag_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *channels;
|
||||
GimpColorTag color_tag;
|
||||
return_if_no_channels (image, channels, data);
|
||||
|
||||
color_tag = (GimpColorTag) g_variant_get_int32 (value);
|
||||
|
||||
items_color_tag_cmd_callback (action, image, channels, color_tag);
|
||||
}
|
||||
|
||||
void
|
||||
channels_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *channels;
|
||||
GList *new_channels = NULL;
|
||||
GList *iter;
|
||||
GimpActionSelectType select_type;
|
||||
gboolean run_once;
|
||||
return_if_no_image (image, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
channels = gimp_image_get_selected_channels (image);
|
||||
run_once = (g_list_length (channels) == 0);
|
||||
|
||||
for (iter = channels; iter || run_once; iter = iter ? iter->next : NULL)
|
||||
{
|
||||
GimpChannel *new_channel = NULL;
|
||||
GimpContainer *container;
|
||||
|
||||
if (iter)
|
||||
{
|
||||
container = gimp_item_get_container (GIMP_ITEM (iter->data));
|
||||
}
|
||||
else /* run_once */
|
||||
{
|
||||
container = gimp_image_get_channels (image);
|
||||
run_once = FALSE;
|
||||
}
|
||||
new_channel = (GimpChannel *) action_select_object (select_type,
|
||||
container,
|
||||
iter ? iter->data : NULL);
|
||||
|
||||
if (new_channel)
|
||||
new_channels = g_list_prepend (new_channels, new_channel);
|
||||
}
|
||||
|
||||
if (new_channels)
|
||||
{
|
||||
gimp_image_set_selected_channels (image, new_channels);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
g_list_free (new_channels);
|
||||
}
|
||||
|
||||
/* private functions */
|
||||
|
||||
static void
|
||||
channels_new_callback (GtkWidget *dialog,
|
||||
GimpImage *image,
|
||||
GimpChannel *channel,
|
||||
GimpContext *context,
|
||||
const gchar *channel_name,
|
||||
GeglColor *channel_color,
|
||||
gboolean save_selection,
|
||||
gboolean channel_visible,
|
||||
GimpColorTag channel_color_tag,
|
||||
gboolean channel_lock_content,
|
||||
gboolean channel_lock_position,
|
||||
gboolean channel_lock_visibility,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
|
||||
|
||||
g_object_set (config,
|
||||
"channel-new-name", channel_name,
|
||||
"channel-new-color", channel_color,
|
||||
NULL);
|
||||
|
||||
if (save_selection)
|
||||
{
|
||||
GimpChannel *selection = gimp_image_get_mask (image);
|
||||
|
||||
channel = GIMP_CHANNEL (gimp_item_duplicate (GIMP_ITEM (selection),
|
||||
GIMP_TYPE_CHANNEL));
|
||||
|
||||
gimp_object_set_name (GIMP_OBJECT (channel),
|
||||
config->channel_new_name);
|
||||
gimp_channel_set_color (channel, config->channel_new_color, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
channel = gimp_channel_new (image,
|
||||
gimp_image_get_width (image),
|
||||
gimp_image_get_height (image),
|
||||
config->channel_new_name,
|
||||
config->channel_new_color);
|
||||
|
||||
gimp_drawable_fill (GIMP_DRAWABLE (channel), context,
|
||||
GIMP_FILL_TRANSPARENT);
|
||||
}
|
||||
|
||||
gimp_item_set_visible (GIMP_ITEM (channel), channel_visible, FALSE);
|
||||
gimp_item_set_color_tag (GIMP_ITEM (channel), channel_color_tag, FALSE);
|
||||
gimp_item_set_lock_content (GIMP_ITEM (channel), channel_lock_content, FALSE);
|
||||
gimp_item_set_lock_position (GIMP_ITEM (channel), channel_lock_position, FALSE);
|
||||
gimp_item_set_lock_visibility (GIMP_ITEM (channel), channel_lock_visibility, FALSE);
|
||||
|
||||
gimp_image_add_channel (image, channel,
|
||||
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
|
||||
gimp_image_flush (image);
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
channels_edit_attributes_callback (GtkWidget *dialog,
|
||||
GimpImage *image,
|
||||
GimpChannel *channel,
|
||||
GimpContext *context,
|
||||
const gchar *channel_name,
|
||||
GeglColor *channel_color,
|
||||
gboolean save_selection,
|
||||
gboolean channel_visible,
|
||||
GimpColorTag channel_color_tag,
|
||||
gboolean channel_lock_content,
|
||||
gboolean channel_lock_position,
|
||||
gboolean channel_lock_visibility,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpItem *item = GIMP_ITEM (channel);
|
||||
|
||||
if (strcmp (channel_name, gimp_object_get_name (channel)) ||
|
||||
! gimp_color_is_perceptually_identical (channel_color, channel->color) ||
|
||||
channel_visible != gimp_item_get_visible (item) ||
|
||||
channel_color_tag != gimp_item_get_color_tag (item) ||
|
||||
channel_lock_content != gimp_item_get_lock_content (item) ||
|
||||
channel_lock_position != gimp_item_get_lock_position (item) ||
|
||||
channel_lock_visibility != gimp_item_get_lock_visibility (item))
|
||||
{
|
||||
gimp_image_undo_group_start (image,
|
||||
GIMP_UNDO_GROUP_ITEM_PROPERTIES,
|
||||
_("Channel Attributes"));
|
||||
|
||||
if (strcmp (channel_name, gimp_object_get_name (channel)))
|
||||
gimp_item_rename (GIMP_ITEM (channel), channel_name, NULL);
|
||||
|
||||
if (! gimp_color_is_perceptually_identical (channel_color, channel->color))
|
||||
gimp_channel_set_color (channel, channel_color, TRUE);
|
||||
|
||||
if (channel_visible != gimp_item_get_visible (item))
|
||||
gimp_item_set_visible (item, channel_visible, TRUE);
|
||||
|
||||
if (channel_color_tag != gimp_item_get_color_tag (item))
|
||||
gimp_item_set_color_tag (item, channel_color_tag, TRUE);
|
||||
|
||||
if (channel_lock_content != gimp_item_get_lock_content (item))
|
||||
gimp_item_set_lock_content (item, channel_lock_content, TRUE);
|
||||
|
||||
if (channel_lock_position != gimp_item_get_lock_position (item))
|
||||
gimp_item_set_lock_position (item, channel_lock_position, TRUE);
|
||||
|
||||
if (channel_lock_visibility != gimp_item_get_lock_visibility (item))
|
||||
gimp_item_set_lock_visibility (item, channel_lock_visibility, TRUE);
|
||||
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
74
app/actions/channels-commands.h
Normal file
74
app/actions/channels-commands.h
Normal file
|
@ -0,0 +1,74 @@
|
|||
/* 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
|
||||
* 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 __CHANNELS_COMMANDS_H__
|
||||
#define __CHANNELS_COMMANDS_H__
|
||||
|
||||
|
||||
void channels_edit_attributes_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_new_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_new_last_vals_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void channels_raise_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_raise_to_top_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_lower_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_lower_to_bottom_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void channels_duplicate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void channels_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_lock_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_lock_position_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void channels_color_tag_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void channels_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __CHANNELS_COMMANDS_H__ */
|
177
app/actions/colormap-actions.c
Normal file
177
app/actions/colormap-actions.c
Normal file
|
@ -0,0 +1,177 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-colormap.h"
|
||||
#include "core/gimppalette.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpcolormapeditor.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "colormap-actions.h"
|
||||
#include "colormap-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry colormap_actions[] =
|
||||
{
|
||||
{ "colormap-edit-color", GIMP_ICON_EDIT,
|
||||
NC_("colormap-action", "_Edit Color..."), NULL, { NULL },
|
||||
NC_("colormap-action", "Edit this color"),
|
||||
colormap_edit_color_cmd_callback,
|
||||
GIMP_HELP_INDEXED_PALETTE_EDIT },
|
||||
|
||||
{ "colormap-delete-color", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("colormap-action", "_Delete Color..."), NULL, { NULL },
|
||||
NC_("colormap-action", "Delete this color"),
|
||||
colormap_delete_color_cmd_callback,
|
||||
GIMP_HELP_INDEXED_PALETTE_EDIT }
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry colormap_add_color_actions[] =
|
||||
{
|
||||
{ "colormap-add-color-from-fg", GIMP_ICON_LIST_ADD,
|
||||
NC_("colormap-action", "_Add Color from FG"), NULL, { NULL },
|
||||
NC_("colormap-action", "Add current foreground color"),
|
||||
FALSE, FALSE,
|
||||
GIMP_HELP_INDEXED_PALETTE_ADD },
|
||||
|
||||
{ "colormap-add-color-from-bg", GIMP_ICON_LIST_ADD,
|
||||
NC_("colormap-action", "_Add Color from BG"), NULL, { NULL },
|
||||
NC_("colormap-action", "Add current background color"),
|
||||
TRUE, FALSE,
|
||||
GIMP_HELP_INDEXED_PALETTE_ADD }
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry colormap_to_selection_actions[] =
|
||||
{
|
||||
{ "colormap-selection-replace", GIMP_ICON_SELECTION_REPLACE,
|
||||
NC_("colormap-action", "_Select this Color"), NULL, { NULL },
|
||||
NC_("colormap-action", "Select all pixels with this color"),
|
||||
GIMP_CHANNEL_OP_REPLACE, FALSE,
|
||||
GIMP_HELP_INDEXED_PALETTE_SELECTION_REPLACE },
|
||||
|
||||
{ "colormap-selection-add", GIMP_ICON_SELECTION_ADD,
|
||||
NC_("colormap-action", "_Add to Selection"), NULL, { NULL },
|
||||
NC_("colormap-action", "Add all pixels with this color to the current selection"),
|
||||
GIMP_CHANNEL_OP_ADD, FALSE,
|
||||
GIMP_HELP_INDEXED_PALETTE_SELECTION_ADD },
|
||||
|
||||
{ "colormap-selection-subtract", GIMP_ICON_SELECTION_SUBTRACT,
|
||||
NC_("colormap-action", "_Subtract from Selection"), NULL, { NULL },
|
||||
NC_("colormap-action", "Subtract all pixels with this color from the current selection"),
|
||||
GIMP_CHANNEL_OP_SUBTRACT, FALSE,
|
||||
GIMP_HELP_INDEXED_PALETTE_SELECTION_SUBTRACT },
|
||||
|
||||
{ "colormap-selection-intersect", GIMP_ICON_SELECTION_INTERSECT,
|
||||
NC_("colormap-action", "_Intersect with Selection"), NULL, { NULL },
|
||||
NC_("colormap-action", "Intersect all pixels with this color with the current selection"),
|
||||
GIMP_CHANNEL_OP_INTERSECT, FALSE,
|
||||
GIMP_HELP_INDEXED_PALETTE_SELECTION_INTERSECT }
|
||||
};
|
||||
|
||||
void
|
||||
colormap_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "colormap-action",
|
||||
colormap_actions,
|
||||
G_N_ELEMENTS (colormap_actions));
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "colormap-action",
|
||||
colormap_add_color_actions,
|
||||
G_N_ELEMENTS (colormap_add_color_actions),
|
||||
colormap_add_color_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "colormap-action",
|
||||
colormap_to_selection_actions,
|
||||
G_N_ELEMENTS (colormap_to_selection_actions),
|
||||
colormap_to_selection_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
colormap_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpColormapEditor *editor = GIMP_COLORMAP_EDITOR (data);
|
||||
GimpImage *image = action_data_get_image (data);
|
||||
GimpContext *context = action_data_get_context (data);
|
||||
gboolean indexed = FALSE;
|
||||
gboolean drawable_indexed = FALSE;
|
||||
gint num_colors = 0;
|
||||
|
||||
if (image)
|
||||
{
|
||||
indexed = (gimp_image_get_base_type (image) == GIMP_INDEXED);
|
||||
|
||||
if (indexed)
|
||||
{
|
||||
GList *drawables = gimp_image_get_selected_drawables (image);
|
||||
|
||||
num_colors = gimp_palette_get_n_colors (gimp_image_get_colormap_palette ((image)));
|
||||
|
||||
if (g_list_length (drawables) == 1)
|
||||
drawable_indexed = gimp_drawable_is_indexed (drawables->data);
|
||||
|
||||
g_list_free (drawables);
|
||||
}
|
||||
}
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
|
||||
#define SET_COLOR(action,color) \
|
||||
gimp_action_group_set_action_color (group, action, color, FALSE);
|
||||
|
||||
SET_SENSITIVE ("colormap-edit-color",
|
||||
indexed && num_colors > 0);
|
||||
SET_SENSITIVE ("colormap-delete-color",
|
||||
indexed && num_colors > 0 &&
|
||||
gimp_colormap_editor_is_color_deletable (editor));
|
||||
|
||||
SET_SENSITIVE ("colormap-add-color-from-fg",
|
||||
indexed && num_colors < 256);
|
||||
SET_SENSITIVE ("colormap-add-color-from-bg",
|
||||
indexed && num_colors < 256);
|
||||
|
||||
SET_COLOR ("colormap-add-color-from-fg", context ? gimp_context_get_foreground (context) : NULL);
|
||||
SET_COLOR ("colormap-add-color-from-bg", context ? gimp_context_get_background (context) : NULL);
|
||||
|
||||
SET_SENSITIVE ("colormap-selection-replace",
|
||||
drawable_indexed && num_colors > 0);
|
||||
SET_SENSITIVE ("colormap-selection-add",
|
||||
drawable_indexed && num_colors > 0);
|
||||
SET_SENSITIVE ("colormap-selection-subtract",
|
||||
drawable_indexed && num_colors > 0);
|
||||
SET_SENSITIVE ("colormap-selection-intersect",
|
||||
drawable_indexed && num_colors > 0);
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
#undef SET_COLOR
|
||||
}
|
27
app/actions/colormap-actions.h
Normal file
27
app/actions/colormap-actions.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* 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
|
||||
* 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 __COLORMAP_ACTIONS_H__
|
||||
#define __COLORMAP_ACTIONS_H__
|
||||
|
||||
|
||||
void colormap_actions_setup (GimpActionGroup *group);
|
||||
void colormap_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __COLORMAP_ACTIONS_H__ */
|
125
app/actions/colormap-commands.c
Normal file
125
app/actions/colormap-commands.c
Normal file
|
@ -0,0 +1,125 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimpchannel-select.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-colormap.h"
|
||||
#include "core/gimppalette.h"
|
||||
|
||||
#include "widgets/gimpcolormapeditor.h"
|
||||
#include "widgets/gimpcolormapselection.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "colormap-commands.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
colormap_edit_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpColormapEditor *editor = GIMP_COLORMAP_EDITOR (data);
|
||||
|
||||
gimp_colormap_editor_edit_color (editor);
|
||||
}
|
||||
|
||||
void
|
||||
colormap_delete_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpColormapEditor *editor = GIMP_COLORMAP_EDITOR (data);
|
||||
|
||||
gimp_colormap_editor_delete_color (editor);
|
||||
}
|
||||
|
||||
void
|
||||
colormap_add_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpImage *image;
|
||||
gboolean background;
|
||||
return_if_no_context (context, data);
|
||||
return_if_no_image (image, data);
|
||||
|
||||
background = (gboolean) g_variant_get_int32 (value);
|
||||
|
||||
if (gimp_palette_get_n_colors (gimp_image_get_colormap_palette ((image))) < 256)
|
||||
{
|
||||
GeglColor *color;
|
||||
|
||||
if (background)
|
||||
color = gimp_context_get_background (context);
|
||||
else
|
||||
color = gimp_context_get_foreground (context);
|
||||
|
||||
gimp_image_add_colormap_entry (image, color);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
colormap_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpColormapSelection *selection;
|
||||
GimpColormapEditor *editor;
|
||||
GimpImage *image;
|
||||
GList *drawables;
|
||||
GimpChannelOps op;
|
||||
gint col_index;
|
||||
|
||||
return_if_no_image (image, data);
|
||||
|
||||
editor = GIMP_COLORMAP_EDITOR (data);
|
||||
selection = GIMP_COLORMAP_SELECTION (editor->selection);
|
||||
col_index = gimp_colormap_selection_get_index (selection, NULL);
|
||||
|
||||
op = (GimpChannelOps) g_variant_get_int32 (value);
|
||||
|
||||
drawables = gimp_image_get_selected_drawables (image);
|
||||
if (g_list_length (drawables) != 1)
|
||||
{
|
||||
/* We should not reach this anyway as colormap-actions.c normally takes
|
||||
* care at making the action insensitive when the item selection is wrong.
|
||||
*/
|
||||
g_warning ("This action requires exactly one selected drawable.");
|
||||
g_list_free (drawables);
|
||||
return;
|
||||
}
|
||||
|
||||
gimp_channel_select_by_index (gimp_image_get_mask (image),
|
||||
drawables->data,
|
||||
col_index, op,
|
||||
FALSE, 0.0, 0.0);
|
||||
|
||||
g_list_free (drawables);
|
||||
gimp_image_flush (image);
|
||||
}
|
36
app/actions/colormap-commands.h
Normal file
36
app/actions/colormap-commands.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
/* 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
|
||||
* 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 __COLORMAP_COMMANDS_H__
|
||||
#define __COLORMAP_COMMANDS_H__
|
||||
|
||||
|
||||
void colormap_edit_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void colormap_delete_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void colormap_add_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void colormap_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __COLORMAP_COMMANDS_H__ */
|
1274
app/actions/context-actions.c
Normal file
1274
app/actions/context-actions.c
Normal file
File diff suppressed because it is too large
Load diff
27
app/actions/context-actions.h
Normal file
27
app/actions/context-actions.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* 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
|
||||
* 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 __CONTEXT_ACTIONS_H__
|
||||
#define __CONTEXT_ACTIONS_H__
|
||||
|
||||
|
||||
void context_actions_setup (GimpActionGroup *group);
|
||||
void context_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __CONTEXT_ACTIONS_H__ */
|
1064
app/actions/context-commands.c
Normal file
1064
app/actions/context-commands.c
Normal file
File diff suppressed because it is too large
Load diff
144
app/actions/context-commands.h
Normal file
144
app/actions/context-commands.h
Normal file
|
@ -0,0 +1,144 @@
|
|||
/* 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
|
||||
* 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 __CONTEXT_COMMANDS_H__
|
||||
#define __CONTEXT_COMMANDS_H__
|
||||
|
||||
|
||||
|
||||
void context_colors_default_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_colors_swap_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_palette_foreground_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_palette_background_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_colormap_foreground_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_colormap_background_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_swatch_foreground_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_swatch_background_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_foreground_red_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_foreground_green_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_foreground_blue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_background_red_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_background_green_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_background_blue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_foreground_hue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_foreground_saturation_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_foreground_value_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_background_hue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_background_saturation_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_background_value_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_opacity_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_paint_mode_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_tool_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_pattern_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_palette_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_gradient_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_font_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_brush_spacing_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_shape_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_radius_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_spikes_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_hardness_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_aspect_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_angle_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_toggle_dynamics_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __CONTEXT_COMMANDS_H__ */
|
70
app/actions/cursor-info-actions.c
Normal file
70
app/actions/cursor-info-actions.c
Normal file
|
@ -0,0 +1,70 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "display/gimpcursorview.h"
|
||||
|
||||
#include "cursor-info-actions.h"
|
||||
#include "cursor-info-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpToggleActionEntry cursor_info_toggle_actions[] =
|
||||
{
|
||||
{ "cursor-info-sample-merged", NULL,
|
||||
NC_("cursor-info-action", "_Sample Merged"), NULL, { NULL },
|
||||
NC_("cursor-info-action", "Use the composite color of all visible layers"),
|
||||
cursor_info_sample_merged_cmd_callback,
|
||||
TRUE,
|
||||
GIMP_HELP_POINTER_INFO_SAMPLE_MERGED }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
cursor_info_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_toggle_actions (group, "cursor-info-action",
|
||||
cursor_info_toggle_actions,
|
||||
G_N_ELEMENTS (cursor_info_toggle_actions));
|
||||
}
|
||||
|
||||
void
|
||||
cursor_info_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpCursorView *view = GIMP_CURSOR_VIEW (data);
|
||||
|
||||
#define SET_ACTIVE(action,condition) \
|
||||
gimp_action_group_set_action_active (group, action, (condition) != 0)
|
||||
|
||||
SET_ACTIVE ("cursor-info-sample-merged",
|
||||
gimp_cursor_view_get_sample_merged (view));
|
||||
|
||||
#undef SET_ACTIVE
|
||||
}
|
27
app/actions/cursor-info-actions.h
Normal file
27
app/actions/cursor-info-actions.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* 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
|
||||
* 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 __CURSOR_INFO_ACIONS_H__
|
||||
#define __CURSOR_INFO_ACIONS_H__
|
||||
|
||||
|
||||
void cursor_info_actions_setup (GimpActionGroup *group);
|
||||
void cursor_info_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __CURSOR_INFO_ACTIONS_H__ */
|
41
app/actions/cursor-info-commands.c
Normal file
41
app/actions/cursor-info-commands.c
Normal file
|
@ -0,0 +1,41 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "display/gimpcursorview.h"
|
||||
|
||||
#include "cursor-info-commands.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
cursor_info_sample_merged_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpCursorView *view = GIMP_CURSOR_VIEW (data);
|
||||
gboolean active = g_variant_get_boolean (value);
|
||||
|
||||
gimp_cursor_view_set_sample_merged (view, active);
|
||||
}
|
27
app/actions/cursor-info-commands.h
Normal file
27
app/actions/cursor-info-commands.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* 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
|
||||
* 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 __CURSOR_INFO_COMMANDS_H__
|
||||
#define __CURSOR_INFO_COMMANDS_H__
|
||||
|
||||
|
||||
void cursor_info_sample_merged_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __CURSOR_INFO_COMMANDS_H__ */
|
226
app/actions/dashboard-actions.c
Normal file
226
app/actions/dashboard-actions.c
Normal file
|
@ -0,0 +1,226 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpdashboard.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "dashboard-actions.h"
|
||||
#include "dashboard-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry dashboard_actions[] =
|
||||
{
|
||||
{ "dashboard-groups", NULL,
|
||||
NC_("dashboard-action", "_Groups") },
|
||||
{ "dashboard-update-interval", NULL,
|
||||
NC_("dashboard-action", "_Update Interval") },
|
||||
{ "dashboard-history-duration", NULL,
|
||||
NC_("dashboard-action", "_History Duration") },
|
||||
|
||||
{ "dashboard-log-record", GIMP_ICON_RECORD,
|
||||
NC_("dashboard-action", "_Start/Stop Recording..."), NULL, { NULL },
|
||||
NC_("dashboard-action", "Start/stop recording performance log"),
|
||||
dashboard_log_record_cmd_callback,
|
||||
GIMP_HELP_DASHBOARD_LOG_RECORD },
|
||||
{ "dashboard-log-add-marker", GIMP_ICON_MARKER,
|
||||
NC_("dashboard-action", "_Add Marker..."), NULL, { NULL },
|
||||
NC_("dashboard-action", "Add an event marker "
|
||||
"to the performance log"),
|
||||
dashboard_log_add_marker_cmd_callback,
|
||||
GIMP_HELP_DASHBOARD_LOG_ADD_MARKER },
|
||||
{ "dashboard-log-add-empty-marker", GIMP_ICON_MARKER,
|
||||
NC_("dashboard-action", "Add _Empty Marker"), NULL, { NULL },
|
||||
NC_("dashboard-action", "Add an empty event marker "
|
||||
"to the performance log"),
|
||||
dashboard_log_add_empty_marker_cmd_callback,
|
||||
GIMP_HELP_DASHBOARD_LOG_ADD_EMPTY_MARKER },
|
||||
|
||||
{ "dashboard-reset", GIMP_ICON_RESET,
|
||||
NC_("dashboard-action", "_Reset"), NULL, { NULL },
|
||||
NC_("dashboard-action", "Reset cumulative data"),
|
||||
dashboard_reset_cmd_callback,
|
||||
GIMP_HELP_DASHBOARD_RESET },
|
||||
};
|
||||
|
||||
static const GimpToggleActionEntry dashboard_toggle_actions[] =
|
||||
{
|
||||
{ "dashboard-low-swap-space-warning", NULL,
|
||||
NC_("dashboard-action", "_Low Swap Space Warning"), NULL, { NULL },
|
||||
NC_("dashboard-action", "Raise the dashboard when "
|
||||
"the swap size approaches its limit"),
|
||||
dashboard_low_swap_space_warning_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_DASHBOARD_LOW_SWAP_SPACE_WARNING }
|
||||
};
|
||||
|
||||
static const GimpRadioActionEntry dashboard_update_interval_actions[] =
|
||||
{
|
||||
{ "dashboard-update-interval-0-25-sec", NULL,
|
||||
NC_("dashboard-update-interval", "0.25 Seconds"), NULL, { NULL }, NULL,
|
||||
GIMP_DASHBOARD_UPDATE_INTERVAL_0_25_SEC,
|
||||
GIMP_HELP_DASHBOARD_UPDATE_INTERVAL },
|
||||
|
||||
{ "dashboard-update-interval-0-5-sec", NULL,
|
||||
NC_("dashboard-update-interval", "0.5 Seconds"), NULL, { NULL }, NULL,
|
||||
GIMP_DASHBOARD_UPDATE_INTERVAL_0_5_SEC,
|
||||
GIMP_HELP_DASHBOARD_UPDATE_INTERVAL },
|
||||
|
||||
{ "dashboard-update-interval-1-sec", NULL,
|
||||
NC_("dashboard-update-interval", "1 Second"), NULL, { NULL }, NULL,
|
||||
GIMP_DASHBOARD_UPDATE_INTERVAL_1_SEC,
|
||||
GIMP_HELP_DASHBOARD_UPDATE_INTERVAL },
|
||||
|
||||
{ "dashboard-update-interval-2-sec", NULL,
|
||||
NC_("dashboard-update-interval", "2 Seconds"), NULL, { NULL }, NULL,
|
||||
GIMP_DASHBOARD_UPDATE_INTERVAL_2_SEC,
|
||||
GIMP_HELP_DASHBOARD_UPDATE_INTERVAL },
|
||||
|
||||
{ "dashboard-update-interval-4-sec", NULL,
|
||||
NC_("dashboard-update-interval", "4 Seconds"), NULL, { NULL }, NULL,
|
||||
GIMP_DASHBOARD_UPDATE_INTERVAL_4_SEC,
|
||||
GIMP_HELP_DASHBOARD_UPDATE_INTERVAL }
|
||||
};
|
||||
|
||||
static const GimpRadioActionEntry dashboard_history_duration_actions[] =
|
||||
{
|
||||
{ "dashboard-history-duration-15-sec", NULL,
|
||||
NC_("dashboard-history-duration", "15 Seconds"), NULL, { NULL }, NULL,
|
||||
GIMP_DASHBOARD_HISTORY_DURATION_15_SEC,
|
||||
GIMP_HELP_DASHBOARD_HISTORY_DURATION },
|
||||
|
||||
{ "dashboard-history-duration-30-sec", NULL,
|
||||
NC_("dashboard-history-duration", "30 Seconds"), NULL, { NULL }, NULL,
|
||||
GIMP_DASHBOARD_HISTORY_DURATION_30_SEC,
|
||||
GIMP_HELP_DASHBOARD_HISTORY_DURATION },
|
||||
|
||||
{ "dashboard-history-duration-60-sec", NULL,
|
||||
NC_("dashboard-history-duration", "60 Seconds"), NULL, { NULL }, NULL,
|
||||
GIMP_DASHBOARD_HISTORY_DURATION_60_SEC,
|
||||
GIMP_HELP_DASHBOARD_HISTORY_DURATION },
|
||||
|
||||
{ "dashboard-history-duration-120-sec", NULL,
|
||||
NC_("dashboard-history-duration", "120 Seconds"), NULL, { NULL }, NULL,
|
||||
GIMP_DASHBOARD_HISTORY_DURATION_120_SEC,
|
||||
GIMP_HELP_DASHBOARD_HISTORY_DURATION },
|
||||
|
||||
{ "dashboard-history-duration-240-sec", NULL,
|
||||
NC_("dashboard-history-duration", "240 Seconds"), NULL, { NULL }, NULL,
|
||||
GIMP_DASHBOARD_HISTORY_DURATION_240_SEC,
|
||||
GIMP_HELP_DASHBOARD_HISTORY_DURATION }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
dashboard_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "dashboard-action",
|
||||
dashboard_actions,
|
||||
G_N_ELEMENTS (dashboard_actions));
|
||||
|
||||
gimp_action_group_add_toggle_actions (group, "dashboard-action",
|
||||
dashboard_toggle_actions,
|
||||
G_N_ELEMENTS (dashboard_toggle_actions));
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "dashboard-update-interval",
|
||||
dashboard_update_interval_actions,
|
||||
G_N_ELEMENTS (dashboard_update_interval_actions),
|
||||
NULL,
|
||||
0,
|
||||
dashboard_update_interval_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "dashboard-history-duration",
|
||||
dashboard_history_duration_actions,
|
||||
G_N_ELEMENTS (dashboard_history_duration_actions),
|
||||
NULL,
|
||||
0,
|
||||
dashboard_history_duration_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
gboolean recording;
|
||||
|
||||
recording = gimp_dashboard_log_is_recording (dashboard);
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
|
||||
#define SET_ACTIVE(action,condition) \
|
||||
gimp_action_group_set_action_active (group, action, (condition) != 0)
|
||||
|
||||
switch (gimp_dashboard_get_update_interval (dashboard))
|
||||
{
|
||||
case GIMP_DASHBOARD_UPDATE_INTERVAL_0_25_SEC:
|
||||
SET_ACTIVE ("dashboard-update-interval-0-25-sec", TRUE);
|
||||
break;
|
||||
case GIMP_DASHBOARD_UPDATE_INTERVAL_0_5_SEC:
|
||||
SET_ACTIVE ("dashboard-update-interval-0-5-sec", TRUE);
|
||||
break;
|
||||
case GIMP_DASHBOARD_UPDATE_INTERVAL_1_SEC:
|
||||
SET_ACTIVE ("dashboard-update-interval-1-sec", TRUE);
|
||||
break;
|
||||
case GIMP_DASHBOARD_UPDATE_INTERVAL_2_SEC:
|
||||
SET_ACTIVE ("dashboard-update-interval-2-sec", TRUE);
|
||||
break;
|
||||
case GIMP_DASHBOARD_UPDATE_INTERVAL_4_SEC:
|
||||
SET_ACTIVE ("dashboard-update-interval-4-sec", TRUE);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (gimp_dashboard_get_history_duration (dashboard))
|
||||
{
|
||||
case GIMP_DASHBOARD_HISTORY_DURATION_15_SEC:
|
||||
SET_ACTIVE ("dashboard-history-duration-15-sec", TRUE);
|
||||
break;
|
||||
case GIMP_DASHBOARD_HISTORY_DURATION_30_SEC:
|
||||
SET_ACTIVE ("dashboard-history-duration-30-sec", TRUE);
|
||||
break;
|
||||
case GIMP_DASHBOARD_HISTORY_DURATION_60_SEC:
|
||||
SET_ACTIVE ("dashboard-history-duration-60-sec", TRUE);
|
||||
break;
|
||||
case GIMP_DASHBOARD_HISTORY_DURATION_120_SEC:
|
||||
SET_ACTIVE ("dashboard-history-duration-120-sec", TRUE);
|
||||
break;
|
||||
case GIMP_DASHBOARD_HISTORY_DURATION_240_SEC:
|
||||
SET_ACTIVE ("dashboard-history-duration-240-sec", TRUE);
|
||||
break;
|
||||
}
|
||||
|
||||
SET_SENSITIVE ("dashboard-log-add-marker", recording);
|
||||
SET_SENSITIVE ("dashboard-log-add-empty-marker", recording);
|
||||
SET_SENSITIVE ("dashboard-reset", !recording);
|
||||
|
||||
SET_ACTIVE ("dashboard-low-swap-space-warning",
|
||||
gimp_dashboard_get_low_swap_space_warning (dashboard));
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
#undef SET_ACTIVE
|
||||
}
|
27
app/actions/dashboard-actions.h
Normal file
27
app/actions/dashboard-actions.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* 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
|
||||
* 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 __DASHBOARD_ACTIONS_H__
|
||||
#define __DASHBOARD_ACTIONS_H__
|
||||
|
||||
|
||||
void dashboard_actions_setup (GimpActionGroup *group);
|
||||
void dashboard_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DASHBOARD_ACTIONS_H__ */
|
420
app/actions/dashboard-commands.c
Normal file
420
app/actions/dashboard-commands.c
Normal file
|
@ -0,0 +1,420 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "widgets/gimpdashboard.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpuimanager.h"
|
||||
|
||||
#include "dialogs/dialogs.h"
|
||||
|
||||
#include "dashboard-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GFile *folder;
|
||||
GimpDashboardLogParams params;
|
||||
} DashboardLogDialogInfo;
|
||||
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
static void dashboard_log_record_response (GtkWidget *dialog,
|
||||
int response_id,
|
||||
GimpDashboard *dashboard);
|
||||
|
||||
static void dashboard_log_add_marker_response (GtkWidget *dialog,
|
||||
const gchar *description,
|
||||
GimpDashboard *dashboard);
|
||||
|
||||
static DashboardLogDialogInfo * dashboard_log_dialog_info_new (GimpDashboard *dashboard);
|
||||
static void dashboard_log_dialog_info_free (DashboardLogDialogInfo *info);
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
|
||||
void
|
||||
dashboard_update_interval_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
GimpDashboardUpdateInteval update_interval;
|
||||
|
||||
update_interval = g_variant_get_int32 (value);
|
||||
|
||||
gimp_dashboard_set_update_interval (dashboard, update_interval);
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_history_duration_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
GimpDashboardHistoryDuration history_duration;
|
||||
|
||||
history_duration = g_variant_get_int32 (value);
|
||||
|
||||
gimp_dashboard_set_history_duration (dashboard, history_duration);
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_log_record_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
|
||||
if (! gimp_dashboard_log_is_recording (dashboard))
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
#define LOG_RECORD_KEY "gimp-dashboard-log-record-dialog"
|
||||
|
||||
dialog = dialogs_get_dialog (G_OBJECT (dashboard), LOG_RECORD_KEY);
|
||||
|
||||
if (! dialog)
|
||||
{
|
||||
GtkFileFilter *filter;
|
||||
DashboardLogDialogInfo *info;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *hbox2;
|
||||
GtkWidget *label;
|
||||
GtkWidget *spinbutton;
|
||||
GtkWidget *toggle;
|
||||
GDateTime *datetime;
|
||||
gchar *timestamp;
|
||||
gchar *default_filename;
|
||||
|
||||
dialog = gtk_file_chooser_dialog_new (
|
||||
"Record Performance Log", NULL, GTK_FILE_CHOOSER_ACTION_SAVE,
|
||||
|
||||
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
||||
_("_Record"), GTK_RESPONSE_OK,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK);
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gtk_window_set_screen (
|
||||
GTK_WINDOW (dialog),
|
||||
gtk_widget_get_screen (GTK_WIDGET (dashboard)));
|
||||
gtk_window_set_role (GTK_WINDOW (dialog),
|
||||
"gimp-dashboard-log-record");
|
||||
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
|
||||
|
||||
gtk_file_chooser_set_do_overwrite_confirmation (
|
||||
GTK_FILE_CHOOSER (dialog), TRUE);
|
||||
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_set_name (filter, _("All Files"));
|
||||
gtk_file_filter_add_pattern (filter, "*");
|
||||
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
|
||||
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_set_name (filter, _("Log Files (*.log)"));
|
||||
gtk_file_filter_add_pattern (filter, "*.log");
|
||||
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
|
||||
|
||||
gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter);
|
||||
|
||||
info = g_object_get_data (G_OBJECT (dashboard),
|
||||
"gimp-dashboard-log-dialog-info");
|
||||
|
||||
if (! info)
|
||||
{
|
||||
info = dashboard_log_dialog_info_new (dashboard);
|
||||
|
||||
g_object_set_data_full (
|
||||
G_OBJECT (dashboard),
|
||||
"gimp-dashboard-log-dialog-info", info,
|
||||
(GDestroyNotify) dashboard_log_dialog_info_free);
|
||||
}
|
||||
|
||||
if (info->folder)
|
||||
{
|
||||
gtk_file_chooser_set_current_folder_file (
|
||||
GTK_FILE_CHOOSER (dialog), info->folder, NULL);
|
||||
}
|
||||
|
||||
datetime = g_date_time_new_now_local ();
|
||||
|
||||
/* Since Windows doesn't allow colons in filenames,
|
||||
* we use ISO 8601 basic format for the timestamp */
|
||||
timestamp = g_date_time_format (datetime, "%Y%m%dT%H%M%SZ");
|
||||
default_filename = g_strdup_printf ("gimp-performance-%s.log",
|
||||
timestamp);
|
||||
g_date_time_unref (datetime);
|
||||
g_free (timestamp);
|
||||
|
||||
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog),
|
||||
default_filename);
|
||||
g_free (default_filename);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (dialog), hbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
hbox2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gimp_help_set_help_data (hbox2, _("Log samples per second"), NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), hbox2, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox2);
|
||||
|
||||
label = gtk_label_new_with_mnemonic (_("Sample fre_quency:"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
spinbutton = gimp_spin_button_new_with_range (1, 1000, 1);
|
||||
gtk_box_pack_start (GTK_BOX (hbox2), spinbutton, FALSE, FALSE, 0);
|
||||
gtk_widget_show (spinbutton);
|
||||
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (spinbutton),
|
||||
info->params.sample_frequency);
|
||||
|
||||
g_signal_connect (gtk_spin_button_get_adjustment (
|
||||
GTK_SPIN_BUTTON (spinbutton)),
|
||||
"value-changed",
|
||||
G_CALLBACK (gimp_int_adjustment_update),
|
||||
&info->params.sample_frequency);
|
||||
|
||||
gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton);
|
||||
|
||||
toggle = gtk_check_button_new_with_mnemonic (_("_Backtrace"));
|
||||
gimp_help_set_help_data (toggle, _("Include backtraces in log"),
|
||||
NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), toggle, FALSE, FALSE, 0);
|
||||
gtk_widget_show (toggle);
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
|
||||
info->params.backtrace);
|
||||
|
||||
g_signal_connect (toggle, "toggled",
|
||||
G_CALLBACK (gimp_toggle_button_update),
|
||||
&info->params.backtrace);
|
||||
|
||||
toggle = gtk_check_button_new_with_mnemonic (_("_Messages"));
|
||||
gimp_help_set_help_data (toggle,
|
||||
_("Include diagnostic messages in log"),
|
||||
NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), toggle, FALSE, FALSE, 0);
|
||||
gtk_widget_show (toggle);
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
|
||||
info->params.messages);
|
||||
|
||||
g_signal_connect (toggle, "toggled",
|
||||
G_CALLBACK (gimp_toggle_button_update),
|
||||
&info->params.messages);
|
||||
|
||||
toggle = gtk_check_button_new_with_mnemonic (_("Progressi_ve"));
|
||||
gimp_help_set_help_data (toggle,
|
||||
_("Produce complete log "
|
||||
"even if not properly terminated"),
|
||||
NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), toggle, FALSE, FALSE, 0);
|
||||
gtk_widget_show (toggle);
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
|
||||
info->params.progressive);
|
||||
|
||||
g_signal_connect (toggle, "toggled",
|
||||
G_CALLBACK (gimp_toggle_button_update),
|
||||
&info->params.progressive);
|
||||
|
||||
g_signal_connect (dialog, "response",
|
||||
G_CALLBACK (dashboard_log_record_response),
|
||||
dashboard);
|
||||
g_signal_connect (dialog, "delete-event",
|
||||
G_CALLBACK (gtk_true),
|
||||
NULL);
|
||||
|
||||
gimp_help_connect (dialog, NULL, gimp_standard_help_func,
|
||||
GIMP_HELP_DASHBOARD_LOG_RECORD, NULL, NULL);
|
||||
|
||||
dialogs_attach_dialog (G_OBJECT (dashboard), LOG_RECORD_KEY, dialog);
|
||||
|
||||
g_signal_connect_object (dashboard, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroy),
|
||||
dialog,
|
||||
G_CONNECT_SWAPPED);
|
||||
|
||||
#undef LOG_RECORD_KEY
|
||||
}
|
||||
|
||||
gtk_window_present (GTK_WINDOW (dialog));
|
||||
}
|
||||
else
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
if (! gimp_dashboard_log_stop_recording (dashboard, &error))
|
||||
{
|
||||
gimp_message_literal (
|
||||
gimp_editor_get_ui_manager (GIMP_EDITOR (dashboard))->gimp,
|
||||
NULL, GIMP_MESSAGE_ERROR, error->message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_log_add_marker_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
GtkWidget *dialog;
|
||||
|
||||
#define LOG_ADD_MARKER_KEY "gimp-dashboard-log-add-marker-dialog"
|
||||
|
||||
dialog = dialogs_get_dialog (G_OBJECT (dashboard), LOG_ADD_MARKER_KEY);
|
||||
|
||||
if (! dialog)
|
||||
{
|
||||
dialog = gimp_query_string_box (
|
||||
_("Add Marker"), GTK_WIDGET (dashboard),
|
||||
gimp_standard_help_func, GIMP_HELP_DASHBOARD_LOG_ADD_MARKER,
|
||||
_("Enter a description for the marker"),
|
||||
NULL,
|
||||
G_OBJECT (dashboard), "destroy",
|
||||
(GimpQueryStringCallback) dashboard_log_add_marker_response,
|
||||
dashboard, NULL);
|
||||
|
||||
dialogs_attach_dialog (G_OBJECT (dashboard), LOG_ADD_MARKER_KEY, dialog);
|
||||
|
||||
#undef LOG_ADD_MARKER_KEY
|
||||
}
|
||||
|
||||
gtk_window_present (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_log_add_empty_marker_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
|
||||
gimp_dashboard_log_add_marker (dashboard, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_reset_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
|
||||
gimp_dashboard_reset (dashboard);
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_low_swap_space_warning_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
gboolean low_swap_space_warning = g_variant_get_boolean (value);
|
||||
|
||||
gimp_dashboard_set_low_swap_space_warning (dashboard, low_swap_space_warning);
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static void
|
||||
dashboard_log_record_response (GtkWidget *dialog,
|
||||
int response_id,
|
||||
GimpDashboard *dashboard)
|
||||
{
|
||||
if (response_id == GTK_RESPONSE_OK)
|
||||
{
|
||||
GFile *file;
|
||||
DashboardLogDialogInfo *info;
|
||||
GError *error = NULL;
|
||||
|
||||
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
|
||||
|
||||
info = g_object_get_data (G_OBJECT (dashboard),
|
||||
"gimp-dashboard-log-dialog-info");
|
||||
|
||||
g_return_if_fail (info != NULL);
|
||||
|
||||
g_set_object (&info->folder, g_file_get_parent (file));
|
||||
|
||||
if (! gimp_dashboard_log_start_recording (dashboard,
|
||||
file, &info->params,
|
||||
&error))
|
||||
{
|
||||
gimp_message_literal (
|
||||
gimp_editor_get_ui_manager (GIMP_EDITOR (dashboard))->gimp,
|
||||
NULL, GIMP_MESSAGE_ERROR, error->message);
|
||||
|
||||
g_clear_error (&error);
|
||||
}
|
||||
|
||||
g_object_unref (file);
|
||||
}
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
dashboard_log_add_marker_response (GtkWidget *dialog,
|
||||
const gchar *description,
|
||||
GimpDashboard *dashboard)
|
||||
{
|
||||
gimp_dashboard_log_add_marker (dashboard, description);
|
||||
}
|
||||
|
||||
static DashboardLogDialogInfo *
|
||||
dashboard_log_dialog_info_new (GimpDashboard *dashboard)
|
||||
{
|
||||
DashboardLogDialogInfo *info = g_slice_new (DashboardLogDialogInfo);
|
||||
|
||||
info->folder = NULL;
|
||||
info->params = *gimp_dashboard_log_get_default_params (dashboard);
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
static void
|
||||
dashboard_log_dialog_info_free (DashboardLogDialogInfo *info)
|
||||
{
|
||||
g_clear_object (&info->folder);
|
||||
|
||||
g_slice_free (DashboardLogDialogInfo, info);
|
||||
}
|
48
app/actions/dashboard-commands.h
Normal file
48
app/actions/dashboard-commands.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
/* 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
|
||||
* 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 __DASHBOARD_COMMANDS_H__
|
||||
#define __DASHBOARD_COMMANDS_H__
|
||||
|
||||
|
||||
void dashboard_update_interval_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dashboard_history_duration_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void dashboard_log_record_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dashboard_log_add_marker_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dashboard_log_add_empty_marker_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void dashboard_reset_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void dashboard_low_swap_space_warning_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DASHBOARD_COMMANDS_H__ */
|
313
app/actions/data-commands.c
Normal file
313
app/actions/data-commands.c
Normal file
|
@ -0,0 +1,313 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontainer.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpdata.h"
|
||||
#include "core/gimpdatafactory.h"
|
||||
|
||||
#include "file/file-open.h"
|
||||
|
||||
#include "widgets/gimpclipboard.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimpdataeditor.h"
|
||||
#include "widgets/gimpdatafactoryview.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpmessagebox.h"
|
||||
#include "widgets/gimpmessagedialog.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
#include "widgets/gimpwindowstrategy.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
#include "dialogs/data-delete-dialog.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "data-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
data_open_as_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
GimpContext *context;
|
||||
GimpData *data;
|
||||
|
||||
context =
|
||||
gimp_container_view_get_context (GIMP_CONTAINER_EDITOR (view)->view);
|
||||
|
||||
data = (GimpData *)
|
||||
gimp_context_get_by_type (context,
|
||||
gimp_data_factory_view_get_children_type (view));
|
||||
|
||||
if (data && gimp_data_get_file (data))
|
||||
{
|
||||
GFile *file = gimp_data_get_file (data);
|
||||
GtkWidget *widget = GTK_WIDGET (view);
|
||||
GimpImage *image;
|
||||
GimpPDBStatusType status;
|
||||
GError *error = NULL;
|
||||
|
||||
image = file_open_with_display (context->gimp, context, NULL,
|
||||
file, FALSE,
|
||||
G_OBJECT (gimp_widget_get_monitor (widget)),
|
||||
&status, &error);
|
||||
|
||||
if (! image && status != GIMP_PDB_CANCEL)
|
||||
{
|
||||
gimp_message (context->gimp, G_OBJECT (view),
|
||||
GIMP_MESSAGE_ERROR,
|
||||
_("Opening '%s' failed:\n\n%s"),
|
||||
gimp_file_get_utf8_name (file), error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
data_new_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
|
||||
if (gimp_data_factory_view_has_data_new_func (view))
|
||||
{
|
||||
GimpDataFactory *factory;
|
||||
GimpContext *context;
|
||||
GimpData *data;
|
||||
|
||||
factory = gimp_data_factory_view_get_data_factory (view);
|
||||
|
||||
context =
|
||||
gimp_container_view_get_context (GIMP_CONTAINER_EDITOR (view)->view);
|
||||
|
||||
data = gimp_data_factory_data_new (factory, context, _("Untitled"));
|
||||
|
||||
if (data)
|
||||
{
|
||||
GtkWidget *edit_button;
|
||||
|
||||
gimp_context_set_by_type (context,
|
||||
gimp_data_factory_view_get_children_type (view),
|
||||
GIMP_OBJECT (data));
|
||||
|
||||
edit_button = gimp_data_factory_view_get_edit_button (view);
|
||||
if (edit_button && gtk_widget_get_visible (edit_button))
|
||||
gtk_button_clicked (GTK_BUTTON (gimp_data_factory_view_get_edit_button (view)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
data_duplicate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
GimpContext *context;
|
||||
GimpData *data;
|
||||
|
||||
context = gimp_container_view_get_context (GIMP_CONTAINER_EDITOR (view)->view);
|
||||
|
||||
data = (GimpData *)
|
||||
gimp_context_get_by_type (context,
|
||||
gimp_data_factory_view_get_children_type (view));
|
||||
|
||||
if (data && gimp_data_factory_view_have (view, GIMP_OBJECT (data)))
|
||||
{
|
||||
GimpData *new_data;
|
||||
|
||||
new_data = gimp_data_factory_data_duplicate (gimp_data_factory_view_get_data_factory (view), data);
|
||||
|
||||
if (new_data)
|
||||
{
|
||||
GtkWidget *edit_button;
|
||||
|
||||
gimp_context_set_by_type (context,
|
||||
gimp_data_factory_view_get_children_type (view),
|
||||
GIMP_OBJECT (new_data));
|
||||
|
||||
edit_button = gimp_data_factory_view_get_edit_button (view);
|
||||
if (edit_button && gtk_widget_get_visible (edit_button))
|
||||
gtk_button_clicked (GTK_BUTTON (gimp_data_factory_view_get_edit_button (view)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
data_copy_location_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
GimpContext *context;
|
||||
GimpData *data;
|
||||
|
||||
context = gimp_container_view_get_context (GIMP_CONTAINER_EDITOR (view)->view);
|
||||
|
||||
data = (GimpData *)
|
||||
gimp_context_get_by_type (context,
|
||||
gimp_data_factory_view_get_children_type (view));
|
||||
|
||||
if (data)
|
||||
{
|
||||
GFile *file = gimp_data_get_file (data);
|
||||
|
||||
if (file)
|
||||
{
|
||||
gchar *uri = g_file_get_uri (file);
|
||||
|
||||
gimp_clipboard_set_text (context->gimp, uri);
|
||||
g_free (uri);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
data_show_in_file_manager_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
GimpContext *context;
|
||||
GimpData *data;
|
||||
|
||||
context = gimp_container_view_get_context (GIMP_CONTAINER_EDITOR (view)->view);
|
||||
|
||||
data = (GimpData *)
|
||||
gimp_context_get_by_type (context,
|
||||
gimp_data_factory_view_get_children_type (view));
|
||||
|
||||
if (data)
|
||||
{
|
||||
GFile *file = gimp_data_get_file (data);
|
||||
|
||||
if (file)
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
if (! gimp_file_show_in_file_manager (file, &error))
|
||||
{
|
||||
gimp_message (context->gimp, G_OBJECT (view),
|
||||
GIMP_MESSAGE_ERROR,
|
||||
_("Can't show file in file manager: %s"),
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
data_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
GimpContext *context;
|
||||
GimpData *data;
|
||||
|
||||
context =
|
||||
gimp_container_view_get_context (GIMP_CONTAINER_EDITOR (view)->view);
|
||||
|
||||
data = (GimpData *)
|
||||
gimp_context_get_by_type (context,
|
||||
gimp_data_factory_view_get_children_type (view));
|
||||
|
||||
if (data &&
|
||||
gimp_data_is_deletable (data) &&
|
||||
gimp_data_factory_view_have (view, GIMP_OBJECT (data)))
|
||||
{
|
||||
GimpDataFactory *factory;
|
||||
GtkWidget *dialog;
|
||||
|
||||
factory = gimp_data_factory_view_get_data_factory (view);
|
||||
|
||||
dialog = data_delete_dialog_new (factory, data, context,
|
||||
GTK_WIDGET (view));
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
data_refresh_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
Gimp *gimp;
|
||||
return_if_no_gimp (gimp, user_data);
|
||||
|
||||
gimp_set_busy (gimp);
|
||||
gimp_data_factory_data_refresh (gimp_data_factory_view_get_data_factory (view),
|
||||
action_data_get_context (user_data));
|
||||
gimp_unset_busy (gimp);
|
||||
}
|
||||
|
||||
void
|
||||
data_edit_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
GimpContext *context;
|
||||
GimpData *data;
|
||||
|
||||
context = gimp_container_view_get_context (GIMP_CONTAINER_EDITOR (view)->view);
|
||||
|
||||
data = (GimpData *)
|
||||
gimp_context_get_by_type (context,
|
||||
gimp_data_factory_view_get_children_type (view));
|
||||
|
||||
if (data && gimp_data_factory_view_have (view, GIMP_OBJECT (data)))
|
||||
{
|
||||
GdkMonitor *monitor = gimp_widget_get_monitor (GTK_WIDGET (view));
|
||||
GtkWidget *dockable;
|
||||
GtkWidget *editor = NULL;
|
||||
|
||||
dockable =
|
||||
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (context->gimp)),
|
||||
context->gimp,
|
||||
gimp_dialog_factory_get_singleton (),
|
||||
monitor,
|
||||
g_variant_get_string (value,
|
||||
NULL));
|
||||
|
||||
if (dockable)
|
||||
editor = gtk_bin_get_child (GTK_BIN (dockable));
|
||||
|
||||
if (editor && GIMP_IS_DATA_EDITOR (editor))
|
||||
gimp_data_editor_set_data (GIMP_DATA_EDITOR (editor), data);
|
||||
}
|
||||
}
|
48
app/actions/data-commands.h
Normal file
48
app/actions/data-commands.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
/* 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
|
||||
* 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 __DATA_COMMANDS_H__
|
||||
#define __DATA_COMMANDS_H__
|
||||
|
||||
|
||||
void data_open_as_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_new_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_duplicate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_copy_location_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_show_in_file_manager_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_refresh_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_edit_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DATA_COMMANDS_H__ */
|
43
app/actions/data-editor-commands.c
Normal file
43
app/actions/data-editor-commands.c
Normal file
|
@ -0,0 +1,43 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpdataeditor.h"
|
||||
|
||||
#include "data-editor-commands.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
data_editor_edit_active_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDataEditor *editor = GIMP_DATA_EDITOR (data);
|
||||
gboolean edit_active;
|
||||
|
||||
edit_active = g_variant_get_boolean (value);
|
||||
|
||||
gimp_data_editor_set_edit_active (editor, edit_active);
|
||||
}
|
27
app/actions/data-editor-commands.h
Normal file
27
app/actions/data-editor-commands.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* 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
|
||||
* 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 __DATA_EDITOR_COMMANDS_H__
|
||||
#define __DATA_EDITOR_COMMANDS_H__
|
||||
|
||||
|
||||
void data_editor_edit_active_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DATA_EDITOR_COMMANDS_H__ */
|
102
app/actions/debug-actions.c
Normal file
102
app/actions/debug-actions.c
Normal file
|
@ -0,0 +1,102 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
|
||||
#include "debug-actions.h"
|
||||
#include "debug-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry debug_actions[] =
|
||||
{
|
||||
{ "debug-gtk-inspector", NULL,
|
||||
N_("Start _GtkInspector"), NULL, { NULL }, NULL,
|
||||
debug_gtk_inspector_cmd_callback,
|
||||
NULL },
|
||||
|
||||
{ "debug-mem-profile", NULL,
|
||||
N_("_Memory Profile"), NULL, { NULL }, NULL,
|
||||
debug_mem_profile_cmd_callback,
|
||||
NULL },
|
||||
|
||||
{ "debug-benchmark-projection", NULL,
|
||||
N_("Benchmark _Projection"), NULL, { NULL },
|
||||
N_("Invalidates the entire projection, measures the time it takes to "
|
||||
"validate (render) the part that is visible in the active display, "
|
||||
"and print the result to stdout."),
|
||||
debug_benchmark_projection_cmd_callback,
|
||||
NULL },
|
||||
|
||||
{ "debug-show-image-graph", NULL,
|
||||
N_("Show Image _Graph"), NULL, { NULL },
|
||||
N_("Creates a new image showing the GEGL graph of this image"),
|
||||
debug_show_image_graph_cmd_callback,
|
||||
NULL },
|
||||
|
||||
{ "debug-dump-keyboard-shortcuts", NULL,
|
||||
N_("Dump _Keyboard Shortcuts"), NULL, { NULL }, NULL,
|
||||
debug_dump_keyboard_shortcuts_cmd_callback,
|
||||
NULL },
|
||||
|
||||
{ "debug-dump-attached-data", NULL,
|
||||
N_("Dump _Attached Data"), NULL, { NULL }, NULL,
|
||||
debug_dump_attached_data_cmd_callback,
|
||||
NULL }
|
||||
};
|
||||
|
||||
void
|
||||
debug_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gint i;
|
||||
|
||||
gimp_action_group_add_actions (group, NULL,
|
||||
debug_actions,
|
||||
G_N_ELEMENTS (debug_actions));
|
||||
|
||||
#define SET_VISIBLE(action,condition) \
|
||||
gimp_action_group_set_action_visible (group, action, (condition) != 0)
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (debug_actions); i++)
|
||||
SET_VISIBLE (debug_actions[i].name, group->gimp->show_debug_menu);
|
||||
|
||||
#undef SET_VISIBLE
|
||||
}
|
||||
|
||||
void
|
||||
debug_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
|
||||
|
||||
SET_SENSITIVE ("debug-show-image-graph", gegl_has_operation ("gegl:introspect"));
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
}
|
27
app/actions/debug-actions.h
Normal file
27
app/actions/debug-actions.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* 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
|
||||
* 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 __DEBUG_ACTIONS_H__
|
||||
#define __DEBUG_ACTIONS_H__
|
||||
|
||||
|
||||
void debug_actions_setup (GimpActionGroup *group);
|
||||
void debug_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DEBUG_ACTIONS_H__ */
|
298
app/actions/debug-commands.c
Normal file
298
app/actions/debug-commands.c
Normal file
|
@ -0,0 +1,298 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimp-utils.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpprojectable.h"
|
||||
#include "core/gimpprojection.h"
|
||||
|
||||
#include "gegl/gimp-gegl-utils.h"
|
||||
|
||||
#include "widgets/gimpaction.h"
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpmenufactory.h"
|
||||
#include "widgets/gimpuimanager.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
#include "display/gimpimagewindow.h"
|
||||
|
||||
#include "menus/menus.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "debug-commands.h"
|
||||
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
static gboolean debug_benchmark_projection (GimpDisplay *display);
|
||||
static gboolean debug_show_image_graph (GimpImage *source_image);
|
||||
|
||||
static void debug_print_qdata (GimpObject *object);
|
||||
static void debug_print_qdata_foreach (GQuark key_id,
|
||||
gpointer data,
|
||||
gpointer user_data);
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
debug_gtk_inspector_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
gtk_window_set_interactive_debugging (TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
debug_mem_profile_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
extern gboolean gimp_debug_memsize;
|
||||
Gimp *gimp;
|
||||
return_if_no_gimp (gimp, data);
|
||||
|
||||
gimp_debug_memsize = TRUE;
|
||||
|
||||
gimp_object_get_memsize (GIMP_OBJECT (gimp), NULL);
|
||||
|
||||
gimp_debug_memsize = FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
debug_benchmark_projection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
g_idle_add ((GSourceFunc) debug_benchmark_projection, g_object_ref (display));
|
||||
}
|
||||
|
||||
void
|
||||
debug_show_image_graph_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *source_image = NULL;
|
||||
return_if_no_image (source_image, data);
|
||||
|
||||
g_idle_add ((GSourceFunc) debug_show_image_graph, g_object_ref (source_image));
|
||||
}
|
||||
|
||||
void
|
||||
debug_dump_keyboard_shortcuts_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpUIManager *manager;
|
||||
GList *group_it;
|
||||
GList *strings = NULL;
|
||||
|
||||
return_if_no_display (display, data);
|
||||
|
||||
manager = menus_get_image_manager_singleton (display->gimp);
|
||||
|
||||
/* Gather formatted strings of keyboard shortcuts */
|
||||
for (group_it = gimp_ui_manager_get_action_groups (manager);
|
||||
group_it;
|
||||
group_it = g_list_next (group_it))
|
||||
{
|
||||
GimpActionGroup *group = group_it->data;
|
||||
GList *actions = NULL;
|
||||
GList *action_it = NULL;
|
||||
|
||||
actions = gimp_action_group_list_actions (group);
|
||||
actions = g_list_sort (actions, (GCompareFunc) gimp_action_name_compare);
|
||||
|
||||
for (action_it = actions; action_it; action_it = g_list_next (action_it))
|
||||
{
|
||||
gchar **accels;
|
||||
GimpAction *action = action_it->data;
|
||||
const gchar *name = gimp_action_get_name (action);
|
||||
|
||||
if (name[0] == '<')
|
||||
continue;
|
||||
|
||||
accels = gimp_action_get_display_accels (action);
|
||||
|
||||
if (accels && accels[0])
|
||||
{
|
||||
const gchar *label_tmp;
|
||||
gchar *label;
|
||||
|
||||
label_tmp = gimp_action_get_label (action);
|
||||
label = gimp_strip_uline (label_tmp);
|
||||
|
||||
strings = g_list_prepend (strings,
|
||||
g_strdup_printf ("%-20s %s",
|
||||
accels[0], label));
|
||||
|
||||
g_free (label);
|
||||
|
||||
for (gint i = 1; accels[i] != NULL; i++)
|
||||
strings = g_list_prepend (strings, g_strdup (accels[i]));
|
||||
}
|
||||
|
||||
g_strfreev (accels);
|
||||
}
|
||||
|
||||
g_list_free (actions);
|
||||
}
|
||||
|
||||
/* Sort and prints the strings */
|
||||
{
|
||||
GList *string_it = NULL;
|
||||
|
||||
strings = g_list_sort (strings, (GCompareFunc) strcmp);
|
||||
|
||||
for (string_it = strings; string_it; string_it = g_list_next (string_it))
|
||||
{
|
||||
g_print ("%s\n", (gchar *) string_it->data);
|
||||
g_free (string_it->data);
|
||||
}
|
||||
|
||||
g_list_free (strings);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
debug_dump_attached_data_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp = action_data_get_gimp (data);
|
||||
GimpContext *user_context = gimp_get_user_context (gimp);
|
||||
|
||||
debug_print_qdata (GIMP_OBJECT (gimp));
|
||||
debug_print_qdata (GIMP_OBJECT (user_context));
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static gboolean
|
||||
debug_benchmark_projection (GimpDisplay *display)
|
||||
{
|
||||
GimpImage *image = gimp_display_get_image (display);
|
||||
|
||||
if (image)
|
||||
{
|
||||
GimpProjection *projection = gimp_image_get_projection (image);
|
||||
|
||||
gimp_projection_stop_rendering (projection);
|
||||
|
||||
GIMP_TIMER_START ();
|
||||
|
||||
gimp_image_invalidate_all (image);
|
||||
gimp_projection_flush_now (projection, TRUE);
|
||||
|
||||
GIMP_TIMER_END ("Validation of the entire projection");
|
||||
|
||||
g_object_unref (display);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
debug_show_image_graph (GimpImage *source_image)
|
||||
{
|
||||
GeglNode *image_graph;
|
||||
GeglNode *output_node;
|
||||
GimpImage *new_image;
|
||||
GeglNode *introspect;
|
||||
GeglNode *sink;
|
||||
GeglBuffer *buffer = NULL;
|
||||
|
||||
image_graph = gimp_projectable_get_graph (GIMP_PROJECTABLE (source_image));
|
||||
|
||||
output_node = gegl_node_get_output_proxy (image_graph, "output");
|
||||
|
||||
introspect = gegl_node_new_child (NULL,
|
||||
"operation", "gegl:introspect",
|
||||
"node", output_node,
|
||||
NULL);
|
||||
sink = gegl_node_new_child (NULL,
|
||||
"operation", "gegl:buffer-sink",
|
||||
"buffer", &buffer,
|
||||
NULL);
|
||||
|
||||
gegl_node_link_many (introspect, sink, NULL);
|
||||
gegl_node_process (sink);
|
||||
|
||||
if (buffer)
|
||||
{
|
||||
gchar *new_name;
|
||||
|
||||
/* This should not happen but "gegl:introspect" is a bit fickle as
|
||||
* it uses an external binary `dot`. Prevent useless crashes.
|
||||
* I don't output a warning when buffer is NULL because anyway
|
||||
* GEGL will output one itself.
|
||||
*/
|
||||
new_name = g_strdup_printf ("%s GEGL graph",
|
||||
gimp_image_get_display_name (source_image));
|
||||
|
||||
new_image = gimp_create_image_from_buffer (source_image->gimp,
|
||||
buffer, new_name);
|
||||
gimp_image_set_file (new_image, g_file_new_for_uri (new_name));
|
||||
|
||||
g_free (new_name);
|
||||
g_object_unref (buffer);
|
||||
}
|
||||
|
||||
g_object_unref (sink);
|
||||
g_object_unref (introspect);
|
||||
|
||||
g_object_unref (source_image);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
debug_print_qdata (GimpObject *object)
|
||||
{
|
||||
g_print ("\nData attached to '%s':\n\n", gimp_object_get_name (object));
|
||||
g_datalist_foreach (&G_OBJECT (object)->qdata,
|
||||
debug_print_qdata_foreach,
|
||||
NULL);
|
||||
g_print ("\n");
|
||||
}
|
||||
|
||||
static void
|
||||
debug_print_qdata_foreach (GQuark key_id,
|
||||
gpointer data,
|
||||
gpointer user_data)
|
||||
{
|
||||
g_print ("%s: %p\n", g_quark_to_string (key_id), data);
|
||||
}
|
45
app/actions/debug-commands.h
Normal file
45
app/actions/debug-commands.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
/* 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
|
||||
* 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 __DEBUG_COMMANDS_H__
|
||||
#define __DEBUG_COMMANDS_H__
|
||||
|
||||
|
||||
void debug_gtk_inspector_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void debug_mem_profile_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void debug_benchmark_projection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void debug_show_image_graph_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void debug_dump_menus_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void debug_dump_keyboard_shortcuts_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void debug_dump_attached_data_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DEBUG_COMMANDS_H__ */
|
459
app/actions/dialogs-actions.c
Normal file
459
app/actions/dialogs-actions.c
Normal file
|
@ -0,0 +1,459 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpsessioninfo.h"
|
||||
#include "widgets/gimptoolbox.h"
|
||||
|
||||
#include "display/gimpimagewindow.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "dialogs-actions.h"
|
||||
#include "dialogs-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
const GimpStringActionEntry dialogs_dockable_actions[] =
|
||||
{
|
||||
{ "dialogs-toolbox", NULL,
|
||||
NC_("windows-action", "Tool_box"), NULL, { "<primary>B", NULL },
|
||||
NULL /* set in dialogs_actions_update() */,
|
||||
"gimp-toolbox",
|
||||
GIMP_HELP_TOOLBOX },
|
||||
|
||||
{ "dialogs-tool-options", GIMP_ICON_DIALOG_TOOL_OPTIONS,
|
||||
NC_("dialogs-action", "Tool _Options Dialog"),
|
||||
NC_("dialogs-action", "Tool _Options"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the tool options dialog"),
|
||||
"gimp-tool-options",
|
||||
GIMP_HELP_TOOL_OPTIONS_DIALOG },
|
||||
|
||||
{ "dialogs-device-status", GIMP_ICON_DIALOG_DEVICE_STATUS,
|
||||
NC_("dialogs-action", "_Device Status Dialog"),
|
||||
NC_("dialogs-action", "_Device Status"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the device status dialog"),
|
||||
"gimp-device-status",
|
||||
GIMP_HELP_DEVICE_STATUS_DIALOG },
|
||||
|
||||
{ "dialogs-symmetry", GIMP_ICON_SYMMETRY,
|
||||
NC_("dialogs-action", "_Symmetry Painting Dialog"),
|
||||
NC_("dialogs-action", "_Symmetry Painting"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the symmetry dialog"),
|
||||
"gimp-symmetry-editor",
|
||||
GIMP_HELP_SYMMETRY_DIALOG },
|
||||
|
||||
{ "dialogs-layers", GIMP_ICON_DIALOG_LAYERS,
|
||||
NC_("dialogs-action", "_Layers Dialog"),
|
||||
NC_("dialogs-action", "_Layers"),
|
||||
{ "<primary>L", NULL },
|
||||
NC_("dialogs-action", "Open the layers dialog"),
|
||||
"gimp-layer-list",
|
||||
GIMP_HELP_LAYER_DIALOG },
|
||||
|
||||
{ "dialogs-channels", GIMP_ICON_DIALOG_CHANNELS,
|
||||
NC_("dialogs-action", "_Channels Dialog"),
|
||||
NC_("dialogs-action", "_Channels"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the channels dialog"),
|
||||
"gimp-channel-list",
|
||||
GIMP_HELP_CHANNEL_DIALOG },
|
||||
|
||||
{ "dialogs-vectors", GIMP_ICON_DIALOG_PATHS,
|
||||
NC_("dialogs-action", "_Paths Dialog"),
|
||||
NC_("dialogs-action", "_Paths"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the paths dialog"),
|
||||
"gimp-vectors-list",
|
||||
GIMP_HELP_PATH_DIALOG },
|
||||
|
||||
{ "dialogs-indexed-palette", GIMP_ICON_COLORMAP,
|
||||
NC_("dialogs-action", "Color_map Dialog"),
|
||||
NC_("dialogs-action", "Color_map"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the colormap dialog"),
|
||||
"gimp-indexed-palette",
|
||||
GIMP_HELP_INDEXED_PALETTE_DIALOG },
|
||||
|
||||
{ "dialogs-histogram", GIMP_ICON_HISTOGRAM,
|
||||
NC_("dialogs-action", "Histogra_m Dialog"),
|
||||
NC_("dialogs-action", "Histogra_m"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the histogram dialog"),
|
||||
"gimp-histogram-editor",
|
||||
GIMP_HELP_HISTOGRAM_DIALOG },
|
||||
|
||||
{ "dialogs-selection-editor", GIMP_ICON_SELECTION,
|
||||
NC_("dialogs-action", "_Selection Editor"), NULL,
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the selection editor"),
|
||||
"gimp-selection-editor",
|
||||
GIMP_HELP_SELECTION_DIALOG },
|
||||
|
||||
{ "dialogs-navigation", GIMP_ICON_DIALOG_NAVIGATION,
|
||||
NC_("dialogs-action", "Na_vigation Dialog"),
|
||||
NC_("dialogs-action", "Na_vigation"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the display navigation dialog"),
|
||||
"gimp-navigation-view",
|
||||
GIMP_HELP_NAVIGATION_DIALOG },
|
||||
|
||||
{ "dialogs-undo-history", GIMP_ICON_DIALOG_UNDO_HISTORY,
|
||||
NC_("dialogs-action", "Undo _History Dialog"),
|
||||
NC_("dialogs-action", "Undo _History"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the undo history dialog"),
|
||||
"gimp-undo-history",
|
||||
GIMP_HELP_UNDO_DIALOG },
|
||||
|
||||
{ "dialogs-cursor", GIMP_ICON_CURSOR,
|
||||
NC_("dialogs-action", "_Pointer Dialog"),
|
||||
NC_("dialogs-action", "_Pointer"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the pointer information dialog"),
|
||||
"gimp-cursor-view",
|
||||
GIMP_HELP_POINTER_INFO_DIALOG },
|
||||
|
||||
{ "dialogs-sample-points", GIMP_ICON_SAMPLE_POINT,
|
||||
NC_("dialogs-action", "_Sample Points Dialog"),
|
||||
NC_("dialogs-action", "_Sample Points"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the sample points dialog"),
|
||||
"gimp-sample-point-editor",
|
||||
GIMP_HELP_SAMPLE_POINT_DIALOG },
|
||||
|
||||
{ "dialogs-colors", GIMP_ICON_COLORS_DEFAULT,
|
||||
NC_("dialogs-action", "Colo_rs Dialog"),
|
||||
NC_("dialogs-action", "Colo_rs"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the FG/BG color dialog"),
|
||||
"gimp-color-editor",
|
||||
GIMP_HELP_COLOR_DIALOG },
|
||||
|
||||
{ "dialogs-brushes", GIMP_ICON_BRUSH,
|
||||
NC_("dialogs-action", "_Brushes Dialog"),
|
||||
NC_("dialogs-action", "_Brushes"),
|
||||
{ "<primary><shift>B", NULL },
|
||||
NC_("dialogs-action", "Open the brushes dialog"),
|
||||
"gimp-brush-grid|gimp-brush-list",
|
||||
GIMP_HELP_BRUSH_DIALOG },
|
||||
|
||||
{ "dialogs-brush-editor", GIMP_ICON_BRUSH,
|
||||
NC_("dialogs-action", "Brush Editor"), NULL,
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the brush editor"),
|
||||
"gimp-brush-editor",
|
||||
GIMP_HELP_BRUSH_EDIT },
|
||||
|
||||
{ "dialogs-dynamics", GIMP_ICON_DYNAMICS,
|
||||
NC_("dialogs-action", "Paint D_ynamics Dialog"),
|
||||
NC_("dialogs-action", "Paint D_ynamics"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open paint dynamics dialog"),
|
||||
"gimp-dynamics-list|gimp-dynamics-grid",
|
||||
GIMP_HELP_DYNAMICS_DIALOG },
|
||||
|
||||
{ "dialogs-dynamics-editor", GIMP_ICON_DYNAMICS,
|
||||
NC_("dialogs-action", "Paint Dynamics Editor"), NULL,
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the paint dynamics editor"),
|
||||
"gimp-dynamics-editor",
|
||||
GIMP_HELP_DYNAMICS_EDITOR_DIALOG },
|
||||
|
||||
{ "dialogs-mypaint-brushes", GIMP_ICON_MYPAINT_BRUSH,
|
||||
NC_("dialogs-action", "_MyPaint Brushes Dialog"),
|
||||
NC_("dialogs-action", "_MyPaint Brushes"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the mypaint brushes dialog"),
|
||||
"gimp-mypaint-brush-grid|gimp-mapyint-brush-list",
|
||||
GIMP_HELP_MYPAINT_BRUSH_DIALOG },
|
||||
|
||||
{ "dialogs-patterns", GIMP_ICON_PATTERN,
|
||||
NC_("dialogs-action", "P_atterns Dialog"),
|
||||
NC_("dialogs-action", "P_atterns"),
|
||||
{ "<primary><shift>P", NULL },
|
||||
NC_("dialogs-action", "Open the patterns dialog"),
|
||||
"gimp-pattern-grid|gimp-pattern-list",
|
||||
GIMP_HELP_PATTERN_DIALOG },
|
||||
|
||||
{ "dialogs-gradients", GIMP_ICON_GRADIENT,
|
||||
NC_("dialogs-action", "_Gradients Dialog"),
|
||||
NC_("dialogs-action", "_Gradients"),
|
||||
{ "<primary>G", NULL },
|
||||
NC_("dialogs-action", "Open the gradients dialog"),
|
||||
"gimp-gradient-list|gimp-gradient-grid",
|
||||
GIMP_HELP_GRADIENT_DIALOG },
|
||||
|
||||
{ "dialogs-gradient-editor", GIMP_ICON_GRADIENT,
|
||||
NC_("dialogs-action", "Gradient Editor"), NULL,
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the gradient editor"),
|
||||
"gimp-gradient-editor",
|
||||
GIMP_HELP_GRADIENT_EDIT },
|
||||
|
||||
{ "dialogs-palettes", GIMP_ICON_PALETTE,
|
||||
NC_("dialogs-action", "Pal_ettes Dialog"),
|
||||
NC_("dialogs-action", "Pal_ettes"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the palettes dialog"),
|
||||
"gimp-palette-list|gimp-palette-grid",
|
||||
GIMP_HELP_PALETTE_DIALOG },
|
||||
|
||||
{ "dialogs-palette-editor", GIMP_ICON_PALETTE,
|
||||
NC_("dialogs-action", "Palette _Editor"),
|
||||
NC_("dialogs-action", "Palette _Editor"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the palette editor"),
|
||||
"gimp-palette-editor",
|
||||
GIMP_HELP_PALETTE_EDIT },
|
||||
|
||||
{ "dialogs-tool-presets", GIMP_ICON_TOOL_PRESET,
|
||||
NC_("dialogs-action", "Tool Pre_sets Dialog"),
|
||||
NC_("dialogs-action", "Tool Pre_sets"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open tool presets dialog"),
|
||||
"gimp-tool-preset-list|gimp-tool-preset-grid",
|
||||
GIMP_HELP_TOOL_PRESET_DIALOG },
|
||||
|
||||
{ "dialogs-fonts", GIMP_ICON_FONT,
|
||||
NC_("dialogs-action", "_Fonts Dialog"),
|
||||
NC_("dialogs-action", "_Fonts"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the fonts dialog"),
|
||||
"gimp-font-list|gimp-font-grid",
|
||||
GIMP_HELP_FONT_DIALOG },
|
||||
|
||||
{ "dialogs-buffers", GIMP_ICON_BUFFER,
|
||||
NC_("dialogs-action", "B_uffers Dialog"),
|
||||
NC_("dialogs-action", "B_uffers"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the named buffers dialog"),
|
||||
"gimp-buffer-list|gimp-buffer-grid",
|
||||
GIMP_HELP_BUFFER_DIALOG },
|
||||
|
||||
{ "dialogs-images", GIMP_ICON_DIALOG_IMAGES,
|
||||
NC_("dialogs-action", "_Images Dialog"),
|
||||
NC_("dialogs-action", "_Images"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the images dialog"),
|
||||
"gimp-image-list|gimp-image-grid",
|
||||
GIMP_HELP_IMAGE_DIALOG },
|
||||
|
||||
{ "dialogs-document-history", GIMP_ICON_DOCUMENT_OPEN_RECENT,
|
||||
NC_("dialogs-action", "Document Histor_y Dialog"),
|
||||
NC_("dialogs-action", "Document Histor_y"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the document history dialog"),
|
||||
"gimp-document-list|gimp-document-grid",
|
||||
GIMP_HELP_DOCUMENT_DIALOG },
|
||||
|
||||
{ "dialogs-templates", GIMP_ICON_TEMPLATE,
|
||||
NC_("dialogs-action", "_Templates Dialog"),
|
||||
NC_("dialogs-action", "_Templates"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the image templates dialog"),
|
||||
"gimp-template-list|gimp-template-grid",
|
||||
GIMP_HELP_TEMPLATE_DIALOG },
|
||||
|
||||
{ "dialogs-error-console", GIMP_ICON_DIALOG_WARNING,
|
||||
NC_("dialogs-action", "Error Co_nsole"),
|
||||
NC_("dialogs-action", "Error Co_nsole"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the error console"),
|
||||
"gimp-error-console",
|
||||
GIMP_HELP_ERRORS_DIALOG },
|
||||
|
||||
{ "dialogs-dashboard", GIMP_ICON_DIALOG_DASHBOARD,
|
||||
NC_("dialogs-action", "_Dashboard"),
|
||||
NC_("dialogs-action", "_Dashboard"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the dashboard"),
|
||||
"gimp-dashboard",
|
||||
GIMP_HELP_ERRORS_DIALOG }
|
||||
};
|
||||
|
||||
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",
|
||||
GIMP_HELP_PREFS_DIALOG },
|
||||
|
||||
{ "dialogs-input-devices", GIMP_ICON_INPUT_DEVICE,
|
||||
NC_("dialogs-action", "_Input Devices Editor"),
|
||||
NC_("dialogs-action", "_Input Devices"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the input devices editor"),
|
||||
"gimp-input-devices-dialog",
|
||||
GIMP_HELP_INPUT_DEVICES },
|
||||
|
||||
{ "dialogs-keyboard-shortcuts", GIMP_ICON_CHAR_PICKER,
|
||||
NC_("dialogs-action", "_Keyboard Shortcuts Editor"),
|
||||
NC_("dialogs-action", "_Keyboard Shortcuts"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the keyboard shortcuts editor"),
|
||||
"gimp-keyboard-shortcuts-dialog",
|
||||
GIMP_HELP_KEYBOARD_SHORTCUTS },
|
||||
|
||||
{ "dialogs-module-dialog", GIMP_ICON_SYSTEM_RUN,
|
||||
NC_("dialogs-action", "_Modules Dialog"),
|
||||
NC_("dialogs-action", "_Modules"),
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the module manager dialog"),
|
||||
"gimp-module-dialog",
|
||||
GIMP_HELP_MODULE_DIALOG },
|
||||
|
||||
{ "dialogs-tips", GIMP_ICON_DIALOG_INFORMATION,
|
||||
NC_("dialogs-action", "_Tip of the Day"), NULL,
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Show some helpful tips on using GIMP"),
|
||||
"gimp-tips-dialog",
|
||||
GIMP_HELP_TIPS_DIALOG },
|
||||
|
||||
{ "dialogs-welcome", GIMP_ICON_DIALOG_INFORMATION,
|
||||
NC_("dialogs-action", "Welcome Dialog"), NULL,
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Show information on running GIMP release"),
|
||||
"gimp-welcome-dialog",
|
||||
GIMP_HELP_WELCOME_DIALOG },
|
||||
|
||||
{ "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
|
||||
NULL, { NULL },
|
||||
NC_("dialogs-action", "About GIMP"),
|
||||
"gimp-about-dialog",
|
||||
GIMP_HELP_ABOUT_DIALOG },
|
||||
|
||||
{ "dialogs-action-search", GIMP_ICON_TOOL_ZOOM,
|
||||
NC_("dialogs-action", "_Search and Run a Command"), NULL,
|
||||
{ "slash", "KP_Divide", NULL },
|
||||
NC_("dialogs-action", "Search commands by keyword, and run them"),
|
||||
"gimp-action-search-dialog",
|
||||
GIMP_HELP_ACTION_SEARCH_DIALOG },
|
||||
|
||||
#ifndef GIMP_RELEASE
|
||||
{ "dialogs-extensions", GIMP_ICON_PLUGIN,
|
||||
NC_("dialogs-action", "Manage _Extensions"), NULL,
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Manage Extensions: search, install, uninstall, update."),
|
||||
"gimp-extensions-dialog",
|
||||
GIMP_HELP_EXTENSIONS_DIALOG }
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
gboolean
|
||||
dialogs_actions_toolbox_exists (Gimp *gimp)
|
||||
{
|
||||
GimpDialogFactory *factory = gimp_dialog_factory_get_singleton ();
|
||||
gboolean toolbox_found = FALSE;
|
||||
GList *iter;
|
||||
|
||||
/* First look in session managed windows */
|
||||
toolbox_found =
|
||||
gimp_dialog_factory_find_widget (factory, "gimp-toolbox-window") != NULL;
|
||||
|
||||
/* Then in image windows */
|
||||
if (! toolbox_found)
|
||||
{
|
||||
GList *windows = gimp ? gimp_get_image_windows (gimp) : NULL;
|
||||
|
||||
for (iter = windows; iter; iter = g_list_next (iter))
|
||||
{
|
||||
GimpImageWindow *window = GIMP_IMAGE_WINDOW (windows->data);
|
||||
|
||||
if (gimp_image_window_has_toolbox (window))
|
||||
{
|
||||
toolbox_found = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
g_list_free (windows);
|
||||
}
|
||||
|
||||
return toolbox_found;
|
||||
}
|
||||
|
||||
void
|
||||
dialogs_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_string_actions (group, "dialogs-action",
|
||||
dialogs_dockable_actions,
|
||||
G_N_ELEMENTS (dialogs_dockable_actions),
|
||||
dialogs_create_dockable_cmd_callback);
|
||||
|
||||
gimp_action_group_add_string_actions (group, "dialogs-action",
|
||||
dialogs_toplevel_actions,
|
||||
G_N_ELEMENTS (dialogs_toplevel_actions),
|
||||
dialogs_create_toplevel_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
dialogs_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp = action_data_get_gimp (data);
|
||||
const gchar *toolbox_label = NULL;
|
||||
const gchar *toolbox_tooltip = NULL;
|
||||
|
||||
if (dialogs_actions_toolbox_exists (gimp))
|
||||
{
|
||||
toolbox_label = _("Tool_box");
|
||||
toolbox_tooltip = _("Raise the toolbox");
|
||||
}
|
||||
else
|
||||
{
|
||||
toolbox_label = _("New Tool_box");
|
||||
toolbox_tooltip = _("Create a new toolbox");
|
||||
}
|
||||
|
||||
gimp_action_group_set_action_label (group, "dialogs-toolbox", toolbox_label);
|
||||
gimp_action_group_set_action_tooltip (group, "dialogs-toolbox", toolbox_tooltip);
|
||||
}
|
38
app/actions/dialogs-actions.h
Normal file
38
app/actions/dialogs-actions.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
/* 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
|
||||
* 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 __DIALOGS_ACTIONS_H__
|
||||
#define __DIALOGS_ACTIONS_H__
|
||||
|
||||
|
||||
/* this check is needed for the extern declaration below to be correct */
|
||||
#ifndef __GIMP_ACTION_GROUP_H__
|
||||
#error "widgets/gimpactiongroup.h must be included prior to dialogs-actions.h"
|
||||
#endif
|
||||
|
||||
extern const GimpStringActionEntry dialogs_dockable_actions[];
|
||||
extern gint n_dialogs_dockable_actions;
|
||||
|
||||
|
||||
void dialogs_actions_setup (GimpActionGroup *group);
|
||||
void dialogs_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
gboolean dialogs_actions_toolbox_exists (Gimp *gimp);
|
||||
|
||||
|
||||
#endif /* __DIALOGS_ACTIONS_H__ */
|
77
app/actions/dialogs-commands.c
Normal file
77
app/actions/dialogs-commands.c
Normal file
|
@ -0,0 +1,77 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
#include "widgets/gimpwindowstrategy.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "dialogs-commands.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
dialogs_create_toplevel_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
const gchar *identifier;
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
identifier = g_variant_get_string (value, NULL);
|
||||
|
||||
if (identifier)
|
||||
gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
|
||||
gimp_widget_get_monitor (widget),
|
||||
NULL /*ui_manager*/,
|
||||
widget,
|
||||
identifier, -1, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
dialogs_create_dockable_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GtkWidget *widget;
|
||||
const gchar *identifier;
|
||||
return_if_no_gimp (gimp, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
identifier = g_variant_get_string (value, NULL);
|
||||
|
||||
if (identifier)
|
||||
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (gimp)),
|
||||
gimp,
|
||||
gimp_dialog_factory_get_singleton (),
|
||||
gimp_widget_get_monitor (widget),
|
||||
identifier);
|
||||
}
|
30
app/actions/dialogs-commands.h
Normal file
30
app/actions/dialogs-commands.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/* 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
|
||||
* 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 __DIALOGS_COMMANDS_H__
|
||||
#define __DIALOGS_COMMANDS_H__
|
||||
|
||||
|
||||
void dialogs_create_toplevel_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dialogs_create_dockable_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DIALOGS_COMMANDS_H__ */
|
137
app/actions/dock-actions.c
Normal file
137
app/actions/dock-actions.c
Normal file
|
@ -0,0 +1,137 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpdockwindow.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpmenudock.h"
|
||||
|
||||
#include "display/gimpimagewindow.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "dock-actions.h"
|
||||
#include "dock-commands.h"
|
||||
#include "window-actions.h"
|
||||
#include "window-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry dock_actions[] =
|
||||
{
|
||||
{ "dock-close", GIMP_ICON_WINDOW_CLOSE,
|
||||
NC_("dock-action", "Close Dock"), NULL, { NULL }, NULL,
|
||||
window_close_cmd_callback,
|
||||
GIMP_HELP_DOCK_CLOSE },
|
||||
|
||||
{ "dock-open-display", NULL,
|
||||
NC_("dock-action", "_Open Display..."), NULL, { NULL },
|
||||
NC_("dock-action", "Connect to another display"),
|
||||
window_open_display_cmd_callback,
|
||||
NULL }
|
||||
};
|
||||
|
||||
static const GimpToggleActionEntry dock_toggle_actions[] =
|
||||
{
|
||||
{ "dock-show-image-menu", NULL,
|
||||
NC_("dock-action", "_Show Image Selection"), NULL, { NULL }, NULL,
|
||||
dock_toggle_image_menu_cmd_callback,
|
||||
TRUE,
|
||||
GIMP_HELP_DOCK_IMAGE_MENU },
|
||||
|
||||
{ "dock-auto-follow-active", NULL,
|
||||
NC_("dock-action", "Auto _Follow Active Image"), NULL, { NULL }, NULL,
|
||||
dock_toggle_auto_cmd_callback,
|
||||
TRUE,
|
||||
GIMP_HELP_DOCK_AUTO_BUTTON }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
dock_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "dock-action",
|
||||
dock_actions,
|
||||
G_N_ELEMENTS (dock_actions));
|
||||
|
||||
gimp_action_group_add_toggle_actions (group, "dock-action",
|
||||
dock_toggle_actions,
|
||||
G_N_ELEMENTS (dock_toggle_actions));
|
||||
|
||||
window_actions_setup (group, GIMP_HELP_DOCK_CHANGE_SCREEN);
|
||||
}
|
||||
|
||||
void
|
||||
dock_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget = action_data_get_widget (data);
|
||||
GtkWidget *toplevel = NULL;
|
||||
|
||||
if (widget)
|
||||
toplevel = gtk_widget_get_toplevel (widget);
|
||||
|
||||
#define SET_ACTIVE(action,active) \
|
||||
gimp_action_group_set_action_active (group, action, (active) != 0)
|
||||
#define SET_VISIBLE(action,active) \
|
||||
gimp_action_group_set_action_visible (group, action, (active) != 0)
|
||||
|
||||
if (GIMP_IS_DOCK_WINDOW (toplevel))
|
||||
{
|
||||
GimpDockWindow *dock_window = GIMP_DOCK_WINDOW (toplevel);
|
||||
gboolean show_image_menu = ! gimp_dock_window_has_toolbox (dock_window);
|
||||
|
||||
if (show_image_menu)
|
||||
{
|
||||
SET_VISIBLE ("dock-show-image-menu", TRUE);
|
||||
SET_VISIBLE ("dock-auto-follow-active", TRUE);
|
||||
|
||||
SET_ACTIVE ("dock-show-image-menu",
|
||||
gimp_dock_window_get_show_image_menu (dock_window));
|
||||
SET_ACTIVE ("dock-auto-follow-active",
|
||||
gimp_dock_window_get_auto_follow_active (dock_window));
|
||||
}
|
||||
else
|
||||
{
|
||||
SET_VISIBLE ("dock-show-image-menu", FALSE);
|
||||
SET_VISIBLE ("dock-auto-follow-active", FALSE);
|
||||
}
|
||||
|
||||
/* update the window actions only in the context of their
|
||||
* own window (not in the context of some display or NULL)
|
||||
* (see view-actions.c)
|
||||
*/
|
||||
window_actions_update (group, toplevel);
|
||||
}
|
||||
else if (GIMP_IS_IMAGE_WINDOW (toplevel))
|
||||
{
|
||||
SET_VISIBLE ("dock-show-image-menu", FALSE);
|
||||
SET_VISIBLE ("dock-auto-follow-active", FALSE);
|
||||
}
|
||||
|
||||
#undef SET_ACTIVE
|
||||
#undef SET_VISIBLE
|
||||
}
|
27
app/actions/dock-actions.h
Normal file
27
app/actions/dock-actions.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* 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
|
||||
* 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 __DOCK_ACTIONS_H__
|
||||
#define __DOCK_ACTIONS_H__
|
||||
|
||||
|
||||
void dock_actions_setup (GimpActionGroup *group);
|
||||
void dock_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DOCK_ACTIONS_H__ */
|
85
app/actions/dock-commands.c
Normal file
85
app/actions/dock-commands.c
Normal file
|
@ -0,0 +1,85 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpdockwindow.h"
|
||||
#include "widgets/gimpdockwindow.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "dock-commands.h"
|
||||
|
||||
|
||||
static GimpDockWindow *
|
||||
dock_commands_get_dock_window_from_widget (GtkWidget *widget)
|
||||
{
|
||||
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
|
||||
GimpDockWindow *dock_window = NULL;
|
||||
|
||||
if (GIMP_IS_DOCK_WINDOW (toplevel))
|
||||
dock_window = GIMP_DOCK_WINDOW (toplevel);
|
||||
|
||||
return dock_window;
|
||||
}
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
dock_toggle_image_menu_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget = NULL;
|
||||
GimpDockWindow *dock_window = NULL;
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
dock_window = dock_commands_get_dock_window_from_widget (widget);
|
||||
|
||||
if (dock_window)
|
||||
{
|
||||
gboolean active = g_variant_get_boolean (value);
|
||||
|
||||
gimp_dock_window_set_show_image_menu (dock_window, active);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dock_toggle_auto_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget = NULL;
|
||||
GimpDockWindow *dock_window = NULL;
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
dock_window = dock_commands_get_dock_window_from_widget (widget);
|
||||
|
||||
if (dock_window)
|
||||
{
|
||||
gboolean active = g_variant_get_boolean (value);
|
||||
|
||||
gimp_dock_window_set_auto_follow_active (dock_window, active);
|
||||
}
|
||||
}
|
30
app/actions/dock-commands.h
Normal file
30
app/actions/dock-commands.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/* 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
|
||||
* 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 __DOCK_COMMANDS_H__
|
||||
#define __DOCK_COMMANDS_H__
|
||||
|
||||
|
||||
void dock_toggle_image_menu_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dock_toggle_auto_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DOCK_COMMANDS_H__ */
|
368
app/actions/dockable-actions.c
Normal file
368
app/actions/dockable-actions.c
Normal file
|
@ -0,0 +1,368 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimpcontainerview-utils.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpdock.h"
|
||||
#include "widgets/gimpdockable.h"
|
||||
#include "widgets/gimpdockbook.h"
|
||||
#include "widgets/gimpdocked.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "dialogs-actions.h"
|
||||
#include "dockable-actions.h"
|
||||
#include "dockable-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry dockable_actions[] =
|
||||
{
|
||||
{ "dockable-close-tab", "window-close",
|
||||
NC_("dockable-action", "_Close Tab"), NULL, { NULL }, NULL,
|
||||
dockable_close_tab_cmd_callback,
|
||||
GIMP_HELP_DOCK_TAB_CLOSE },
|
||||
|
||||
{ "dockable-detach-tab", GIMP_ICON_DETACH,
|
||||
NC_("dockable-action", "_Detach Tab"), NULL, { NULL }, NULL,
|
||||
dockable_detach_tab_cmd_callback,
|
||||
GIMP_HELP_DOCK_TAB_DETACH }
|
||||
};
|
||||
|
||||
#define VIEW_SIZE(action,label,size) \
|
||||
{ "dockable-preview-size-" action, NULL, \
|
||||
(label), NULL, { NULL }, NULL, \
|
||||
(size), \
|
||||
GIMP_HELP_DOCK_PREVIEW_SIZE }
|
||||
#define TAB_STYLE(action,label,style) \
|
||||
{ "dockable-tab-style-" action, NULL, \
|
||||
(label), NULL, { NULL }, NULL, \
|
||||
(style), \
|
||||
GIMP_HELP_DOCK_TAB_STYLE }
|
||||
|
||||
static const GimpRadioActionEntry dockable_view_size_actions[] =
|
||||
{
|
||||
VIEW_SIZE ("tiny",
|
||||
NC_("preview-size", "_Tiny"), GIMP_VIEW_SIZE_TINY),
|
||||
VIEW_SIZE ("extra-small",
|
||||
NC_("preview-size", "E_xtra Small"), GIMP_VIEW_SIZE_EXTRA_SMALL),
|
||||
VIEW_SIZE ("small",
|
||||
NC_("preview-size", "_Small"), GIMP_VIEW_SIZE_SMALL),
|
||||
VIEW_SIZE ("medium",
|
||||
NC_("preview-size", "_Medium"), GIMP_VIEW_SIZE_MEDIUM),
|
||||
VIEW_SIZE ("large",
|
||||
NC_("preview-size", "_Large"), GIMP_VIEW_SIZE_LARGE),
|
||||
VIEW_SIZE ("extra-large",
|
||||
NC_("preview-size", "Ex_tra Large"), GIMP_VIEW_SIZE_EXTRA_LARGE),
|
||||
VIEW_SIZE ("huge",
|
||||
NC_("preview-size", "_Huge"), GIMP_VIEW_SIZE_HUGE),
|
||||
VIEW_SIZE ("enormous",
|
||||
NC_("preview-size", "_Enormous"), GIMP_VIEW_SIZE_ENORMOUS),
|
||||
VIEW_SIZE ("gigantic",
|
||||
NC_("preview-size", "_Gigantic"), GIMP_VIEW_SIZE_GIGANTIC)
|
||||
};
|
||||
|
||||
static const GimpRadioActionEntry dockable_tab_style_actions[] =
|
||||
{
|
||||
TAB_STYLE ("icon",
|
||||
NC_("tab-style", "_Icon"), GIMP_TAB_STYLE_ICON),
|
||||
TAB_STYLE ("preview",
|
||||
NC_("tab-style", "Current _Status"), GIMP_TAB_STYLE_PREVIEW),
|
||||
TAB_STYLE ("name",
|
||||
NC_("tab-style", "_Text"), GIMP_TAB_STYLE_NAME),
|
||||
TAB_STYLE ("icon-name",
|
||||
NC_("tab-style", "I_con & Text"), GIMP_TAB_STYLE_ICON_NAME),
|
||||
TAB_STYLE ("preview-name",
|
||||
NC_("tab-style", "St_atus & Text"), GIMP_TAB_STYLE_PREVIEW_NAME)
|
||||
};
|
||||
|
||||
#undef VIEW_SIZE
|
||||
#undef TAB_STYLE
|
||||
|
||||
|
||||
static const GimpToggleActionEntry dockable_toggle_actions[] =
|
||||
{
|
||||
{ "dockable-lock-tab", NULL,
|
||||
NC_("dockable-action", "Loc_k Tab to Dock"), NULL, { NULL },
|
||||
NC_("dockable-action",
|
||||
"Protect this tab from being dragged with the mouse pointer"),
|
||||
dockable_lock_tab_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_DOCK_TAB_LOCK },
|
||||
|
||||
{ "dockable-show-button-bar", NULL,
|
||||
NC_("dockable-action", "Show _Button Bar"), NULL, { NULL }, NULL,
|
||||
dockable_show_button_bar_cmd_callback,
|
||||
TRUE,
|
||||
GIMP_HELP_DOCK_SHOW_BUTTON_BAR }
|
||||
};
|
||||
|
||||
static const GimpRadioActionEntry dockable_view_type_actions[] =
|
||||
{
|
||||
{ "dockable-view-type-list", NULL,
|
||||
NC_("dockable-action", "View as _List"), NULL, { NULL }, NULL,
|
||||
GIMP_VIEW_TYPE_LIST,
|
||||
GIMP_HELP_DOCK_VIEW_AS_LIST },
|
||||
|
||||
{ "dockable-view-type-grid", NULL,
|
||||
NC_("dockable-action", "View as _Grid"), NULL, { NULL }, NULL,
|
||||
GIMP_VIEW_TYPE_GRID,
|
||||
GIMP_HELP_DOCK_VIEW_AS_GRID }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
dockable_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "dockable-action",
|
||||
dockable_actions,
|
||||
G_N_ELEMENTS (dockable_actions));
|
||||
|
||||
gimp_action_group_add_toggle_actions (group, "dockable-action",
|
||||
dockable_toggle_actions,
|
||||
G_N_ELEMENTS (dockable_toggle_actions));
|
||||
|
||||
gimp_action_group_add_string_actions (group, "dialogs-action",
|
||||
dialogs_dockable_actions,
|
||||
n_dialogs_dockable_actions,
|
||||
dockable_add_tab_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "preview-size",
|
||||
dockable_view_size_actions,
|
||||
G_N_ELEMENTS (dockable_view_size_actions),
|
||||
NULL,
|
||||
GIMP_VIEW_SIZE_MEDIUM,
|
||||
dockable_view_size_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "tab-style",
|
||||
dockable_tab_style_actions,
|
||||
G_N_ELEMENTS (dockable_tab_style_actions),
|
||||
NULL,
|
||||
GIMP_TAB_STYLE_PREVIEW,
|
||||
dockable_tab_style_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "dockable-action",
|
||||
dockable_view_type_actions,
|
||||
G_N_ELEMENTS (dockable_view_type_actions),
|
||||
NULL,
|
||||
GIMP_VIEW_TYPE_LIST,
|
||||
dockable_toggle_view_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
dockable_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockable *dockable;
|
||||
GimpDockbook *dockbook;
|
||||
GimpDocked *docked;
|
||||
GimpDock *dock;
|
||||
GimpDialogFactoryEntry *entry;
|
||||
GimpContainerView *view;
|
||||
GimpViewType view_type = -1;
|
||||
gboolean list_view_available = FALSE;
|
||||
gboolean grid_view_available = FALSE;
|
||||
gboolean locked = FALSE;
|
||||
GimpViewSize view_size = -1;
|
||||
GimpTabStyle tab_style = -1;
|
||||
gint n_pages = 0;
|
||||
gint n_books = 0;
|
||||
GimpDockedInterface *docked_iface = NULL;
|
||||
|
||||
if (GIMP_IS_DOCKBOOK (data))
|
||||
{
|
||||
gint page_num;
|
||||
|
||||
dockbook = GIMP_DOCKBOOK (data);
|
||||
|
||||
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (dockbook));
|
||||
|
||||
dockable = (GimpDockable *)
|
||||
gtk_notebook_get_nth_page (GTK_NOTEBOOK (dockbook), page_num);
|
||||
}
|
||||
else if (GIMP_IS_DOCKABLE (data))
|
||||
{
|
||||
dockable = GIMP_DOCKABLE (data);
|
||||
dockbook = gimp_dockable_get_dockbook (dockable);
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
docked = GIMP_DOCKED (gtk_bin_get_child (GTK_BIN (dockable)));
|
||||
dock = gimp_dockbook_get_dock (dockbook);
|
||||
|
||||
|
||||
gimp_dialog_factory_from_widget (GTK_WIDGET (dockable), &entry);
|
||||
|
||||
if (entry)
|
||||
{
|
||||
gchar *identifier;
|
||||
gchar *substring = NULL;
|
||||
|
||||
identifier = g_strdup (entry->identifier);
|
||||
|
||||
if ((substring = strstr (identifier, "grid")))
|
||||
view_type = GIMP_VIEW_TYPE_GRID;
|
||||
else if ((substring = strstr (identifier, "list")))
|
||||
view_type = GIMP_VIEW_TYPE_LIST;
|
||||
|
||||
if (substring)
|
||||
{
|
||||
memcpy (substring, "list", 4);
|
||||
if (gimp_dialog_factory_find_entry (gimp_dock_get_dialog_factory (dock),
|
||||
identifier))
|
||||
list_view_available = TRUE;
|
||||
|
||||
memcpy (substring, "grid", 4);
|
||||
if (gimp_dialog_factory_find_entry (gimp_dock_get_dialog_factory (dock),
|
||||
identifier))
|
||||
grid_view_available = TRUE;
|
||||
}
|
||||
|
||||
g_free (identifier);
|
||||
}
|
||||
|
||||
view = gimp_container_view_get_by_dockable (dockable);
|
||||
|
||||
if (view)
|
||||
view_size = gimp_container_view_get_view_size (view, NULL);
|
||||
|
||||
tab_style = gimp_dockable_get_tab_style (dockable);
|
||||
|
||||
n_pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (dockbook));
|
||||
n_books = g_list_length (gimp_dock_get_dockbooks (dock));
|
||||
|
||||
#define SET_ACTIVE(action,active) \
|
||||
gimp_action_group_set_action_active (group, action, (active) != 0)
|
||||
#define SET_VISIBLE(action,active) \
|
||||
gimp_action_group_set_action_visible (group, action, (active) != 0)
|
||||
#define SET_SENSITIVE(action,sensitive) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (sensitive) != 0, NULL)
|
||||
|
||||
|
||||
locked = gimp_dockable_get_locked (dockable);
|
||||
|
||||
SET_SENSITIVE ("dockable-detach-tab", (! locked &&
|
||||
(n_pages > 1 || n_books > 1)));
|
||||
|
||||
SET_ACTIVE ("dockable-lock-tab", locked);
|
||||
|
||||
/* Submenus become invisible if all options inside them are hidden. */
|
||||
SET_VISIBLE ("dockable-preview-size-gigantic", view_size != -1);
|
||||
SET_VISIBLE ("dockable-preview-size-enormous", view_size != -1);
|
||||
SET_VISIBLE ("dockable-preview-size-huge", view_size != -1);
|
||||
SET_VISIBLE ("dockable-preview-size-extra-large", view_size != -1);
|
||||
SET_VISIBLE ("dockable-preview-size-large", view_size != -1);
|
||||
SET_VISIBLE ("dockable-preview-size-medium", view_size != -1);
|
||||
SET_VISIBLE ("dockable-preview-size-small", view_size != -1);
|
||||
SET_VISIBLE ("dockable-preview-size-extra-small", view_size != -1);
|
||||
SET_VISIBLE ("dockable-preview-size-tiny", view_size != -1);
|
||||
|
||||
if (view_size != -1)
|
||||
{
|
||||
if (view_size >= GIMP_VIEW_SIZE_GIGANTIC)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-gigantic", TRUE);
|
||||
}
|
||||
else if (view_size >= GIMP_VIEW_SIZE_ENORMOUS)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-enormous", TRUE);
|
||||
}
|
||||
else if (view_size >= GIMP_VIEW_SIZE_HUGE)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-huge", TRUE);
|
||||
}
|
||||
else if (view_size >= GIMP_VIEW_SIZE_EXTRA_LARGE)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-extra-large", TRUE);
|
||||
}
|
||||
else if (view_size >= GIMP_VIEW_SIZE_LARGE)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-large", TRUE);
|
||||
}
|
||||
else if (view_size >= GIMP_VIEW_SIZE_MEDIUM)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-medium", TRUE);
|
||||
}
|
||||
else if (view_size >= GIMP_VIEW_SIZE_SMALL)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-small", TRUE);
|
||||
}
|
||||
else if (view_size >= GIMP_VIEW_SIZE_EXTRA_SMALL)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-extra-small", TRUE);
|
||||
}
|
||||
else if (view_size >= GIMP_VIEW_SIZE_TINY)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-tiny", TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
if (tab_style == GIMP_TAB_STYLE_ICON)
|
||||
SET_ACTIVE ("dockable-tab-style-icon", TRUE);
|
||||
else if (tab_style == GIMP_TAB_STYLE_PREVIEW)
|
||||
SET_ACTIVE ("dockable-tab-style-preview", TRUE);
|
||||
else if (tab_style == GIMP_TAB_STYLE_NAME)
|
||||
SET_ACTIVE ("dockable-tab-style-name", TRUE);
|
||||
else if (tab_style == GIMP_TAB_STYLE_ICON_NAME)
|
||||
SET_ACTIVE ("dockable-tab-style-icon-name", TRUE);
|
||||
else if (tab_style == GIMP_TAB_STYLE_PREVIEW_NAME)
|
||||
SET_ACTIVE ("dockable-tab-style-preview-name", TRUE);
|
||||
|
||||
docked_iface = GIMP_DOCKED_GET_IFACE (docked);
|
||||
SET_SENSITIVE ("dockable-tab-style-preview",
|
||||
docked_iface->get_preview);
|
||||
SET_SENSITIVE ("dockable-tab-style-preview-name",
|
||||
docked_iface->get_preview);
|
||||
|
||||
SET_VISIBLE ("dockable-view-type-grid", view_type != -1);
|
||||
SET_VISIBLE ("dockable-view-type-list", view_type != -1);
|
||||
|
||||
if (view_type != -1)
|
||||
{
|
||||
if (view_type == GIMP_VIEW_TYPE_LIST)
|
||||
SET_ACTIVE ("dockable-view-type-list", TRUE);
|
||||
else
|
||||
SET_ACTIVE ("dockable-view-type-grid", TRUE);
|
||||
|
||||
SET_SENSITIVE ("dockable-view-type-grid", grid_view_available);
|
||||
SET_SENSITIVE ("dockable-view-type-list", list_view_available);
|
||||
}
|
||||
|
||||
SET_VISIBLE ("dockable-show-button-bar", gimp_docked_has_button_bar (docked));
|
||||
SET_ACTIVE ("dockable-show-button-bar",
|
||||
gimp_docked_get_show_button_bar (docked));
|
||||
|
||||
#undef SET_ACTIVE
|
||||
#undef SET_VISIBLE
|
||||
#undef SET_SENSITIVE
|
||||
}
|
27
app/actions/dockable-actions.h
Normal file
27
app/actions/dockable-actions.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* 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
|
||||
* 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 __DOCKABLE_ACTIONS_H__
|
||||
#define __DOCKABLE_ACTIONS_H__
|
||||
|
||||
|
||||
void dockable_actions_setup (GimpActionGroup *group);
|
||||
void dockable_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DOCKABLE_ACTIONS_H__ */
|
293
app/actions/dockable-commands.c
Normal file
293
app/actions/dockable-commands.c
Normal file
|
@ -0,0 +1,293 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimpcontainerview-utils.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpdock.h"
|
||||
#include "widgets/gimpdockable.h"
|
||||
#include "widgets/gimpdockbook.h"
|
||||
#include "widgets/gimpdocked.h"
|
||||
#include "widgets/gimpsessioninfo.h"
|
||||
|
||||
#include "dockable-commands.h"
|
||||
|
||||
|
||||
static GimpDockable * dockable_get_current (GimpDockbook *dockbook);
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
dockable_add_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
|
||||
gimp_dockbook_add_from_dialog_factory (dockbook,
|
||||
g_variant_get_string (value, NULL));
|
||||
}
|
||||
|
||||
void
|
||||
dockable_close_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
|
||||
if (dockable)
|
||||
gtk_container_remove (GTK_CONTAINER (dockbook),
|
||||
GTK_WIDGET (dockable));
|
||||
}
|
||||
|
||||
void
|
||||
dockable_detach_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
|
||||
if (dockable)
|
||||
gimp_dockable_detach (dockable);
|
||||
}
|
||||
|
||||
void
|
||||
dockable_lock_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
|
||||
if (dockable)
|
||||
{
|
||||
gboolean lock = g_variant_get_boolean (value);
|
||||
|
||||
gimp_dockable_set_locked (dockable, lock);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dockable_toggle_view_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable;
|
||||
GimpViewType view_type;
|
||||
gint page_num;
|
||||
|
||||
view_type = (GimpViewType) g_variant_get_int32 (value);
|
||||
|
||||
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (dockbook));
|
||||
|
||||
dockable = (GimpDockable *)
|
||||
gtk_notebook_get_nth_page (GTK_NOTEBOOK (dockbook), page_num);
|
||||
|
||||
if (dockable)
|
||||
{
|
||||
GimpDialogFactoryEntry *entry;
|
||||
|
||||
gimp_dialog_factory_from_widget (GTK_WIDGET (dockable), &entry);
|
||||
|
||||
if (entry)
|
||||
{
|
||||
gchar *identifier;
|
||||
gchar *substring = NULL;
|
||||
|
||||
identifier = g_strdup (entry->identifier);
|
||||
|
||||
substring = strstr (identifier, "grid");
|
||||
|
||||
if (substring && view_type == GIMP_VIEW_TYPE_GRID)
|
||||
{
|
||||
g_free (identifier);
|
||||
return;
|
||||
}
|
||||
|
||||
if (! substring)
|
||||
{
|
||||
substring = strstr (identifier, "list");
|
||||
|
||||
if (substring && view_type == GIMP_VIEW_TYPE_LIST)
|
||||
{
|
||||
g_free (identifier);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (substring)
|
||||
{
|
||||
GimpContainerView *old_view;
|
||||
GtkWidget *new_dockable;
|
||||
GimpDock *dock;
|
||||
gint view_size = -1;
|
||||
|
||||
if (view_type == GIMP_VIEW_TYPE_LIST)
|
||||
memcpy (substring, "list", 4);
|
||||
else if (view_type == GIMP_VIEW_TYPE_GRID)
|
||||
memcpy (substring, "grid", 4);
|
||||
|
||||
old_view = gimp_container_view_get_by_dockable (dockable);
|
||||
|
||||
if (old_view)
|
||||
view_size = gimp_container_view_get_view_size (old_view, NULL);
|
||||
|
||||
dock = gimp_dockbook_get_dock (dockbook);
|
||||
new_dockable = gimp_dialog_factory_dockable_new (gimp_dock_get_dialog_factory (dock),
|
||||
dock,
|
||||
identifier,
|
||||
view_size);
|
||||
|
||||
if (new_dockable)
|
||||
{
|
||||
GimpDocked *old;
|
||||
GimpDocked *new;
|
||||
gboolean show;
|
||||
|
||||
gimp_dockable_set_locked (GIMP_DOCKABLE (new_dockable),
|
||||
gimp_dockable_get_locked (dockable));
|
||||
|
||||
old = GIMP_DOCKED (gtk_bin_get_child (GTK_BIN (dockable)));
|
||||
new = GIMP_DOCKED (gtk_bin_get_child (GTK_BIN (new_dockable)));
|
||||
|
||||
show = gimp_docked_get_show_button_bar (old);
|
||||
gimp_docked_set_show_button_bar (new, show);
|
||||
|
||||
/* Maybe gimp_dialog_factory_dockable_new() returned
|
||||
* an already existing singleton dockable, so check
|
||||
* if it already is attached to a dockbook.
|
||||
*/
|
||||
if (! gimp_dockable_get_dockbook (GIMP_DOCKABLE (new_dockable)))
|
||||
{
|
||||
gtk_notebook_insert_page (GTK_NOTEBOOK (dockbook),
|
||||
new_dockable, NULL,
|
||||
page_num);
|
||||
gtk_widget_show (new_dockable);
|
||||
|
||||
gtk_container_remove (GTK_CONTAINER (dockbook),
|
||||
GTK_WIDGET (dockable));
|
||||
|
||||
gtk_notebook_set_current_page (GTK_NOTEBOOK (dockbook),
|
||||
page_num);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_free (identifier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dockable_view_size_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
gint view_size;
|
||||
|
||||
view_size = g_variant_get_int32 (value);
|
||||
|
||||
if (dockable)
|
||||
{
|
||||
GimpContainerView *view = gimp_container_view_get_by_dockable (dockable);
|
||||
|
||||
if (view)
|
||||
{
|
||||
gint old_size;
|
||||
gint border_width;
|
||||
|
||||
old_size = gimp_container_view_get_view_size (view, &border_width);
|
||||
|
||||
if (old_size != view_size)
|
||||
gimp_container_view_set_view_size (view, view_size, border_width);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dockable_tab_style_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
GimpTabStyle tab_style;
|
||||
|
||||
tab_style = (GimpTabStyle) g_variant_get_int32 (value);
|
||||
|
||||
if (dockable && gimp_dockable_get_tab_style (dockable) != tab_style)
|
||||
{
|
||||
GtkWidget *tab_widget;
|
||||
|
||||
gimp_dockable_set_tab_style (dockable, tab_style);
|
||||
|
||||
tab_widget = gimp_dockbook_create_tab_widget (dockbook, dockable);
|
||||
|
||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (dockbook),
|
||||
GTK_WIDGET (dockable),
|
||||
tab_widget);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dockable_show_button_bar_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
|
||||
if (dockable)
|
||||
{
|
||||
GimpDocked *docked;
|
||||
gboolean show;
|
||||
|
||||
docked = GIMP_DOCKED (gtk_bin_get_child (GTK_BIN (dockable)));
|
||||
show = g_variant_get_boolean (value);
|
||||
|
||||
gimp_docked_set_show_button_bar (docked, show);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static GimpDockable *
|
||||
dockable_get_current (GimpDockbook *dockbook)
|
||||
{
|
||||
gint page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (dockbook));
|
||||
|
||||
return (GimpDockable *) gtk_notebook_get_nth_page (GTK_NOTEBOOK (dockbook),
|
||||
page_num);
|
||||
}
|
49
app/actions/dockable-commands.h
Normal file
49
app/actions/dockable-commands.h
Normal file
|
@ -0,0 +1,49 @@
|
|||
/* 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
|
||||
* 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 __DOCKABLE_COMMANDS_H__
|
||||
#define __DOCKABLE_COMMANDS_H__
|
||||
|
||||
|
||||
void dockable_add_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dockable_close_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dockable_detach_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dockable_lock_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void dockable_toggle_view_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dockable_view_size_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dockable_tab_style_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dockable_show_button_bar_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DOCKABLE_COMMANDS_H__ */
|
139
app/actions/documents-actions.c
Normal file
139
app/actions/documents-actions.c
Normal file
|
@ -0,0 +1,139 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimpcontext.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "documents-actions.h"
|
||||
#include "documents-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry documents_actions[] =
|
||||
{
|
||||
{ "documents-open", GIMP_ICON_DOCUMENT_OPEN,
|
||||
NC_("documents-action", "_Open Image"), NULL, { NULL },
|
||||
NC_("documents-action", "Open the selected entry"),
|
||||
documents_open_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_OPEN },
|
||||
|
||||
{ "documents-raise-or-open", NULL,
|
||||
NC_("documents-action", "_Raise or Open Image"), NULL, { NULL },
|
||||
NC_("documents-action", "Raise window if already open"),
|
||||
documents_raise_or_open_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_OPEN },
|
||||
|
||||
{ "documents-file-open-dialog", NULL,
|
||||
NC_("documents-action", "File Open _Dialog"), NULL, { NULL },
|
||||
NC_("documents-action", "Open image dialog"),
|
||||
documents_file_open_dialog_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_OPEN },
|
||||
|
||||
{ "documents-copy-location", GIMP_ICON_EDIT_COPY,
|
||||
NC_("documents-action", "Copy Image _Location"), NULL, { NULL },
|
||||
NC_("documents-action", "Copy image location to clipboard"),
|
||||
documents_copy_location_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_COPY_LOCATION },
|
||||
|
||||
{ "documents-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
|
||||
NC_("documents-action", "Show in _File Manager"), NULL, { NULL },
|
||||
NC_("documents-action", "Show image location in the file manager"),
|
||||
documents_show_in_file_manager_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_SHOW_IN_FILE_MANAGER },
|
||||
|
||||
{ "documents-remove", GIMP_ICON_LIST_REMOVE,
|
||||
NC_("documents-action", "Remove _Entry"), NULL, { NULL },
|
||||
NC_("documents-action", "Remove the selected entry"),
|
||||
documents_remove_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_REMOVE },
|
||||
|
||||
{ "documents-clear", GIMP_ICON_SHRED,
|
||||
NC_("documents-action", "_Clear History"), NULL, { NULL },
|
||||
NC_("documents-action", "Clear the entire document history"),
|
||||
documents_clear_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_CLEAR },
|
||||
|
||||
{ "documents-recreate-preview", GIMP_ICON_VIEW_REFRESH,
|
||||
NC_("documents-action", "Recreate _Preview"), NULL, { NULL },
|
||||
NC_("documents-action", "Recreate preview"),
|
||||
documents_recreate_preview_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_REFRESH },
|
||||
|
||||
{ "documents-reload-previews", NULL,
|
||||
NC_("documents-action", "Reload _all Previews"), NULL, { NULL },
|
||||
NC_("documents-action", "Reload all previews"),
|
||||
documents_reload_previews_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_REFRESH },
|
||||
|
||||
{ "documents-remove-dangling", NULL,
|
||||
NC_("documents-action", "Remove Dangling E_ntries"), NULL, { NULL },
|
||||
NC_("documents-action",
|
||||
"Remove entries for which the corresponding file is not available"),
|
||||
documents_remove_dangling_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_REFRESH }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
documents_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "documents-action",
|
||||
documents_actions,
|
||||
G_N_ELEMENTS (documents_actions));
|
||||
}
|
||||
|
||||
void
|
||||
documents_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpImagefile *imagefile = NULL;
|
||||
|
||||
context = action_data_get_context (data);
|
||||
|
||||
if (context)
|
||||
imagefile = gimp_context_get_imagefile (context);
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
|
||||
|
||||
SET_SENSITIVE ("documents-open", imagefile);
|
||||
SET_SENSITIVE ("documents-raise-or-open", imagefile);
|
||||
SET_SENSITIVE ("documents-file-open-dialog", TRUE);
|
||||
SET_SENSITIVE ("documents-copy-location", imagefile);
|
||||
SET_SENSITIVE ("documents-show-in-file-manager", imagefile);
|
||||
SET_SENSITIVE ("documents-remove", imagefile);
|
||||
SET_SENSITIVE ("documents-clear", TRUE);
|
||||
SET_SENSITIVE ("documents-recreate-preview", imagefile);
|
||||
SET_SENSITIVE ("documents-reload-previews", imagefile);
|
||||
SET_SENSITIVE ("documents-remove-dangling", imagefile);
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
}
|
27
app/actions/documents-actions.h
Normal file
27
app/actions/documents-actions.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* 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
|
||||
* 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 __DOCUMENTS_ACTIONS_H__
|
||||
#define __DOCUMENTS_ACTIONS_H__
|
||||
|
||||
|
||||
void documents_actions_setup (GimpActionGroup *group);
|
||||
void documents_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DOCUMENTS_ACTIONS_H__ */
|
423
app/actions/documents-commands.c
Normal file
423
app/actions/documents-commands.c
Normal file
|
@ -0,0 +1,423 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpthumb/gimpthumb.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "config/gimpcoreconfig.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontainer.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimagefile.h"
|
||||
#include "core/gimpimage.h"
|
||||
|
||||
#include "file/file-open.h"
|
||||
|
||||
#include "widgets/gimpclipboard.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimpcontainerview-utils.h"
|
||||
#include "widgets/gimpdocumentview.h"
|
||||
#include "widgets/gimpmessagebox.h"
|
||||
#include "widgets/gimpmessagedialog.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplay-foreach.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
|
||||
#include "documents-commands.h"
|
||||
#include "file-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const gchar *name;
|
||||
gboolean found;
|
||||
} RaiseClosure;
|
||||
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
static void documents_open_image (GtkWidget *editor,
|
||||
GimpContext *context,
|
||||
GimpImagefile *imagefile);
|
||||
static void documents_raise_display (GimpDisplay *display,
|
||||
RaiseClosure *closure);
|
||||
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
documents_open_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
GimpContainer *container;
|
||||
GimpImagefile *imagefile;
|
||||
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
container = gimp_container_view_get_container (editor->view);
|
||||
|
||||
imagefile = gimp_context_get_imagefile (context);
|
||||
|
||||
if (imagefile && gimp_container_have (container, GIMP_OBJECT (imagefile)))
|
||||
{
|
||||
documents_open_image (GTK_WIDGET (editor), context, imagefile);
|
||||
}
|
||||
else
|
||||
{
|
||||
file_file_open_dialog (context->gimp, NULL, GTK_WIDGET (editor));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
documents_raise_or_open_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
GimpContainer *container;
|
||||
GimpImagefile *imagefile;
|
||||
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
container = gimp_container_view_get_container (editor->view);
|
||||
|
||||
imagefile = gimp_context_get_imagefile (context);
|
||||
|
||||
if (imagefile && gimp_container_have (container, GIMP_OBJECT (imagefile)))
|
||||
{
|
||||
RaiseClosure closure;
|
||||
|
||||
closure.name = gimp_object_get_name (imagefile);
|
||||
closure.found = FALSE;
|
||||
|
||||
gimp_container_foreach (GIMP_CONTAINER (context->gimp->displays),
|
||||
(GFunc) documents_raise_display,
|
||||
&closure);
|
||||
|
||||
if (! closure.found)
|
||||
documents_open_image (GTK_WIDGET (editor), context, imagefile);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
documents_file_open_dialog_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
GimpContainer *container;
|
||||
GimpImagefile *imagefile;
|
||||
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
container = gimp_container_view_get_container (editor->view);
|
||||
|
||||
imagefile = gimp_context_get_imagefile (context);
|
||||
|
||||
if (imagefile && gimp_container_have (container, GIMP_OBJECT (imagefile)))
|
||||
{
|
||||
file_file_open_dialog (context->gimp,
|
||||
gimp_imagefile_get_file (imagefile),
|
||||
GTK_WIDGET (editor));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
documents_copy_location_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
GimpImagefile *imagefile;
|
||||
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
imagefile = gimp_context_get_imagefile (context);
|
||||
|
||||
if (imagefile)
|
||||
gimp_clipboard_set_text (context->gimp,
|
||||
gimp_object_get_name (imagefile));
|
||||
}
|
||||
|
||||
void
|
||||
documents_show_in_file_manager_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
GimpImagefile *imagefile;
|
||||
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
imagefile = gimp_context_get_imagefile (context);
|
||||
|
||||
if (imagefile)
|
||||
{
|
||||
GFile *file = g_file_new_for_uri (gimp_object_get_name (imagefile));
|
||||
GError *error = NULL;
|
||||
|
||||
if (! gimp_file_show_in_file_manager (file, &error))
|
||||
{
|
||||
gimp_message (context->gimp, G_OBJECT (editor),
|
||||
GIMP_MESSAGE_ERROR,
|
||||
_("Can't show file in file manager: %s"),
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
|
||||
g_object_unref (file);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
documents_remove_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context = gimp_container_view_get_context (editor->view);
|
||||
GimpImagefile *imagefile = gimp_context_get_imagefile (context);
|
||||
const gchar *uri;
|
||||
|
||||
uri = gimp_object_get_name (imagefile);
|
||||
|
||||
gtk_recent_manager_remove_item (gtk_recent_manager_get_default (), uri, NULL);
|
||||
|
||||
gimp_container_view_remove_active (editor->view);
|
||||
}
|
||||
|
||||
void
|
||||
documents_clear_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context = gimp_container_view_get_context (editor->view);
|
||||
Gimp *gimp = context->gimp;
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gimp_message_dialog_new (_("Clear Document History"),
|
||||
GIMP_ICON_SHRED,
|
||||
GTK_WIDGET (editor),
|
||||
GTK_DIALOG_MODAL |
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
gimp_standard_help_func, NULL,
|
||||
|
||||
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
||||
_("Cl_ear"), GTK_RESPONSE_OK,
|
||||
|
||||
NULL);
|
||||
|
||||
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
g_signal_connect_object (gtk_widget_get_toplevel (GTK_WIDGET (editor)),
|
||||
"unmap",
|
||||
G_CALLBACK (gtk_widget_destroy),
|
||||
dialog, G_CONNECT_SWAPPED);
|
||||
|
||||
gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (dialog)->box,
|
||||
_("Clear the Recent Documents list?"));
|
||||
|
||||
gimp_message_box_set_text (GIMP_MESSAGE_DIALOG (dialog)->box,
|
||||
_("Clearing the document history will "
|
||||
"permanently remove all images from "
|
||||
"the recent documents list."));
|
||||
|
||||
if (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK)
|
||||
{
|
||||
GtkRecentManager *manager = gtk_recent_manager_get_default ();
|
||||
GList *items;
|
||||
GList *list;
|
||||
|
||||
items = gtk_recent_manager_get_items (manager);
|
||||
|
||||
for (list = items; list; list = list->next)
|
||||
{
|
||||
GtkRecentInfo *info = list->data;
|
||||
|
||||
if (gtk_recent_info_has_application (info,
|
||||
"GNU Image Manipulation Program"))
|
||||
{
|
||||
gtk_recent_manager_remove_item (manager,
|
||||
gtk_recent_info_get_uri (info),
|
||||
NULL);
|
||||
}
|
||||
|
||||
gtk_recent_info_unref (info);
|
||||
}
|
||||
|
||||
g_list_free (items);
|
||||
|
||||
gimp_container_clear (gimp->documents);
|
||||
}
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
void
|
||||
documents_recreate_preview_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
GimpContainer *container;
|
||||
GimpImagefile *imagefile;
|
||||
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
container = gimp_container_view_get_container (editor->view);
|
||||
|
||||
imagefile = gimp_context_get_imagefile (context);
|
||||
|
||||
if (imagefile && gimp_container_have (container, GIMP_OBJECT (imagefile)))
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
if (! gimp_imagefile_create_thumbnail (imagefile,
|
||||
context, NULL,
|
||||
context->gimp->config->thumbnail_size,
|
||||
FALSE, &error))
|
||||
{
|
||||
gimp_message_literal (context->gimp,
|
||||
NULL , GIMP_MESSAGE_ERROR,
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
documents_reload_previews_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContainer *container;
|
||||
|
||||
container = gimp_container_view_get_container (editor->view);
|
||||
|
||||
gimp_container_foreach (container,
|
||||
(GFunc) gimp_imagefile_update,
|
||||
editor->view);
|
||||
}
|
||||
|
||||
static void
|
||||
documents_remove_dangling_foreach (GimpImagefile *imagefile,
|
||||
GimpContainer *container)
|
||||
{
|
||||
GimpThumbnail *thumbnail = gimp_imagefile_get_thumbnail (imagefile);
|
||||
|
||||
if (gimp_thumbnail_peek_image (thumbnail) == GIMP_THUMB_STATE_NOT_FOUND)
|
||||
{
|
||||
const gchar *uri = gimp_object_get_name (imagefile);
|
||||
|
||||
gtk_recent_manager_remove_item (gtk_recent_manager_get_default (), uri,
|
||||
NULL);
|
||||
|
||||
gimp_container_remove (container, GIMP_OBJECT (imagefile));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
documents_remove_dangling_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContainer *container;
|
||||
|
||||
container = gimp_container_view_get_container (editor->view);
|
||||
|
||||
gimp_container_foreach (container,
|
||||
(GFunc) documents_remove_dangling_foreach,
|
||||
container);
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static void
|
||||
documents_open_image (GtkWidget *editor,
|
||||
GimpContext *context,
|
||||
GimpImagefile *imagefile)
|
||||
{
|
||||
GFile *file;
|
||||
GimpImage *image;
|
||||
GimpPDBStatusType status;
|
||||
GError *error = NULL;
|
||||
|
||||
file = gimp_imagefile_get_file (imagefile);
|
||||
|
||||
image = file_open_with_display (context->gimp, context, NULL, file, FALSE,
|
||||
G_OBJECT (gimp_widget_get_monitor (editor)),
|
||||
&status, &error);
|
||||
|
||||
if (! image && status != GIMP_PDB_CANCEL)
|
||||
{
|
||||
gimp_message (context->gimp, G_OBJECT (editor), GIMP_MESSAGE_ERROR,
|
||||
_("Opening '%s' failed:\n\n%s"),
|
||||
gimp_file_get_utf8_name (file), error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
documents_raise_display (GimpDisplay *display,
|
||||
RaiseClosure *closure)
|
||||
{
|
||||
GimpImage *image;
|
||||
GFile *file;
|
||||
gchar *uri = NULL;
|
||||
|
||||
image = gimp_display_get_image (display);
|
||||
|
||||
file = gimp_image_get_file (image);
|
||||
if (! file)
|
||||
file = gimp_image_get_imported_file (image);
|
||||
|
||||
if (file)
|
||||
uri = g_file_get_uri (file);
|
||||
|
||||
if (! g_strcmp0 (closure->name, uri))
|
||||
{
|
||||
closure->found = TRUE;
|
||||
gimp_display_shell_present (gimp_display_get_shell (display));
|
||||
}
|
||||
|
||||
g_free (uri);
|
||||
}
|
54
app/actions/documents-commands.h
Normal file
54
app/actions/documents-commands.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
/* 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
|
||||
* 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 __DOCUMENTS_COMMANDS_H__
|
||||
#define __DOCUMENTS_COMMANDS_H__
|
||||
|
||||
|
||||
void documents_open_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_raise_or_open_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_file_open_dialog_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_copy_location_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_show_in_file_manager_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_remove_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_clear_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_recreate_preview_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_reload_previews_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_remove_dangling_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DOCUMENTS_COMMANDS_H__ */
|
245
app/actions/drawable-actions.c
Normal file
245
app/actions/drawable-actions.c
Normal file
|
@ -0,0 +1,245 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimplayermask.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "drawable-actions.h"
|
||||
#include "drawable-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry drawable_actions[] =
|
||||
{
|
||||
{ "drawable-equalize", NULL,
|
||||
NC_("drawable-action", "_Equalize"), NULL, { NULL },
|
||||
NC_("drawable-action", "Automatic contrast enhancement"),
|
||||
drawable_equalize_cmd_callback,
|
||||
GIMP_HELP_LAYER_EQUALIZE },
|
||||
|
||||
{ "drawable-levels-stretch", NULL,
|
||||
NC_("drawable-action", "_White Balance"), NULL, { NULL },
|
||||
NC_("drawable-action", "Automatic white balance correction"),
|
||||
drawable_levels_stretch_cmd_callback,
|
||||
GIMP_HELP_LAYER_WHITE_BALANCE }
|
||||
};
|
||||
|
||||
static const GimpToggleActionEntry drawable_toggle_actions[] =
|
||||
{
|
||||
{ "drawable-visible", GIMP_ICON_VISIBLE,
|
||||
NC_("drawable-action", "Toggle Drawables _Visibility"), NULL, { NULL }, NULL,
|
||||
drawable_visible_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_VISIBLE },
|
||||
|
||||
{ "drawable-lock-content", GIMP_ICON_LOCK_CONTENT,
|
||||
NC_("drawable-action", "L_ock Pixels of Drawables"), NULL, { NULL },
|
||||
NC_("drawable-action",
|
||||
"Keep the pixels on selected drawables from being modified"),
|
||||
drawable_lock_content_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_LOCK_PIXELS },
|
||||
|
||||
{ "drawable-lock-position", GIMP_ICON_LOCK_POSITION,
|
||||
NC_("drawable-action", "L_ock Position of Drawables"), NULL, { NULL },
|
||||
NC_("drawable-action",
|
||||
"Keep the position on selected drawables from being modified"),
|
||||
drawable_lock_position_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_LOCK_POSITION },
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry drawable_flip_actions[] =
|
||||
{
|
||||
{ "drawable-flip-horizontal", GIMP_ICON_OBJECT_FLIP_HORIZONTAL,
|
||||
NC_("drawable-action", "Flip _Horizontally"), NULL, { NULL },
|
||||
NC_("drawable-action", "Flip drawable horizontally"),
|
||||
GIMP_ORIENTATION_HORIZONTAL, FALSE,
|
||||
GIMP_HELP_LAYER_FLIP_HORIZONTAL },
|
||||
|
||||
{ "drawable-flip-vertical", GIMP_ICON_OBJECT_FLIP_VERTICAL,
|
||||
NC_("drawable-action", "Flip _Vertically"), NULL, { NULL },
|
||||
NC_("drawable-action", "Flip drawable vertically"),
|
||||
GIMP_ORIENTATION_VERTICAL, FALSE,
|
||||
GIMP_HELP_LAYER_FLIP_VERTICAL }
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry drawable_rotate_actions[] =
|
||||
{
|
||||
{ "drawable-rotate-90", GIMP_ICON_OBJECT_ROTATE_90,
|
||||
NC_("drawable-action", "Rotate 90° _clockwise"), NULL, { NULL },
|
||||
NC_("drawable-action", "Rotate drawable 90 degrees to the right"),
|
||||
GIMP_ROTATE_DEGREES90, FALSE,
|
||||
GIMP_HELP_LAYER_ROTATE_90 },
|
||||
|
||||
{ "drawable-rotate-180", GIMP_ICON_OBJECT_ROTATE_180,
|
||||
NC_("drawable-action", "Rotate _180°"), NULL, { NULL },
|
||||
NC_("drawable-action", "Turn drawable upside-down"),
|
||||
GIMP_ROTATE_DEGREES180, FALSE,
|
||||
GIMP_HELP_LAYER_ROTATE_180 },
|
||||
|
||||
{ "drawable-rotate-270", GIMP_ICON_OBJECT_ROTATE_270,
|
||||
NC_("drawable-action", "Rotate 90° counter-clock_wise"), NULL, { NULL },
|
||||
NC_("drawable-action", "Rotate drawable 90 degrees to the left"),
|
||||
GIMP_ROTATE_DEGREES270, FALSE,
|
||||
GIMP_HELP_LAYER_ROTATE_270 }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
drawable_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "drawable-action",
|
||||
drawable_actions,
|
||||
G_N_ELEMENTS (drawable_actions));
|
||||
|
||||
gimp_action_group_add_toggle_actions (group, "drawable-action",
|
||||
drawable_toggle_actions,
|
||||
G_N_ELEMENTS (drawable_toggle_actions));
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "drawable-action",
|
||||
drawable_flip_actions,
|
||||
G_N_ELEMENTS (drawable_flip_actions),
|
||||
drawable_flip_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "drawable-action",
|
||||
drawable_rotate_actions,
|
||||
G_N_ELEMENTS (drawable_rotate_actions),
|
||||
drawable_rotate_cmd_callback);
|
||||
|
||||
#define SET_ALWAYS_SHOW_IMAGE(action,show) \
|
||||
gimp_action_group_set_action_always_show_image (group, action, show)
|
||||
|
||||
SET_ALWAYS_SHOW_IMAGE ("drawable-rotate-90", TRUE);
|
||||
SET_ALWAYS_SHOW_IMAGE ("drawable-rotate-180", TRUE);
|
||||
SET_ALWAYS_SHOW_IMAGE ("drawable-rotate-270", TRUE);
|
||||
|
||||
#undef SET_ALWAYS_SHOW_IMAGE
|
||||
}
|
||||
|
||||
void
|
||||
drawable_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *drawables = NULL;
|
||||
GList *iter;
|
||||
gboolean has_visible = FALSE;
|
||||
gboolean locked = TRUE;
|
||||
gboolean can_lock = FALSE;
|
||||
gboolean locked_pos = TRUE;
|
||||
gboolean can_lock_pos = FALSE;
|
||||
gboolean all_rgb = TRUE;
|
||||
gboolean all_writable = TRUE;
|
||||
gboolean all_movable = TRUE;
|
||||
gboolean none_children = TRUE;
|
||||
|
||||
image = action_data_get_image (data);
|
||||
|
||||
if (image)
|
||||
{
|
||||
drawables = gimp_image_get_selected_drawables (image);
|
||||
|
||||
for (iter = drawables; iter; iter = iter->next)
|
||||
{
|
||||
GimpItem *item;
|
||||
|
||||
if (gimp_item_get_visible (iter->data))
|
||||
has_visible = TRUE;
|
||||
|
||||
if (gimp_item_can_lock_content (iter->data))
|
||||
{
|
||||
if (! gimp_item_get_lock_content (iter->data))
|
||||
locked = FALSE;
|
||||
can_lock = TRUE;
|
||||
}
|
||||
|
||||
if (gimp_item_can_lock_position (iter->data))
|
||||
{
|
||||
if (! gimp_item_get_lock_position (iter->data))
|
||||
locked_pos = FALSE;
|
||||
can_lock_pos = TRUE;
|
||||
}
|
||||
|
||||
if (gimp_viewable_get_children (GIMP_VIEWABLE (iter->data)))
|
||||
none_children = FALSE;
|
||||
|
||||
if (! gimp_drawable_is_rgb (iter->data))
|
||||
all_rgb = FALSE;
|
||||
|
||||
if (GIMP_IS_LAYER_MASK (iter->data))
|
||||
item = GIMP_ITEM (gimp_layer_mask_get_layer (GIMP_LAYER_MASK (iter->data)));
|
||||
else
|
||||
item = GIMP_ITEM (iter->data);
|
||||
|
||||
if (gimp_item_is_content_locked (item, NULL))
|
||||
all_writable = FALSE;
|
||||
|
||||
if (gimp_item_is_position_locked (item, NULL))
|
||||
all_movable = FALSE;
|
||||
|
||||
if (has_visible && ! locked && ! locked_pos &&
|
||||
! none_children && ! all_rgb &&
|
||||
! all_writable && ! all_movable)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
|
||||
#define SET_ACTIVE(action,condition) \
|
||||
gimp_action_group_set_action_active (group, action, (condition) != 0)
|
||||
|
||||
SET_SENSITIVE ("drawable-equalize", drawables && all_writable && none_children);
|
||||
SET_SENSITIVE ("drawable-levels-stretch", drawables && all_writable && none_children && all_rgb);
|
||||
|
||||
SET_SENSITIVE ("drawable-visible", drawables);
|
||||
SET_SENSITIVE ("drawable-lock-content", can_lock);
|
||||
SET_SENSITIVE ("drawable-lock-position", can_lock_pos);
|
||||
|
||||
SET_ACTIVE ("drawable-visible", has_visible);
|
||||
SET_ACTIVE ("drawable-lock-content", locked);
|
||||
SET_ACTIVE ("drawable-lock-position", locked_pos);
|
||||
|
||||
SET_SENSITIVE ("drawable-flip-horizontal", drawables && all_writable && all_movable);
|
||||
SET_SENSITIVE ("drawable-flip-vertical", drawables && all_writable && all_movable);
|
||||
|
||||
SET_SENSITIVE ("drawable-rotate-90", drawables && all_writable && all_movable);
|
||||
SET_SENSITIVE ("drawable-rotate-180", drawables && all_writable && all_movable);
|
||||
SET_SENSITIVE ("drawable-rotate-270", drawables && all_writable && all_movable);
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
#undef SET_ACTIVE
|
||||
|
||||
g_list_free (drawables);
|
||||
}
|
27
app/actions/drawable-actions.h
Normal file
27
app/actions/drawable-actions.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* 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
|
||||
* 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 __DRAWABLE_ACTIONS_H__
|
||||
#define __DRAWABLE_ACTIONS_H__
|
||||
|
||||
|
||||
void drawable_actions_setup (GimpActionGroup *group);
|
||||
void drawable_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DRAWABLE_ACTIONS_H__ */
|
425
app/actions/drawable-commands.c
Normal file
425
app/actions/drawable-commands.c
Normal file
|
@ -0,0 +1,425 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpdrawable-equalize.h"
|
||||
#include "core/gimpdrawable-levels.h"
|
||||
#include "core/gimpdrawable-operation.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimpitemundo.h"
|
||||
#include "core/gimplayermask.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "dialogs/dialogs.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "drawable-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
drawable_equalize_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *drawables;
|
||||
GList *iter;
|
||||
|
||||
return_if_no_drawables (image, drawables, data);
|
||||
|
||||
if (g_list_length (drawables) > 1)
|
||||
gimp_image_undo_group_start (image,
|
||||
GIMP_UNDO_GROUP_DRAWABLE_MOD,
|
||||
_("Equalize"));
|
||||
|
||||
for (iter = drawables; iter; iter = iter->next)
|
||||
gimp_drawable_equalize (iter->data, TRUE);
|
||||
|
||||
if (g_list_length (drawables) > 1)
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
gimp_image_flush (image);
|
||||
g_list_free (drawables);
|
||||
}
|
||||
|
||||
void
|
||||
drawable_levels_stretch_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *drawables;
|
||||
GList *iter;
|
||||
GimpDisplay *display;
|
||||
GtkWidget *widget;
|
||||
|
||||
return_if_no_drawables (image, drawables, data);
|
||||
return_if_no_display (display, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
for (iter = drawables; iter; iter = iter->next)
|
||||
{
|
||||
if (! gimp_drawable_is_rgb (iter->data))
|
||||
{
|
||||
gimp_message_literal (image->gimp,
|
||||
G_OBJECT (widget), GIMP_MESSAGE_WARNING,
|
||||
_("White Balance operates only on RGB color "
|
||||
"layers."));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (g_list_length (drawables) > 1)
|
||||
gimp_image_undo_group_start (image,
|
||||
GIMP_UNDO_GROUP_DRAWABLE_MOD,
|
||||
_("Levels"));
|
||||
|
||||
for (iter = drawables; iter; iter = iter->next)
|
||||
gimp_drawable_levels_stretch (iter->data, GIMP_PROGRESS (display));
|
||||
|
||||
if (g_list_length (drawables) > 1)
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
gimp_image_flush (image);
|
||||
g_list_free (drawables);
|
||||
}
|
||||
|
||||
void
|
||||
drawable_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *drawables;
|
||||
GList *iter;
|
||||
GimpUndo *undo;
|
||||
gboolean push_undo = TRUE;
|
||||
gboolean visible;
|
||||
|
||||
return_if_no_drawables (image, drawables, data);
|
||||
|
||||
visible = g_variant_get_boolean (value);
|
||||
|
||||
if (GIMP_IS_LAYER_MASK (drawables->data))
|
||||
{
|
||||
GimpLayerMask *mask = GIMP_LAYER_MASK (drawables->data);
|
||||
|
||||
g_list_free (drawables);
|
||||
drawables = g_list_prepend (NULL, gimp_layer_mask_get_layer (mask));
|
||||
}
|
||||
|
||||
for (iter = drawables; iter; iter = iter->next)
|
||||
{
|
||||
if (visible && gimp_item_get_visible (iter->data))
|
||||
{
|
||||
/* If any of the drawables are already visible, we don't
|
||||
* toggle the selection visibility. This prevents the
|
||||
* SET_ACTIVE() in drawables-actions.c to toggle visibility
|
||||
* unexpectedly.
|
||||
*/
|
||||
g_list_free (drawables);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (iter = drawables; iter; iter = iter->next)
|
||||
if (visible != gimp_item_get_visible (iter->data))
|
||||
break;
|
||||
|
||||
if (! iter)
|
||||
{
|
||||
g_list_free (drawables);
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_list_length (drawables) == 1)
|
||||
{
|
||||
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
|
||||
GIMP_UNDO_ITEM_VISIBILITY);
|
||||
|
||||
if (undo && GIMP_ITEM_UNDO (undo)->item == GIMP_ITEM (drawables->data))
|
||||
push_undo = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* TODO: undo groups cannot be compressed so far. */
|
||||
gimp_image_undo_group_start (image,
|
||||
GIMP_UNDO_GROUP_ITEM_VISIBILITY,
|
||||
"Item visibility");
|
||||
}
|
||||
|
||||
for (; iter; iter = iter->next)
|
||||
gimp_item_set_visible (iter->data, visible, push_undo);
|
||||
|
||||
if (g_list_length (drawables) != 1)
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
gimp_image_flush (image);
|
||||
g_list_free (drawables);
|
||||
}
|
||||
|
||||
void
|
||||
drawable_lock_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *drawables;
|
||||
GList *iter;
|
||||
gboolean locked;
|
||||
gboolean push_undo = TRUE;
|
||||
|
||||
return_if_no_drawables (image, drawables, data);
|
||||
|
||||
locked = g_variant_get_boolean (value);
|
||||
|
||||
if (GIMP_IS_LAYER_MASK (drawables->data))
|
||||
{
|
||||
GimpLayerMask *mask = GIMP_LAYER_MASK (drawables->data);
|
||||
|
||||
g_list_free (drawables);
|
||||
drawables = g_list_prepend (NULL, gimp_layer_mask_get_layer (mask));
|
||||
}
|
||||
|
||||
for (iter = drawables; iter; iter = iter->next)
|
||||
{
|
||||
if (! locked && ! gimp_item_get_lock_content (iter->data))
|
||||
{
|
||||
/* If any of the drawables are already unlocked, we don't toggle the
|
||||
* lock. This prevents the SET_ACTIVE() in drawables-actions.c to
|
||||
* toggle locks unexpectedly.
|
||||
*/
|
||||
g_list_free (drawables);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (iter = drawables; iter; iter = iter->next)
|
||||
if (locked != gimp_item_get_lock_content (iter->data))
|
||||
break;
|
||||
|
||||
if (g_list_length (drawables) == 1)
|
||||
{
|
||||
GimpUndo *undo;
|
||||
|
||||
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
|
||||
GIMP_UNDO_ITEM_LOCK_CONTENT);
|
||||
|
||||
if (undo && GIMP_ITEM_UNDO (undo)->item == GIMP_ITEM (drawables->data))
|
||||
push_undo = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* TODO: undo groups cannot be compressed so far. */
|
||||
gimp_image_undo_group_start (image,
|
||||
GIMP_UNDO_GROUP_ITEM_LOCK_CONTENTS,
|
||||
_("Lock/Unlock content"));
|
||||
}
|
||||
|
||||
for (; iter; iter = iter->next)
|
||||
gimp_item_set_lock_content (iter->data, locked, push_undo);
|
||||
|
||||
if (g_list_length (drawables) != 1)
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
gimp_image_flush (image);
|
||||
g_list_free (drawables);
|
||||
}
|
||||
|
||||
void
|
||||
drawable_lock_position_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *drawables;
|
||||
GList *iter;
|
||||
gboolean locked;
|
||||
gboolean push_undo = TRUE;
|
||||
|
||||
return_if_no_drawables (image, drawables, data);
|
||||
|
||||
locked = g_variant_get_boolean (value);
|
||||
|
||||
if (GIMP_IS_LAYER_MASK (drawables->data))
|
||||
{
|
||||
GimpLayerMask *mask = GIMP_LAYER_MASK (drawables->data);
|
||||
|
||||
g_list_free (drawables);
|
||||
drawables = g_list_prepend (NULL, gimp_layer_mask_get_layer (mask));
|
||||
}
|
||||
|
||||
for (iter = drawables; iter; iter = iter->next)
|
||||
{
|
||||
if (! locked && ! gimp_item_get_lock_position (iter->data))
|
||||
{
|
||||
/* If any of the drawables are already unlocked, we don't toggle the
|
||||
* lock. This prevents the SET_ACTIVE() in drawables-actions.c to
|
||||
* toggle locks unexpectedly.
|
||||
*/
|
||||
g_list_free (drawables);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (iter = drawables; iter; iter = iter->next)
|
||||
if (locked != gimp_item_get_lock_position (iter->data))
|
||||
break;
|
||||
|
||||
if (g_list_length (drawables) == 1)
|
||||
{
|
||||
GimpUndo *undo;
|
||||
|
||||
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
|
||||
GIMP_UNDO_ITEM_LOCK_POSITION);
|
||||
|
||||
if (undo && GIMP_ITEM_UNDO (undo)->item == GIMP_ITEM (drawables->data))
|
||||
push_undo = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* TODO: undo groups cannot be compressed so far. */
|
||||
gimp_image_undo_group_start (image,
|
||||
GIMP_UNDO_GROUP_ITEM_LOCK_POSITION,
|
||||
_("Lock/Unlock position"));
|
||||
}
|
||||
|
||||
for (; iter; iter = iter->next)
|
||||
gimp_item_set_lock_position (iter->data, locked, push_undo);
|
||||
|
||||
if (g_list_length (drawables) != 1)
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
gimp_image_flush (image);
|
||||
g_list_free (drawables);
|
||||
}
|
||||
|
||||
void
|
||||
drawable_flip_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *drawables;
|
||||
GList *iter;
|
||||
GimpContext *context;
|
||||
gint off_x, off_y;
|
||||
gdouble axis = 0.0;
|
||||
GimpOrientationType orientation;
|
||||
|
||||
return_if_no_drawables (image, drawables, data);
|
||||
return_if_no_context (context, data);
|
||||
|
||||
orientation = (GimpOrientationType) g_variant_get_int32 (value);
|
||||
|
||||
if (g_list_length (drawables) > 1)
|
||||
gimp_image_undo_group_start (image,
|
||||
GIMP_UNDO_GROUP_DRAWABLE_MOD,
|
||||
_("Flip Drawables"));
|
||||
|
||||
for (iter = drawables; iter; iter = iter->next)
|
||||
{
|
||||
GimpItem *item;
|
||||
|
||||
item = GIMP_ITEM (iter->data);
|
||||
|
||||
gimp_item_get_offset (item, &off_x, &off_y);
|
||||
|
||||
switch (orientation)
|
||||
{
|
||||
case GIMP_ORIENTATION_HORIZONTAL:
|
||||
axis = ((gdouble) off_x + (gdouble) gimp_item_get_width (item) / 2.0);
|
||||
break;
|
||||
|
||||
case GIMP_ORIENTATION_VERTICAL:
|
||||
axis = ((gdouble) off_y + (gdouble) gimp_item_get_height (item) / 2.0);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
gimp_item_flip (item, context, orientation, axis,
|
||||
gimp_item_get_clip (item, FALSE));
|
||||
}
|
||||
|
||||
if (g_list_length (drawables) > 1)
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
gimp_image_flush (image);
|
||||
g_list_free (drawables);
|
||||
}
|
||||
|
||||
void
|
||||
drawable_rotate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *drawables;
|
||||
GList *iter;
|
||||
GimpContext *context;
|
||||
GimpRotationType rotation_type;
|
||||
|
||||
return_if_no_drawables (image, drawables, data);
|
||||
return_if_no_context (context, data);
|
||||
|
||||
rotation_type = (GimpRotationType) g_variant_get_int32 (value);
|
||||
|
||||
if (g_list_length (drawables) > 1)
|
||||
gimp_image_undo_group_start (image,
|
||||
GIMP_UNDO_GROUP_DRAWABLE_MOD,
|
||||
_("Rotate Drawables"));
|
||||
|
||||
for (iter = drawables; iter; iter = iter->next)
|
||||
{
|
||||
GimpItem *item;
|
||||
gint off_x, off_y;
|
||||
gdouble center_x, center_y;
|
||||
|
||||
item = GIMP_ITEM (iter->data);
|
||||
|
||||
gimp_item_get_offset (item, &off_x, &off_y);
|
||||
|
||||
center_x = ((gdouble) off_x + (gdouble) gimp_item_get_width (item) / 2.0);
|
||||
center_y = ((gdouble) off_y + (gdouble) gimp_item_get_height (item) / 2.0);
|
||||
|
||||
gimp_item_rotate (item, context,
|
||||
rotation_type, center_x, center_y,
|
||||
gimp_item_get_clip (item, FALSE));
|
||||
}
|
||||
|
||||
if (g_list_length (drawables) > 1)
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
gimp_image_flush (image);
|
||||
g_list_free (drawables);
|
||||
}
|
47
app/actions/drawable-commands.h
Normal file
47
app/actions/drawable-commands.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
/* 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
|
||||
* 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 __DRAWABLE_COMMANDS_H__
|
||||
#define __DRAWABLE_COMMANDS_H__
|
||||
|
||||
|
||||
void drawable_equalize_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void drawable_levels_stretch_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void drawable_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void drawable_lock_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void drawable_lock_position_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void drawable_flip_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void drawable_rotate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DRAWABLE_COMMANDS_H__ */
|
133
app/actions/dynamics-actions.c
Normal file
133
app/actions/dynamics-actions.c
Normal file
|
@ -0,0 +1,133 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpdata.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "data-commands.h"
|
||||
#include "dynamics-actions.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry dynamics_actions[] =
|
||||
{
|
||||
{ "dynamics-new", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("dynamics-action", "_New Dynamics"), NULL, { NULL },
|
||||
NC_("dynamics-action", "Create a new dynamics"),
|
||||
data_new_cmd_callback,
|
||||
GIMP_HELP_DYNAMICS_NEW },
|
||||
|
||||
{ "dynamics-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
|
||||
NC_("dynamics-action", "D_uplicate Dynamics"), NULL, { NULL },
|
||||
NC_("dynamics-action", "Duplicate this dynamics"),
|
||||
data_duplicate_cmd_callback,
|
||||
GIMP_HELP_DYNAMICS_DUPLICATE },
|
||||
|
||||
{ "dynamics-copy-location", GIMP_ICON_EDIT_COPY,
|
||||
NC_("dynamics-action", "Copy Dynamics _Location"), NULL, { NULL },
|
||||
NC_("dynamics-action", "Copy dynamics file location to clipboard"),
|
||||
data_copy_location_cmd_callback,
|
||||
GIMP_HELP_DYNAMICS_COPY_LOCATION },
|
||||
|
||||
{ "dynamics-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
|
||||
NC_("dynamics-action", "Show in _File Manager"), NULL, { NULL },
|
||||
NC_("dynamics-action", "Show dynamics file location in the file manager"),
|
||||
data_show_in_file_manager_cmd_callback,
|
||||
GIMP_HELP_DYNAMICS_SHOW_IN_FILE_MANAGER },
|
||||
|
||||
{ "dynamics-delete", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("dynamics-action", "_Delete Dynamics"), NULL, { NULL },
|
||||
NC_("dynamics-action", "Delete this dynamics"),
|
||||
data_delete_cmd_callback,
|
||||
GIMP_HELP_DYNAMICS_DELETE },
|
||||
|
||||
{ "dynamics-refresh", GIMP_ICON_VIEW_REFRESH,
|
||||
NC_("dynamics-action", "_Refresh Dynamics"), NULL, { NULL },
|
||||
NC_("dynamics-action", "Refresh dynamics"),
|
||||
data_refresh_cmd_callback,
|
||||
GIMP_HELP_DYNAMICS_REFRESH }
|
||||
};
|
||||
|
||||
static const GimpStringActionEntry dynamics_edit_actions[] =
|
||||
{
|
||||
{ "dynamics-edit", GIMP_ICON_EDIT,
|
||||
NC_("dynamics-action", "_Edit Dynamics..."), NULL, { NULL },
|
||||
NC_("dynamics-action", "Edit this dynamics"),
|
||||
"gimp-dynamics-editor",
|
||||
GIMP_HELP_DYNAMICS_EDIT }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
dynamics_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "dynamics-action",
|
||||
dynamics_actions,
|
||||
G_N_ELEMENTS (dynamics_actions));
|
||||
|
||||
gimp_action_group_add_string_actions (group, "dynamics-action",
|
||||
dynamics_edit_actions,
|
||||
G_N_ELEMENTS (dynamics_edit_actions),
|
||||
data_edit_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
dynamics_actions_update (GimpActionGroup *group,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpContext *context = action_data_get_context (user_data);
|
||||
GimpDynamics *dynamics = NULL;
|
||||
GimpData *data = NULL;
|
||||
GFile *file = NULL;
|
||||
|
||||
if (context)
|
||||
{
|
||||
dynamics = gimp_context_get_dynamics (context);
|
||||
|
||||
if (dynamics)
|
||||
{
|
||||
data = GIMP_DATA (dynamics);
|
||||
|
||||
file = gimp_data_get_file (data);
|
||||
}
|
||||
}
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
|
||||
|
||||
SET_SENSITIVE ("dynamics-edit", dynamics);
|
||||
SET_SENSITIVE ("dynamics-duplicate", dynamics && gimp_data_is_duplicatable (data));
|
||||
SET_SENSITIVE ("dynamics-copy-location", file);
|
||||
SET_SENSITIVE ("dynamics-show-in-file-manager", file);
|
||||
SET_SENSITIVE ("dynamics-delete", dynamics && gimp_data_is_deletable (data));
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
}
|
27
app/actions/dynamics-actions.h
Normal file
27
app/actions/dynamics-actions.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* 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
|
||||
* 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 __DYNAMICS_ACTIONS_H__
|
||||
#define __DYNAMICS_ACTIONS_H__
|
||||
|
||||
|
||||
void dynamics_actions_setup (GimpActionGroup *group);
|
||||
void dynamics_actions_update (GimpActionGroup *group,
|
||||
gpointer user_data);
|
||||
|
||||
|
||||
#endif /* __DYNAMICS_ACTIONS_H__ */
|
77
app/actions/dynamics-editor-actions.c
Normal file
77
app/actions/dynamics-editor-actions.c
Normal file
|
@ -0,0 +1,77 @@
|
|||
/* 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpdataeditor.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "data-editor-commands.h"
|
||||
#include "dynamics-editor-actions.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpToggleActionEntry dynamics_editor_toggle_actions[] =
|
||||
{
|
||||
{ "dynamics-editor-edit-active", GIMP_ICON_LINKED,
|
||||
NC_("dynamics-editor-action", "Edit Active Dynamics"), NULL, { NULL }, NULL,
|
||||
data_editor_edit_active_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_BRUSH_EDITOR_EDIT_ACTIVE }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
dynamics_editor_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_toggle_actions (group, "dynamics-editor-action",
|
||||
dynamics_editor_toggle_actions,
|
||||
G_N_ELEMENTS (dynamics_editor_toggle_actions));
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
dynamics_editor_actions_update (GimpActionGroup *group,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (user_data);
|
||||
gboolean edit_active = FALSE;
|
||||
|
||||
edit_active = gimp_data_editor_get_edit_active (data_editor);
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
#define SET_ACTIVE(action,condition) \
|
||||
gimp_action_group_set_action_active (group, action, (condition) != 0)
|
||||
|
||||
SET_ACTIVE ("dynamics-editor-edit-active", edit_active);
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
#undef SET_ACTIVE
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue