Initial checkin of Pika from heckimp
This commit is contained in:
46
.clang-format
Normal file
46
.clang-format
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
# 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: Consecutive
|
||||||
|
AlignConsecutiveDeclarations: Consecutive
|
||||||
|
AlignConsecutiveMacros: Consecutive
|
||||||
|
AlignEscapedNewlines: Left
|
||||||
|
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
|
AlwaysBreakAfterReturnType: AllDefinitions
|
||||||
|
BinPackParameters: false
|
||||||
|
BreakBeforeBraces: GNU
|
||||||
|
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
|
||||||
|
PenaltyBreakString: 60
|
||||||
|
# Uncomment this when we start using clang-format 14 in the CI.
|
||||||
|
# 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))))
|
||||||
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Meson
|
||||||
|
/_build
|
||||||
|
/compile_commands.json
|
||||||
|
|
||||||
|
# Atom editor
|
||||||
|
/.vscode
|
||||||
1096
.gitlab-ci.yml
Normal file
1096
.gitlab-ci.yml
Normal file
File diff suppressed because it is too large
Load Diff
32
.gitlab/cp-plug-in-subfolder.py
Normal file
32
.gitlab/cp-plug-in-subfolder.py
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
# Equivalent to:
|
||||||
|
# configure_file(input: src,
|
||||||
|
# output: name / src,
|
||||||
|
# copy: true,
|
||||||
|
# install_dir: pikaplugindir / 'plug-ins' / name,
|
||||||
|
# install_mode: 'rwxr-xr-x')
|
||||||
|
# Except that configure_file() does not accept output in a subdirectory. So we
|
||||||
|
# use this wrapper for now.
|
||||||
|
# See: https://github.com/mesonbuild/meson/issues/2320
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
import stat
|
||||||
|
import sys
|
||||||
|
|
||||||
|
src_file = sys.argv[1]
|
||||||
|
dir_name = sys.argv[2]
|
||||||
|
dummy_path = None
|
||||||
|
if len(sys.argv) > 3:
|
||||||
|
dummy_path = sys.argv[3]
|
||||||
|
|
||||||
|
os.makedirs(dir_name, exist_ok=True)
|
||||||
|
|
||||||
|
file_name = os.path.basename(src_file)
|
||||||
|
dst_file = os.path.join(dir_name, file_name)
|
||||||
|
shutil.copyfile(src_file, dst_file)
|
||||||
|
os.chmod(dst_file, stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
|
||||||
|
|
||||||
|
if dummy_path is not None:
|
||||||
|
# Just touch the dummy file.
|
||||||
|
open(dummy_path, mode='w').close()
|
||||||
41
.gitlab/issue_templates/Default.md
Normal file
41
.gitlab/issue_templates/Default.md
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<!-- ⚠️ 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
### Environment/Versions
|
||||||
|
|
||||||
|
- PIKA version:
|
||||||
|
- Package: <!--[flatpak? Installer from https://heckin.technology/AlderconeStudio/PIKApp? 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 PIKA or on updated development code
|
||||||
|
(master branch).-->
|
||||||
|
|
||||||
|
### Description of the bug
|
||||||
|
|
||||||
|
<!--Please describe your issue with details.
|
||||||
|
Add screenshot 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.
|
||||||
15
.gitlab/issue_templates/feature.md
Normal file
15
.gitlab/issue_templates/feature.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
**Operating System:** <!--[Windows? macOS? Linux? All?] (write it after the > symbol) -->
|
||||||
|
|
||||||
|
### Description of the feature
|
||||||
|
|
||||||
|
<!-- Please describe your feature with details.
|
||||||
|
|
||||||
|
Add screenshots, design images or other files which would help for
|
||||||
|
understanding the feature or for implementation.
|
||||||
|
Also add links when needed, for instance for implementation standards
|
||||||
|
or other relevant resources.-->
|
||||||
|
|
||||||
|
### Use cases
|
||||||
|
|
||||||
|
<!-- If not obvious, explain the use cases or problems to solve. -->
|
||||||
|
|
||||||
34
.gitlab/issue_templates/performance.md
Normal file
34
.gitlab/issue_templates/performance.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
### Environment/Versions
|
||||||
|
|
||||||
|
- PIKA Version:
|
||||||
|
- Package: <!--[flatpak? Installer from https://heckin.technology/AlderconeStudio/PIKApp? 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 PIKA 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.pika.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"
|
||||||
15
.gitlab/merge_request_templates/default.md
Normal file
15
.gitlab/merge_request_templates/default.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
Contribution guidelines:
|
||||||
|
|
||||||
|
- Follow our coding style, which is mostly the GNU coding style
|
||||||
|
with some specificities: see [Coding Style](https://developer.pika.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.*"
|
||||||
|
|
||||||
|
- Enable the container registry for your repository by following this
|
||||||
|
documentation, but enabling the feature instead of disabling it
|
||||||
|
(unlike what the docs says, Container Registry is disabled by default
|
||||||
|
on our Gitlab instance):
|
||||||
|
https://docs.gitlab.com/ee/user/packages/container_registry/#disable-the-container-registry-for-a-project
|
||||||
30
.gitlab/run_style_check_diff.sh
Normal file
30
.gitlab/run_style_check_diff.sh
Normal 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/pika/-/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/pika.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 mr-origin
|
||||||
|
git remote add mr-origin ${CI_MERGE_REQUEST_SOURCE_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)" mr-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 "mr-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
.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;
|
||||||
397
AUTHORS
Normal file
397
AUTHORS
Normal file
@ -0,0 +1,397 @@
|
|||||||
|
-- This file is generated from authors.xml, do not edit it directly. --
|
||||||
|
|
||||||
|
PIKA was originally written by:
|
||||||
|
|
||||||
|
Spencer Kimball
|
||||||
|
Peter Mattis
|
||||||
|
|
||||||
|
|
||||||
|
The current maintainers are:
|
||||||
|
|
||||||
|
Michael Natterer
|
||||||
|
Jehan
|
||||||
|
|
||||||
|
|
||||||
|
The following people have contributed code to PIKA:
|
||||||
|
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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 PIKA:
|
||||||
|
|
||||||
|
Lapo Calamandrei
|
||||||
|
Paul Davey
|
||||||
|
Patrick David
|
||||||
|
Alexia Death
|
||||||
|
Aurore Derriennic
|
||||||
|
Philipp Haegi
|
||||||
|
Aryeom Han
|
||||||
|
Tuomas Kuosmanen
|
||||||
|
Karl La Rocca
|
||||||
|
Andreas Nilsson
|
||||||
|
Ville Pätsi
|
||||||
|
Mike Schaeffer
|
||||||
|
Carol Spears
|
||||||
|
Klaus Staedtler
|
||||||
|
Jakub Steiner
|
||||||
|
William Szilveszter
|
||||||
|
|
||||||
|
|
||||||
|
The following people have helped to document PIKA:
|
||||||
|
|
||||||
|
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
488
INSTALL.in
Normal file
488
INSTALL.in
Normal file
@ -0,0 +1,488 @@
|
|||||||
|
---------------------------------------
|
||||||
|
Installation instructions for PIKA @PIKA_APP_VERSION@
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
There are some basic steps to building and installing PIKA.
|
||||||
|
|
||||||
|
PIKA @PIKA_APP_VERSION@ replaces earlier PIKA 2.99.x versions. It is advised to
|
||||||
|
uninstall them before installing PIKA @PIKA_APP_VERSION@. Since libpika* libraries
|
||||||
|
and data are all versionned anyway, it is possible to keep your older
|
||||||
|
PIKA 2.x installation in parallel to PIKA @PIKA_APP_VERSION@ on a same prefix.
|
||||||
|
|
||||||
|
PIKA @PIKA_APP_VERSION@ is not backward compatible with PIKA 2.10 and earlier
|
||||||
|
versions. Plug-ins and scripts written for PIKA 2.10, 2.8, 2.6 or
|
||||||
|
earlier PIKA 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 PIKA 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.pika.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 (>= @PIKA_PKGCONFIG_VERSION@) 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 @GEGL_REQUIRED_VERSION@ or newer and babl version
|
||||||
|
@BABL_REQUIRED_VERSION@ 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 PIKA'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 @GTK_REQUIRED_VERSION@ or newer.
|
||||||
|
PIKA also needs a recent version of GLib (>= @GLIB_REQUIRED_VERSION@), GDK-Pixbuf
|
||||||
|
(>= @GDK_PIXBUF_REQUIRED_VERSION@), and Pango (>= @PANGO_REQUIRED_VERSION@). Sources for these can be grabbed
|
||||||
|
from https://download.gnome.org/sources/.
|
||||||
|
|
||||||
|
5. We use cairo >= @CAIRO_REQUIRED_VERSION@, 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. PIKA depends on freetype2 being newer than version @FREETYPE2_REQUIRED_VERSION@
|
||||||
|
and fontconfig @FONTCONFIG_REQUIRED_VERSION@ or newer. Older versions are known to have
|
||||||
|
bugs that seriously affect the stability of PIKA.
|
||||||
|
|
||||||
|
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 @HARFBUZZ_REQUIRED_VERSION@ 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 PIKA requires the gexiv2 @GEXIV2_REQUIRED_VERSION@ or newer library.
|
||||||
|
It is hosted at: https://wiki.gnome.org/Projects/gexiv2
|
||||||
|
|
||||||
|
9. libpng, libjpeg, libtiff, librsvg and lcms are hard dependencies
|
||||||
|
that can not be disabled.
|
||||||
|
|
||||||
|
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 PIKA running on an architecture with no Rust support
|
||||||
|
could still:
|
||||||
|
|
||||||
|
1) easily patch out the file-svg plug-in from build system;
|
||||||
|
2) build PIKA 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) @LIBMYPAINT_REQUIRED_VERSION@ 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". PIKA 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 PIKA (the `master` branch and v2 brushes
|
||||||
|
are targeted to software using recent libmypaint which PIKA 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. PIKA 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://wiki.gnome.org/Projects/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 PIKA 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
|
||||||
|
|
||||||
|
Make sure you build libheif with libde265 and libx265 support (for
|
||||||
|
respectively decoding and encoding of HEVC, i.e. HEIC files), and
|
||||||
|
libaom decoder and encoder (for AV1, i.e. AVIF files), otherwise
|
||||||
|
the plug-in is mostly useless.
|
||||||
|
|
||||||
|
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%\PIKA\@PIKA_APP_VERSION@\CrashLog\
|
||||||
|
The feature depends on Dr.MinGW's ExcHndl library:
|
||||||
|
|
||||||
|
https://github.com/jrfonseca/drmingw
|
||||||
|
|
||||||
|
17. Configure PIKA by running `meson _build`. You may want to pass some
|
||||||
|
options to it, see below.
|
||||||
|
|
||||||
|
18. Build PIKA by running `ninja -C _build'.
|
||||||
|
|
||||||
|
19. Install PIKA by running `ninja -C _build install'. In order to
|
||||||
|
avoid clashes with other versions of PIKA, we install a binary
|
||||||
|
called pika-@PIKA_APP_VERSION@. By default there's also a link created so that
|
||||||
|
you can type 'pika' to start pika-@PIKA_APP_VERSION@.
|
||||||
|
|
||||||
|
20. Summary of required packages and what version you need:
|
||||||
|
|
||||||
|
Package Name Version
|
||||||
|
|
||||||
|
appstream-glib @APPSTREAM_GLIB_REQUIRED_VERSION@
|
||||||
|
ATK @ATK_REQUIRED_VERSION@
|
||||||
|
babl @BABL_REQUIRED_VERSION@
|
||||||
|
cairo @CAIRO_REQUIRED_VERSION@
|
||||||
|
Fontconfig @FONTCONFIG_REQUIRED_VERSION@
|
||||||
|
freetype2 @FREETYPE2_REQUIRED_VERSION@
|
||||||
|
GDK-PixBuf @GDK_PIXBUF_REQUIRED_VERSION@
|
||||||
|
GEGL @GEGL_REQUIRED_VERSION@
|
||||||
|
gexiv2 @GEXIV2_REQUIRED_VERSION@
|
||||||
|
GIO
|
||||||
|
GLib @GLIB_REQUIRED_VERSION@
|
||||||
|
glib-networking
|
||||||
|
GTK @GTK_REQUIRED_VERSION@
|
||||||
|
gvfs (on Linux)
|
||||||
|
HarfBuzz @HARFBUZZ_REQUIRED_VERSION@
|
||||||
|
libbzip2
|
||||||
|
libjpeg
|
||||||
|
liblzma @LIBLZMA_REQUIRED_VERSION@
|
||||||
|
libmypaint @LIBMYPAINT_REQUIRED_VERSION@
|
||||||
|
libpng @LIBPNG_REQUIRED_VERSION@
|
||||||
|
libpoppler-glib @POPPLER_REQUIRED_VERSION@
|
||||||
|
librsvg @RSVG_REQUIRED_VERSION@
|
||||||
|
libtiff @LIBTIFF_REQUIRED_VERSION@
|
||||||
|
Little CMS @LCMS_REQUIRED_VERSION@
|
||||||
|
mypaint-brushes-1.0
|
||||||
|
pangocairo @PANGO_REQUIRED_VERSION@
|
||||||
|
poppler-data @POPPLER_DATA_REQUIRED_VERSION@
|
||||||
|
zlib
|
||||||
|
|
||||||
|
21. Summary of optional packages:
|
||||||
|
|
||||||
|
Package Name Version Feature
|
||||||
|
|
||||||
|
cairo-pdf @CAIRO_PDF_REQUIRED_VERSION@ PDF export
|
||||||
|
cfitsio - FITS
|
||||||
|
ExcHndl - Crash logs on Windows with Dr. MinGW
|
||||||
|
gs - ghostscript
|
||||||
|
libaa - ASCII art
|
||||||
|
libheif @LIBHEIF_REQUIRED_VERSION@ HEIF
|
||||||
|
libilbm - Amiga IFF/ILBM
|
||||||
|
libmng - MNG
|
||||||
|
libwebp @WEBP_REQUIRED_VERSION@ WebP (built with --enable-libwebpmux and --enable-libwebpdemux)
|
||||||
|
libwmf @WMF_REQUIRED_VERSION@ WMF
|
||||||
|
libXcursor - X11 Mouse Cursor
|
||||||
|
libxpm - XPM
|
||||||
|
openexr @OPENEXR_REQUIRED_VERSION@ OpenEXR
|
||||||
|
OpenJPEG @OPENJPEG_REQUIRED_VERSION@ JPEG 2000
|
||||||
|
qoi - QOI
|
||||||
|
webkit @WEBKITGTK_REQUIRED_VERSION@ Help browser & webpage
|
||||||
|
vala - Vala plug-ins
|
||||||
|
|
||||||
|
22. 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
|
||||||
|
Python @PYTHON3_REQUIRED_VERSION@ and PyGObject for Python 3 plug-ins
|
||||||
|
GJS for Javascript plug-ins
|
||||||
|
LuaJIT and LGI for Lua plug-ins
|
||||||
|
dot for "Show Image Graph" (unstable branches)
|
||||||
|
xdg-desktop-portal implemented for your desktop for various D-Bus API (screenshot, color-picking…)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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 PIKA. The actual configuration,
|
||||||
|
compilation and installation output is not shown.
|
||||||
|
|
||||||
|
% tar xvf pika-@PIKA_VERSION@.tar.xz # unpack the sources
|
||||||
|
% cd pika-@PIKA_VERSION@ # change to the toplevel directory
|
||||||
|
% meson _build # `configure' step
|
||||||
|
% ninja -C _build # build PIKA
|
||||||
|
% ninja -C _build install # install PIKA
|
||||||
|
|
||||||
|
|
||||||
|
The `configure' step examines your system, and adapts PIKA 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 PIKA configure script recognizes.
|
||||||
|
These are:
|
||||||
|
|
||||||
|
-Dvector-icons=false This option installs raster icons instead of
|
||||||
|
vector icons.
|
||||||
|
|
||||||
|
-Drelocatable-bundle=yes This option forces PIKA 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.
|
||||||
|
|
||||||
|
-Dpikadir=DIR. This option changes the default directory PIKA uses to
|
||||||
|
search for its configuration files from ~/.config/PIKA/@PIKA_APP_VERSION@ (the
|
||||||
|
directory .config/PIKA/@PIKA_APP_VERSION@ in the user's home directory) to
|
||||||
|
~/.config/DIR/@PIKA_APP_VERSION@.
|
||||||
|
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 libpika
|
||||||
|
C API references will be created using gi-docgen.
|
||||||
|
|
||||||
|
-Dg-ir-doc=true This option controls whether the libpika API
|
||||||
|
references for some binding languages will be created using
|
||||||
|
g-ir-doc-tool and yelp-build.
|
||||||
|
|
||||||
|
-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 PIKA 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
|
||||||
|
pika-@PIKA_APP_VERSION@ the default PIKA installation. Otherwise a link called
|
||||||
|
pika pointing to the pika-@PIKA_APP_VERSION@ executable will be installed.
|
||||||
|
|
||||||
|
-Denable-console-bin=false Use this option if you don't want the
|
||||||
|
pika-console binary to be built in addition to the standard binary.
|
||||||
|
pika-console is useful for command-line batch mode or as a server.
|
||||||
|
|
||||||
|
-Dpython=false If for some reason you don't want to install the
|
||||||
|
Python plug-ins, you can use -Dpython=false.
|
||||||
|
|
||||||
|
-Djavascript=false If for some reason you don't want to install the
|
||||||
|
JavaScript plug-ins, you can use -Djavascript=false.
|
||||||
|
|
||||||
|
-Dlua=false If for some reason you don't want to install the
|
||||||
|
Lua plug-ins, you can use -Dlua=false.
|
||||||
|
|
||||||
|
-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 'libpika'.
|
||||||
|
- The plug-in programs in the 'plug-ins' directory.
|
||||||
|
- Some modules in the 'modules' subdirectory.
|
||||||
|
- The main PIKA program 'pika-@PIKA_APP_VERSION@' in `app'.
|
||||||
|
|
||||||
|
The `ninja install' command installs the PIKA header files associated
|
||||||
|
with the libpika libraries, the plug-ins, some data files and the PIKA
|
||||||
|
executable. After running `ninja install' and assuming the build process
|
||||||
|
was successful you should be able to run `pika'.
|
||||||
|
|
||||||
|
|
||||||
|
When configure fails
|
||||||
|
======================
|
||||||
|
|
||||||
|
The configuration step uses pkg-config, a tool that replaces the old foo-config
|
||||||
|
scripts. The most recent version is available from
|
||||||
|
https://www.freedesktop.org/software/pkgconfig/
|
||||||
|
|
||||||
|
'configure' tries to compile and run a short GTK program. There are
|
||||||
|
several reasons why this might fail:
|
||||||
|
|
||||||
|
* pkg-config could not find the file 'gtk+-3.0.pc' that gets installed
|
||||||
|
with GTK. (This file is used to get information about where GTK+ is
|
||||||
|
installed.)
|
||||||
|
|
||||||
|
Fix: Either make sure that this file is in the path where pkg-config
|
||||||
|
looks for it (try 'pkg-config --debug' or add the location of
|
||||||
|
gtk+-3.0.pc to the environment variable PKG_CONFIG_PATH before running
|
||||||
|
configure.
|
||||||
|
|
||||||
|
* Libraries you installed are not found when you attempt to start PIKA.
|
||||||
|
The details of how to fix this problem will depend on the system:
|
||||||
|
|
||||||
|
On Linux and other systems using ELF libraries, add the directory to
|
||||||
|
holding the library to /etc/ld.so.conf or to the environment variable
|
||||||
|
LD_LIBRARY_PATH, and run 'ldconfig'.
|
||||||
|
|
||||||
|
On other systems, it may be necessary to encode this path
|
||||||
|
into the executable, by setting the LDFLAGS environment variable
|
||||||
|
before running configure. For example:
|
||||||
|
|
||||||
|
LDFLAGS="-R/home/joe/lib" ./configure
|
||||||
|
or
|
||||||
|
LDFLAGS="-Wl,-rpath -Wl,/home/joe/lib" ./configure
|
||||||
|
|
||||||
|
* An old version of the GTK libraries was found instead of
|
||||||
|
your newly installed version. This commonly happens if a
|
||||||
|
binary package of GTK was previously installed on your system,
|
||||||
|
and you later compiled GTK from source.
|
||||||
|
|
||||||
|
Fix: Remove the old libraries and include files. If you are afraid
|
||||||
|
that removing the old libraries may break other packages supplied by
|
||||||
|
your distributor, you can try installing GLib, GTK and other
|
||||||
|
libraries in a different prefix after setting the environment
|
||||||
|
variable PKG_CONFIG_LIBDIR to point to lib/pkgconfig/ in that new
|
||||||
|
prefix so that it does not try to read the *.pc files from the
|
||||||
|
default directory (/usr/lib/pkgconfig). However, removing the old
|
||||||
|
packages is often the easier solution.
|
||||||
|
|
||||||
|
A detailed log of the meson output is written to the file meson-logs/meson-log.txt.
|
||||||
|
This may help diagnose problems.
|
||||||
|
|
||||||
|
|
||||||
|
When meson configure fails on plug-ins
|
||||||
|
======================================
|
||||||
|
|
||||||
|
There are some PIKA plug-ins that need additional third-party libraries
|
||||||
|
installed on your system. For example to compile the plug-ins that load
|
||||||
|
and save JPEG, PNG or TIFF files you need the related libraries and header
|
||||||
|
files installed, otherwise you'll get a message that plug-in xyz will not
|
||||||
|
be built.
|
||||||
|
|
||||||
|
If you are sure that those libraries are correctly installed, but configure
|
||||||
|
fails to detect them, the following might help:
|
||||||
|
|
||||||
|
Set your LDFLAGS environment variable to look for the library in a certain
|
||||||
|
place, e.g. if you are working in a bash shell you would say:
|
||||||
|
export LDFLAGS="-L<path_to_library> -L<path_to_another_one>"
|
||||||
|
before you run configure.
|
||||||
|
|
||||||
|
Set your CPPFLAGS environment variable to look for the header file in a
|
||||||
|
certain place, e.g. if you are working in a bash shell you would say:
|
||||||
|
export CPPFLAGS="-I<path_to_header_file> -I<path_to_another_one>"
|
||||||
|
before you run meson.
|
||||||
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
|
||||||
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
|
||||||
107
README
Normal file
107
README
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
------------------------------
|
||||||
|
Photo and Image Kooker Application
|
||||||
|
2.99 Development Branch
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
This is an unstable development release, an intermediate state on the
|
||||||
|
way to the next stable release: PIKA 3.0. PIKA 2.99 may or may not do
|
||||||
|
what you expect. Save your work early and often. If you want a stable
|
||||||
|
version, please use PIKA 2.10 instead.
|
||||||
|
|
||||||
|
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 you want to hack on PIKA, please read the file devel-docs/README.md.
|
||||||
|
For detailed installation instructions, see the file INSTALL.
|
||||||
|
|
||||||
|
|
||||||
|
1. Web Resources
|
||||||
|
================
|
||||||
|
|
||||||
|
PIKA's home page is at:
|
||||||
|
|
||||||
|
https://heckin.technology/AlderconeStudio/PIKApp/
|
||||||
|
|
||||||
|
Please be sure to visit this site for information, documentation,
|
||||||
|
tutorials, news, etc. All things PIKA-ish are available from there.
|
||||||
|
|
||||||
|
The latest version of PIKA can be found at:
|
||||||
|
|
||||||
|
https://heckin.technology/AlderconeStudio/PIKApp/downloads/
|
||||||
|
|
||||||
|
|
||||||
|
2. Contributing
|
||||||
|
===============
|
||||||
|
|
||||||
|
PIKA source code can be found at:
|
||||||
|
|
||||||
|
https://gitlab.gnome.org/GNOME/pika/
|
||||||
|
|
||||||
|
Resources for contributors:
|
||||||
|
|
||||||
|
https://developer.pika.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.pika.org/core/setup/
|
||||||
|
* PIKA Coding Style: https://developer.pika.org/core/coding_style/
|
||||||
|
* Submit your first patch: https://developer.pika.org/core/submit-patch/
|
||||||
|
|
||||||
|
|
||||||
|
3. Discussion Channels
|
||||||
|
======================
|
||||||
|
|
||||||
|
We have several discussion channels dedicated to PIKA user and
|
||||||
|
development discussion. There is more info at:
|
||||||
|
|
||||||
|
https://heckin.technology/AlderconeStudio/PIKApp/discuss.html
|
||||||
|
|
||||||
|
Links to several archives of the mailing lists are included in that page.
|
||||||
|
|
||||||
|
Pika-user-list is a mailing list dedicated to user problems, hints and
|
||||||
|
tips, discussion of cool effects, etc. Gimp-developer-list is oriented
|
||||||
|
to PIKA core and plug-in developers. Gimp-gui-list is for discussing
|
||||||
|
about PIKA interface to improve user experience. Most people will only
|
||||||
|
want to be subscribed to pika-user-list. If you want to help develop
|
||||||
|
PIKA, the pika-developer mailing list is a good starting point; if you
|
||||||
|
want to help with GUI design, the pika-gui list is where you want to
|
||||||
|
subscribe.
|
||||||
|
|
||||||
|
Other discussion channels can be listed on this page when they are
|
||||||
|
moderated by a team member, such as forums.
|
||||||
|
|
||||||
|
Finally, for the real junkies, there are IRC channels devoted to PIKA.
|
||||||
|
On PIKANet (a private free software oriented network) there is #pika.
|
||||||
|
Many of the developers hang out there. Some of the PIKANet servers are:
|
||||||
|
|
||||||
|
irc.gimp.org:6667
|
||||||
|
irc.us.gimp.org:6667
|
||||||
|
irc.eu.gimp.org:6667
|
||||||
|
|
||||||
|
|
||||||
|
4. Customizing
|
||||||
|
==============
|
||||||
|
|
||||||
|
The look of PIKA'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, PIKA reads `${XDG_CONFIG_HOME}/PIKA/2.99/pika.css` so you
|
||||||
|
can have settings that only apply to PIKA.
|
||||||
|
|
||||||
|
You can also manually change the keybindings to any of your choice by
|
||||||
|
editing: `${XDG_CONFIG_HOME}/PIKA/2.99/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 PIKA translation can be checked at
|
||||||
|
|
||||||
|
https://l10n.gnome.org/module/pika
|
||||||
|
|
||||||
|
|
||||||
|
Translation of the Photo and Image Kooker Application 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/).
|
||||||
|
|
||||||
|
|
||||||
|
PIKA is different
|
||||||
|
|
||||||
|
PIKA 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 PIKA's UI, you
|
||||||
|
will have to add translations for the following catalogs:
|
||||||
|
|
||||||
|
po/pika20.po -- the core
|
||||||
|
po-libpika/pika20-libpika.pot -- the libpika library
|
||||||
|
po-plugins/pika20-std-plugins.pot -- the C plug-ins
|
||||||
|
po-python/pika20-python.pot -- the pypika plug-ins
|
||||||
|
po-script-fu/pika20-script-fu.pot -- the script-fu scripts
|
||||||
|
po-tips/pika20-tips.pot -- the startup tips
|
||||||
|
po-windows-installer/pika20-windows-installer.pot -- the windows installer
|
||||||
|
|
||||||
|
If you are looking for the translations of pika-perl, please note that
|
||||||
|
pika-perl has been moved into it's own git module called
|
||||||
|
pika-perl.
|
||||||
|
|
||||||
|
|
||||||
|
PIKA Tips dialog
|
||||||
|
|
||||||
|
In addition to message catalogs PIKA 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 pika-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 pika-tips.xml with language
|
||||||
|
identifiers taken from the po filename.
|
||||||
|
|
||||||
|
PIKA needs to know what language it should select from pika-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 PIKA)
|
||||||
|
can't have their messages in the pika-std-plugins textdomain. We
|
||||||
|
have therefore provided a mechanism that allows plug-ins to install
|
||||||
|
their own message catalogs and tell PIKA to bind to that
|
||||||
|
textdomain. This is necessary so that PIKA can correctly translate
|
||||||
|
the menu paths the plug-in registers. Basically the plug-in has to
|
||||||
|
call pika_plugin_domain_add() or pika_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.
|
||||||
31
app-tools/meson.build
Normal file
31
app-tools/meson.build
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
if platform_windows or platform_osx
|
||||||
|
pika_debug_tool_dir = get_option('bindir')
|
||||||
|
else
|
||||||
|
pika_debug_tool_dir = get_option('libexecdir')
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
pika_debug_tool = executable('pika-debug-tool' + exec_ver,
|
||||||
|
'pika-debug-tool.c',
|
||||||
|
include_directories: rootInclude,
|
||||||
|
dependencies: [
|
||||||
|
fontconfig,
|
||||||
|
gio,
|
||||||
|
gegl,
|
||||||
|
gtk3,
|
||||||
|
],
|
||||||
|
link_with: [
|
||||||
|
libapp,
|
||||||
|
libappwidgets,
|
||||||
|
libpikabase,
|
||||||
|
],
|
||||||
|
install: true,
|
||||||
|
install_dir: pika_debug_tool_dir
|
||||||
|
)
|
||||||
|
|
||||||
|
if enable_default_bin and meson.version().version_compare('>=0.61.0')
|
||||||
|
install_symlink(fs.name(pika_debug_tool.full_path()).replace(exec_ver, ''),
|
||||||
|
pointing_to: fs.name(pika_debug_tool.full_path()),
|
||||||
|
install_dir: pika_debug_tool_dir
|
||||||
|
)
|
||||||
|
endif
|
||||||
102
app-tools/pika-debug-tool.c
Normal file
102
app-tools/pika-debug-tool.c
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
/* pikadebug
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* PikaDebug 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/pikacriticaldialog.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: pika-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 = pika_critical_dialog_new (_("PIKA Crash Debug"), last_version,
|
||||||
|
release_date ? g_ascii_strtoll (release_date, NULL, 10) : -1);
|
||||||
|
pika_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);
|
||||||
|
}
|
||||||
57
app/about.h
Normal file
57
app/about.h
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 PIKA_ACRONYM \
|
||||||
|
_("PIKA")
|
||||||
|
|
||||||
|
#define PIKA_NAME \
|
||||||
|
_("Photo and Image Kooker Application")
|
||||||
|
|
||||||
|
/* The year of the last commit (UTC) will be inserted into this string. */
|
||||||
|
#define PIKA_COPYRIGHT \
|
||||||
|
_("Copyright © 1995-%s\n" \
|
||||||
|
"Based on work by Spencer Kimball, Peter Mattis and the GnuImp 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 PIKA_LICENSE \
|
||||||
|
_("PIKA 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" \
|
||||||
|
"PIKA 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 PIKA. If not, see: https://www.gnu.org/licenses/")
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __ABOUT_H__ */
|
||||||
58
app/actions/actions-types.h
Normal file
58
app/actions/actions-types.h
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
PIKA_ACTION_SELECT_SET = 0,
|
||||||
|
PIKA_ACTION_SELECT_SET_TO_DEFAULT = -1,
|
||||||
|
PIKA_ACTION_SELECT_FIRST = -2,
|
||||||
|
PIKA_ACTION_SELECT_LAST = -3,
|
||||||
|
PIKA_ACTION_SELECT_SMALL_PREVIOUS = -4,
|
||||||
|
PIKA_ACTION_SELECT_SMALL_NEXT = -5,
|
||||||
|
PIKA_ACTION_SELECT_PREVIOUS = -6,
|
||||||
|
PIKA_ACTION_SELECT_NEXT = -7,
|
||||||
|
PIKA_ACTION_SELECT_SKIP_PREVIOUS = -8,
|
||||||
|
PIKA_ACTION_SELECT_SKIP_NEXT = -9,
|
||||||
|
PIKA_ACTION_SELECT_PERCENT_PREVIOUS = -10,
|
||||||
|
PIKA_ACTION_SELECT_PERCENT_NEXT = -11
|
||||||
|
} PikaActionSelectType;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
PIKA_SAVE_MODE_SAVE,
|
||||||
|
PIKA_SAVE_MODE_SAVE_AS,
|
||||||
|
PIKA_SAVE_MODE_SAVE_A_COPY,
|
||||||
|
PIKA_SAVE_MODE_SAVE_AND_CLOSE,
|
||||||
|
PIKA_SAVE_MODE_EXPORT,
|
||||||
|
PIKA_SAVE_MODE_EXPORT_AS,
|
||||||
|
PIKA_SAVE_MODE_OVERWRITE
|
||||||
|
} PikaSaveMode;
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __ACTIONS_TYPES_H__ */
|
||||||
775
app/actions/actions.c
Normal file
775
app/actions/actions.c
Normal file
@ -0,0 +1,775 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pika.h"
|
||||||
|
#include "core/pikacontainer.h"
|
||||||
|
#include "core/pikacontext.h"
|
||||||
|
#include "core/pikaimage.h"
|
||||||
|
#include "core/pikatooloptions.h"
|
||||||
|
#include "core/pikatoolinfo.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaactionfactory.h"
|
||||||
|
#include "widgets/pikaactiongroup.h"
|
||||||
|
#include "widgets/pikacontainereditor.h"
|
||||||
|
#include "widgets/pikacontainerview.h"
|
||||||
|
#include "widgets/pikadock.h"
|
||||||
|
#include "widgets/pikadockable.h"
|
||||||
|
#include "widgets/pikadockwindow.h"
|
||||||
|
#include "widgets/pikaimageeditor.h"
|
||||||
|
#include "widgets/pikaitemtreeview.h"
|
||||||
|
|
||||||
|
#include "display/pikadisplay.h"
|
||||||
|
#include "display/pikadisplayshell.h"
|
||||||
|
#include "display/pikaimagewindow.h"
|
||||||
|
#include "display/pikanavigationeditor.h"
|
||||||
|
#include "display/pikastatusbar.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 "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 "vectors-actions.h"
|
||||||
|
#include "view-actions.h"
|
||||||
|
#include "windows-actions.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* global variables */
|
||||||
|
|
||||||
|
PikaActionFactory *global_action_factory = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
/* private variables */
|
||||||
|
|
||||||
|
static const PikaActionFactoryEntry action_groups[] =
|
||||||
|
{
|
||||||
|
{ "brush-editor", N_("Brush Editor"), PIKA_ICON_BRUSH,
|
||||||
|
brush_editor_actions_setup,
|
||||||
|
brush_editor_actions_update },
|
||||||
|
{ "brushes", N_("Brushes"), PIKA_ICON_BRUSH,
|
||||||
|
brushes_actions_setup,
|
||||||
|
brushes_actions_update },
|
||||||
|
{ "buffers", N_("Buffers"), PIKA_ICON_BUFFER,
|
||||||
|
buffers_actions_setup,
|
||||||
|
buffers_actions_update },
|
||||||
|
{ "channels", N_("Channels"), PIKA_ICON_CHANNEL,
|
||||||
|
channels_actions_setup,
|
||||||
|
channels_actions_update },
|
||||||
|
{ "colormap", N_("Colormap"), PIKA_ICON_COLORMAP,
|
||||||
|
colormap_actions_setup,
|
||||||
|
colormap_actions_update },
|
||||||
|
{ "context", N_("Context"), PIKA_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"), PIKA_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"), PIKA_ICON_LAYER,
|
||||||
|
drawable_actions_setup,
|
||||||
|
drawable_actions_update },
|
||||||
|
{ "dynamics", N_("Paint Dynamics"), PIKA_ICON_DYNAMICS,
|
||||||
|
dynamics_actions_setup,
|
||||||
|
dynamics_actions_update },
|
||||||
|
{ "dynamics-editor", N_("Paint Dynamics Editor"), PIKA_ICON_DYNAMICS,
|
||||||
|
dynamics_editor_actions_setup,
|
||||||
|
dynamics_editor_actions_update },
|
||||||
|
{ "edit", N_("Edit"), PIKA_ICON_EDIT,
|
||||||
|
edit_actions_setup,
|
||||||
|
edit_actions_update },
|
||||||
|
{ "error-console", N_("Error Console"), PIKA_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"), PIKA_ICON_GEGL,
|
||||||
|
filters_actions_setup,
|
||||||
|
filters_actions_update },
|
||||||
|
{ "fonts", N_("Fonts"), PIKA_ICON_FONT,
|
||||||
|
fonts_actions_setup,
|
||||||
|
fonts_actions_update },
|
||||||
|
{ "gradient-editor", N_("Gradient Editor"), PIKA_ICON_GRADIENT,
|
||||||
|
gradient_editor_actions_setup,
|
||||||
|
gradient_editor_actions_update },
|
||||||
|
{ "gradients", N_("Gradients"), PIKA_ICON_GRADIENT,
|
||||||
|
gradients_actions_setup,
|
||||||
|
gradients_actions_update },
|
||||||
|
{ "tool-presets", N_("Tool Presets"), PIKA_ICON_TOOL_PRESET,
|
||||||
|
tool_presets_actions_setup,
|
||||||
|
tool_presets_actions_update },
|
||||||
|
{ "tool-preset-editor", N_("Tool Preset Editor"), PIKA_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"), PIKA_ICON_IMAGE,
|
||||||
|
image_actions_setup,
|
||||||
|
image_actions_update },
|
||||||
|
{ "images", N_("Images"), PIKA_ICON_IMAGE,
|
||||||
|
images_actions_setup,
|
||||||
|
images_actions_update },
|
||||||
|
{ "layers", N_("Layers"), PIKA_ICON_LAYER,
|
||||||
|
layers_actions_setup,
|
||||||
|
layers_actions_update },
|
||||||
|
{ "mypaint-brushes", N_("MyPaint Brushes"), PIKA_ICON_MYPAINT_BRUSH,
|
||||||
|
mypaint_brushes_actions_setup,
|
||||||
|
mypaint_brushes_actions_update },
|
||||||
|
{ "palette-editor", N_("Palette Editor"), PIKA_ICON_PALETTE,
|
||||||
|
palette_editor_actions_setup,
|
||||||
|
palette_editor_actions_update },
|
||||||
|
{ "palettes", N_("Palettes"), PIKA_ICON_PALETTE,
|
||||||
|
palettes_actions_setup,
|
||||||
|
palettes_actions_update },
|
||||||
|
{ "patterns", N_("Patterns"), PIKA_ICON_PATTERN,
|
||||||
|
patterns_actions_setup,
|
||||||
|
patterns_actions_update },
|
||||||
|
{ "plug-in", N_("Plug-ins"), PIKA_ICON_PLUGIN,
|
||||||
|
plug_in_actions_setup,
|
||||||
|
plug_in_actions_update },
|
||||||
|
{ "quick-mask", N_("Quick Mask"), PIKA_ICON_QUICK_MASK_ON,
|
||||||
|
quick_mask_actions_setup,
|
||||||
|
quick_mask_actions_update },
|
||||||
|
{ "sample-points", N_("Sample Points"), PIKA_ICON_SAMPLE_POINT,
|
||||||
|
sample_points_actions_setup,
|
||||||
|
sample_points_actions_update },
|
||||||
|
{ "select", N_("Select"), PIKA_ICON_SELECTION,
|
||||||
|
select_actions_setup,
|
||||||
|
select_actions_update },
|
||||||
|
{ "templates", N_("Templates"), PIKA_ICON_TEMPLATE,
|
||||||
|
templates_actions_setup,
|
||||||
|
templates_actions_update },
|
||||||
|
{ "text-tool", N_("Text Tool"), PIKA_ICON_EDIT,
|
||||||
|
text_tool_actions_setup,
|
||||||
|
text_tool_actions_update },
|
||||||
|
{ "text-editor", N_("Text Editor"), PIKA_ICON_EDIT,
|
||||||
|
text_editor_actions_setup,
|
||||||
|
text_editor_actions_update },
|
||||||
|
{ "tool-options", N_("Tool Options"), PIKA_ICON_DIALOG_TOOL_OPTIONS,
|
||||||
|
tool_options_actions_setup,
|
||||||
|
tool_options_actions_update },
|
||||||
|
{ "tools", N_("Tools"), PIKA_ICON_DIALOG_TOOLS,
|
||||||
|
tools_actions_setup,
|
||||||
|
tools_actions_update },
|
||||||
|
{ "vector-toolpath", N_("Path Toolpath"), PIKA_ICON_PATH,
|
||||||
|
vector_toolpath_actions_setup,
|
||||||
|
vector_toolpath_actions_update },
|
||||||
|
{ "vectors", N_("Paths"), PIKA_ICON_PATH,
|
||||||
|
vectors_actions_setup,
|
||||||
|
vectors_actions_update },
|
||||||
|
{ "view", N_("View"), PIKA_ICON_VISIBLE,
|
||||||
|
view_actions_setup,
|
||||||
|
view_actions_update },
|
||||||
|
{ "windows", N_("Windows"), NULL,
|
||||||
|
windows_actions_setup,
|
||||||
|
windows_actions_update }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* public functions */
|
||||||
|
|
||||||
|
void
|
||||||
|
actions_init (Pika *pika)
|
||||||
|
{
|
||||||
|
gint i;
|
||||||
|
|
||||||
|
g_return_if_fail (PIKA_IS_PIKA (pika));
|
||||||
|
g_return_if_fail (global_action_factory == NULL);
|
||||||
|
|
||||||
|
global_action_factory = pika_action_factory_new (pika);
|
||||||
|
|
||||||
|
for (i = 0; i < G_N_ELEMENTS (action_groups); i++)
|
||||||
|
pika_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 (Pika *pika)
|
||||||
|
{
|
||||||
|
g_return_if_fail (PIKA_IS_PIKA (pika));
|
||||||
|
g_return_if_fail (global_action_factory != NULL);
|
||||||
|
g_return_if_fail (global_action_factory->pika == pika);
|
||||||
|
|
||||||
|
g_clear_object (&global_action_factory);
|
||||||
|
}
|
||||||
|
|
||||||
|
Pika *
|
||||||
|
action_data_get_pika (gpointer data)
|
||||||
|
{
|
||||||
|
Pika *result = NULL;
|
||||||
|
static gboolean recursion = FALSE;
|
||||||
|
|
||||||
|
if (! data || recursion)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
recursion = TRUE;
|
||||||
|
|
||||||
|
if (PIKA_IS_PIKA (data))
|
||||||
|
result = data;
|
||||||
|
|
||||||
|
if (! result)
|
||||||
|
{
|
||||||
|
PikaDisplay *display = action_data_get_display (data);
|
||||||
|
|
||||||
|
if (display)
|
||||||
|
result = display->pika;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! result)
|
||||||
|
{
|
||||||
|
PikaContext *context = action_data_get_context (data);
|
||||||
|
|
||||||
|
if (context)
|
||||||
|
result = context->pika;
|
||||||
|
}
|
||||||
|
|
||||||
|
recursion = FALSE;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
PikaContext *
|
||||||
|
action_data_get_context (gpointer data)
|
||||||
|
{
|
||||||
|
PikaContext *result = NULL;
|
||||||
|
static gboolean recursion = FALSE;
|
||||||
|
|
||||||
|
if (! data || recursion)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
recursion = TRUE;
|
||||||
|
|
||||||
|
if (PIKA_IS_DOCK (data))
|
||||||
|
result = pika_dock_get_context ((PikaDock *) data);
|
||||||
|
else if (PIKA_IS_DOCK_WINDOW (data))
|
||||||
|
result = pika_dock_window_get_context (((PikaDockWindow *) data));
|
||||||
|
else if (PIKA_IS_CONTAINER_VIEW (data))
|
||||||
|
result = pika_container_view_get_context ((PikaContainerView *) data);
|
||||||
|
else if (PIKA_IS_CONTAINER_EDITOR (data))
|
||||||
|
result = pika_container_view_get_context (((PikaContainerEditor *) data)->view);
|
||||||
|
else if (PIKA_IS_IMAGE_EDITOR (data))
|
||||||
|
result = ((PikaImageEditor *) data)->context;
|
||||||
|
else if (PIKA_IS_NAVIGATION_EDITOR (data))
|
||||||
|
result = ((PikaNavigationEditor *) data)->context;
|
||||||
|
|
||||||
|
if (! result)
|
||||||
|
{
|
||||||
|
Pika *pika = action_data_get_pika (data);
|
||||||
|
|
||||||
|
if (pika)
|
||||||
|
result = pika_get_user_context (pika);
|
||||||
|
}
|
||||||
|
|
||||||
|
recursion = FALSE;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
PikaImage *
|
||||||
|
action_data_get_image (gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *result = NULL;
|
||||||
|
static gboolean recursion = FALSE;
|
||||||
|
|
||||||
|
if (! data || recursion)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
recursion = TRUE;
|
||||||
|
|
||||||
|
if (PIKA_IS_ITEM_TREE_VIEW (data))
|
||||||
|
{
|
||||||
|
result = pika_item_tree_view_get_image ((PikaItemTreeView *) data);
|
||||||
|
recursion = FALSE;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else if (PIKA_IS_IMAGE_EDITOR (data))
|
||||||
|
{
|
||||||
|
result = ((PikaImageEditor *) data)->image;
|
||||||
|
recursion = FALSE;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! result)
|
||||||
|
{
|
||||||
|
PikaDisplay *display = action_data_get_display (data);
|
||||||
|
|
||||||
|
if (display)
|
||||||
|
result = pika_display_get_image (display);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! result)
|
||||||
|
{
|
||||||
|
PikaContext *context = action_data_get_context (data);
|
||||||
|
|
||||||
|
if (context)
|
||||||
|
result = pika_context_get_image (context);
|
||||||
|
}
|
||||||
|
|
||||||
|
recursion = FALSE;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
PikaDisplay *
|
||||||
|
action_data_get_display (gpointer data)
|
||||||
|
{
|
||||||
|
PikaDisplay *result = NULL;
|
||||||
|
static gboolean recursion = FALSE;
|
||||||
|
|
||||||
|
if (! data || recursion)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
recursion = TRUE;
|
||||||
|
|
||||||
|
if (PIKA_IS_DISPLAY (data))
|
||||||
|
result = data;
|
||||||
|
else if (PIKA_IS_IMAGE_WINDOW (data))
|
||||||
|
{
|
||||||
|
PikaDisplayShell *shell = pika_image_window_get_active_shell (data);
|
||||||
|
result = shell ? shell->display : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! result)
|
||||||
|
{
|
||||||
|
PikaContext *context = action_data_get_context (data);
|
||||||
|
|
||||||
|
if (context)
|
||||||
|
result = pika_context_get_display (context);
|
||||||
|
}
|
||||||
|
|
||||||
|
recursion = FALSE;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
PikaDisplayShell *
|
||||||
|
action_data_get_shell (gpointer data)
|
||||||
|
{
|
||||||
|
PikaDisplayShell *result = NULL;
|
||||||
|
static gboolean recursion = FALSE;
|
||||||
|
|
||||||
|
if (! data || recursion)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
recursion = TRUE;
|
||||||
|
|
||||||
|
if (! result)
|
||||||
|
{
|
||||||
|
PikaDisplay *display = action_data_get_display (data);
|
||||||
|
|
||||||
|
if (display)
|
||||||
|
result = pika_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)
|
||||||
|
{
|
||||||
|
PikaDisplay *display = action_data_get_display (data);
|
||||||
|
|
||||||
|
if (display)
|
||||||
|
result = GTK_WIDGET (pika_display_get_shell (display));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! result)
|
||||||
|
result = dialogs_get_toolbox ();
|
||||||
|
|
||||||
|
recursion = FALSE;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
gint
|
||||||
|
action_data_sel_count (gpointer data)
|
||||||
|
{
|
||||||
|
if (PIKA_IS_CONTAINER_EDITOR (data))
|
||||||
|
{
|
||||||
|
PikaContainerEditor *editor;
|
||||||
|
|
||||||
|
editor = PIKA_CONTAINER_EDITOR (data);
|
||||||
|
return pika_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 (PikaActionSelectType 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 PIKA_ACTION_SELECT_SET_TO_DEFAULT:
|
||||||
|
value = def;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PIKA_ACTION_SELECT_FIRST:
|
||||||
|
value = min;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PIKA_ACTION_SELECT_LAST:
|
||||||
|
value = max;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PIKA_ACTION_SELECT_SMALL_PREVIOUS:
|
||||||
|
value -= small_inc;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PIKA_ACTION_SELECT_SMALL_NEXT:
|
||||||
|
value += small_inc;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PIKA_ACTION_SELECT_PREVIOUS:
|
||||||
|
value -= inc;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PIKA_ACTION_SELECT_NEXT:
|
||||||
|
value += inc;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PIKA_ACTION_SELECT_SKIP_PREVIOUS:
|
||||||
|
value -= skip_inc;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PIKA_ACTION_SELECT_SKIP_NEXT:
|
||||||
|
value += skip_inc;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PIKA_ACTION_SELECT_PERCENT_PREVIOUS:
|
||||||
|
g_return_val_if_fail (delta_factor >= 0.0, value);
|
||||||
|
value /= (1.0 + delta_factor);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PIKA_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 (PikaActionSelectType select_type,
|
||||||
|
PikaDisplay *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 || PIKA_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 ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PikaObject *
|
||||||
|
action_select_object (PikaActionSelectType select_type,
|
||||||
|
PikaContainer *container,
|
||||||
|
PikaObject *current)
|
||||||
|
{
|
||||||
|
gint select_index;
|
||||||
|
gint n_children;
|
||||||
|
|
||||||
|
g_return_val_if_fail (PIKA_IS_CONTAINER (container), NULL);
|
||||||
|
g_return_val_if_fail (current == NULL || PIKA_IS_OBJECT (current), NULL);
|
||||||
|
|
||||||
|
if (! current &&
|
||||||
|
select_type != PIKA_ACTION_SELECT_FIRST &&
|
||||||
|
select_type != PIKA_ACTION_SELECT_LAST)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
n_children = pika_container_get_n_children (container);
|
||||||
|
|
||||||
|
if (n_children == 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
switch (select_type)
|
||||||
|
{
|
||||||
|
case PIKA_ACTION_SELECT_FIRST:
|
||||||
|
select_index = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PIKA_ACTION_SELECT_LAST:
|
||||||
|
select_index = n_children - 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PIKA_ACTION_SELECT_PREVIOUS:
|
||||||
|
select_index = pika_container_get_child_index (container, current) - 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PIKA_ACTION_SELECT_NEXT:
|
||||||
|
select_index = pika_container_get_child_index (container, current) + 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PIKA_ACTION_SELECT_SKIP_PREVIOUS:
|
||||||
|
select_index = pika_container_get_child_index (container, current) - 10;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PIKA_ACTION_SELECT_SKIP_NEXT:
|
||||||
|
select_index = pika_container_get_child_index (container, current) + 10;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if ((gint) select_type >= 0)
|
||||||
|
select_index = (gint) select_type;
|
||||||
|
else
|
||||||
|
g_return_val_if_reached (current);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
select_index = CLAMP (select_index, 0, n_children - 1);
|
||||||
|
|
||||||
|
return pika_container_get_child_by_index (container, select_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
action_message (PikaDisplay *display,
|
||||||
|
GObject *object,
|
||||||
|
const gchar *format,
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
PikaDisplayShell *shell = pika_display_get_shell (display);
|
||||||
|
PikaStatusbar *statusbar = pika_display_shell_get_statusbar (shell);
|
||||||
|
const gchar *icon_name = NULL;
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
if (PIKA_IS_TOOL_OPTIONS (object))
|
||||||
|
{
|
||||||
|
PikaToolInfo *tool_info = PIKA_TOOL_OPTIONS (object)->tool_info;
|
||||||
|
|
||||||
|
icon_name = pika_viewable_get_icon_name (PIKA_VIEWABLE (tool_info));
|
||||||
|
}
|
||||||
|
else if (PIKA_IS_VIEWABLE (object))
|
||||||
|
{
|
||||||
|
icon_name = pika_viewable_get_icon_name (PIKA_VIEWABLE (object));
|
||||||
|
}
|
||||||
|
|
||||||
|
va_start (args, format);
|
||||||
|
pika_statusbar_push_temp_valist (statusbar, PIKA_MESSAGE_INFO,
|
||||||
|
icon_name, format, args);
|
||||||
|
va_end (args);
|
||||||
|
}
|
||||||
123
app/actions/actions.h
Normal file
123
app/actions/actions.h
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 PikaActionFactory *global_action_factory;
|
||||||
|
|
||||||
|
|
||||||
|
void actions_init (Pika *pika);
|
||||||
|
void actions_exit (Pika *pika);
|
||||||
|
|
||||||
|
Pika * action_data_get_pika (gpointer data);
|
||||||
|
PikaContext * action_data_get_context (gpointer data);
|
||||||
|
PikaImage * action_data_get_image (gpointer data);
|
||||||
|
PikaDisplay * action_data_get_display (gpointer data);
|
||||||
|
PikaDisplayShell * action_data_get_shell (gpointer data);
|
||||||
|
GtkWidget * action_data_get_widget (gpointer data);
|
||||||
|
gint action_data_sel_count (gpointer data);
|
||||||
|
|
||||||
|
gdouble action_select_value (PikaActionSelectType 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 (PikaActionSelectType select_type,
|
||||||
|
PikaDisplay *display,
|
||||||
|
GObject *object,
|
||||||
|
const gchar *property_name,
|
||||||
|
gdouble small_inc,
|
||||||
|
gdouble inc,
|
||||||
|
gdouble skip_inc,
|
||||||
|
gdouble delta_factor,
|
||||||
|
gboolean wrap);
|
||||||
|
PikaObject * action_select_object (PikaActionSelectType select_type,
|
||||||
|
PikaContainer *container,
|
||||||
|
PikaObject *current);
|
||||||
|
void action_message (PikaDisplay *display,
|
||||||
|
GObject *object,
|
||||||
|
const gchar *format,
|
||||||
|
...) G_GNUC_PRINTF(3,4);
|
||||||
|
|
||||||
|
|
||||||
|
#define return_if_no_pika(pika,data) \
|
||||||
|
pika = action_data_get_pika (data); \
|
||||||
|
if (! pika) \
|
||||||
|
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 = pika_image_get_selected_drawables (image); \
|
||||||
|
if (! drawables) \
|
||||||
|
return
|
||||||
|
|
||||||
|
#define return_if_no_layers(image,layers,data) \
|
||||||
|
return_if_no_image (image,data); \
|
||||||
|
layers = pika_image_get_selected_layers (image); \
|
||||||
|
if (! layers) \
|
||||||
|
return
|
||||||
|
|
||||||
|
#define return_if_no_channels(image,channels,data) \
|
||||||
|
return_if_no_image (image,data); \
|
||||||
|
channels = pika_image_get_selected_channels (image); \
|
||||||
|
if (! channels) \
|
||||||
|
return
|
||||||
|
|
||||||
|
#define return_if_no_vectors_list(image,list,data) \
|
||||||
|
return_if_no_image (image,data); \
|
||||||
|
list = pika_image_get_selected_vectors (image); \
|
||||||
|
if (! list) \
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __ACTIONS_H__ */
|
||||||
80
app/actions/brush-editor-actions.c
Normal file
80
app/actions/brush-editor-actions.c
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pika.h"
|
||||||
|
#include "core/pikacontext.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaactiongroup.h"
|
||||||
|
#include "widgets/pikahelp-ids.h"
|
||||||
|
#include "widgets/pikabrusheditor.h"
|
||||||
|
|
||||||
|
#include "brush-editor-actions.h"
|
||||||
|
#include "data-editor-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const PikaToggleActionEntry brush_editor_toggle_actions[] =
|
||||||
|
{
|
||||||
|
{ "brush-editor-edit-active", PIKA_ICON_LINKED,
|
||||||
|
NC_("brush-editor-action", "Edit Active Brush"), NULL, { NULL }, NULL,
|
||||||
|
data_editor_edit_active_cmd_callback,
|
||||||
|
FALSE,
|
||||||
|
PIKA_HELP_BRUSH_EDITOR_EDIT_ACTIVE }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
brush_editor_actions_setup (PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
pika_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 (PikaActionGroup *group,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
PikaDataEditor *data_editor = PIKA_DATA_EDITOR (user_data);
|
||||||
|
gboolean edit_active = FALSE;
|
||||||
|
|
||||||
|
edit_active = pika_data_editor_get_edit_active (data_editor);
|
||||||
|
|
||||||
|
#define SET_SENSITIVE(action,condition) \
|
||||||
|
pika_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||||
|
#define SET_ACTIVE(action,condition) \
|
||||||
|
pika_action_group_set_action_active (group, action, (condition) != 0)
|
||||||
|
|
||||||
|
SET_ACTIVE ("brush-editor-edit-active", edit_active);
|
||||||
|
|
||||||
|
#undef SET_SENSITIVE
|
||||||
|
#undef SET_ACTIVE
|
||||||
|
}
|
||||||
31
app/actions/brush-editor-actions.h
Normal file
31
app/actions/brush-editor-actions.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaActionGroup *group);
|
||||||
|
void brush_editor_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __BRUSH_EDITOR_ACTIONS_H__ */
|
||||||
149
app/actions/brushes-actions.c
Normal file
149
app/actions/brushes-actions.c
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pikabrushgenerated.h"
|
||||||
|
#include "core/pikacontext.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaactiongroup.h"
|
||||||
|
#include "widgets/pikahelp-ids.h"
|
||||||
|
|
||||||
|
#include "actions.h"
|
||||||
|
#include "brushes-actions.h"
|
||||||
|
#include "data-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const PikaActionEntry brushes_actions[] =
|
||||||
|
{
|
||||||
|
{ "brushes-open-as-image", PIKA_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,
|
||||||
|
PIKA_HELP_BRUSH_OPEN_AS_IMAGE },
|
||||||
|
|
||||||
|
{ "brushes-new", PIKA_ICON_DOCUMENT_NEW,
|
||||||
|
NC_("brushes-action", "_New Brush"), NULL, { NULL },
|
||||||
|
NC_("brushes-action", "Create a new brush"),
|
||||||
|
data_new_cmd_callback,
|
||||||
|
PIKA_HELP_BRUSH_NEW },
|
||||||
|
|
||||||
|
{ "brushes-duplicate", PIKA_ICON_OBJECT_DUPLICATE,
|
||||||
|
NC_("brushes-action", "D_uplicate Brush"), NULL, { NULL },
|
||||||
|
NC_("brushes-action", "Duplicate this brush"),
|
||||||
|
data_duplicate_cmd_callback,
|
||||||
|
PIKA_HELP_BRUSH_DUPLICATE },
|
||||||
|
|
||||||
|
{ "brushes-copy-location", PIKA_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,
|
||||||
|
PIKA_HELP_BRUSH_COPY_LOCATION },
|
||||||
|
|
||||||
|
{ "brushes-show-in-file-manager", PIKA_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,
|
||||||
|
PIKA_HELP_BRUSH_SHOW_IN_FILE_MANAGER },
|
||||||
|
|
||||||
|
{ "brushes-delete", PIKA_ICON_EDIT_DELETE,
|
||||||
|
NC_("brushes-action", "_Delete Brush"), NULL, { NULL },
|
||||||
|
NC_("brushes-action", "Delete this brush"),
|
||||||
|
data_delete_cmd_callback,
|
||||||
|
PIKA_HELP_BRUSH_DELETE },
|
||||||
|
|
||||||
|
{ "brushes-refresh", PIKA_ICON_VIEW_REFRESH,
|
||||||
|
NC_("brushes-action", "_Refresh Brushes"), NULL, { NULL },
|
||||||
|
NC_("brushes-action", "Refresh brushes"),
|
||||||
|
data_refresh_cmd_callback,
|
||||||
|
PIKA_HELP_BRUSH_REFRESH }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaStringActionEntry brushes_edit_actions[] =
|
||||||
|
{
|
||||||
|
{ "brushes-edit", PIKA_ICON_EDIT,
|
||||||
|
NC_("brushes-action", "_Edit Brush..."), NULL, { NULL },
|
||||||
|
NC_("brushes-action", "Edit this brush"),
|
||||||
|
"pika-brush-editor",
|
||||||
|
PIKA_HELP_BRUSH_EDIT }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
brushes_actions_setup (PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
pika_action_group_add_actions (group, "brushes-action",
|
||||||
|
brushes_actions,
|
||||||
|
G_N_ELEMENTS (brushes_actions));
|
||||||
|
|
||||||
|
pika_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 (PikaActionGroup *group,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
PikaContext *context = action_data_get_context (user_data);
|
||||||
|
PikaBrush *brush = NULL;
|
||||||
|
PikaData *data = NULL;
|
||||||
|
GFile *file = NULL;
|
||||||
|
|
||||||
|
if (context)
|
||||||
|
{
|
||||||
|
brush = pika_context_get_brush (context);
|
||||||
|
|
||||||
|
if (action_data_sel_count (user_data) > 1)
|
||||||
|
{
|
||||||
|
brush = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (brush)
|
||||||
|
{
|
||||||
|
data = PIKA_DATA (brush);
|
||||||
|
|
||||||
|
file = pika_data_get_file (data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#define SET_SENSITIVE(action,condition) \
|
||||||
|
pika_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
|
||||||
|
|
||||||
|
SET_SENSITIVE ("brushes-edit", brush);
|
||||||
|
SET_SENSITIVE ("brushes-open-as-image", file && ! PIKA_IS_BRUSH_GENERATED (brush));
|
||||||
|
SET_SENSITIVE ("brushes-duplicate", brush && pika_data_is_duplicatable (data));
|
||||||
|
SET_SENSITIVE ("brushes-copy-location", file);
|
||||||
|
SET_SENSITIVE ("brushes-show-in-file-manager", file);
|
||||||
|
SET_SENSITIVE ("brushes-delete", brush && pika_data_is_deletable (data));
|
||||||
|
|
||||||
|
#undef SET_SENSITIVE
|
||||||
|
}
|
||||||
31
app/actions/brushes-actions.h
Normal file
31
app/actions/brushes-actions.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaActionGroup *group);
|
||||||
|
void brushes_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __BRUSHES_ACTIONS_H__ */
|
||||||
136
app/actions/buffers-actions.c
Normal file
136
app/actions/buffers-actions.c
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pikacontext.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaactiongroup.h"
|
||||||
|
#include "widgets/pikahelp-ids.h"
|
||||||
|
|
||||||
|
#include "actions.h"
|
||||||
|
#include "buffers-actions.h"
|
||||||
|
#include "buffers-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const PikaActionEntry buffers_actions[] =
|
||||||
|
{
|
||||||
|
{ "buffers-paste-as-new-image", PIKA_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,
|
||||||
|
PIKA_HELP_BUFFER_PASTE_AS_NEW_IMAGE },
|
||||||
|
|
||||||
|
{ "buffers-delete", PIKA_ICON_EDIT_DELETE,
|
||||||
|
NC_("buffers-action", "_Delete Buffer"), NULL, { NULL },
|
||||||
|
NC_("buffers-action", "Delete the selected buffer"),
|
||||||
|
buffers_delete_cmd_callback,
|
||||||
|
PIKA_HELP_BUFFER_DELETE }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaEnumActionEntry buffers_paste_actions[] =
|
||||||
|
{
|
||||||
|
{ "buffers-paste", PIKA_ICON_EDIT_PASTE,
|
||||||
|
NC_("buffers-action", "_Paste Buffer"), NULL, { NULL },
|
||||||
|
NC_("buffers-action", "Paste the selected buffer"),
|
||||||
|
PIKA_PASTE_TYPE_FLOATING, FALSE,
|
||||||
|
PIKA_HELP_BUFFER_PASTE },
|
||||||
|
|
||||||
|
{ "buffers-paste-in-place", PIKA_ICON_EDIT_PASTE,
|
||||||
|
NC_("buffers-action", "Paste Buffer In Pl_ace"), NULL, { NULL },
|
||||||
|
NC_("buffers-action", "Paste the selected buffer at its original position"),
|
||||||
|
PIKA_PASTE_TYPE_FLOATING_IN_PLACE, FALSE,
|
||||||
|
PIKA_HELP_BUFFER_PASTE_IN_PLACE },
|
||||||
|
|
||||||
|
{ "buffers-paste-into", PIKA_ICON_EDIT_PASTE_INTO,
|
||||||
|
NC_("buffers-action", "Paste Buffer _Into The Selection"), NULL, { NULL },
|
||||||
|
NC_("buffers-action", "Paste the selected buffer into the selection"),
|
||||||
|
PIKA_PASTE_TYPE_FLOATING_INTO, FALSE,
|
||||||
|
PIKA_HELP_BUFFER_PASTE_INTO },
|
||||||
|
|
||||||
|
{ "buffers-paste-into-in-place", PIKA_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"),
|
||||||
|
PIKA_PASTE_TYPE_FLOATING_INTO_IN_PLACE, FALSE,
|
||||||
|
PIKA_HELP_BUFFER_PASTE_INTO_IN_PLACE },
|
||||||
|
|
||||||
|
{ "buffers-paste-as-new-layer", PIKA_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"),
|
||||||
|
PIKA_PASTE_TYPE_NEW_LAYER, FALSE,
|
||||||
|
PIKA_HELP_BUFFER_PASTE_AS_NEW_LAYER },
|
||||||
|
|
||||||
|
{ "buffers-paste-as-new-layer-in-place", PIKA_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"),
|
||||||
|
PIKA_PASTE_TYPE_NEW_LAYER_IN_PLACE, FALSE,
|
||||||
|
PIKA_HELP_BUFFER_PASTE_AS_NEW_LAYER_IN_PLACE },
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
buffers_actions_setup (PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
pika_action_group_add_actions (group, "buffers-action",
|
||||||
|
buffers_actions,
|
||||||
|
G_N_ELEMENTS (buffers_actions));
|
||||||
|
|
||||||
|
pika_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 (PikaActionGroup *group,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaContext *context = action_data_get_context (data);
|
||||||
|
PikaBuffer *buffer = NULL;
|
||||||
|
|
||||||
|
if (context)
|
||||||
|
buffer = pika_context_get_buffer (context);
|
||||||
|
|
||||||
|
#define SET_SENSITIVE(action,condition,reason) \
|
||||||
|
pika_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
|
||||||
|
}
|
||||||
31
app/actions/buffers-actions.h
Normal file
31
app/actions/buffers-actions.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaActionGroup *group);
|
||||||
|
void buffers_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __BUFFERS_ACTIONS_H__ */
|
||||||
146
app/actions/buffers-commands.c
Normal file
146
app/actions/buffers-commands.c
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pika.h"
|
||||||
|
#include "core/pika-edit.h"
|
||||||
|
#include "core/pikacontainer.h"
|
||||||
|
#include "core/pikacontext.h"
|
||||||
|
#include "core/pikaimage.h"
|
||||||
|
|
||||||
|
#include "widgets/pikacontainereditor.h"
|
||||||
|
#include "widgets/pikacontainerview.h"
|
||||||
|
#include "widgets/pikacontainerview-utils.h"
|
||||||
|
|
||||||
|
#include "display/pikadisplay.h"
|
||||||
|
#include "display/pikadisplayshell.h"
|
||||||
|
#include "display/pikadisplayshell-transform.h"
|
||||||
|
|
||||||
|
#include "buffers-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* public functions */
|
||||||
|
|
||||||
|
void
|
||||||
|
buffers_paste_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaContainerEditor *editor = PIKA_CONTAINER_EDITOR (data);
|
||||||
|
PikaContainer *container;
|
||||||
|
PikaContext *context;
|
||||||
|
PikaBuffer *buffer;
|
||||||
|
PikaPasteType paste_type = (PikaPasteType) g_variant_get_int32 (value);
|
||||||
|
|
||||||
|
container = pika_container_view_get_container (editor->view);
|
||||||
|
context = pika_container_view_get_context (editor->view);
|
||||||
|
|
||||||
|
buffer = pika_context_get_buffer (context);
|
||||||
|
|
||||||
|
if (buffer && pika_container_have (container, PIKA_OBJECT (buffer)))
|
||||||
|
{
|
||||||
|
PikaDisplay *display = pika_context_get_display (context);
|
||||||
|
PikaImage *image = NULL;
|
||||||
|
gint x = -1;
|
||||||
|
gint y = -1;
|
||||||
|
gint width = -1;
|
||||||
|
gint height = -1;
|
||||||
|
|
||||||
|
if (display)
|
||||||
|
{
|
||||||
|
PikaDisplayShell *shell = pika_display_get_shell (display);
|
||||||
|
|
||||||
|
pika_display_shell_untransform_viewport (
|
||||||
|
shell,
|
||||||
|
! pika_display_shell_get_infinite_canvas (shell),
|
||||||
|
&x, &y, &width, &height);
|
||||||
|
|
||||||
|
image = pika_display_get_image (display);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
image = pika_context_get_image (context);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (image)
|
||||||
|
{
|
||||||
|
GList *drawables = pika_image_get_selected_drawables (image);
|
||||||
|
|
||||||
|
g_list_free (pika_edit_paste (image, drawables,
|
||||||
|
PIKA_OBJECT (buffer), paste_type,
|
||||||
|
context, FALSE,
|
||||||
|
x, y, width, height));
|
||||||
|
|
||||||
|
pika_image_flush (image);
|
||||||
|
g_list_free (drawables);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
buffers_paste_as_new_image_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaContainerEditor *editor = PIKA_CONTAINER_EDITOR (data);
|
||||||
|
PikaContainer *container;
|
||||||
|
PikaContext *context;
|
||||||
|
PikaBuffer *buffer;
|
||||||
|
|
||||||
|
container = pika_container_view_get_container (editor->view);
|
||||||
|
context = pika_container_view_get_context (editor->view);
|
||||||
|
|
||||||
|
buffer = pika_context_get_buffer (context);
|
||||||
|
|
||||||
|
if (buffer && pika_container_have (container, PIKA_OBJECT (buffer)))
|
||||||
|
{
|
||||||
|
GtkWidget *widget = GTK_WIDGET (editor);
|
||||||
|
PikaImage *new_image;
|
||||||
|
|
||||||
|
new_image = pika_edit_paste_as_new_image (context->pika,
|
||||||
|
PIKA_OBJECT (buffer),
|
||||||
|
context);
|
||||||
|
pika_create_display (context->pika, new_image,
|
||||||
|
PIKA_UNIT_PIXEL, 1.0,
|
||||||
|
G_OBJECT (pika_widget_get_monitor (widget)));
|
||||||
|
g_object_unref (new_image);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
buffers_delete_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaContainerEditor *editor = PIKA_CONTAINER_EDITOR (data);
|
||||||
|
|
||||||
|
pika_container_view_remove_active (editor->view);
|
||||||
|
}
|
||||||
37
app/actions/buffers-commands.h
Normal file
37
app/actions/buffers-commands.h
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void buffers_paste_as_new_image_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void buffers_delete_cmd_callback (PikaAction *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 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pikaimage.h"
|
||||||
|
#include "core/pikaitem.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaactiongroup.h"
|
||||||
|
#include "widgets/pikacomponenteditor.h"
|
||||||
|
#include "widgets/pikahelp-ids.h"
|
||||||
|
|
||||||
|
#include "actions.h"
|
||||||
|
#include "channels-actions.h"
|
||||||
|
#include "channels-commands.h"
|
||||||
|
#include "items-actions.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const PikaActionEntry channels_actions[] =
|
||||||
|
{
|
||||||
|
{ "channels-edit-attributes", PIKA_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,
|
||||||
|
PIKA_HELP_CHANNEL_EDIT },
|
||||||
|
|
||||||
|
{ "channels-new", PIKA_ICON_DOCUMENT_NEW,
|
||||||
|
NC_("channels-action", "_New Channel..."), NULL, { NULL },
|
||||||
|
NC_("channels-action", "Create a new channel"),
|
||||||
|
channels_new_cmd_callback,
|
||||||
|
PIKA_HELP_CHANNEL_NEW },
|
||||||
|
|
||||||
|
{ "channels-new-last-values", PIKA_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,
|
||||||
|
PIKA_HELP_CHANNEL_NEW },
|
||||||
|
|
||||||
|
{ "channels-duplicate", PIKA_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,
|
||||||
|
PIKA_HELP_CHANNEL_DUPLICATE },
|
||||||
|
|
||||||
|
{ "channels-delete", PIKA_ICON_EDIT_DELETE,
|
||||||
|
NC_("channels-action", "_Delete Channels"), NULL, { NULL },
|
||||||
|
NC_("channels-action", "Delete selected channels"),
|
||||||
|
channels_delete_cmd_callback,
|
||||||
|
PIKA_HELP_CHANNEL_DELETE },
|
||||||
|
|
||||||
|
{ "channels-raise", PIKA_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,
|
||||||
|
PIKA_HELP_CHANNEL_RAISE },
|
||||||
|
|
||||||
|
{ "channels-raise-to-top", PIKA_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,
|
||||||
|
PIKA_HELP_CHANNEL_RAISE_TO_TOP },
|
||||||
|
|
||||||
|
{ "channels-lower", PIKA_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,
|
||||||
|
PIKA_HELP_CHANNEL_LOWER },
|
||||||
|
|
||||||
|
{ "channels-lower-to-bottom", PIKA_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,
|
||||||
|
PIKA_HELP_CHANNEL_LOWER_TO_BOTTOM }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaToggleActionEntry channels_toggle_actions[] =
|
||||||
|
{
|
||||||
|
{ "channels-visible", PIKA_ICON_VISIBLE,
|
||||||
|
NC_("channels-action", "Toggle Channel _Visibility"), NULL, { NULL }, NULL,
|
||||||
|
channels_visible_cmd_callback,
|
||||||
|
FALSE,
|
||||||
|
PIKA_HELP_CHANNEL_VISIBLE },
|
||||||
|
|
||||||
|
{ "channels-lock-content", PIKA_ICON_LOCK_CONTENT,
|
||||||
|
NC_("channels-action", "L_ock Pixels of Channel"), NULL, { NULL }, NULL,
|
||||||
|
channels_lock_content_cmd_callback,
|
||||||
|
FALSE,
|
||||||
|
PIKA_HELP_CHANNEL_LOCK_PIXELS },
|
||||||
|
|
||||||
|
{ "channels-lock-position", PIKA_ICON_LOCK_POSITION,
|
||||||
|
NC_("channels-action", "L_ock Position of Channel"), NULL, { NULL }, NULL,
|
||||||
|
channels_lock_position_cmd_callback,
|
||||||
|
FALSE,
|
||||||
|
PIKA_HELP_CHANNEL_LOCK_POSITION }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaEnumActionEntry channels_color_tag_actions[] =
|
||||||
|
{
|
||||||
|
{ "channels-color-tag-none", PIKA_ICON_EDIT_CLEAR,
|
||||||
|
NC_("channels-action", "None"), NULL, { NULL },
|
||||||
|
NC_("channels-action", "Channel Color Tag: Clear"),
|
||||||
|
PIKA_COLOR_TAG_NONE, FALSE,
|
||||||
|
PIKA_HELP_CHANNEL_COLOR_TAG },
|
||||||
|
|
||||||
|
{ "channels-color-tag-blue", NULL,
|
||||||
|
NC_("channels-action", "Blue"), NULL, { NULL },
|
||||||
|
NC_("channels-action", "Channel Color Tag: Set to Blue"),
|
||||||
|
PIKA_COLOR_TAG_BLUE, FALSE,
|
||||||
|
PIKA_HELP_CHANNEL_COLOR_TAG },
|
||||||
|
|
||||||
|
{ "channels-color-tag-green", NULL,
|
||||||
|
NC_("channels-action", "Green"), NULL, { NULL },
|
||||||
|
NC_("channels-action", "Channel Color Tag: Set to Green"),
|
||||||
|
PIKA_COLOR_TAG_GREEN, FALSE,
|
||||||
|
PIKA_HELP_CHANNEL_COLOR_TAG },
|
||||||
|
|
||||||
|
{ "channels-color-tag-yellow", NULL,
|
||||||
|
NC_("channels-action", "Yellow"), NULL, { NULL },
|
||||||
|
NC_("channels-action", "Channel Color Tag: Set to Yellow"),
|
||||||
|
PIKA_COLOR_TAG_YELLOW, FALSE,
|
||||||
|
PIKA_HELP_CHANNEL_COLOR_TAG },
|
||||||
|
|
||||||
|
{ "channels-color-tag-orange", NULL,
|
||||||
|
NC_("channels-action", "Orange"), NULL, { NULL },
|
||||||
|
NC_("channels-action", "Channel Color Tag: Set to Orange"),
|
||||||
|
PIKA_COLOR_TAG_ORANGE, FALSE,
|
||||||
|
PIKA_HELP_CHANNEL_COLOR_TAG },
|
||||||
|
|
||||||
|
{ "channels-color-tag-brown", NULL,
|
||||||
|
NC_("channels-action", "Brown"), NULL, { NULL },
|
||||||
|
NC_("channels-action", "Channel Color Tag: Set to Brown"),
|
||||||
|
PIKA_COLOR_TAG_BROWN, FALSE,
|
||||||
|
PIKA_HELP_CHANNEL_COLOR_TAG },
|
||||||
|
|
||||||
|
{ "channels-color-tag-red", NULL,
|
||||||
|
NC_("channels-action", "Red"), NULL, { NULL },
|
||||||
|
NC_("channels-action", "Channel Color Tag: Set to Red"),
|
||||||
|
PIKA_COLOR_TAG_RED, FALSE,
|
||||||
|
PIKA_HELP_CHANNEL_COLOR_TAG },
|
||||||
|
|
||||||
|
{ "channels-color-tag-violet", NULL,
|
||||||
|
NC_("channels-action", "Violet"), NULL, { NULL },
|
||||||
|
NC_("channels-action", "Channel Color Tag: Set to Violet"),
|
||||||
|
PIKA_COLOR_TAG_VIOLET, FALSE,
|
||||||
|
PIKA_HELP_CHANNEL_COLOR_TAG },
|
||||||
|
|
||||||
|
{ "channels-color-tag-gray", NULL,
|
||||||
|
NC_("channels-action", "Gray"), NULL, { NULL },
|
||||||
|
NC_("channels-action", "Channel Color Tag: Set to Gray"),
|
||||||
|
PIKA_COLOR_TAG_GRAY, FALSE,
|
||||||
|
PIKA_HELP_CHANNEL_COLOR_TAG }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaEnumActionEntry channels_to_selection_actions[] =
|
||||||
|
{
|
||||||
|
{ "channels-selection-replace", PIKA_ICON_SELECTION_REPLACE,
|
||||||
|
NC_("channels-action", "Channels to Sele_ction"), NULL, { NULL },
|
||||||
|
NC_("channels-action", "Replace the selection with selected channels"),
|
||||||
|
PIKA_CHANNEL_OP_REPLACE, FALSE,
|
||||||
|
PIKA_HELP_CHANNEL_SELECTION_REPLACE },
|
||||||
|
|
||||||
|
{ "channels-selection-add", PIKA_ICON_SELECTION_ADD,
|
||||||
|
NC_("channels-action", "_Add Channels to Selection"), NULL, { NULL },
|
||||||
|
NC_("channels-action", "Add selected channels to the current selection"),
|
||||||
|
PIKA_CHANNEL_OP_ADD, FALSE,
|
||||||
|
PIKA_HELP_CHANNEL_SELECTION_ADD },
|
||||||
|
|
||||||
|
{ "channels-selection-subtract", PIKA_ICON_SELECTION_SUBTRACT,
|
||||||
|
NC_("channels-action", "_Subtract Channels from Selection"), NULL, { NULL },
|
||||||
|
NC_("channels-action", "Subtract selected channels from the current selection"),
|
||||||
|
PIKA_CHANNEL_OP_SUBTRACT, FALSE,
|
||||||
|
PIKA_HELP_CHANNEL_SELECTION_SUBTRACT },
|
||||||
|
|
||||||
|
{ "channels-selection-intersect", PIKA_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"),
|
||||||
|
PIKA_CHANNEL_OP_INTERSECT, FALSE,
|
||||||
|
PIKA_HELP_CHANNEL_SELECTION_INTERSECT }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaEnumActionEntry channels_select_actions[] =
|
||||||
|
{
|
||||||
|
{ "channels-select-top", NULL,
|
||||||
|
NC_("channels-action", "Select _Top Channel"), NULL, { NULL },
|
||||||
|
NC_("channels-action", "Select the topmost channel"),
|
||||||
|
PIKA_ACTION_SELECT_FIRST, FALSE,
|
||||||
|
PIKA_HELP_CHANNEL_TOP },
|
||||||
|
|
||||||
|
{ "channels-select-bottom", NULL,
|
||||||
|
NC_("channels-action", "Select _Bottom Channel"), NULL, { NULL },
|
||||||
|
NC_("channels-action", "Select the bottommost channel"),
|
||||||
|
PIKA_ACTION_SELECT_LAST, FALSE,
|
||||||
|
PIKA_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"),
|
||||||
|
PIKA_ACTION_SELECT_PREVIOUS, FALSE,
|
||||||
|
PIKA_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"),
|
||||||
|
PIKA_ACTION_SELECT_NEXT, FALSE,
|
||||||
|
PIKA_HELP_CHANNEL_NEXT }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
channels_actions_setup (PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
pika_action_group_add_actions (group, "channels-action",
|
||||||
|
channels_actions,
|
||||||
|
G_N_ELEMENTS (channels_actions));
|
||||||
|
|
||||||
|
pika_action_group_add_toggle_actions (group, "channels-action",
|
||||||
|
channels_toggle_actions,
|
||||||
|
G_N_ELEMENTS (channels_toggle_actions));
|
||||||
|
|
||||||
|
pika_action_group_add_enum_actions (group, "channels-action",
|
||||||
|
channels_color_tag_actions,
|
||||||
|
G_N_ELEMENTS (channels_color_tag_actions),
|
||||||
|
channels_color_tag_cmd_callback);
|
||||||
|
|
||||||
|
pika_action_group_add_enum_actions (group, "channels-action",
|
||||||
|
channels_to_selection_actions,
|
||||||
|
G_N_ELEMENTS (channels_to_selection_actions),
|
||||||
|
channels_to_selection_cmd_callback);
|
||||||
|
|
||||||
|
pika_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 (PikaActionGroup *group,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *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. */
|
||||||
|
|
||||||
|
if (image)
|
||||||
|
{
|
||||||
|
fs = (pika_image_get_floating_selection (image) != NULL);
|
||||||
|
|
||||||
|
if (PIKA_IS_COMPONENT_EDITOR (data))
|
||||||
|
{
|
||||||
|
if (PIKA_COMPONENT_EDITOR (data)->clicked_component != -1)
|
||||||
|
component = TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GList *iter;
|
||||||
|
|
||||||
|
selected_channels = pika_image_get_selected_channels (image);
|
||||||
|
n_selected_channels = g_list_length (selected_channels);
|
||||||
|
n_channels = pika_image_get_n_channels (image);
|
||||||
|
|
||||||
|
for (iter = selected_channels; iter; iter = iter->next)
|
||||||
|
{
|
||||||
|
GList *channel_list;
|
||||||
|
GList *list;
|
||||||
|
|
||||||
|
channel_list = pika_item_get_container_iter (PIKA_ITEM (iter->data));
|
||||||
|
|
||||||
|
list = g_list_find (channel_list, iter->data);
|
||||||
|
|
||||||
|
if (list)
|
||||||
|
{
|
||||||
|
if (g_list_previous (list))
|
||||||
|
have_prev = TRUE;
|
||||||
|
if (g_list_next (list))
|
||||||
|
have_next = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (have_prev && have_next)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#define SET_SENSITIVE(action,condition) \
|
||||||
|
pika_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);
|
||||||
|
SET_SENSITIVE ("channels-raise-to-top", !fs && n_selected_channels > 0 && have_prev);
|
||||||
|
SET_SENSITIVE ("channels-lower", !fs && n_selected_channels > 0 && have_next);
|
||||||
|
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);
|
||||||
|
}
|
||||||
31
app/actions/channels-actions.h
Normal file
31
app/actions/channels-actions.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaActionGroup *group);
|
||||||
|
void channels_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __CHANNELS_ACTIONS_H__ */
|
||||||
728
app/actions/channels-commands.c
Normal file
728
app/actions/channels-commands.c
Normal file
@ -0,0 +1,728 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikabase/pikabase.h"
|
||||||
|
#include "libpikacolor/pikacolor.h"
|
||||||
|
#include "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "config/pikadialogconfig.h"
|
||||||
|
|
||||||
|
#include "core/pika.h"
|
||||||
|
#include "core/pikachannel.h"
|
||||||
|
#include "core/pikachannel-select.h"
|
||||||
|
#include "core/pikacontainer.h"
|
||||||
|
#include "core/pikacontext.h"
|
||||||
|
#include "core/pikadrawable-fill.h"
|
||||||
|
#include "core/pikaimage.h"
|
||||||
|
#include "core/pikaimage-undo.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaaction.h"
|
||||||
|
#include "widgets/pikacolorpanel.h"
|
||||||
|
#include "widgets/pikacomponenteditor.h"
|
||||||
|
#include "widgets/pikadock.h"
|
||||||
|
#include "widgets/pikahelp-ids.h"
|
||||||
|
|
||||||
|
#include "dialogs/dialogs.h"
|
||||||
|
#include "dialogs/channel-options-dialog.h"
|
||||||
|
|
||||||
|
#include "actions.h"
|
||||||
|
#include "channels-commands.h"
|
||||||
|
#include "items-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define RGBA_EPSILON 1e-6
|
||||||
|
|
||||||
|
|
||||||
|
/* local function prototypes */
|
||||||
|
|
||||||
|
static void channels_new_callback (GtkWidget *dialog,
|
||||||
|
PikaImage *image,
|
||||||
|
PikaChannel *channel,
|
||||||
|
PikaContext *context,
|
||||||
|
const gchar *channel_name,
|
||||||
|
const PikaRGB *channel_color,
|
||||||
|
gboolean save_selection,
|
||||||
|
gboolean channel_visible,
|
||||||
|
PikaColorTag 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,
|
||||||
|
PikaImage *image,
|
||||||
|
PikaChannel *channel,
|
||||||
|
PikaContext *context,
|
||||||
|
const gchar *channel_name,
|
||||||
|
const PikaRGB *channel_color,
|
||||||
|
gboolean save_selection,
|
||||||
|
gboolean channel_visible,
|
||||||
|
PikaColorTag 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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *image;
|
||||||
|
PikaChannel *channel;
|
||||||
|
GList *channels;
|
||||||
|
GtkWidget *widget;
|
||||||
|
GtkWidget *dialog;
|
||||||
|
return_if_no_channels (image, channels, data);
|
||||||
|
return_if_no_widget (widget, data);
|
||||||
|
|
||||||
|
#define EDIT_DIALOG_KEY "pika-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)
|
||||||
|
{
|
||||||
|
PikaItem *item = PIKA_ITEM (channel);
|
||||||
|
|
||||||
|
dialog = channel_options_dialog_new (image, channel,
|
||||||
|
action_data_get_context (data),
|
||||||
|
widget,
|
||||||
|
_("Channel Attributes"),
|
||||||
|
"pika-channel-edit",
|
||||||
|
PIKA_ICON_EDIT,
|
||||||
|
_("Edit Channel Attributes"),
|
||||||
|
PIKA_HELP_CHANNEL_EDIT,
|
||||||
|
_("Edit Channel Color"),
|
||||||
|
_("_Fill opacity:"),
|
||||||
|
FALSE,
|
||||||
|
pika_object_get_name (channel),
|
||||||
|
&channel->color,
|
||||||
|
pika_item_get_visible (item),
|
||||||
|
pika_item_get_color_tag (item),
|
||||||
|
pika_item_get_lock_content (item),
|
||||||
|
pika_item_get_lock_position (item),
|
||||||
|
pika_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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *image;
|
||||||
|
GtkWidget *widget;
|
||||||
|
GtkWidget *dialog;
|
||||||
|
return_if_no_image (image, data);
|
||||||
|
return_if_no_widget (widget, data);
|
||||||
|
|
||||||
|
#define NEW_DIALOG_KEY "pika-channel-new-dialog"
|
||||||
|
|
||||||
|
dialog = dialogs_get_dialog (G_OBJECT (image), NEW_DIALOG_KEY);
|
||||||
|
|
||||||
|
if (! dialog)
|
||||||
|
{
|
||||||
|
PikaDialogConfig *config = PIKA_DIALOG_CONFIG (image->pika->config);
|
||||||
|
|
||||||
|
dialog = channel_options_dialog_new (image, NULL,
|
||||||
|
action_data_get_context (data),
|
||||||
|
widget,
|
||||||
|
_("New Channel"),
|
||||||
|
"pika-channel-new",
|
||||||
|
PIKA_ICON_CHANNEL,
|
||||||
|
_("Create a New Channel"),
|
||||||
|
PIKA_HELP_CHANNEL_NEW,
|
||||||
|
_("New Channel Color"),
|
||||||
|
_("_Fill opacity:"),
|
||||||
|
TRUE,
|
||||||
|
config->channel_new_name,
|
||||||
|
&config->channel_new_color,
|
||||||
|
TRUE,
|
||||||
|
PIKA_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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *image;
|
||||||
|
PikaChannel *channel;
|
||||||
|
PikaDialogConfig *config;
|
||||||
|
return_if_no_image (image, data);
|
||||||
|
|
||||||
|
config = PIKA_DIALOG_CONFIG (image->pika->config);
|
||||||
|
|
||||||
|
channel = pika_channel_new (image,
|
||||||
|
pika_image_get_width (image),
|
||||||
|
pika_image_get_height (image),
|
||||||
|
config->channel_new_name,
|
||||||
|
&config->channel_new_color);
|
||||||
|
|
||||||
|
pika_drawable_fill (PIKA_DRAWABLE (channel),
|
||||||
|
action_data_get_context (data),
|
||||||
|
PIKA_FILL_TRANSPARENT);
|
||||||
|
|
||||||
|
pika_image_add_channel (image, channel,
|
||||||
|
PIKA_IMAGE_ACTIVE_PARENT, -1, TRUE);
|
||||||
|
pika_image_flush (image);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
channels_raise_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *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 = pika_item_get_index (iter->data);
|
||||||
|
if (index > 0)
|
||||||
|
raised_channels = g_list_prepend (raised_channels, iter->data);
|
||||||
|
}
|
||||||
|
|
||||||
|
pika_image_undo_group_start (image,
|
||||||
|
PIKA_UNDO_GROUP_ITEM_DISPLACE,
|
||||||
|
ngettext ("Raise Channel",
|
||||||
|
"Raise Channels",
|
||||||
|
g_list_length (raised_channels)));
|
||||||
|
|
||||||
|
for (iter = raised_channels; iter; iter = iter->next)
|
||||||
|
pika_image_raise_item (image, iter->data, NULL);
|
||||||
|
|
||||||
|
pika_image_flush (image);
|
||||||
|
pika_image_undo_group_end (image);
|
||||||
|
|
||||||
|
g_list_free (raised_channels);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
channels_raise_to_top_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *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 = pika_item_get_index (iter->data);
|
||||||
|
if (index > 0)
|
||||||
|
raised_channels = g_list_prepend (raised_channels, iter->data);
|
||||||
|
}
|
||||||
|
|
||||||
|
pika_image_undo_group_start (image,
|
||||||
|
PIKA_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)
|
||||||
|
pika_image_raise_item_to_top (image, iter->data);
|
||||||
|
|
||||||
|
pika_image_flush (image);
|
||||||
|
pika_image_undo_group_end (image);
|
||||||
|
|
||||||
|
g_list_free (raised_channels);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
channels_lower_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *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 = pika_item_get_container_iter (PIKA_ITEM (iter->data));
|
||||||
|
index = pika_item_get_index (iter->data);
|
||||||
|
if (index < g_list_length (layer_list) - 1)
|
||||||
|
lowered_channels = g_list_prepend (lowered_channels, iter->data);
|
||||||
|
}
|
||||||
|
|
||||||
|
pika_image_undo_group_start (image,
|
||||||
|
PIKA_UNDO_GROUP_ITEM_DISPLACE,
|
||||||
|
ngettext ("Lower Channel",
|
||||||
|
"Lower Channels",
|
||||||
|
g_list_length (lowered_channels)));
|
||||||
|
|
||||||
|
for (iter = lowered_channels; iter; iter = iter->next)
|
||||||
|
pika_image_lower_item (image, iter->data, NULL);
|
||||||
|
|
||||||
|
pika_image_flush (image);
|
||||||
|
pika_image_undo_group_end (image);
|
||||||
|
|
||||||
|
g_list_free (lowered_channels);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
channels_lower_to_bottom_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *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 = pika_item_get_container_iter (PIKA_ITEM (iter->data));
|
||||||
|
index = pika_item_get_index (iter->data);
|
||||||
|
if (index < g_list_length (layer_list) - 1)
|
||||||
|
lowered_channels = g_list_prepend (lowered_channels, iter->data);
|
||||||
|
}
|
||||||
|
|
||||||
|
pika_image_undo_group_start (image,
|
||||||
|
PIKA_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)
|
||||||
|
pika_image_lower_item_to_bottom (image, iter->data);
|
||||||
|
|
||||||
|
pika_image_flush (image);
|
||||||
|
pika_image_undo_group_end (image);
|
||||||
|
|
||||||
|
g_list_free (lowered_channels);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
channels_duplicate_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *image = NULL;
|
||||||
|
GList *channels;
|
||||||
|
PikaChannel *parent = PIKA_IMAGE_ACTIVE_PARENT;
|
||||||
|
return_if_no_channels (image, channels, data);
|
||||||
|
|
||||||
|
if (PIKA_IS_COMPONENT_EDITOR (data))
|
||||||
|
{
|
||||||
|
PikaChannelType component;
|
||||||
|
PikaChannel *new_channel;
|
||||||
|
const gchar *desc;
|
||||||
|
gchar *name;
|
||||||
|
|
||||||
|
component = PIKA_COMPONENT_EDITOR (data)->clicked_component;
|
||||||
|
|
||||||
|
pika_enum_get_value (PIKA_TYPE_CHANNEL_TYPE, component,
|
||||||
|
NULL, NULL, &desc, NULL);
|
||||||
|
|
||||||
|
name = g_strdup_printf (_("%s Channel Copy"), desc);
|
||||||
|
|
||||||
|
new_channel = pika_channel_new_from_component (image, component,
|
||||||
|
name, NULL);
|
||||||
|
|
||||||
|
/* copied components are invisible by default so subsequent copies
|
||||||
|
* of components don't affect each other
|
||||||
|
*/
|
||||||
|
pika_item_set_visible (PIKA_ITEM (new_channel), FALSE, FALSE);
|
||||||
|
pika_image_add_channel (image, new_channel, parent, -1, TRUE);
|
||||||
|
|
||||||
|
g_free (name);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GList *new_channels = NULL;
|
||||||
|
GList *iter;
|
||||||
|
|
||||||
|
channels = g_list_copy (channels);
|
||||||
|
pika_image_undo_group_start (image,
|
||||||
|
PIKA_UNDO_GROUP_CHANNEL_ADD,
|
||||||
|
_("Duplicate channels"));
|
||||||
|
for (iter = channels; iter; iter = iter->next)
|
||||||
|
{
|
||||||
|
PikaChannel *new_channel;
|
||||||
|
|
||||||
|
new_channel = PIKA_CHANNEL (pika_item_duplicate (PIKA_ITEM (iter->data),
|
||||||
|
G_TYPE_FROM_INSTANCE (iter->data)));
|
||||||
|
|
||||||
|
/* use the actual parent here, not PIKA_IMAGE_ACTIVE_PARENT because
|
||||||
|
* the latter would add a duplicated group inside itself instead of
|
||||||
|
* above it
|
||||||
|
*/
|
||||||
|
pika_image_add_channel (image, new_channel,
|
||||||
|
pika_channel_get_parent (iter->data),
|
||||||
|
pika_item_get_index (iter->data),
|
||||||
|
TRUE);
|
||||||
|
new_channels = g_list_prepend (new_channels, new_channel);
|
||||||
|
}
|
||||||
|
|
||||||
|
pika_image_set_selected_channels (image, new_channels);
|
||||||
|
g_list_free (channels);
|
||||||
|
g_list_free (new_channels);
|
||||||
|
|
||||||
|
pika_image_undo_group_end (image);
|
||||||
|
}
|
||||||
|
pika_image_flush (image);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
channels_delete_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *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));
|
||||||
|
pika_image_undo_group_start (image, PIKA_UNDO_GROUP_IMAGE_ITEM_REMOVE,
|
||||||
|
undo_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (iter = channels; iter; iter = iter->next)
|
||||||
|
pika_image_remove_channel (image, iter->data, TRUE, NULL);
|
||||||
|
|
||||||
|
if (g_list_length (channels) > 1)
|
||||||
|
pika_image_undo_group_end (image);
|
||||||
|
|
||||||
|
g_list_free (channels);
|
||||||
|
pika_image_flush (image);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
channels_to_selection_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaChannelOps op;
|
||||||
|
PikaImage *image;
|
||||||
|
|
||||||
|
op = (PikaChannelOps) g_variant_get_int32 (value);
|
||||||
|
|
||||||
|
if (PIKA_IS_COMPONENT_EDITOR (data))
|
||||||
|
{
|
||||||
|
PikaChannelType component;
|
||||||
|
return_if_no_image (image, data);
|
||||||
|
|
||||||
|
component = PIKA_COMPONENT_EDITOR (data)->clicked_component;
|
||||||
|
|
||||||
|
pika_channel_select_component (pika_image_get_mask (image), component,
|
||||||
|
op, FALSE, 0.0, 0.0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GList *channels;
|
||||||
|
GList *iter;
|
||||||
|
return_if_no_channels (image, channels, data);
|
||||||
|
|
||||||
|
pika_image_undo_group_start (image,
|
||||||
|
PIKA_UNDO_GROUP_DRAWABLE_MOD,
|
||||||
|
_("Channels to selection"));
|
||||||
|
|
||||||
|
for (iter = channels; iter; iter = iter->next)
|
||||||
|
{
|
||||||
|
pika_item_to_selection (iter->data, op, TRUE, FALSE, 0.0, 0.0);
|
||||||
|
|
||||||
|
if (op == PIKA_CHANNEL_OP_REPLACE && iter == channels)
|
||||||
|
op = PIKA_CHANNEL_OP_ADD;
|
||||||
|
}
|
||||||
|
|
||||||
|
pika_image_undo_group_end (image);
|
||||||
|
}
|
||||||
|
|
||||||
|
pika_image_flush (image);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
channels_visible_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *image;
|
||||||
|
GList *channels;
|
||||||
|
return_if_no_channels (image, channels, data);
|
||||||
|
|
||||||
|
items_visible_cmd_callback (action, value, image, channels);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
channels_lock_content_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *image;
|
||||||
|
GList *channels;
|
||||||
|
PikaColorTag color_tag;
|
||||||
|
return_if_no_channels (image, channels, data);
|
||||||
|
|
||||||
|
color_tag = (PikaColorTag) g_variant_get_int32 (value);
|
||||||
|
|
||||||
|
items_color_tag_cmd_callback (action, image, channels, color_tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
channels_select_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *image;
|
||||||
|
GList *channels;
|
||||||
|
GList *new_channels = NULL;
|
||||||
|
GList *iter;
|
||||||
|
PikaActionSelectType select_type;
|
||||||
|
gboolean run_once;
|
||||||
|
return_if_no_image (image, data);
|
||||||
|
|
||||||
|
select_type = (PikaActionSelectType) g_variant_get_int32 (value);
|
||||||
|
|
||||||
|
channels = pika_image_get_selected_channels (image);
|
||||||
|
run_once = (g_list_length (channels) == 0);
|
||||||
|
|
||||||
|
for (iter = channels; iter || run_once; iter = iter ? iter->next : NULL)
|
||||||
|
{
|
||||||
|
PikaChannel *new_channel = NULL;
|
||||||
|
PikaContainer *container;
|
||||||
|
|
||||||
|
if (iter)
|
||||||
|
{
|
||||||
|
container = pika_item_get_container (PIKA_ITEM (iter->data));
|
||||||
|
}
|
||||||
|
else /* run_once */
|
||||||
|
{
|
||||||
|
container = pika_image_get_channels (image);
|
||||||
|
run_once = FALSE;
|
||||||
|
}
|
||||||
|
new_channel = (PikaChannel *) 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)
|
||||||
|
{
|
||||||
|
pika_image_set_selected_channels (image, new_channels);
|
||||||
|
pika_image_flush (image);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_list_free (new_channels);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* private functions */
|
||||||
|
|
||||||
|
static void
|
||||||
|
channels_new_callback (GtkWidget *dialog,
|
||||||
|
PikaImage *image,
|
||||||
|
PikaChannel *channel,
|
||||||
|
PikaContext *context,
|
||||||
|
const gchar *channel_name,
|
||||||
|
const PikaRGB *channel_color,
|
||||||
|
gboolean save_selection,
|
||||||
|
gboolean channel_visible,
|
||||||
|
PikaColorTag channel_color_tag,
|
||||||
|
gboolean channel_lock_content,
|
||||||
|
gboolean channel_lock_position,
|
||||||
|
gboolean channel_lock_visibility,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
PikaDialogConfig *config = PIKA_DIALOG_CONFIG (image->pika->config);
|
||||||
|
|
||||||
|
g_object_set (config,
|
||||||
|
"channel-new-name", channel_name,
|
||||||
|
"channel-new-color", channel_color,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
if (save_selection)
|
||||||
|
{
|
||||||
|
PikaChannel *selection = pika_image_get_mask (image);
|
||||||
|
|
||||||
|
channel = PIKA_CHANNEL (pika_item_duplicate (PIKA_ITEM (selection),
|
||||||
|
PIKA_TYPE_CHANNEL));
|
||||||
|
|
||||||
|
pika_object_set_name (PIKA_OBJECT (channel),
|
||||||
|
config->channel_new_name);
|
||||||
|
pika_channel_set_color (channel, &config->channel_new_color, FALSE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
channel = pika_channel_new (image,
|
||||||
|
pika_image_get_width (image),
|
||||||
|
pika_image_get_height (image),
|
||||||
|
config->channel_new_name,
|
||||||
|
&config->channel_new_color);
|
||||||
|
|
||||||
|
pika_drawable_fill (PIKA_DRAWABLE (channel), context,
|
||||||
|
PIKA_FILL_TRANSPARENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
pika_item_set_visible (PIKA_ITEM (channel), channel_visible, FALSE);
|
||||||
|
pika_item_set_color_tag (PIKA_ITEM (channel), channel_color_tag, FALSE);
|
||||||
|
pika_item_set_lock_content (PIKA_ITEM (channel), channel_lock_content, FALSE);
|
||||||
|
pika_item_set_lock_position (PIKA_ITEM (channel), channel_lock_position, FALSE);
|
||||||
|
pika_item_set_lock_visibility (PIKA_ITEM (channel), channel_lock_visibility, FALSE);
|
||||||
|
|
||||||
|
pika_image_add_channel (image, channel,
|
||||||
|
PIKA_IMAGE_ACTIVE_PARENT, -1, TRUE);
|
||||||
|
pika_image_flush (image);
|
||||||
|
|
||||||
|
gtk_widget_destroy (dialog);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
channels_edit_attributes_callback (GtkWidget *dialog,
|
||||||
|
PikaImage *image,
|
||||||
|
PikaChannel *channel,
|
||||||
|
PikaContext *context,
|
||||||
|
const gchar *channel_name,
|
||||||
|
const PikaRGB *channel_color,
|
||||||
|
gboolean save_selection,
|
||||||
|
gboolean channel_visible,
|
||||||
|
PikaColorTag channel_color_tag,
|
||||||
|
gboolean channel_lock_content,
|
||||||
|
gboolean channel_lock_position,
|
||||||
|
gboolean channel_lock_visibility,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
PikaItem *item = PIKA_ITEM (channel);
|
||||||
|
|
||||||
|
if (strcmp (channel_name, pika_object_get_name (channel)) ||
|
||||||
|
pika_rgba_distance (channel_color, &channel->color) > RGBA_EPSILON ||
|
||||||
|
channel_visible != pika_item_get_visible (item) ||
|
||||||
|
channel_color_tag != pika_item_get_color_tag (item) ||
|
||||||
|
channel_lock_content != pika_item_get_lock_content (item) ||
|
||||||
|
channel_lock_position != pika_item_get_lock_position (item) ||
|
||||||
|
channel_lock_visibility != pika_item_get_lock_visibility (item))
|
||||||
|
{
|
||||||
|
pika_image_undo_group_start (image,
|
||||||
|
PIKA_UNDO_GROUP_ITEM_PROPERTIES,
|
||||||
|
_("Channel Attributes"));
|
||||||
|
|
||||||
|
if (strcmp (channel_name, pika_object_get_name (channel)))
|
||||||
|
pika_item_rename (PIKA_ITEM (channel), channel_name, NULL);
|
||||||
|
|
||||||
|
if (pika_rgba_distance (channel_color, &channel->color) > RGBA_EPSILON)
|
||||||
|
pika_channel_set_color (channel, channel_color, TRUE);
|
||||||
|
|
||||||
|
if (channel_visible != pika_item_get_visible (item))
|
||||||
|
pika_item_set_visible (item, channel_visible, TRUE);
|
||||||
|
|
||||||
|
if (channel_color_tag != pika_item_get_color_tag (item))
|
||||||
|
pika_item_set_color_tag (item, channel_color_tag, TRUE);
|
||||||
|
|
||||||
|
if (channel_lock_content != pika_item_get_lock_content (item))
|
||||||
|
pika_item_set_lock_content (item, channel_lock_content, TRUE);
|
||||||
|
|
||||||
|
if (channel_lock_position != pika_item_get_lock_position (item))
|
||||||
|
pika_item_set_lock_position (item, channel_lock_position, TRUE);
|
||||||
|
|
||||||
|
if (channel_lock_visibility != pika_item_get_lock_visibility (item))
|
||||||
|
pika_item_set_lock_visibility (item, channel_lock_visibility, TRUE);
|
||||||
|
|
||||||
|
pika_image_undo_group_end (image);
|
||||||
|
|
||||||
|
pika_image_flush (image);
|
||||||
|
}
|
||||||
|
|
||||||
|
gtk_widget_destroy (dialog);
|
||||||
|
}
|
||||||
78
app/actions/channels-commands.h
Normal file
78
app/actions/channels-commands.h
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void channels_new_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void channels_new_last_vals_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void channels_raise_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void channels_raise_to_top_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void channels_lower_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void channels_lower_to_bottom_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void channels_duplicate_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void channels_delete_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void channels_to_selection_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void channels_visible_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void channels_lock_content_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void channels_lock_position_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void channels_color_tag_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void channels_select_cmd_callback (PikaAction *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 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pikacontext.h"
|
||||||
|
#include "core/pikadrawable.h"
|
||||||
|
#include "core/pikaimage.h"
|
||||||
|
#include "core/pikaimage-colormap.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaactiongroup.h"
|
||||||
|
#include "widgets/pikahelp-ids.h"
|
||||||
|
|
||||||
|
#include "actions.h"
|
||||||
|
#include "colormap-actions.h"
|
||||||
|
#include "colormap-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const PikaActionEntry colormap_actions[] =
|
||||||
|
{
|
||||||
|
{ "colormap-edit-color", PIKA_ICON_EDIT,
|
||||||
|
NC_("colormap-action", "_Edit Color..."), NULL, { NULL },
|
||||||
|
NC_("colormap-action", "Edit this color"),
|
||||||
|
colormap_edit_color_cmd_callback,
|
||||||
|
PIKA_HELP_INDEXED_PALETTE_EDIT }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaEnumActionEntry colormap_add_color_actions[] =
|
||||||
|
{
|
||||||
|
{ "colormap-add-color-from-fg", PIKA_ICON_LIST_ADD,
|
||||||
|
NC_("colormap-action", "_Add Color from FG"), NULL, { NULL },
|
||||||
|
NC_("colormap-action", "Add current foreground color"),
|
||||||
|
FALSE, FALSE,
|
||||||
|
PIKA_HELP_INDEXED_PALETTE_ADD },
|
||||||
|
|
||||||
|
{ "colormap-add-color-from-bg", PIKA_ICON_LIST_ADD,
|
||||||
|
NC_("colormap-action", "_Add Color from BG"), NULL, { NULL },
|
||||||
|
NC_("colormap-action", "Add current background color"),
|
||||||
|
TRUE, FALSE,
|
||||||
|
PIKA_HELP_INDEXED_PALETTE_ADD }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaEnumActionEntry colormap_to_selection_actions[] =
|
||||||
|
{
|
||||||
|
{ "colormap-selection-replace", PIKA_ICON_SELECTION_REPLACE,
|
||||||
|
NC_("colormap-action", "_Select this Color"), NULL, { NULL },
|
||||||
|
NC_("colormap-action", "Select all pixels with this color"),
|
||||||
|
PIKA_CHANNEL_OP_REPLACE, FALSE,
|
||||||
|
PIKA_HELP_INDEXED_PALETTE_SELECTION_REPLACE },
|
||||||
|
|
||||||
|
{ "colormap-selection-add", PIKA_ICON_SELECTION_ADD,
|
||||||
|
NC_("colormap-action", "_Add to Selection"), NULL, { NULL },
|
||||||
|
NC_("colormap-action", "Add all pixels with this color to the current selection"),
|
||||||
|
PIKA_CHANNEL_OP_ADD, FALSE,
|
||||||
|
PIKA_HELP_INDEXED_PALETTE_SELECTION_ADD },
|
||||||
|
|
||||||
|
{ "colormap-selection-subtract", PIKA_ICON_SELECTION_SUBTRACT,
|
||||||
|
NC_("colormap-action", "_Subtract from Selection"), NULL, { NULL },
|
||||||
|
NC_("colormap-action", "Subtract all pixels with this color from the current selection"),
|
||||||
|
PIKA_CHANNEL_OP_SUBTRACT, FALSE,
|
||||||
|
PIKA_HELP_INDEXED_PALETTE_SELECTION_SUBTRACT },
|
||||||
|
|
||||||
|
{ "colormap-selection-intersect", PIKA_ICON_SELECTION_INTERSECT,
|
||||||
|
NC_("colormap-action", "_Intersect with Selection"), NULL, { NULL },
|
||||||
|
NC_("colormap-action", "Intersect all pixels with this color with the current selection"),
|
||||||
|
PIKA_CHANNEL_OP_INTERSECT, FALSE,
|
||||||
|
PIKA_HELP_INDEXED_PALETTE_SELECTION_INTERSECT }
|
||||||
|
};
|
||||||
|
|
||||||
|
void
|
||||||
|
colormap_actions_setup (PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
pika_action_group_add_actions (group, "colormap-action",
|
||||||
|
colormap_actions,
|
||||||
|
G_N_ELEMENTS (colormap_actions));
|
||||||
|
|
||||||
|
pika_action_group_add_enum_actions (group, "colormap-action",
|
||||||
|
colormap_add_color_actions,
|
||||||
|
G_N_ELEMENTS (colormap_add_color_actions),
|
||||||
|
colormap_add_color_cmd_callback);
|
||||||
|
|
||||||
|
pika_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 (PikaActionGroup *group,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *image = action_data_get_image (data);
|
||||||
|
PikaContext *context = action_data_get_context (data);
|
||||||
|
gboolean indexed = FALSE;
|
||||||
|
gboolean drawable_indexed = FALSE;
|
||||||
|
gint num_colors = 0;
|
||||||
|
PikaRGB fg;
|
||||||
|
PikaRGB bg;
|
||||||
|
|
||||||
|
if (image)
|
||||||
|
{
|
||||||
|
indexed = (pika_image_get_base_type (image) == PIKA_INDEXED);
|
||||||
|
|
||||||
|
if (indexed)
|
||||||
|
{
|
||||||
|
GList *drawables = pika_image_get_selected_drawables (image);
|
||||||
|
|
||||||
|
num_colors = pika_image_get_colormap_size (image);
|
||||||
|
|
||||||
|
if (g_list_length (drawables) == 1)
|
||||||
|
drawable_indexed = pika_drawable_is_indexed (drawables->data);
|
||||||
|
|
||||||
|
g_list_free (drawables);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (context)
|
||||||
|
{
|
||||||
|
pika_context_get_foreground (context, &fg);
|
||||||
|
pika_context_get_background (context, &bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define SET_SENSITIVE(action,condition) \
|
||||||
|
pika_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
|
||||||
|
#define SET_COLOR(action,color) \
|
||||||
|
pika_action_group_set_action_color (group, action, color, FALSE);
|
||||||
|
|
||||||
|
SET_SENSITIVE ("colormap-edit-color",
|
||||||
|
indexed && num_colors > 0);
|
||||||
|
|
||||||
|
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 ? &fg : NULL);
|
||||||
|
SET_COLOR ("colormap-add-color-from-bg", context ? &bg : 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
|
||||||
|
}
|
||||||
31
app/actions/colormap-actions.h
Normal file
31
app/actions/colormap-actions.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaActionGroup *group);
|
||||||
|
void colormap_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __COLORMAP_ACTIONS_H__ */
|
||||||
118
app/actions/colormap-commands.c
Normal file
118
app/actions/colormap-commands.c
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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/pikachannel-select.h"
|
||||||
|
#include "core/pikacontext.h"
|
||||||
|
#include "core/pikaimage.h"
|
||||||
|
#include "core/pikaimage-colormap.h"
|
||||||
|
|
||||||
|
#include "widgets/pikacolormapeditor.h"
|
||||||
|
#include "widgets/pikacolormapselection.h"
|
||||||
|
|
||||||
|
#include "actions.h"
|
||||||
|
#include "colormap-commands.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* public functions */
|
||||||
|
|
||||||
|
void
|
||||||
|
colormap_edit_color_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaColormapEditor *editor = PIKA_COLORMAP_EDITOR (data);
|
||||||
|
|
||||||
|
pika_colormap_editor_edit_color (editor);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
colormap_add_color_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaContext *context;
|
||||||
|
PikaImage *image;
|
||||||
|
gboolean background;
|
||||||
|
return_if_no_context (context, data);
|
||||||
|
return_if_no_image (image, data);
|
||||||
|
|
||||||
|
background = (gboolean) g_variant_get_int32 (value);
|
||||||
|
|
||||||
|
if (pika_image_get_colormap_size (image) < 256)
|
||||||
|
{
|
||||||
|
PikaRGB color;
|
||||||
|
|
||||||
|
if (background)
|
||||||
|
pika_context_get_background (context, &color);
|
||||||
|
else
|
||||||
|
pika_context_get_foreground (context, &color);
|
||||||
|
|
||||||
|
pika_image_add_colormap_entry (image, &color);
|
||||||
|
pika_image_flush (image);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
colormap_to_selection_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaColormapSelection *selection;
|
||||||
|
PikaColormapEditor *editor;
|
||||||
|
PikaImage *image;
|
||||||
|
GList *drawables;
|
||||||
|
PikaChannelOps op;
|
||||||
|
gint col_index;
|
||||||
|
|
||||||
|
return_if_no_image (image, data);
|
||||||
|
|
||||||
|
editor = PIKA_COLORMAP_EDITOR (data);
|
||||||
|
selection = PIKA_COLORMAP_SELECTION (editor->selection);
|
||||||
|
col_index = pika_colormap_selection_get_index (selection, NULL);
|
||||||
|
|
||||||
|
op = (PikaChannelOps) g_variant_get_int32 (value);
|
||||||
|
|
||||||
|
drawables = pika_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;
|
||||||
|
}
|
||||||
|
|
||||||
|
pika_channel_select_by_index (pika_image_get_mask (image),
|
||||||
|
drawables->data,
|
||||||
|
col_index, op,
|
||||||
|
FALSE, 0.0, 0.0);
|
||||||
|
|
||||||
|
g_list_free (drawables);
|
||||||
|
pika_image_flush (image);
|
||||||
|
}
|
||||||
37
app/actions/colormap-commands.h
Normal file
37
app/actions/colormap-commands.h
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void colormap_add_color_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void colormap_to_selection_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __COLORMAP_COMMANDS_H__ */
|
||||||
1278
app/actions/context-actions.c
Normal file
1278
app/actions/context-actions.c
Normal file
File diff suppressed because it is too large
Load Diff
31
app/actions/context-actions.h
Normal file
31
app/actions/context-actions.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaActionGroup *group);
|
||||||
|
void context_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __CONTEXT_ACTIONS_H__ */
|
||||||
1013
app/actions/context-commands.c
Normal file
1013
app/actions/context-commands.c
Normal file
File diff suppressed because it is too large
Load Diff
148
app/actions/context-commands.h
Normal file
148
app/actions/context-commands.h
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_colors_swap_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void context_palette_foreground_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_palette_background_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void context_colormap_foreground_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_colormap_background_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void context_swatch_foreground_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_swatch_background_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void context_foreground_red_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_foreground_green_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_foreground_blue_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void context_background_red_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_background_green_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_background_blue_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void context_foreground_hue_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_foreground_saturation_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_foreground_value_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void context_background_hue_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_background_saturation_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_background_value_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void context_opacity_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_paint_mode_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void context_tool_select_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_brush_select_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_pattern_select_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_palette_select_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_gradient_select_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_font_select_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void context_brush_spacing_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_brush_shape_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_brush_radius_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_brush_spikes_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_brush_hardness_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_brush_aspect_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void context_brush_angle_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void context_toggle_dynamics_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __CONTEXT_COMMANDS_H__ */
|
||||||
74
app/actions/cursor-info-actions.c
Normal file
74
app/actions/cursor-info-actions.c
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaactiongroup.h"
|
||||||
|
#include "widgets/pikahelp-ids.h"
|
||||||
|
|
||||||
|
#include "display/pikacursorview.h"
|
||||||
|
|
||||||
|
#include "cursor-info-actions.h"
|
||||||
|
#include "cursor-info-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const PikaToggleActionEntry 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,
|
||||||
|
PIKA_HELP_POINTER_INFO_SAMPLE_MERGED }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
cursor_info_actions_setup (PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
pika_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 (PikaActionGroup *group,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaCursorView *view = PIKA_CURSOR_VIEW (data);
|
||||||
|
|
||||||
|
#define SET_ACTIVE(action,condition) \
|
||||||
|
pika_action_group_set_action_active (group, action, (condition) != 0)
|
||||||
|
|
||||||
|
SET_ACTIVE ("cursor-info-sample-merged",
|
||||||
|
pika_cursor_view_get_sample_merged (view));
|
||||||
|
|
||||||
|
#undef SET_ACTIVE
|
||||||
|
}
|
||||||
31
app/actions/cursor-info-actions.h
Normal file
31
app/actions/cursor-info-actions.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaActionGroup *group);
|
||||||
|
void cursor_info_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __CURSOR_INFO_ACTIONS_H__ */
|
||||||
45
app/actions/cursor-info-commands.c
Normal file
45
app/actions/cursor-info-commands.c
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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/pikacursorview.h"
|
||||||
|
|
||||||
|
#include "cursor-info-commands.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* public functions */
|
||||||
|
|
||||||
|
void
|
||||||
|
cursor_info_sample_merged_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaCursorView *view = PIKA_CURSOR_VIEW (data);
|
||||||
|
gboolean active = g_variant_get_boolean (value);
|
||||||
|
|
||||||
|
pika_cursor_view_set_sample_merged (view, active);
|
||||||
|
}
|
||||||
31
app/actions/cursor-info-commands.h
Normal file
31
app/actions/cursor-info-commands.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __CURSOR_INFO_COMMANDS_H__ */
|
||||||
230
app/actions/dashboard-actions.c
Normal file
230
app/actions/dashboard-actions.c
Normal file
@ -0,0 +1,230 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaactiongroup.h"
|
||||||
|
#include "widgets/pikadashboard.h"
|
||||||
|
#include "widgets/pikahelp-ids.h"
|
||||||
|
|
||||||
|
#include "dashboard-actions.h"
|
||||||
|
#include "dashboard-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const PikaActionEntry 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", PIKA_ICON_RECORD,
|
||||||
|
NC_("dashboard-action", "_Start/Stop Recording..."), NULL, { NULL },
|
||||||
|
NC_("dashboard-action", "Start/stop recording performance log"),
|
||||||
|
dashboard_log_record_cmd_callback,
|
||||||
|
PIKA_HELP_DASHBOARD_LOG_RECORD },
|
||||||
|
{ "dashboard-log-add-marker", PIKA_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,
|
||||||
|
PIKA_HELP_DASHBOARD_LOG_ADD_MARKER },
|
||||||
|
{ "dashboard-log-add-empty-marker", PIKA_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,
|
||||||
|
PIKA_HELP_DASHBOARD_LOG_ADD_EMPTY_MARKER },
|
||||||
|
|
||||||
|
{ "dashboard-reset", PIKA_ICON_RESET,
|
||||||
|
NC_("dashboard-action", "_Reset"), NULL, { NULL },
|
||||||
|
NC_("dashboard-action", "Reset cumulative data"),
|
||||||
|
dashboard_reset_cmd_callback,
|
||||||
|
PIKA_HELP_DASHBOARD_RESET },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaToggleActionEntry 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,
|
||||||
|
PIKA_HELP_DASHBOARD_LOW_SWAP_SPACE_WARNING }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaRadioActionEntry dashboard_update_interval_actions[] =
|
||||||
|
{
|
||||||
|
{ "dashboard-update-interval-0-25-sec", NULL,
|
||||||
|
NC_("dashboard-update-interval", "0.25 Seconds"), NULL, { NULL }, NULL,
|
||||||
|
PIKA_DASHBOARD_UPDATE_INTERVAL_0_25_SEC,
|
||||||
|
PIKA_HELP_DASHBOARD_UPDATE_INTERVAL },
|
||||||
|
|
||||||
|
{ "dashboard-update-interval-0-5-sec", NULL,
|
||||||
|
NC_("dashboard-update-interval", "0.5 Seconds"), NULL, { NULL }, NULL,
|
||||||
|
PIKA_DASHBOARD_UPDATE_INTERVAL_0_5_SEC,
|
||||||
|
PIKA_HELP_DASHBOARD_UPDATE_INTERVAL },
|
||||||
|
|
||||||
|
{ "dashboard-update-interval-1-sec", NULL,
|
||||||
|
NC_("dashboard-update-interval", "1 Second"), NULL, { NULL }, NULL,
|
||||||
|
PIKA_DASHBOARD_UPDATE_INTERVAL_1_SEC,
|
||||||
|
PIKA_HELP_DASHBOARD_UPDATE_INTERVAL },
|
||||||
|
|
||||||
|
{ "dashboard-update-interval-2-sec", NULL,
|
||||||
|
NC_("dashboard-update-interval", "2 Seconds"), NULL, { NULL }, NULL,
|
||||||
|
PIKA_DASHBOARD_UPDATE_INTERVAL_2_SEC,
|
||||||
|
PIKA_HELP_DASHBOARD_UPDATE_INTERVAL },
|
||||||
|
|
||||||
|
{ "dashboard-update-interval-4-sec", NULL,
|
||||||
|
NC_("dashboard-update-interval", "4 Seconds"), NULL, { NULL }, NULL,
|
||||||
|
PIKA_DASHBOARD_UPDATE_INTERVAL_4_SEC,
|
||||||
|
PIKA_HELP_DASHBOARD_UPDATE_INTERVAL }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaRadioActionEntry dashboard_history_duration_actions[] =
|
||||||
|
{
|
||||||
|
{ "dashboard-history-duration-15-sec", NULL,
|
||||||
|
NC_("dashboard-history-duration", "15 Seconds"), NULL, { NULL }, NULL,
|
||||||
|
PIKA_DASHBOARD_HISTORY_DURATION_15_SEC,
|
||||||
|
PIKA_HELP_DASHBOARD_HISTORY_DURATION },
|
||||||
|
|
||||||
|
{ "dashboard-history-duration-30-sec", NULL,
|
||||||
|
NC_("dashboard-history-duration", "30 Seconds"), NULL, { NULL }, NULL,
|
||||||
|
PIKA_DASHBOARD_HISTORY_DURATION_30_SEC,
|
||||||
|
PIKA_HELP_DASHBOARD_HISTORY_DURATION },
|
||||||
|
|
||||||
|
{ "dashboard-history-duration-60-sec", NULL,
|
||||||
|
NC_("dashboard-history-duration", "60 Seconds"), NULL, { NULL }, NULL,
|
||||||
|
PIKA_DASHBOARD_HISTORY_DURATION_60_SEC,
|
||||||
|
PIKA_HELP_DASHBOARD_HISTORY_DURATION },
|
||||||
|
|
||||||
|
{ "dashboard-history-duration-120-sec", NULL,
|
||||||
|
NC_("dashboard-history-duration", "120 Seconds"), NULL, { NULL }, NULL,
|
||||||
|
PIKA_DASHBOARD_HISTORY_DURATION_120_SEC,
|
||||||
|
PIKA_HELP_DASHBOARD_HISTORY_DURATION },
|
||||||
|
|
||||||
|
{ "dashboard-history-duration-240-sec", NULL,
|
||||||
|
NC_("dashboard-history-duration", "240 Seconds"), NULL, { NULL }, NULL,
|
||||||
|
PIKA_DASHBOARD_HISTORY_DURATION_240_SEC,
|
||||||
|
PIKA_HELP_DASHBOARD_HISTORY_DURATION }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
dashboard_actions_setup (PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
pika_action_group_add_actions (group, "dashboard-action",
|
||||||
|
dashboard_actions,
|
||||||
|
G_N_ELEMENTS (dashboard_actions));
|
||||||
|
|
||||||
|
pika_action_group_add_toggle_actions (group, "dashboard-action",
|
||||||
|
dashboard_toggle_actions,
|
||||||
|
G_N_ELEMENTS (dashboard_toggle_actions));
|
||||||
|
|
||||||
|
pika_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);
|
||||||
|
|
||||||
|
pika_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 (PikaActionGroup *group,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDashboard *dashboard = PIKA_DASHBOARD (data);
|
||||||
|
gboolean recording;
|
||||||
|
|
||||||
|
recording = pika_dashboard_log_is_recording (dashboard);
|
||||||
|
|
||||||
|
#define SET_SENSITIVE(action,condition) \
|
||||||
|
pika_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
|
||||||
|
#define SET_ACTIVE(action,condition) \
|
||||||
|
pika_action_group_set_action_active (group, action, (condition) != 0)
|
||||||
|
|
||||||
|
switch (pika_dashboard_get_update_interval (dashboard))
|
||||||
|
{
|
||||||
|
case PIKA_DASHBOARD_UPDATE_INTERVAL_0_25_SEC:
|
||||||
|
SET_ACTIVE ("dashboard-update-interval-0-25-sec", TRUE);
|
||||||
|
break;
|
||||||
|
case PIKA_DASHBOARD_UPDATE_INTERVAL_0_5_SEC:
|
||||||
|
SET_ACTIVE ("dashboard-update-interval-0-5-sec", TRUE);
|
||||||
|
break;
|
||||||
|
case PIKA_DASHBOARD_UPDATE_INTERVAL_1_SEC:
|
||||||
|
SET_ACTIVE ("dashboard-update-interval-1-sec", TRUE);
|
||||||
|
break;
|
||||||
|
case PIKA_DASHBOARD_UPDATE_INTERVAL_2_SEC:
|
||||||
|
SET_ACTIVE ("dashboard-update-interval-2-sec", TRUE);
|
||||||
|
break;
|
||||||
|
case PIKA_DASHBOARD_UPDATE_INTERVAL_4_SEC:
|
||||||
|
SET_ACTIVE ("dashboard-update-interval-4-sec", TRUE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (pika_dashboard_get_history_duration (dashboard))
|
||||||
|
{
|
||||||
|
case PIKA_DASHBOARD_HISTORY_DURATION_15_SEC:
|
||||||
|
SET_ACTIVE ("dashboard-history-duration-15-sec", TRUE);
|
||||||
|
break;
|
||||||
|
case PIKA_DASHBOARD_HISTORY_DURATION_30_SEC:
|
||||||
|
SET_ACTIVE ("dashboard-history-duration-30-sec", TRUE);
|
||||||
|
break;
|
||||||
|
case PIKA_DASHBOARD_HISTORY_DURATION_60_SEC:
|
||||||
|
SET_ACTIVE ("dashboard-history-duration-60-sec", TRUE);
|
||||||
|
break;
|
||||||
|
case PIKA_DASHBOARD_HISTORY_DURATION_120_SEC:
|
||||||
|
SET_ACTIVE ("dashboard-history-duration-120-sec", TRUE);
|
||||||
|
break;
|
||||||
|
case PIKA_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",
|
||||||
|
pika_dashboard_get_low_swap_space_warning (dashboard));
|
||||||
|
|
||||||
|
#undef SET_SENSITIVE
|
||||||
|
#undef SET_ACTIVE
|
||||||
|
}
|
||||||
31
app/actions/dashboard-actions.h
Normal file
31
app/actions/dashboard-actions.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaActionGroup *group);
|
||||||
|
void dashboard_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __DASHBOARD_ACTIONS_H__ */
|
||||||
410
app/actions/dashboard-commands.c
Normal file
410
app/actions/dashboard-commands.c
Normal file
@ -0,0 +1,410 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pika.h"
|
||||||
|
|
||||||
|
#include "widgets/pikadashboard.h"
|
||||||
|
#include "widgets/pikahelp-ids.h"
|
||||||
|
#include "widgets/pikauimanager.h"
|
||||||
|
|
||||||
|
#include "dialogs/dialogs.h"
|
||||||
|
|
||||||
|
#include "dashboard-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
GFile *folder;
|
||||||
|
PikaDashboardLogParams params;
|
||||||
|
} DashboardLogDialogInfo;
|
||||||
|
|
||||||
|
|
||||||
|
/* local function prototypes */
|
||||||
|
|
||||||
|
static void dashboard_log_record_response (GtkWidget *dialog,
|
||||||
|
int response_id,
|
||||||
|
PikaDashboard *dashboard);
|
||||||
|
|
||||||
|
static void dashboard_log_add_marker_response (GtkWidget *dialog,
|
||||||
|
const gchar *description,
|
||||||
|
PikaDashboard *dashboard);
|
||||||
|
|
||||||
|
static DashboardLogDialogInfo * dashboard_log_dialog_info_new (PikaDashboard *dashboard);
|
||||||
|
static void dashboard_log_dialog_info_free (DashboardLogDialogInfo *info);
|
||||||
|
|
||||||
|
|
||||||
|
/* public functions */
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
dashboard_update_interval_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDashboard *dashboard = PIKA_DASHBOARD (data);
|
||||||
|
PikaDashboardUpdateInteval update_interval;
|
||||||
|
|
||||||
|
update_interval = g_variant_get_int32 (value);
|
||||||
|
|
||||||
|
pika_dashboard_set_update_interval (dashboard, update_interval);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dashboard_history_duration_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDashboard *dashboard = PIKA_DASHBOARD (data);
|
||||||
|
PikaDashboardHistoryDuration history_duration;
|
||||||
|
|
||||||
|
history_duration = g_variant_get_int32 (value);
|
||||||
|
|
||||||
|
pika_dashboard_set_history_duration (dashboard, history_duration);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dashboard_log_record_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDashboard *dashboard = PIKA_DASHBOARD (data);
|
||||||
|
|
||||||
|
if (! pika_dashboard_log_is_recording (dashboard))
|
||||||
|
{
|
||||||
|
GtkWidget *dialog;
|
||||||
|
|
||||||
|
#define LOG_RECORD_KEY "pika-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;
|
||||||
|
|
||||||
|
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);
|
||||||
|
pika_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),
|
||||||
|
"pika-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),
|
||||||
|
"pika-dashboard-log-dialog-info");
|
||||||
|
|
||||||
|
if (! info)
|
||||||
|
{
|
||||||
|
info = dashboard_log_dialog_info_new (dashboard);
|
||||||
|
|
||||||
|
g_object_set_data_full (
|
||||||
|
G_OBJECT (dashboard),
|
||||||
|
"pika-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);
|
||||||
|
}
|
||||||
|
|
||||||
|
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog),
|
||||||
|
"pika-performance.log");
|
||||||
|
|
||||||
|
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);
|
||||||
|
pika_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 = pika_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 (pika_int_adjustment_update),
|
||||||
|
&info->params.sample_frequency);
|
||||||
|
|
||||||
|
gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton);
|
||||||
|
|
||||||
|
toggle = gtk_check_button_new_with_mnemonic (_("_Backtrace"));
|
||||||
|
pika_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 (pika_toggle_button_update),
|
||||||
|
&info->params.backtrace);
|
||||||
|
|
||||||
|
toggle = gtk_check_button_new_with_mnemonic (_("_Messages"));
|
||||||
|
pika_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 (pika_toggle_button_update),
|
||||||
|
&info->params.messages);
|
||||||
|
|
||||||
|
toggle = gtk_check_button_new_with_mnemonic (_("Progressi_ve"));
|
||||||
|
pika_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 (pika_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);
|
||||||
|
|
||||||
|
pika_help_connect (dialog, pika_standard_help_func,
|
||||||
|
PIKA_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 (! pika_dashboard_log_stop_recording (dashboard, &error))
|
||||||
|
{
|
||||||
|
pika_message_literal (
|
||||||
|
pika_editor_get_ui_manager (PIKA_EDITOR (dashboard))->pika,
|
||||||
|
NULL, PIKA_MESSAGE_ERROR, error->message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dashboard_log_add_marker_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDashboard *dashboard = PIKA_DASHBOARD (data);
|
||||||
|
GtkWidget *dialog;
|
||||||
|
|
||||||
|
#define LOG_ADD_MARKER_KEY "pika-dashboard-log-add-marker-dialog"
|
||||||
|
|
||||||
|
dialog = dialogs_get_dialog (G_OBJECT (dashboard), LOG_ADD_MARKER_KEY);
|
||||||
|
|
||||||
|
if (! dialog)
|
||||||
|
{
|
||||||
|
dialog = pika_query_string_box (
|
||||||
|
_("Add Marker"), GTK_WIDGET (dashboard),
|
||||||
|
pika_standard_help_func, PIKA_HELP_DASHBOARD_LOG_ADD_MARKER,
|
||||||
|
_("Enter a description for the marker"),
|
||||||
|
NULL,
|
||||||
|
G_OBJECT (dashboard), "destroy",
|
||||||
|
(PikaQueryStringCallback) 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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDashboard *dashboard = PIKA_DASHBOARD (data);
|
||||||
|
|
||||||
|
pika_dashboard_log_add_marker (dashboard, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dashboard_reset_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDashboard *dashboard = PIKA_DASHBOARD (data);
|
||||||
|
|
||||||
|
pika_dashboard_reset (dashboard);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dashboard_low_swap_space_warning_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDashboard *dashboard = PIKA_DASHBOARD (data);
|
||||||
|
gboolean low_swap_space_warning = g_variant_get_boolean (value);
|
||||||
|
|
||||||
|
pika_dashboard_set_low_swap_space_warning (dashboard, low_swap_space_warning);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* private functions */
|
||||||
|
|
||||||
|
static void
|
||||||
|
dashboard_log_record_response (GtkWidget *dialog,
|
||||||
|
int response_id,
|
||||||
|
PikaDashboard *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),
|
||||||
|
"pika-dashboard-log-dialog-info");
|
||||||
|
|
||||||
|
g_return_if_fail (info != NULL);
|
||||||
|
|
||||||
|
g_set_object (&info->folder, g_file_get_parent (file));
|
||||||
|
|
||||||
|
if (! pika_dashboard_log_start_recording (dashboard,
|
||||||
|
file, &info->params,
|
||||||
|
&error))
|
||||||
|
{
|
||||||
|
pika_message_literal (
|
||||||
|
pika_editor_get_ui_manager (PIKA_EDITOR (dashboard))->pika,
|
||||||
|
NULL, PIKA_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,
|
||||||
|
PikaDashboard *dashboard)
|
||||||
|
{
|
||||||
|
pika_dashboard_log_add_marker (dashboard, description);
|
||||||
|
}
|
||||||
|
|
||||||
|
static DashboardLogDialogInfo *
|
||||||
|
dashboard_log_dialog_info_new (PikaDashboard *dashboard)
|
||||||
|
{
|
||||||
|
DashboardLogDialogInfo *info = g_slice_new (DashboardLogDialogInfo);
|
||||||
|
|
||||||
|
info->folder = NULL;
|
||||||
|
info->params = *pika_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);
|
||||||
|
}
|
||||||
52
app/actions/dashboard-commands.h
Normal file
52
app/actions/dashboard-commands.h
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void dashboard_history_duration_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void dashboard_log_record_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void dashboard_log_add_marker_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void dashboard_log_add_empty_marker_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void dashboard_reset_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void dashboard_low_swap_space_warning_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __DASHBOARD_COMMANDS_H__ */
|
||||||
305
app/actions/data-commands.c
Normal file
305
app/actions/data-commands.c
Normal file
@ -0,0 +1,305 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikabase/pikabase.h"
|
||||||
|
#include "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pika.h"
|
||||||
|
#include "core/pikacontainer.h"
|
||||||
|
#include "core/pikacontext.h"
|
||||||
|
#include "core/pikadata.h"
|
||||||
|
#include "core/pikadatafactory.h"
|
||||||
|
|
||||||
|
#include "file/file-open.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaclipboard.h"
|
||||||
|
#include "widgets/pikacontainerview.h"
|
||||||
|
#include "widgets/pikadataeditor.h"
|
||||||
|
#include "widgets/pikadatafactoryview.h"
|
||||||
|
#include "widgets/pikadialogfactory.h"
|
||||||
|
#include "widgets/pikamessagebox.h"
|
||||||
|
#include "widgets/pikamessagedialog.h"
|
||||||
|
#include "widgets/pikawidgets-utils.h"
|
||||||
|
#include "widgets/pikawindowstrategy.h"
|
||||||
|
#include "widgets/pikawidgets-utils.h"
|
||||||
|
|
||||||
|
#include "dialogs/data-delete-dialog.h"
|
||||||
|
|
||||||
|
#include "actions.h"
|
||||||
|
#include "data-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* public functions */
|
||||||
|
|
||||||
|
void
|
||||||
|
data_open_as_image_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
PikaDataFactoryView *view = PIKA_DATA_FACTORY_VIEW (user_data);
|
||||||
|
PikaContext *context;
|
||||||
|
PikaData *data;
|
||||||
|
|
||||||
|
context =
|
||||||
|
pika_container_view_get_context (PIKA_CONTAINER_EDITOR (view)->view);
|
||||||
|
|
||||||
|
data = (PikaData *)
|
||||||
|
pika_context_get_by_type (context,
|
||||||
|
pika_data_factory_view_get_children_type (view));
|
||||||
|
|
||||||
|
if (data && pika_data_get_file (data))
|
||||||
|
{
|
||||||
|
GFile *file = pika_data_get_file (data);
|
||||||
|
GtkWidget *widget = GTK_WIDGET (view);
|
||||||
|
PikaImage *image;
|
||||||
|
PikaPDBStatusType status;
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
|
image = file_open_with_display (context->pika, context, NULL,
|
||||||
|
file, FALSE,
|
||||||
|
G_OBJECT (pika_widget_get_monitor (widget)),
|
||||||
|
&status, &error);
|
||||||
|
|
||||||
|
if (! image && status != PIKA_PDB_CANCEL)
|
||||||
|
{
|
||||||
|
pika_message (context->pika, G_OBJECT (view),
|
||||||
|
PIKA_MESSAGE_ERROR,
|
||||||
|
_("Opening '%s' failed:\n\n%s"),
|
||||||
|
pika_file_get_utf8_name (file), error->message);
|
||||||
|
g_clear_error (&error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
data_new_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
PikaDataFactoryView *view = PIKA_DATA_FACTORY_VIEW (user_data);
|
||||||
|
|
||||||
|
if (pika_data_factory_view_has_data_new_func (view))
|
||||||
|
{
|
||||||
|
PikaDataFactory *factory;
|
||||||
|
PikaContext *context;
|
||||||
|
PikaData *data;
|
||||||
|
|
||||||
|
factory = pika_data_factory_view_get_data_factory (view);
|
||||||
|
|
||||||
|
context =
|
||||||
|
pika_container_view_get_context (PIKA_CONTAINER_EDITOR (view)->view);
|
||||||
|
|
||||||
|
data = pika_data_factory_data_new (factory, context, _("Untitled"));
|
||||||
|
|
||||||
|
if (data)
|
||||||
|
{
|
||||||
|
pika_context_set_by_type (context,
|
||||||
|
pika_data_factory_view_get_children_type (view),
|
||||||
|
PIKA_OBJECT (data));
|
||||||
|
|
||||||
|
gtk_button_clicked (GTK_BUTTON (pika_data_factory_view_get_edit_button (view)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
data_duplicate_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
PikaDataFactoryView *view = PIKA_DATA_FACTORY_VIEW (user_data);
|
||||||
|
PikaContext *context;
|
||||||
|
PikaData *data;
|
||||||
|
|
||||||
|
context = pika_container_view_get_context (PIKA_CONTAINER_EDITOR (view)->view);
|
||||||
|
|
||||||
|
data = (PikaData *)
|
||||||
|
pika_context_get_by_type (context,
|
||||||
|
pika_data_factory_view_get_children_type (view));
|
||||||
|
|
||||||
|
if (data && pika_data_factory_view_have (view, PIKA_OBJECT (data)))
|
||||||
|
{
|
||||||
|
PikaData *new_data;
|
||||||
|
|
||||||
|
new_data = pika_data_factory_data_duplicate (pika_data_factory_view_get_data_factory (view), data);
|
||||||
|
|
||||||
|
if (new_data)
|
||||||
|
{
|
||||||
|
pika_context_set_by_type (context,
|
||||||
|
pika_data_factory_view_get_children_type (view),
|
||||||
|
PIKA_OBJECT (new_data));
|
||||||
|
|
||||||
|
gtk_button_clicked (GTK_BUTTON (pika_data_factory_view_get_edit_button (view)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
data_copy_location_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
PikaDataFactoryView *view = PIKA_DATA_FACTORY_VIEW (user_data);
|
||||||
|
PikaContext *context;
|
||||||
|
PikaData *data;
|
||||||
|
|
||||||
|
context = pika_container_view_get_context (PIKA_CONTAINER_EDITOR (view)->view);
|
||||||
|
|
||||||
|
data = (PikaData *)
|
||||||
|
pika_context_get_by_type (context,
|
||||||
|
pika_data_factory_view_get_children_type (view));
|
||||||
|
|
||||||
|
if (data)
|
||||||
|
{
|
||||||
|
GFile *file = pika_data_get_file (data);
|
||||||
|
|
||||||
|
if (file)
|
||||||
|
{
|
||||||
|
gchar *uri = g_file_get_uri (file);
|
||||||
|
|
||||||
|
pika_clipboard_set_text (context->pika, uri);
|
||||||
|
g_free (uri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
data_show_in_file_manager_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
PikaDataFactoryView *view = PIKA_DATA_FACTORY_VIEW (user_data);
|
||||||
|
PikaContext *context;
|
||||||
|
PikaData *data;
|
||||||
|
|
||||||
|
context = pika_container_view_get_context (PIKA_CONTAINER_EDITOR (view)->view);
|
||||||
|
|
||||||
|
data = (PikaData *)
|
||||||
|
pika_context_get_by_type (context,
|
||||||
|
pika_data_factory_view_get_children_type (view));
|
||||||
|
|
||||||
|
if (data)
|
||||||
|
{
|
||||||
|
GFile *file = pika_data_get_file (data);
|
||||||
|
|
||||||
|
if (file)
|
||||||
|
{
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
|
if (! pika_file_show_in_file_manager (file, &error))
|
||||||
|
{
|
||||||
|
pika_message (context->pika, G_OBJECT (view),
|
||||||
|
PIKA_MESSAGE_ERROR,
|
||||||
|
_("Can't show file in file manager: %s"),
|
||||||
|
error->message);
|
||||||
|
g_clear_error (&error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
data_delete_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
PikaDataFactoryView *view = PIKA_DATA_FACTORY_VIEW (user_data);
|
||||||
|
PikaContext *context;
|
||||||
|
PikaData *data;
|
||||||
|
|
||||||
|
context =
|
||||||
|
pika_container_view_get_context (PIKA_CONTAINER_EDITOR (view)->view);
|
||||||
|
|
||||||
|
data = (PikaData *)
|
||||||
|
pika_context_get_by_type (context,
|
||||||
|
pika_data_factory_view_get_children_type (view));
|
||||||
|
|
||||||
|
if (data &&
|
||||||
|
pika_data_is_deletable (data) &&
|
||||||
|
pika_data_factory_view_have (view, PIKA_OBJECT (data)))
|
||||||
|
{
|
||||||
|
PikaDataFactory *factory;
|
||||||
|
GtkWidget *dialog;
|
||||||
|
|
||||||
|
factory = pika_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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
PikaDataFactoryView *view = PIKA_DATA_FACTORY_VIEW (user_data);
|
||||||
|
Pika *pika;
|
||||||
|
return_if_no_pika (pika, user_data);
|
||||||
|
|
||||||
|
pika_set_busy (pika);
|
||||||
|
pika_data_factory_data_refresh (pika_data_factory_view_get_data_factory (view),
|
||||||
|
action_data_get_context (user_data));
|
||||||
|
pika_unset_busy (pika);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
data_edit_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
PikaDataFactoryView *view = PIKA_DATA_FACTORY_VIEW (user_data);
|
||||||
|
PikaContext *context;
|
||||||
|
PikaData *data;
|
||||||
|
|
||||||
|
context = pika_container_view_get_context (PIKA_CONTAINER_EDITOR (view)->view);
|
||||||
|
|
||||||
|
data = (PikaData *)
|
||||||
|
pika_context_get_by_type (context,
|
||||||
|
pika_data_factory_view_get_children_type (view));
|
||||||
|
|
||||||
|
if (data && pika_data_factory_view_have (view, PIKA_OBJECT (data)))
|
||||||
|
{
|
||||||
|
GdkMonitor *monitor = pika_widget_get_monitor (GTK_WIDGET (view));
|
||||||
|
GtkWidget *dockable;
|
||||||
|
|
||||||
|
dockable =
|
||||||
|
pika_window_strategy_show_dockable_dialog (PIKA_WINDOW_STRATEGY (pika_get_window_strategy (context->pika)),
|
||||||
|
context->pika,
|
||||||
|
pika_dialog_factory_get_singleton (),
|
||||||
|
monitor,
|
||||||
|
g_variant_get_string (value,
|
||||||
|
NULL));
|
||||||
|
|
||||||
|
pika_data_editor_set_data (PIKA_DATA_EDITOR (gtk_bin_get_child (GTK_BIN (dockable))),
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
}
|
||||||
52
app/actions/data-commands.h
Normal file
52
app/actions/data-commands.h
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void data_new_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void data_duplicate_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void data_copy_location_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void data_show_in_file_manager_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void data_delete_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void data_refresh_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void data_edit_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __DATA_COMMANDS_H__ */
|
||||||
47
app/actions/data-editor-commands.c
Normal file
47
app/actions/data-editor-commands.c
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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/pikadataeditor.h"
|
||||||
|
|
||||||
|
#include "data-editor-commands.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* public functions */
|
||||||
|
|
||||||
|
void
|
||||||
|
data_editor_edit_active_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDataEditor *editor = PIKA_DATA_EDITOR (data);
|
||||||
|
gboolean edit_active;
|
||||||
|
|
||||||
|
edit_active = g_variant_get_boolean (value);
|
||||||
|
|
||||||
|
pika_data_editor_set_edit_active (editor, edit_active);
|
||||||
|
}
|
||||||
31
app/actions/data-editor-commands.h
Normal file
31
app/actions/data-editor-commands.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __DATA_EDITOR_COMMANDS_H__ */
|
||||||
106
app/actions/debug-actions.c
Normal file
106
app/actions/debug-actions.c
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pika.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaactiongroup.h"
|
||||||
|
|
||||||
|
#include "debug-actions.h"
|
||||||
|
#include "debug-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const PikaActionEntry 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 (PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
gint i;
|
||||||
|
|
||||||
|
pika_action_group_add_actions (group, NULL,
|
||||||
|
debug_actions,
|
||||||
|
G_N_ELEMENTS (debug_actions));
|
||||||
|
|
||||||
|
#define SET_VISIBLE(action,condition) \
|
||||||
|
pika_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->pika->show_debug_menu);
|
||||||
|
|
||||||
|
#undef SET_VISIBLE
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
debug_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
#define SET_SENSITIVE(action,condition) \
|
||||||
|
pika_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
|
||||||
|
|
||||||
|
SET_SENSITIVE ("debug-show-image-graph", gegl_has_operation ("gegl:introspect"));
|
||||||
|
|
||||||
|
#undef SET_SENSITIVE
|
||||||
|
}
|
||||||
31
app/actions/debug-actions.h
Normal file
31
app/actions/debug-actions.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaActionGroup *group);
|
||||||
|
void debug_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __DEBUG_ACTIONS_H__ */
|
||||||
302
app/actions/debug-commands.c
Normal file
302
app/actions/debug-commands.c
Normal file
@ -0,0 +1,302 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikabase/pikabase.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pika.h"
|
||||||
|
#include "core/pika-utils.h"
|
||||||
|
#include "core/pikacontext.h"
|
||||||
|
#include "core/pikaimage.h"
|
||||||
|
#include "core/pikaprojectable.h"
|
||||||
|
#include "core/pikaprojection.h"
|
||||||
|
|
||||||
|
#include "gegl/pika-gegl-utils.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaaction.h"
|
||||||
|
#include "widgets/pikaactiongroup.h"
|
||||||
|
#include "widgets/pikamenufactory.h"
|
||||||
|
#include "widgets/pikauimanager.h"
|
||||||
|
|
||||||
|
#include "display/pikadisplay.h"
|
||||||
|
#include "display/pikadisplayshell.h"
|
||||||
|
#include "display/pikaimagewindow.h"
|
||||||
|
|
||||||
|
#include "menus/menus.h"
|
||||||
|
|
||||||
|
#include "actions.h"
|
||||||
|
#include "debug-commands.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* local function prototypes */
|
||||||
|
|
||||||
|
static gboolean debug_benchmark_projection (PikaDisplay *display);
|
||||||
|
static gboolean debug_show_image_graph (PikaImage *source_image);
|
||||||
|
|
||||||
|
static void debug_print_qdata (PikaObject *object);
|
||||||
|
static void debug_print_qdata_foreach (GQuark key_id,
|
||||||
|
gpointer data,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
|
||||||
|
/* public functions */
|
||||||
|
|
||||||
|
void
|
||||||
|
debug_gtk_inspector_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
gtk_window_set_interactive_debugging (TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
debug_mem_profile_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
extern gboolean pika_debug_memsize;
|
||||||
|
Pika *pika;
|
||||||
|
return_if_no_pika (pika, data);
|
||||||
|
|
||||||
|
pika_debug_memsize = TRUE;
|
||||||
|
|
||||||
|
pika_object_get_memsize (PIKA_OBJECT (pika), NULL);
|
||||||
|
|
||||||
|
pika_debug_memsize = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
debug_benchmark_projection_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDisplay *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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDisplay *display;
|
||||||
|
PikaUIManager *manager;
|
||||||
|
GList *group_it;
|
||||||
|
GList *strings = NULL;
|
||||||
|
|
||||||
|
return_if_no_display (display, data);
|
||||||
|
|
||||||
|
manager = menus_get_image_manager_singleton (display->pika);
|
||||||
|
|
||||||
|
/* Gather formatted strings of keyboard shortcuts */
|
||||||
|
for (group_it = pika_ui_manager_get_action_groups (manager);
|
||||||
|
group_it;
|
||||||
|
group_it = g_list_next (group_it))
|
||||||
|
{
|
||||||
|
PikaActionGroup *group = group_it->data;
|
||||||
|
GList *actions = NULL;
|
||||||
|
GList *action_it = NULL;
|
||||||
|
|
||||||
|
actions = pika_action_group_list_actions (group);
|
||||||
|
actions = g_list_sort (actions, (GCompareFunc) pika_action_name_compare);
|
||||||
|
|
||||||
|
for (action_it = actions; action_it; action_it = g_list_next (action_it))
|
||||||
|
{
|
||||||
|
gchar **accels;
|
||||||
|
PikaAction *action = action_it->data;
|
||||||
|
const gchar *name = pika_action_get_name (action);
|
||||||
|
|
||||||
|
if (name[0] == '<')
|
||||||
|
continue;
|
||||||
|
|
||||||
|
accels = pika_action_get_display_accels (action);
|
||||||
|
|
||||||
|
if (accels && accels[0])
|
||||||
|
{
|
||||||
|
const gchar *label_tmp;
|
||||||
|
gchar *label;
|
||||||
|
|
||||||
|
label_tmp = pika_action_get_label (action);
|
||||||
|
label = pika_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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
Pika *pika = action_data_get_pika (data);
|
||||||
|
PikaContext *user_context = pika_get_user_context (pika);
|
||||||
|
|
||||||
|
debug_print_qdata (PIKA_OBJECT (pika));
|
||||||
|
debug_print_qdata (PIKA_OBJECT (user_context));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* private functions */
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
debug_benchmark_projection (PikaDisplay *display)
|
||||||
|
{
|
||||||
|
PikaImage *image = pika_display_get_image (display);
|
||||||
|
|
||||||
|
if (image)
|
||||||
|
{
|
||||||
|
PikaProjection *projection = pika_image_get_projection (image);
|
||||||
|
|
||||||
|
pika_projection_stop_rendering (projection);
|
||||||
|
|
||||||
|
PIKA_TIMER_START ();
|
||||||
|
|
||||||
|
pika_image_invalidate_all (image);
|
||||||
|
pika_projection_flush_now (projection, TRUE);
|
||||||
|
|
||||||
|
PIKA_TIMER_END ("Validation of the entire projection");
|
||||||
|
|
||||||
|
g_object_unref (display);
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
debug_show_image_graph (PikaImage *source_image)
|
||||||
|
{
|
||||||
|
GeglNode *image_graph;
|
||||||
|
GeglNode *output_node;
|
||||||
|
PikaImage *new_image;
|
||||||
|
GeglNode *introspect;
|
||||||
|
GeglNode *sink;
|
||||||
|
GeglBuffer *buffer = NULL;
|
||||||
|
|
||||||
|
image_graph = pika_projectable_get_graph (PIKA_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",
|
||||||
|
pika_image_get_display_name (source_image));
|
||||||
|
|
||||||
|
new_image = pika_create_image_from_buffer (source_image->pika,
|
||||||
|
buffer, new_name);
|
||||||
|
pika_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 (PikaObject *object)
|
||||||
|
{
|
||||||
|
g_print ("\nData attached to '%s':\n\n", pika_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);
|
||||||
|
}
|
||||||
49
app/actions/debug-commands.h
Normal file
49
app/actions/debug-commands.h
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void debug_mem_profile_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void debug_benchmark_projection_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void debug_show_image_graph_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void debug_dump_menus_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void debug_dump_keyboard_shortcuts_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void debug_dump_attached_data_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __DEBUG_COMMANDS_H__ */
|
||||||
456
app/actions/dialogs-actions.c
Normal file
456
app/actions/dialogs-actions.c
Normal file
@ -0,0 +1,456 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pika.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaactiongroup.h"
|
||||||
|
#include "widgets/pikadialogfactory.h"
|
||||||
|
#include "widgets/pikahelp-ids.h"
|
||||||
|
#include "widgets/pikasessioninfo.h"
|
||||||
|
#include "widgets/pikatoolbox.h"
|
||||||
|
|
||||||
|
#include "display/pikaimagewindow.h"
|
||||||
|
|
||||||
|
#include "actions.h"
|
||||||
|
#include "dialogs-actions.h"
|
||||||
|
#include "dialogs-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
const PikaStringActionEntry dialogs_dockable_actions[] =
|
||||||
|
{
|
||||||
|
{ "dialogs-toolbox", NULL,
|
||||||
|
NC_("windows-action", "Tool_box"), NULL, { "<primary>B", NULL },
|
||||||
|
NULL /* set in dialogs_actions_update() */,
|
||||||
|
"pika-toolbox",
|
||||||
|
PIKA_HELP_TOOLBOX },
|
||||||
|
|
||||||
|
{ "dialogs-tool-options", PIKA_ICON_DIALOG_TOOL_OPTIONS,
|
||||||
|
NC_("dialogs-action", "Tool _Options Dialog"),
|
||||||
|
NC_("dialogs-action", "Tool _Options"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the tool options dialog"),
|
||||||
|
"pika-tool-options",
|
||||||
|
PIKA_HELP_TOOL_OPTIONS_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-device-status", PIKA_ICON_DIALOG_DEVICE_STATUS,
|
||||||
|
NC_("dialogs-action", "_Device Status Dialog"),
|
||||||
|
NC_("dialogs-action", "_Device Status"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the device status dialog"),
|
||||||
|
"pika-device-status",
|
||||||
|
PIKA_HELP_DEVICE_STATUS_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-symmetry", PIKA_ICON_SYMMETRY,
|
||||||
|
NC_("dialogs-action", "_Symmetry Painting Dialog"),
|
||||||
|
NC_("dialogs-action", "_Symmetry Painting"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the symmetry dialog"),
|
||||||
|
"pika-symmetry-editor",
|
||||||
|
PIKA_HELP_SYMMETRY_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-layers", PIKA_ICON_DIALOG_LAYERS,
|
||||||
|
NC_("dialogs-action", "_Layers Dialog"),
|
||||||
|
NC_("dialogs-action", "_Layers"),
|
||||||
|
{ "<primary>L", NULL },
|
||||||
|
NC_("dialogs-action", "Open the layers dialog"),
|
||||||
|
"pika-layer-list",
|
||||||
|
PIKA_HELP_LAYER_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-channels", PIKA_ICON_DIALOG_CHANNELS,
|
||||||
|
NC_("dialogs-action", "_Channels Dialog"),
|
||||||
|
NC_("dialogs-action", "_Channels"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the channels dialog"),
|
||||||
|
"pika-channel-list",
|
||||||
|
PIKA_HELP_CHANNEL_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-vectors", PIKA_ICON_DIALOG_PATHS,
|
||||||
|
NC_("dialogs-action", "_Paths Dialog"),
|
||||||
|
NC_("dialogs-action", "_Paths"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the paths dialog"),
|
||||||
|
"pika-vectors-list",
|
||||||
|
PIKA_HELP_PATH_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-indexed-palette", PIKA_ICON_COLORMAP,
|
||||||
|
NC_("dialogs-action", "Color_map Dialog"),
|
||||||
|
NC_("dialogs-action", "Color_map"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the colormap dialog"),
|
||||||
|
"pika-indexed-palette",
|
||||||
|
PIKA_HELP_INDEXED_PALETTE_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-histogram", PIKA_ICON_HISTOGRAM,
|
||||||
|
NC_("dialogs-action", "Histogra_m Dialog"),
|
||||||
|
NC_("dialogs-action", "Histogra_m"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the histogram dialog"),
|
||||||
|
"pika-histogram-editor",
|
||||||
|
PIKA_HELP_HISTOGRAM_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-selection-editor", PIKA_ICON_SELECTION,
|
||||||
|
NC_("dialogs-action", "_Selection Editor"), NULL,
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the selection editor"),
|
||||||
|
"pika-selection-editor",
|
||||||
|
PIKA_HELP_SELECTION_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-navigation", PIKA_ICON_DIALOG_NAVIGATION,
|
||||||
|
NC_("dialogs-action", "Na_vigation Dialog"),
|
||||||
|
NC_("dialogs-action", "Na_vigation"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the display navigation dialog"),
|
||||||
|
"pika-navigation-view",
|
||||||
|
PIKA_HELP_NAVIGATION_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-undo-history", PIKA_ICON_DIALOG_UNDO_HISTORY,
|
||||||
|
NC_("dialogs-action", "Undo _History Dialog"),
|
||||||
|
NC_("dialogs-action", "Undo _History"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the undo history dialog"),
|
||||||
|
"pika-undo-history",
|
||||||
|
PIKA_HELP_UNDO_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-cursor", PIKA_ICON_CURSOR,
|
||||||
|
NC_("dialogs-action", "_Pointer Dialog"),
|
||||||
|
NC_("dialogs-action", "_Pointer"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the pointer information dialog"),
|
||||||
|
"pika-cursor-view",
|
||||||
|
PIKA_HELP_POINTER_INFO_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-sample-points", PIKA_ICON_SAMPLE_POINT,
|
||||||
|
NC_("dialogs-action", "_Sample Points Dialog"),
|
||||||
|
NC_("dialogs-action", "_Sample Points"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the sample points dialog"),
|
||||||
|
"pika-sample-point-editor",
|
||||||
|
PIKA_HELP_SAMPLE_POINT_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-colors", PIKA_ICON_COLORS_DEFAULT,
|
||||||
|
NC_("dialogs-action", "Colo_rs Dialog"),
|
||||||
|
NC_("dialogs-action", "Colo_rs"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the FG/BG color dialog"),
|
||||||
|
"pika-color-editor",
|
||||||
|
PIKA_HELP_COLOR_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-brushes", PIKA_ICON_BRUSH,
|
||||||
|
NC_("dialogs-action", "_Brushes Dialog"),
|
||||||
|
NC_("dialogs-action", "_Brushes"),
|
||||||
|
{ "<primary><shift>B", NULL },
|
||||||
|
NC_("dialogs-action", "Open the brushes dialog"),
|
||||||
|
"pika-brush-grid|pika-brush-list",
|
||||||
|
PIKA_HELP_BRUSH_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-brush-editor", PIKA_ICON_BRUSH,
|
||||||
|
NC_("dialogs-action", "Brush Editor"), NULL,
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the brush editor"),
|
||||||
|
"pika-brush-editor",
|
||||||
|
PIKA_HELP_BRUSH_EDIT },
|
||||||
|
|
||||||
|
{ "dialogs-dynamics", PIKA_ICON_DYNAMICS,
|
||||||
|
NC_("dialogs-action", "Paint D_ynamics Dialog"),
|
||||||
|
NC_("dialogs-action", "Paint D_ynamics"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open paint dynamics dialog"),
|
||||||
|
"pika-dynamics-list|pika-dynamics-grid",
|
||||||
|
PIKA_HELP_DYNAMICS_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-dynamics-editor", PIKA_ICON_DYNAMICS,
|
||||||
|
NC_("dialogs-action", "Paint Dynamics Editor"), NULL,
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the paint dynamics editor"),
|
||||||
|
"pika-dynamics-editor",
|
||||||
|
PIKA_HELP_DYNAMICS_EDITOR_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-mypaint-brushes", PIKA_ICON_MYPAINT_BRUSH,
|
||||||
|
NC_("dialogs-action", "_MyPaint Brushes Dialog"),
|
||||||
|
NC_("dialogs-action", "_MyPaint Brushes"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the mypaint brushes dialog"),
|
||||||
|
"pika-mypaint-brush-grid|pika-mapyint-brush-list",
|
||||||
|
PIKA_HELP_MYPAINT_BRUSH_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-patterns", PIKA_ICON_PATTERN,
|
||||||
|
NC_("dialogs-action", "P_atterns Dialog"),
|
||||||
|
NC_("dialogs-action", "P_atterns"),
|
||||||
|
{ "<primary><shift>P", NULL },
|
||||||
|
NC_("dialogs-action", "Open the patterns dialog"),
|
||||||
|
"pika-pattern-grid|pika-pattern-list",
|
||||||
|
PIKA_HELP_PATTERN_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-gradients", PIKA_ICON_GRADIENT,
|
||||||
|
NC_("dialogs-action", "_Gradients Dialog"),
|
||||||
|
NC_("dialogs-action", "_Gradients"),
|
||||||
|
{ "<primary>G", NULL },
|
||||||
|
NC_("dialogs-action", "Open the gradients dialog"),
|
||||||
|
"pika-gradient-list|pika-gradient-grid",
|
||||||
|
PIKA_HELP_GRADIENT_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-gradient-editor", PIKA_ICON_GRADIENT,
|
||||||
|
NC_("dialogs-action", "Gradient Editor"), NULL,
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the gradient editor"),
|
||||||
|
"pika-gradient-editor",
|
||||||
|
PIKA_HELP_GRADIENT_EDIT },
|
||||||
|
|
||||||
|
{ "dialogs-palettes", PIKA_ICON_PALETTE,
|
||||||
|
NC_("dialogs-action", "Pal_ettes Dialog"),
|
||||||
|
NC_("dialogs-action", "Pal_ettes"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the palettes dialog"),
|
||||||
|
"pika-palette-list|pika-palette-grid",
|
||||||
|
PIKA_HELP_PALETTE_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-palette-editor", PIKA_ICON_PALETTE,
|
||||||
|
NC_("dialogs-action", "Palette _Editor"),
|
||||||
|
NC_("dialogs-action", "Palette _Editor"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the palette editor"),
|
||||||
|
"pika-palette-editor",
|
||||||
|
PIKA_HELP_PALETTE_EDIT },
|
||||||
|
|
||||||
|
{ "dialogs-tool-presets", PIKA_ICON_TOOL_PRESET,
|
||||||
|
NC_("dialogs-action", "Tool Pre_sets Dialog"),
|
||||||
|
NC_("dialogs-action", "Tool Pre_sets"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open tool presets dialog"),
|
||||||
|
"pika-tool-preset-list|pika-tool-preset-grid",
|
||||||
|
PIKA_HELP_TOOL_PRESET_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-fonts", PIKA_ICON_FONT,
|
||||||
|
NC_("dialogs-action", "_Fonts Dialog"),
|
||||||
|
NC_("dialogs-action", "_Fonts"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the fonts dialog"),
|
||||||
|
"pika-font-list|pika-font-grid",
|
||||||
|
PIKA_HELP_FONT_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-buffers", PIKA_ICON_BUFFER,
|
||||||
|
NC_("dialogs-action", "B_uffers Dialog"),
|
||||||
|
NC_("dialogs-action", "B_uffers"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the named buffers dialog"),
|
||||||
|
"pika-buffer-list|pika-buffer-grid",
|
||||||
|
PIKA_HELP_BUFFER_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-images", PIKA_ICON_DIALOG_IMAGES,
|
||||||
|
NC_("dialogs-action", "_Images Dialog"),
|
||||||
|
NC_("dialogs-action", "_Images"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the images dialog"),
|
||||||
|
"pika-image-list|pika-image-grid",
|
||||||
|
PIKA_HELP_IMAGE_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-document-history", PIKA_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"),
|
||||||
|
"pika-document-list|pika-document-grid",
|
||||||
|
PIKA_HELP_DOCUMENT_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-templates", PIKA_ICON_TEMPLATE,
|
||||||
|
NC_("dialogs-action", "_Templates Dialog"),
|
||||||
|
NC_("dialogs-action", "_Templates"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the image templates dialog"),
|
||||||
|
"pika-template-list|pika-template-grid",
|
||||||
|
PIKA_HELP_TEMPLATE_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-error-console", PIKA_ICON_DIALOG_WARNING,
|
||||||
|
NC_("dialogs-action", "Error Co_nsole"),
|
||||||
|
NC_("dialogs-action", "Error Co_nsole"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the error console"),
|
||||||
|
"pika-error-console",
|
||||||
|
PIKA_HELP_ERRORS_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-dashboard", PIKA_ICON_DIALOG_DASHBOARD,
|
||||||
|
NC_("dialogs-action", "_Dashboard"),
|
||||||
|
NC_("dialogs-action", "_Dashboard"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the dashboard"),
|
||||||
|
"pika-dashboard",
|
||||||
|
PIKA_HELP_ERRORS_DIALOG }
|
||||||
|
};
|
||||||
|
|
||||||
|
gint n_dialogs_dockable_actions = G_N_ELEMENTS (dialogs_dockable_actions);
|
||||||
|
|
||||||
|
static const PikaStringActionEntry dialogs_toplevel_actions[] =
|
||||||
|
{
|
||||||
|
{ "dialogs-preferences", PIKA_ICON_PREFERENCES_SYSTEM,
|
||||||
|
NC_("dialogs-action", "_Preferences"),
|
||||||
|
NC_("dialogs-action", "_Preferences"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the preferences dialog"),
|
||||||
|
"pika-preferences-dialog",
|
||||||
|
PIKA_HELP_PREFS_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-input-devices", PIKA_ICON_INPUT_DEVICE,
|
||||||
|
NC_("dialogs-action", "_Input Devices Editor"),
|
||||||
|
NC_("dialogs-action", "_Input Devices"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the input devices editor"),
|
||||||
|
"pika-input-devices-dialog",
|
||||||
|
PIKA_HELP_INPUT_DEVICES },
|
||||||
|
|
||||||
|
{ "dialogs-keyboard-shortcuts", PIKA_ICON_CHAR_PICKER,
|
||||||
|
NC_("dialogs-action", "_Keyboard Shortcuts Editor"),
|
||||||
|
NC_("dialogs-action", "_Keyboard Shortcuts"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the keyboard shortcuts editor"),
|
||||||
|
"pika-keyboard-shortcuts-dialog",
|
||||||
|
PIKA_HELP_KEYBOARD_SHORTCUTS },
|
||||||
|
|
||||||
|
{ "dialogs-module-dialog", PIKA_ICON_SYSTEM_RUN,
|
||||||
|
NC_("dialogs-action", "_Modules Dialog"),
|
||||||
|
NC_("dialogs-action", "_Modules"),
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Open the module manager dialog"),
|
||||||
|
"pika-module-dialog",
|
||||||
|
PIKA_HELP_MODULE_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-tips", PIKA_ICON_DIALOG_INFORMATION,
|
||||||
|
NC_("dialogs-action", "_Tip of the Day"), NULL,
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Show some helpful tips on using PIKA"),
|
||||||
|
"pika-tips-dialog",
|
||||||
|
PIKA_HELP_TIPS_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-welcome", PIKA_ICON_DIALOG_INFORMATION,
|
||||||
|
NC_("dialogs-action", "Welcome Dialog"), NULL,
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Show information on running PIKA release"),
|
||||||
|
"pika-welcome-dialog",
|
||||||
|
PIKA_HELP_WELCOME_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-about", PIKA_ICON_HELP_ABOUT,
|
||||||
|
#if defined(G_OS_WIN32)
|
||||||
|
NC_("dialogs-action", "About PIKA"),
|
||||||
|
#elif defined(PLATFORM_OSX)
|
||||||
|
NC_("dialogs-action", "About"),
|
||||||
|
#else /* UNIX: use GNOME HIG */
|
||||||
|
NC_("dialogs-action", "_About"),
|
||||||
|
#endif
|
||||||
|
NULL, { NULL },
|
||||||
|
NC_("dialogs-action", "About PIKA"),
|
||||||
|
"pika-about-dialog",
|
||||||
|
PIKA_HELP_ABOUT_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-action-search", PIKA_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"),
|
||||||
|
"pika-action-search-dialog",
|
||||||
|
PIKA_HELP_ACTION_SEARCH_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-extensions", PIKA_ICON_PLUGIN,
|
||||||
|
NC_("dialogs-action", "Manage _Extensions"), NULL,
|
||||||
|
{ NULL },
|
||||||
|
NC_("dialogs-action", "Manage Extensions: search, install, uninstall, update."),
|
||||||
|
"pika-extensions-dialog",
|
||||||
|
PIKA_HELP_EXTENSIONS_DIALOG }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
dialogs_actions_toolbox_exists (Pika *pika)
|
||||||
|
{
|
||||||
|
PikaDialogFactory *factory = pika_dialog_factory_get_singleton ();
|
||||||
|
gboolean toolbox_found = FALSE;
|
||||||
|
GList *iter;
|
||||||
|
|
||||||
|
/* First look in session managed windows */
|
||||||
|
toolbox_found =
|
||||||
|
pika_dialog_factory_find_widget (factory, "pika-toolbox-window") != NULL;
|
||||||
|
|
||||||
|
/* Then in image windows */
|
||||||
|
if (! toolbox_found)
|
||||||
|
{
|
||||||
|
GList *windows = pika ? pika_get_image_windows (pika) : NULL;
|
||||||
|
|
||||||
|
for (iter = windows; iter; iter = g_list_next (iter))
|
||||||
|
{
|
||||||
|
PikaImageWindow *window = PIKA_IMAGE_WINDOW (windows->data);
|
||||||
|
|
||||||
|
if (pika_image_window_has_toolbox (window))
|
||||||
|
{
|
||||||
|
toolbox_found = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
g_list_free (windows);
|
||||||
|
}
|
||||||
|
|
||||||
|
return toolbox_found;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dialogs_actions_setup (PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
pika_action_group_add_string_actions (group, "dialogs-action",
|
||||||
|
dialogs_dockable_actions,
|
||||||
|
G_N_ELEMENTS (dialogs_dockable_actions),
|
||||||
|
dialogs_create_dockable_cmd_callback);
|
||||||
|
|
||||||
|
pika_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 (PikaActionGroup *group,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
Pika *pika = action_data_get_pika (data);
|
||||||
|
const gchar *toolbox_label = NULL;
|
||||||
|
const gchar *toolbox_tooltip = NULL;
|
||||||
|
|
||||||
|
if (dialogs_actions_toolbox_exists (pika))
|
||||||
|
{
|
||||||
|
toolbox_label = _("Tool_box");
|
||||||
|
toolbox_tooltip = _("Raise the toolbox");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
toolbox_label = _("New Tool_box");
|
||||||
|
toolbox_tooltip = _("Create a new toolbox");
|
||||||
|
}
|
||||||
|
|
||||||
|
pika_action_group_set_action_label (group, "dialogs-toolbox", toolbox_label);
|
||||||
|
pika_action_group_set_action_tooltip (group, "dialogs-toolbox", toolbox_tooltip);
|
||||||
|
}
|
||||||
42
app/actions/dialogs-actions.h
Normal file
42
app/actions/dialogs-actions.h
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 __PIKA_ACTION_GROUP_H__
|
||||||
|
#error "widgets/pikaactiongroup.h must be included prior to dialogs-actions.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern const PikaStringActionEntry dialogs_dockable_actions[];
|
||||||
|
extern gint n_dialogs_dockable_actions;
|
||||||
|
|
||||||
|
|
||||||
|
void dialogs_actions_setup (PikaActionGroup *group);
|
||||||
|
void dialogs_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
gboolean dialogs_actions_toolbox_exists (Pika *pika);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __DIALOGS_ACTIONS_H__ */
|
||||||
81
app/actions/dialogs-commands.c
Normal file
81
app/actions/dialogs-commands.c
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pika.h"
|
||||||
|
|
||||||
|
#include "widgets/pikadialogfactory.h"
|
||||||
|
#include "widgets/pikawidgets-utils.h"
|
||||||
|
#include "widgets/pikawindowstrategy.h"
|
||||||
|
|
||||||
|
#include "actions.h"
|
||||||
|
#include "dialogs-commands.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* public functions */
|
||||||
|
|
||||||
|
void
|
||||||
|
dialogs_create_toplevel_cmd_callback (PikaAction *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)
|
||||||
|
pika_dialog_factory_dialog_new (pika_dialog_factory_get_singleton (),
|
||||||
|
pika_widget_get_monitor (widget),
|
||||||
|
NULL /*ui_manager*/,
|
||||||
|
widget,
|
||||||
|
identifier, -1, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dialogs_create_dockable_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
Pika *pika;
|
||||||
|
GtkWidget *widget;
|
||||||
|
const gchar *identifier;
|
||||||
|
return_if_no_pika (pika, data);
|
||||||
|
return_if_no_widget (widget, data);
|
||||||
|
|
||||||
|
identifier = g_variant_get_string (value, NULL);
|
||||||
|
|
||||||
|
if (identifier)
|
||||||
|
pika_window_strategy_show_dockable_dialog (PIKA_WINDOW_STRATEGY (pika_get_window_strategy (pika)),
|
||||||
|
pika,
|
||||||
|
pika_dialog_factory_get_singleton (),
|
||||||
|
pika_widget_get_monitor (widget),
|
||||||
|
identifier);
|
||||||
|
}
|
||||||
34
app/actions/dialogs-commands.h
Normal file
34
app/actions/dialogs-commands.h
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void dialogs_create_dockable_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __DIALOGS_COMMANDS_H__ */
|
||||||
141
app/actions/dock-actions.c
Normal file
141
app/actions/dock-actions.c
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaactiongroup.h"
|
||||||
|
#include "widgets/pikadockwindow.h"
|
||||||
|
#include "widgets/pikahelp-ids.h"
|
||||||
|
#include "widgets/pikamenudock.h"
|
||||||
|
|
||||||
|
#include "display/pikaimagewindow.h"
|
||||||
|
|
||||||
|
#include "actions.h"
|
||||||
|
#include "dock-actions.h"
|
||||||
|
#include "dock-commands.h"
|
||||||
|
#include "window-actions.h"
|
||||||
|
#include "window-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const PikaActionEntry dock_actions[] =
|
||||||
|
{
|
||||||
|
{ "dock-close", PIKA_ICON_WINDOW_CLOSE,
|
||||||
|
NC_("dock-action", "Close Dock"), NULL, { NULL }, NULL,
|
||||||
|
window_close_cmd_callback,
|
||||||
|
PIKA_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 PikaToggleActionEntry dock_toggle_actions[] =
|
||||||
|
{
|
||||||
|
{ "dock-show-image-menu", NULL,
|
||||||
|
NC_("dock-action", "_Show Image Selection"), NULL, { NULL }, NULL,
|
||||||
|
dock_toggle_image_menu_cmd_callback,
|
||||||
|
TRUE,
|
||||||
|
PIKA_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,
|
||||||
|
PIKA_HELP_DOCK_AUTO_BUTTON }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
dock_actions_setup (PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
pika_action_group_add_actions (group, "dock-action",
|
||||||
|
dock_actions,
|
||||||
|
G_N_ELEMENTS (dock_actions));
|
||||||
|
|
||||||
|
pika_action_group_add_toggle_actions (group, "dock-action",
|
||||||
|
dock_toggle_actions,
|
||||||
|
G_N_ELEMENTS (dock_toggle_actions));
|
||||||
|
|
||||||
|
window_actions_setup (group, PIKA_HELP_DOCK_CHANGE_SCREEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dock_actions_update (PikaActionGroup *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) \
|
||||||
|
pika_action_group_set_action_active (group, action, (active) != 0)
|
||||||
|
#define SET_VISIBLE(action,active) \
|
||||||
|
pika_action_group_set_action_visible (group, action, (active) != 0)
|
||||||
|
|
||||||
|
if (PIKA_IS_DOCK_WINDOW (toplevel))
|
||||||
|
{
|
||||||
|
PikaDockWindow *dock_window = PIKA_DOCK_WINDOW (toplevel);
|
||||||
|
gboolean show_image_menu = ! pika_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",
|
||||||
|
pika_dock_window_get_show_image_menu (dock_window));
|
||||||
|
SET_ACTIVE ("dock-auto-follow-active",
|
||||||
|
pika_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 (PIKA_IS_IMAGE_WINDOW (toplevel))
|
||||||
|
{
|
||||||
|
SET_VISIBLE ("dock-show-image-menu", FALSE);
|
||||||
|
SET_VISIBLE ("dock-auto-follow-active", FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef SET_ACTIVE
|
||||||
|
#undef SET_VISIBLE
|
||||||
|
}
|
||||||
31
app/actions/dock-actions.h
Normal file
31
app/actions/dock-actions.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaActionGroup *group);
|
||||||
|
void dock_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __DOCK_ACTIONS_H__ */
|
||||||
89
app/actions/dock-commands.c
Normal file
89
app/actions/dock-commands.c
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "widgets/pikadockwindow.h"
|
||||||
|
#include "widgets/pikadockwindow.h"
|
||||||
|
|
||||||
|
#include "actions.h"
|
||||||
|
#include "dock-commands.h"
|
||||||
|
|
||||||
|
|
||||||
|
static PikaDockWindow *
|
||||||
|
dock_commands_get_dock_window_from_widget (GtkWidget *widget)
|
||||||
|
{
|
||||||
|
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
|
||||||
|
PikaDockWindow *dock_window = NULL;
|
||||||
|
|
||||||
|
if (PIKA_IS_DOCK_WINDOW (toplevel))
|
||||||
|
dock_window = PIKA_DOCK_WINDOW (toplevel);
|
||||||
|
|
||||||
|
return dock_window;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* public functions */
|
||||||
|
|
||||||
|
void
|
||||||
|
dock_toggle_image_menu_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
GtkWidget *widget = NULL;
|
||||||
|
PikaDockWindow *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);
|
||||||
|
|
||||||
|
pika_dock_window_set_show_image_menu (dock_window, active);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dock_toggle_auto_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
GtkWidget *widget = NULL;
|
||||||
|
PikaDockWindow *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);
|
||||||
|
|
||||||
|
pika_dock_window_set_auto_follow_active (dock_window, active);
|
||||||
|
}
|
||||||
|
}
|
||||||
34
app/actions/dock-commands.h
Normal file
34
app/actions/dock-commands.h
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void dock_toggle_auto_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __DOCK_COMMANDS_H__ */
|
||||||
361
app/actions/dockable-actions.c
Normal file
361
app/actions/dockable-actions.c
Normal file
@ -0,0 +1,361 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaactiongroup.h"
|
||||||
|
#include "widgets/pikacontainerview.h"
|
||||||
|
#include "widgets/pikacontainerview-utils.h"
|
||||||
|
#include "widgets/pikadialogfactory.h"
|
||||||
|
#include "widgets/pikadock.h"
|
||||||
|
#include "widgets/pikadockable.h"
|
||||||
|
#include "widgets/pikadockbook.h"
|
||||||
|
#include "widgets/pikadocked.h"
|
||||||
|
#include "widgets/pikahelp-ids.h"
|
||||||
|
|
||||||
|
#include "dialogs-actions.h"
|
||||||
|
#include "dockable-actions.h"
|
||||||
|
#include "dockable-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const PikaActionEntry dockable_actions[] =
|
||||||
|
{
|
||||||
|
{ "dockable-close-tab", "window-close",
|
||||||
|
NC_("dockable-action", "_Close Tab"), NULL, { NULL }, NULL,
|
||||||
|
dockable_close_tab_cmd_callback,
|
||||||
|
PIKA_HELP_DOCK_TAB_CLOSE },
|
||||||
|
|
||||||
|
{ "dockable-detach-tab", PIKA_ICON_DETACH,
|
||||||
|
NC_("dockable-action", "_Detach Tab"), NULL, { NULL }, NULL,
|
||||||
|
dockable_detach_tab_cmd_callback,
|
||||||
|
PIKA_HELP_DOCK_TAB_DETACH }
|
||||||
|
};
|
||||||
|
|
||||||
|
#define VIEW_SIZE(action,label,size) \
|
||||||
|
{ "dockable-preview-size-" action, NULL, \
|
||||||
|
(label), NULL, { NULL }, NULL, \
|
||||||
|
(size), \
|
||||||
|
PIKA_HELP_DOCK_PREVIEW_SIZE }
|
||||||
|
#define TAB_STYLE(action,label,style) \
|
||||||
|
{ "dockable-tab-style-" action, NULL, \
|
||||||
|
(label), NULL, { NULL }, NULL, \
|
||||||
|
(style), \
|
||||||
|
PIKA_HELP_DOCK_TAB_STYLE }
|
||||||
|
|
||||||
|
static const PikaRadioActionEntry dockable_view_size_actions[] =
|
||||||
|
{
|
||||||
|
VIEW_SIZE ("tiny",
|
||||||
|
NC_("preview-size", "_Tiny"), PIKA_VIEW_SIZE_TINY),
|
||||||
|
VIEW_SIZE ("extra-small",
|
||||||
|
NC_("preview-size", "E_xtra Small"), PIKA_VIEW_SIZE_EXTRA_SMALL),
|
||||||
|
VIEW_SIZE ("small",
|
||||||
|
NC_("preview-size", "_Small"), PIKA_VIEW_SIZE_SMALL),
|
||||||
|
VIEW_SIZE ("medium",
|
||||||
|
NC_("preview-size", "_Medium"), PIKA_VIEW_SIZE_MEDIUM),
|
||||||
|
VIEW_SIZE ("large",
|
||||||
|
NC_("preview-size", "_Large"), PIKA_VIEW_SIZE_LARGE),
|
||||||
|
VIEW_SIZE ("extra-large",
|
||||||
|
NC_("preview-size", "Ex_tra Large"), PIKA_VIEW_SIZE_EXTRA_LARGE),
|
||||||
|
VIEW_SIZE ("huge",
|
||||||
|
NC_("preview-size", "_Huge"), PIKA_VIEW_SIZE_HUGE),
|
||||||
|
VIEW_SIZE ("enormous",
|
||||||
|
NC_("preview-size", "_Enormous"), PIKA_VIEW_SIZE_ENORMOUS),
|
||||||
|
VIEW_SIZE ("gigantic",
|
||||||
|
NC_("preview-size", "_Gigantic"), PIKA_VIEW_SIZE_GIGANTIC)
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaRadioActionEntry dockable_tab_style_actions[] =
|
||||||
|
{
|
||||||
|
TAB_STYLE ("icon",
|
||||||
|
NC_("tab-style", "_Icon"), PIKA_TAB_STYLE_ICON),
|
||||||
|
TAB_STYLE ("preview",
|
||||||
|
NC_("tab-style", "Current _Status"), PIKA_TAB_STYLE_PREVIEW),
|
||||||
|
TAB_STYLE ("name",
|
||||||
|
NC_("tab-style", "_Text"), PIKA_TAB_STYLE_NAME),
|
||||||
|
TAB_STYLE ("icon-name",
|
||||||
|
NC_("tab-style", "I_con & Text"), PIKA_TAB_STYLE_ICON_NAME),
|
||||||
|
TAB_STYLE ("preview-name",
|
||||||
|
NC_("tab-style", "St_atus & Text"), PIKA_TAB_STYLE_PREVIEW_NAME)
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef VIEW_SIZE
|
||||||
|
#undef TAB_STYLE
|
||||||
|
|
||||||
|
|
||||||
|
static const PikaToggleActionEntry 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,
|
||||||
|
PIKA_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,
|
||||||
|
PIKA_HELP_DOCK_SHOW_BUTTON_BAR }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaRadioActionEntry dockable_view_type_actions[] =
|
||||||
|
{
|
||||||
|
{ "dockable-view-type-list", NULL,
|
||||||
|
NC_("dockable-action", "View as _List"), NULL, { NULL }, NULL,
|
||||||
|
PIKA_VIEW_TYPE_LIST,
|
||||||
|
PIKA_HELP_DOCK_VIEW_AS_LIST },
|
||||||
|
|
||||||
|
{ "dockable-view-type-grid", NULL,
|
||||||
|
NC_("dockable-action", "View as _Grid"), NULL, { NULL }, NULL,
|
||||||
|
PIKA_VIEW_TYPE_GRID,
|
||||||
|
PIKA_HELP_DOCK_VIEW_AS_GRID }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
dockable_actions_setup (PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
pika_action_group_add_actions (group, "dockable-action",
|
||||||
|
dockable_actions,
|
||||||
|
G_N_ELEMENTS (dockable_actions));
|
||||||
|
|
||||||
|
pika_action_group_add_toggle_actions (group, "dockable-action",
|
||||||
|
dockable_toggle_actions,
|
||||||
|
G_N_ELEMENTS (dockable_toggle_actions));
|
||||||
|
|
||||||
|
pika_action_group_add_string_actions (group, "dialogs-action",
|
||||||
|
dialogs_dockable_actions,
|
||||||
|
n_dialogs_dockable_actions,
|
||||||
|
dockable_add_tab_cmd_callback);
|
||||||
|
|
||||||
|
pika_action_group_add_radio_actions (group, "preview-size",
|
||||||
|
dockable_view_size_actions,
|
||||||
|
G_N_ELEMENTS (dockable_view_size_actions),
|
||||||
|
NULL,
|
||||||
|
PIKA_VIEW_SIZE_MEDIUM,
|
||||||
|
dockable_view_size_cmd_callback);
|
||||||
|
|
||||||
|
pika_action_group_add_radio_actions (group, "tab-style",
|
||||||
|
dockable_tab_style_actions,
|
||||||
|
G_N_ELEMENTS (dockable_tab_style_actions),
|
||||||
|
NULL,
|
||||||
|
PIKA_TAB_STYLE_PREVIEW,
|
||||||
|
dockable_tab_style_cmd_callback);
|
||||||
|
|
||||||
|
pika_action_group_add_radio_actions (group, "dockable-action",
|
||||||
|
dockable_view_type_actions,
|
||||||
|
G_N_ELEMENTS (dockable_view_type_actions),
|
||||||
|
NULL,
|
||||||
|
PIKA_VIEW_TYPE_LIST,
|
||||||
|
dockable_toggle_view_cmd_callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dockable_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDockable *dockable;
|
||||||
|
PikaDockbook *dockbook;
|
||||||
|
PikaDocked *docked;
|
||||||
|
PikaDock *dock;
|
||||||
|
PikaDialogFactoryEntry *entry;
|
||||||
|
PikaContainerView *view;
|
||||||
|
PikaViewType view_type = -1;
|
||||||
|
gboolean list_view_available = FALSE;
|
||||||
|
gboolean grid_view_available = FALSE;
|
||||||
|
gboolean locked = FALSE;
|
||||||
|
PikaViewSize view_size = -1;
|
||||||
|
PikaTabStyle tab_style = -1;
|
||||||
|
gint n_pages = 0;
|
||||||
|
gint n_books = 0;
|
||||||
|
PikaDockedInterface *docked_iface = NULL;
|
||||||
|
|
||||||
|
if (PIKA_IS_DOCKBOOK (data))
|
||||||
|
{
|
||||||
|
gint page_num;
|
||||||
|
|
||||||
|
dockbook = PIKA_DOCKBOOK (data);
|
||||||
|
|
||||||
|
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (dockbook));
|
||||||
|
|
||||||
|
dockable = (PikaDockable *)
|
||||||
|
gtk_notebook_get_nth_page (GTK_NOTEBOOK (dockbook), page_num);
|
||||||
|
}
|
||||||
|
else if (PIKA_IS_DOCKABLE (data))
|
||||||
|
{
|
||||||
|
dockable = PIKA_DOCKABLE (data);
|
||||||
|
dockbook = pika_dockable_get_dockbook (dockable);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
docked = PIKA_DOCKED (gtk_bin_get_child (GTK_BIN (dockable)));
|
||||||
|
dock = pika_dockbook_get_dock (dockbook);
|
||||||
|
|
||||||
|
|
||||||
|
pika_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 = PIKA_VIEW_TYPE_GRID;
|
||||||
|
else if ((substring = strstr (identifier, "list")))
|
||||||
|
view_type = PIKA_VIEW_TYPE_LIST;
|
||||||
|
|
||||||
|
if (substring)
|
||||||
|
{
|
||||||
|
memcpy (substring, "list", 4);
|
||||||
|
if (pika_dialog_factory_find_entry (pika_dock_get_dialog_factory (dock),
|
||||||
|
identifier))
|
||||||
|
list_view_available = TRUE;
|
||||||
|
|
||||||
|
memcpy (substring, "grid", 4);
|
||||||
|
if (pika_dialog_factory_find_entry (pika_dock_get_dialog_factory (dock),
|
||||||
|
identifier))
|
||||||
|
grid_view_available = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_free (identifier);
|
||||||
|
}
|
||||||
|
|
||||||
|
view = pika_container_view_get_by_dockable (dockable);
|
||||||
|
|
||||||
|
if (view)
|
||||||
|
view_size = pika_container_view_get_view_size (view, NULL);
|
||||||
|
|
||||||
|
tab_style = pika_dockable_get_tab_style (dockable);
|
||||||
|
|
||||||
|
n_pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (dockbook));
|
||||||
|
n_books = g_list_length (pika_dock_get_dockbooks (dock));
|
||||||
|
|
||||||
|
#define SET_ACTIVE(action,active) \
|
||||||
|
pika_action_group_set_action_active (group, action, (active) != 0)
|
||||||
|
#define SET_VISIBLE(action,active) \
|
||||||
|
pika_action_group_set_action_visible (group, action, (active) != 0)
|
||||||
|
#define SET_SENSITIVE(action,sensitive) \
|
||||||
|
pika_action_group_set_action_sensitive (group, action, (sensitive) != 0, NULL)
|
||||||
|
|
||||||
|
|
||||||
|
locked = pika_dockable_get_locked (dockable);
|
||||||
|
|
||||||
|
SET_SENSITIVE ("dockable-detach-tab", (! locked &&
|
||||||
|
(n_pages > 1 || n_books > 1)));
|
||||||
|
|
||||||
|
SET_ACTIVE ("dockable-lock-tab", locked);
|
||||||
|
|
||||||
|
if (view_size != -1)
|
||||||
|
{
|
||||||
|
if (view_size >= PIKA_VIEW_SIZE_GIGANTIC)
|
||||||
|
{
|
||||||
|
SET_ACTIVE ("dockable-preview-size-gigantic", TRUE);
|
||||||
|
}
|
||||||
|
else if (view_size >= PIKA_VIEW_SIZE_ENORMOUS)
|
||||||
|
{
|
||||||
|
SET_ACTIVE ("dockable-preview-size-enormous", TRUE);
|
||||||
|
}
|
||||||
|
else if (view_size >= PIKA_VIEW_SIZE_HUGE)
|
||||||
|
{
|
||||||
|
SET_ACTIVE ("dockable-preview-size-huge", TRUE);
|
||||||
|
}
|
||||||
|
else if (view_size >= PIKA_VIEW_SIZE_EXTRA_LARGE)
|
||||||
|
{
|
||||||
|
SET_ACTIVE ("dockable-preview-size-extra-large", TRUE);
|
||||||
|
}
|
||||||
|
else if (view_size >= PIKA_VIEW_SIZE_LARGE)
|
||||||
|
{
|
||||||
|
SET_ACTIVE ("dockable-preview-size-large", TRUE);
|
||||||
|
}
|
||||||
|
else if (view_size >= PIKA_VIEW_SIZE_MEDIUM)
|
||||||
|
{
|
||||||
|
SET_ACTIVE ("dockable-preview-size-medium", TRUE);
|
||||||
|
}
|
||||||
|
else if (view_size >= PIKA_VIEW_SIZE_SMALL)
|
||||||
|
{
|
||||||
|
SET_ACTIVE ("dockable-preview-size-small", TRUE);
|
||||||
|
}
|
||||||
|
else if (view_size >= PIKA_VIEW_SIZE_EXTRA_SMALL)
|
||||||
|
{
|
||||||
|
SET_ACTIVE ("dockable-preview-size-extra-small", TRUE);
|
||||||
|
}
|
||||||
|
else if (view_size >= PIKA_VIEW_SIZE_TINY)
|
||||||
|
{
|
||||||
|
SET_ACTIVE ("dockable-preview-size-tiny", TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tab_style == PIKA_TAB_STYLE_ICON)
|
||||||
|
SET_ACTIVE ("dockable-tab-style-icon", TRUE);
|
||||||
|
else if (tab_style == PIKA_TAB_STYLE_PREVIEW)
|
||||||
|
SET_ACTIVE ("dockable-tab-style-preview", TRUE);
|
||||||
|
else if (tab_style == PIKA_TAB_STYLE_NAME)
|
||||||
|
SET_ACTIVE ("dockable-tab-style-name", TRUE);
|
||||||
|
else if (tab_style == PIKA_TAB_STYLE_ICON_NAME)
|
||||||
|
SET_ACTIVE ("dockable-tab-style-icon-name", TRUE);
|
||||||
|
else if (tab_style == PIKA_TAB_STYLE_PREVIEW_NAME)
|
||||||
|
SET_ACTIVE ("dockable-tab-style-preview-name", TRUE);
|
||||||
|
|
||||||
|
docked_iface = PIKA_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 == PIKA_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", pika_docked_has_button_bar (docked));
|
||||||
|
SET_ACTIVE ("dockable-show-button-bar",
|
||||||
|
pika_docked_get_show_button_bar (docked));
|
||||||
|
|
||||||
|
#undef SET_ACTIVE
|
||||||
|
#undef SET_VISIBLE
|
||||||
|
#undef SET_SENSITIVE
|
||||||
|
}
|
||||||
31
app/actions/dockable-actions.h
Normal file
31
app/actions/dockable-actions.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaActionGroup *group);
|
||||||
|
void dockable_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __DOCKABLE_ACTIONS_H__ */
|
||||||
297
app/actions/dockable-commands.c
Normal file
297
app/actions/dockable-commands.c
Normal file
@ -0,0 +1,297 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "widgets/pikacontainerview.h"
|
||||||
|
#include "widgets/pikacontainerview-utils.h"
|
||||||
|
#include "widgets/pikadialogfactory.h"
|
||||||
|
#include "widgets/pikadock.h"
|
||||||
|
#include "widgets/pikadockable.h"
|
||||||
|
#include "widgets/pikadockbook.h"
|
||||||
|
#include "widgets/pikadocked.h"
|
||||||
|
#include "widgets/pikasessioninfo.h"
|
||||||
|
|
||||||
|
#include "dockable-commands.h"
|
||||||
|
|
||||||
|
|
||||||
|
static PikaDockable * dockable_get_current (PikaDockbook *dockbook);
|
||||||
|
|
||||||
|
|
||||||
|
/* public functions */
|
||||||
|
|
||||||
|
void
|
||||||
|
dockable_add_tab_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDockbook *dockbook = PIKA_DOCKBOOK (data);
|
||||||
|
|
||||||
|
pika_dockbook_add_from_dialog_factory (dockbook,
|
||||||
|
g_variant_get_string (value, NULL));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dockable_close_tab_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDockbook *dockbook = PIKA_DOCKBOOK (data);
|
||||||
|
PikaDockable *dockable = dockable_get_current (dockbook);
|
||||||
|
|
||||||
|
if (dockable)
|
||||||
|
gtk_container_remove (GTK_CONTAINER (dockbook),
|
||||||
|
GTK_WIDGET (dockable));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dockable_detach_tab_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDockbook *dockbook = PIKA_DOCKBOOK (data);
|
||||||
|
PikaDockable *dockable = dockable_get_current (dockbook);
|
||||||
|
|
||||||
|
if (dockable)
|
||||||
|
pika_dockable_detach (dockable);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dockable_lock_tab_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDockbook *dockbook = PIKA_DOCKBOOK (data);
|
||||||
|
PikaDockable *dockable = dockable_get_current (dockbook);
|
||||||
|
|
||||||
|
if (dockable)
|
||||||
|
{
|
||||||
|
gboolean lock = g_variant_get_boolean (value);
|
||||||
|
|
||||||
|
pika_dockable_set_locked (dockable, lock);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dockable_toggle_view_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDockbook *dockbook = PIKA_DOCKBOOK (data);
|
||||||
|
PikaDockable *dockable;
|
||||||
|
PikaViewType view_type;
|
||||||
|
gint page_num;
|
||||||
|
|
||||||
|
view_type = (PikaViewType) g_variant_get_int32 (value);
|
||||||
|
|
||||||
|
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (dockbook));
|
||||||
|
|
||||||
|
dockable = (PikaDockable *)
|
||||||
|
gtk_notebook_get_nth_page (GTK_NOTEBOOK (dockbook), page_num);
|
||||||
|
|
||||||
|
if (dockable)
|
||||||
|
{
|
||||||
|
PikaDialogFactoryEntry *entry;
|
||||||
|
|
||||||
|
pika_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 == PIKA_VIEW_TYPE_GRID)
|
||||||
|
{
|
||||||
|
g_free (identifier);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! substring)
|
||||||
|
{
|
||||||
|
substring = strstr (identifier, "list");
|
||||||
|
|
||||||
|
if (substring && view_type == PIKA_VIEW_TYPE_LIST)
|
||||||
|
{
|
||||||
|
g_free (identifier);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (substring)
|
||||||
|
{
|
||||||
|
PikaContainerView *old_view;
|
||||||
|
GtkWidget *new_dockable;
|
||||||
|
PikaDock *dock;
|
||||||
|
gint view_size = -1;
|
||||||
|
|
||||||
|
if (view_type == PIKA_VIEW_TYPE_LIST)
|
||||||
|
memcpy (substring, "list", 4);
|
||||||
|
else if (view_type == PIKA_VIEW_TYPE_GRID)
|
||||||
|
memcpy (substring, "grid", 4);
|
||||||
|
|
||||||
|
old_view = pika_container_view_get_by_dockable (dockable);
|
||||||
|
|
||||||
|
if (old_view)
|
||||||
|
view_size = pika_container_view_get_view_size (old_view, NULL);
|
||||||
|
|
||||||
|
dock = pika_dockbook_get_dock (dockbook);
|
||||||
|
new_dockable = pika_dialog_factory_dockable_new (pika_dock_get_dialog_factory (dock),
|
||||||
|
dock,
|
||||||
|
identifier,
|
||||||
|
view_size);
|
||||||
|
|
||||||
|
if (new_dockable)
|
||||||
|
{
|
||||||
|
PikaDocked *old;
|
||||||
|
PikaDocked *new;
|
||||||
|
gboolean show;
|
||||||
|
|
||||||
|
pika_dockable_set_locked (PIKA_DOCKABLE (new_dockable),
|
||||||
|
pika_dockable_get_locked (dockable));
|
||||||
|
|
||||||
|
old = PIKA_DOCKED (gtk_bin_get_child (GTK_BIN (dockable)));
|
||||||
|
new = PIKA_DOCKED (gtk_bin_get_child (GTK_BIN (new_dockable)));
|
||||||
|
|
||||||
|
show = pika_docked_get_show_button_bar (old);
|
||||||
|
pika_docked_set_show_button_bar (new, show);
|
||||||
|
|
||||||
|
/* Maybe pika_dialog_factory_dockable_new() returned
|
||||||
|
* an already existing singleton dockable, so check
|
||||||
|
* if it already is attached to a dockbook.
|
||||||
|
*/
|
||||||
|
if (! pika_dockable_get_dockbook (PIKA_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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDockbook *dockbook = PIKA_DOCKBOOK (data);
|
||||||
|
PikaDockable *dockable = dockable_get_current (dockbook);
|
||||||
|
gint view_size;
|
||||||
|
|
||||||
|
view_size = g_variant_get_int32 (value);
|
||||||
|
|
||||||
|
if (dockable)
|
||||||
|
{
|
||||||
|
PikaContainerView *view = pika_container_view_get_by_dockable (dockable);
|
||||||
|
|
||||||
|
if (view)
|
||||||
|
{
|
||||||
|
gint old_size;
|
||||||
|
gint border_width;
|
||||||
|
|
||||||
|
old_size = pika_container_view_get_view_size (view, &border_width);
|
||||||
|
|
||||||
|
if (old_size != view_size)
|
||||||
|
pika_container_view_set_view_size (view, view_size, border_width);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dockable_tab_style_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDockbook *dockbook = PIKA_DOCKBOOK (data);
|
||||||
|
PikaDockable *dockable = dockable_get_current (dockbook);
|
||||||
|
PikaTabStyle tab_style;
|
||||||
|
|
||||||
|
tab_style = (PikaTabStyle) g_variant_get_int32 (value);
|
||||||
|
|
||||||
|
if (dockable && pika_dockable_get_tab_style (dockable) != tab_style)
|
||||||
|
{
|
||||||
|
GtkWidget *tab_widget;
|
||||||
|
|
||||||
|
pika_dockable_set_tab_style (dockable, tab_style);
|
||||||
|
|
||||||
|
tab_widget = pika_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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaDockbook *dockbook = PIKA_DOCKBOOK (data);
|
||||||
|
PikaDockable *dockable = dockable_get_current (dockbook);
|
||||||
|
|
||||||
|
if (dockable)
|
||||||
|
{
|
||||||
|
PikaDocked *docked;
|
||||||
|
gboolean show;
|
||||||
|
|
||||||
|
docked = PIKA_DOCKED (gtk_bin_get_child (GTK_BIN (dockable)));
|
||||||
|
show = g_variant_get_boolean (value);
|
||||||
|
|
||||||
|
pika_docked_set_show_button_bar (docked, show);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* private functions */
|
||||||
|
|
||||||
|
static PikaDockable *
|
||||||
|
dockable_get_current (PikaDockbook *dockbook)
|
||||||
|
{
|
||||||
|
gint page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (dockbook));
|
||||||
|
|
||||||
|
return (PikaDockable *) gtk_notebook_get_nth_page (GTK_NOTEBOOK (dockbook),
|
||||||
|
page_num);
|
||||||
|
}
|
||||||
53
app/actions/dockable-commands.h
Normal file
53
app/actions/dockable-commands.h
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void dockable_close_tab_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void dockable_detach_tab_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void dockable_lock_tab_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void dockable_toggle_view_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void dockable_view_size_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void dockable_tab_style_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void dockable_show_button_bar_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __DOCKABLE_COMMANDS_H__ */
|
||||||
143
app/actions/documents-actions.c
Normal file
143
app/actions/documents-actions.c
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pikacontext.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaactiongroup.h"
|
||||||
|
#include "widgets/pikahelp-ids.h"
|
||||||
|
|
||||||
|
#include "actions.h"
|
||||||
|
#include "documents-actions.h"
|
||||||
|
#include "documents-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const PikaActionEntry documents_actions[] =
|
||||||
|
{
|
||||||
|
{ "documents-open", PIKA_ICON_DOCUMENT_OPEN,
|
||||||
|
NC_("documents-action", "_Open Image"), NULL, { NULL },
|
||||||
|
NC_("documents-action", "Open the selected entry"),
|
||||||
|
documents_open_cmd_callback,
|
||||||
|
PIKA_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,
|
||||||
|
PIKA_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,
|
||||||
|
PIKA_HELP_DOCUMENT_OPEN },
|
||||||
|
|
||||||
|
{ "documents-copy-location", PIKA_ICON_EDIT_COPY,
|
||||||
|
NC_("documents-action", "Copy Image _Location"), NULL, { NULL },
|
||||||
|
NC_("documents-action", "Copy image location to clipboard"),
|
||||||
|
documents_copy_location_cmd_callback,
|
||||||
|
PIKA_HELP_DOCUMENT_COPY_LOCATION },
|
||||||
|
|
||||||
|
{ "documents-show-in-file-manager", PIKA_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,
|
||||||
|
PIKA_HELP_DOCUMENT_SHOW_IN_FILE_MANAGER },
|
||||||
|
|
||||||
|
{ "documents-remove", PIKA_ICON_LIST_REMOVE,
|
||||||
|
NC_("documents-action", "Remove _Entry"), NULL, { NULL },
|
||||||
|
NC_("documents-action", "Remove the selected entry"),
|
||||||
|
documents_remove_cmd_callback,
|
||||||
|
PIKA_HELP_DOCUMENT_REMOVE },
|
||||||
|
|
||||||
|
{ "documents-clear", PIKA_ICON_SHRED,
|
||||||
|
NC_("documents-action", "_Clear History"), NULL, { NULL },
|
||||||
|
NC_("documents-action", "Clear the entire document history"),
|
||||||
|
documents_clear_cmd_callback,
|
||||||
|
PIKA_HELP_DOCUMENT_CLEAR },
|
||||||
|
|
||||||
|
{ "documents-recreate-preview", PIKA_ICON_VIEW_REFRESH,
|
||||||
|
NC_("documents-action", "Recreate _Preview"), NULL, { NULL },
|
||||||
|
NC_("documents-action", "Recreate preview"),
|
||||||
|
documents_recreate_preview_cmd_callback,
|
||||||
|
PIKA_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,
|
||||||
|
PIKA_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,
|
||||||
|
PIKA_HELP_DOCUMENT_REFRESH }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
documents_actions_setup (PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
pika_action_group_add_actions (group, "documents-action",
|
||||||
|
documents_actions,
|
||||||
|
G_N_ELEMENTS (documents_actions));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
documents_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaContext *context;
|
||||||
|
PikaImagefile *imagefile = NULL;
|
||||||
|
|
||||||
|
context = action_data_get_context (data);
|
||||||
|
|
||||||
|
if (context)
|
||||||
|
imagefile = pika_context_get_imagefile (context);
|
||||||
|
|
||||||
|
#define SET_SENSITIVE(action,condition) \
|
||||||
|
pika_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
|
||||||
|
}
|
||||||
31
app/actions/documents-actions.h
Normal file
31
app/actions/documents-actions.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaActionGroup *group);
|
||||||
|
void documents_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __DOCUMENTS_ACTIONS_H__ */
|
||||||
427
app/actions/documents-commands.c
Normal file
427
app/actions/documents-commands.c
Normal file
@ -0,0 +1,427 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikabase/pikabase.h"
|
||||||
|
#include "libpikathumb/pikathumb.h"
|
||||||
|
#include "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "config/pikacoreconfig.h"
|
||||||
|
|
||||||
|
#include "core/pika.h"
|
||||||
|
#include "core/pikacontainer.h"
|
||||||
|
#include "core/pikacontext.h"
|
||||||
|
#include "core/pikaimagefile.h"
|
||||||
|
#include "core/pikaimage.h"
|
||||||
|
|
||||||
|
#include "file/file-open.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaclipboard.h"
|
||||||
|
#include "widgets/pikacontainerview.h"
|
||||||
|
#include "widgets/pikacontainerview-utils.h"
|
||||||
|
#include "widgets/pikadocumentview.h"
|
||||||
|
#include "widgets/pikamessagebox.h"
|
||||||
|
#include "widgets/pikamessagedialog.h"
|
||||||
|
#include "widgets/pikawidgets-utils.h"
|
||||||
|
|
||||||
|
#include "display/pikadisplay.h"
|
||||||
|
#include "display/pikadisplay-foreach.h"
|
||||||
|
#include "display/pikadisplayshell.h"
|
||||||
|
|
||||||
|
#include "documents-commands.h"
|
||||||
|
#include "file-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
const gchar *name;
|
||||||
|
gboolean found;
|
||||||
|
} RaiseClosure;
|
||||||
|
|
||||||
|
|
||||||
|
/* local function prototypes */
|
||||||
|
|
||||||
|
static void documents_open_image (GtkWidget *editor,
|
||||||
|
PikaContext *context,
|
||||||
|
PikaImagefile *imagefile);
|
||||||
|
static void documents_raise_display (PikaDisplay *display,
|
||||||
|
RaiseClosure *closure);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* public functions */
|
||||||
|
|
||||||
|
void
|
||||||
|
documents_open_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaContainerEditor *editor = PIKA_CONTAINER_EDITOR (data);
|
||||||
|
PikaContext *context;
|
||||||
|
PikaContainer *container;
|
||||||
|
PikaImagefile *imagefile;
|
||||||
|
|
||||||
|
context = pika_container_view_get_context (editor->view);
|
||||||
|
container = pika_container_view_get_container (editor->view);
|
||||||
|
|
||||||
|
imagefile = pika_context_get_imagefile (context);
|
||||||
|
|
||||||
|
if (imagefile && pika_container_have (container, PIKA_OBJECT (imagefile)))
|
||||||
|
{
|
||||||
|
documents_open_image (GTK_WIDGET (editor), context, imagefile);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
file_file_open_dialog (context->pika, NULL, GTK_WIDGET (editor));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
documents_raise_or_open_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaContainerEditor *editor = PIKA_CONTAINER_EDITOR (data);
|
||||||
|
PikaContext *context;
|
||||||
|
PikaContainer *container;
|
||||||
|
PikaImagefile *imagefile;
|
||||||
|
|
||||||
|
context = pika_container_view_get_context (editor->view);
|
||||||
|
container = pika_container_view_get_container (editor->view);
|
||||||
|
|
||||||
|
imagefile = pika_context_get_imagefile (context);
|
||||||
|
|
||||||
|
if (imagefile && pika_container_have (container, PIKA_OBJECT (imagefile)))
|
||||||
|
{
|
||||||
|
RaiseClosure closure;
|
||||||
|
|
||||||
|
closure.name = pika_object_get_name (imagefile);
|
||||||
|
closure.found = FALSE;
|
||||||
|
|
||||||
|
pika_container_foreach (PIKA_CONTAINER (context->pika->displays),
|
||||||
|
(GFunc) documents_raise_display,
|
||||||
|
&closure);
|
||||||
|
|
||||||
|
if (! closure.found)
|
||||||
|
documents_open_image (GTK_WIDGET (editor), context, imagefile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
documents_file_open_dialog_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaContainerEditor *editor = PIKA_CONTAINER_EDITOR (data);
|
||||||
|
PikaContext *context;
|
||||||
|
PikaContainer *container;
|
||||||
|
PikaImagefile *imagefile;
|
||||||
|
|
||||||
|
context = pika_container_view_get_context (editor->view);
|
||||||
|
container = pika_container_view_get_container (editor->view);
|
||||||
|
|
||||||
|
imagefile = pika_context_get_imagefile (context);
|
||||||
|
|
||||||
|
if (imagefile && pika_container_have (container, PIKA_OBJECT (imagefile)))
|
||||||
|
{
|
||||||
|
file_file_open_dialog (context->pika,
|
||||||
|
pika_imagefile_get_file (imagefile),
|
||||||
|
GTK_WIDGET (editor));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
documents_copy_location_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaContainerEditor *editor = PIKA_CONTAINER_EDITOR (data);
|
||||||
|
PikaContext *context;
|
||||||
|
PikaImagefile *imagefile;
|
||||||
|
|
||||||
|
context = pika_container_view_get_context (editor->view);
|
||||||
|
imagefile = pika_context_get_imagefile (context);
|
||||||
|
|
||||||
|
if (imagefile)
|
||||||
|
pika_clipboard_set_text (context->pika,
|
||||||
|
pika_object_get_name (imagefile));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
documents_show_in_file_manager_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaContainerEditor *editor = PIKA_CONTAINER_EDITOR (data);
|
||||||
|
PikaContext *context;
|
||||||
|
PikaImagefile *imagefile;
|
||||||
|
|
||||||
|
context = pika_container_view_get_context (editor->view);
|
||||||
|
imagefile = pika_context_get_imagefile (context);
|
||||||
|
|
||||||
|
if (imagefile)
|
||||||
|
{
|
||||||
|
GFile *file = g_file_new_for_uri (pika_object_get_name (imagefile));
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
|
if (! pika_file_show_in_file_manager (file, &error))
|
||||||
|
{
|
||||||
|
pika_message (context->pika, G_OBJECT (editor),
|
||||||
|
PIKA_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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaContainerEditor *editor = PIKA_CONTAINER_EDITOR (data);
|
||||||
|
PikaContext *context = pika_container_view_get_context (editor->view);
|
||||||
|
PikaImagefile *imagefile = pika_context_get_imagefile (context);
|
||||||
|
const gchar *uri;
|
||||||
|
|
||||||
|
uri = pika_object_get_name (imagefile);
|
||||||
|
|
||||||
|
gtk_recent_manager_remove_item (gtk_recent_manager_get_default (), uri, NULL);
|
||||||
|
|
||||||
|
pika_container_view_remove_active (editor->view);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
documents_clear_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaContainerEditor *editor = PIKA_CONTAINER_EDITOR (data);
|
||||||
|
PikaContext *context = pika_container_view_get_context (editor->view);
|
||||||
|
Pika *pika = context->pika;
|
||||||
|
GtkWidget *dialog;
|
||||||
|
|
||||||
|
dialog = pika_message_dialog_new (_("Clear Document History"),
|
||||||
|
PIKA_ICON_SHRED,
|
||||||
|
GTK_WIDGET (editor),
|
||||||
|
GTK_DIALOG_MODAL |
|
||||||
|
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||||
|
pika_standard_help_func, NULL,
|
||||||
|
|
||||||
|
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
||||||
|
_("Cl_ear"), GTK_RESPONSE_OK,
|
||||||
|
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
pika_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);
|
||||||
|
|
||||||
|
pika_message_box_set_primary_text (PIKA_MESSAGE_DIALOG (dialog)->box,
|
||||||
|
_("Clear the Recent Documents list?"));
|
||||||
|
|
||||||
|
pika_message_box_set_text (PIKA_MESSAGE_DIALOG (dialog)->box,
|
||||||
|
_("Clearing the document history will "
|
||||||
|
"permanently remove all images from "
|
||||||
|
"the recent documents list."));
|
||||||
|
|
||||||
|
if (pika_dialog_run (PIKA_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,
|
||||||
|
"Photo and Image Kooker Application"))
|
||||||
|
{
|
||||||
|
gtk_recent_manager_remove_item (manager,
|
||||||
|
gtk_recent_info_get_uri (info),
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
gtk_recent_info_unref (info);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_list_free (items);
|
||||||
|
|
||||||
|
pika_container_clear (pika->documents);
|
||||||
|
}
|
||||||
|
|
||||||
|
gtk_widget_destroy (dialog);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
documents_recreate_preview_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaContainerEditor *editor = PIKA_CONTAINER_EDITOR (data);
|
||||||
|
PikaContext *context;
|
||||||
|
PikaContainer *container;
|
||||||
|
PikaImagefile *imagefile;
|
||||||
|
|
||||||
|
context = pika_container_view_get_context (editor->view);
|
||||||
|
container = pika_container_view_get_container (editor->view);
|
||||||
|
|
||||||
|
imagefile = pika_context_get_imagefile (context);
|
||||||
|
|
||||||
|
if (imagefile && pika_container_have (container, PIKA_OBJECT (imagefile)))
|
||||||
|
{
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
|
if (! pika_imagefile_create_thumbnail (imagefile,
|
||||||
|
context, NULL,
|
||||||
|
context->pika->config->thumbnail_size,
|
||||||
|
FALSE, &error))
|
||||||
|
{
|
||||||
|
pika_message_literal (context->pika,
|
||||||
|
NULL , PIKA_MESSAGE_ERROR,
|
||||||
|
error->message);
|
||||||
|
g_clear_error (&error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
documents_reload_previews_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaContainerEditor *editor = PIKA_CONTAINER_EDITOR (data);
|
||||||
|
PikaContainer *container;
|
||||||
|
|
||||||
|
container = pika_container_view_get_container (editor->view);
|
||||||
|
|
||||||
|
pika_container_foreach (container,
|
||||||
|
(GFunc) pika_imagefile_update,
|
||||||
|
editor->view);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
documents_remove_dangling_foreach (PikaImagefile *imagefile,
|
||||||
|
PikaContainer *container)
|
||||||
|
{
|
||||||
|
PikaThumbnail *thumbnail = pika_imagefile_get_thumbnail (imagefile);
|
||||||
|
|
||||||
|
if (pika_thumbnail_peek_image (thumbnail) == PIKA_THUMB_STATE_NOT_FOUND)
|
||||||
|
{
|
||||||
|
const gchar *uri = pika_object_get_name (imagefile);
|
||||||
|
|
||||||
|
gtk_recent_manager_remove_item (gtk_recent_manager_get_default (), uri,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
pika_container_remove (container, PIKA_OBJECT (imagefile));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
documents_remove_dangling_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaContainerEditor *editor = PIKA_CONTAINER_EDITOR (data);
|
||||||
|
PikaContainer *container;
|
||||||
|
|
||||||
|
container = pika_container_view_get_container (editor->view);
|
||||||
|
|
||||||
|
pika_container_foreach (container,
|
||||||
|
(GFunc) documents_remove_dangling_foreach,
|
||||||
|
container);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* private functions */
|
||||||
|
|
||||||
|
static void
|
||||||
|
documents_open_image (GtkWidget *editor,
|
||||||
|
PikaContext *context,
|
||||||
|
PikaImagefile *imagefile)
|
||||||
|
{
|
||||||
|
GFile *file;
|
||||||
|
PikaImage *image;
|
||||||
|
PikaPDBStatusType status;
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
|
file = pika_imagefile_get_file (imagefile);
|
||||||
|
|
||||||
|
image = file_open_with_display (context->pika, context, NULL, file, FALSE,
|
||||||
|
G_OBJECT (pika_widget_get_monitor (editor)),
|
||||||
|
&status, &error);
|
||||||
|
|
||||||
|
if (! image && status != PIKA_PDB_CANCEL)
|
||||||
|
{
|
||||||
|
pika_message (context->pika, G_OBJECT (editor), PIKA_MESSAGE_ERROR,
|
||||||
|
_("Opening '%s' failed:\n\n%s"),
|
||||||
|
pika_file_get_utf8_name (file), error->message);
|
||||||
|
g_clear_error (&error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
documents_raise_display (PikaDisplay *display,
|
||||||
|
RaiseClosure *closure)
|
||||||
|
{
|
||||||
|
PikaImage *image;
|
||||||
|
GFile *file;
|
||||||
|
gchar *uri = NULL;
|
||||||
|
|
||||||
|
image = pika_display_get_image (display);
|
||||||
|
|
||||||
|
file = pika_image_get_file (image);
|
||||||
|
if (! file)
|
||||||
|
file = pika_image_get_imported_file (image);
|
||||||
|
|
||||||
|
if (file)
|
||||||
|
uri = g_file_get_uri (file);
|
||||||
|
|
||||||
|
if (! g_strcmp0 (closure->name, uri))
|
||||||
|
{
|
||||||
|
closure->found = TRUE;
|
||||||
|
pika_display_shell_present (pika_display_get_shell (display));
|
||||||
|
}
|
||||||
|
|
||||||
|
g_free (uri);
|
||||||
|
}
|
||||||
58
app/actions/documents-commands.h
Normal file
58
app/actions/documents-commands.h
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void documents_raise_or_open_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void documents_file_open_dialog_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void documents_copy_location_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void documents_show_in_file_manager_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void documents_remove_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void documents_clear_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void documents_recreate_preview_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void documents_reload_previews_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void documents_remove_dangling_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __DOCUMENTS_COMMANDS_H__ */
|
||||||
249
app/actions/drawable-actions.c
Normal file
249
app/actions/drawable-actions.c
Normal file
@ -0,0 +1,249 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pika.h"
|
||||||
|
#include "core/pikacontext.h"
|
||||||
|
#include "core/pikaimage.h"
|
||||||
|
#include "core/pikalayermask.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaactiongroup.h"
|
||||||
|
#include "widgets/pikahelp-ids.h"
|
||||||
|
|
||||||
|
#include "actions.h"
|
||||||
|
#include "drawable-actions.h"
|
||||||
|
#include "drawable-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const PikaActionEntry drawable_actions[] =
|
||||||
|
{
|
||||||
|
{ "drawable-equalize", NULL,
|
||||||
|
NC_("drawable-action", "_Equalize"), NULL, { NULL },
|
||||||
|
NC_("drawable-action", "Automatic contrast enhancement"),
|
||||||
|
drawable_equalize_cmd_callback,
|
||||||
|
PIKA_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,
|
||||||
|
PIKA_HELP_LAYER_WHITE_BALANCE }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaToggleActionEntry drawable_toggle_actions[] =
|
||||||
|
{
|
||||||
|
{ "drawable-visible", PIKA_ICON_VISIBLE,
|
||||||
|
NC_("drawable-action", "Toggle Drawables _Visibility"), NULL, { NULL }, NULL,
|
||||||
|
drawable_visible_cmd_callback,
|
||||||
|
FALSE,
|
||||||
|
PIKA_HELP_LAYER_VISIBLE },
|
||||||
|
|
||||||
|
{ "drawable-lock-content", PIKA_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,
|
||||||
|
PIKA_HELP_LAYER_LOCK_PIXELS },
|
||||||
|
|
||||||
|
{ "drawable-lock-position", PIKA_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,
|
||||||
|
PIKA_HELP_LAYER_LOCK_POSITION },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaEnumActionEntry drawable_flip_actions[] =
|
||||||
|
{
|
||||||
|
{ "drawable-flip-horizontal", PIKA_ICON_OBJECT_FLIP_HORIZONTAL,
|
||||||
|
NC_("drawable-action", "Flip _Horizontally"), NULL, { NULL },
|
||||||
|
NC_("drawable-action", "Flip drawable horizontally"),
|
||||||
|
PIKA_ORIENTATION_HORIZONTAL, FALSE,
|
||||||
|
PIKA_HELP_LAYER_FLIP_HORIZONTAL },
|
||||||
|
|
||||||
|
{ "drawable-flip-vertical", PIKA_ICON_OBJECT_FLIP_VERTICAL,
|
||||||
|
NC_("drawable-action", "Flip _Vertically"), NULL, { NULL },
|
||||||
|
NC_("drawable-action", "Flip drawable vertically"),
|
||||||
|
PIKA_ORIENTATION_VERTICAL, FALSE,
|
||||||
|
PIKA_HELP_LAYER_FLIP_VERTICAL }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaEnumActionEntry drawable_rotate_actions[] =
|
||||||
|
{
|
||||||
|
{ "drawable-rotate-90", PIKA_ICON_OBJECT_ROTATE_90,
|
||||||
|
NC_("drawable-action", "Rotate 90° _clockwise"), NULL, { NULL },
|
||||||
|
NC_("drawable-action", "Rotate drawable 90 degrees to the right"),
|
||||||
|
PIKA_ROTATE_90, FALSE,
|
||||||
|
PIKA_HELP_LAYER_ROTATE_90 },
|
||||||
|
|
||||||
|
{ "drawable-rotate-180", PIKA_ICON_OBJECT_ROTATE_180,
|
||||||
|
NC_("drawable-action", "Rotate _180°"), NULL, { NULL },
|
||||||
|
NC_("drawable-action", "Turn drawable upside-down"),
|
||||||
|
PIKA_ROTATE_180, FALSE,
|
||||||
|
PIKA_HELP_LAYER_ROTATE_180 },
|
||||||
|
|
||||||
|
{ "drawable-rotate-270", PIKA_ICON_OBJECT_ROTATE_270,
|
||||||
|
NC_("drawable-action", "Rotate 90° counter-clock_wise"), NULL, { NULL },
|
||||||
|
NC_("drawable-action", "Rotate drawable 90 degrees to the left"),
|
||||||
|
PIKA_ROTATE_270, FALSE,
|
||||||
|
PIKA_HELP_LAYER_ROTATE_270 }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
drawable_actions_setup (PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
pika_action_group_add_actions (group, "drawable-action",
|
||||||
|
drawable_actions,
|
||||||
|
G_N_ELEMENTS (drawable_actions));
|
||||||
|
|
||||||
|
pika_action_group_add_toggle_actions (group, "drawable-action",
|
||||||
|
drawable_toggle_actions,
|
||||||
|
G_N_ELEMENTS (drawable_toggle_actions));
|
||||||
|
|
||||||
|
pika_action_group_add_enum_actions (group, "drawable-action",
|
||||||
|
drawable_flip_actions,
|
||||||
|
G_N_ELEMENTS (drawable_flip_actions),
|
||||||
|
drawable_flip_cmd_callback);
|
||||||
|
|
||||||
|
pika_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) \
|
||||||
|
pika_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 (PikaActionGroup *group,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *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 = pika_image_get_selected_drawables (image);
|
||||||
|
|
||||||
|
for (iter = drawables; iter; iter = iter->next)
|
||||||
|
{
|
||||||
|
PikaItem *item;
|
||||||
|
|
||||||
|
if (pika_item_get_visible (iter->data))
|
||||||
|
has_visible = TRUE;
|
||||||
|
|
||||||
|
if (pika_item_can_lock_content (iter->data))
|
||||||
|
{
|
||||||
|
if (! pika_item_get_lock_content (iter->data))
|
||||||
|
locked = FALSE;
|
||||||
|
can_lock = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pika_item_can_lock_position (iter->data))
|
||||||
|
{
|
||||||
|
if (! pika_item_get_lock_position (iter->data))
|
||||||
|
locked_pos = FALSE;
|
||||||
|
can_lock_pos = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pika_viewable_get_children (PIKA_VIEWABLE (iter->data)))
|
||||||
|
none_children = FALSE;
|
||||||
|
|
||||||
|
if (! pika_drawable_is_rgb (iter->data))
|
||||||
|
all_rgb = FALSE;
|
||||||
|
|
||||||
|
if (PIKA_IS_LAYER_MASK (iter->data))
|
||||||
|
item = PIKA_ITEM (pika_layer_mask_get_layer (PIKA_LAYER_MASK (iter->data)));
|
||||||
|
else
|
||||||
|
item = PIKA_ITEM (iter->data);
|
||||||
|
|
||||||
|
if (pika_item_is_content_locked (item, NULL))
|
||||||
|
all_writable = FALSE;
|
||||||
|
|
||||||
|
if (pika_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) \
|
||||||
|
pika_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
|
||||||
|
#define SET_ACTIVE(action,condition) \
|
||||||
|
pika_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);
|
||||||
|
}
|
||||||
31
app/actions/drawable-actions.h
Normal file
31
app/actions/drawable-actions.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaActionGroup *group);
|
||||||
|
void drawable_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __DRAWABLE_ACTIONS_H__ */
|
||||||
429
app/actions/drawable-commands.c
Normal file
429
app/actions/drawable-commands.c
Normal file
@ -0,0 +1,429 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pika.h"
|
||||||
|
#include "core/pikadrawable-equalize.h"
|
||||||
|
#include "core/pikadrawable-levels.h"
|
||||||
|
#include "core/pikadrawable-operation.h"
|
||||||
|
#include "core/pikaimage.h"
|
||||||
|
#include "core/pikaimage-undo.h"
|
||||||
|
#include "core/pikaitemundo.h"
|
||||||
|
#include "core/pikalayermask.h"
|
||||||
|
#include "core/pikaprogress.h"
|
||||||
|
|
||||||
|
#include "dialogs/dialogs.h"
|
||||||
|
|
||||||
|
#include "actions.h"
|
||||||
|
#include "drawable-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* public functions */
|
||||||
|
|
||||||
|
void
|
||||||
|
drawable_equalize_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *image;
|
||||||
|
GList *drawables;
|
||||||
|
GList *iter;
|
||||||
|
|
||||||
|
return_if_no_drawables (image, drawables, data);
|
||||||
|
|
||||||
|
if (g_list_length (drawables) > 1)
|
||||||
|
pika_image_undo_group_start (image,
|
||||||
|
PIKA_UNDO_GROUP_DRAWABLE_MOD,
|
||||||
|
_("Equalize"));
|
||||||
|
|
||||||
|
for (iter = drawables; iter; iter = iter->next)
|
||||||
|
pika_drawable_equalize (iter->data, TRUE);
|
||||||
|
|
||||||
|
if (g_list_length (drawables) > 1)
|
||||||
|
pika_image_undo_group_end (image);
|
||||||
|
|
||||||
|
pika_image_flush (image);
|
||||||
|
g_list_free (drawables);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
drawable_levels_stretch_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *image;
|
||||||
|
GList *drawables;
|
||||||
|
GList *iter;
|
||||||
|
PikaDisplay *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 (! pika_drawable_is_rgb (iter->data))
|
||||||
|
{
|
||||||
|
pika_message_literal (image->pika,
|
||||||
|
G_OBJECT (widget), PIKA_MESSAGE_WARNING,
|
||||||
|
_("White Balance operates only on RGB color "
|
||||||
|
"layers."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_list_length (drawables) > 1)
|
||||||
|
pika_image_undo_group_start (image,
|
||||||
|
PIKA_UNDO_GROUP_DRAWABLE_MOD,
|
||||||
|
_("Levels"));
|
||||||
|
|
||||||
|
for (iter = drawables; iter; iter = iter->next)
|
||||||
|
pika_drawable_levels_stretch (iter->data, PIKA_PROGRESS (display));
|
||||||
|
|
||||||
|
if (g_list_length (drawables) > 1)
|
||||||
|
pika_image_undo_group_end (image);
|
||||||
|
|
||||||
|
pika_image_flush (image);
|
||||||
|
g_list_free (drawables);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
drawable_visible_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *image;
|
||||||
|
GList *drawables;
|
||||||
|
GList *iter;
|
||||||
|
PikaUndo *undo;
|
||||||
|
gboolean push_undo = TRUE;
|
||||||
|
gboolean visible;
|
||||||
|
|
||||||
|
return_if_no_drawables (image, drawables, data);
|
||||||
|
|
||||||
|
visible = g_variant_get_boolean (value);
|
||||||
|
|
||||||
|
if (PIKA_IS_LAYER_MASK (drawables->data))
|
||||||
|
{
|
||||||
|
PikaLayerMask *mask = PIKA_LAYER_MASK (drawables->data);
|
||||||
|
|
||||||
|
g_list_free (drawables);
|
||||||
|
drawables = g_list_prepend (NULL, pika_layer_mask_get_layer (mask));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (iter = drawables; iter; iter = iter->next)
|
||||||
|
{
|
||||||
|
if (visible && pika_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 != pika_item_get_visible (iter->data))
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (! iter)
|
||||||
|
{
|
||||||
|
g_list_free (drawables);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_list_length (drawables) == 1)
|
||||||
|
{
|
||||||
|
undo = pika_image_undo_can_compress (image, PIKA_TYPE_ITEM_UNDO,
|
||||||
|
PIKA_UNDO_ITEM_VISIBILITY);
|
||||||
|
|
||||||
|
if (undo && PIKA_ITEM_UNDO (undo)->item == PIKA_ITEM (drawables->data))
|
||||||
|
push_undo = FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* TODO: undo groups cannot be compressed so far. */
|
||||||
|
pika_image_undo_group_start (image,
|
||||||
|
PIKA_UNDO_GROUP_ITEM_VISIBILITY,
|
||||||
|
"Item visibility");
|
||||||
|
}
|
||||||
|
|
||||||
|
for (; iter; iter = iter->next)
|
||||||
|
pika_item_set_visible (iter->data, visible, push_undo);
|
||||||
|
|
||||||
|
if (g_list_length (drawables) != 1)
|
||||||
|
pika_image_undo_group_end (image);
|
||||||
|
|
||||||
|
pika_image_flush (image);
|
||||||
|
g_list_free (drawables);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
drawable_lock_content_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *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 (PIKA_IS_LAYER_MASK (drawables->data))
|
||||||
|
{
|
||||||
|
PikaLayerMask *mask = PIKA_LAYER_MASK (drawables->data);
|
||||||
|
|
||||||
|
g_list_free (drawables);
|
||||||
|
drawables = g_list_prepend (NULL, pika_layer_mask_get_layer (mask));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (iter = drawables; iter; iter = iter->next)
|
||||||
|
{
|
||||||
|
if (! locked && ! pika_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 != pika_item_get_lock_content (iter->data))
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (g_list_length (drawables) == 1)
|
||||||
|
{
|
||||||
|
PikaUndo *undo;
|
||||||
|
|
||||||
|
undo = pika_image_undo_can_compress (image, PIKA_TYPE_ITEM_UNDO,
|
||||||
|
PIKA_UNDO_ITEM_LOCK_CONTENT);
|
||||||
|
|
||||||
|
if (undo && PIKA_ITEM_UNDO (undo)->item == PIKA_ITEM (drawables->data))
|
||||||
|
push_undo = FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* TODO: undo groups cannot be compressed so far. */
|
||||||
|
pika_image_undo_group_start (image,
|
||||||
|
PIKA_UNDO_GROUP_ITEM_LOCK_CONTENTS,
|
||||||
|
_("Lock/Unlock content"));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (; iter; iter = iter->next)
|
||||||
|
pika_item_set_lock_content (iter->data, locked, push_undo);
|
||||||
|
|
||||||
|
if (g_list_length (drawables) != 1)
|
||||||
|
pika_image_undo_group_end (image);
|
||||||
|
|
||||||
|
pika_image_flush (image);
|
||||||
|
g_list_free (drawables);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
drawable_lock_position_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *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 (PIKA_IS_LAYER_MASK (drawables->data))
|
||||||
|
{
|
||||||
|
PikaLayerMask *mask = PIKA_LAYER_MASK (drawables->data);
|
||||||
|
|
||||||
|
g_list_free (drawables);
|
||||||
|
drawables = g_list_prepend (NULL, pika_layer_mask_get_layer (mask));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (iter = drawables; iter; iter = iter->next)
|
||||||
|
{
|
||||||
|
if (! locked && ! pika_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 != pika_item_get_lock_position (iter->data))
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (g_list_length (drawables) == 1)
|
||||||
|
{
|
||||||
|
PikaUndo *undo;
|
||||||
|
|
||||||
|
undo = pika_image_undo_can_compress (image, PIKA_TYPE_ITEM_UNDO,
|
||||||
|
PIKA_UNDO_ITEM_LOCK_POSITION);
|
||||||
|
|
||||||
|
if (undo && PIKA_ITEM_UNDO (undo)->item == PIKA_ITEM (drawables->data))
|
||||||
|
push_undo = FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* TODO: undo groups cannot be compressed so far. */
|
||||||
|
pika_image_undo_group_start (image,
|
||||||
|
PIKA_UNDO_GROUP_ITEM_LOCK_POSITION,
|
||||||
|
_("Lock/Unlock position"));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (; iter; iter = iter->next)
|
||||||
|
pika_item_set_lock_position (iter->data, locked, push_undo);
|
||||||
|
|
||||||
|
if (g_list_length (drawables) != 1)
|
||||||
|
pika_image_undo_group_end (image);
|
||||||
|
|
||||||
|
pika_image_flush (image);
|
||||||
|
g_list_free (drawables);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
drawable_flip_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *image;
|
||||||
|
GList *drawables;
|
||||||
|
GList *iter;
|
||||||
|
PikaContext *context;
|
||||||
|
gint off_x, off_y;
|
||||||
|
gdouble axis = 0.0;
|
||||||
|
PikaOrientationType orientation;
|
||||||
|
|
||||||
|
return_if_no_drawables (image, drawables, data);
|
||||||
|
return_if_no_context (context, data);
|
||||||
|
|
||||||
|
orientation = (PikaOrientationType) g_variant_get_int32 (value);
|
||||||
|
|
||||||
|
if (g_list_length (drawables) > 1)
|
||||||
|
pika_image_undo_group_start (image,
|
||||||
|
PIKA_UNDO_GROUP_DRAWABLE_MOD,
|
||||||
|
_("Flip Drawables"));
|
||||||
|
|
||||||
|
for (iter = drawables; iter; iter = iter->next)
|
||||||
|
{
|
||||||
|
PikaItem *item;
|
||||||
|
|
||||||
|
item = PIKA_ITEM (iter->data);
|
||||||
|
|
||||||
|
pika_item_get_offset (item, &off_x, &off_y);
|
||||||
|
|
||||||
|
switch (orientation)
|
||||||
|
{
|
||||||
|
case PIKA_ORIENTATION_HORIZONTAL:
|
||||||
|
axis = ((gdouble) off_x + (gdouble) pika_item_get_width (item) / 2.0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PIKA_ORIENTATION_VERTICAL:
|
||||||
|
axis = ((gdouble) off_y + (gdouble) pika_item_get_height (item) / 2.0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
pika_item_flip (item, context, orientation, axis,
|
||||||
|
pika_item_get_clip (item, FALSE));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_list_length (drawables) > 1)
|
||||||
|
pika_image_undo_group_end (image);
|
||||||
|
|
||||||
|
pika_image_flush (image);
|
||||||
|
g_list_free (drawables);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
drawable_rotate_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *image;
|
||||||
|
GList *drawables;
|
||||||
|
GList *iter;
|
||||||
|
PikaContext *context;
|
||||||
|
PikaRotationType rotation_type;
|
||||||
|
|
||||||
|
return_if_no_drawables (image, drawables, data);
|
||||||
|
return_if_no_context (context, data);
|
||||||
|
|
||||||
|
rotation_type = (PikaRotationType) g_variant_get_int32 (value);
|
||||||
|
|
||||||
|
if (g_list_length (drawables) > 1)
|
||||||
|
pika_image_undo_group_start (image,
|
||||||
|
PIKA_UNDO_GROUP_DRAWABLE_MOD,
|
||||||
|
_("Rotate Drawables"));
|
||||||
|
|
||||||
|
for (iter = drawables; iter; iter = iter->next)
|
||||||
|
{
|
||||||
|
PikaItem *item;
|
||||||
|
gint off_x, off_y;
|
||||||
|
gdouble center_x, center_y;
|
||||||
|
|
||||||
|
item = PIKA_ITEM (iter->data);
|
||||||
|
|
||||||
|
pika_item_get_offset (item, &off_x, &off_y);
|
||||||
|
|
||||||
|
center_x = ((gdouble) off_x + (gdouble) pika_item_get_width (item) / 2.0);
|
||||||
|
center_y = ((gdouble) off_y + (gdouble) pika_item_get_height (item) / 2.0);
|
||||||
|
|
||||||
|
pika_item_rotate (item, context,
|
||||||
|
rotation_type, center_x, center_y,
|
||||||
|
pika_item_get_clip (item, FALSE));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_list_length (drawables) > 1)
|
||||||
|
pika_image_undo_group_end (image);
|
||||||
|
|
||||||
|
pika_image_flush (image);
|
||||||
|
g_list_free (drawables);
|
||||||
|
}
|
||||||
51
app/actions/drawable-commands.h
Normal file
51
app/actions/drawable-commands.h
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void drawable_levels_stretch_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void drawable_visible_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void drawable_lock_content_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void drawable_lock_position_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
void drawable_flip_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
void drawable_rotate_cmd_callback (PikaAction *action,
|
||||||
|
GVariant *value,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __DRAWABLE_COMMANDS_H__ */
|
||||||
137
app/actions/dynamics-actions.c
Normal file
137
app/actions/dynamics-actions.c
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pikacontext.h"
|
||||||
|
#include "core/pikadata.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaactiongroup.h"
|
||||||
|
#include "widgets/pikahelp-ids.h"
|
||||||
|
|
||||||
|
#include "actions.h"
|
||||||
|
#include "data-commands.h"
|
||||||
|
#include "dynamics-actions.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const PikaActionEntry dynamics_actions[] =
|
||||||
|
{
|
||||||
|
{ "dynamics-new", PIKA_ICON_DOCUMENT_NEW,
|
||||||
|
NC_("dynamics-action", "_New Dynamics"), NULL, { NULL },
|
||||||
|
NC_("dynamics-action", "Create a new dynamics"),
|
||||||
|
data_new_cmd_callback,
|
||||||
|
PIKA_HELP_DYNAMICS_NEW },
|
||||||
|
|
||||||
|
{ "dynamics-duplicate", PIKA_ICON_OBJECT_DUPLICATE,
|
||||||
|
NC_("dynamics-action", "D_uplicate Dynamics"), NULL, { NULL },
|
||||||
|
NC_("dynamics-action", "Duplicate this dynamics"),
|
||||||
|
data_duplicate_cmd_callback,
|
||||||
|
PIKA_HELP_DYNAMICS_DUPLICATE },
|
||||||
|
|
||||||
|
{ "dynamics-copy-location", PIKA_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,
|
||||||
|
PIKA_HELP_DYNAMICS_COPY_LOCATION },
|
||||||
|
|
||||||
|
{ "dynamics-show-in-file-manager", PIKA_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,
|
||||||
|
PIKA_HELP_DYNAMICS_SHOW_IN_FILE_MANAGER },
|
||||||
|
|
||||||
|
{ "dynamics-delete", PIKA_ICON_EDIT_DELETE,
|
||||||
|
NC_("dynamics-action", "_Delete Dynamics"), NULL, { NULL },
|
||||||
|
NC_("dynamics-action", "Delete this dynamics"),
|
||||||
|
data_delete_cmd_callback,
|
||||||
|
PIKA_HELP_DYNAMICS_DELETE },
|
||||||
|
|
||||||
|
{ "dynamics-refresh", PIKA_ICON_VIEW_REFRESH,
|
||||||
|
NC_("dynamics-action", "_Refresh Dynamics"), NULL, { NULL },
|
||||||
|
NC_("dynamics-action", "Refresh dynamics"),
|
||||||
|
data_refresh_cmd_callback,
|
||||||
|
PIKA_HELP_DYNAMICS_REFRESH }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaStringActionEntry dynamics_edit_actions[] =
|
||||||
|
{
|
||||||
|
{ "dynamics-edit", PIKA_ICON_EDIT,
|
||||||
|
NC_("dynamics-action", "_Edit Dynamics..."), NULL, { NULL },
|
||||||
|
NC_("dynamics-action", "Edit this dynamics"),
|
||||||
|
"pika-dynamics-editor",
|
||||||
|
PIKA_HELP_DYNAMICS_EDIT }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
dynamics_actions_setup (PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
pika_action_group_add_actions (group, "dynamics-action",
|
||||||
|
dynamics_actions,
|
||||||
|
G_N_ELEMENTS (dynamics_actions));
|
||||||
|
|
||||||
|
pika_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 (PikaActionGroup *group,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
PikaContext *context = action_data_get_context (user_data);
|
||||||
|
PikaDynamics *dynamics = NULL;
|
||||||
|
PikaData *data = NULL;
|
||||||
|
GFile *file = NULL;
|
||||||
|
|
||||||
|
if (context)
|
||||||
|
{
|
||||||
|
dynamics = pika_context_get_dynamics (context);
|
||||||
|
|
||||||
|
if (dynamics)
|
||||||
|
{
|
||||||
|
data = PIKA_DATA (dynamics);
|
||||||
|
|
||||||
|
file = pika_data_get_file (data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#define SET_SENSITIVE(action,condition) \
|
||||||
|
pika_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
|
||||||
|
|
||||||
|
SET_SENSITIVE ("dynamics-edit", dynamics);
|
||||||
|
SET_SENSITIVE ("dynamics-duplicate", dynamics && pika_data_is_duplicatable (data));
|
||||||
|
SET_SENSITIVE ("dynamics-copy-location", file);
|
||||||
|
SET_SENSITIVE ("dynamics-show-in-file-manager", file);
|
||||||
|
SET_SENSITIVE ("dynamics-delete", dynamics && pika_data_is_deletable (data));
|
||||||
|
|
||||||
|
#undef SET_SENSITIVE
|
||||||
|
}
|
||||||
31
app/actions/dynamics-actions.h
Normal file
31
app/actions/dynamics-actions.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 (PikaActionGroup *group);
|
||||||
|
void dynamics_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __DYNAMICS_ACTIONS_H__ */
|
||||||
81
app/actions/dynamics-editor-actions.c
Normal file
81
app/actions/dynamics-editor-actions.c
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pika.h"
|
||||||
|
#include "core/pikacontext.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaactiongroup.h"
|
||||||
|
#include "widgets/pikadataeditor.h"
|
||||||
|
#include "widgets/pikahelp-ids.h"
|
||||||
|
|
||||||
|
#include "data-editor-commands.h"
|
||||||
|
#include "dynamics-editor-actions.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const PikaToggleActionEntry dynamics_editor_toggle_actions[] =
|
||||||
|
{
|
||||||
|
{ "dynamics-editor-edit-active", PIKA_ICON_LINKED,
|
||||||
|
NC_("dynamics-editor-action", "Edit Active Dynamics"), NULL, { NULL }, NULL,
|
||||||
|
data_editor_edit_active_cmd_callback,
|
||||||
|
FALSE,
|
||||||
|
PIKA_HELP_BRUSH_EDITOR_EDIT_ACTIVE }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
dynamics_editor_actions_setup (PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
pika_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 (PikaActionGroup *group,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
PikaDataEditor *data_editor = PIKA_DATA_EDITOR (user_data);
|
||||||
|
gboolean edit_active = FALSE;
|
||||||
|
|
||||||
|
edit_active = pika_data_editor_get_edit_active (data_editor);
|
||||||
|
|
||||||
|
#define SET_SENSITIVE(action,condition) \
|
||||||
|
pika_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||||
|
#define SET_ACTIVE(action,condition) \
|
||||||
|
pika_action_group_set_action_active (group, action, (condition) != 0)
|
||||||
|
|
||||||
|
SET_ACTIVE ("dynamics-editor-edit-active", edit_active);
|
||||||
|
|
||||||
|
#undef SET_SENSITIVE
|
||||||
|
#undef SET_ACTIVE
|
||||||
|
}
|
||||||
31
app/actions/dynamics-editor-actions.h
Normal file
31
app/actions/dynamics-editor-actions.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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_EDITOR_ACTIONS_H__
|
||||||
|
#define __DYNAMICS_EDITOR_ACTIONS_H__
|
||||||
|
|
||||||
|
|
||||||
|
void dynamics_editor_actions_setup (PikaActionGroup *group);
|
||||||
|
void dynamics_editor_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __DYNAMICS_EDITOR_ACTIONS_H__ */
|
||||||
396
app/actions/edit-actions.c
Normal file
396
app/actions/edit-actions.c
Normal file
@ -0,0 +1,396 @@
|
|||||||
|
/* PIKA - Photo and Image Kooker Application
|
||||||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||||||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||||||
|
*
|
||||||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||||||
|
* 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 "libpikawidgets/pikawidgets.h"
|
||||||
|
|
||||||
|
#include "actions-types.h"
|
||||||
|
|
||||||
|
#include "core/pika.h"
|
||||||
|
#include "core/pikachannel.h"
|
||||||
|
#include "core/pikacontext.h"
|
||||||
|
#include "core/pikaimage.h"
|
||||||
|
#include "core/pikaimage-undo.h"
|
||||||
|
#include "core/pikalayer.h"
|
||||||
|
#include "core/pikalist.h"
|
||||||
|
#include "core/pikatoolinfo.h"
|
||||||
|
#include "core/pikaundostack.h"
|
||||||
|
|
||||||
|
#include "widgets/pikaaction.h"
|
||||||
|
#include "widgets/pikaactiongroup.h"
|
||||||
|
#include "widgets/pikahelp-ids.h"
|
||||||
|
|
||||||
|
#include "tools/tool_manager.h"
|
||||||
|
|
||||||
|
#include "actions.h"
|
||||||
|
#include "edit-actions.h"
|
||||||
|
#include "edit-commands.h"
|
||||||
|
|
||||||
|
#include "pika-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* local function prototypes */
|
||||||
|
|
||||||
|
static void edit_actions_foreground_changed (PikaContext *context,
|
||||||
|
const PikaRGB *color,
|
||||||
|
PikaActionGroup *group);
|
||||||
|
static void edit_actions_background_changed (PikaContext *context,
|
||||||
|
const PikaRGB *color,
|
||||||
|
PikaActionGroup *group);
|
||||||
|
static void edit_actions_pattern_changed (PikaContext *context,
|
||||||
|
PikaPattern *pattern,
|
||||||
|
PikaActionGroup *group);
|
||||||
|
|
||||||
|
|
||||||
|
static const PikaActionEntry edit_actions[] =
|
||||||
|
{
|
||||||
|
{ "edit-undo", PIKA_ICON_EDIT_UNDO,
|
||||||
|
NC_("edit-action", "_Undo"), NULL, { "<primary>Z", NULL },
|
||||||
|
NC_("edit-action", "Undo the last operation"),
|
||||||
|
edit_undo_cmd_callback,
|
||||||
|
PIKA_HELP_EDIT_UNDO },
|
||||||
|
|
||||||
|
{ "edit-redo", PIKA_ICON_EDIT_REDO,
|
||||||
|
NC_("edit-action", "_Redo"), NULL, { "<primary>Y", NULL },
|
||||||
|
NC_("edit-action", "Redo the last operation that was undone"),
|
||||||
|
edit_redo_cmd_callback,
|
||||||
|
PIKA_HELP_EDIT_REDO },
|
||||||
|
|
||||||
|
{ "edit-strong-undo", PIKA_ICON_EDIT_UNDO,
|
||||||
|
NC_("edit-action", "Strong Undo"), NULL, { "<primary><shift>Z", NULL },
|
||||||
|
NC_("edit-action", "Undo the last operation, skipping visibility changes"),
|
||||||
|
edit_strong_undo_cmd_callback,
|
||||||
|
PIKA_HELP_EDIT_STRONG_UNDO },
|
||||||
|
|
||||||
|
{ "edit-strong-redo", PIKA_ICON_EDIT_REDO,
|
||||||
|
NC_("edit-action", "Strong Redo"), NULL, { "<primary><shift>Y", NULL },
|
||||||
|
NC_("edit-action",
|
||||||
|
"Redo the last operation that was undone, skipping visibility changes"),
|
||||||
|
edit_strong_redo_cmd_callback,
|
||||||
|
PIKA_HELP_EDIT_STRONG_REDO },
|
||||||
|
|
||||||
|
{ "edit-undo-clear", PIKA_ICON_SHRED,
|
||||||
|
NC_("edit-action", "_Clear Undo History"), NULL, { NULL },
|
||||||
|
NC_("edit-action", "Remove all operations from the undo history"),
|
||||||
|
edit_undo_clear_cmd_callback,
|
||||||
|
PIKA_HELP_EDIT_UNDO_CLEAR },
|
||||||
|
|
||||||
|
{ "edit-cut", PIKA_ICON_EDIT_CUT,
|
||||||
|
NC_("edit-action", "Cu_t"), NULL, { "<primary>X", "Cut", NULL },
|
||||||
|
NC_("edit-action", "Move the selected pixels to the clipboard"),
|
||||||
|
edit_cut_cmd_callback,
|
||||||
|
PIKA_HELP_EDIT_CUT },
|
||||||
|
|
||||||
|
{ "edit-copy", PIKA_ICON_EDIT_COPY,
|
||||||
|
NC_("edit-action", "_Copy"), NULL, { "<primary>C", "Copy", NULL },
|
||||||
|
NC_("edit-action", "Copy the selected pixels to the clipboard"),
|
||||||
|
edit_copy_cmd_callback,
|
||||||
|
PIKA_HELP_EDIT_COPY },
|
||||||
|
|
||||||
|
{ "edit-copy-visible", NULL, /* PIKA_ICON_COPY_VISIBLE, */
|
||||||
|
NC_("edit-action", "Copy _Visible"), NULL, { "<primary><shift>C", "<shift>Copy", NULL },
|
||||||
|
NC_("edit-action", "Copy what is visible in the selected region"),
|
||||||
|
edit_copy_visible_cmd_callback,
|
||||||
|
PIKA_HELP_EDIT_COPY_VISIBLE },
|
||||||
|
|
||||||
|
{ "edit-paste-as-new-image", PIKA_ICON_EDIT_PASTE_AS_NEW,
|
||||||
|
NC_("edit-action", "Paste as _New Image"),
|
||||||
|
NC_("edit-action", "From _Clipboard"),
|
||||||
|
{ "<primary><shift>V", "<shift>Paste", NULL },
|
||||||
|
NC_("edit-action", "Create a new image from the content of the clipboard"),
|
||||||
|
edit_paste_as_new_image_cmd_callback,
|
||||||
|
PIKA_HELP_EDIT_PASTE_AS_NEW_IMAGE },
|
||||||
|
|
||||||
|
{ "edit-named-cut", PIKA_ICON_EDIT_CUT,
|
||||||
|
NC_("edit-action", "Cu_t Named..."), NULL, { NULL },
|
||||||
|
NC_("edit-action", "Move the selected pixels to a named buffer"),
|
||||||
|
edit_named_cut_cmd_callback,
|
||||||
|
PIKA_HELP_BUFFER_CUT },
|
||||||
|
|
||||||
|
{ "edit-named-copy", PIKA_ICON_EDIT_COPY,
|
||||||
|
NC_("edit-action", "_Copy Named..."), NULL, { NULL },
|
||||||
|
NC_("edit-action", "Copy the selected pixels to a named buffer"),
|
||||||
|
edit_named_copy_cmd_callback,
|
||||||
|
PIKA_HELP_BUFFER_COPY },
|
||||||
|
|
||||||
|
{ "edit-named-copy-visible", NULL, /* PIKA_ICON_COPY_VISIBLE, */
|
||||||
|
NC_("edit-action", "Copy _Visible Named..."), NULL, { NULL },
|
||||||
|
NC_("edit-action",
|
||||||
|
"Copy what is visible in the selected region to a named buffer"),
|
||||||
|
edit_named_copy_visible_cmd_callback,
|
||||||
|
PIKA_HELP_BUFFER_COPY },
|
||||||
|
|
||||||
|
{ "edit-named-paste", PIKA_ICON_EDIT_PASTE,
|
||||||
|
NC_("edit-action", "_Paste Named..."), NULL, { NULL },
|
||||||
|
NC_("edit-action", "Paste the content of a named buffer"),
|
||||||
|
edit_named_paste_cmd_callback,
|
||||||
|
PIKA_HELP_BUFFER_PASTE },
|
||||||
|
|
||||||
|
{ "edit-clear", PIKA_ICON_EDIT_CLEAR,
|
||||||
|
NC_("edit-action", "Cl_ear"), NULL, { "Delete", NULL },
|
||||||
|
NC_("edit-action", "Clear the selected pixels"),
|
||||||
|
edit_clear_cmd_callback,
|
||||||
|
PIKA_HELP_EDIT_CLEAR }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaEnumActionEntry edit_paste_actions[] =
|
||||||
|
{
|
||||||
|
{ "edit-paste", PIKA_ICON_EDIT_PASTE,
|
||||||
|
NC_("edit-action", "_Paste"), NULL, { "<primary>V", "Paste", NULL },
|
||||||
|
NC_("edit-action", "Paste the content of the clipboard"),
|
||||||
|
PIKA_PASTE_TYPE_NEW_LAYER_OR_FLOATING, FALSE,
|
||||||
|
PIKA_HELP_EDIT_PASTE },
|
||||||
|
|
||||||
|
{ "edit-paste-in-place", PIKA_ICON_EDIT_PASTE,
|
||||||
|
NC_("edit-action", "Paste In P_lace"), NULL, { "<primary><alt>V", "<alt>Paste", NULL },
|
||||||
|
NC_("edit-action",
|
||||||
|
"Paste the content of the clipboard at its original position"),
|
||||||
|
PIKA_PASTE_TYPE_NEW_LAYER_OR_FLOATING_IN_PLACE, FALSE,
|
||||||
|
PIKA_HELP_EDIT_PASTE_IN_PLACE },
|
||||||
|
|
||||||
|
{ "edit-paste-merged", PIKA_ICON_EDIT_PASTE,
|
||||||
|
NC_("edit-action", "_Paste as Single Layer"), NULL, { NULL },
|
||||||
|
NC_("edit-action", "Paste the content of the clipboard as a single layer"),
|
||||||
|
PIKA_PASTE_TYPE_NEW_MERGED_LAYER_OR_FLOATING, FALSE,
|
||||||
|
PIKA_HELP_EDIT_PASTE },
|
||||||
|
|
||||||
|
{ "edit-paste-merged-in-place", PIKA_ICON_EDIT_PASTE,
|
||||||
|
NC_("edit-action", "Paste as Single Layer In P_lace"), NULL, { NULL },
|
||||||
|
NC_("edit-action",
|
||||||
|
"Paste the content of the clipboard at its original position as a single layer"),
|
||||||
|
PIKA_PASTE_TYPE_NEW_MERGED_LAYER_OR_FLOATING_IN_PLACE, FALSE,
|
||||||
|
PIKA_HELP_EDIT_PASTE_IN_PLACE },
|
||||||
|
|
||||||
|
{ "edit-paste-into", PIKA_ICON_EDIT_PASTE_INTO,
|
||||||
|
NC_("edit-action", "Paste _Into Selection"), NULL, { NULL },
|
||||||
|
NC_("edit-action",
|
||||||
|
"Paste the content of the clipboard into the current selection"),
|
||||||
|
PIKA_PASTE_TYPE_FLOATING_INTO, FALSE,
|
||||||
|
PIKA_HELP_EDIT_PASTE_INTO },
|
||||||
|
|
||||||
|
{ "edit-paste-into-in-place", PIKA_ICON_EDIT_PASTE_INTO,
|
||||||
|
NC_("edit-action", "Paste Int_o Selection In Place"), NULL, { NULL },
|
||||||
|
NC_("edit-action",
|
||||||
|
"Paste the content of the clipboard into the current selection "
|
||||||
|
"at its original position"),
|
||||||
|
PIKA_PASTE_TYPE_FLOATING_INTO_IN_PLACE, FALSE,
|
||||||
|
PIKA_HELP_EDIT_PASTE_INTO_IN_PLACE }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const PikaEnumActionEntry edit_fill_actions[] =
|
||||||
|
{
|
||||||
|
{ "edit-fill-fg", PIKA_ICON_TOOL_BUCKET_FILL,
|
||||||
|
NC_("edit-action", "Fill with _FG Color"), NULL, { "<primary>comma", NULL },
|
||||||
|
NC_("edit-action", "Fill the selection using the foreground color"),
|
||||||
|
PIKA_FILL_FOREGROUND, FALSE,
|
||||||
|
PIKA_HELP_EDIT_FILL_FG },
|
||||||
|
|
||||||
|
{ "edit-fill-bg", PIKA_ICON_TOOL_BUCKET_FILL,
|
||||||
|
NC_("edit-action", "Fill with B_G Color"), NULL, { "<primary>period", NULL },
|
||||||
|
NC_("edit-action", "Fill the selection using the background color"),
|
||||||
|
PIKA_FILL_BACKGROUND, FALSE,
|
||||||
|
PIKA_HELP_EDIT_FILL_BG },
|
||||||
|
|
||||||
|
{ "edit-fill-pattern", PIKA_ICON_PATTERN,
|
||||||
|
NC_("edit-action", "Fill _with Pattern"), NULL, { "<primary>semicolon", NULL },
|
||||||
|
NC_("edit-action", "Fill the selection using the active pattern"),
|
||||||
|
PIKA_FILL_PATTERN, FALSE,
|
||||||
|
PIKA_HELP_EDIT_FILL_PATTERN }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
edit_actions_setup (PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
PikaContext *context = pika_get_user_context (group->pika);
|
||||||
|
PikaRGB color;
|
||||||
|
PikaPattern *pattern;
|
||||||
|
|
||||||
|
pika_action_group_add_actions (group, "edit-action",
|
||||||
|
edit_actions,
|
||||||
|
G_N_ELEMENTS (edit_actions));
|
||||||
|
|
||||||
|
pika_action_group_add_enum_actions (group, "edit-action",
|
||||||
|
edit_paste_actions,
|
||||||
|
G_N_ELEMENTS (edit_paste_actions),
|
||||||
|
edit_paste_cmd_callback);
|
||||||
|
|
||||||
|
pika_action_group_add_enum_actions (group, "edit-action",
|
||||||
|
edit_fill_actions,
|
||||||
|
G_N_ELEMENTS (edit_fill_actions),
|
||||||
|
edit_fill_cmd_callback);
|
||||||
|
|
||||||
|
g_signal_connect_object (context, "foreground-changed",
|
||||||
|
G_CALLBACK (edit_actions_foreground_changed),
|
||||||
|
group, 0);
|
||||||
|
g_signal_connect_object (context, "background-changed",
|
||||||
|
G_CALLBACK (edit_actions_background_changed),
|
||||||
|
group, 0);
|
||||||
|
g_signal_connect_object (context, "pattern-changed",
|
||||||
|
G_CALLBACK (edit_actions_pattern_changed),
|
||||||
|
group, 0);
|
||||||
|
|
||||||
|
pika_context_get_foreground (context, &color);
|
||||||
|
edit_actions_foreground_changed (context, &color, group);
|
||||||
|
|
||||||
|
pika_context_get_background (context, &color);
|
||||||
|
edit_actions_background_changed (context, &color, group);
|
||||||
|
|
||||||
|
pattern = pika_context_get_pattern (context);
|
||||||
|
edit_actions_pattern_changed (context, pattern, group);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
edit_actions_update (PikaActionGroup *group,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
PikaImage *image = action_data_get_image (data);
|
||||||
|
PikaDisplay *display = action_data_get_display (data);
|
||||||
|
GList *drawables = NULL;
|
||||||
|
gchar *undo_name = NULL;
|
||||||
|
gchar *redo_name = NULL;
|
||||||
|
gboolean undo_enabled = FALSE;
|
||||||
|
|
||||||
|
gboolean have_no_groups = FALSE; /* At least 1 selected layer is not a group. */
|
||||||
|
gboolean have_writable = FALSE; /* At least 1 selected layer has no contents lock. */
|
||||||
|
|
||||||
|
if (image)
|
||||||
|
{
|
||||||
|
GList *iter;
|
||||||
|
|
||||||
|
drawables = pika_image_get_selected_drawables (image);
|
||||||
|
|
||||||
|
for (iter = drawables; iter; iter = iter->next)
|
||||||
|
{
|
||||||
|
if (! pika_viewable_get_children (PIKA_VIEWABLE (iter->data)))
|
||||||
|
have_no_groups = TRUE;
|
||||||
|
|
||||||
|
if (! pika_item_is_content_locked (PIKA_ITEM (iter->data), NULL))
|
||||||
|
have_writable = TRUE;
|
||||||
|
|
||||||
|
if (have_no_groups && have_writable)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
undo_enabled = pika_image_undo_is_enabled (image);
|
||||||
|
|
||||||
|
if (undo_enabled)
|
||||||
|
{
|
||||||
|
PikaUndoStack *undo_stack = pika_image_get_undo_stack (image);
|
||||||
|
PikaUndoStack *redo_stack = pika_image_get_redo_stack (image);
|
||||||
|
PikaUndo *undo = pika_undo_stack_peek (undo_stack);
|
||||||
|
PikaUndo *redo = pika_undo_stack_peek (redo_stack);
|
||||||
|
const gchar *tool_undo = NULL;
|
||||||
|
const gchar *tool_redo = NULL;
|
||||||
|
|
||||||
|
if (display)
|
||||||
|
{
|
||||||
|
tool_undo = tool_manager_can_undo_active (image->pika, display);
|
||||||
|
tool_redo = tool_manager_can_redo_active (image->pika, display);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tool_undo)
|
||||||
|
undo_name = g_strdup_printf (_("_Undo %s"), tool_undo);
|
||||||
|
else if (undo)
|
||||||
|
undo_name = g_strdup_printf (_("_Undo %s"),
|
||||||
|
pika_object_get_name (undo));
|
||||||
|
|
||||||
|
if (tool_redo)
|
||||||
|
redo_name = g_strdup_printf (_("_Redo %s"), tool_redo);
|
||||||
|
else if (redo)
|
||||||
|
redo_name = g_strdup_printf (_("_Redo %s"),
|
||||||
|
pika_object_get_name (redo));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#define SET_LABEL(action,label) \
|
||||||
|
pika_action_group_set_action_label (group, action, (label))
|
||||||
|
#define SET_SENSITIVE(action,condition) \
|
||||||
|
pika_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
|
||||||
|
|
||||||
|
SET_LABEL ("edit-undo", undo_name ? undo_name : _("_Undo"));
|
||||||
|
SET_LABEL ("edit-redo", redo_name ? redo_name : _("_Redo"));
|
||||||
|
|
||||||
|
SET_SENSITIVE ("edit-undo", undo_enabled && undo_name);
|
||||||
|
SET_SENSITIVE ("edit-redo", undo_enabled && redo_name);
|
||||||
|
SET_SENSITIVE ("edit-strong-undo", undo_enabled && undo_name);
|
||||||
|
SET_SENSITIVE ("edit-strong-redo", undo_enabled && redo_name);
|
||||||
|
SET_SENSITIVE ("edit-undo-clear", undo_enabled && (undo_name || redo_name));
|
||||||
|
|
||||||
|
g_free (undo_name);
|
||||||
|
g_free (redo_name);
|
||||||
|
|
||||||
|
SET_SENSITIVE ("edit-cut", have_writable && have_no_groups);
|
||||||
|
SET_SENSITIVE ("edit-copy", drawables);
|
||||||
|
SET_SENSITIVE ("edit-copy-visible", image);
|
||||||
|
/* "edit-paste" is always active */
|
||||||
|
SET_SENSITIVE ("edit-paste-in-place", image);
|
||||||
|
SET_SENSITIVE ("edit-paste-into", image);
|
||||||
|
SET_SENSITIVE ("edit-paste-into-in-place", image);
|
||||||
|
|
||||||
|
SET_SENSITIVE ("edit-named-cut", have_writable && have_no_groups);
|
||||||
|
SET_SENSITIVE ("edit-named-copy", drawables);
|
||||||
|
SET_SENSITIVE ("edit-named-copy-visible", drawables);
|
||||||
|
/* "edit-named-paste" is always active */
|
||||||
|
|
||||||
|
SET_SENSITIVE ("edit-clear", have_writable && have_no_groups);
|
||||||
|
SET_SENSITIVE ("edit-fill-fg", have_writable && have_no_groups);
|
||||||
|
SET_SENSITIVE ("edit-fill-bg", have_writable && have_no_groups);
|
||||||
|
SET_SENSITIVE ("edit-fill-pattern", have_writable && have_no_groups);
|
||||||
|
|
||||||
|
#undef SET_LABEL
|
||||||
|
#undef SET_SENSITIVE
|
||||||
|
|
||||||
|
g_list_free (drawables);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* private functions */
|
||||||
|
|
||||||
|
static void
|
||||||
|
edit_actions_foreground_changed (PikaContext *context,
|
||||||
|
const PikaRGB *color,
|
||||||
|
PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
pika_action_group_set_action_color (group, "edit-fill-fg", color, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
edit_actions_background_changed (PikaContext *context,
|
||||||
|
const PikaRGB *color,
|
||||||
|
PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
pika_action_group_set_action_color (group, "edit-fill-bg", color, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
edit_actions_pattern_changed (PikaContext *context,
|
||||||
|
PikaPattern *pattern,
|
||||||
|
PikaActionGroup *group)
|
||||||
|
{
|
||||||
|
pika_action_group_set_action_viewable (group, "edit-fill-pattern",
|
||||||
|
PIKA_VIEWABLE (pattern));
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user