forked from openkylin/gimp
Compare commits
No commits in common. "openkylin/yangtze" and "pristine-tar" have entirely different histories.
openkylin/
...
pristine-t
390
AUTHORS
390
AUTHORS
|
@ -1,390 +0,0 @@
|
|||
-- This file is generated from authors.xml, do not edit it directly. --
|
||||
|
||||
GIMP was originally written by:
|
||||
|
||||
Spencer Kimball
|
||||
Peter Mattis
|
||||
|
||||
|
||||
The current maintainers are:
|
||||
|
||||
Michael Natterer
|
||||
Jehan
|
||||
|
||||
|
||||
The following people have contributed code to GIMP:
|
||||
|
||||
Lauri Alanko
|
||||
Fredrik Alströmer
|
||||
Shawn Amundson
|
||||
Sven Anders
|
||||
Henrik Brix Andersen
|
||||
Karl-Johan Andersson
|
||||
Rob Antonishen
|
||||
Nicola Archibald
|
||||
Timm Bäder
|
||||
Luis Barrancos
|
||||
Jerry Baker
|
||||
John Beale
|
||||
Zach Beane
|
||||
Tom Bech
|
||||
Daniel P. Berrange
|
||||
Marc Bless
|
||||
Edward Blevins
|
||||
Reagan Blundell
|
||||
Jacob Boerema
|
||||
Hendrik Boom
|
||||
Xavier Bouchoux
|
||||
Richard Bowers
|
||||
Roberto Boyd
|
||||
Stanislav Brabec
|
||||
Hans Breuer
|
||||
Simon Budig
|
||||
João S. O. Bueno
|
||||
Seth Burgess
|
||||
Brent Burton
|
||||
Francisco Bustamante
|
||||
Albert Cahalan
|
||||
George J. Carrette
|
||||
Marco Ciampa
|
||||
Sean Cier
|
||||
Winston Chang
|
||||
Stephane Chauveau
|
||||
Zbigniew Chyla
|
||||
Lars-Peter Clausen
|
||||
Sven Claussner
|
||||
Branko Collin
|
||||
Ed Connel
|
||||
Piers Cornwell
|
||||
David Costanzo
|
||||
Daniel Cotting
|
||||
Jay Cox
|
||||
Kevin Cozens
|
||||
Jeremiah Darais
|
||||
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 Novomesky
|
||||
Erik Nygren
|
||||
Miles O'Neal
|
||||
David Odin
|
||||
Nelson A. de Oliveira
|
||||
Victor Oliveira
|
||||
Yoshio Ono
|
||||
Thom van Os
|
||||
Garry R. Osgood
|
||||
Nathan Osman
|
||||
Benjamin Otte
|
||||
Petr Ovtchenkov
|
||||
Alan Paeth
|
||||
Jay Painter
|
||||
Juan Palacios
|
||||
Ville Pätsi
|
||||
Akkana Peck
|
||||
Asbjorn Pettersen
|
||||
Félix Piédallu
|
||||
Mike Phillips
|
||||
Nils Philippsen
|
||||
Ari Pollak
|
||||
Mircea Purdea
|
||||
Liam Quin
|
||||
Raphaël Quinet
|
||||
John Ralls
|
||||
Dennis Ranke
|
||||
Tom Rathborne
|
||||
Debarshi Ray
|
||||
Martin Renold
|
||||
Jens Restemeier
|
||||
Kristian Rietveld
|
||||
Maurits Rijk
|
||||
Daniel Risacher
|
||||
Clarence Risher
|
||||
Gilles Rochefort
|
||||
James Robinson
|
||||
Stefan Röllin
|
||||
Guillermo S. Romero
|
||||
Marco Rossini
|
||||
Tim Rowley
|
||||
Karthikeyan S
|
||||
Daniel Sabo
|
||||
Oleksii Samorukov
|
||||
Mike Schaeffer
|
||||
John Schlag
|
||||
Norbert Schmitz
|
||||
Thorsten Schnier
|
||||
Enrico Schröder
|
||||
Alexander Schulz
|
||||
Michael Schumacher
|
||||
Tracy Scott
|
||||
Craig Setera
|
||||
Elad Shahar
|
||||
shark0r
|
||||
Peter Sikking
|
||||
RyōTa SimaMoto
|
||||
Ted Shaneyfelt
|
||||
Aaron Sherman
|
||||
SHIRAKAWA Akira
|
||||
Jernej Simončič
|
||||
Manish Singh
|
||||
Mukund Sivaraman
|
||||
William Skaggs
|
||||
Daniel Skarda
|
||||
Ville Sokk
|
||||
Kevin Sookocheff
|
||||
Adam Spiers
|
||||
Jakub Steiner
|
||||
Omari Stephens
|
||||
Tobias Stoeckmann
|
||||
Elle Stone
|
||||
Nathan Summers
|
||||
Mike Sweet
|
||||
Bogdan Szczurek
|
||||
Eiichi Takamori
|
||||
Tal Trachtman
|
||||
Tristan Tarrant
|
||||
Michael Taylor
|
||||
Owen Taylor
|
||||
Ian Tester
|
||||
Andy Thomas
|
||||
Mason Thomas
|
||||
Benoit Touchette
|
||||
Patrice Tremblay
|
||||
Kevin Turner
|
||||
Andreas Turtschan
|
||||
Massimo Valentini
|
||||
Brion Vibber
|
||||
Helvetix Victorinox
|
||||
Thorsten Vollmer
|
||||
Clayton Walker
|
||||
Rebecca Walter
|
||||
Martin Weber
|
||||
Rupert Weber
|
||||
James Wang
|
||||
Kris Wehner
|
||||
Nigel Wetten
|
||||
Alexis Wilhelm
|
||||
Calvin Williamson
|
||||
Matthew Wilson
|
||||
woob
|
||||
Karl Günter Wünsch
|
||||
Andrew Wyatt
|
||||
Yoshinori Yamakawa
|
||||
Shirasaki Yasuhiro
|
||||
Mihail Zenkov
|
||||
Zhenfeng Zhao
|
||||
Simon Zilliken
|
||||
Przemyslaw Zych
|
||||
Robert Ögren
|
||||
|
||||
|
||||
The following people have contributed art to GIMP:
|
||||
|
||||
Lapo Calamandrei
|
||||
Paul Davey
|
||||
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 GIMP:
|
||||
|
||||
Ignacio AntI
|
||||
Žygimantas Beručka
|
||||
Carey Bunks
|
||||
Marco Ciampa
|
||||
Sven Claussner
|
||||
Dust
|
||||
Ulf-D. Ehlert
|
||||
Alessandro Falappa
|
||||
Jakub Friedl
|
||||
Michael Hammel
|
||||
Julien Hardelin
|
||||
Simon Janes
|
||||
Róman Joost
|
||||
Hans de Jonge
|
||||
Semka Kuloviæ-Debals
|
||||
Karin Kylander
|
||||
Olof S Kylander
|
||||
Jean-Pierre Litzler
|
||||
Vitaly Lomov
|
||||
Ed Mackey
|
||||
Ian Main
|
||||
Pierre Perrier
|
||||
Alexandre Prokoudine
|
||||
Manuel Quiñones
|
||||
James Robinson
|
||||
Nickolay V. Shmyrev
|
||||
Patrycja Stawiarska
|
||||
Kolbjørn Stuestøl
|
||||
Axel Wernicke
|
674
COPYING
674
COPYING
|
@ -1,674 +0,0 @@
|
|||
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
3329
ChangeLog.pre-1-0
File diff suppressed because it is too large
Load Diff
28795
ChangeLog.pre-1-2
28795
ChangeLog.pre-1-2
File diff suppressed because it is too large
Load Diff
61186
ChangeLog.pre-2-0
61186
ChangeLog.pre-2-0
File diff suppressed because it is too large
Load Diff
21166
ChangeLog.pre-2-2
21166
ChangeLog.pre-2-2
File diff suppressed because it is too large
Load Diff
42277
ChangeLog.pre-2-4
42277
ChangeLog.pre-2-4
File diff suppressed because it is too large
Load Diff
16113
ChangeLog.pre-2-6
16113
ChangeLog.pre-2-6
File diff suppressed because it is too large
Load Diff
5959
ChangeLog.pre-git
5959
ChangeLog.pre-git
File diff suppressed because it is too large
Load Diff
176
HACKING
176
HACKING
|
@ -1,176 +0,0 @@
|
|||
Requirements
|
||||
------------
|
||||
If you want to hack on the GIMP project, it will make your life easier
|
||||
to have the following packages (or newer versions) installed:
|
||||
|
||||
* GNU autoconf 2.54
|
||||
- ftp://ftp.gnu.org/gnu/autoconf/
|
||||
* GNU automake 1.9 (automake 1.10 should also work)
|
||||
- ftp://ftp.gnu.org/gnu/automake/
|
||||
* GNU libtool 1.5
|
||||
- ftp://ftp.gnu.org/gnu/libtool/
|
||||
|
||||
Fine GNU mirrors are listed at https://www.gnu.org/prep/ftp.html
|
||||
Beta software can be found at alpha.gnu.org.
|
||||
|
||||
* pkg-config 0.16.0 (or preferably a newer version)
|
||||
- https://www.freedesktop.org/software/pkgconfig/
|
||||
|
||||
* gtkdocize
|
||||
- https://ftp.gnome.org/pub/GNOME/sources/gtk-doc/
|
||||
|
||||
* xsltproc
|
||||
- ftp://ftp.gnome.org/pub/GNOME/sources/libxslt/1.1/
|
||||
|
||||
These are only the additional requirements if you want to compile from
|
||||
the git repository. The file INSTALL lists the various libraries we
|
||||
depend on.
|
||||
|
||||
|
||||
Compilation
|
||||
-----------
|
||||
If you are accessing gimp via git, then you will need to take several
|
||||
steps to get it to compile. You can do all these steps at once by
|
||||
running:
|
||||
|
||||
gimp/trunk$ ./autogen.sh
|
||||
|
||||
Basically this does the following for you:
|
||||
|
||||
gimp/trunk$ aclocal-1.9; libtoolize; automake-1.9 -a;
|
||||
gimp/trunk$ autoconf; intltoolize --automake
|
||||
|
||||
The above commands create the "configure" script. Now you can run the
|
||||
configure script in gimp/trunk to create all the Makefiles.
|
||||
|
||||
Before running autogen.sh or configure, make sure you have libtool in
|
||||
your path. Also make sure glib-2.0.m4 glib-gettext.m4, gtk-2.0.m4,
|
||||
pkg.m4 and intltool.m4 are either installed in the same
|
||||
$prefix/share/aclocal relative to your automake/aclocal installation
|
||||
or call autogen.sh as follows:
|
||||
|
||||
$ ACLOCAL_FLAGS="-I $prefix/share/aclocal" ./autogen.sh
|
||||
|
||||
Note that autogen.sh runs configure for you. If you wish to pass
|
||||
options like --prefix=/usr to configure you can give those options to
|
||||
autogen.sh and they will be passed on to configure.
|
||||
|
||||
If AUTOGEN_CONFIGURE_ARGS is set, these options will also be passed to
|
||||
the configure script. If for example you want to enable the build of
|
||||
the GIMP API reference manuals, you can set AUTOGEN_CONFIGURE_ARGS to
|
||||
"--enable-gtk-doc". Please note that you will then need a recent
|
||||
version of gtk-doc as well as a working setup for handling DocBook/XML.
|
||||
|
||||
If you do not have a recent version of gtk-doc, you can pass the
|
||||
option "--disable-gtk-doc" to autogen.sh. This will completely
|
||||
disable the support for gtk-doc so you will not be able to generate
|
||||
the API documentation.
|
||||
|
||||
If you want to use libraries from a non-standard prefix, you should set
|
||||
PKG_CONFIG_PATH appropriately. Some libraries do not use pkgconfig, see
|
||||
the output of ./configure --help for information on what environment
|
||||
variables to set to point the compiler and linker to the correct path.
|
||||
Note that you need to do this even if you are installing Gimp itself
|
||||
into the same prefix as the library.
|
||||
|
||||
|
||||
Git
|
||||
---
|
||||
GIMP is available from GNOME Git. You can use the following commands
|
||||
to get GIMP from the the git server:
|
||||
|
||||
$ git clone https://gitlab.gnome.org/GNOME/gimp.git
|
||||
|
||||
You can read more on using GNOME's git service at these URLs:
|
||||
|
||||
https://wiki.gnome.org/Git
|
||||
https://www.kernel.org/pub/software/scm/git/docs/
|
||||
|
||||
|
||||
You will also need relatively new stable releases of glib, pango, atk,
|
||||
gtk+, cairo, gtkhtml2, etc. for building GIMP, which you can get as a
|
||||
part of recent Linux distribution releases.
|
||||
|
||||
|
||||
Patches
|
||||
-------
|
||||
|
||||
The best way to submit patches is to provide files created with
|
||||
git-format-patch.
|
||||
|
||||
It is recommended that you file a bug report at
|
||||
https://gitlab.gnome.org/GNOME/gimp
|
||||
and either create a merge request or attach your patch to it as a plain
|
||||
text file, not compressed. If your patch is reasonably small you can
|
||||
submit it to the gimp-developer-list@gnome.org mailing list.
|
||||
|
||||
If the patch needs to be discussed, you should also consider using the
|
||||
mailing list instead of Bugzilla because bug reports tend to be hard
|
||||
to read if they contain too many comments. For the code, please try to
|
||||
follow the guidelines given in Hackordnung, below.
|
||||
|
||||
|
||||
Auto-generated Files
|
||||
--------------------
|
||||
Please notice that some files in the source are generated from other
|
||||
sources. All those files have a short notice about being generated
|
||||
somewhere at the top. Among them are the files ending in pdb.[ch] in
|
||||
the libgimp directory and the files ending in cmds.c in the app/pdb
|
||||
subdirectory. Those are generated from the respective .pdb files in
|
||||
pdb/groups.
|
||||
|
||||
|
||||
Hackordnung
|
||||
-----------
|
||||
We encourage you to follow the GIMP coding style throughout the GIMP
|
||||
project. For the core components (application and libs) this coding
|
||||
style is enforced. The GIMP coding style is defined as follows:
|
||||
|
||||
* There's a single space between the function name and the opening
|
||||
paren.
|
||||
|
||||
* Function names are lowercase, words separated by underscores.
|
||||
|
||||
* Macros and enums are all uppercase, words separated by
|
||||
underscores.
|
||||
|
||||
* Types are all words capitalized, no separators between words.
|
||||
|
||||
* All functions in header files need to be prototyped.
|
||||
|
||||
* Indentation rules are GNU coding style, in particular:
|
||||
- 2 characters indentation level
|
||||
- Do not use tabs (of course your editor can accept the TAB key
|
||||
as a command, typically to indent the current line properly
|
||||
or to add spaces at the cursor until the next multiple of 8
|
||||
columns, but it should not put TAB characters in the file).
|
||||
- When editing files that still have TABs in them, make sure your
|
||||
editor interprets the TABs correctly, that is, has tab stops
|
||||
at 8 column intervals.
|
||||
- Opening braces are on a new line and indented one level.
|
||||
- Function header have the return type on one line, the name
|
||||
starting in the first column of the following line. All
|
||||
parameters are prototyped and there's a new line for each.
|
||||
|
||||
The source tree contains local config files which can be used to set the
|
||||
right coding style in common editors: `.dir-locals.el` for Emacs,
|
||||
`.kateconfig` for Kate, and `devel-docs/c.vim` for Vim (check the top
|
||||
comments to see how to enable it automatically when opening a file in
|
||||
the GIMP tree).
|
||||
|
||||
Try to make use of GLib's object system as much as possible. Do not
|
||||
create wrappers around functions of parent classes. If you end up
|
||||
duplicating code, try to create a common parent class and implement
|
||||
the common methods there.
|
||||
|
||||
Don't include headers in headers except where unavoidable (e.g. for
|
||||
deriving objects). Opaque typedefs go to app/base/base-types.h,
|
||||
app/core/core-types.h etc. See devel-docs/includes.txt for a
|
||||
detailed description of the include policy.
|
||||
|
||||
Don't use the GTK wrappers around the GLib object and signal system.
|
||||
|
||||
One goal of GIMP development is to make the GIMP code more readable
|
||||
and understandable. Please help us to achieve this goal by cleaning up
|
||||
the present code and make sure that all new code follows the coding
|
||||
guidelines.
|
529
INSTALL
529
INSTALL
|
@ -1,529 +0,0 @@
|
|||
---------------------------------------
|
||||
Installation instructions for GIMP 2.10
|
||||
---------------------------------------
|
||||
|
||||
There are some basic steps to building and installing GIMP.
|
||||
|
||||
GIMP 2.10 replaces earlier GIMP 2.x versions. It is advised that you
|
||||
uninstall them before installing GIMP 2.10. If you want to keep your
|
||||
older GIMP 2.x installation in parallel to GIMP 2.10, you have to
|
||||
choose a separate prefix which is not in your default library search
|
||||
path.
|
||||
|
||||
GIMP 2.10 is fully backward compatible to all earlier GIMP 2.x version.
|
||||
Plug-ins and scripts written for GIMP 2.8, 2.6 or earlier GIMP 2.x
|
||||
versions will continue to work and don't need to be changed nor
|
||||
recompiled to be used with GIMP 2.10.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
******************************************************************
|
||||
* 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 (>= 2.0) available
|
||||
from https://www.freedesktop.org/software/pkgconfig/.
|
||||
|
||||
2. You need intltool (at least 0.40.1, but preferably a newer version).
|
||||
Intltool can be downloaded from
|
||||
https://ftp.gnome.org/pub/gnome/sources/intltool/
|
||||
You also need gettext version 0.19 or over. Earlier gettext had
|
||||
issues with script-fu localization, ending up in incomplete GIMP localization.
|
||||
|
||||
3. You need to have GEGL version 0.4.36 or newer and babl version
|
||||
0.1.78 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
|
||||
|
||||
Note: install GEGL with libumfpack (SuiteSparse) for alternative Matting
|
||||
engine "gegl:matting-levin" and OpenEXR library for OpenEXR format
|
||||
support.
|
||||
|
||||
4. You need to have installed GTK+ version 2.24.32 or newer.
|
||||
GIMP also needs a recent version of GLib (>= 2.56.2), GDK-Pixbuf
|
||||
(>= 2.30.8), and Pango (>= 1.29.4). Sources for these can be grabbed
|
||||
from ftp://ftp.gtk.org/.
|
||||
|
||||
5. We use cairo >= 1.12.2, which is hosted at
|
||||
https://www.cairographics.org/.
|
||||
|
||||
6. We require PangoCairo, a Pango backend using Cairo. Make sure you
|
||||
have Cairo, FreeType2 and fontconfig installed before you compile
|
||||
Pango. GIMP depends on freetype2 being newer than version 2.1.7
|
||||
and fontconfig 2.12.4 or newer. Older versions are known to have
|
||||
bugs that seriously affect the stability of GIMP.
|
||||
|
||||
We also require HarfBuzz 0.9.19 or newer, an
|
||||
OpenType text shaping tool. As this is a dependency for Pango, you
|
||||
will likely have it installed, but you may have to install a
|
||||
development package for the headers.
|
||||
|
||||
7. The file-compressor plug-in requires zlib, libbzip2, and liblzma to
|
||||
be installed. All these libraries are required dependencies.
|
||||
|
||||
8. For metadata access GIMP requires the gexiv2 library. It is hosted
|
||||
at https://wiki.gnome.org/Projects/gexiv2 .
|
||||
|
||||
9. libpng, libjpeg, libtiff and lcms are hard dependencies that can
|
||||
not be disabled.
|
||||
|
||||
10. For MyPaint brushes, brushlib (libmypaint) 1.3.0 is used.
|
||||
The libmypaint repository is hosted at:
|
||||
|
||||
https://github.com/mypaint/libmypaint
|
||||
|
||||
If installing from repository, do not install the master branch!
|
||||
Checkout the tag "v1.3.0" instead, or simply install from a tarball
|
||||
or from your favorite package manager.
|
||||
You may also checkout the "libmypaint-v1" branch, which is the
|
||||
development branch for libmypaint v1.x and has some more recent
|
||||
fixes.
|
||||
|
||||
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
|
||||
particular tag "v1.3.0". In particular do not install from master
|
||||
which installs brushes incompatible with GIMP.
|
||||
|
||||
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. 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,
|
||||
webkit, libmng, librsvg, libwmf, libaa and libgs (Ghostscript).
|
||||
|
||||
13. 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), otherwise the plug-in is
|
||||
mostly useless.
|
||||
|
||||
14. The Python extension requires Python 2 development headers (2.5.0
|
||||
or newer) to be present. You will also need PyGTK and the
|
||||
respective development headers.
|
||||
|
||||
15. Windows builds can now generate backtrace logs upon a crash.
|
||||
The logs will be available in: %APPDATA%\GIMP\2.10\CrashLog\
|
||||
The feature depends on Dr.MinGW's ExcHndl library:
|
||||
|
||||
https://github.com/jrfonseca/drmingw
|
||||
|
||||
16. Configure GIMP by running the `configure' script. You may want
|
||||
to pass some options to it, see below.
|
||||
|
||||
17. Build GIMP by running `make'. The use of GNU make is recommended.
|
||||
If you need to tweak the build to make it work with other flavours
|
||||
of make, we'd appreciate if you'd send us a patch with the changes.
|
||||
|
||||
18. Install GIMP by running `make install'. In order to avoid clashes
|
||||
with other versions of GIMP, we install a binary called gimp-2.10.
|
||||
By default there's also a link created so that you can type 'gimp'
|
||||
to start gimp-2.10.
|
||||
|
||||
19. Summary of required packages and what version you need:
|
||||
|
||||
Package Name Version
|
||||
|
||||
ATK 2.2.0
|
||||
babl 0.1.78
|
||||
cairo 1.12.2
|
||||
Fontconfig 2.12.4
|
||||
freetype2 2.1.7
|
||||
GDK-PixBuf 2.30.8
|
||||
GEGL 0.4.36
|
||||
GIO
|
||||
GLib 2.56.2
|
||||
glib-networking
|
||||
GTK+ 2.24.32
|
||||
HarfBuzz 0.9.19
|
||||
libbzip2
|
||||
libjpeg
|
||||
liblzma 5.0.0
|
||||
libmypaint 1.3.0
|
||||
libpng 1.6.25
|
||||
libpoppler-glib 0.50.0
|
||||
librsvg 2.40.6
|
||||
libtiff
|
||||
Little CMS 2.8
|
||||
mypaint-brushes-1.0
|
||||
pangocairo 1.29.4
|
||||
poppler-data 0.4.7
|
||||
zlib
|
||||
|
||||
20. Summary of optional packages:
|
||||
|
||||
Package Name Version Feature
|
||||
|
||||
cairo-pdf 1.12.2 PDF export
|
||||
ExcHndl - Crash logs on Windows with Dr. MinGW
|
||||
gs - ghostscript
|
||||
libaa - ASCII art
|
||||
libheif 1.3.2 HEIF
|
||||
libmng - MNG
|
||||
libwebp 0.6.0 WebP (built with --enable-libwebpmux and --enable-libwebpdemux)
|
||||
libwmf 0.2.8 WMF
|
||||
libXcursor - X11 Mouse Cursor
|
||||
libxpm - XPM
|
||||
openexr 1.6.1 OpenEXR
|
||||
OpenJPEG 2.1.0 JPEG 2000
|
||||
python 2 2.5.0 Python plug-ins
|
||||
webkit 1.6.1 Help browser & webpage
|
||||
|
||||
21. 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
|
||||
|
||||
Please make sure you don't have any old GTK+-2.x, jpeg, etc. libraries
|
||||
lying around on your system, otherwise configure may fail to find the
|
||||
new ones.
|
||||
|
||||
|
||||
Generic instructions for configuring and compiling auto-configured
|
||||
packages are included below. Here is an illustration of commands that
|
||||
might be used to build and install GIMP. The actual configuration,
|
||||
compilation and installation output is not shown.
|
||||
|
||||
% tar xvfz gimp-2.10.32.tar.gz # unpack the sources
|
||||
% cd gimp-2.10.32 # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GIMP
|
||||
% make install # install GIMP
|
||||
|
||||
|
||||
The `configure' script examines your system, and adapts GIMP to run on
|
||||
it. The script has many options, some of which are described in the
|
||||
generic instructions included at the end of this file. All of the
|
||||
options can be listed using the command `./configure --help'. There
|
||||
are several special options the GIMP `configure' script recognizes.
|
||||
These are:
|
||||
|
||||
--disable-vector-icons. This option installs raster icons instead of
|
||||
vector icons.
|
||||
|
||||
--enable-relocatable-bundle. This option forces GIMP to search some
|
||||
resources (e.g. MyPaint brushes or libwmf fonts) relatively to the
|
||||
running prefix, rather than using build-time paths.
|
||||
|
||||
--enable-shared and --disable-shared. This option affects whether
|
||||
shared libraries will be built or not. Shared libraries provide
|
||||
for much smaller executables. The default is to enable shared
|
||||
libraries. Disabling shared libraries is almost never a good idea.
|
||||
|
||||
--enable-debug and --disable-debug. This option causes the build
|
||||
process to compile with debugging enabled. If debugging is
|
||||
disabled, GIMP will instead be compiled with optimizations turned
|
||||
on. The default is for debugging to be disabled. NOTE: This
|
||||
option is intended primarily as a convenience for developers.
|
||||
|
||||
--enable-profile and --disable-profile. This option causes the build
|
||||
process to compile with execution profiling enabled. The default is
|
||||
for profiling to be disabled. NOTE: This option is intended primarily
|
||||
as a convenience for developers.
|
||||
|
||||
--enable-ansi and --disable-ansi. 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.
|
||||
|
||||
--with-gimpdir=DIR. This option changes the default directory
|
||||
GIMP uses to search for its configuration files from
|
||||
~/.config/GIMP/2.10 (the directory .config/GIMP/2.10
|
||||
in the user's home directory) to ~/.config/DIR/2.10.
|
||||
If DIR is an absolute path, the directory will be changed to DIR.
|
||||
|
||||
--with-shm=[none|sysv|posix|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.
|
||||
|
||||
--without-libtiff. configure will bail out if libtiff can not be
|
||||
found. You better fix the underlying problem and install these
|
||||
libraries with their header files. If you absolutely want to
|
||||
compile GIMP without support for TIFF you need to explicitly
|
||||
disable them using this option.
|
||||
|
||||
--without-aa. The AA plug-in needs libaa and configure checks for
|
||||
its presence. Use --without-aa if you run into problems.
|
||||
|
||||
--without-libxpm. 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
|
||||
--without-libxpm to disable it explicitly.
|
||||
|
||||
--without-libmng. 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
|
||||
--without-libmng to disable it explicitly.
|
||||
|
||||
--without-wmf. The WMF plug-in needs libwmf2 and configure checks for
|
||||
its presence. Use --without-wmf if you run into problems.
|
||||
|
||||
--without-webkit. If for some reason you don't want to build the
|
||||
Help Browser plug-in, you can use --without-webkit to disable
|
||||
it explicitly.
|
||||
|
||||
--without-librsvg. If for some reason you want to build GIMP without
|
||||
SVG support, you can build --without-librsvg.
|
||||
|
||||
--without-print. If for some reason you don't want to build the Print
|
||||
plug-in based on the GtkPrint API, you can build with --without-print.
|
||||
|
||||
--without-alsa. If you don't want to compile ALSA support into the
|
||||
MIDI input controller module, you can use the --without-alsa option.
|
||||
|
||||
--without-linux-input. If you don't want to compile the Linux Input
|
||||
controller module, you can use the --without-linux-input option.
|
||||
|
||||
--without-hal. If you want to build the Linux Input controller module
|
||||
without HAL support, you can use the --without-hal option.
|
||||
|
||||
--without-mac-twain. If you don't want to compile the Mac OS X
|
||||
TWAIN plug-in, you can use the --without-mac-twain option.
|
||||
|
||||
--with-gif-compression=[lzw|rle|none]. Allows to tune the compression
|
||||
algorithm used by the GIF plug-in. If you are afraid of Unisys' LZW
|
||||
patent (which should have expired in most countries by now), you
|
||||
can go for simple run-length encoding or even configure the plug-in
|
||||
to create uncompressed GIFs.
|
||||
|
||||
--enable-gtk-doc. This option controls whether the libgimp API
|
||||
references will be created using gtk-doc. The HTML pages are
|
||||
included in a standard tarball, so you will only need this if you
|
||||
are building from SVN.
|
||||
|
||||
--with-html-dir=PATH. This option allows to specify where the
|
||||
libgimp API reference should be installed. You might want to modify
|
||||
the path so it points to the place where glib and gtk+ installed
|
||||
their API references so that the libgimp reference can link to
|
||||
them.
|
||||
|
||||
--disable-mp. This option allows you to disable support for multiple
|
||||
processors. It is enabled by default.
|
||||
|
||||
--with-sendmail[=PATH]. This option is used to tell GIMP to send email
|
||||
through sendmail instead of xdg-email. You can optionally indicate
|
||||
where to find the sendmail command. Otherwise sendmail will simply
|
||||
be searched in your $PATH at runtime.
|
||||
|
||||
--with-desktop-dir=[PATH]. This option specifies where to install
|
||||
desktop files. These files are used by desktop environments that
|
||||
comply to the specs published at freedesktop.org. The default
|
||||
value ${prefix}/share should be fine if your desktop environment
|
||||
is installed in the same prefix as gimp. No files are installed
|
||||
if you call configure with --without-desktop-dir.
|
||||
|
||||
--disable-default-binary. Use this option if you don't want to make
|
||||
gimp-2.10 the default GIMP installation. Otherwise a link called
|
||||
gimp pointing to the gimp-2.10 executable will be installed.
|
||||
|
||||
--disable-gimp-console. Use this option if you don't want the
|
||||
gimp-console binary to be built in addition to the standard binary.
|
||||
gimp-console is useful for command-line batch mode or as a server.
|
||||
|
||||
--disable-python. If for some reason you don't want to build the
|
||||
Python based PyGIMP plug-in, you can use --disable-python.
|
||||
|
||||
--without-script-fu. If for some reason you don't want to build the
|
||||
Script-Fu plug-in, you can use --without-script-fu.
|
||||
|
||||
--without-xmc. The X11 Mouse Cursor(XMC) plug-in needs libXcursor
|
||||
and configure checks for its presence. If for some reason you
|
||||
don't want to build the XMC plug-in even though the library is
|
||||
installed, use --without-xmc to disable it explicitly.
|
||||
|
||||
|
||||
The `make' command builds several things:
|
||||
- A bunch of public libraries in the directories starting with 'libgimp'.
|
||||
- The plug-in programs in the 'plug-ins' directory.
|
||||
- Some modules in the 'modules' subdirectory.
|
||||
- The main GIMP program 'gimp-2.10' in `app'.
|
||||
|
||||
The `make install' commands installs the GIMP header files associated
|
||||
with the libgimp libraries, the plug-ins, some data files and the GIMP
|
||||
executable. After running `make install' and assuming the build process
|
||||
was successful you should be able to run `gimp'.
|
||||
|
||||
|
||||
When ./configure fails
|
||||
======================
|
||||
|
||||
'configure' 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+-2.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+-2.0.pc to the environment variable PKG_CONFIG_PATH before running
|
||||
configure.
|
||||
|
||||
* Libraries you installed are not found when you attempt to start GIMP.
|
||||
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 ./configure output is written to the file
|
||||
config.log. This may help diagnose problems.
|
||||
|
||||
|
||||
When ./configure fails on plug-ins
|
||||
==================================
|
||||
|
||||
There are some GIMP 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 configure.
|
||||
|
||||
|
||||
Generic Instructions for Building Auto-Configured Packages
|
||||
==========================================================
|
||||
|
||||
|
||||
To compile this package:
|
||||
|
||||
1. Configure the package for your system. In the directory that this
|
||||
file is in, type `./configure'. If you're using `csh' on an old
|
||||
version of System V, you might need to type `sh configure' instead to
|
||||
prevent `csh' from trying to execute `configure' itself.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation, and
|
||||
creates the Makefile(s) (one in each subdirectory of the source
|
||||
directory). In some packages it creates a C header file containing
|
||||
system-dependent definitions. It also creates a file `config.status'
|
||||
that you can run in the future to recreate the current configuration.
|
||||
Running `configure' takes a minute or two.
|
||||
|
||||
To compile the package in a different directory from the one
|
||||
containing the source code, you must use GNU make. `cd' to the
|
||||
directory where you want the object files and executables to go and
|
||||
run `configure' with the option `--srcdir=DIR', where DIR is the
|
||||
directory that contains the source code. Using this option is
|
||||
actually unnecessary if the source code is in the parent directory of
|
||||
the one in which you are compiling; `configure' automatically checks
|
||||
for the source code in `..' if it does not find it in the current
|
||||
directory.
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
/usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify
|
||||
an installation prefix other than /usr/local by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for machine-specific
|
||||
files and machine-independent files. If you give `configure' the
|
||||
option `--exec-prefix=PATH', the package will use PATH as the prefix
|
||||
for installing programs and libraries. Normally, all files are
|
||||
installed using the same prefix.
|
||||
|
||||
`configure' ignores any other arguments that you give it.
|
||||
|
||||
If your system requires unusual options for compilation or linking
|
||||
that `configure' doesn't know about, you can give `configure' initial
|
||||
values for some variables by setting them in the environment. In
|
||||
Bourne-compatible shells, you can do that on the command line like
|
||||
this:
|
||||
CC='gcc -traditional' DEFS=-D_POSIX_SOURCE ./configure
|
||||
|
||||
The `make' variables that you might want to override with environment
|
||||
variables when running `configure' are:
|
||||
|
||||
(For these variables, any value given in the environment overrides the
|
||||
value that `configure' would choose:)
|
||||
CC C compiler program.
|
||||
Default is `cc', or `gcc' if `gcc' is in your PATH.
|
||||
INSTALL Program to use to install files.
|
||||
Default is `install' if you have it, `cp' otherwise.
|
||||
INCLUDEDIR Directory for `configure' to search for include files.
|
||||
Default is /usr/include.
|
||||
|
||||
(For these variables, any value given in the environment is added to
|
||||
the value that `configure' chooses:)
|
||||
DEFS Configuration options, in the form '-Dfoo -Dbar ...'
|
||||
LIBS Libraries to link with, in the form '-lfoo -lbar ...'
|
||||
|
||||
If you need to do unusual things to compile the package, we encourage
|
||||
you to teach `configure' how to do them and mail the diffs to the
|
||||
address given in the README so we can include them in the next
|
||||
release.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Type `make install' to install programs, data files, and
|
||||
documentation.
|
||||
|
||||
4. You can remove the program binaries and object files from the
|
||||
source directory by typing `make clean'. To also remove the
|
||||
Makefile(s), the header file containing system-dependent definitions
|
||||
(if the package uses one), and `config.status' (all the files that
|
||||
`configure' created), type `make distclean'.
|
||||
|
||||
The file `configure.ac' is used as a template to create `configure' by
|
||||
a program called `autoconf'. You will only need it if you want to
|
||||
regenerate `configure' using a newer version of `autoconf'.
|
529
INSTALL.in
529
INSTALL.in
|
@ -1,529 +0,0 @@
|
|||
---------------------------------------
|
||||
Installation instructions for GIMP @GIMP_APP_VERSION@
|
||||
---------------------------------------
|
||||
|
||||
There are some basic steps to building and installing GIMP.
|
||||
|
||||
GIMP @GIMP_APP_VERSION@ replaces earlier GIMP 2.x versions. It is advised that you
|
||||
uninstall them before installing GIMP @GIMP_APP_VERSION@. If you want to keep your
|
||||
older GIMP 2.x installation in parallel to GIMP @GIMP_APP_VERSION@, you have to
|
||||
choose a separate prefix which is not in your default library search
|
||||
path.
|
||||
|
||||
GIMP @GIMP_APP_VERSION@ is fully backward compatible to all earlier GIMP 2.x version.
|
||||
Plug-ins and scripts written for GIMP 2.8, 2.6 or earlier GIMP 2.x
|
||||
versions will continue to work and don't need to be changed nor
|
||||
recompiled to be used with GIMP @GIMP_APP_VERSION@.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
******************************************************************
|
||||
* 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 (>= @GIMP_PKGCONFIG_VERSION@) available
|
||||
from https://www.freedesktop.org/software/pkgconfig/.
|
||||
|
||||
2. You need intltool (at least @INTLTOOL_REQUIRED_VERSION@, but preferably a newer version).
|
||||
Intltool can be downloaded from
|
||||
https://ftp.gnome.org/pub/gnome/sources/intltool/
|
||||
You also need gettext version @XGETTEXT_REQUIRED_VERSION@ or over. Earlier gettext had
|
||||
issues with script-fu localization, ending up in incomplete GIMP localization.
|
||||
|
||||
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
|
||||
|
||||
Note: install GEGL with libumfpack (SuiteSparse) for alternative Matting
|
||||
engine "gegl:matting-levin" and OpenEXR library for OpenEXR format
|
||||
support.
|
||||
|
||||
4. You need to have installed GTK+ version @GTK_REQUIRED_VERSION@ or newer.
|
||||
GIMP also needs a recent version of GLib (>= @GLIB_REQUIRED_VERSION@), GDK-Pixbuf
|
||||
(>= @GDK_PIXBUF_REQUIRED_VERSION@), and Pango (>= @PANGOCAIRO_REQUIRED_VERSION@). Sources for these can be grabbed
|
||||
from ftp://ftp.gtk.org/.
|
||||
|
||||
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. GIMP 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 GIMP.
|
||||
|
||||
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 GIMP requires the gexiv2 library. It is hosted
|
||||
at https://wiki.gnome.org/Projects/gexiv2 .
|
||||
|
||||
9. libpng, libjpeg, libtiff and lcms are hard dependencies that can
|
||||
not be disabled.
|
||||
|
||||
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 tag "v1.3.0" instead, or simply install from a tarball
|
||||
or from your favorite package manager.
|
||||
You may also checkout the "libmypaint-v1" branch, which is the
|
||||
development branch for libmypaint v1.x and has some more recent
|
||||
fixes.
|
||||
|
||||
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
|
||||
particular tag "v1.3.0". In particular do not install from master
|
||||
which installs brushes incompatible with GIMP.
|
||||
|
||||
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. 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,
|
||||
webkit, libmng, librsvg, libwmf, libaa and libgs (Ghostscript).
|
||||
|
||||
13. 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), otherwise the plug-in is
|
||||
mostly useless.
|
||||
|
||||
14. The Python extension requires Python 2 development headers (@PYTHON2_REQUIRED_VERSION@
|
||||
or newer) to be present. You will also need PyGTK and the
|
||||
respective development headers.
|
||||
|
||||
15. Windows builds can now generate backtrace logs upon a crash.
|
||||
The logs will be available in: %APPDATA%\GIMP\@GIMP_APP_VERSION@\CrashLog\
|
||||
The feature depends on Dr.MinGW's ExcHndl library:
|
||||
|
||||
https://github.com/jrfonseca/drmingw
|
||||
|
||||
16. Configure GIMP by running the `configure' script. You may want
|
||||
to pass some options to it, see below.
|
||||
|
||||
17. Build GIMP by running `make'. The use of GNU make is recommended.
|
||||
If you need to tweak the build to make it work with other flavours
|
||||
of make, we'd appreciate if you'd send us a patch with the changes.
|
||||
|
||||
18. Install GIMP by running `make install'. In order to avoid clashes
|
||||
with other versions of GIMP, we install a binary called gimp-@GIMP_APP_VERSION@.
|
||||
By default there's also a link created so that you can type 'gimp'
|
||||
to start gimp-@GIMP_APP_VERSION@.
|
||||
|
||||
19. Summary of required packages and what version you need:
|
||||
|
||||
Package Name 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@
|
||||
GIO
|
||||
GLib @GLIB_REQUIRED_VERSION@
|
||||
glib-networking
|
||||
GTK+ @GTK_REQUIRED_VERSION@
|
||||
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
|
||||
Little CMS @LCMS_REQUIRED_VERSION@
|
||||
mypaint-brushes-1.0
|
||||
pangocairo @PANGOCAIRO_REQUIRED_VERSION@
|
||||
poppler-data @POPPLER_DATA_REQUIRED_VERSION@
|
||||
zlib
|
||||
|
||||
20. Summary of optional packages:
|
||||
|
||||
Package Name Version Feature
|
||||
|
||||
cairo-pdf @CAIRO_PDF_REQUIRED_VERSION@ PDF export
|
||||
ExcHndl - Crash logs on Windows with Dr. MinGW
|
||||
gs - ghostscript
|
||||
libaa - ASCII art
|
||||
libheif @LIBHEIF_REQUIRED_VERSION@ HEIF
|
||||
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
|
||||
python 2 @PYTHON2_REQUIRED_VERSION@ Python plug-ins
|
||||
webkit @WEBKIT_REQUIRED_VERSION@ Help browser & webpage
|
||||
|
||||
21. 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
|
||||
|
||||
Please make sure you don't have any old GTK+-2.x, jpeg, etc. libraries
|
||||
lying around on your system, otherwise configure may fail to find the
|
||||
new ones.
|
||||
|
||||
|
||||
Generic instructions for configuring and compiling auto-configured
|
||||
packages are included below. Here is an illustration of commands that
|
||||
might be used to build and install GIMP. The actual configuration,
|
||||
compilation and installation output is not shown.
|
||||
|
||||
% tar xvfz gimp-@GIMP_VERSION@.tar.gz # unpack the sources
|
||||
% cd gimp-@GIMP_VERSION@ # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GIMP
|
||||
% make install # install GIMP
|
||||
|
||||
|
||||
The `configure' script examines your system, and adapts GIMP to run on
|
||||
it. The script has many options, some of which are described in the
|
||||
generic instructions included at the end of this file. All of the
|
||||
options can be listed using the command `./configure --help'. There
|
||||
are several special options the GIMP `configure' script recognizes.
|
||||
These are:
|
||||
|
||||
--disable-vector-icons. This option installs raster icons instead of
|
||||
vector icons.
|
||||
|
||||
--enable-relocatable-bundle. This option forces GIMP to search some
|
||||
resources (e.g. MyPaint brushes or libwmf fonts) relatively to the
|
||||
running prefix, rather than using build-time paths.
|
||||
|
||||
--enable-shared and --disable-shared. This option affects whether
|
||||
shared libraries will be built or not. Shared libraries provide
|
||||
for much smaller executables. The default is to enable shared
|
||||
libraries. Disabling shared libraries is almost never a good idea.
|
||||
|
||||
--enable-debug and --disable-debug. This option causes the build
|
||||
process to compile with debugging enabled. If debugging is
|
||||
disabled, GIMP will instead be compiled with optimizations turned
|
||||
on. The default is for debugging to be disabled. NOTE: This
|
||||
option is intended primarily as a convenience for developers.
|
||||
|
||||
--enable-profile and --disable-profile. This option causes the build
|
||||
process to compile with execution profiling enabled. The default is
|
||||
for profiling to be disabled. NOTE: This option is intended primarily
|
||||
as a convenience for developers.
|
||||
|
||||
--enable-ansi and --disable-ansi. 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.
|
||||
|
||||
--with-gimpdir=DIR. This option changes the default directory
|
||||
GIMP uses to search for its configuration files from
|
||||
~/.config/GIMP/@GIMP_APP_VERSION@ (the directory .config/GIMP/@GIMP_APP_VERSION@
|
||||
in the user's home directory) to ~/.config/DIR/@GIMP_APP_VERSION@.
|
||||
If DIR is an absolute path, the directory will be changed to DIR.
|
||||
|
||||
--with-shm=[none|sysv|posix|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.
|
||||
|
||||
--without-libtiff. configure will bail out if libtiff can not be
|
||||
found. You better fix the underlying problem and install these
|
||||
libraries with their header files. If you absolutely want to
|
||||
compile GIMP without support for TIFF you need to explicitly
|
||||
disable them using this option.
|
||||
|
||||
--without-aa. The AA plug-in needs libaa and configure checks for
|
||||
its presence. Use --without-aa if you run into problems.
|
||||
|
||||
--without-libxpm. 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
|
||||
--without-libxpm to disable it explicitly.
|
||||
|
||||
--without-libmng. 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
|
||||
--without-libmng to disable it explicitly.
|
||||
|
||||
--without-wmf. The WMF plug-in needs libwmf2 and configure checks for
|
||||
its presence. Use --without-wmf if you run into problems.
|
||||
|
||||
--without-webkit. If for some reason you don't want to build the
|
||||
Help Browser plug-in, you can use --without-webkit to disable
|
||||
it explicitly.
|
||||
|
||||
--without-librsvg. If for some reason you want to build GIMP without
|
||||
SVG support, you can build --without-librsvg.
|
||||
|
||||
--without-print. If for some reason you don't want to build the Print
|
||||
plug-in based on the GtkPrint API, you can build with --without-print.
|
||||
|
||||
--without-alsa. If you don't want to compile ALSA support into the
|
||||
MIDI input controller module, you can use the --without-alsa option.
|
||||
|
||||
--without-linux-input. If you don't want to compile the Linux Input
|
||||
controller module, you can use the --without-linux-input option.
|
||||
|
||||
--without-hal. If you want to build the Linux Input controller module
|
||||
without HAL support, you can use the --without-hal option.
|
||||
|
||||
--without-mac-twain. If you don't want to compile the Mac OS X
|
||||
TWAIN plug-in, you can use the --without-mac-twain option.
|
||||
|
||||
--with-gif-compression=[lzw|rle|none]. Allows to tune the compression
|
||||
algorithm used by the GIF plug-in. If you are afraid of Unisys' LZW
|
||||
patent (which should have expired in most countries by now), you
|
||||
can go for simple run-length encoding or even configure the plug-in
|
||||
to create uncompressed GIFs.
|
||||
|
||||
--enable-gtk-doc. This option controls whether the libgimp API
|
||||
references will be created using gtk-doc. The HTML pages are
|
||||
included in a standard tarball, so you will only need this if you
|
||||
are building from SVN.
|
||||
|
||||
--with-html-dir=PATH. This option allows to specify where the
|
||||
libgimp API reference should be installed. You might want to modify
|
||||
the path so it points to the place where glib and gtk+ installed
|
||||
their API references so that the libgimp reference can link to
|
||||
them.
|
||||
|
||||
--disable-mp. This option allows you to disable support for multiple
|
||||
processors. It is enabled by default.
|
||||
|
||||
--with-sendmail[=PATH]. This option is used to tell GIMP to send email
|
||||
through sendmail instead of xdg-email. You can optionally indicate
|
||||
where to find the sendmail command. Otherwise sendmail will simply
|
||||
be searched in your $PATH at runtime.
|
||||
|
||||
--with-desktop-dir=[PATH]. This option specifies where to install
|
||||
desktop files. These files are used by desktop environments that
|
||||
comply to the specs published at freedesktop.org. The default
|
||||
value ${prefix}/share should be fine if your desktop environment
|
||||
is installed in the same prefix as gimp. No files are installed
|
||||
if you call configure with --without-desktop-dir.
|
||||
|
||||
--disable-default-binary. Use this option if you don't want to make
|
||||
gimp-@GIMP_APP_VERSION@ the default GIMP installation. Otherwise a link called
|
||||
gimp pointing to the gimp-@GIMP_APP_VERSION@ executable will be installed.
|
||||
|
||||
--disable-gimp-console. Use this option if you don't want the
|
||||
gimp-console binary to be built in addition to the standard binary.
|
||||
gimp-console is useful for command-line batch mode or as a server.
|
||||
|
||||
--disable-python. If for some reason you don't want to build the
|
||||
Python based PyGIMP plug-in, you can use --disable-python.
|
||||
|
||||
--without-script-fu. If for some reason you don't want to build the
|
||||
Script-Fu plug-in, you can use --without-script-fu.
|
||||
|
||||
--without-xmc. The X11 Mouse Cursor(XMC) plug-in needs libXcursor
|
||||
and configure checks for its presence. If for some reason you
|
||||
don't want to build the XMC plug-in even though the library is
|
||||
installed, use --without-xmc to disable it explicitly.
|
||||
|
||||
|
||||
The `make' command builds several things:
|
||||
- A bunch of public libraries in the directories starting with 'libgimp'.
|
||||
- The plug-in programs in the 'plug-ins' directory.
|
||||
- Some modules in the 'modules' subdirectory.
|
||||
- The main GIMP program 'gimp-@GIMP_APP_VERSION@' in `app'.
|
||||
|
||||
The `make install' commands installs the GIMP header files associated
|
||||
with the libgimp libraries, the plug-ins, some data files and the GIMP
|
||||
executable. After running `make install' and assuming the build process
|
||||
was successful you should be able to run `gimp'.
|
||||
|
||||
|
||||
When ./configure fails
|
||||
======================
|
||||
|
||||
'configure' 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+-2.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+-2.0.pc to the environment variable PKG_CONFIG_PATH before running
|
||||
configure.
|
||||
|
||||
* Libraries you installed are not found when you attempt to start GIMP.
|
||||
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 ./configure output is written to the file
|
||||
config.log. This may help diagnose problems.
|
||||
|
||||
|
||||
When ./configure fails on plug-ins
|
||||
==================================
|
||||
|
||||
There are some GIMP 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 configure.
|
||||
|
||||
|
||||
Generic Instructions for Building Auto-Configured Packages
|
||||
==========================================================
|
||||
|
||||
|
||||
To compile this package:
|
||||
|
||||
1. Configure the package for your system. In the directory that this
|
||||
file is in, type `./configure'. If you're using `csh' on an old
|
||||
version of System V, you might need to type `sh configure' instead to
|
||||
prevent `csh' from trying to execute `configure' itself.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation, and
|
||||
creates the Makefile(s) (one in each subdirectory of the source
|
||||
directory). In some packages it creates a C header file containing
|
||||
system-dependent definitions. It also creates a file `config.status'
|
||||
that you can run in the future to recreate the current configuration.
|
||||
Running `configure' takes a minute or two.
|
||||
|
||||
To compile the package in a different directory from the one
|
||||
containing the source code, you must use GNU make. `cd' to the
|
||||
directory where you want the object files and executables to go and
|
||||
run `configure' with the option `--srcdir=DIR', where DIR is the
|
||||
directory that contains the source code. Using this option is
|
||||
actually unnecessary if the source code is in the parent directory of
|
||||
the one in which you are compiling; `configure' automatically checks
|
||||
for the source code in `..' if it does not find it in the current
|
||||
directory.
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
/usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify
|
||||
an installation prefix other than /usr/local by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for machine-specific
|
||||
files and machine-independent files. If you give `configure' the
|
||||
option `--exec-prefix=PATH', the package will use PATH as the prefix
|
||||
for installing programs and libraries. Normally, all files are
|
||||
installed using the same prefix.
|
||||
|
||||
`configure' ignores any other arguments that you give it.
|
||||
|
||||
If your system requires unusual options for compilation or linking
|
||||
that `configure' doesn't know about, you can give `configure' initial
|
||||
values for some variables by setting them in the environment. In
|
||||
Bourne-compatible shells, you can do that on the command line like
|
||||
this:
|
||||
CC='gcc -traditional' DEFS=-D_POSIX_SOURCE ./configure
|
||||
|
||||
The `make' variables that you might want to override with environment
|
||||
variables when running `configure' are:
|
||||
|
||||
(For these variables, any value given in the environment overrides the
|
||||
value that `configure' would choose:)
|
||||
CC C compiler program.
|
||||
Default is `cc', or `gcc' if `gcc' is in your PATH.
|
||||
INSTALL Program to use to install files.
|
||||
Default is `install' if you have it, `cp' otherwise.
|
||||
INCLUDEDIR Directory for `configure' to search for include files.
|
||||
Default is /usr/include.
|
||||
|
||||
(For these variables, any value given in the environment is added to
|
||||
the value that `configure' chooses:)
|
||||
DEFS Configuration options, in the form '-Dfoo -Dbar ...'
|
||||
LIBS Libraries to link with, in the form '-lfoo -lbar ...'
|
||||
|
||||
If you need to do unusual things to compile the package, we encourage
|
||||
you to teach `configure' how to do them and mail the diffs to the
|
||||
address given in the README so we can include them in the next
|
||||
release.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Type `make install' to install programs, data files, and
|
||||
documentation.
|
||||
|
||||
4. You can remove the program binaries and object files from the
|
||||
source directory by typing `make clean'. To also remove the
|
||||
Makefile(s), the header file containing system-dependent definitions
|
||||
(if the package uses one), and `config.status' (all the files that
|
||||
`configure' created), type `make distclean'.
|
||||
|
||||
The file `configure.ac' is used as a template to create `configure' by
|
||||
a program called `autoconf'. You will only need it if you want to
|
||||
regenerate `configure' using a newer version of `autoconf'.
|
27
LICENSE
27
LICENSE
|
@ -1,27 +0,0 @@
|
|||
* 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.
|
||||
|
170
Makefile.am
170
Makefile.am
|
@ -1,170 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
|
||||
|
||||
if WITH_PDBGEN
|
||||
PDB = pdb
|
||||
endif
|
||||
|
||||
SUBDIRS = \
|
||||
m4macros \
|
||||
cursors \
|
||||
themes \
|
||||
po \
|
||||
po-libgimp \
|
||||
po-plug-ins \
|
||||
po-python \
|
||||
po-script-fu \
|
||||
po-tips \
|
||||
po-windows-installer \
|
||||
data \
|
||||
desktop \
|
||||
menus \
|
||||
libgimpbase \
|
||||
tools \
|
||||
$(PDB) \
|
||||
icons \
|
||||
libgimpcolor \
|
||||
libgimpmath \
|
||||
libgimpconfig \
|
||||
libgimpmodule \
|
||||
libgimpthumb \
|
||||
libgimpwidgets \
|
||||
libgimp \
|
||||
app \
|
||||
app-tools \
|
||||
$(GIMP_MODULES) \
|
||||
$(GIMP_PLUGINS) \
|
||||
etc \
|
||||
devel-docs \
|
||||
docs \
|
||||
build
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = \
|
||||
gimp-@GIMP_PKGCONFIG_VERSION@.pc \
|
||||
gimpthumb-@GIMP_PKGCONFIG_VERSION@.pc \
|
||||
gimpui-@GIMP_PKGCONFIG_VERSION@.pc
|
||||
|
||||
|
||||
AUTHORS: authors.xml authors.xsl
|
||||
if HAVE_XSLTPROC
|
||||
$(XSLTPROC) -o $(@) $(top_srcdir)/authors.xsl $< || rm -f $(@)
|
||||
endif
|
||||
|
||||
authors.md: authors.xml authors4gimp-web.xsl
|
||||
if HAVE_XSLTPROC
|
||||
$(XSLTPROC) --stringparam today "`date --iso-8601=seconds`" -o $(@) $(top_srcdir)/authors4gimp-web.xsl $< || rm -f $(@)
|
||||
endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
AUTHORS \
|
||||
COPYING \
|
||||
ChangeLog \
|
||||
ChangeLog.pre-1-0 \
|
||||
ChangeLog.pre-1-2 \
|
||||
ChangeLog.pre-2-0 \
|
||||
ChangeLog.pre-2-2 \
|
||||
ChangeLog.pre-2-4 \
|
||||
ChangeLog.pre-2-6 \
|
||||
ChangeLog.pre-git \
|
||||
HACKING \
|
||||
INSTALL \
|
||||
LICENSE \
|
||||
NEWS \
|
||||
NEWS.pre-2-0 \
|
||||
NEWS.pre-2-2 \
|
||||
NEWS.pre-2-4 \
|
||||
NEWS.pre-2-6 \
|
||||
NEWS.pre-2-8 \
|
||||
NEWS.pre-2-10 \
|
||||
README \
|
||||
README.i18n \
|
||||
authors.dtd \
|
||||
authors.xml \
|
||||
authors.xsl \
|
||||
config.h.win32 \
|
||||
gimp-zip.in \
|
||||
git-version.h \
|
||||
gtk-doc.make
|
||||
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
|
||||
|
||||
|
||||
check-defs:
|
||||
@$(PYTHON) $(top_srcdir)/tools/defcheck.py $(top_srcdir) || \
|
||||
( echo "*** .def files inconsistent ***"; exit 1; )
|
||||
|
||||
validate-authors:
|
||||
if HAVE_XMLLINT
|
||||
@cd $(srcdir); \
|
||||
$(XMLLINT) --noout --valid authors.xml || \
|
||||
( echo "*** authors.xml INVALID ***"; exit 1; )
|
||||
endif
|
||||
|
||||
all-local: AUTHORS
|
||||
|
||||
dist-hook: check-defs validate-authors
|
||||
|
||||
|
||||
|
||||
CHANGELOG_START = 74424325abb54620b370f2595445b2b2a19fe5e7
|
||||
|
||||
ChangeLog: $(srcdir)/ChangeLog $(srcdir)/ChangeLog.pre-git
|
||||
$(srcdir)/ChangeLog:
|
||||
@echo Creating $@ based on git log
|
||||
@if test -d "$(srcdir)/.git"; then \
|
||||
(GIT_DIR=$(top_srcdir)/.git ./missing --run \
|
||||
git log $(CHANGELOG_START)^.. --stat) | fmt --split-only > $@.tmp \
|
||||
&& mv -f $@.tmp $@ && echo Appending ChangeLog.pre-git && cat ChangeLog.pre-git >> $@ \
|
||||
|| ($(RM) $@.tmp; \
|
||||
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
|
||||
(test -f $@ || echo git-log is required to generate this file >> $@)); \
|
||||
else \
|
||||
test -f $@ || \
|
||||
(echo A git checkout and git-log is required to generate ChangeLog >&2 && \
|
||||
echo A git checkout and git-log is required to generate this file >> $@); \
|
||||
fi
|
||||
.PHONY: $(srcdir)/ChangeLog
|
||||
|
||||
generated_sources = \
|
||||
git-version.h
|
||||
|
||||
# Build git-version.h before anything in the subdirs as this is needed
|
||||
# in the about and debug dialog (app/) and in the debug tool (tools/).
|
||||
BUILT_SOURCES = $(generated_sources)
|
||||
|
||||
CLEANFILES = $(generated_sources)
|
||||
|
||||
# If git is available, always check if git-version.h should be
|
||||
# updated. If git is not available, don't do anything if git-version.h
|
||||
# already exists because then we are probably working with a tarball
|
||||
# in which case the git-version.h we ship is correct.
|
||||
git-version.h: update-git-version-header
|
||||
@if test -e "$(top_srcdir)/.git"; then \
|
||||
git_version="`git --git-dir=$(top_srcdir)/.git describe --always`"; \
|
||||
git_version_abbrev="`git --git-dir=$(top_srcdir)/.git rev-parse --short HEAD`"; \
|
||||
git_last_commit_year="`git --git-dir=$(top_srcdir)/.git log -n1 --reverse --pretty=%ci | cut -b 1-4`"; \
|
||||
elif test ! -f "$@"; then \
|
||||
git_version="Unknown, shouldn't happen"; \
|
||||
git_version_abbrev="$$git_version"; \
|
||||
git_last_commit_timestamp=-1; \
|
||||
git_last_commit_year="`date -u '+%Y'`"; \
|
||||
fi; \
|
||||
if test -n "$$git_version"; then \
|
||||
echo "#ifndef __GIT_VERSION_H__" > "$@.tmp"; \
|
||||
echo "#define __GIT_VERSION_H__" >> "$@.tmp"; \
|
||||
echo "#define GIMP_GIT_VERSION \"$$git_version\"" >> "$@.tmp"; \
|
||||
echo "#define GIMP_GIT_VERSION_ABBREV \"$$git_version_abbrev\"" >> "$@.tmp"; \
|
||||
echo "#define GIMP_GIT_LAST_COMMIT_YEAR \"$$git_last_commit_year\"" >> "$@.tmp"; \
|
||||
echo "#endif /* __GIT_VERSION_H__ */" >> "$@.tmp"; \
|
||||
fi
|
||||
@if ( test -f "$@.tmp" && test -f "$@" && cmp "$@.tmp" "$@" > /dev/null ); then \
|
||||
rm -f "$@.tmp"; \
|
||||
elif test -f "$@.tmp"; then \
|
||||
mv "$@.tmp" "$@"; \
|
||||
echo " git HEAD changed: $@ regenerated"; \
|
||||
fi
|
||||
|
||||
.PHONY: update-git-version-header
|
1359
Makefile.in
1359
Makefile.in
File diff suppressed because it is too large
Load Diff
807
NEWS.pre-2-0
807
NEWS.pre-2-0
|
@ -1,807 +0,0 @@
|
|||
|
||||
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
1184
NEWS.pre-2-10
File diff suppressed because it is too large
Load Diff
578
NEWS.pre-2-2
578
NEWS.pre-2-2
|
@ -1,578 +0,0 @@
|
|||
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
570
NEWS.pre-2-4
|
@ -1,570 +0,0 @@
|
|||
------------------------------
|
||||
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
254
NEWS.pre-2-6
|
@ -1,254 +0,0 @@
|
|||
------------------------------
|
||||
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
642
NEWS.pre-2-8
|
@ -1,642 +0,0 @@
|
|||
------------------------------
|
||||
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
|
103
README
103
README
|
@ -1,103 +0,0 @@
|
|||
------------------------------
|
||||
GNU Image Manipulation Program
|
||||
2.10 Stable Branch
|
||||
------------------------------
|
||||
|
||||
This is a stable release in the GIMP 2.10 series.
|
||||
|
||||
GIMP 2.10 replaces earlier GIMP 2.x versions. It is advised that you
|
||||
uninstall them before installing GIMP 2.10. If you want to keep your
|
||||
older GIMP 2.x installation in parallel to GIMP 2.10, you have to
|
||||
choose a separate prefix which is not in your default library search
|
||||
path. Otherwise your previous GIMP installation will start to use the
|
||||
new libraries. You have been warned.
|
||||
|
||||
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 GIMP, please read the file HACKING. For
|
||||
detailed installation instructions, see the file INSTALL.
|
||||
|
||||
|
||||
1. Web Resources
|
||||
================
|
||||
|
||||
GIMP's home page is at:
|
||||
|
||||
https://www.gimp.org/
|
||||
|
||||
Please be sure to visit this site for information, documentation,
|
||||
tutorials, news, etc. All things GIMP-ish are available from there.
|
||||
|
||||
The automated plug-in registry is located at:
|
||||
|
||||
https://registry.gimp.org/
|
||||
|
||||
There you can get the latest versions of plug-ins, using a convenient
|
||||
forms-based interface.
|
||||
|
||||
The latest version of GIMP can be found at:
|
||||
|
||||
https://www.gimp.org/downloads/
|
||||
|
||||
|
||||
2. Mailing Lists
|
||||
================
|
||||
|
||||
We have several mailing lists dedicated to GIMP user and development
|
||||
discussion. There is more info at
|
||||
|
||||
https://www.gimp.org/mail_lists.html
|
||||
|
||||
Links to several archives of the mailing lists are included in that page.
|
||||
|
||||
Gimp-user-list is a mailing list dedicated to user problems, hints and
|
||||
tips, discussion of cool effects, etc. Gimp-developer-list is oriented
|
||||
to GIMP core and plug-in developers. Gimp-gui-list is for discussing
|
||||
about GIMP interface to improve user experience. Most people will only
|
||||
want to be subscribed to gimp-user-list. If you want to help develop
|
||||
GIMP, the gimp-developer mailing list is a good starting point; if you
|
||||
want to help with GUI design, the gimp-gui list is where you want to
|
||||
subscribe.
|
||||
|
||||
|
||||
3. IRC
|
||||
======
|
||||
|
||||
And finally, for the real junkies, there is an IRC channel devoted to
|
||||
GIMP. On GIMPNet (a private free software oriented network) there is
|
||||
#gimp. Many of the developers hang out there. Some of the GIMPNet
|
||||
servers are:
|
||||
|
||||
irc.gimp.org:6667
|
||||
irc.us.gimp.org:6667
|
||||
irc.eu.gimp.org:6667
|
||||
|
||||
|
||||
4. Customizing
|
||||
==============
|
||||
|
||||
The look of GIMP's interface can be customized like any other GTK app
|
||||
by editing the ~/.gtkrc-2.0 file or by using "themes" (ready-made
|
||||
customizations). For downloadable themes and further details, see
|
||||
http://art.gnome.org/themes/gtk2 . Additionally, GIMP reads the file
|
||||
~/.config/GIMP/2.10/gtkrc so you can have settings that only apply to GIMP.
|
||||
|
||||
Included is a set of keybindings similar to those in Adobe Photoshop.
|
||||
You can find them in the ps-menurc file. To use them, copy this file
|
||||
to ~/.config/GIMP/2.10/menurc. You can also manually change the keybindings
|
||||
to any of your choice by editing ~/.config/GIMP/2.10/menurc.
|
||||
|
||||
|
||||
Have fun,
|
||||
|
||||
Spencer Kimball
|
||||
Peter Mattis
|
||||
Federico Mena
|
||||
Manish Singh
|
||||
Sven Neumann
|
||||
Michael Natterer
|
||||
Dave Neary
|
||||
Martin Nordholts
|
||||
Jehan
|
65
README.i18n
65
README.i18n
|
@ -1,65 +0,0 @@
|
|||
This file contains some important hints for translators.
|
||||
|
||||
|
||||
The current status of the GIMP translation can be checked at
|
||||
|
||||
https://l10n.gnome.org/module/gimp
|
||||
|
||||
|
||||
Translation of the GNU Image Manipulation Program is handled by the
|
||||
GNOME Translation Project (see https://l10n.gnome.org/). If you want to
|
||||
help, we suggest that you get in touch with the translation team of
|
||||
your language (see https://l10n.gnome.org/teams/).
|
||||
|
||||
|
||||
GIMP is different
|
||||
|
||||
GIMP is a complex application which has a bunch of scripts and
|
||||
plug-ins that all want to be internationalized. Therefore there is
|
||||
not one catalog but many. For a full translation of GIMP's UI, you
|
||||
will have to add translations for the following catalogs:
|
||||
|
||||
po/gimp20.po -- the core
|
||||
po-libgimp/gimp20-libgimp.pot -- the libgimp library
|
||||
po-plugins/gimp20-std-plugins.pot -- the C plug-ins
|
||||
po-python/gimp20-python.pot -- the pygimp plug-ins
|
||||
po-script-fu/gimp20-script-fu.pot -- the script-fu scripts
|
||||
po-tips/gimp20-tips.pot -- the startup tips
|
||||
po-windows-installer/gimp20-windows-installer.pot -- the windows installer
|
||||
|
||||
If you are looking for the translations of gimp-perl, please note that
|
||||
gimp-perl has been moved into it's own git module called
|
||||
gimp-perl.
|
||||
|
||||
|
||||
GIMP Tips dialog
|
||||
|
||||
In addition to message catalogs GIMP provides a file with tips that
|
||||
are displayed in the Tips dialog. This file is in XML format and can
|
||||
be found in the tips directory. The english tips messages are
|
||||
extracted from gimp-tips.xml.in so translators can use the usual
|
||||
tools to create a <lang>.po file that holds the translations. All
|
||||
translations are then merged into gimp-tips.xml with language
|
||||
identifiers taken from the po filename.
|
||||
|
||||
GIMP needs to know what language it should select from gimp-tips.xml.
|
||||
Therefore, there's the special message "tips-locale:C" in the main
|
||||
message catalog that needs to be translated correctly. For a german
|
||||
translation of the tips this would look like this:
|
||||
|
||||
#: ../app/dialogs/tips-parser.c:188
|
||||
msgid "tips-locale:C"
|
||||
msgstr "tips-locale:de"
|
||||
|
||||
|
||||
Localization of third-party plug-ins
|
||||
|
||||
Third-party plug-ins (plug-ins that are not distributed with GIMP)
|
||||
can't have their messages in the gimp-std-plugins textdomain. We
|
||||
have therefore provided a mechanism that allows plug-ins to install
|
||||
their own message catalogs and tell GIMP to bind to that
|
||||
textdomain. This is necessary so that GIMP can correctly translate
|
||||
the menu paths the plug-in registers. Basically the plug-in has to
|
||||
call gimp_plugin_domain_add() or gimp_domain_plugin_add_with_path()
|
||||
before it registers any functions. Have a look at the script-fu
|
||||
plug-in to see how this is done in detail.
|
|
@ -1,8 +0,0 @@
|
|||
m4_include([m4macros/alsa.m4])
|
||||
m4_include([m4macros/ax_compare_version.m4])
|
||||
m4_include([m4macros/ax_cxx_compile_stdcxx.m4])
|
||||
m4_include([m4macros/ax_gcc_func_attribute.m4])
|
||||
m4_include([m4macros/ax_prog_cc_for_build.m4])
|
||||
m4_include([m4macros/ax_prog_perl_version.m4])
|
||||
m4_include([m4macros/detectcflags.m4])
|
||||
m4_include([m4macros/pythondev.m4])
|
File diff suppressed because it is too large
Load Diff
|
@ -1,85 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
|
||||
libapp = $(top_builddir)/app/libapp.a
|
||||
libappwidgets = $(top_builddir)/app/widgets/libappwidgets.a
|
||||
libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
|
||||
|
||||
if PLATFORM_OSX
|
||||
xobjective_c = "-xobjective-c"
|
||||
xobjective_cxx = "-xobjective-c++"
|
||||
xnone = "-xnone"
|
||||
framework_appkit = -framework AppKit
|
||||
endif
|
||||
|
||||
if OS_WIN32
|
||||
bin_PROGRAMS = gimp-debug-tool-@GIMP_TOOL_VERSION@
|
||||
else
|
||||
|
||||
if PLATFORM_OSX
|
||||
bin_PROGRAMS = gimp-debug-tool-@GIMP_TOOL_VERSION@
|
||||
else
|
||||
libexec_PROGRAMS = gimp-debug-tool-@GIMP_TOOL_VERSION@
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
|
||||
gimp_debug_tool_@GIMP_TOOL_VERSION@_SOURCES = \
|
||||
gimp-debug-tool.c
|
||||
|
||||
gimp_debug_tool_@GIMP_TOOL_VERSION@_CPPFLAGS = \
|
||||
-DCC_VERSION=\""$(CC_VERSION)"\" \
|
||||
-I$(top_srcdir)/app \
|
||||
-I$(top_builddir)/app \
|
||||
$(AM_CPPFLAGS) \
|
||||
$(GIO_CFLAGS) \
|
||||
$(GEGL_CFLAGS) \
|
||||
$(GTK_CFLAGS) \
|
||||
$(FONTCONFIG_CFLAGS)
|
||||
|
||||
gimp_debug_tool_@GIMP_TOOL_VERSION@_LDADD = \
|
||||
$(libappwidgets) \
|
||||
$(libapp) \
|
||||
$(libgimpbase) \
|
||||
$(GIO_LIBS) \
|
||||
$(GEGL_LIBS) \
|
||||
$(GTK_LIBS) \
|
||||
$(FONTCONFIG_LIBS)
|
||||
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DGIMP_APP_VERSION=\"@GIMP_APP_VERSION@\" \
|
||||
-DLOCALEDIR=\""$(gimplocaledir)"\" \
|
||||
-DPREFIX=\""$(prefix)"\" \
|
||||
-DEXEC_PREFIX=\""$(exec_prefix)"\" \
|
||||
-DBINDIR=\""$(bindir)"\" \
|
||||
-DSBINDIR=\""$(sbindir)"\" \
|
||||
-DLIBEXECDIR=\""$(libexecdir)"\" \
|
||||
-DDATADIR=\""$(datadir)"\" \
|
||||
-DDATAROOTDIR=\""$(datarootdir)"\" \
|
||||
-DSYSCONFDIR=\""$(sysconfdir)"\" \
|
||||
-DSHAREDSTATEDIR=\""$(sharedstatedir)"\" \
|
||||
-DLOCALSTATEDIR=\""$(localstatedir)"\" \
|
||||
-DLIBDIR=\""$(libdir)"\" \
|
||||
-DINFODIR=\""$(infodir)"\" \
|
||||
-DMANDIR=\""$(mandir)"\" \
|
||||
-DGIMPPLUGINDIR=\""$(gimpplugindir)"\" \
|
||||
-DGIMPDATADIR=\""$(gimpdatadir)"\" \
|
||||
-DCC=\""$(CC)"\" \
|
||||
-DGIMPDIR=\""$(gimpdir)"\" \
|
||||
-DGIMP_PLUGIN_VERSION=\""$(GIMP_PLUGIN_VERSION)"\" \
|
||||
-I$(top_srcdir) \
|
||||
$(GTK_CFLAGS) \
|
||||
-I$(includedir)
|
||||
|
||||
AM_CFLAGS = \
|
||||
$(xobjective_c)
|
||||
|
||||
AM_CXXFLAGS = \
|
||||
$(xobjective_cxx)
|
||||
|
||||
AM_LDFLAGS = \
|
||||
$(framework_appkit) \
|
||||
$(xnone)
|
File diff suppressed because it is too large
Load Diff
|
@ -1,102 +0,0 @@
|
|||
/* gimpdebug
|
||||
* Copyright (C) 2018 Jehan <jehan@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* GimpDebug simply displays a dialog with debug data (backtraces,
|
||||
* version, etc.), proposing to create a bug report. The reason why it
|
||||
* is a separate executable is simply that when the program crashed,
|
||||
* even though some actions are possible before exit() by catching fatal
|
||||
* errors and signals, it may not be possible to allocate memory
|
||||
* anymore. Therefore creating a new dialog is an impossible action.
|
||||
* So we call instead a separate program, then exit.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <gio/gio.h>
|
||||
#include <glib.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "app/widgets/gimpcriticaldialog.h"
|
||||
|
||||
|
||||
|
||||
int
|
||||
main (int argc,
|
||||
char **argv)
|
||||
{
|
||||
const gchar *program;
|
||||
const gchar *pid;
|
||||
const gchar *reason;
|
||||
const gchar *message;
|
||||
const gchar *bt_file = NULL;
|
||||
const gchar *last_version = NULL;
|
||||
const gchar *release_date = NULL;
|
||||
gchar *trace = NULL;
|
||||
gchar *error;
|
||||
GtkWidget *dialog;
|
||||
|
||||
if (argc != 6 && argc != 8)
|
||||
{
|
||||
g_print ("Usage: gimp-debug-tool-2.0 [PROGRAM] [PID] [REASON] [MESSAGE] [BT_FILE] "
|
||||
"([LAST_VERSION] [RELEASE_TIMESTAMP])\n");
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
program = argv[1];
|
||||
pid = argv[2];
|
||||
reason = argv[3];
|
||||
message = argv[4];
|
||||
|
||||
error = g_strdup_printf ("%s: %s", reason, message);
|
||||
|
||||
bt_file = argv[5];
|
||||
g_file_get_contents (bt_file, &trace, NULL, NULL);
|
||||
|
||||
if (trace == NULL || strlen (trace) == 0)
|
||||
exit (EXIT_FAILURE);
|
||||
|
||||
if (argc == 8)
|
||||
{
|
||||
last_version = argv[6];
|
||||
release_date = argv[7];
|
||||
}
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
dialog = gimp_critical_dialog_new (_("GIMP Crash Debug"), last_version,
|
||||
release_date ? g_ascii_strtoll (release_date, NULL, 10) : -1);
|
||||
gimp_critical_dialog_add (dialog, error, trace, TRUE, program,
|
||||
g_ascii_strtoull (pid, NULL, 10));
|
||||
g_free (error);
|
||||
g_free (trace);
|
||||
g_signal_connect (dialog, "delete-event",
|
||||
G_CALLBACK (gtk_main_quit), NULL);
|
||||
g_signal_connect (dialog, "destroy",
|
||||
G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
gtk_main ();
|
||||
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
290
app/Makefile.am
290
app/Makefile.am
|
@ -1,290 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
if PLATFORM_OSX
|
||||
xobjective_c = "-xobjective-c"
|
||||
xobjective_cxx = "-xobjective-c++"
|
||||
xnone = "-xnone"
|
||||
endif
|
||||
|
||||
libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
|
||||
libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la
|
||||
libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la
|
||||
libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la
|
||||
libgimpmodule = $(top_builddir)/libgimpmodule/libgimpmodule-$(GIMP_API_VERSION).la
|
||||
libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la
|
||||
libgimpthumb = $(top_builddir)/libgimpthumb/libgimpthumb-$(GIMP_API_VERSION).la
|
||||
|
||||
# Sort this by architectural dependencies, lowest level at the top,
|
||||
# so that when e.g. changing a header-file the subdirs are built in
|
||||
# the right order
|
||||
SUBDIRS = \
|
||||
config \
|
||||
core \
|
||||
operations \
|
||||
gegl \
|
||||
text \
|
||||
vectors \
|
||||
paint \
|
||||
plug-in \
|
||||
xcf \
|
||||
file \
|
||||
file-data \
|
||||
pdb \
|
||||
widgets \
|
||||
propgui \
|
||||
display \
|
||||
tools \
|
||||
dialogs \
|
||||
actions \
|
||||
menus \
|
||||
gui \
|
||||
. \
|
||||
tests
|
||||
|
||||
# Put the GIMP core in a lib so we can conveniently link against that
|
||||
# in test cases
|
||||
noinst_LIBRARIES = libapp.a
|
||||
|
||||
if ENABLE_GIMP_CONSOLE
|
||||
bin_PROGRAMS = gimp-@GIMP_APP_VERSION@ gimp-console-@GIMP_APP_VERSION@
|
||||
else
|
||||
bin_PROGRAMS = gimp-@GIMP_APP_VERSION@
|
||||
endif
|
||||
|
||||
libapp_sources = \
|
||||
about.h \
|
||||
app.c \
|
||||
app.h \
|
||||
errors.c \
|
||||
errors.h \
|
||||
language.c \
|
||||
language.h \
|
||||
sanity.c \
|
||||
sanity.h \
|
||||
signals.c \
|
||||
signals.h \
|
||||
tests.c \
|
||||
tests.h \
|
||||
unique.c \
|
||||
unique.h \
|
||||
gimp-debug.c \
|
||||
gimp-debug.h \
|
||||
gimp-intl.h \
|
||||
gimp-log.c \
|
||||
gimp-log.h \
|
||||
gimp-priorities.h \
|
||||
gimp-update.c \
|
||||
gimp-update.h \
|
||||
gimp-version.c \
|
||||
gimp-version.h
|
||||
|
||||
libapp_a_SOURCES = $(libapp_sources)
|
||||
|
||||
gimp_@GIMP_APP_VERSION@_SOURCES = $(libapp_sources) main.c
|
||||
|
||||
|
||||
if PLATFORM_LINUX
|
||||
libdl = -ldl
|
||||
endif
|
||||
|
||||
if PLATFORM_OSX
|
||||
framework_cocoa = -framework Cocoa
|
||||
endif
|
||||
|
||||
if OS_WIN32
|
||||
win32_ldflags = -mwindows -Wl,--tsaware $(WIN32_LARGE_ADDRESS_AWARE)
|
||||
|
||||
# for GimpDashboard and GimpBacktrace
|
||||
psapi_cflags = -DPSAPI_VERSION=1
|
||||
libpsapi = -lpsapi
|
||||
|
||||
# for GimpBacktrace
|
||||
libdbghelp = -ldbghelp
|
||||
|
||||
# for I_RpcExceptionFilter()
|
||||
librpcrt4 = -lrpcrt4
|
||||
|
||||
if HAVE_EXCHNDL
|
||||
exchndl = -lexchndl
|
||||
endif
|
||||
|
||||
else
|
||||
libm = -lm
|
||||
endif
|
||||
|
||||
if ENABLE_RELOCATABLE_RESOURCES
|
||||
munix = -Wl,-rpath '-Wl,$$ORIGIN/../lib'
|
||||
endif
|
||||
|
||||
if HAVE_WINDRES
|
||||
include $(top_srcdir)/build/windows/gimprc.rule
|
||||
GIMPRC = gimp-$(GIMP_APP_VERSION).rc.o
|
||||
GIMPCONSOLERC = gimp-console-$(GIMP_APP_VERSION).rc.o
|
||||
endif
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DGIMPDIR=\""$(gimpdir)"\" \
|
||||
-DLIBEXECDIR=\""$(libexecdir)"\" \
|
||||
-DGIMP_USER_VERSION=\"$(GIMP_USER_VERSION)\" \
|
||||
-DGIMP_TOOL_VERSION=\"$(GIMP_TOOL_VERSION)\" \
|
||||
-DG_LOG_DOMAIN=\"Gimp\" \
|
||||
-DGIMP_APP_GLUE_COMPILATION \
|
||||
-DCC_VERSION=\""$(CC_VERSION)"\" \
|
||||
-I$(top_srcdir) \
|
||||
$(GTK_CFLAGS) \
|
||||
$(PANGOCAIRO_CFLAGS) \
|
||||
$(GEGL_CFLAGS) \
|
||||
$(LCMS_CFLAGS) \
|
||||
$(GEXIV2_CFLAGS) \
|
||||
$(psapi_cflags) \
|
||||
$(xobjective_c) \
|
||||
-I$(includedir) \
|
||||
-I$(builddir)/gui
|
||||
|
||||
# We need this due to circular dependencies
|
||||
AM_LDFLAGS = \
|
||||
$(munix) \
|
||||
-Wl,-u,$(SYMPREFIX)gimp_vectors_undo_get_type \
|
||||
-Wl,-u,$(SYMPREFIX)gimp_vectors_mod_undo_get_type \
|
||||
-Wl,-u,$(SYMPREFIX)gimp_param_spec_duplicate \
|
||||
-Wl,-u,$(SYMPREFIX)gimp_operations_init \
|
||||
-Wl,-u,$(SYMPREFIX)xcf_init \
|
||||
-Wl,-u,$(SYMPREFIX)internal_procs_init \
|
||||
-Wl,-u,$(SYMPREFIX)gimp_plug_in_manager_restore \
|
||||
-Wl,-u,$(SYMPREFIX)gimp_pdb_compat_param_spec \
|
||||
-Wl,-u,$(SYMPREFIX)gimp_layer_mode_is_legacy \
|
||||
-Wl,-u,$(SYMPREFIX)gimp_parallel_init \
|
||||
-Wl,-u,$(SYMPREFIX)gimp_async_set_new \
|
||||
-Wl,-u,$(SYMPREFIX)gimp_uncancelable_waitable_new
|
||||
|
||||
gimpconsoleldadd = \
|
||||
xcf/libappxcf.a \
|
||||
pdb/libappinternal-procs.a \
|
||||
pdb/libapppdb.a \
|
||||
plug-in/libappplug-in.a \
|
||||
vectors/libappvectors.a \
|
||||
core/libappcore.a \
|
||||
file/libappfile.a \
|
||||
file-data/libappfile-data.a \
|
||||
text/libapptext.a \
|
||||
paint/libapppaint.a \
|
||||
operations/libappoperations.a \
|
||||
operations/layer-modes/libapplayermodes.a \
|
||||
operations/layer-modes-legacy/libapplayermodeslegacy.a \
|
||||
gegl/libappgegl.a \
|
||||
config/libappconfig.a \
|
||||
$(libgimpconfig) \
|
||||
$(libgimpmath) \
|
||||
$(libgimpthumb) \
|
||||
$(libgimpcolor) \
|
||||
$(libgimpmodule) \
|
||||
$(libgimpbase) \
|
||||
$(GDK_PIXBUF_LIBS) \
|
||||
$(FREETYPE_LIBS) \
|
||||
$(FONTCONFIG_LIBS) \
|
||||
$(PANGOCAIRO_LIBS) \
|
||||
$(HARFBUZZ_LIBS) \
|
||||
$(CAIRO_LIBS) \
|
||||
$(GIO_UNIX_LIBS) \
|
||||
$(GIO_WINDOWS_LIBS) \
|
||||
$(GEGL_LIBS) \
|
||||
$(GLIB_LIBS) \
|
||||
$(LCMS_LIBS) \
|
||||
$(GEXIV2_LIBS) \
|
||||
$(Z_LIBS) \
|
||||
$(JSON_C_LIBS) \
|
||||
$(LIBMYPAINT_LIBS) \
|
||||
$(LIBBACKTRACE_LIBS) \
|
||||
$(LIBUNWIND_LIBS) \
|
||||
$(INTLLIBS) \
|
||||
$(RT_LIBS) \
|
||||
$(libm) \
|
||||
$(libdl) \
|
||||
$(libpsapi) \
|
||||
$(libdbghelp) \
|
||||
$(librpcrt4)
|
||||
|
||||
gimp_@GIMP_APP_VERSION@_LDFLAGS = \
|
||||
$(AM_LDFLAGS) \
|
||||
$(win32_ldflags) \
|
||||
$(framework_cocoa) \
|
||||
-Wl,-u,$(SYMPREFIX)gimp_lebl_dialog
|
||||
|
||||
gimp_@GIMP_APP_VERSION@_LDADD = \
|
||||
gui/libappgui.a \
|
||||
menus/libappmenus.a \
|
||||
actions/libappactions.a \
|
||||
dialogs/libappdialogs.a \
|
||||
tools/libapptools.a \
|
||||
display/libappdisplay.a \
|
||||
propgui/libapppropgui.a \
|
||||
widgets/libappwidgets.a \
|
||||
$(libgimpwidgets) \
|
||||
$(GTK_LIBS) \
|
||||
$(GTK_MAC_INTEGRATION_LIBS) \
|
||||
$(gimpconsoleldadd) \
|
||||
$(exchndl) \
|
||||
$(GIMPRC)
|
||||
|
||||
|
||||
if ENABLE_GIMP_CONSOLE
|
||||
|
||||
gimp_console_@GIMP_APP_VERSION@_SOURCES = $(libapp_sources) main.c
|
||||
|
||||
gimp_console_@GIMP_APP_VERSION@_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS) \
|
||||
-DGIMP_CONSOLE_COMPILATION
|
||||
|
||||
gimp_console_@GIMP_APP_VERSION@_LDADD = \
|
||||
$(gimpconsoleldadd) \
|
||||
$(GIMPCONSOLERC)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
install-exec-hook:
|
||||
if DEFAULT_BINARY
|
||||
cd $(DESTDIR)$(bindir) \
|
||||
&& rm -f gimp$(EXEEXT) \
|
||||
&& $(LN_S) gimp-$(GIMP_APP_VERSION)$(EXEEXT) gimp$(EXEEXT)
|
||||
if ENABLE_GIMP_CONSOLE
|
||||
cd $(DESTDIR)$(bindir) \
|
||||
&& rm -f gimp-console$(EXEEXT) \
|
||||
&& $(LN_S) gimp-console-$(GIMP_APP_VERSION)$(EXEEXT) gimp-console$(EXEEXT)
|
||||
endif
|
||||
endif
|
||||
|
||||
uninstall-local:
|
||||
if DEFAULT_BINARY
|
||||
rm -f $(DESTDIR)$(bindir)/gimp$(EXEEXT)
|
||||
if ENABLE_GIMP_CONSOLE
|
||||
rm -f $(DESTDIR)$(bindir)/gimp-console$(EXEEXT)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# require gimp-console when making dist
|
||||
#
|
||||
if ENABLE_GIMP_CONSOLE
|
||||
dist-check-gimp-console:
|
||||
else
|
||||
dist-check-gimp-console:
|
||||
@echo "*** gimp-console must be enabled in order to make dist"
|
||||
@false
|
||||
endif
|
||||
|
||||
|
||||
# hook to assure that the system gimprc and the gimprc manpage are
|
||||
# uptodate when a release is made
|
||||
#
|
||||
dist-dump-gimprc: gimp-console-$(GIMP_APP_VERSION)$(EXEEXT)
|
||||
./$< --dump-gimprc-system > gimprc.tmp \
|
||||
&& (cmp -s gimprc.tmp $(top_srcdir)/etc/gimprc.in || \
|
||||
cp gimprc.tmp $(top_srcdir)/etc/gimprc.in) \
|
||||
&& rm gimprc.tmp
|
||||
./$< --dump-gimprc-manpage > gimprc.tmp \
|
||||
&& (cmp -s gimprc.tmp $(top_srcdir)/docs/gimprc.5.in ||\
|
||||
cp gimprc.tmp $(top_srcdir)/docs/gimprc.5.in) \
|
||||
&& rm gimprc.tmp
|
||||
|
||||
dist-hook: dist-check-gimp-console dist-dump-gimprc
|
1664
app/Makefile.in
1664
app/Makefile.in
File diff suppressed because it is too large
Load Diff
53
app/about.h
53
app/about.h
|
@ -1,53 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __ABOUT_H__
|
||||
#define __ABOUT_H__
|
||||
|
||||
|
||||
#define GIMP_ACRONYM \
|
||||
_("GIMP")
|
||||
|
||||
#define GIMP_NAME \
|
||||
_("GNU Image Manipulation Program")
|
||||
|
||||
/* The year of the last commit (UTC) will be inserted into this string. */
|
||||
#define GIMP_COPYRIGHT \
|
||||
_("Copyright © 1995-%s\n" \
|
||||
"Spencer Kimball, Peter Mattis and the GIMP Development Team")
|
||||
|
||||
/* TRANSLATORS: do not end the license URL with a dot, because it would
|
||||
* be in the link. Because of technical limitations, make sure the URL
|
||||
* ends with a space, a newline or is end of text.
|
||||
* Cf. bug 762282.
|
||||
*/
|
||||
#define GIMP_LICENSE \
|
||||
_("GIMP is free software: you can redistribute it and/or modify it " \
|
||||
"under the terms of the GNU General Public License as published by " \
|
||||
"the Free Software Foundation; either version 3 of the License, or " \
|
||||
"(at your option) any later version." \
|
||||
"\n\n" \
|
||||
"GIMP is distributed in the hope that it will be useful, " \
|
||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of " \
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the " \
|
||||
"GNU General Public License for more details." \
|
||||
"\n\n" \
|
||||
"You should have received a copy of the GNU General Public License " \
|
||||
"along with GIMP. If not, see: https://www.gnu.org/licenses/")
|
||||
|
||||
|
||||
#endif /* __ABOUT_H__ */
|
|
@ -1,202 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DG_LOG_DOMAIN=\"Gimp-Actions\" \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/app \
|
||||
-I$(top_srcdir)/app \
|
||||
$(GEGL_CFLAGS) \
|
||||
$(GTK_CFLAGS) \
|
||||
-I$(includedir)
|
||||
|
||||
noinst_LIBRARIES = libappactions.a
|
||||
|
||||
libappactions_a_SOURCES = \
|
||||
actions-types.h \
|
||||
actions.c \
|
||||
actions.h \
|
||||
\
|
||||
gimpgeglprocedure.c \
|
||||
gimpgeglprocedure.h \
|
||||
\
|
||||
brush-editor-actions.c \
|
||||
brush-editor-actions.h \
|
||||
brushes-actions.c \
|
||||
brushes-actions.h \
|
||||
buffers-actions.c \
|
||||
buffers-actions.h \
|
||||
buffers-commands.c \
|
||||
buffers-commands.h \
|
||||
channels-actions.c \
|
||||
channels-actions.h \
|
||||
channels-commands.c \
|
||||
channels-commands.h \
|
||||
colormap-actions.c \
|
||||
colormap-actions.h \
|
||||
colormap-commands.c \
|
||||
colormap-commands.h \
|
||||
context-actions.c \
|
||||
context-actions.h \
|
||||
context-commands.c \
|
||||
context-commands.h \
|
||||
cursor-info-actions.c \
|
||||
cursor-info-actions.h \
|
||||
cursor-info-commands.c \
|
||||
cursor-info-commands.h \
|
||||
dashboard-actions.c \
|
||||
dashboard-actions.h \
|
||||
dashboard-commands.c \
|
||||
dashboard-commands.h \
|
||||
data-commands.c \
|
||||
data-commands.h \
|
||||
data-editor-commands.c \
|
||||
data-editor-commands.h \
|
||||
debug-actions.c \
|
||||
debug-actions.h \
|
||||
debug-commands.c \
|
||||
debug-commands.h \
|
||||
dialogs-actions.c \
|
||||
dialogs-actions.h \
|
||||
dialogs-commands.c \
|
||||
dialogs-commands.h \
|
||||
dock-actions.c \
|
||||
dock-actions.h \
|
||||
dock-commands.c \
|
||||
dock-commands.h \
|
||||
dockable-actions.c \
|
||||
dockable-actions.h \
|
||||
dockable-commands.c \
|
||||
dockable-commands.h \
|
||||
documents-actions.c \
|
||||
documents-actions.h \
|
||||
documents-commands.c \
|
||||
documents-commands.h \
|
||||
drawable-actions.c \
|
||||
drawable-actions.h \
|
||||
drawable-commands.c \
|
||||
drawable-commands.h \
|
||||
dynamics-actions.c \
|
||||
dynamics-actions.h \
|
||||
dynamics-editor-actions.c \
|
||||
dynamics-editor-actions.h \
|
||||
edit-actions.c \
|
||||
edit-actions.h \
|
||||
edit-commands.c \
|
||||
edit-commands.h \
|
||||
error-console-actions.c \
|
||||
error-console-actions.h \
|
||||
error-console-commands.c \
|
||||
error-console-commands.h \
|
||||
file-actions.c \
|
||||
file-actions.h \
|
||||
file-commands.c \
|
||||
file-commands.h \
|
||||
filters-actions.c \
|
||||
filters-actions.h \
|
||||
filters-commands.c \
|
||||
filters-commands.h \
|
||||
fonts-actions.c \
|
||||
fonts-actions.h \
|
||||
gradient-editor-actions.c \
|
||||
gradient-editor-actions.h \
|
||||
gradient-editor-commands.c \
|
||||
gradient-editor-commands.h \
|
||||
gradients-actions.c \
|
||||
gradients-actions.h \
|
||||
gradients-commands.c \
|
||||
gradients-commands.h \
|
||||
help-actions.c \
|
||||
help-actions.h \
|
||||
help-commands.c \
|
||||
help-commands.h \
|
||||
image-actions.c \
|
||||
image-actions.h \
|
||||
image-commands.c \
|
||||
image-commands.h \
|
||||
images-actions.c \
|
||||
images-actions.h \
|
||||
images-commands.c \
|
||||
images-commands.h \
|
||||
items-commands.c \
|
||||
items-commands.h \
|
||||
items-actions.c \
|
||||
items-actions.h \
|
||||
layers-actions.c \
|
||||
layers-actions.h \
|
||||
layers-commands.c \
|
||||
layers-commands.h \
|
||||
mypaint-brushes-actions.c \
|
||||
mypaint-brushes-actions.h \
|
||||
palette-editor-actions.c \
|
||||
palette-editor-actions.h \
|
||||
palette-editor-commands.c \
|
||||
palette-editor-commands.h \
|
||||
palettes-actions.c \
|
||||
palettes-actions.h \
|
||||
palettes-commands.c \
|
||||
palettes-commands.h \
|
||||
patterns-actions.c \
|
||||
patterns-actions.h \
|
||||
plug-in-actions.c \
|
||||
plug-in-actions.h \
|
||||
plug-in-commands.c \
|
||||
plug-in-commands.h \
|
||||
procedure-commands.c \
|
||||
procedure-commands.h \
|
||||
quick-mask-actions.c \
|
||||
quick-mask-actions.h \
|
||||
quick-mask-commands.c \
|
||||
quick-mask-commands.h \
|
||||
sample-points-actions.c \
|
||||
sample-points-actions.h \
|
||||
sample-points-commands.c \
|
||||
sample-points-commands.h \
|
||||
select-actions.c \
|
||||
select-actions.h \
|
||||
select-commands.c \
|
||||
select-commands.h \
|
||||
templates-actions.c \
|
||||
templates-actions.h \
|
||||
templates-commands.c \
|
||||
templates-commands.h \
|
||||
text-editor-actions.c \
|
||||
text-editor-actions.h \
|
||||
text-editor-commands.c \
|
||||
text-editor-commands.h \
|
||||
text-tool-actions.c \
|
||||
text-tool-actions.h \
|
||||
text-tool-commands.c \
|
||||
text-tool-commands.h \
|
||||
tool-options-actions.c \
|
||||
tool-options-actions.h \
|
||||
tool-options-commands.c \
|
||||
tool-options-commands.h \
|
||||
tool-presets-actions.c \
|
||||
tool-presets-actions.h \
|
||||
tool-presets-commands.c \
|
||||
tool-presets-commands.h \
|
||||
tool-preset-editor-actions.c \
|
||||
tool-preset-editor-actions.h \
|
||||
tool-preset-editor-commands.c \
|
||||
tool-preset-editor-commands.h \
|
||||
tools-actions.c \
|
||||
tools-actions.h \
|
||||
tools-commands.c \
|
||||
tools-commands.h \
|
||||
vectors-actions.c \
|
||||
vectors-actions.h \
|
||||
vectors-commands.c \
|
||||
vectors-commands.h \
|
||||
view-actions.c \
|
||||
view-actions.h \
|
||||
view-commands.c \
|
||||
view-commands.h \
|
||||
window-actions.c \
|
||||
window-actions.h \
|
||||
window-commands.c \
|
||||
window-commands.h \
|
||||
windows-actions.c \
|
||||
windows-actions.h \
|
||||
windows-commands.c \
|
||||
windows-commands.h
|
File diff suppressed because it is too large
Load Diff
|
@ -1,54 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __ACTIONS_TYPES_H__
|
||||
#define __ACTIONS_TYPES_H__
|
||||
|
||||
|
||||
#include "dialogs/dialogs-types.h"
|
||||
#include "tools/tools-types.h"
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GIMP_ACTION_SELECT_SET = 0,
|
||||
GIMP_ACTION_SELECT_SET_TO_DEFAULT = -1,
|
||||
GIMP_ACTION_SELECT_FIRST = -2,
|
||||
GIMP_ACTION_SELECT_LAST = -3,
|
||||
GIMP_ACTION_SELECT_SMALL_PREVIOUS = -4,
|
||||
GIMP_ACTION_SELECT_SMALL_NEXT = -5,
|
||||
GIMP_ACTION_SELECT_PREVIOUS = -6,
|
||||
GIMP_ACTION_SELECT_NEXT = -7,
|
||||
GIMP_ACTION_SELECT_SKIP_PREVIOUS = -8,
|
||||
GIMP_ACTION_SELECT_SKIP_NEXT = -9,
|
||||
GIMP_ACTION_SELECT_PERCENT_PREVIOUS = -10,
|
||||
GIMP_ACTION_SELECT_PERCENT_NEXT = -11
|
||||
} GimpActionSelectType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GIMP_SAVE_MODE_SAVE,
|
||||
GIMP_SAVE_MODE_SAVE_AS,
|
||||
GIMP_SAVE_MODE_SAVE_A_COPY,
|
||||
GIMP_SAVE_MODE_SAVE_AND_CLOSE,
|
||||
GIMP_SAVE_MODE_EXPORT,
|
||||
GIMP_SAVE_MODE_EXPORT_AS,
|
||||
GIMP_SAVE_MODE_OVERWRITE
|
||||
} GimpSaveMode;
|
||||
|
||||
|
||||
#endif /* __ACTIONS_TYPES_H__ */
|
|
@ -1,737 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontainer.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimptooloptions.h"
|
||||
#include "core/gimptoolinfo.h"
|
||||
|
||||
#include "widgets/gimpactionfactory.h"
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpcontainereditor.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimpdock.h"
|
||||
#include "widgets/gimpdockable.h"
|
||||
#include "widgets/gimpdockwindow.h"
|
||||
#include "widgets/gimpimageeditor.h"
|
||||
#include "widgets/gimpitemtreeview.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
#include "display/gimpimagewindow.h"
|
||||
#include "display/gimpnavigationeditor.h"
|
||||
#include "display/gimpstatusbar.h"
|
||||
|
||||
#include "dialogs/dialogs.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "brush-editor-actions.h"
|
||||
#include "brushes-actions.h"
|
||||
#include "buffers-actions.h"
|
||||
#include "channels-actions.h"
|
||||
#include "colormap-actions.h"
|
||||
#include "context-actions.h"
|
||||
#include "cursor-info-actions.h"
|
||||
#include "dashboard-actions.h"
|
||||
#include "debug-actions.h"
|
||||
#include "dialogs-actions.h"
|
||||
#include "dock-actions.h"
|
||||
#include "dockable-actions.h"
|
||||
#include "documents-actions.h"
|
||||
#include "drawable-actions.h"
|
||||
#include "dynamics-actions.h"
|
||||
#include "dynamics-editor-actions.h"
|
||||
#include "edit-actions.h"
|
||||
#include "error-console-actions.h"
|
||||
#include "file-actions.h"
|
||||
#include "filters-actions.h"
|
||||
#include "fonts-actions.h"
|
||||
#include "gradient-editor-actions.h"
|
||||
#include "gradients-actions.h"
|
||||
#include "help-actions.h"
|
||||
#include "image-actions.h"
|
||||
#include "images-actions.h"
|
||||
#include "layers-actions.h"
|
||||
#include "mypaint-brushes-actions.h"
|
||||
#include "palette-editor-actions.h"
|
||||
#include "palettes-actions.h"
|
||||
#include "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 "vectors-actions.h"
|
||||
#include "view-actions.h"
|
||||
#include "windows-actions.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
/* global variables */
|
||||
|
||||
GimpActionFactory *global_action_factory = NULL;
|
||||
|
||||
|
||||
/* private variables */
|
||||
|
||||
static const GimpActionFactoryEntry action_groups[] =
|
||||
{
|
||||
{ "brush-editor", N_("Brush Editor"), GIMP_ICON_BRUSH,
|
||||
brush_editor_actions_setup,
|
||||
brush_editor_actions_update },
|
||||
{ "brushes", N_("Brushes"), GIMP_ICON_BRUSH,
|
||||
brushes_actions_setup,
|
||||
brushes_actions_update },
|
||||
{ "buffers", N_("Buffers"), GIMP_ICON_BUFFER,
|
||||
buffers_actions_setup,
|
||||
buffers_actions_update },
|
||||
{ "channels", N_("Channels"), GIMP_ICON_CHANNEL,
|
||||
channels_actions_setup,
|
||||
channels_actions_update },
|
||||
{ "colormap", N_("Colormap"), GIMP_ICON_COLORMAP,
|
||||
colormap_actions_setup,
|
||||
colormap_actions_update },
|
||||
{ "context", N_("Context"), GIMP_ICON_DIALOG_TOOL_OPTIONS /* well... */,
|
||||
context_actions_setup,
|
||||
context_actions_update },
|
||||
{ "cursor-info", N_("Pointer Information"), NULL,
|
||||
cursor_info_actions_setup,
|
||||
cursor_info_actions_update },
|
||||
{ "dashboard", N_("Dashboard"), GIMP_ICON_DIALOG_DASHBOARD,
|
||||
dashboard_actions_setup,
|
||||
dashboard_actions_update },
|
||||
{ "debug", N_("Debug"), NULL,
|
||||
debug_actions_setup,
|
||||
debug_actions_update },
|
||||
{ "dialogs", N_("Dialogs"), NULL,
|
||||
dialogs_actions_setup,
|
||||
dialogs_actions_update },
|
||||
{ "dock", N_("Dock"), NULL,
|
||||
dock_actions_setup,
|
||||
dock_actions_update },
|
||||
{ "dockable", N_("Dockable"), NULL,
|
||||
dockable_actions_setup,
|
||||
dockable_actions_update },
|
||||
{ "documents", N_("Document History"), NULL,
|
||||
documents_actions_setup,
|
||||
documents_actions_update },
|
||||
{ "drawable", N_("Drawable"), GIMP_ICON_LAYER,
|
||||
drawable_actions_setup,
|
||||
drawable_actions_update },
|
||||
{ "dynamics", N_("Paint Dynamics"), GIMP_ICON_DYNAMICS,
|
||||
dynamics_actions_setup,
|
||||
dynamics_actions_update },
|
||||
{ "dynamics-editor", N_("Paint Dynamics Editor"), GIMP_ICON_DYNAMICS,
|
||||
dynamics_editor_actions_setup,
|
||||
dynamics_editor_actions_update },
|
||||
{ "edit", N_("Edit"), GIMP_ICON_EDIT,
|
||||
edit_actions_setup,
|
||||
edit_actions_update },
|
||||
{ "error-console", N_("Error Console"), GIMP_ICON_DIALOG_WARNING,
|
||||
error_console_actions_setup,
|
||||
error_console_actions_update },
|
||||
{ "file", N_("File"), "text-x-generic",
|
||||
file_actions_setup,
|
||||
file_actions_update },
|
||||
{ "filters", N_("Filters"), GIMP_ICON_GEGL,
|
||||
filters_actions_setup,
|
||||
filters_actions_update },
|
||||
{ "fonts", N_("Fonts"), GIMP_ICON_FONT,
|
||||
fonts_actions_setup,
|
||||
fonts_actions_update },
|
||||
{ "gradient-editor", N_("Gradient Editor"), GIMP_ICON_GRADIENT,
|
||||
gradient_editor_actions_setup,
|
||||
gradient_editor_actions_update },
|
||||
{ "gradients", N_("Gradients"), GIMP_ICON_GRADIENT,
|
||||
gradients_actions_setup,
|
||||
gradients_actions_update },
|
||||
{ "tool-presets", N_("Tool Presets"), GIMP_ICON_TOOL_PRESET,
|
||||
tool_presets_actions_setup,
|
||||
tool_presets_actions_update },
|
||||
{ "tool-preset-editor", N_("Tool Preset Editor"), GIMP_ICON_TOOL_PRESET,
|
||||
tool_preset_editor_actions_setup,
|
||||
tool_preset_editor_actions_update },
|
||||
{ "help", N_("Help"), "help-browser",
|
||||
help_actions_setup,
|
||||
help_actions_update },
|
||||
{ "image", N_("Image"), GIMP_ICON_IMAGE,
|
||||
image_actions_setup,
|
||||
image_actions_update },
|
||||
{ "images", N_("Images"), GIMP_ICON_IMAGE,
|
||||
images_actions_setup,
|
||||
images_actions_update },
|
||||
{ "layers", N_("Layers"), GIMP_ICON_LAYER,
|
||||
layers_actions_setup,
|
||||
layers_actions_update },
|
||||
{ "mypaint-brushes", N_("MyPaint Brushes"), GIMP_ICON_MYPAINT_BRUSH,
|
||||
mypaint_brushes_actions_setup,
|
||||
mypaint_brushes_actions_update },
|
||||
{ "palette-editor", N_("Palette Editor"), GIMP_ICON_PALETTE,
|
||||
palette_editor_actions_setup,
|
||||
palette_editor_actions_update },
|
||||
{ "palettes", N_("Palettes"), GIMP_ICON_PALETTE,
|
||||
palettes_actions_setup,
|
||||
palettes_actions_update },
|
||||
{ "patterns", N_("Patterns"), GIMP_ICON_PATTERN,
|
||||
patterns_actions_setup,
|
||||
patterns_actions_update },
|
||||
{ "plug-in", N_("Plug-ins"), GIMP_ICON_PLUGIN,
|
||||
plug_in_actions_setup,
|
||||
plug_in_actions_update },
|
||||
{ "quick-mask", N_("Quick Mask"), GIMP_ICON_QUICK_MASK_ON,
|
||||
quick_mask_actions_setup,
|
||||
quick_mask_actions_update },
|
||||
{ "sample-points", N_("Sample Points"), GIMP_ICON_SAMPLE_POINT,
|
||||
sample_points_actions_setup,
|
||||
sample_points_actions_update },
|
||||
{ "select", N_("Select"), GIMP_ICON_SELECTION,
|
||||
select_actions_setup,
|
||||
select_actions_update },
|
||||
{ "templates", N_("Templates"), GIMP_ICON_TEMPLATE,
|
||||
templates_actions_setup,
|
||||
templates_actions_update },
|
||||
{ "text-tool", N_("Text Tool"), GIMP_ICON_EDIT,
|
||||
text_tool_actions_setup,
|
||||
text_tool_actions_update },
|
||||
{ "text-editor", N_("Text Editor"), GIMP_ICON_EDIT,
|
||||
text_editor_actions_setup,
|
||||
text_editor_actions_update },
|
||||
{ "tool-options", N_("Tool Options"), GIMP_ICON_DIALOG_TOOL_OPTIONS,
|
||||
tool_options_actions_setup,
|
||||
tool_options_actions_update },
|
||||
{ "tools", N_("Tools"), GIMP_ICON_DIALOG_TOOLS,
|
||||
tools_actions_setup,
|
||||
tools_actions_update },
|
||||
{ "vectors", N_("Paths"), GIMP_ICON_PATH,
|
||||
vectors_actions_setup,
|
||||
vectors_actions_update },
|
||||
{ "view", N_("View"), GIMP_ICON_VISIBLE,
|
||||
view_actions_setup,
|
||||
view_actions_update },
|
||||
{ "windows", N_("Windows"), NULL,
|
||||
windows_actions_setup,
|
||||
windows_actions_update }
|
||||
};
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
actions_init (Gimp *gimp)
|
||||
{
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
g_return_if_fail (global_action_factory == NULL);
|
||||
|
||||
global_action_factory = gimp_action_factory_new (gimp);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (action_groups); i++)
|
||||
gimp_action_factory_group_register (global_action_factory,
|
||||
action_groups[i].identifier,
|
||||
gettext (action_groups[i].label),
|
||||
action_groups[i].icon_name,
|
||||
action_groups[i].setup_func,
|
||||
action_groups[i].update_func);
|
||||
}
|
||||
|
||||
void
|
||||
actions_exit (Gimp *gimp)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
g_return_if_fail (global_action_factory != NULL);
|
||||
g_return_if_fail (global_action_factory->gimp == gimp);
|
||||
|
||||
g_clear_object (&global_action_factory);
|
||||
}
|
||||
|
||||
Gimp *
|
||||
action_data_get_gimp (gpointer data)
|
||||
{
|
||||
Gimp *result = NULL;
|
||||
static gboolean recursion = FALSE;
|
||||
|
||||
if (! data || recursion)
|
||||
return NULL;
|
||||
|
||||
recursion = TRUE;
|
||||
|
||||
if (GIMP_IS_GIMP (data))
|
||||
result = data;
|
||||
|
||||
if (! result)
|
||||
{
|
||||
GimpDisplay *display = action_data_get_display (data);
|
||||
|
||||
if (display)
|
||||
result = display->gimp;
|
||||
}
|
||||
|
||||
if (! result)
|
||||
{
|
||||
GimpContext *context = action_data_get_context (data);
|
||||
|
||||
if (context)
|
||||
result = context->gimp;
|
||||
}
|
||||
|
||||
recursion = FALSE;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
GimpContext *
|
||||
action_data_get_context (gpointer data)
|
||||
{
|
||||
GimpContext *result = NULL;
|
||||
static gboolean recursion = FALSE;
|
||||
|
||||
if (! data || recursion)
|
||||
return NULL;
|
||||
|
||||
recursion = TRUE;
|
||||
|
||||
if (GIMP_IS_DOCK (data))
|
||||
result = gimp_dock_get_context ((GimpDock *) data);
|
||||
else if (GIMP_IS_DOCK_WINDOW (data))
|
||||
result = gimp_dock_window_get_context (((GimpDockWindow *) data));
|
||||
else if (GIMP_IS_CONTAINER_VIEW (data))
|
||||
result = gimp_container_view_get_context ((GimpContainerView *) data);
|
||||
else if (GIMP_IS_CONTAINER_EDITOR (data))
|
||||
result = gimp_container_view_get_context (((GimpContainerEditor *) data)->view);
|
||||
else if (GIMP_IS_IMAGE_EDITOR (data))
|
||||
result = ((GimpImageEditor *) data)->context;
|
||||
else if (GIMP_IS_NAVIGATION_EDITOR (data))
|
||||
result = ((GimpNavigationEditor *) data)->context;
|
||||
|
||||
if (! result)
|
||||
{
|
||||
Gimp *gimp = action_data_get_gimp (data);
|
||||
|
||||
if (gimp)
|
||||
result = gimp_get_user_context (gimp);
|
||||
}
|
||||
|
||||
recursion = FALSE;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
GimpImage *
|
||||
action_data_get_image (gpointer data)
|
||||
{
|
||||
GimpImage *result = NULL;
|
||||
static gboolean recursion = FALSE;
|
||||
|
||||
if (! data || recursion)
|
||||
return NULL;
|
||||
|
||||
recursion = TRUE;
|
||||
|
||||
if (GIMP_IS_ITEM_TREE_VIEW (data))
|
||||
result = gimp_item_tree_view_get_image ((GimpItemTreeView *) data);
|
||||
else if (GIMP_IS_IMAGE_EDITOR (data))
|
||||
result = ((GimpImageEditor *) data)->image;
|
||||
|
||||
if (! result)
|
||||
{
|
||||
GimpDisplay *display = action_data_get_display (data);
|
||||
|
||||
if (display)
|
||||
result = gimp_display_get_image (display);
|
||||
}
|
||||
|
||||
if (! result)
|
||||
{
|
||||
GimpContext *context = action_data_get_context (data);
|
||||
|
||||
if (context)
|
||||
result = gimp_context_get_image (context);
|
||||
}
|
||||
|
||||
recursion = FALSE;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
GimpDisplay *
|
||||
action_data_get_display (gpointer data)
|
||||
{
|
||||
GimpDisplay *result = NULL;
|
||||
static gboolean recursion = FALSE;
|
||||
|
||||
if (! data || recursion)
|
||||
return NULL;
|
||||
|
||||
recursion = TRUE;
|
||||
|
||||
if (GIMP_IS_DISPLAY (data))
|
||||
result = data;
|
||||
else if (GIMP_IS_IMAGE_WINDOW (data))
|
||||
{
|
||||
GimpDisplayShell *shell = gimp_image_window_get_active_shell (data);
|
||||
result = shell ? shell->display : NULL;
|
||||
}
|
||||
|
||||
if (! result)
|
||||
{
|
||||
GimpContext *context = action_data_get_context (data);
|
||||
|
||||
if (context)
|
||||
result = gimp_context_get_display (context);
|
||||
}
|
||||
|
||||
recursion = FALSE;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
GimpDisplayShell *
|
||||
action_data_get_shell (gpointer data)
|
||||
{
|
||||
GimpDisplayShell *result = NULL;
|
||||
static gboolean recursion = FALSE;
|
||||
|
||||
if (! data || recursion)
|
||||
return NULL;
|
||||
|
||||
recursion = TRUE;
|
||||
|
||||
if (! result)
|
||||
{
|
||||
GimpDisplay *display = action_data_get_display (data);
|
||||
|
||||
if (display)
|
||||
result = gimp_display_get_shell (display);
|
||||
}
|
||||
|
||||
recursion = FALSE;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
action_data_get_widget (gpointer data)
|
||||
{
|
||||
GtkWidget *result = NULL;
|
||||
static gboolean recursion = FALSE;
|
||||
|
||||
if (! data || recursion)
|
||||
return NULL;
|
||||
|
||||
recursion = TRUE;
|
||||
|
||||
if (GTK_IS_WIDGET (data))
|
||||
result = data;
|
||||
|
||||
if (! result)
|
||||
{
|
||||
GimpDisplay *display = action_data_get_display (data);
|
||||
|
||||
if (display)
|
||||
result = GTK_WIDGET (gimp_display_get_shell (display));
|
||||
}
|
||||
|
||||
if (! result)
|
||||
result = dialogs_get_toolbox ();
|
||||
|
||||
recursion = FALSE;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
gint
|
||||
action_data_sel_count (gpointer data)
|
||||
{
|
||||
if (GIMP_IS_CONTAINER_EDITOR (data))
|
||||
{
|
||||
GimpContainerEditor *editor;
|
||||
|
||||
editor = GIMP_CONTAINER_EDITOR (data);
|
||||
return gimp_container_view_get_selected (editor->view, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
gdouble
|
||||
action_select_value (GimpActionSelectType select_type,
|
||||
gdouble value,
|
||||
gdouble min,
|
||||
gdouble max,
|
||||
gdouble def,
|
||||
gdouble small_inc,
|
||||
gdouble inc,
|
||||
gdouble skip_inc,
|
||||
gdouble delta_factor,
|
||||
gboolean wrap)
|
||||
{
|
||||
switch (select_type)
|
||||
{
|
||||
case GIMP_ACTION_SELECT_SET_TO_DEFAULT:
|
||||
value = def;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_FIRST:
|
||||
value = min;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_LAST:
|
||||
value = max;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_SMALL_PREVIOUS:
|
||||
value -= small_inc;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_SMALL_NEXT:
|
||||
value += small_inc;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_PREVIOUS:
|
||||
value -= inc;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_NEXT:
|
||||
value += inc;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_SKIP_PREVIOUS:
|
||||
value -= skip_inc;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_SKIP_NEXT:
|
||||
value += skip_inc;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_PERCENT_PREVIOUS:
|
||||
g_return_val_if_fail (delta_factor >= 0.0, value);
|
||||
value /= (1.0 + delta_factor);
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_PERCENT_NEXT:
|
||||
g_return_val_if_fail (delta_factor >= 0.0, value);
|
||||
value *= (1.0 + delta_factor);
|
||||
break;
|
||||
|
||||
default:
|
||||
if ((gint) select_type >= 0)
|
||||
value = (gdouble) select_type * (max - min) / 1000.0 + min;
|
||||
else
|
||||
g_return_val_if_reached (value);
|
||||
break;
|
||||
}
|
||||
|
||||
if (wrap)
|
||||
{
|
||||
while (value < min)
|
||||
value = max - (min - value);
|
||||
|
||||
while (value > max)
|
||||
value = min + (value - max);
|
||||
}
|
||||
else
|
||||
{
|
||||
value = CLAMP (value, min, max);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
void
|
||||
action_select_property (GimpActionSelectType select_type,
|
||||
GimpDisplay *display,
|
||||
GObject *object,
|
||||
const gchar *property_name,
|
||||
gdouble small_inc,
|
||||
gdouble inc,
|
||||
gdouble skip_inc,
|
||||
gdouble delta_factor,
|
||||
gboolean wrap)
|
||||
{
|
||||
GParamSpec *pspec;
|
||||
|
||||
g_return_if_fail (display == NULL || GIMP_IS_DISPLAY (display));
|
||||
g_return_if_fail (G_IS_OBJECT (object));
|
||||
g_return_if_fail (property_name != NULL);
|
||||
|
||||
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (object),
|
||||
property_name);
|
||||
|
||||
if (G_IS_PARAM_SPEC_DOUBLE (pspec))
|
||||
{
|
||||
gdouble value;
|
||||
|
||||
g_object_get (object, property_name, &value, NULL);
|
||||
|
||||
value = action_select_value (select_type,
|
||||
value,
|
||||
G_PARAM_SPEC_DOUBLE (pspec)->minimum,
|
||||
G_PARAM_SPEC_DOUBLE (pspec)->maximum,
|
||||
G_PARAM_SPEC_DOUBLE (pspec)->default_value,
|
||||
small_inc, inc, skip_inc, delta_factor, wrap);
|
||||
|
||||
g_object_set (object, property_name, value, NULL);
|
||||
|
||||
if (display)
|
||||
{
|
||||
const gchar *blurb = g_param_spec_get_blurb (pspec);
|
||||
|
||||
if (blurb)
|
||||
{
|
||||
/* value description and new value shown in the status bar */
|
||||
action_message (display, object, _("%s: %.2f"), blurb, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (G_IS_PARAM_SPEC_INT (pspec))
|
||||
{
|
||||
gint value;
|
||||
|
||||
g_object_get (object, property_name, &value, NULL);
|
||||
|
||||
value = action_select_value (select_type,
|
||||
value,
|
||||
G_PARAM_SPEC_INT (pspec)->minimum,
|
||||
G_PARAM_SPEC_INT (pspec)->maximum,
|
||||
G_PARAM_SPEC_INT (pspec)->default_value,
|
||||
small_inc, inc, skip_inc, delta_factor, wrap);
|
||||
|
||||
g_object_set (object, property_name, value, NULL);
|
||||
|
||||
if (display)
|
||||
{
|
||||
const gchar *blurb = g_param_spec_get_blurb (pspec);
|
||||
|
||||
if (blurb)
|
||||
{
|
||||
/* value description and new value shown in the status bar */
|
||||
action_message (display, object, _("%s: %d"), blurb, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
g_return_if_reached ();
|
||||
}
|
||||
}
|
||||
|
||||
GimpObject *
|
||||
action_select_object (GimpActionSelectType select_type,
|
||||
GimpContainer *container,
|
||||
GimpObject *current)
|
||||
{
|
||||
gint select_index;
|
||||
gint n_children;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_CONTAINER (container), NULL);
|
||||
g_return_val_if_fail (current == NULL || GIMP_IS_OBJECT (current), NULL);
|
||||
|
||||
if (! current)
|
||||
return NULL;
|
||||
|
||||
n_children = gimp_container_get_n_children (container);
|
||||
|
||||
if (n_children == 0)
|
||||
return NULL;
|
||||
|
||||
switch (select_type)
|
||||
{
|
||||
case GIMP_ACTION_SELECT_FIRST:
|
||||
select_index = 0;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_LAST:
|
||||
select_index = n_children - 1;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_PREVIOUS:
|
||||
select_index = gimp_container_get_child_index (container, current) - 1;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_NEXT:
|
||||
select_index = gimp_container_get_child_index (container, current) + 1;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_SKIP_PREVIOUS:
|
||||
select_index = gimp_container_get_child_index (container, current) - 10;
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_SKIP_NEXT:
|
||||
select_index = gimp_container_get_child_index (container, current) + 10;
|
||||
break;
|
||||
|
||||
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 gimp_container_get_child_by_index (container, select_index);
|
||||
}
|
||||
|
||||
void
|
||||
action_message (GimpDisplay *display,
|
||||
GObject *object,
|
||||
const gchar *format,
|
||||
...)
|
||||
{
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
GimpStatusbar *statusbar = gimp_display_shell_get_statusbar (shell);
|
||||
const gchar *icon_name = NULL;
|
||||
va_list args;
|
||||
|
||||
if (GIMP_IS_TOOL_OPTIONS (object))
|
||||
{
|
||||
GimpToolInfo *tool_info = GIMP_TOOL_OPTIONS (object)->tool_info;
|
||||
|
||||
icon_name = gimp_viewable_get_icon_name (GIMP_VIEWABLE (tool_info));
|
||||
}
|
||||
else if (GIMP_IS_VIEWABLE (object))
|
||||
{
|
||||
icon_name = gimp_viewable_get_icon_name (GIMP_VIEWABLE (object));
|
||||
}
|
||||
|
||||
va_start (args, format);
|
||||
gimp_statusbar_push_temp_valist (statusbar, GIMP_MESSAGE_INFO,
|
||||
icon_name, format, args);
|
||||
va_end (args);
|
||||
}
|
|
@ -1,120 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __ACTIONS_H__
|
||||
#define __ACTIONS_H__
|
||||
|
||||
|
||||
extern GimpActionFactory *global_action_factory;
|
||||
|
||||
|
||||
void actions_init (Gimp *gimp);
|
||||
void actions_exit (Gimp *gimp);
|
||||
|
||||
Gimp * action_data_get_gimp (gpointer data);
|
||||
GimpContext * action_data_get_context (gpointer data);
|
||||
GimpImage * action_data_get_image (gpointer data);
|
||||
GimpDisplay * action_data_get_display (gpointer data);
|
||||
GimpDisplayShell * action_data_get_shell (gpointer data);
|
||||
GtkWidget * action_data_get_widget (gpointer data);
|
||||
gint action_data_sel_count (gpointer data);
|
||||
|
||||
gdouble action_select_value (GimpActionSelectType select_type,
|
||||
gdouble value,
|
||||
gdouble min,
|
||||
gdouble max,
|
||||
gdouble def,
|
||||
gdouble small_inc,
|
||||
gdouble inc,
|
||||
gdouble skip_inc,
|
||||
gdouble delta_factor,
|
||||
gboolean wrap);
|
||||
void action_select_property (GimpActionSelectType select_type,
|
||||
GimpDisplay *display,
|
||||
GObject *object,
|
||||
const gchar *property_name,
|
||||
gdouble small_inc,
|
||||
gdouble inc,
|
||||
gdouble skip_inc,
|
||||
gdouble delta_factor,
|
||||
gboolean wrap);
|
||||
GimpObject * action_select_object (GimpActionSelectType select_type,
|
||||
GimpContainer *container,
|
||||
GimpObject *current);
|
||||
void action_message (GimpDisplay *display,
|
||||
GObject *object,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF(3,4);
|
||||
|
||||
|
||||
#define return_if_no_gimp(gimp,data) \
|
||||
gimp = action_data_get_gimp (data); \
|
||||
if (! gimp) \
|
||||
return
|
||||
|
||||
#define return_if_no_context(context,data) \
|
||||
context = action_data_get_context (data); \
|
||||
if (! context) \
|
||||
return
|
||||
|
||||
#define return_if_no_image(image,data) \
|
||||
image = action_data_get_image (data); \
|
||||
if (! image) \
|
||||
return
|
||||
|
||||
#define return_if_no_display(display,data) \
|
||||
display = action_data_get_display (data); \
|
||||
if (! display) \
|
||||
return
|
||||
|
||||
#define return_if_no_shell(shell,data) \
|
||||
shell = action_data_get_shell (data); \
|
||||
if (! shell) \
|
||||
return
|
||||
|
||||
#define return_if_no_widget(widget,data) \
|
||||
widget = action_data_get_widget (data); \
|
||||
if (! widget) \
|
||||
return
|
||||
|
||||
|
||||
#define return_if_no_drawable(image,drawable,data) \
|
||||
return_if_no_image (image,data); \
|
||||
drawable = gimp_image_get_active_drawable (image); \
|
||||
if (! drawable) \
|
||||
return
|
||||
|
||||
#define return_if_no_layer(image,layer,data) \
|
||||
return_if_no_image (image,data); \
|
||||
layer = gimp_image_get_active_layer (image); \
|
||||
if (! layer) \
|
||||
return
|
||||
|
||||
#define return_if_no_channel(image,channel,data) \
|
||||
return_if_no_image (image,data); \
|
||||
channel = gimp_image_get_active_channel (image); \
|
||||
if (! channel) \
|
||||
return
|
||||
|
||||
#define return_if_no_vectors(image,vectors,data) \
|
||||
return_if_no_image (image,data); \
|
||||
vectors = gimp_image_get_active_vectors (image); \
|
||||
if (! vectors) \
|
||||
return
|
||||
|
||||
|
||||
#endif /* __ACTIONS_H__ */
|
|
@ -1,87 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpbrusheditor.h"
|
||||
|
||||
#include "brush-editor-actions.h"
|
||||
#include "data-editor-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry brush_editor_actions[] =
|
||||
{
|
||||
{ "brush-editor-popup", GIMP_ICON_BRUSH,
|
||||
NC_("brush-editor-action", "Brush Editor Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_BRUSH_EDITOR_DIALOG }
|
||||
};
|
||||
|
||||
static const GimpToggleActionEntry brush_editor_toggle_actions[] =
|
||||
{
|
||||
{ "brush-editor-edit-active", GIMP_ICON_LINKED,
|
||||
NC_("brush-editor-action", "Edit Active Brush"), NULL, NULL,
|
||||
data_editor_edit_active_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_BRUSH_EDITOR_EDIT_ACTIVE }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
brush_editor_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "brush-editor-action",
|
||||
brush_editor_actions,
|
||||
G_N_ELEMENTS (brush_editor_actions));
|
||||
|
||||
gimp_action_group_add_toggle_actions (group, "brush-editor-action",
|
||||
brush_editor_toggle_actions,
|
||||
G_N_ELEMENTS (brush_editor_toggle_actions));
|
||||
}
|
||||
|
||||
void
|
||||
brush_editor_actions_update (GimpActionGroup *group,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (user_data);
|
||||
gboolean edit_active = FALSE;
|
||||
|
||||
edit_active = gimp_data_editor_get_edit_active (data_editor);
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
#define SET_ACTIVE(action,condition) \
|
||||
gimp_action_group_set_action_active (group, action, (condition) != 0)
|
||||
|
||||
SET_ACTIVE ("brush-editor-edit-active", edit_active);
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
#undef SET_ACTIVE
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __BRUSH_EDITOR_ACTIONS_H__
|
||||
#define __BRUSH_EDITOR_ACTIONS_H__
|
||||
|
||||
|
||||
void brush_editor_actions_setup (GimpActionGroup *group);
|
||||
void brush_editor_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __BRUSH_EDITOR_ACTIONS_H__ */
|
|
@ -1,149 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimpbrushgenerated.h"
|
||||
#include "core/gimpcontext.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "brushes-actions.h"
|
||||
#include "data-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry brushes_actions[] =
|
||||
{
|
||||
{ "brushes-popup", GIMP_ICON_BRUSH,
|
||||
NC_("brushes-action", "Brushes Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_BRUSH_DIALOG },
|
||||
|
||||
{ "brushes-open-as-image", GIMP_ICON_DOCUMENT_OPEN,
|
||||
NC_("brushes-action", "_Open Brush as Image"), NULL,
|
||||
NC_("brushes-action", "Open brush as image"),
|
||||
data_open_as_image_cmd_callback,
|
||||
GIMP_HELP_BRUSH_OPEN_AS_IMAGE },
|
||||
|
||||
{ "brushes-new", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("brushes-action", "_New Brush"), NULL,
|
||||
NC_("brushes-action", "Create a new brush"),
|
||||
data_new_cmd_callback,
|
||||
GIMP_HELP_BRUSH_NEW },
|
||||
|
||||
{ "brushes-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
|
||||
NC_("brushes-action", "D_uplicate Brush"), NULL,
|
||||
NC_("brushes-action", "Duplicate this brush"),
|
||||
data_duplicate_cmd_callback,
|
||||
GIMP_HELP_BRUSH_DUPLICATE },
|
||||
|
||||
{ "brushes-copy-location", GIMP_ICON_EDIT_COPY,
|
||||
NC_("brushes-action", "Copy Brush _Location"), NULL,
|
||||
NC_("brushes-action", "Copy brush file location to clipboard"),
|
||||
data_copy_location_cmd_callback,
|
||||
GIMP_HELP_BRUSH_COPY_LOCATION },
|
||||
|
||||
{ "brushes-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
|
||||
NC_("brushes-action", "Show in _File Manager"), NULL,
|
||||
NC_("brushes-action", "Show brush file location in the file manager"),
|
||||
data_show_in_file_manager_cmd_callback,
|
||||
GIMP_HELP_BRUSH_SHOW_IN_FILE_MANAGER },
|
||||
|
||||
{ "brushes-delete", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("brushes-action", "_Delete Brush"), NULL,
|
||||
NC_("brushes-action", "Delete this brush"),
|
||||
data_delete_cmd_callback,
|
||||
GIMP_HELP_BRUSH_DELETE },
|
||||
|
||||
{ "brushes-refresh", GIMP_ICON_VIEW_REFRESH,
|
||||
NC_("brushes-action", "_Refresh Brushes"), NULL,
|
||||
NC_("brushes-action", "Refresh brushes"),
|
||||
data_refresh_cmd_callback,
|
||||
GIMP_HELP_BRUSH_REFRESH }
|
||||
};
|
||||
|
||||
static const GimpStringActionEntry brushes_edit_actions[] =
|
||||
{
|
||||
{ "brushes-edit", GIMP_ICON_EDIT,
|
||||
NC_("brushes-action", "_Edit Brush..."), NULL,
|
||||
NC_("brushes-action", "Edit this brush"),
|
||||
"gimp-brush-editor",
|
||||
GIMP_HELP_BRUSH_EDIT }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
brushes_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "brushes-action",
|
||||
brushes_actions,
|
||||
G_N_ELEMENTS (brushes_actions));
|
||||
|
||||
gimp_action_group_add_string_actions (group, "brushes-action",
|
||||
brushes_edit_actions,
|
||||
G_N_ELEMENTS (brushes_edit_actions),
|
||||
data_edit_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
brushes_actions_update (GimpActionGroup *group,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpContext *context = action_data_get_context (user_data);
|
||||
GimpBrush *brush = NULL;
|
||||
GimpData *data = NULL;
|
||||
GFile *file = NULL;
|
||||
|
||||
if (context)
|
||||
{
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (action_data_sel_count (user_data) > 1)
|
||||
{
|
||||
brush = NULL;
|
||||
}
|
||||
|
||||
if (brush)
|
||||
{
|
||||
data = GIMP_DATA (brush);
|
||||
|
||||
file = gimp_data_get_file (data);
|
||||
}
|
||||
}
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
|
||||
SET_SENSITIVE ("brushes-edit", brush);
|
||||
SET_SENSITIVE ("brushes-open-as-image", file && ! GIMP_IS_BRUSH_GENERATED (brush));
|
||||
SET_SENSITIVE ("brushes-duplicate", brush && gimp_data_is_duplicatable (data));
|
||||
SET_SENSITIVE ("brushes-copy-location", file);
|
||||
SET_SENSITIVE ("brushes-show-in-file-manager", file);
|
||||
SET_SENSITIVE ("brushes-delete", brush && gimp_data_is_deletable (data));
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __BRUSHES_ACTIONS_H__
|
||||
#define __BRUSHES_ACTIONS_H__
|
||||
|
||||
|
||||
void brushes_actions_setup (GimpActionGroup *group);
|
||||
void brushes_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __BRUSHES_ACTIONS_H__ */
|
|
@ -1,136 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimpcontext.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "buffers-actions.h"
|
||||
#include "buffers-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry buffers_actions[] =
|
||||
{
|
||||
{ "buffers-popup", GIMP_ICON_BUFFER,
|
||||
NC_("buffers-action", "Buffers Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_BUFFER_DIALOG },
|
||||
|
||||
{ "buffers-paste-as-new-image", GIMP_ICON_EDIT_PASTE_AS_NEW,
|
||||
NC_("buffers-action", "Paste Buffer as _New Image"), NULL,
|
||||
NC_("buffers-action", "Paste the selected buffer as a new image"),
|
||||
buffers_paste_as_new_image_cmd_callback,
|
||||
GIMP_HELP_BUFFER_PASTE_AS_NEW_IMAGE },
|
||||
|
||||
{ "buffers-delete", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("buffers-action", "_Delete Buffer"), NULL,
|
||||
NC_("buffers-action", "Delete the selected buffer"),
|
||||
buffers_delete_cmd_callback,
|
||||
GIMP_HELP_BUFFER_DELETE }
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry buffers_paste_actions[] =
|
||||
{
|
||||
{ "buffers-paste", GIMP_ICON_EDIT_PASTE,
|
||||
NC_("buffers-action", "_Paste Buffer"), NULL,
|
||||
NC_("buffers-action", "Paste the selected buffer"),
|
||||
GIMP_PASTE_TYPE_FLOATING, FALSE,
|
||||
GIMP_HELP_BUFFER_PASTE },
|
||||
|
||||
{ "buffers-paste-in-place", GIMP_ICON_EDIT_PASTE,
|
||||
NC_("buffers-action", "Paste Buffer In Pl_ace"), NULL,
|
||||
NC_("buffers-action", "Paste the selected buffer at its original position"),
|
||||
GIMP_PASTE_TYPE_FLOATING_IN_PLACE, FALSE,
|
||||
GIMP_HELP_BUFFER_PASTE_IN_PLACE },
|
||||
|
||||
{ "buffers-paste-into", GIMP_ICON_EDIT_PASTE_INTO,
|
||||
NC_("buffers-action", "Paste Buffer _Into The Selection"), NULL,
|
||||
NC_("buffers-action", "Paste the selected buffer into the selection"),
|
||||
GIMP_PASTE_TYPE_FLOATING_INTO, FALSE,
|
||||
GIMP_HELP_BUFFER_PASTE_INTO },
|
||||
|
||||
{ "buffers-paste-into-in-place", GIMP_ICON_EDIT_PASTE_INTO,
|
||||
NC_("buffers-action", "Paste Buffer Into The Selection In Place"), NULL,
|
||||
NC_("buffers-action",
|
||||
"Paste the selected buffer into the selection at its original position"),
|
||||
GIMP_PASTE_TYPE_FLOATING_INTO_IN_PLACE, FALSE,
|
||||
GIMP_HELP_BUFFER_PASTE_INTO_IN_PLACE },
|
||||
|
||||
{ "buffers-paste-as-new-layer", GIMP_ICON_EDIT_PASTE_AS_NEW,
|
||||
NC_("buffers-action", "Paste Buffer as New _Layer"), NULL,
|
||||
NC_("buffers-action", "Paste the selected buffer as a new layer"),
|
||||
GIMP_PASTE_TYPE_NEW_LAYER, FALSE,
|
||||
GIMP_HELP_BUFFER_PASTE_AS_NEW_LAYER },
|
||||
|
||||
{ "buffers-paste-as-new-layer-in-place", GIMP_ICON_EDIT_PASTE_AS_NEW,
|
||||
NC_("buffers-action", "Paste Buffer as New Layer in Place"), NULL,
|
||||
NC_("buffers-action",
|
||||
"Paste the selected buffer as a new layer at its original position"),
|
||||
GIMP_PASTE_TYPE_NEW_LAYER_IN_PLACE, FALSE,
|
||||
GIMP_HELP_BUFFER_PASTE_AS_NEW_LAYER_IN_PLACE },
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
buffers_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "buffers-action",
|
||||
buffers_actions,
|
||||
G_N_ELEMENTS (buffers_actions));
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "buffers-action",
|
||||
buffers_paste_actions,
|
||||
G_N_ELEMENTS (buffers_paste_actions),
|
||||
buffers_paste_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
buffers_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context = action_data_get_context (data);
|
||||
GimpBuffer *buffer = NULL;
|
||||
|
||||
if (context)
|
||||
buffer = gimp_context_get_buffer (context);
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
|
||||
SET_SENSITIVE ("buffers-paste", buffer);
|
||||
SET_SENSITIVE ("buffers-paste-in-place", buffer);
|
||||
SET_SENSITIVE ("buffers-paste-into", buffer);
|
||||
SET_SENSITIVE ("buffers-paste-into-in-place", buffer);
|
||||
SET_SENSITIVE ("buffers-paste-as-new-layer", buffer);
|
||||
SET_SENSITIVE ("buffers-paste-as-new-layer-in-place", buffer);
|
||||
SET_SENSITIVE ("buffers-paste-as-new-image", buffer);
|
||||
SET_SENSITIVE ("buffers-delete", buffer);
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __BUFFERS_ACTIONS_H__
|
||||
#define __BUFFERS_ACTIONS_H__
|
||||
|
||||
|
||||
void buffers_actions_setup (GimpActionGroup *group);
|
||||
void buffers_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __BUFFERS_ACTIONS_H__ */
|
|
@ -1,138 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimp-edit.h"
|
||||
#include "core/gimpcontainer.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
|
||||
#include "widgets/gimpcontainereditor.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimpcontainerview-utils.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
#include "display/gimpdisplayshell-transform.h"
|
||||
|
||||
#include "buffers-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
buffers_paste_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContainer *container;
|
||||
GimpContext *context;
|
||||
GimpBuffer *buffer;
|
||||
GimpPasteType paste_type = (GimpPasteType) g_variant_get_int32 (value);
|
||||
|
||||
container = gimp_container_view_get_container (editor->view);
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
|
||||
buffer = gimp_context_get_buffer (context);
|
||||
|
||||
if (buffer && gimp_container_have (container, GIMP_OBJECT (buffer)))
|
||||
{
|
||||
GimpDisplay *display = gimp_context_get_display (context);
|
||||
GimpImage *image = NULL;
|
||||
gint x = -1;
|
||||
gint y = -1;
|
||||
gint width = -1;
|
||||
gint height = -1;
|
||||
|
||||
if (display)
|
||||
{
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
|
||||
gimp_display_shell_untransform_viewport (
|
||||
shell,
|
||||
! gimp_display_shell_get_infinite_canvas (shell),
|
||||
&x, &y, &width, &height);
|
||||
|
||||
image = gimp_display_get_image (display);
|
||||
}
|
||||
else
|
||||
{
|
||||
image = gimp_context_get_image (context);
|
||||
}
|
||||
|
||||
if (image)
|
||||
{
|
||||
gimp_edit_paste (image, gimp_image_get_active_drawable (image),
|
||||
GIMP_OBJECT (buffer), paste_type,
|
||||
x, y, width, height);
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
buffers_paste_as_new_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContainer *container;
|
||||
GimpContext *context;
|
||||
GimpBuffer *buffer;
|
||||
|
||||
container = gimp_container_view_get_container (editor->view);
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
|
||||
buffer = gimp_context_get_buffer (context);
|
||||
|
||||
if (buffer && gimp_container_have (container, GIMP_OBJECT (buffer)))
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (editor);
|
||||
GimpImage *new_image;
|
||||
|
||||
new_image = gimp_edit_paste_as_new_image (context->gimp,
|
||||
GIMP_OBJECT (buffer));
|
||||
gimp_create_display (context->gimp, new_image,
|
||||
GIMP_UNIT_PIXEL, 1.0,
|
||||
G_OBJECT (gtk_widget_get_screen (widget)),
|
||||
gimp_widget_get_monitor (widget));
|
||||
g_object_unref (new_image);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
buffers_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
|
||||
gimp_container_view_remove_active (editor->view);
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __BUFFERS_COMMANDS_H__
|
||||
#define __BUFFERS_COMMANDS_H__
|
||||
|
||||
|
||||
void buffers_paste_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void buffers_paste_as_new_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void buffers_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __BUFFERS_COMMANDS_H__ */
|
|
@ -1,348 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpitem.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpcomponenteditor.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "channels-actions.h"
|
||||
#include "channels-commands.h"
|
||||
#include "items-actions.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry channels_actions[] =
|
||||
{
|
||||
{ "channels-popup", GIMP_ICON_DIALOG_CHANNELS,
|
||||
NC_("channels-action", "Channels Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_CHANNEL_DIALOG },
|
||||
|
||||
{ "channels-color-tag-menu", NULL,
|
||||
NC_("channels-action", "Color Tag"), NULL, NULL, NULL,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG },
|
||||
|
||||
{ "channels-edit-attributes", GIMP_ICON_EDIT,
|
||||
NC_("channels-action", "_Edit Channel Attributes..."), NULL,
|
||||
NC_("channels-action", "Edit the channel's name, color and opacity"),
|
||||
channels_edit_attributes_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_EDIT },
|
||||
|
||||
{ "channels-new", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("channels-action", "_New Channel..."), NULL,
|
||||
NC_("channels-action", "Create a new channel"),
|
||||
channels_new_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_NEW },
|
||||
|
||||
{ "channels-new-last-values", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("channels-action", "_New Channel"), NULL,
|
||||
NC_("channels-action", "Create a new channel with last used values"),
|
||||
channels_new_last_vals_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_NEW },
|
||||
|
||||
{ "channels-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
|
||||
NC_("channels-action", "D_uplicate Channel"), NULL,
|
||||
NC_("channels-action",
|
||||
"Create a duplicate of this channel and add it to the image"),
|
||||
channels_duplicate_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_DUPLICATE },
|
||||
|
||||
{ "channels-delete", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("channels-action", "_Delete Channel"), NULL,
|
||||
NC_("channels-action", "Delete this channel"),
|
||||
channels_delete_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_DELETE },
|
||||
|
||||
{ "channels-raise", GIMP_ICON_GO_UP,
|
||||
NC_("channels-action", "_Raise Channel"), NULL,
|
||||
NC_("channels-action", "Raise this channel one step in the channel stack"),
|
||||
channels_raise_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_RAISE },
|
||||
|
||||
{ "channels-raise-to-top", GIMP_ICON_GO_TOP,
|
||||
NC_("channels-action", "Raise Channel to _Top"), NULL,
|
||||
NC_("channels-action",
|
||||
"Raise this channel to the top of the channel stack"),
|
||||
channels_raise_to_top_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_RAISE_TO_TOP },
|
||||
|
||||
{ "channels-lower", GIMP_ICON_GO_DOWN,
|
||||
NC_("channels-action", "_Lower Channel"), NULL,
|
||||
NC_("channels-action", "Lower this channel one step in the channel stack"),
|
||||
channels_lower_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_LOWER },
|
||||
|
||||
{ "channels-lower-to-bottom", GIMP_ICON_GO_BOTTOM,
|
||||
NC_("channels-action", "Lower Channel to _Bottom"), NULL,
|
||||
NC_("channels-action",
|
||||
"Lower this channel to the bottom of the channel stack"),
|
||||
channels_lower_to_bottom_cmd_callback,
|
||||
GIMP_HELP_CHANNEL_LOWER_TO_BOTTOM }
|
||||
};
|
||||
|
||||
static const GimpToggleActionEntry channels_toggle_actions[] =
|
||||
{
|
||||
{ "channels-visible", GIMP_ICON_VISIBLE,
|
||||
NC_("channels-action", "Toggle Channel _Visibility"), NULL, NULL,
|
||||
channels_visible_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_CHANNEL_VISIBLE },
|
||||
|
||||
{ "channels-linked", GIMP_ICON_LINKED,
|
||||
NC_("channels-action", "Toggle Channel _Linked State"), NULL, NULL,
|
||||
channels_linked_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_CHANNEL_LINKED },
|
||||
|
||||
{ "channels-lock-content", NULL /* GIMP_ICON_LOCK */,
|
||||
NC_("channels-action", "L_ock Pixels of Channel"), NULL, NULL,
|
||||
channels_lock_content_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_CHANNEL_LOCK_PIXELS },
|
||||
|
||||
{ "channels-lock-position", GIMP_ICON_TOOL_MOVE,
|
||||
NC_("channels-action", "L_ock Position of Channel"), NULL, NULL,
|
||||
channels_lock_position_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_CHANNEL_LOCK_POSITION }
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry channels_color_tag_actions[] =
|
||||
{
|
||||
{ "channels-color-tag-none", GIMP_ICON_EDIT_CLEAR,
|
||||
NC_("channels-action", "None"), NULL,
|
||||
NC_("channels-action", "Channel Color Tag: Clear"),
|
||||
GIMP_COLOR_TAG_NONE, FALSE,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG },
|
||||
|
||||
{ "channels-color-tag-blue", NULL,
|
||||
NC_("channels-action", "Blue"), NULL,
|
||||
NC_("channels-action", "Channel Color Tag: Set to Blue"),
|
||||
GIMP_COLOR_TAG_BLUE, FALSE,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG },
|
||||
|
||||
{ "channels-color-tag-green", NULL,
|
||||
NC_("channels-action", "Green"), NULL,
|
||||
NC_("channels-action", "Channel Color Tag: Set to Green"),
|
||||
GIMP_COLOR_TAG_GREEN, FALSE,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG },
|
||||
|
||||
{ "channels-color-tag-yellow", NULL,
|
||||
NC_("channels-action", "Yellow"), NULL,
|
||||
NC_("channels-action", "Channel Color Tag: Set to Yellow"),
|
||||
GIMP_COLOR_TAG_YELLOW, FALSE,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG },
|
||||
|
||||
{ "channels-color-tag-orange", NULL,
|
||||
NC_("channels-action", "Orange"), NULL,
|
||||
NC_("channels-action", "Channel Color Tag: Set to Orange"),
|
||||
GIMP_COLOR_TAG_ORANGE, FALSE,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG },
|
||||
|
||||
{ "channels-color-tag-brown", NULL,
|
||||
NC_("channels-action", "Brown"), NULL,
|
||||
NC_("channels-action", "Channel Color Tag: Set to Brown"),
|
||||
GIMP_COLOR_TAG_BROWN, FALSE,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG },
|
||||
|
||||
{ "channels-color-tag-red", NULL,
|
||||
NC_("channels-action", "Red"), NULL,
|
||||
NC_("channels-action", "Channel Color Tag: Set to Red"),
|
||||
GIMP_COLOR_TAG_RED, FALSE,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG },
|
||||
|
||||
{ "channels-color-tag-violet", NULL,
|
||||
NC_("channels-action", "Violet"), NULL,
|
||||
NC_("channels-action", "Channel Color Tag: Set to Violet"),
|
||||
GIMP_COLOR_TAG_VIOLET, FALSE,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG },
|
||||
|
||||
{ "channels-color-tag-gray", NULL,
|
||||
NC_("channels-action", "Gray"), NULL,
|
||||
NC_("channels-action", "Channel Color Tag: Set to Gray"),
|
||||
GIMP_COLOR_TAG_GRAY, FALSE,
|
||||
GIMP_HELP_CHANNEL_COLOR_TAG }
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry channels_to_selection_actions[] =
|
||||
{
|
||||
{ "channels-selection-replace", GIMP_ICON_SELECTION_REPLACE,
|
||||
NC_("channels-action", "Channel to Sele_ction"), NULL,
|
||||
NC_("channels-action", "Replace the selection with this channel"),
|
||||
GIMP_CHANNEL_OP_REPLACE, FALSE,
|
||||
GIMP_HELP_CHANNEL_SELECTION_REPLACE },
|
||||
|
||||
{ "channels-selection-add", GIMP_ICON_SELECTION_ADD,
|
||||
NC_("channels-action", "_Add to Selection"), NULL,
|
||||
NC_("channels-action", "Add this channel to the current selection"),
|
||||
GIMP_CHANNEL_OP_ADD, FALSE,
|
||||
GIMP_HELP_CHANNEL_SELECTION_ADD },
|
||||
|
||||
{ "channels-selection-subtract", GIMP_ICON_SELECTION_SUBTRACT,
|
||||
NC_("channels-action", "_Subtract from Selection"), NULL,
|
||||
NC_("channels-action", "Subtract this channel from the current selection"),
|
||||
GIMP_CHANNEL_OP_SUBTRACT, FALSE,
|
||||
GIMP_HELP_CHANNEL_SELECTION_SUBTRACT },
|
||||
|
||||
{ "channels-selection-intersect", GIMP_ICON_SELECTION_INTERSECT,
|
||||
NC_("channels-action", "_Intersect with Selection"), NULL,
|
||||
NC_("channels-action", "Intersect this channel with the current selection"),
|
||||
GIMP_CHANNEL_OP_INTERSECT, FALSE,
|
||||
GIMP_HELP_CHANNEL_SELECTION_INTERSECT }
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry channels_select_actions[] =
|
||||
{
|
||||
{ "channels-select-top", NULL,
|
||||
NC_("channels-action", "Select _Top Channel"), NULL,
|
||||
NC_("channels-action", "Select the topmost channel"),
|
||||
GIMP_ACTION_SELECT_FIRST, FALSE,
|
||||
GIMP_HELP_CHANNEL_TOP },
|
||||
|
||||
{ "channels-select-bottom", NULL,
|
||||
NC_("channels-action", "Select _Bottom Channel"), NULL,
|
||||
NC_("channels-action", "Select the bottommost channel"),
|
||||
GIMP_ACTION_SELECT_LAST, FALSE,
|
||||
GIMP_HELP_CHANNEL_BOTTOM },
|
||||
|
||||
{ "channels-select-previous", NULL,
|
||||
NC_("channels-action", "Select _Previous Channel"), NULL,
|
||||
NC_("channels-action", "Select the channel above the current channel"),
|
||||
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
|
||||
GIMP_HELP_CHANNEL_PREVIOUS },
|
||||
|
||||
{ "channels-select-next", NULL,
|
||||
NC_("channels-action", "Select _Next Channel"), NULL,
|
||||
NC_("channels-action", "Select the channel below the current channel"),
|
||||
GIMP_ACTION_SELECT_NEXT, FALSE,
|
||||
GIMP_HELP_CHANNEL_NEXT }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
channels_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "channels-action",
|
||||
channels_actions,
|
||||
G_N_ELEMENTS (channels_actions));
|
||||
|
||||
gimp_action_group_add_toggle_actions (group, "channels-action",
|
||||
channels_toggle_actions,
|
||||
G_N_ELEMENTS (channels_toggle_actions));
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "channels-action",
|
||||
channels_color_tag_actions,
|
||||
G_N_ELEMENTS (channels_color_tag_actions),
|
||||
channels_color_tag_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "channels-action",
|
||||
channels_to_selection_actions,
|
||||
G_N_ELEMENTS (channels_to_selection_actions),
|
||||
channels_to_selection_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "channels-action",
|
||||
channels_select_actions,
|
||||
G_N_ELEMENTS (channels_select_actions),
|
||||
channels_select_cmd_callback);
|
||||
|
||||
items_actions_setup (group, "channels");
|
||||
}
|
||||
|
||||
void
|
||||
channels_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image = action_data_get_image (data);
|
||||
GimpChannel *channel = NULL;
|
||||
gboolean fs = FALSE;
|
||||
gboolean component = FALSE;
|
||||
GList *next = NULL;
|
||||
GList *prev = NULL;
|
||||
|
||||
if (image)
|
||||
{
|
||||
fs = (gimp_image_get_floating_selection (image) != NULL);
|
||||
|
||||
if (GIMP_IS_COMPONENT_EDITOR (data))
|
||||
{
|
||||
if (GIMP_COMPONENT_EDITOR (data)->clicked_component != -1)
|
||||
component = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
channel = gimp_image_get_active_channel (image);
|
||||
|
||||
if (channel)
|
||||
{
|
||||
GList *channel_list;
|
||||
GList *list;
|
||||
|
||||
channel_list = gimp_item_get_container_iter (GIMP_ITEM (channel));
|
||||
|
||||
list = g_list_find (channel_list, channel);
|
||||
|
||||
if (list)
|
||||
{
|
||||
prev = g_list_previous (list);
|
||||
next = g_list_next (list);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
|
||||
SET_SENSITIVE ("channels-edit-attributes", !fs && channel);
|
||||
|
||||
SET_SENSITIVE ("channels-new", !fs && image);
|
||||
SET_SENSITIVE ("channels-new-last-values", !fs && image);
|
||||
SET_SENSITIVE ("channels-duplicate", !fs && (channel || component));
|
||||
SET_SENSITIVE ("channels-delete", !fs && channel);
|
||||
|
||||
SET_SENSITIVE ("channels-raise", !fs && channel && prev);
|
||||
SET_SENSITIVE ("channels-raise-to-top", !fs && channel && prev);
|
||||
SET_SENSITIVE ("channels-lower", !fs && channel && next);
|
||||
SET_SENSITIVE ("channels-lower-to-bottom", !fs && channel && next);
|
||||
|
||||
SET_SENSITIVE ("channels-selection-replace", !fs && (channel || component));
|
||||
SET_SENSITIVE ("channels-selection-add", !fs && (channel || component));
|
||||
SET_SENSITIVE ("channels-selection-subtract", !fs && (channel || component));
|
||||
SET_SENSITIVE ("channels-selection-intersect", !fs && (channel || component));
|
||||
|
||||
SET_SENSITIVE ("channels-select-top", !fs && channel && prev);
|
||||
SET_SENSITIVE ("channels-select-bottom", !fs && channel && next);
|
||||
SET_SENSITIVE ("channels-select-previous", !fs && channel && prev);
|
||||
SET_SENSITIVE ("channels-select-next", !fs && channel && next);
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
|
||||
items_actions_update (group, "channels", GIMP_ITEM (channel));
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __CHANNELS_ACTIONS_H__
|
||||
#define __CHANNELS_ACTIONS_H__
|
||||
|
||||
|
||||
void channels_actions_setup (GimpActionGroup *group);
|
||||
void channels_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __CHANNELS_ACTIONS_H__ */
|
|
@ -1,567 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "config/gimpdialogconfig.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpchannel.h"
|
||||
#include "core/gimpchannel-select.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpdrawable-fill.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
|
||||
#include "widgets/gimpaction.h"
|
||||
#include "widgets/gimpcolorpanel.h"
|
||||
#include "widgets/gimpcomponenteditor.h"
|
||||
#include "widgets/gimpdock.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "dialogs/dialogs.h"
|
||||
#include "dialogs/channel-options-dialog.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "channels-commands.h"
|
||||
#include "items-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
#define RGBA_EPSILON 1e-6
|
||||
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
static void channels_new_callback (GtkWidget *dialog,
|
||||
GimpImage *image,
|
||||
GimpChannel *channel,
|
||||
GimpContext *context,
|
||||
const gchar *channel_name,
|
||||
const GimpRGB *channel_color,
|
||||
gboolean save_selection,
|
||||
gboolean channel_visible,
|
||||
gboolean channel_linked,
|
||||
GimpColorTag channel_color_tag,
|
||||
gboolean channel_lock_content,
|
||||
gboolean channel_lock_position,
|
||||
gpointer user_data);
|
||||
static void channels_edit_attributes_callback (GtkWidget *dialog,
|
||||
GimpImage *image,
|
||||
GimpChannel *channel,
|
||||
GimpContext *context,
|
||||
const gchar *channel_name,
|
||||
const GimpRGB *channel_color,
|
||||
gboolean save_selection,
|
||||
gboolean channel_visible,
|
||||
gboolean channel_linked,
|
||||
GimpColorTag channel_color_tag,
|
||||
gboolean channel_lock_content,
|
||||
gboolean channel_lock_position,
|
||||
gpointer user_data);
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
channels_edit_attributes_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
GtkWidget *widget;
|
||||
GtkWidget *dialog;
|
||||
return_if_no_channel (image, channel, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
#define EDIT_DIALOG_KEY "gimp-channel-edit-attributes-dialog"
|
||||
|
||||
dialog = dialogs_get_dialog (G_OBJECT (channel), EDIT_DIALOG_KEY);
|
||||
|
||||
if (! dialog)
|
||||
{
|
||||
GimpItem *item = GIMP_ITEM (channel);
|
||||
|
||||
dialog = channel_options_dialog_new (image, channel,
|
||||
action_data_get_context (data),
|
||||
widget,
|
||||
_("Channel Attributes"),
|
||||
"gimp-channel-edit",
|
||||
GIMP_ICON_EDIT,
|
||||
_("Edit Channel Attributes"),
|
||||
GIMP_HELP_CHANNEL_EDIT,
|
||||
_("Edit Channel Color"),
|
||||
_("_Fill opacity:"),
|
||||
FALSE,
|
||||
gimp_object_get_name (channel),
|
||||
&channel->color,
|
||||
gimp_item_get_visible (item),
|
||||
gimp_item_get_linked (item),
|
||||
gimp_item_get_color_tag (item),
|
||||
gimp_item_get_lock_content (item),
|
||||
gimp_item_get_lock_position (item),
|
||||
channels_edit_attributes_callback,
|
||||
NULL);
|
||||
|
||||
dialogs_attach_dialog (G_OBJECT (channel), EDIT_DIALOG_KEY, dialog);
|
||||
}
|
||||
|
||||
gtk_window_present (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
||||
void
|
||||
channels_new_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GtkWidget *widget;
|
||||
GtkWidget *dialog;
|
||||
return_if_no_image (image, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
#define NEW_DIALOG_KEY "gimp-channel-new-dialog"
|
||||
|
||||
dialog = dialogs_get_dialog (G_OBJECT (image), NEW_DIALOG_KEY);
|
||||
|
||||
if (! dialog)
|
||||
{
|
||||
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
|
||||
|
||||
dialog = channel_options_dialog_new (image, NULL,
|
||||
action_data_get_context (data),
|
||||
widget,
|
||||
_("New Channel"),
|
||||
"gimp-channel-new",
|
||||
GIMP_ICON_CHANNEL,
|
||||
_("Create a New Channel"),
|
||||
GIMP_HELP_CHANNEL_NEW,
|
||||
_("New Channel Color"),
|
||||
_("_Fill opacity:"),
|
||||
TRUE,
|
||||
config->channel_new_name,
|
||||
&config->channel_new_color,
|
||||
TRUE,
|
||||
FALSE,
|
||||
GIMP_COLOR_TAG_NONE,
|
||||
FALSE,
|
||||
FALSE,
|
||||
channels_new_callback,
|
||||
NULL);
|
||||
|
||||
dialogs_attach_dialog (G_OBJECT (image), NEW_DIALOG_KEY, dialog);
|
||||
}
|
||||
|
||||
gtk_window_present (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
||||
void
|
||||
channels_new_last_vals_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
GimpDialogConfig *config;
|
||||
return_if_no_image (image, data);
|
||||
|
||||
config = GIMP_DIALOG_CONFIG (image->gimp->config);
|
||||
|
||||
channel = gimp_channel_new (image,
|
||||
gimp_image_get_width (image),
|
||||
gimp_image_get_height (image),
|
||||
config->channel_new_name,
|
||||
&config->channel_new_color);
|
||||
|
||||
gimp_drawable_fill (GIMP_DRAWABLE (channel),
|
||||
action_data_get_context (data),
|
||||
GIMP_FILL_TRANSPARENT);
|
||||
|
||||
gimp_image_add_channel (image, channel,
|
||||
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
void
|
||||
channels_raise_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
gimp_image_raise_item (image, GIMP_ITEM (channel), NULL);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
void
|
||||
channels_raise_to_top_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
gimp_image_raise_item_to_top (image, GIMP_ITEM (channel));
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
void
|
||||
channels_lower_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
gimp_image_lower_item (image, GIMP_ITEM (channel), NULL);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
void
|
||||
channels_lower_to_bottom_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
gimp_image_lower_item_to_bottom (image, GIMP_ITEM (channel));
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
void
|
||||
channels_duplicate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *new_channel;
|
||||
GimpChannel *parent = GIMP_IMAGE_ACTIVE_PARENT;
|
||||
|
||||
if (GIMP_IS_COMPONENT_EDITOR (data))
|
||||
{
|
||||
GimpChannelType component;
|
||||
const gchar *desc;
|
||||
gchar *name;
|
||||
return_if_no_image (image, data);
|
||||
|
||||
component = GIMP_COMPONENT_EDITOR (data)->clicked_component;
|
||||
|
||||
gimp_enum_get_value (GIMP_TYPE_CHANNEL_TYPE, component,
|
||||
NULL, NULL, &desc, NULL);
|
||||
|
||||
name = g_strdup_printf (_("%s Channel Copy"), desc);
|
||||
|
||||
new_channel = gimp_channel_new_from_component (image, component,
|
||||
name, NULL);
|
||||
|
||||
/* copied components are invisible by default so subsequent copies
|
||||
* of components don't affect each other
|
||||
*/
|
||||
gimp_item_set_visible (GIMP_ITEM (new_channel), FALSE, FALSE);
|
||||
|
||||
g_free (name);
|
||||
}
|
||||
else
|
||||
{
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
new_channel =
|
||||
GIMP_CHANNEL (gimp_item_duplicate (GIMP_ITEM (channel),
|
||||
G_TYPE_FROM_INSTANCE (channel)));
|
||||
|
||||
/* use the actual parent here, not GIMP_IMAGE_ACTIVE_PARENT because
|
||||
* the latter would add a duplicated group inside itself instead of
|
||||
* above it
|
||||
*/
|
||||
parent = gimp_channel_get_parent (channel);
|
||||
}
|
||||
|
||||
gimp_image_add_channel (image, new_channel, parent, -1, TRUE);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
void
|
||||
channels_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
gimp_image_remove_channel (image, channel, TRUE, NULL);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
void
|
||||
channels_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpChannelOps op;
|
||||
GimpImage *image;
|
||||
|
||||
op = (GimpChannelOps) g_variant_get_int32 (value);
|
||||
|
||||
if (GIMP_IS_COMPONENT_EDITOR (data))
|
||||
{
|
||||
GimpChannelType component;
|
||||
return_if_no_image (image, data);
|
||||
|
||||
component = GIMP_COMPONENT_EDITOR (data)->clicked_component;
|
||||
|
||||
gimp_channel_select_component (gimp_image_get_mask (image), component,
|
||||
op, FALSE, 0.0, 0.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
gimp_item_to_selection (GIMP_ITEM (channel),
|
||||
op, TRUE, FALSE, 0.0, 0.0);
|
||||
}
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
void
|
||||
channels_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
items_visible_cmd_callback (action, value, image, GIMP_ITEM (channel));
|
||||
}
|
||||
|
||||
void
|
||||
channels_linked_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
items_linked_cmd_callback (action, value, image, GIMP_ITEM (channel));
|
||||
}
|
||||
|
||||
void
|
||||
channels_lock_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
items_lock_content_cmd_callback (action, value, image, GIMP_ITEM (channel));
|
||||
}
|
||||
|
||||
void
|
||||
channels_lock_position_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
items_lock_position_cmd_callback (action, value, image, GIMP_ITEM (channel));
|
||||
}
|
||||
|
||||
void
|
||||
channels_color_tag_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
GimpColorTag color_tag;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
color_tag = (GimpColorTag) g_variant_get_int32 (value);
|
||||
|
||||
items_color_tag_cmd_callback (action, image, GIMP_ITEM (channel),
|
||||
color_tag);
|
||||
}
|
||||
|
||||
void
|
||||
channels_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *channel;
|
||||
GimpChannel *channel2;
|
||||
GimpContainer *container;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
container = gimp_image_get_channels (image);
|
||||
channel2 = (GimpChannel *) action_select_object (select_type, container,
|
||||
(GimpObject *) channel);
|
||||
|
||||
if (channel2 && channel2 != channel)
|
||||
{
|
||||
gimp_image_set_active_channel (image, channel2);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
}
|
||||
|
||||
/* private functions */
|
||||
|
||||
static void
|
||||
channels_new_callback (GtkWidget *dialog,
|
||||
GimpImage *image,
|
||||
GimpChannel *channel,
|
||||
GimpContext *context,
|
||||
const gchar *channel_name,
|
||||
const GimpRGB *channel_color,
|
||||
gboolean save_selection,
|
||||
gboolean channel_visible,
|
||||
gboolean channel_linked,
|
||||
GimpColorTag channel_color_tag,
|
||||
gboolean channel_lock_content,
|
||||
gboolean channel_lock_position,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
|
||||
|
||||
g_object_set (config,
|
||||
"channel-new-name", channel_name,
|
||||
"channel-new-color", channel_color,
|
||||
NULL);
|
||||
|
||||
if (save_selection)
|
||||
{
|
||||
GimpChannel *selection = gimp_image_get_mask (image);
|
||||
|
||||
channel = GIMP_CHANNEL (gimp_item_duplicate (GIMP_ITEM (selection),
|
||||
GIMP_TYPE_CHANNEL));
|
||||
|
||||
gimp_object_set_name (GIMP_OBJECT (channel),
|
||||
config->channel_new_name);
|
||||
gimp_channel_set_color (channel, &config->channel_new_color, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
channel = gimp_channel_new (image,
|
||||
gimp_image_get_width (image),
|
||||
gimp_image_get_height (image),
|
||||
config->channel_new_name,
|
||||
&config->channel_new_color);
|
||||
|
||||
gimp_drawable_fill (GIMP_DRAWABLE (channel), context,
|
||||
GIMP_FILL_TRANSPARENT);
|
||||
}
|
||||
|
||||
gimp_item_set_visible (GIMP_ITEM (channel), channel_visible, FALSE);
|
||||
gimp_item_set_linked (GIMP_ITEM (channel), channel_linked, FALSE);
|
||||
gimp_item_set_color_tag (GIMP_ITEM (channel), channel_color_tag, FALSE);
|
||||
gimp_item_set_lock_content (GIMP_ITEM (channel), channel_lock_content, FALSE);
|
||||
gimp_item_set_lock_position (GIMP_ITEM (channel), channel_lock_position, FALSE);
|
||||
|
||||
gimp_image_add_channel (image, channel,
|
||||
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
|
||||
gimp_image_flush (image);
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
channels_edit_attributes_callback (GtkWidget *dialog,
|
||||
GimpImage *image,
|
||||
GimpChannel *channel,
|
||||
GimpContext *context,
|
||||
const gchar *channel_name,
|
||||
const GimpRGB *channel_color,
|
||||
gboolean save_selection,
|
||||
gboolean channel_visible,
|
||||
gboolean channel_linked,
|
||||
GimpColorTag channel_color_tag,
|
||||
gboolean channel_lock_content,
|
||||
gboolean channel_lock_position,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpItem *item = GIMP_ITEM (channel);
|
||||
|
||||
if (strcmp (channel_name, gimp_object_get_name (channel)) ||
|
||||
gimp_rgba_distance (channel_color, &channel->color) > RGBA_EPSILON ||
|
||||
channel_visible != gimp_item_get_visible (item) ||
|
||||
channel_linked != gimp_item_get_linked (item) ||
|
||||
channel_color_tag != gimp_item_get_color_tag (item) ||
|
||||
channel_lock_content != gimp_item_get_lock_content (item) ||
|
||||
channel_lock_position != gimp_item_get_lock_position (item))
|
||||
{
|
||||
gimp_image_undo_group_start (image,
|
||||
GIMP_UNDO_GROUP_ITEM_PROPERTIES,
|
||||
_("Channel Attributes"));
|
||||
|
||||
if (strcmp (channel_name, gimp_object_get_name (channel)))
|
||||
gimp_item_rename (GIMP_ITEM (channel), channel_name, NULL);
|
||||
|
||||
if (gimp_rgba_distance (channel_color, &channel->color) > RGBA_EPSILON)
|
||||
gimp_channel_set_color (channel, channel_color, TRUE);
|
||||
|
||||
if (channel_visible != gimp_item_get_visible (item))
|
||||
gimp_item_set_visible (item, channel_visible, TRUE);
|
||||
|
||||
if (channel_linked != gimp_item_get_linked (item))
|
||||
gimp_item_set_linked (item, channel_linked, TRUE);
|
||||
|
||||
if (channel_color_tag != gimp_item_get_color_tag (item))
|
||||
gimp_item_set_color_tag (item, channel_color_tag, TRUE);
|
||||
|
||||
if (channel_lock_content != gimp_item_get_lock_content (item))
|
||||
gimp_item_set_lock_content (item, channel_lock_content, TRUE);
|
||||
|
||||
if (channel_lock_position != gimp_item_get_lock_position (item))
|
||||
gimp_item_set_lock_position (item, channel_lock_position, TRUE);
|
||||
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
|
@ -1,77 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __CHANNELS_COMMANDS_H__
|
||||
#define __CHANNELS_COMMANDS_H__
|
||||
|
||||
|
||||
void channels_edit_attributes_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_new_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_new_last_vals_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void channels_raise_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_raise_to_top_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_lower_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_lower_to_bottom_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void channels_duplicate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void channels_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_linked_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_lock_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void channels_lock_position_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void channels_color_tag_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void channels_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __CHANNELS_COMMANDS_H__ */
|
|
@ -1,173 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-colormap.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "colormap-actions.h"
|
||||
#include "colormap-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry colormap_actions[] =
|
||||
{
|
||||
{ "colormap-popup", GIMP_ICON_COLORMAP,
|
||||
NC_("colormap-action", "Colormap Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_INDEXED_PALETTE_DIALOG },
|
||||
|
||||
{ "colormap-edit-color", GIMP_ICON_EDIT,
|
||||
NC_("colormap-action", "_Edit Color..."), NULL,
|
||||
NC_("colormap-action", "Edit this color"),
|
||||
colormap_edit_color_cmd_callback,
|
||||
GIMP_HELP_INDEXED_PALETTE_EDIT }
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry colormap_add_color_actions[] =
|
||||
{
|
||||
{ "colormap-add-color-from-fg", GIMP_ICON_LIST_ADD,
|
||||
NC_("colormap-action", "_Add Color from FG"), "",
|
||||
NC_("colormap-action", "Add current foreground color"),
|
||||
FALSE, FALSE,
|
||||
GIMP_HELP_INDEXED_PALETTE_ADD },
|
||||
|
||||
{ "colormap-add-color-from-bg", GIMP_ICON_LIST_ADD,
|
||||
NC_("colormap-action", "_Add Color from BG"), "",
|
||||
NC_("colormap-action", "Add current background color"),
|
||||
TRUE, FALSE,
|
||||
GIMP_HELP_INDEXED_PALETTE_ADD }
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry colormap_to_selection_actions[] =
|
||||
{
|
||||
{ "colormap-selection-replace", GIMP_ICON_SELECTION_REPLACE,
|
||||
NC_("colormap-action", "_Select this Color"), NULL,
|
||||
NC_("colormap-action", "Select all pixels with this color"),
|
||||
GIMP_CHANNEL_OP_REPLACE, FALSE,
|
||||
GIMP_HELP_INDEXED_PALETTE_SELECTION_REPLACE },
|
||||
|
||||
{ "colormap-selection-add", GIMP_ICON_SELECTION_ADD,
|
||||
NC_("colormap-action", "_Add to Selection"), NULL,
|
||||
NC_("colormap-action", "Add all pixels with this color to the current selection"),
|
||||
GIMP_CHANNEL_OP_ADD, FALSE,
|
||||
GIMP_HELP_INDEXED_PALETTE_SELECTION_ADD },
|
||||
|
||||
{ "colormap-selection-subtract", GIMP_ICON_SELECTION_SUBTRACT,
|
||||
NC_("colormap-action", "_Subtract from Selection"), NULL,
|
||||
NC_("colormap-action", "Subtract all pixels with this color from the current selection"),
|
||||
GIMP_CHANNEL_OP_SUBTRACT, FALSE,
|
||||
GIMP_HELP_INDEXED_PALETTE_SELECTION_SUBTRACT },
|
||||
|
||||
{ "colormap-selection-intersect", GIMP_ICON_SELECTION_INTERSECT,
|
||||
NC_("colormap-action", "_Intersect with Selection"), NULL,
|
||||
NC_("colormap-action", "Intersect all pixels with this color with the current selection"),
|
||||
GIMP_CHANNEL_OP_INTERSECT, FALSE,
|
||||
GIMP_HELP_INDEXED_PALETTE_SELECTION_INTERSECT }
|
||||
};
|
||||
|
||||
void
|
||||
colormap_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "colormap-action",
|
||||
colormap_actions,
|
||||
G_N_ELEMENTS (colormap_actions));
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "colormap-action",
|
||||
colormap_add_color_actions,
|
||||
G_N_ELEMENTS (colormap_add_color_actions),
|
||||
colormap_add_color_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "colormap-action",
|
||||
colormap_to_selection_actions,
|
||||
G_N_ELEMENTS (colormap_to_selection_actions),
|
||||
colormap_to_selection_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
colormap_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image = action_data_get_image (data);
|
||||
GimpContext *context = action_data_get_context (data);
|
||||
gboolean indexed = FALSE;
|
||||
gboolean drawable_indexed = FALSE;
|
||||
gint num_colors = 0;
|
||||
GimpRGB fg;
|
||||
GimpRGB bg;
|
||||
|
||||
if (image)
|
||||
{
|
||||
indexed = (gimp_image_get_base_type (image) == GIMP_INDEXED);
|
||||
|
||||
if (indexed)
|
||||
{
|
||||
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
num_colors = gimp_image_get_colormap_size (image);
|
||||
drawable_indexed = gimp_drawable_is_indexed (drawable);
|
||||
}
|
||||
}
|
||||
|
||||
if (context)
|
||||
{
|
||||
gimp_context_get_foreground (context, &fg);
|
||||
gimp_context_get_background (context, &bg);
|
||||
}
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
#define SET_COLOR(action,color) \
|
||||
gimp_action_group_set_action_color (group, action, color, FALSE);
|
||||
|
||||
SET_SENSITIVE ("colormap-edit-color",
|
||||
indexed && num_colors > 0);
|
||||
|
||||
SET_SENSITIVE ("colormap-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
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __COLORMAP_ACTIONS_H__
|
||||
#define __COLORMAP_ACTIONS_H__
|
||||
|
||||
|
||||
void colormap_actions_setup (GimpActionGroup *group);
|
||||
void colormap_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __COLORMAP_ACTIONS_H__ */
|
|
@ -1,96 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimpchannel-select.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-colormap.h"
|
||||
|
||||
#include "widgets/gimpcolormapeditor.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "colormap-commands.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
colormap_edit_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpColormapEditor *editor = GIMP_COLORMAP_EDITOR (data);
|
||||
|
||||
gimp_colormap_editor_edit_color (editor);
|
||||
}
|
||||
|
||||
void
|
||||
colormap_add_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpImage *image;
|
||||
gboolean background;
|
||||
return_if_no_context (context, data);
|
||||
return_if_no_image (image, data);
|
||||
|
||||
background = (gboolean) g_variant_get_int32 (value);
|
||||
|
||||
if (gimp_image_get_colormap_size (image) < 256)
|
||||
{
|
||||
GimpRGB color;
|
||||
|
||||
if (background)
|
||||
gimp_context_get_background (context, &color);
|
||||
else
|
||||
gimp_context_get_foreground (context, &color);
|
||||
|
||||
gimp_image_add_colormap_entry (image, &color);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
colormap_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpColormapEditor *editor;
|
||||
GimpImage *image;
|
||||
GimpChannelOps op;
|
||||
return_if_no_image (image, data);
|
||||
|
||||
editor = GIMP_COLORMAP_EDITOR (data);
|
||||
|
||||
op = (GimpChannelOps) g_variant_get_int32 (value);
|
||||
|
||||
gimp_channel_select_by_index (gimp_image_get_mask (image),
|
||||
gimp_image_get_active_drawable (image),
|
||||
editor->col_index,
|
||||
op,
|
||||
FALSE, 0.0, 0.0);
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __COLORMAP_COMMANDS_H__
|
||||
#define __COLORMAP_COMMANDS_H__
|
||||
|
||||
|
||||
void colormap_edit_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void colormap_add_color_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void colormap_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __COLORMAP_COMMANDS_H__ */
|
File diff suppressed because it is too large
Load Diff
|
@ -1,27 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __CONTEXT_ACTIONS_H__
|
||||
#define __CONTEXT_ACTIONS_H__
|
||||
|
||||
|
||||
void context_actions_setup (GimpActionGroup *group);
|
||||
void context_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __CONTEXT_ACTIONS_H__ */
|
|
@ -1,975 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "operations/layer-modes/gimp-layer-modes.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpbrushgenerated.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpdatafactory.h"
|
||||
#include "core/gimplist.h"
|
||||
#include "core/gimptoolinfo.h"
|
||||
|
||||
#include "paint/gimppaintoptions.h"
|
||||
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpsessioninfo.h"
|
||||
#include "widgets/gimppaletteeditor.h"
|
||||
#include "widgets/gimpcolormapeditor.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "context-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
static void context_select_object (GimpActionSelectType select_type,
|
||||
GimpContext *context,
|
||||
GimpContainer *container);
|
||||
static gint context_paint_mode_index (GimpLayerMode paint_mode,
|
||||
const GimpLayerMode *modes,
|
||||
gint n_modes);
|
||||
|
||||
static void context_select_color (GimpActionSelectType select_type,
|
||||
GimpRGB *color,
|
||||
gboolean use_colormap,
|
||||
gboolean use_palette);
|
||||
|
||||
static gint context_get_color_index (gboolean use_colormap,
|
||||
gboolean use_palette,
|
||||
const GimpRGB *color);
|
||||
static gint context_max_color_index (gboolean use_colormap,
|
||||
gboolean use_palette);
|
||||
static gboolean context_set_color_index (gint index,
|
||||
gboolean use_colormap,
|
||||
gboolean use_palette,
|
||||
GimpRGB *color);
|
||||
|
||||
static GimpPaletteEditor * context_get_palette_editor (void);
|
||||
static GimpColormapEditor * context_get_colormap_editor (void);
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
context_colors_default_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
gimp_context_set_default_colors (context);
|
||||
}
|
||||
|
||||
void
|
||||
context_colors_swap_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
gimp_context_swap_colors (context);
|
||||
}
|
||||
|
||||
#define SELECT_COLOR_CMD_CALLBACK(name, fgbg, use_colormap, use_palette) \
|
||||
void \
|
||||
context_##name##_##fgbg##ground_cmd_callback (GimpAction *action, \
|
||||
GVariant *value, \
|
||||
gpointer data) \
|
||||
{ \
|
||||
GimpContext *context; \
|
||||
GimpRGB color; \
|
||||
GimpActionSelectType select_type; \
|
||||
return_if_no_context (context, data); \
|
||||
\
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value); \
|
||||
\
|
||||
gimp_context_get_##fgbg##ground (context, &color); \
|
||||
context_select_color (select_type, &color, \
|
||||
use_colormap, use_palette); \
|
||||
gimp_context_set_##fgbg##ground (context, &color); \
|
||||
}
|
||||
|
||||
SELECT_COLOR_CMD_CALLBACK (palette, fore, FALSE, TRUE)
|
||||
SELECT_COLOR_CMD_CALLBACK (palette, back, FALSE, TRUE)
|
||||
SELECT_COLOR_CMD_CALLBACK (colormap, fore, TRUE, FALSE)
|
||||
SELECT_COLOR_CMD_CALLBACK (colormap, back, TRUE, FALSE)
|
||||
SELECT_COLOR_CMD_CALLBACK (swatch, fore, TRUE, TRUE)
|
||||
SELECT_COLOR_CMD_CALLBACK (swatch, back, TRUE, TRUE)
|
||||
|
||||
void
|
||||
context_foreground_red_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_foreground (context, &color);
|
||||
color.r = action_select_value (select_type,
|
||||
color.r,
|
||||
0.0, 1.0, 1.0,
|
||||
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
|
||||
gimp_context_set_foreground (context, &color);
|
||||
}
|
||||
|
||||
void
|
||||
context_foreground_green_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_foreground (context, &color);
|
||||
color.g = action_select_value (select_type,
|
||||
color.g,
|
||||
0.0, 1.0, 1.0,
|
||||
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
|
||||
gimp_context_set_foreground (context, &color);
|
||||
}
|
||||
|
||||
void
|
||||
context_foreground_blue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_foreground (context, &color);
|
||||
color.b = action_select_value (select_type,
|
||||
color.b,
|
||||
0.0, 1.0, 1.0,
|
||||
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
|
||||
gimp_context_set_foreground (context, &color);
|
||||
}
|
||||
|
||||
void
|
||||
context_background_red_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_background (context, &color);
|
||||
color.r = action_select_value (select_type,
|
||||
color.r,
|
||||
0.0, 1.0, 1.0,
|
||||
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
|
||||
gimp_context_set_background (context, &color);
|
||||
}
|
||||
|
||||
void
|
||||
context_background_green_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_background (context, &color);
|
||||
color.g = action_select_value (select_type,
|
||||
color.g,
|
||||
0.0, 1.0, 1.0,
|
||||
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
|
||||
gimp_context_set_background (context, &color);
|
||||
}
|
||||
|
||||
void
|
||||
context_background_blue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_background (context, &color);
|
||||
color.b = action_select_value (select_type,
|
||||
color.b,
|
||||
0.0, 1.0, 1.0,
|
||||
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
|
||||
gimp_context_set_background (context, &color);
|
||||
}
|
||||
|
||||
void
|
||||
context_foreground_hue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpHSV hsv;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_foreground (context, &color);
|
||||
gimp_rgb_to_hsv (&color, &hsv);
|
||||
hsv.h = action_select_value (select_type,
|
||||
hsv.h,
|
||||
0.0, 1.0, 1.0,
|
||||
1.0 / 360.0, 0.01, 0.1, 0.0, FALSE);
|
||||
gimp_hsv_to_rgb (&hsv, &color);
|
||||
gimp_context_set_foreground (context, &color);
|
||||
}
|
||||
|
||||
void
|
||||
context_foreground_saturation_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpHSV hsv;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_foreground (context, &color);
|
||||
gimp_rgb_to_hsv (&color, &hsv);
|
||||
hsv.s = action_select_value (select_type,
|
||||
hsv.s,
|
||||
0.0, 1.0, 1.0,
|
||||
0.01, 0.01, 0.1, 0.0, FALSE);
|
||||
gimp_hsv_to_rgb (&hsv, &color);
|
||||
gimp_context_set_foreground (context, &color);
|
||||
}
|
||||
|
||||
void
|
||||
context_foreground_value_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpHSV hsv;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_foreground (context, &color);
|
||||
gimp_rgb_to_hsv (&color, &hsv);
|
||||
hsv.v = action_select_value (select_type,
|
||||
hsv.v,
|
||||
0.0, 1.0, 1.0,
|
||||
0.01, 0.01, 0.1, 0.0, FALSE);
|
||||
gimp_hsv_to_rgb (&hsv, &color);
|
||||
gimp_context_set_foreground (context, &color);
|
||||
}
|
||||
|
||||
void
|
||||
context_background_hue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpHSV hsv;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_background (context, &color);
|
||||
gimp_rgb_to_hsv (&color, &hsv);
|
||||
hsv.h = action_select_value (select_type,
|
||||
hsv.h,
|
||||
0.0, 1.0, 1.0,
|
||||
1.0 / 360.0, 0.01, 0.1, 0.0, FALSE);
|
||||
gimp_hsv_to_rgb (&hsv, &color);
|
||||
gimp_context_set_background (context, &color);
|
||||
}
|
||||
|
||||
void
|
||||
context_background_saturation_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpHSV hsv;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_background (context, &color);
|
||||
gimp_rgb_to_hsv (&color, &hsv);
|
||||
hsv.s = action_select_value (select_type,
|
||||
hsv.s,
|
||||
0.0, 1.0, 1.0,
|
||||
0.01, 0.01, 0.1, 0.0, FALSE);
|
||||
gimp_hsv_to_rgb (&hsv, &color);
|
||||
gimp_context_set_background (context, &color);
|
||||
}
|
||||
|
||||
void
|
||||
context_background_value_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpRGB color;
|
||||
GimpHSV hsv;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
gimp_context_get_background (context, &color);
|
||||
gimp_rgb_to_hsv (&color, &hsv);
|
||||
hsv.v = action_select_value (select_type,
|
||||
hsv.v,
|
||||
0.0, 1.0, 1.0,
|
||||
0.01, 0.01, 0.1, 0.0, FALSE);
|
||||
gimp_hsv_to_rgb (&hsv, &color);
|
||||
gimp_context_set_background (context, &color);
|
||||
}
|
||||
|
||||
void
|
||||
context_opacity_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpToolInfo *tool_info;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
tool_info = gimp_context_get_tool (context);
|
||||
|
||||
if (tool_info && GIMP_IS_TOOL_OPTIONS (tool_info->tool_options))
|
||||
{
|
||||
action_select_property (select_type,
|
||||
action_data_get_display (data),
|
||||
G_OBJECT (tool_info->tool_options),
|
||||
"opacity",
|
||||
1.0 / 255.0, 0.01, 0.1, 0.1, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
context_paint_mode_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpToolInfo *tool_info;
|
||||
GimpLayerMode *modes;
|
||||
gint n_modes;
|
||||
GimpLayerMode paint_mode;
|
||||
gint index;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
paint_mode = gimp_context_get_paint_mode (context);
|
||||
|
||||
modes = gimp_layer_mode_get_context_array (paint_mode,
|
||||
GIMP_LAYER_MODE_CONTEXT_PAINT,
|
||||
&n_modes);
|
||||
index = context_paint_mode_index (paint_mode, modes, n_modes);
|
||||
index = action_select_value (select_type,
|
||||
index, 0, n_modes - 1, 0,
|
||||
0.0, 1.0, 1.0, 0.0, FALSE);
|
||||
paint_mode = modes[index];
|
||||
g_free (modes);
|
||||
|
||||
gimp_context_set_paint_mode (context, paint_mode);
|
||||
|
||||
tool_info = gimp_context_get_tool (context);
|
||||
|
||||
if (tool_info && GIMP_IS_TOOL_OPTIONS (tool_info->tool_options))
|
||||
{
|
||||
GimpDisplay *display;
|
||||
const char *value_desc;
|
||||
|
||||
gimp_enum_get_value (GIMP_TYPE_LAYER_MODE, paint_mode,
|
||||
NULL, NULL, &value_desc, NULL);
|
||||
|
||||
display = action_data_get_display (data);
|
||||
|
||||
if (value_desc && display)
|
||||
{
|
||||
action_message (display, G_OBJECT (tool_info->tool_options),
|
||||
_("Paint Mode: %s"), value_desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
context_tool_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
context_select_object (select_type,
|
||||
context, context->gimp->tool_info_list);
|
||||
}
|
||||
|
||||
void
|
||||
context_brush_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
context_select_object (select_type,
|
||||
context,
|
||||
gimp_data_factory_get_container (context->gimp->brush_factory));
|
||||
}
|
||||
|
||||
void
|
||||
context_pattern_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
context_select_object (select_type,
|
||||
context,
|
||||
gimp_data_factory_get_container (context->gimp->pattern_factory));
|
||||
}
|
||||
|
||||
void
|
||||
context_palette_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
context_select_object (select_type,
|
||||
context,
|
||||
gimp_data_factory_get_container (context->gimp->palette_factory));
|
||||
}
|
||||
|
||||
void
|
||||
context_gradient_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
context_select_object (select_type,
|
||||
context,
|
||||
gimp_data_factory_get_container (context->gimp->gradient_factory));
|
||||
}
|
||||
|
||||
void
|
||||
context_font_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
context_select_object (select_type,
|
||||
context,
|
||||
gimp_data_factory_get_container (context->gimp->font_factory));
|
||||
}
|
||||
|
||||
void
|
||||
context_brush_spacing_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH (brush) && gimp_data_is_writable (GIMP_DATA (brush)))
|
||||
{
|
||||
action_select_property (select_type,
|
||||
action_data_get_display (data),
|
||||
G_OBJECT (brush),
|
||||
"spacing",
|
||||
1.0, 5.0, 20.0, 0.1, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
context_brush_shape_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpBrushGeneratedShape shape;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
shape = (GimpBrushGeneratedShape) g_variant_get_int32 (value);
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) &&
|
||||
gimp_data_is_writable (GIMP_DATA (brush)))
|
||||
{
|
||||
GimpBrushGenerated *generated = GIMP_BRUSH_GENERATED (brush);
|
||||
GimpDisplay *display;
|
||||
const char *value_desc;
|
||||
|
||||
gimp_brush_generated_set_shape (generated, shape);
|
||||
|
||||
gimp_enum_get_value (GIMP_TYPE_BRUSH_GENERATED_SHAPE, shape,
|
||||
NULL, NULL, &value_desc, NULL);
|
||||
display = action_data_get_display (data);
|
||||
|
||||
if (value_desc && display)
|
||||
{
|
||||
action_message (display, G_OBJECT (brush),
|
||||
_("Brush Shape: %s"), value_desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
context_brush_radius_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) &&
|
||||
gimp_data_is_writable (GIMP_DATA (brush)))
|
||||
{
|
||||
GimpBrushGenerated *generated = GIMP_BRUSH_GENERATED (brush);
|
||||
GimpDisplay *display;
|
||||
gdouble radius;
|
||||
gdouble min_radius;
|
||||
|
||||
radius = gimp_brush_generated_get_radius (generated);
|
||||
|
||||
/* If the user uses a high precision radius adjustment command
|
||||
* then we allow a minimum radius of 0.1 px, otherwise we set the
|
||||
* minimum radius to 1.0 px and adjust the radius to 1.0 px if it
|
||||
* is less than 1.0 px. This prevents irritating 0.1, 1.1, 2.1 etc
|
||||
* radius sequences when 1.0 px steps are used.
|
||||
*/
|
||||
switch (select_type)
|
||||
{
|
||||
case GIMP_ACTION_SELECT_SMALL_PREVIOUS:
|
||||
case GIMP_ACTION_SELECT_SMALL_NEXT:
|
||||
case GIMP_ACTION_SELECT_PERCENT_PREVIOUS:
|
||||
case GIMP_ACTION_SELECT_PERCENT_NEXT:
|
||||
min_radius = 0.1;
|
||||
break;
|
||||
|
||||
default:
|
||||
min_radius = 1.0;
|
||||
|
||||
if (radius < 1.0)
|
||||
radius = 1.0;
|
||||
break;
|
||||
}
|
||||
|
||||
radius = action_select_value (select_type,
|
||||
radius,
|
||||
min_radius, 4000.0, min_radius,
|
||||
0.1, 1.0, 10.0, 0.05, FALSE);
|
||||
gimp_brush_generated_set_radius (generated, radius);
|
||||
|
||||
display = action_data_get_display (data);
|
||||
|
||||
if (display)
|
||||
{
|
||||
action_message (action_data_get_display (data), G_OBJECT (brush),
|
||||
_("Brush Radius: %2.2f"), radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
context_brush_spikes_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) &&
|
||||
gimp_data_is_writable (GIMP_DATA (brush)))
|
||||
{
|
||||
action_select_property (select_type,
|
||||
action_data_get_display (data),
|
||||
G_OBJECT (brush),
|
||||
"spikes",
|
||||
0.0, 1.0, 4.0, 0.1, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
context_brush_hardness_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) &&
|
||||
gimp_data_is_writable (GIMP_DATA (brush)))
|
||||
{
|
||||
action_select_property (select_type,
|
||||
action_data_get_display (data),
|
||||
G_OBJECT (brush),
|
||||
"hardness",
|
||||
0.001, 0.01, 0.1, 0.1, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
context_brush_aspect_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) &&
|
||||
gimp_data_is_writable (GIMP_DATA (brush)))
|
||||
{
|
||||
action_select_property (select_type,
|
||||
action_data_get_display (data),
|
||||
G_OBJECT (brush),
|
||||
"aspect-ratio",
|
||||
0.1, 1.0, 4.0, 0.1, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
context_brush_angle_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
GimpActionSelectType select_type;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
select_type = (GimpActionSelectType) g_variant_get_int32 (value);
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) &&
|
||||
gimp_data_is_writable (GIMP_DATA (brush)))
|
||||
{
|
||||
GimpBrushGenerated *generated = GIMP_BRUSH_GENERATED (brush);
|
||||
GimpDisplay *display;
|
||||
gdouble angle;
|
||||
|
||||
angle = gimp_brush_generated_get_angle (generated);
|
||||
|
||||
if (select_type == GIMP_ACTION_SELECT_FIRST)
|
||||
angle = 0.0;
|
||||
else if (select_type == GIMP_ACTION_SELECT_LAST)
|
||||
angle = 90.0;
|
||||
else
|
||||
angle = action_select_value (select_type,
|
||||
angle,
|
||||
0.0, 180.0, 0.0,
|
||||
0.1, 1.0, 15.0, 0.1, TRUE);
|
||||
|
||||
gimp_brush_generated_set_angle (generated, angle);
|
||||
|
||||
display = action_data_get_display (data);
|
||||
|
||||
if (display)
|
||||
{
|
||||
action_message (action_data_get_display (data), G_OBJECT (brush),
|
||||
_("Brush Angle: %2.2f"), angle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static void
|
||||
context_select_object (GimpActionSelectType select_type,
|
||||
GimpContext *context,
|
||||
GimpContainer *container)
|
||||
{
|
||||
GimpObject *current;
|
||||
|
||||
current =
|
||||
gimp_context_get_by_type (context,
|
||||
gimp_container_get_children_type (container));
|
||||
|
||||
current = action_select_object (select_type, container, current);
|
||||
|
||||
if (current)
|
||||
gimp_context_set_by_type (context,
|
||||
gimp_container_get_children_type (container),
|
||||
current);
|
||||
}
|
||||
|
||||
static gint
|
||||
context_paint_mode_index (GimpLayerMode paint_mode,
|
||||
const GimpLayerMode *modes,
|
||||
gint n_modes)
|
||||
{
|
||||
gint i = 0;
|
||||
|
||||
while (i < (n_modes - 1) && modes[i] != paint_mode)
|
||||
i++;
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
static void
|
||||
context_select_color (GimpActionSelectType select_type,
|
||||
GimpRGB *color,
|
||||
gboolean use_colormap,
|
||||
gboolean use_palette)
|
||||
{
|
||||
gint index;
|
||||
gint max;
|
||||
|
||||
index = context_get_color_index (use_colormap, use_palette, color);
|
||||
max = context_max_color_index (use_colormap, use_palette);
|
||||
|
||||
index = action_select_value (select_type,
|
||||
index,
|
||||
0, max, 0,
|
||||
0, 1, 4, 0, FALSE);
|
||||
|
||||
context_set_color_index (index, use_colormap, use_palette, color);
|
||||
}
|
||||
|
||||
static gint
|
||||
context_get_color_index (gboolean use_colormap,
|
||||
gboolean use_palette,
|
||||
const GimpRGB *color)
|
||||
{
|
||||
if (use_colormap)
|
||||
{
|
||||
GimpColormapEditor *editor = context_get_colormap_editor ();
|
||||
|
||||
if (editor)
|
||||
{
|
||||
gint index = gimp_colormap_editor_get_index (editor, color);
|
||||
|
||||
if (index != -1)
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
if (use_palette)
|
||||
{
|
||||
GimpPaletteEditor *editor = context_get_palette_editor ();
|
||||
|
||||
if (editor)
|
||||
{
|
||||
gint index = gimp_palette_editor_get_index (editor, color);
|
||||
|
||||
if (index != -1)
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static gint
|
||||
context_max_color_index (gboolean use_colormap,
|
||||
gboolean use_palette)
|
||||
{
|
||||
if (use_colormap)
|
||||
{
|
||||
GimpColormapEditor *editor = context_get_colormap_editor ();
|
||||
|
||||
if (editor)
|
||||
{
|
||||
gint index = gimp_colormap_editor_max_index (editor);
|
||||
|
||||
if (index != -1)
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
if (use_palette)
|
||||
{
|
||||
GimpPaletteEditor *editor = context_get_palette_editor ();
|
||||
|
||||
if (editor)
|
||||
{
|
||||
gint index = gimp_palette_editor_max_index (editor);
|
||||
|
||||
if (index != -1)
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
context_set_color_index (gint index,
|
||||
gboolean use_colormap,
|
||||
gboolean use_palette,
|
||||
GimpRGB *color)
|
||||
{
|
||||
if (use_colormap)
|
||||
{
|
||||
GimpColormapEditor *editor = context_get_colormap_editor ();
|
||||
|
||||
if (editor && gimp_colormap_editor_set_index (editor, index, color))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (use_palette)
|
||||
{
|
||||
GimpPaletteEditor *editor = context_get_palette_editor ();
|
||||
|
||||
if (editor && gimp_palette_editor_set_index (editor, index, color))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static GimpPaletteEditor *
|
||||
context_get_palette_editor (void)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (gimp_dialog_factory_get_singleton ()), NULL);
|
||||
|
||||
widget = gimp_dialog_factory_find_widget (gimp_dialog_factory_get_singleton (),
|
||||
"gimp-palette-editor");
|
||||
if (widget)
|
||||
return GIMP_PALETTE_EDITOR (gtk_bin_get_child (GTK_BIN (widget)));
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static GimpColormapEditor *
|
||||
context_get_colormap_editor (void)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (gimp_dialog_factory_get_singleton ()), NULL);
|
||||
|
||||
widget = gimp_dialog_factory_find_widget (gimp_dialog_factory_get_singleton (),
|
||||
"gimp-indexed-palette");
|
||||
if (widget)
|
||||
return GIMP_COLORMAP_EDITOR (gtk_bin_get_child (GTK_BIN (widget)));
|
||||
|
||||
return NULL;
|
||||
}
|
|
@ -1,140 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __CONTEXT_COMMANDS_H__
|
||||
#define __CONTEXT_COMMANDS_H__
|
||||
|
||||
|
||||
|
||||
void context_colors_default_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_colors_swap_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_palette_foreground_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_palette_background_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_colormap_foreground_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_colormap_background_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_swatch_foreground_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_swatch_background_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_foreground_red_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_foreground_green_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_foreground_blue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_background_red_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_background_green_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_background_blue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_foreground_hue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_foreground_saturation_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_foreground_value_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_background_hue_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_background_saturation_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_background_value_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_opacity_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_paint_mode_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_tool_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_pattern_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_palette_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_gradient_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_font_select_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void context_brush_spacing_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_shape_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_radius_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_spikes_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_hardness_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_aspect_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void context_brush_angle_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __CONTEXT_COMMANDS_H__ */
|
|
@ -1,81 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "display/gimpcursorview.h"
|
||||
|
||||
#include "cursor-info-actions.h"
|
||||
#include "cursor-info-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry cursor_info_actions[] =
|
||||
{
|
||||
{ "cursor-info-popup", GIMP_ICON_CURSOR,
|
||||
NC_("cursor-info-action", "Pointer Information Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_POINTER_INFO_DIALOG }
|
||||
};
|
||||
|
||||
static const GimpToggleActionEntry cursor_info_toggle_actions[] =
|
||||
{
|
||||
{ "cursor-info-sample-merged", NULL,
|
||||
NC_("cursor-info-action", "_Sample Merged"), "",
|
||||
NC_("cursor-info-action", "Use the composite color of all visible layers"),
|
||||
cursor_info_sample_merged_cmd_callback,
|
||||
TRUE,
|
||||
GIMP_HELP_POINTER_INFO_SAMPLE_MERGED }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
cursor_info_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "cursor-info-action",
|
||||
cursor_info_actions,
|
||||
G_N_ELEMENTS (cursor_info_actions));
|
||||
|
||||
gimp_action_group_add_toggle_actions (group, "cursor-info-action",
|
||||
cursor_info_toggle_actions,
|
||||
G_N_ELEMENTS (cursor_info_toggle_actions));
|
||||
}
|
||||
|
||||
void
|
||||
cursor_info_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpCursorView *view = GIMP_CURSOR_VIEW (data);
|
||||
|
||||
#define SET_ACTIVE(action,condition) \
|
||||
gimp_action_group_set_action_active (group, action, (condition) != 0)
|
||||
|
||||
SET_ACTIVE ("cursor-info-sample-merged",
|
||||
gimp_cursor_view_get_sample_merged (view));
|
||||
|
||||
#undef SET_ACTIVE
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __CURSOR_INFO_ACIONS_H__
|
||||
#define __CURSOR_INFO_ACIONS_H__
|
||||
|
||||
|
||||
void cursor_info_actions_setup (GimpActionGroup *group);
|
||||
void cursor_info_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __CURSOR_INFO_ACTIONS_H__ */
|
|
@ -1,41 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "display/gimpcursorview.h"
|
||||
|
||||
#include "cursor-info-commands.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
cursor_info_sample_merged_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpCursorView *view = GIMP_CURSOR_VIEW (data);
|
||||
gboolean active = g_variant_get_boolean (value);
|
||||
|
||||
gimp_cursor_view_set_sample_merged (view, active);
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __CURSOR_INFO_COMMANDS_H__
|
||||
#define __CURSOR_INFO_COMMANDS_H__
|
||||
|
||||
|
||||
void cursor_info_sample_merged_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __CURSOR_INFO_COMMANDS_H__ */
|
|
@ -1,230 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpdashboard.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "dashboard-actions.h"
|
||||
#include "dashboard-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry dashboard_actions[] =
|
||||
{
|
||||
{ "dashboard-popup", GIMP_ICON_DIALOG_DASHBOARD,
|
||||
NC_("dashboard-action", "Dashboard Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_DASHBOARD_DIALOG },
|
||||
|
||||
{ "dashboard-groups", NULL,
|
||||
NC_("dashboard-action", "_Groups") },
|
||||
{ "dashboard-update-interval", NULL,
|
||||
NC_("dashboard-action", "_Update Interval") },
|
||||
{ "dashboard-history-duration", NULL,
|
||||
NC_("dashboard-action", "_History Duration") },
|
||||
|
||||
{ "dashboard-log-record", GIMP_ICON_RECORD,
|
||||
NC_("dashboard-action", "_Start/Stop Recording..."), NULL,
|
||||
NC_("dashboard-action", "Start/stop recording performance log"),
|
||||
dashboard_log_record_cmd_callback,
|
||||
GIMP_HELP_DASHBOARD_LOG_RECORD },
|
||||
{ "dashboard-log-add-marker", GIMP_ICON_MARKER,
|
||||
NC_("dashboard-action", "_Add Marker..."), NULL,
|
||||
NC_("dashboard-action", "Add an event marker "
|
||||
"to the performance log"),
|
||||
dashboard_log_add_marker_cmd_callback,
|
||||
GIMP_HELP_DASHBOARD_LOG_ADD_MARKER },
|
||||
{ "dashboard-log-add-empty-marker", GIMP_ICON_MARKER,
|
||||
NC_("dashboard-action", "Add _Empty Marker"), NULL,
|
||||
NC_("dashboard-action", "Add an empty event marker "
|
||||
"to the performance log"),
|
||||
dashboard_log_add_empty_marker_cmd_callback,
|
||||
GIMP_HELP_DASHBOARD_LOG_ADD_EMPTY_MARKER },
|
||||
|
||||
{ "dashboard-reset", GIMP_ICON_RESET,
|
||||
NC_("dashboard-action", "_Reset"), NULL,
|
||||
NC_("dashboard-action", "Reset cumulative data"),
|
||||
dashboard_reset_cmd_callback,
|
||||
GIMP_HELP_DASHBOARD_RESET },
|
||||
};
|
||||
|
||||
static const GimpToggleActionEntry dashboard_toggle_actions[] =
|
||||
{
|
||||
{ "dashboard-low-swap-space-warning", NULL,
|
||||
NC_("dashboard-action", "_Low Swap Space Warning"), NULL,
|
||||
NC_("dashboard-action", "Raise the dashboard when "
|
||||
"the swap size approaches its limit"),
|
||||
dashboard_low_swap_space_warning_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_DASHBOARD_LOW_SWAP_SPACE_WARNING }
|
||||
};
|
||||
|
||||
static const GimpRadioActionEntry dashboard_update_interval_actions[] =
|
||||
{
|
||||
{ "dashboard-update-interval-0-25-sec", NULL,
|
||||
NC_("dashboard-update-interval", "0.25 Seconds"), NULL, NULL,
|
||||
GIMP_DASHBOARD_UPDATE_INTERVAL_0_25_SEC,
|
||||
GIMP_HELP_DASHBOARD_UPDATE_INTERVAL },
|
||||
|
||||
{ "dashboard-update-interval-0-5-sec", NULL,
|
||||
NC_("dashboard-update-interval", "0.5 Seconds"), NULL, NULL,
|
||||
GIMP_DASHBOARD_UPDATE_INTERVAL_0_5_SEC,
|
||||
GIMP_HELP_DASHBOARD_UPDATE_INTERVAL },
|
||||
|
||||
{ "dashboard-update-interval-1-sec", NULL,
|
||||
NC_("dashboard-update-interval", "1 Second"), NULL, NULL,
|
||||
GIMP_DASHBOARD_UPDATE_INTERVAL_1_SEC,
|
||||
GIMP_HELP_DASHBOARD_UPDATE_INTERVAL },
|
||||
|
||||
{ "dashboard-update-interval-2-sec", NULL,
|
||||
NC_("dashboard-update-interval", "2 Seconds"), NULL, NULL,
|
||||
GIMP_DASHBOARD_UPDATE_INTERVAL_2_SEC,
|
||||
GIMP_HELP_DASHBOARD_UPDATE_INTERVAL },
|
||||
|
||||
{ "dashboard-update-interval-4-sec", NULL,
|
||||
NC_("dashboard-update-interval", "4 Seconds"), NULL, NULL,
|
||||
GIMP_DASHBOARD_UPDATE_INTERVAL_4_SEC,
|
||||
GIMP_HELP_DASHBOARD_UPDATE_INTERVAL }
|
||||
};
|
||||
|
||||
static const GimpRadioActionEntry dashboard_history_duration_actions[] =
|
||||
{
|
||||
{ "dashboard-history-duration-15-sec", NULL,
|
||||
NC_("dashboard-history-duration", "15 Seconds"), NULL, NULL,
|
||||
GIMP_DASHBOARD_HISTORY_DURATION_15_SEC,
|
||||
GIMP_HELP_DASHBOARD_HISTORY_DURATION },
|
||||
|
||||
{ "dashboard-history-duration-30-sec", NULL,
|
||||
NC_("dashboard-history-duration", "30 Seconds"), NULL, NULL,
|
||||
GIMP_DASHBOARD_HISTORY_DURATION_30_SEC,
|
||||
GIMP_HELP_DASHBOARD_HISTORY_DURATION },
|
||||
|
||||
{ "dashboard-history-duration-60-sec", NULL,
|
||||
NC_("dashboard-history-duration", "60 Seconds"), NULL, NULL,
|
||||
GIMP_DASHBOARD_HISTORY_DURATION_60_SEC,
|
||||
GIMP_HELP_DASHBOARD_HISTORY_DURATION },
|
||||
|
||||
{ "dashboard-history-duration-120-sec", NULL,
|
||||
NC_("dashboard-history-duration", "120 Seconds"), NULL, NULL,
|
||||
GIMP_DASHBOARD_HISTORY_DURATION_120_SEC,
|
||||
GIMP_HELP_DASHBOARD_HISTORY_DURATION },
|
||||
|
||||
{ "dashboard-history-duration-240-sec", NULL,
|
||||
NC_("dashboard-history-duration", "240 Seconds"), NULL, NULL,
|
||||
GIMP_DASHBOARD_HISTORY_DURATION_240_SEC,
|
||||
GIMP_HELP_DASHBOARD_HISTORY_DURATION }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
dashboard_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "dashboard-action",
|
||||
dashboard_actions,
|
||||
G_N_ELEMENTS (dashboard_actions));
|
||||
|
||||
gimp_action_group_add_toggle_actions (group, "dashboard-action",
|
||||
dashboard_toggle_actions,
|
||||
G_N_ELEMENTS (dashboard_toggle_actions));
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "dashboard-update-interval",
|
||||
dashboard_update_interval_actions,
|
||||
G_N_ELEMENTS (dashboard_update_interval_actions),
|
||||
NULL,
|
||||
0,
|
||||
dashboard_update_interval_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "dashboard-history-duration",
|
||||
dashboard_history_duration_actions,
|
||||
G_N_ELEMENTS (dashboard_history_duration_actions),
|
||||
NULL,
|
||||
0,
|
||||
dashboard_history_duration_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
gboolean recording;
|
||||
|
||||
recording = gimp_dashboard_log_is_recording (dashboard);
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
#define SET_ACTIVE(action,condition) \
|
||||
gimp_action_group_set_action_active (group, action, (condition) != 0)
|
||||
|
||||
switch (gimp_dashboard_get_update_interval (dashboard))
|
||||
{
|
||||
case GIMP_DASHBOARD_UPDATE_INTERVAL_0_25_SEC:
|
||||
SET_ACTIVE ("dashboard-update-interval-0-25-sec", TRUE);
|
||||
break;
|
||||
case GIMP_DASHBOARD_UPDATE_INTERVAL_0_5_SEC:
|
||||
SET_ACTIVE ("dashboard-update-interval-0-5-sec", TRUE);
|
||||
break;
|
||||
case GIMP_DASHBOARD_UPDATE_INTERVAL_1_SEC:
|
||||
SET_ACTIVE ("dashboard-update-interval-1-sec", TRUE);
|
||||
break;
|
||||
case GIMP_DASHBOARD_UPDATE_INTERVAL_2_SEC:
|
||||
SET_ACTIVE ("dashboard-update-interval-2-sec", TRUE);
|
||||
break;
|
||||
case GIMP_DASHBOARD_UPDATE_INTERVAL_4_SEC:
|
||||
SET_ACTIVE ("dashboard-update-interval-4-sec", TRUE);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (gimp_dashboard_get_history_duration (dashboard))
|
||||
{
|
||||
case GIMP_DASHBOARD_HISTORY_DURATION_15_SEC:
|
||||
SET_ACTIVE ("dashboard-history-duration-15-sec", TRUE);
|
||||
break;
|
||||
case GIMP_DASHBOARD_HISTORY_DURATION_30_SEC:
|
||||
SET_ACTIVE ("dashboard-history-duration-30-sec", TRUE);
|
||||
break;
|
||||
case GIMP_DASHBOARD_HISTORY_DURATION_60_SEC:
|
||||
SET_ACTIVE ("dashboard-history-duration-60-sec", TRUE);
|
||||
break;
|
||||
case GIMP_DASHBOARD_HISTORY_DURATION_120_SEC:
|
||||
SET_ACTIVE ("dashboard-history-duration-120-sec", TRUE);
|
||||
break;
|
||||
case GIMP_DASHBOARD_HISTORY_DURATION_240_SEC:
|
||||
SET_ACTIVE ("dashboard-history-duration-240-sec", TRUE);
|
||||
break;
|
||||
}
|
||||
|
||||
SET_SENSITIVE ("dashboard-log-add-marker", recording);
|
||||
SET_SENSITIVE ("dashboard-log-add-empty-marker", recording);
|
||||
SET_SENSITIVE ("dashboard-reset", !recording);
|
||||
|
||||
SET_ACTIVE ("dashboard-low-swap-space-warning",
|
||||
gimp_dashboard_get_low_swap_space_warning (dashboard));
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
#undef SET_ACTIVE
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DASHBOARD_ACTIONS_H__
|
||||
#define __DASHBOARD_ACTIONS_H__
|
||||
|
||||
|
||||
void dashboard_actions_setup (GimpActionGroup *group);
|
||||
void dashboard_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DASHBOARD_ACTIONS_H__ */
|
|
@ -1,406 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "widgets/gimpdashboard.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpuimanager.h"
|
||||
|
||||
#include "dialogs/dialogs.h"
|
||||
|
||||
#include "dashboard-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GFile *folder;
|
||||
GimpDashboardLogParams params;
|
||||
} DashboardLogDialogInfo;
|
||||
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
static void dashboard_log_record_response (GtkWidget *dialog,
|
||||
int response_id,
|
||||
GimpDashboard *dashboard);
|
||||
|
||||
static void dashboard_log_add_marker_response (GtkWidget *dialog,
|
||||
const gchar *description,
|
||||
GimpDashboard *dashboard);
|
||||
|
||||
static DashboardLogDialogInfo * dashboard_log_dialog_info_new (GimpDashboard *dashboard);
|
||||
static void dashboard_log_dialog_info_free (DashboardLogDialogInfo *info);
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
|
||||
void
|
||||
dashboard_update_interval_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
GimpDashboardUpdateInteval update_interval;
|
||||
|
||||
update_interval = g_variant_get_int32 (value);
|
||||
|
||||
gimp_dashboard_set_update_interval (dashboard, update_interval);
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_history_duration_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
GimpDashboardHistoryDuration history_duration;
|
||||
|
||||
history_duration = g_variant_get_int32 (value);
|
||||
|
||||
gimp_dashboard_set_history_duration (dashboard, history_duration);
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_log_record_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
|
||||
if (! gimp_dashboard_log_is_recording (dashboard))
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
#define LOG_RECORD_KEY "gimp-dashboard-log-record-dialog"
|
||||
|
||||
dialog = dialogs_get_dialog (G_OBJECT (dashboard), LOG_RECORD_KEY);
|
||||
|
||||
if (! dialog)
|
||||
{
|
||||
GtkFileFilter *filter;
|
||||
DashboardLogDialogInfo *info;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *hbox2;
|
||||
GtkWidget *label;
|
||||
GtkWidget *spinbutton;
|
||||
GtkWidget *toggle;
|
||||
|
||||
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);
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gtk_window_set_screen (
|
||||
GTK_WINDOW (dialog),
|
||||
gtk_widget_get_screen (GTK_WIDGET (dashboard)));
|
||||
gtk_window_set_role (GTK_WINDOW (dialog),
|
||||
"gimp-dashboard-log-record");
|
||||
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
|
||||
|
||||
gtk_file_chooser_set_do_overwrite_confirmation (
|
||||
GTK_FILE_CHOOSER (dialog), TRUE);
|
||||
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_set_name (filter, _("All Files"));
|
||||
gtk_file_filter_add_pattern (filter, "*");
|
||||
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
|
||||
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_set_name (filter, _("Log Files (*.log)"));
|
||||
gtk_file_filter_add_pattern (filter, "*.log");
|
||||
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
|
||||
|
||||
gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter);
|
||||
|
||||
info = g_object_get_data (G_OBJECT (dashboard),
|
||||
"gimp-dashboard-log-dialog-info");
|
||||
|
||||
if (! info)
|
||||
{
|
||||
info = dashboard_log_dialog_info_new (dashboard);
|
||||
|
||||
g_object_set_data_full (
|
||||
G_OBJECT (dashboard),
|
||||
"gimp-dashboard-log-dialog-info", info,
|
||||
(GDestroyNotify) dashboard_log_dialog_info_free);
|
||||
}
|
||||
|
||||
if (info->folder)
|
||||
{
|
||||
gtk_file_chooser_set_current_folder_file (
|
||||
GTK_FILE_CHOOSER (dialog), info->folder, NULL);
|
||||
}
|
||||
|
||||
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog),
|
||||
"gimp-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);
|
||||
gimp_help_set_help_data (hbox2, _("Log samples per second"), NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), hbox2, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox2);
|
||||
|
||||
label = gtk_label_new_with_mnemonic (_("Sample fre_quency:"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
spinbutton = gimp_spin_button_new_with_range (1, 1000, 1);
|
||||
gtk_box_pack_start (GTK_BOX (hbox2), spinbutton, FALSE, FALSE, 0);
|
||||
gtk_widget_show (spinbutton);
|
||||
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (spinbutton),
|
||||
info->params.sample_frequency);
|
||||
|
||||
g_signal_connect (gtk_spin_button_get_adjustment (
|
||||
GTK_SPIN_BUTTON (spinbutton)),
|
||||
"value-changed",
|
||||
G_CALLBACK (gimp_int_adjustment_update),
|
||||
&info->params.sample_frequency);
|
||||
|
||||
gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton);
|
||||
|
||||
toggle = gtk_check_button_new_with_mnemonic (_("_Backtrace"));
|
||||
gimp_help_set_help_data (toggle, _("Include backtraces in log"),
|
||||
NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), toggle, FALSE, FALSE, 0);
|
||||
gtk_widget_show (toggle);
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
|
||||
info->params.backtrace);
|
||||
|
||||
g_signal_connect (toggle, "toggled",
|
||||
G_CALLBACK (gimp_toggle_button_update),
|
||||
&info->params.backtrace);
|
||||
|
||||
toggle = gtk_check_button_new_with_mnemonic (_("_Messages"));
|
||||
gimp_help_set_help_data (toggle,
|
||||
_("Include diagnostic messages in log"),
|
||||
NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), toggle, FALSE, FALSE, 0);
|
||||
gtk_widget_show (toggle);
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
|
||||
info->params.messages);
|
||||
|
||||
g_signal_connect (toggle, "toggled",
|
||||
G_CALLBACK (gimp_toggle_button_update),
|
||||
&info->params.messages);
|
||||
|
||||
toggle = gtk_check_button_new_with_mnemonic (_("Progressi_ve"));
|
||||
gimp_help_set_help_data (toggle,
|
||||
_("Produce complete log "
|
||||
"even if not properly terminated"),
|
||||
NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), toggle, FALSE, FALSE, 0);
|
||||
gtk_widget_show (toggle);
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
|
||||
info->params.progressive);
|
||||
|
||||
g_signal_connect (toggle, "toggled",
|
||||
G_CALLBACK (gimp_toggle_button_update),
|
||||
&info->params.progressive);
|
||||
|
||||
g_signal_connect (dialog, "response",
|
||||
G_CALLBACK (dashboard_log_record_response),
|
||||
dashboard);
|
||||
g_signal_connect (dialog, "delete-event",
|
||||
G_CALLBACK (gtk_true),
|
||||
NULL);
|
||||
|
||||
gimp_help_connect (dialog, gimp_standard_help_func,
|
||||
GIMP_HELP_DASHBOARD_LOG_RECORD, NULL);
|
||||
|
||||
dialogs_attach_dialog (G_OBJECT (dashboard), LOG_RECORD_KEY, dialog);
|
||||
|
||||
g_signal_connect_object (dashboard, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroy),
|
||||
dialog,
|
||||
G_CONNECT_SWAPPED);
|
||||
|
||||
#undef LOG_RECORD_KEY
|
||||
}
|
||||
|
||||
gtk_window_present (GTK_WINDOW (dialog));
|
||||
}
|
||||
else
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
if (! gimp_dashboard_log_stop_recording (dashboard, &error))
|
||||
{
|
||||
gimp_message_literal (
|
||||
gimp_editor_get_ui_manager (GIMP_EDITOR (dashboard))->gimp,
|
||||
NULL, GIMP_MESSAGE_ERROR, error->message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_log_add_marker_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
GtkWidget *dialog;
|
||||
|
||||
#define LOG_ADD_MARKER_KEY "gimp-dashboard-log-add-marker-dialog"
|
||||
|
||||
dialog = dialogs_get_dialog (G_OBJECT (dashboard), LOG_ADD_MARKER_KEY);
|
||||
|
||||
if (! dialog)
|
||||
{
|
||||
dialog = gimp_query_string_box (
|
||||
_("Add Marker"), GTK_WIDGET (dashboard),
|
||||
gimp_standard_help_func, GIMP_HELP_DASHBOARD_LOG_ADD_MARKER,
|
||||
_("Enter a description for the marker"),
|
||||
NULL,
|
||||
G_OBJECT (dashboard), "destroy",
|
||||
(GimpQueryStringCallback) dashboard_log_add_marker_response,
|
||||
dashboard);
|
||||
|
||||
dialogs_attach_dialog (G_OBJECT (dashboard), LOG_ADD_MARKER_KEY, dialog);
|
||||
|
||||
#undef LOG_ADD_MARKER_KEY
|
||||
}
|
||||
|
||||
gtk_window_present (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_log_add_empty_marker_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
|
||||
gimp_dashboard_log_add_marker (dashboard, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_reset_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
|
||||
gimp_dashboard_reset (dashboard);
|
||||
}
|
||||
|
||||
void
|
||||
dashboard_low_swap_space_warning_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDashboard *dashboard = GIMP_DASHBOARD (data);
|
||||
gboolean low_swap_space_warning = g_variant_get_boolean (value);
|
||||
|
||||
gimp_dashboard_set_low_swap_space_warning (dashboard, low_swap_space_warning);
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static void
|
||||
dashboard_log_record_response (GtkWidget *dialog,
|
||||
int response_id,
|
||||
GimpDashboard *dashboard)
|
||||
{
|
||||
if (response_id == GTK_RESPONSE_OK)
|
||||
{
|
||||
GFile *file;
|
||||
DashboardLogDialogInfo *info;
|
||||
GError *error = NULL;
|
||||
|
||||
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
|
||||
|
||||
info = g_object_get_data (G_OBJECT (dashboard),
|
||||
"gimp-dashboard-log-dialog-info");
|
||||
|
||||
g_return_if_fail (info != NULL);
|
||||
|
||||
g_set_object (&info->folder, g_file_get_parent (file));
|
||||
|
||||
if (! gimp_dashboard_log_start_recording (dashboard,
|
||||
file, &info->params,
|
||||
&error))
|
||||
{
|
||||
gimp_message_literal (
|
||||
gimp_editor_get_ui_manager (GIMP_EDITOR (dashboard))->gimp,
|
||||
NULL, GIMP_MESSAGE_ERROR, error->message);
|
||||
|
||||
g_clear_error (&error);
|
||||
}
|
||||
|
||||
g_object_unref (file);
|
||||
}
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
dashboard_log_add_marker_response (GtkWidget *dialog,
|
||||
const gchar *description,
|
||||
GimpDashboard *dashboard)
|
||||
{
|
||||
gimp_dashboard_log_add_marker (dashboard, description);
|
||||
}
|
||||
|
||||
static DashboardLogDialogInfo *
|
||||
dashboard_log_dialog_info_new (GimpDashboard *dashboard)
|
||||
{
|
||||
DashboardLogDialogInfo *info = g_slice_new (DashboardLogDialogInfo);
|
||||
|
||||
info->folder = NULL;
|
||||
info->params = *gimp_dashboard_log_get_default_params (dashboard);
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
static void
|
||||
dashboard_log_dialog_info_free (DashboardLogDialogInfo *info)
|
||||
{
|
||||
g_clear_object (&info->folder);
|
||||
|
||||
g_slice_free (DashboardLogDialogInfo, info);
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DASHBOARD_COMMANDS_H__
|
||||
#define __DASHBOARD_COMMANDS_H__
|
||||
|
||||
|
||||
void dashboard_update_interval_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dashboard_history_duration_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void dashboard_log_record_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dashboard_log_add_marker_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dashboard_log_add_empty_marker_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void dashboard_reset_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void dashboard_low_swap_space_warning_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DASHBOARD_COMMANDS_H__ */
|
|
@ -1,304 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontainer.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpdata.h"
|
||||
#include "core/gimpdatafactory.h"
|
||||
|
||||
#include "file/file-open.h"
|
||||
|
||||
#include "widgets/gimpclipboard.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimpdataeditor.h"
|
||||
#include "widgets/gimpdatafactoryview.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpmessagebox.h"
|
||||
#include "widgets/gimpmessagedialog.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
#include "widgets/gimpwindowstrategy.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
#include "dialogs/data-delete-dialog.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "data-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
data_open_as_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
GimpContext *context;
|
||||
GimpData *data;
|
||||
|
||||
context =
|
||||
gimp_container_view_get_context (GIMP_CONTAINER_EDITOR (view)->view);
|
||||
|
||||
data = (GimpData *)
|
||||
gimp_context_get_by_type (context,
|
||||
gimp_data_factory_view_get_children_type (view));
|
||||
|
||||
if (data && gimp_data_get_file (data))
|
||||
{
|
||||
GFile *file = gimp_data_get_file (data);
|
||||
GtkWidget *widget = GTK_WIDGET (view);
|
||||
GimpImage *image;
|
||||
GimpPDBStatusType status;
|
||||
GError *error = NULL;
|
||||
|
||||
image = file_open_with_display (context->gimp, context, NULL,
|
||||
file, FALSE,
|
||||
G_OBJECT (gtk_widget_get_screen (widget)),
|
||||
gimp_widget_get_monitor (widget),
|
||||
&status, &error);
|
||||
|
||||
if (! image && status != GIMP_PDB_CANCEL)
|
||||
{
|
||||
gimp_message (context->gimp, G_OBJECT (view),
|
||||
GIMP_MESSAGE_ERROR,
|
||||
_("Opening '%s' failed:\n\n%s"),
|
||||
gimp_file_get_utf8_name (file), error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
data_new_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
|
||||
if (gimp_data_factory_view_has_data_new_func (view))
|
||||
{
|
||||
GimpDataFactory *factory;
|
||||
GimpContext *context;
|
||||
GimpData *data;
|
||||
|
||||
factory = gimp_data_factory_view_get_data_factory (view);
|
||||
|
||||
context =
|
||||
gimp_container_view_get_context (GIMP_CONTAINER_EDITOR (view)->view);
|
||||
|
||||
data = gimp_data_factory_data_new (factory, context, _("Untitled"));
|
||||
|
||||
if (data)
|
||||
{
|
||||
gimp_context_set_by_type (context,
|
||||
gimp_data_factory_view_get_children_type (view),
|
||||
GIMP_OBJECT (data));
|
||||
|
||||
gtk_button_clicked (GTK_BUTTON (gimp_data_factory_view_get_edit_button (view)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
data_duplicate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
GimpContext *context;
|
||||
GimpData *data;
|
||||
|
||||
context = gimp_container_view_get_context (GIMP_CONTAINER_EDITOR (view)->view);
|
||||
|
||||
data = (GimpData *)
|
||||
gimp_context_get_by_type (context,
|
||||
gimp_data_factory_view_get_children_type (view));
|
||||
|
||||
if (data && gimp_data_factory_view_have (view, GIMP_OBJECT (data)))
|
||||
{
|
||||
GimpData *new_data;
|
||||
|
||||
new_data = gimp_data_factory_data_duplicate (gimp_data_factory_view_get_data_factory (view), data);
|
||||
|
||||
if (new_data)
|
||||
{
|
||||
gimp_context_set_by_type (context,
|
||||
gimp_data_factory_view_get_children_type (view),
|
||||
GIMP_OBJECT (new_data));
|
||||
|
||||
gtk_button_clicked (GTK_BUTTON (gimp_data_factory_view_get_edit_button (view)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
data_copy_location_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
GimpContext *context;
|
||||
GimpData *data;
|
||||
|
||||
context = gimp_container_view_get_context (GIMP_CONTAINER_EDITOR (view)->view);
|
||||
|
||||
data = (GimpData *)
|
||||
gimp_context_get_by_type (context,
|
||||
gimp_data_factory_view_get_children_type (view));
|
||||
|
||||
if (data)
|
||||
{
|
||||
GFile *file = gimp_data_get_file (data);
|
||||
|
||||
if (file)
|
||||
{
|
||||
gchar *uri = g_file_get_uri (file);
|
||||
|
||||
gimp_clipboard_set_text (context->gimp, uri);
|
||||
g_free (uri);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
data_show_in_file_manager_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
GimpContext *context;
|
||||
GimpData *data;
|
||||
|
||||
context = gimp_container_view_get_context (GIMP_CONTAINER_EDITOR (view)->view);
|
||||
|
||||
data = (GimpData *)
|
||||
gimp_context_get_by_type (context,
|
||||
gimp_data_factory_view_get_children_type (view));
|
||||
|
||||
if (data)
|
||||
{
|
||||
GFile *file = gimp_data_get_file (data);
|
||||
|
||||
if (file)
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
if (! gimp_file_show_in_file_manager (file, &error))
|
||||
{
|
||||
gimp_message (context->gimp, G_OBJECT (view),
|
||||
GIMP_MESSAGE_ERROR,
|
||||
_("Can't show file in file manager: %s"),
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
data_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
GimpContext *context;
|
||||
GimpData *data;
|
||||
|
||||
context =
|
||||
gimp_container_view_get_context (GIMP_CONTAINER_EDITOR (view)->view);
|
||||
|
||||
data = (GimpData *)
|
||||
gimp_context_get_by_type (context,
|
||||
gimp_data_factory_view_get_children_type (view));
|
||||
|
||||
if (data &&
|
||||
gimp_data_is_deletable (data) &&
|
||||
gimp_data_factory_view_have (view, GIMP_OBJECT (data)))
|
||||
{
|
||||
GimpDataFactory *factory;
|
||||
GtkWidget *dialog;
|
||||
|
||||
factory = gimp_data_factory_view_get_data_factory (view);
|
||||
|
||||
dialog = data_delete_dialog_new (factory, data, context,
|
||||
GTK_WIDGET (view));
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
data_refresh_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
Gimp *gimp;
|
||||
return_if_no_gimp (gimp, user_data);
|
||||
|
||||
gimp_set_busy (gimp);
|
||||
gimp_data_factory_data_refresh (gimp_data_factory_view_get_data_factory (view),
|
||||
action_data_get_context (user_data));
|
||||
gimp_unset_busy (gimp);
|
||||
}
|
||||
|
||||
void
|
||||
data_edit_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
GimpContext *context;
|
||||
GimpData *data;
|
||||
|
||||
context = gimp_container_view_get_context (GIMP_CONTAINER_EDITOR (view)->view);
|
||||
|
||||
data = (GimpData *)
|
||||
gimp_context_get_by_type (context,
|
||||
gimp_data_factory_view_get_children_type (view));
|
||||
|
||||
if (data && gimp_data_factory_view_have (view, GIMP_OBJECT (data)))
|
||||
{
|
||||
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (view));
|
||||
gint monitor = gimp_widget_get_monitor (GTK_WIDGET (view));
|
||||
GtkWidget *dockable;
|
||||
|
||||
dockable =
|
||||
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (context->gimp)),
|
||||
context->gimp,
|
||||
gimp_dialog_factory_get_singleton (),
|
||||
screen,
|
||||
monitor,
|
||||
g_variant_get_string (value,
|
||||
NULL));
|
||||
|
||||
gimp_data_editor_set_data (GIMP_DATA_EDITOR (gtk_bin_get_child (GTK_BIN (dockable))),
|
||||
data);
|
||||
}
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DATA_COMMANDS_H__
|
||||
#define __DATA_COMMANDS_H__
|
||||
|
||||
|
||||
void data_open_as_image_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_new_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_duplicate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_copy_location_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_show_in_file_manager_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_delete_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_refresh_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void data_edit_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DATA_COMMANDS_H__ */
|
|
@ -1,43 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpdataeditor.h"
|
||||
|
||||
#include "data-editor-commands.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
data_editor_edit_active_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDataEditor *editor = GIMP_DATA_EDITOR (data);
|
||||
gboolean edit_active;
|
||||
|
||||
edit_active = g_variant_get_boolean (value);
|
||||
|
||||
gimp_data_editor_set_edit_active (editor, edit_active);
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DATA_EDITOR_COMMANDS_H__
|
||||
#define __DATA_EDITOR_COMMANDS_H__
|
||||
|
||||
|
||||
void data_editor_edit_active_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DATA_EDITOR_COMMANDS_H__ */
|
|
@ -1,107 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
|
||||
#include "debug-actions.h"
|
||||
#include "debug-commands.h"
|
||||
|
||||
|
||||
static const GimpActionEntry debug_actions[] =
|
||||
{
|
||||
{ "debug-menu", NULL, "_Debug" },
|
||||
|
||||
{ "debug-mem-profile", NULL,
|
||||
"_Memory Profile", NULL, NULL,
|
||||
debug_mem_profile_cmd_callback,
|
||||
NULL },
|
||||
|
||||
{ "debug-benchmark-projection", NULL,
|
||||
"Benchmark _Projection", NULL,
|
||||
"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,
|
||||
"Show Image _Graph", NULL,
|
||||
"Creates a new image showing the GEGL graph of this image",
|
||||
debug_show_image_graph_cmd_callback,
|
||||
NULL },
|
||||
|
||||
{ "debug-dump-items", NULL,
|
||||
"_Dump Items", NULL, NULL,
|
||||
debug_dump_menus_cmd_callback,
|
||||
NULL },
|
||||
|
||||
{ "debug-dump-managers", NULL,
|
||||
"Dump _UI Managers", NULL, NULL,
|
||||
debug_dump_managers_cmd_callback,
|
||||
NULL },
|
||||
|
||||
{ "debug-dump-keyboard-shortcuts", NULL,
|
||||
"Dump _Keyboard Shortcuts", NULL, NULL,
|
||||
debug_dump_keyboard_shortcuts_cmd_callback,
|
||||
NULL },
|
||||
|
||||
{ "debug-dump-attached-data", NULL,
|
||||
"Dump Attached Data", NULL, NULL,
|
||||
debug_dump_attached_data_cmd_callback,
|
||||
NULL }
|
||||
};
|
||||
|
||||
void
|
||||
debug_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gint i;
|
||||
|
||||
gimp_action_group_add_actions (group, NULL,
|
||||
debug_actions,
|
||||
G_N_ELEMENTS (debug_actions));
|
||||
|
||||
#define SET_VISIBLE(action,condition) \
|
||||
gimp_action_group_set_action_visible (group, action, (condition) != 0)
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (debug_actions); i++)
|
||||
SET_VISIBLE (debug_actions[i].name, group->gimp->show_debug_menu);
|
||||
|
||||
#undef SET_VISIBLE
|
||||
}
|
||||
|
||||
void
|
||||
debug_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
|
||||
SET_SENSITIVE ("debug-show-image-graph", gegl_has_operation ("gegl:introspect"));
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DEBUG_ACTIONS_H__
|
||||
#define __DEBUG_ACTIONS_H__
|
||||
|
||||
|
||||
void debug_actions_setup (GimpActionGroup *group);
|
||||
void debug_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DEBUG_ACTIONS_H__ */
|
|
@ -1,430 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimp-utils.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpprojectable.h"
|
||||
#include "core/gimpprojection.h"
|
||||
|
||||
#include "gegl/gimp-gegl-utils.h"
|
||||
|
||||
#include "widgets/gimpaction.h"
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpmenufactory.h"
|
||||
#include "widgets/gimpuimanager.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
#include "display/gimpimagewindow.h"
|
||||
|
||||
#include "menus/menus.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "debug-commands.h"
|
||||
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
static gboolean debug_benchmark_projection (GimpDisplay *display);
|
||||
static gboolean debug_show_image_graph (GimpImage *source_image);
|
||||
|
||||
static void debug_dump_menus_recurse_menu (GtkWidget *menu,
|
||||
gint depth,
|
||||
gchar *path);
|
||||
|
||||
static void debug_print_qdata (GimpObject *object);
|
||||
static void debug_print_qdata_foreach (GQuark key_id,
|
||||
gpointer data,
|
||||
gpointer user_data);
|
||||
|
||||
static gboolean debug_accel_find_func (GtkAccelKey *key,
|
||||
GClosure *closure,
|
||||
gpointer data);
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
debug_mem_profile_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
extern gboolean gimp_debug_memsize;
|
||||
Gimp *gimp;
|
||||
return_if_no_gimp (gimp, data);
|
||||
|
||||
gimp_debug_memsize = TRUE;
|
||||
|
||||
gimp_object_get_memsize (GIMP_OBJECT (gimp), NULL);
|
||||
|
||||
gimp_debug_memsize = FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
debug_benchmark_projection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
g_idle_add ((GSourceFunc) debug_benchmark_projection, g_object_ref (display));
|
||||
}
|
||||
|
||||
void
|
||||
debug_show_image_graph_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *source_image = NULL;
|
||||
return_if_no_image (source_image, data);
|
||||
|
||||
g_idle_add ((GSourceFunc) debug_show_image_graph, g_object_ref (source_image));
|
||||
}
|
||||
|
||||
void
|
||||
debug_dump_menus_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
for (list = gimp_menu_factory_get_registered_menus (global_menu_factory);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
GimpMenuFactoryEntry *entry = list->data;
|
||||
GList *managers;
|
||||
|
||||
managers = gimp_ui_managers_from_name (entry->identifier);
|
||||
|
||||
if (managers)
|
||||
{
|
||||
GimpUIManager *manager = managers->data;
|
||||
GList *list;
|
||||
|
||||
for (list = manager->registered_uis; list; list = g_list_next (list))
|
||||
{
|
||||
GimpUIManagerUIEntry *ui_entry = list->data;
|
||||
|
||||
if (GTK_IS_MENU_SHELL (ui_entry->widget))
|
||||
{
|
||||
g_print ("\n\n"
|
||||
"========================================\n"
|
||||
"Menu: %s%s\n"
|
||||
"========================================\n\n",
|
||||
entry->identifier, ui_entry->ui_path);
|
||||
|
||||
debug_dump_menus_recurse_menu (ui_entry->widget, 1,
|
||||
entry->identifier);
|
||||
g_print ("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
debug_dump_managers_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
for (list = gimp_menu_factory_get_registered_menus (global_menu_factory);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
GimpMenuFactoryEntry *entry = list->data;
|
||||
GList *managers;
|
||||
|
||||
managers = gimp_ui_managers_from_name (entry->identifier);
|
||||
|
||||
if (managers)
|
||||
{
|
||||
g_print ("\n\n"
|
||||
"========================================\n"
|
||||
"UI Manager: %s\n"
|
||||
"========================================\n\n",
|
||||
entry->identifier);
|
||||
|
||||
g_print ("%s\n", gimp_ui_manager_get_ui (managers->data));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
debug_dump_keyboard_shortcuts_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImageWindow *window;
|
||||
GimpUIManager *manager;
|
||||
GtkAccelGroup *accel_group;
|
||||
GList *group_it;
|
||||
GList *strings = NULL;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
window = gimp_display_shell_get_window (gimp_display_get_shell (display));
|
||||
manager = gimp_image_window_get_ui_manager (window);
|
||||
|
||||
accel_group = gimp_ui_manager_get_accel_group (manager);
|
||||
|
||||
/* Gather formatted strings of keyboard shortcuts */
|
||||
for (group_it = gimp_ui_manager_get_action_groups (manager);
|
||||
group_it;
|
||||
group_it = g_list_next (group_it))
|
||||
{
|
||||
GimpActionGroup *group = group_it->data;
|
||||
GList *actions = NULL;
|
||||
GList *action_it = NULL;
|
||||
|
||||
actions = gimp_action_group_list_actions (group);
|
||||
actions = g_list_sort (actions, (GCompareFunc) gimp_action_name_compare);
|
||||
|
||||
for (action_it = actions; action_it; action_it = g_list_next (action_it))
|
||||
{
|
||||
GimpAction *action = action_it->data;
|
||||
const gchar *name = gimp_action_get_name (action);
|
||||
GClosure *accel_closure = NULL;
|
||||
|
||||
if (strstr (name, "-menu") ||
|
||||
strstr (name, "-popup") ||
|
||||
name[0] == '<')
|
||||
continue;
|
||||
|
||||
accel_closure = gimp_action_get_accel_closure (action);
|
||||
|
||||
if (accel_closure)
|
||||
{
|
||||
GtkAccelKey *key = gtk_accel_group_find (accel_group,
|
||||
debug_accel_find_func,
|
||||
accel_closure);
|
||||
if (key &&
|
||||
key->accel_key &&
|
||||
key->accel_flags & GTK_ACCEL_VISIBLE)
|
||||
{
|
||||
const gchar *label_tmp;
|
||||
gchar *label;
|
||||
gchar *key_string;
|
||||
|
||||
label_tmp = gimp_action_get_label (action);
|
||||
label = gimp_strip_uline (label_tmp);
|
||||
key_string = gtk_accelerator_get_label (key->accel_key,
|
||||
key->accel_mods);
|
||||
|
||||
strings = g_list_prepend (strings,
|
||||
g_strdup_printf ("%-20s %s",
|
||||
key_string, label));
|
||||
|
||||
g_free (key_string);
|
||||
g_free (label);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_list_free (actions);
|
||||
}
|
||||
|
||||
/* Sort and prints the strings */
|
||||
{
|
||||
GList *string_it = NULL;
|
||||
|
||||
strings = g_list_sort (strings, (GCompareFunc) strcmp);
|
||||
|
||||
for (string_it = strings; string_it; string_it = g_list_next (string_it))
|
||||
{
|
||||
g_print ("%s\n", (gchar *) string_it->data);
|
||||
g_free (string_it->data);
|
||||
}
|
||||
|
||||
g_list_free (strings);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
debug_dump_attached_data_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp = action_data_get_gimp (data);
|
||||
GimpContext *user_context = gimp_get_user_context (gimp);
|
||||
|
||||
debug_print_qdata (GIMP_OBJECT (gimp));
|
||||
debug_print_qdata (GIMP_OBJECT (user_context));
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static gboolean
|
||||
debug_benchmark_projection (GimpDisplay *display)
|
||||
{
|
||||
GimpImage *image = gimp_display_get_image (display);
|
||||
|
||||
if (image)
|
||||
{
|
||||
GimpProjection *projection = gimp_image_get_projection (image);
|
||||
|
||||
gimp_projection_stop_rendering (projection);
|
||||
|
||||
GIMP_TIMER_START ();
|
||||
|
||||
gimp_image_invalidate_all (image);
|
||||
gimp_projection_flush_now (projection, TRUE);
|
||||
|
||||
GIMP_TIMER_END ("Validation of the entire projection");
|
||||
|
||||
g_object_unref (display);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
debug_show_image_graph (GimpImage *source_image)
|
||||
{
|
||||
GeglNode *image_graph;
|
||||
GeglNode *output_node;
|
||||
GimpImage *new_image;
|
||||
GeglNode *introspect;
|
||||
GeglNode *sink;
|
||||
GeglBuffer *buffer;
|
||||
gchar *new_name;
|
||||
|
||||
image_graph = gimp_projectable_get_graph (GIMP_PROJECTABLE (source_image));
|
||||
|
||||
output_node = gegl_node_get_output_proxy (image_graph, "output");
|
||||
|
||||
introspect = gegl_node_new_child (NULL,
|
||||
"operation", "gegl:introspect",
|
||||
"node", output_node,
|
||||
NULL);
|
||||
sink = gegl_node_new_child (NULL,
|
||||
"operation", "gegl:buffer-sink",
|
||||
"buffer", &buffer,
|
||||
NULL);
|
||||
|
||||
gegl_node_link_many (introspect, sink, NULL);
|
||||
gegl_node_process (sink);
|
||||
|
||||
new_name = g_strdup_printf ("%s GEGL graph",
|
||||
gimp_image_get_display_name (source_image));
|
||||
|
||||
new_image = gimp_create_image_from_buffer (source_image->gimp,
|
||||
buffer, new_name);
|
||||
gimp_image_set_file (new_image, g_file_new_for_uri (new_name));
|
||||
|
||||
g_free (new_name);
|
||||
|
||||
g_object_unref (buffer);
|
||||
|
||||
g_object_unref (sink);
|
||||
g_object_unref (introspect);
|
||||
|
||||
g_object_unref (source_image);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
debug_dump_menus_recurse_menu (GtkWidget *menu,
|
||||
gint depth,
|
||||
gchar *path)
|
||||
{
|
||||
GList *children;
|
||||
GList *list;
|
||||
|
||||
children = gtk_container_get_children (GTK_CONTAINER (menu));
|
||||
|
||||
for (list = children; list; list = g_list_next (list))
|
||||
{
|
||||
GtkWidget *menu_item = GTK_WIDGET (list->data);
|
||||
GtkWidget *child = gtk_bin_get_child (GTK_BIN (menu_item));
|
||||
|
||||
if (GTK_IS_LABEL (child))
|
||||
{
|
||||
GtkWidget *submenu;
|
||||
const gchar *label;
|
||||
gchar *full_path;
|
||||
gchar *help_page;
|
||||
gchar *format_str;
|
||||
|
||||
label = gtk_label_get_text (GTK_LABEL (child));
|
||||
full_path = g_strconcat (path, "/", label, NULL);
|
||||
|
||||
help_page = g_object_get_data (G_OBJECT (menu_item), "gimp-help-id");
|
||||
help_page = g_strdup (help_page);
|
||||
|
||||
format_str = g_strdup_printf ("%%%ds%%%ds %%-20s %%s\n",
|
||||
depth * 2, depth * 2 - 40);
|
||||
g_print (format_str,
|
||||
"", label, "", help_page ? help_page : "");
|
||||
g_free (format_str);
|
||||
g_free (help_page);
|
||||
|
||||
submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (menu_item));
|
||||
|
||||
if (submenu)
|
||||
debug_dump_menus_recurse_menu (submenu, depth + 1, full_path);
|
||||
|
||||
g_free (full_path);
|
||||
}
|
||||
}
|
||||
|
||||
g_list_free (children);
|
||||
}
|
||||
|
||||
static void
|
||||
debug_print_qdata (GimpObject *object)
|
||||
{
|
||||
g_print ("\nData attached to '%s':\n\n", gimp_object_get_name (object));
|
||||
g_datalist_foreach (&G_OBJECT (object)->qdata,
|
||||
debug_print_qdata_foreach,
|
||||
NULL);
|
||||
g_print ("\n");
|
||||
}
|
||||
|
||||
static void
|
||||
debug_print_qdata_foreach (GQuark key_id,
|
||||
gpointer data,
|
||||
gpointer user_data)
|
||||
{
|
||||
g_print ("%s: %p\n", g_quark_to_string (key_id), data);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
debug_accel_find_func (GtkAccelKey *key,
|
||||
GClosure *closure,
|
||||
gpointer data)
|
||||
{
|
||||
return (GClosure *) data == closure;
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DEBUG_COMMANDS_H__
|
||||
#define __DEBUG_COMMANDS_H__
|
||||
|
||||
|
||||
void debug_mem_profile_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void debug_benchmark_projection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void debug_show_image_graph_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void debug_dump_menus_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void debug_dump_managers_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void debug_dump_keyboard_shortcuts_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void debug_dump_attached_data_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
|
||||
#endif /* __DEBUG_COMMANDS_H__ */
|
|
@ -1,368 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpsessioninfo.h"
|
||||
#include "widgets/gimptoolbox.h"
|
||||
|
||||
#include "display/gimpimagewindow.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "dialogs-actions.h"
|
||||
#include "dialogs-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
const GimpStringActionEntry dialogs_dockable_actions[] =
|
||||
{
|
||||
{ "dialogs-toolbox", NULL,
|
||||
NC_("windows-action", "Tool_box"), "<primary>B",
|
||||
NULL /* set in dialogs_actions_update() */,
|
||||
"gimp-toolbox",
|
||||
GIMP_HELP_TOOLBOX },
|
||||
|
||||
{ "dialogs-tool-options", GIMP_ICON_DIALOG_TOOL_OPTIONS,
|
||||
NC_("dialogs-action", "Tool _Options"), NULL,
|
||||
NC_("dialogs-action", "Open the tool options dialog"),
|
||||
"gimp-tool-options",
|
||||
GIMP_HELP_TOOL_OPTIONS_DIALOG },
|
||||
|
||||
{ "dialogs-device-status", GIMP_ICON_DIALOG_DEVICE_STATUS,
|
||||
NC_("dialogs-action", "_Device Status"), NULL,
|
||||
NC_("dialogs-action", "Open the device status dialog"),
|
||||
"gimp-device-status",
|
||||
GIMP_HELP_DEVICE_STATUS_DIALOG },
|
||||
|
||||
{ "dialogs-symmetry", GIMP_ICON_SYMMETRY,
|
||||
NC_("dialogs-action", "_Symmetry Painting"), NULL,
|
||||
NC_("dialogs-action", "Open the symmetry dialog"),
|
||||
"gimp-symmetry-editor",
|
||||
GIMP_HELP_SYMMETRY_DIALOG },
|
||||
|
||||
{ "dialogs-layers", GIMP_ICON_DIALOG_LAYERS,
|
||||
NC_("dialogs-action", "_Layers"), "<primary>L",
|
||||
NC_("dialogs-action", "Open the layers dialog"),
|
||||
"gimp-layer-list",
|
||||
GIMP_HELP_LAYER_DIALOG },
|
||||
|
||||
{ "dialogs-channels", GIMP_ICON_DIALOG_CHANNELS,
|
||||
NC_("dialogs-action", "_Channels"), NULL,
|
||||
NC_("dialogs-action", "Open the channels dialog"),
|
||||
"gimp-channel-list",
|
||||
GIMP_HELP_CHANNEL_DIALOG },
|
||||
|
||||
{ "dialogs-vectors", GIMP_ICON_DIALOG_PATHS,
|
||||
NC_("dialogs-action", "_Paths"), NULL,
|
||||
NC_("dialogs-action", "Open the paths dialog"),
|
||||
"gimp-vectors-list",
|
||||
GIMP_HELP_PATH_DIALOG },
|
||||
|
||||
{ "dialogs-indexed-palette", GIMP_ICON_COLORMAP,
|
||||
NC_("dialogs-action", "Color_map"), NULL,
|
||||
NC_("dialogs-action", "Open the colormap dialog"),
|
||||
"gimp-indexed-palette",
|
||||
GIMP_HELP_INDEXED_PALETTE_DIALOG },
|
||||
|
||||
{ "dialogs-histogram", GIMP_ICON_HISTOGRAM,
|
||||
NC_("dialogs-action", "Histogra_m"), NULL,
|
||||
NC_("dialogs-action", "Open the histogram dialog"),
|
||||
"gimp-histogram-editor",
|
||||
GIMP_HELP_HISTOGRAM_DIALOG },
|
||||
|
||||
{ "dialogs-selection-editor", GIMP_ICON_SELECTION,
|
||||
NC_("dialogs-action", "_Selection Editor"), NULL,
|
||||
NC_("dialogs-action", "Open the selection editor"),
|
||||
"gimp-selection-editor",
|
||||
GIMP_HELP_SELECTION_DIALOG },
|
||||
|
||||
{ "dialogs-navigation", GIMP_ICON_DIALOG_NAVIGATION,
|
||||
NC_("dialogs-action", "Na_vigation"), NULL,
|
||||
NC_("dialogs-action", "Open the display navigation dialog"),
|
||||
"gimp-navigation-view",
|
||||
GIMP_HELP_NAVIGATION_DIALOG },
|
||||
|
||||
{ "dialogs-undo-history", GIMP_ICON_DIALOG_UNDO_HISTORY,
|
||||
NC_("dialogs-action", "Undo _History"), NULL,
|
||||
NC_("dialogs-action", "Open the undo history dialog"),
|
||||
"gimp-undo-history",
|
||||
GIMP_HELP_UNDO_DIALOG },
|
||||
|
||||
{ "dialogs-cursor", GIMP_ICON_CURSOR,
|
||||
NC_("dialogs-action", "_Pointer"), NULL,
|
||||
NC_("dialogs-action", "Open the pointer information dialog"),
|
||||
"gimp-cursor-view",
|
||||
GIMP_HELP_POINTER_INFO_DIALOG },
|
||||
|
||||
{ "dialogs-sample-points", GIMP_ICON_SAMPLE_POINT,
|
||||
NC_("dialogs-action", "_Sample Points"), NULL,
|
||||
NC_("dialogs-action", "Open the sample points dialog"),
|
||||
"gimp-sample-point-editor",
|
||||
GIMP_HELP_SAMPLE_POINT_DIALOG },
|
||||
|
||||
{ "dialogs-colors", GIMP_ICON_COLORS_DEFAULT,
|
||||
NC_("dialogs-action", "Colo_rs"), NULL,
|
||||
NC_("dialogs-action", "Open the FG/BG color dialog"),
|
||||
"gimp-color-editor",
|
||||
GIMP_HELP_COLOR_DIALOG },
|
||||
|
||||
{ "dialogs-brushes", GIMP_ICON_BRUSH,
|
||||
NC_("dialogs-action", "_Brushes"), "<primary><shift>B",
|
||||
NC_("dialogs-action", "Open the brushes dialog"),
|
||||
"gimp-brush-grid|gimp-brush-list",
|
||||
GIMP_HELP_BRUSH_DIALOG },
|
||||
|
||||
{ "dialogs-brush-editor", GIMP_ICON_BRUSH,
|
||||
NC_("dialogs-action", "Brush Editor"), NULL,
|
||||
NC_("dialogs-action", "Open the brush editor"),
|
||||
"gimp-brush-editor",
|
||||
GIMP_HELP_BRUSH_EDIT },
|
||||
|
||||
{ "dialogs-dynamics", GIMP_ICON_DYNAMICS,
|
||||
NC_("dialogs-action", "Paint D_ynamics"), NULL,
|
||||
NC_("dialogs-action", "Open paint dynamics dialog"),
|
||||
"gimp-dynamics-list|gimp-dynamics-grid",
|
||||
GIMP_HELP_DYNAMICS_DIALOG },
|
||||
|
||||
{ "dialogs-dynamics-editor", GIMP_ICON_DYNAMICS,
|
||||
NC_("dialogs-action", "Paint Dynamics Editor"), NULL,
|
||||
NC_("dialogs-action", "Open the paint dynamics editor"),
|
||||
"gimp-dynamics-editor",
|
||||
GIMP_HELP_DYNAMICS_EDITOR_DIALOG },
|
||||
|
||||
{ "dialogs-mypaint-brushes", GIMP_ICON_MYPAINT_BRUSH,
|
||||
NC_("dialogs-action", "_MyPaint Brushes"), NULL,
|
||||
NC_("dialogs-action", "Open the mypaint brushes dialog"),
|
||||
"gimp-mypaint-brush-grid|gimp-mapyint-brush-list",
|
||||
GIMP_HELP_MYPAINT_BRUSH_DIALOG },
|
||||
|
||||
{ "dialogs-patterns", GIMP_ICON_PATTERN,
|
||||
NC_("dialogs-action", "P_atterns"), "<primary><shift>P",
|
||||
NC_("dialogs-action", "Open the patterns dialog"),
|
||||
"gimp-pattern-grid|gimp-pattern-list",
|
||||
GIMP_HELP_PATTERN_DIALOG },
|
||||
|
||||
{ "dialogs-gradients", GIMP_ICON_GRADIENT,
|
||||
NC_("dialogs-action", "_Gradients"), "<primary>G",
|
||||
NC_("dialogs-action", "Open the gradients dialog"),
|
||||
"gimp-gradient-list|gimp-gradient-grid",
|
||||
GIMP_HELP_GRADIENT_DIALOG },
|
||||
|
||||
{ "dialogs-gradient-editor", GIMP_ICON_GRADIENT,
|
||||
NC_("dialogs-action", "Gradient Editor"), NULL,
|
||||
NC_("dialogs-action", "Open the gradient editor"),
|
||||
"gimp-gradient-editor",
|
||||
GIMP_HELP_GRADIENT_EDIT },
|
||||
|
||||
{ "dialogs-palettes", GIMP_ICON_PALETTE,
|
||||
NC_("dialogs-action", "Pal_ettes"), NULL,
|
||||
NC_("dialogs-action", "Open the palettes dialog"),
|
||||
"gimp-palette-list|gimp-palette-grid",
|
||||
GIMP_HELP_PALETTE_DIALOG },
|
||||
|
||||
{ "dialogs-palette-editor", GIMP_ICON_PALETTE,
|
||||
NC_("dialogs-action", "Palette _Editor"), NULL,
|
||||
NC_("dialogs-action", "Open the palette editor"),
|
||||
"gimp-palette-editor",
|
||||
GIMP_HELP_PALETTE_EDIT },
|
||||
|
||||
{ "dialogs-tool-presets", GIMP_ICON_TOOL_PRESET,
|
||||
NC_("dialogs-action", "Tool Pre_sets"), NULL,
|
||||
NC_("dialogs-action", "Open tool presets dialog"),
|
||||
"gimp-tool-preset-list|gimp-tool-preset-grid",
|
||||
GIMP_HELP_TOOL_PRESET_DIALOG },
|
||||
|
||||
{ "dialogs-fonts", GIMP_ICON_FONT,
|
||||
NC_("dialogs-action", "_Fonts"), NULL,
|
||||
NC_("dialogs-action", "Open the fonts dialog"),
|
||||
"gimp-font-list|gimp-font-grid",
|
||||
GIMP_HELP_FONT_DIALOG },
|
||||
|
||||
{ "dialogs-buffers", GIMP_ICON_BUFFER,
|
||||
NC_("dialogs-action", "B_uffers"), "",
|
||||
NC_("dialogs-action", "Open the named buffers dialog"),
|
||||
"gimp-buffer-list|gimp-buffer-grid",
|
||||
GIMP_HELP_BUFFER_DIALOG },
|
||||
|
||||
{ "dialogs-images", GIMP_ICON_DIALOG_IMAGES,
|
||||
NC_("dialogs-action", "_Images"), NULL,
|
||||
NC_("dialogs-action", "Open the images dialog"),
|
||||
"gimp-image-list|gimp-image-grid",
|
||||
GIMP_HELP_IMAGE_DIALOG },
|
||||
|
||||
{ "dialogs-document-history", GIMP_ICON_DOCUMENT_OPEN_RECENT,
|
||||
NC_("dialogs-action", "Document Histor_y"), "",
|
||||
NC_("dialogs-action", "Open the document history dialog"),
|
||||
"gimp-document-list|gimp-document-grid",
|
||||
GIMP_HELP_DOCUMENT_DIALOG },
|
||||
|
||||
{ "dialogs-templates", GIMP_ICON_TEMPLATE,
|
||||
NC_("dialogs-action", "_Templates"), "",
|
||||
NC_("dialogs-action", "Open the image templates dialog"),
|
||||
"gimp-template-list|gimp-template-grid",
|
||||
GIMP_HELP_TEMPLATE_DIALOG },
|
||||
|
||||
{ "dialogs-error-console", GIMP_ICON_DIALOG_WARNING,
|
||||
NC_("dialogs-action", "Error Co_nsole"), NULL,
|
||||
NC_("dialogs-action", "Open the error console"),
|
||||
"gimp-error-console",
|
||||
GIMP_HELP_ERRORS_DIALOG },
|
||||
|
||||
{ "dialogs-dashboard", GIMP_ICON_DIALOG_DASHBOARD,
|
||||
NC_("dialogs-action", "_Dashboard"), NULL,
|
||||
NC_("dialogs-action", "Open the dashboard"),
|
||||
"gimp-dashboard",
|
||||
GIMP_HELP_ERRORS_DIALOG }
|
||||
};
|
||||
|
||||
gint n_dialogs_dockable_actions = G_N_ELEMENTS (dialogs_dockable_actions);
|
||||
|
||||
static const GimpStringActionEntry dialogs_toplevel_actions[] =
|
||||
{
|
||||
{ "dialogs-preferences", GIMP_ICON_PREFERENCES_SYSTEM,
|
||||
NC_("dialogs-action", "_Preferences"), NULL,
|
||||
NC_("dialogs-action", "Open the preferences dialog"),
|
||||
"gimp-preferences-dialog",
|
||||
GIMP_HELP_PREFS_DIALOG },
|
||||
|
||||
{ "dialogs-input-devices", GIMP_ICON_INPUT_DEVICE,
|
||||
NC_("dialogs-action", "_Input Devices"), NULL,
|
||||
NC_("dialogs-action", "Open the input devices editor"),
|
||||
"gimp-input-devices-dialog",
|
||||
GIMP_HELP_INPUT_DEVICES },
|
||||
|
||||
{ "dialogs-keyboard-shortcuts", GIMP_ICON_CHAR_PICKER,
|
||||
NC_("dialogs-action", "_Keyboard Shortcuts"), NULL,
|
||||
NC_("dialogs-action", "Open the keyboard shortcuts editor"),
|
||||
"gimp-keyboard-shortcuts-dialog",
|
||||
GIMP_HELP_KEYBOARD_SHORTCUTS },
|
||||
|
||||
{ "dialogs-module-dialog", GIMP_ICON_SYSTEM_RUN,
|
||||
NC_("dialogs-action", "_Modules"), NULL,
|
||||
NC_("dialogs-action", "Open the module manager dialog"),
|
||||
"gimp-module-dialog",
|
||||
GIMP_HELP_MODULE_DIALOG },
|
||||
|
||||
{ "dialogs-tips", GIMP_ICON_DIALOG_INFORMATION,
|
||||
NC_("dialogs-action", "_Tip of the Day"), NULL,
|
||||
NC_("dialogs-action", "Show some helpful tips on using GIMP"),
|
||||
"gimp-tips-dialog",
|
||||
GIMP_HELP_TIPS_DIALOG },
|
||||
|
||||
{ "dialogs-about", GIMP_ICON_HELP_ABOUT,
|
||||
#if defined(G_OS_WIN32)
|
||||
NC_("dialogs-action", "About GIMP"),
|
||||
#elif defined(PLATFORM_OSX)
|
||||
NC_("dialogs-action", "About"),
|
||||
#else /* UNIX: use GNOME HIG */
|
||||
NC_("dialogs-action", "_About"),
|
||||
#endif
|
||||
NULL,
|
||||
NC_("dialogs-action", "About GIMP"),
|
||||
"gimp-about-dialog",
|
||||
GIMP_HELP_ABOUT_DIALOG },
|
||||
|
||||
{ "dialogs-action-search", GIMP_ICON_TOOL_ZOOM,
|
||||
NC_("dialogs-action", "_Search and Run a Command"), "slash",
|
||||
NC_("dialogs-action", "Search commands by keyword, and run them"),
|
||||
"gimp-action-search-dialog",
|
||||
GIMP_HELP_ACTION_SEARCH_DIALOG }
|
||||
};
|
||||
|
||||
|
||||
gboolean
|
||||
dialogs_actions_toolbox_exists (Gimp *gimp)
|
||||
{
|
||||
GimpDialogFactory *factory = gimp_dialog_factory_get_singleton ();
|
||||
gboolean toolbox_found = FALSE;
|
||||
GList *iter;
|
||||
|
||||
/* First look in session managed windows */
|
||||
toolbox_found =
|
||||
gimp_dialog_factory_find_widget (factory, "gimp-toolbox-window") != NULL;
|
||||
|
||||
/* Then in image windows */
|
||||
if (! toolbox_found)
|
||||
{
|
||||
GList *windows = gimp ? gimp_get_image_windows (gimp) : NULL;
|
||||
|
||||
for (iter = windows; iter; iter = g_list_next (iter))
|
||||
{
|
||||
GimpImageWindow *window = GIMP_IMAGE_WINDOW (windows->data);
|
||||
|
||||
if (gimp_image_window_has_toolbox (window))
|
||||
{
|
||||
toolbox_found = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
g_list_free (windows);
|
||||
}
|
||||
|
||||
return toolbox_found;
|
||||
}
|
||||
|
||||
void
|
||||
dialogs_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_string_actions (group, "dialogs-action",
|
||||
dialogs_dockable_actions,
|
||||
G_N_ELEMENTS (dialogs_dockable_actions),
|
||||
dialogs_create_dockable_cmd_callback);
|
||||
|
||||
gimp_action_group_add_string_actions (group, "dialogs-action",
|
||||
dialogs_toplevel_actions,
|
||||
G_N_ELEMENTS (dialogs_toplevel_actions),
|
||||
dialogs_create_toplevel_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
dialogs_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp = action_data_get_gimp (data);
|
||||
const gchar *toolbox_label = NULL;
|
||||
const gchar *toolbox_tooltip = NULL;
|
||||
|
||||
if (dialogs_actions_toolbox_exists (gimp))
|
||||
{
|
||||
toolbox_label = _("Tool_box");
|
||||
toolbox_tooltip = _("Raise the toolbox");
|
||||
}
|
||||
else
|
||||
{
|
||||
toolbox_label = _("New Tool_box");
|
||||
toolbox_tooltip = _("Create a new toolbox");
|
||||
}
|
||||
|
||||
gimp_action_group_set_action_label (group, "dialogs-toolbox", toolbox_label);
|
||||
gimp_action_group_set_action_tooltip (group, "dialogs-toolbox", toolbox_tooltip);
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DIALOGS_ACTIONS_H__
|
||||
#define __DIALOGS_ACTIONS_H__
|
||||
|
||||
|
||||
/* this check is needed for the extern declaration below to be correct */
|
||||
#ifndef __GIMP_ACTION_GROUP_H__
|
||||
#error "widgets/gimpactiongroup.h must be included prior to dialogs-actions.h"
|
||||
#endif
|
||||
|
||||
extern const GimpStringActionEntry dialogs_dockable_actions[];
|
||||
extern gint n_dialogs_dockable_actions;
|
||||
|
||||
|
||||
void dialogs_actions_setup (GimpActionGroup *group);
|
||||
void dialogs_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
gboolean dialogs_actions_toolbox_exists (Gimp *gimp);
|
||||
|
||||
|
||||
#endif /* __DIALOGS_ACTIONS_H__ */
|
|
@ -1,78 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
#include "widgets/gimpwindowstrategy.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "dialogs-commands.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
dialogs_create_toplevel_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
const gchar *identifier;
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
identifier = g_variant_get_string (value, NULL);
|
||||
|
||||
if (identifier)
|
||||
gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (widget),
|
||||
gimp_widget_get_monitor (widget),
|
||||
NULL /*ui_manager*/,
|
||||
identifier, -1, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
dialogs_create_dockable_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GtkWidget *widget;
|
||||
const gchar *identifier;
|
||||
return_if_no_gimp (gimp, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
identifier = g_variant_get_string (value, NULL);
|
||||
|
||||
if (identifier)
|
||||
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (gimp)),
|
||||
gimp,
|
||||
gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (widget),
|
||||
gimp_widget_get_monitor (widget),
|
||||
identifier);
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DIALOGS_COMMANDS_H__
|
||||
#define __DIALOGS_COMMANDS_H__
|
||||
|
||||
|
||||
void dialogs_create_toplevel_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dialogs_create_dockable_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DIALOGS_COMMANDS_H__ */
|
|
@ -1,141 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpdockwindow.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpmenudock.h"
|
||||
|
||||
#include "display/gimpimagewindow.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "dock-actions.h"
|
||||
#include "dock-commands.h"
|
||||
#include "window-actions.h"
|
||||
#include "window-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry dock_actions[] =
|
||||
{
|
||||
{ "dock-move-to-screen-menu", GIMP_ICON_WINDOW_MOVE_TO_SCREEN,
|
||||
NC_("dock-action", "M_ove to Screen"), NULL, NULL, NULL,
|
||||
GIMP_HELP_DOCK_CHANGE_SCREEN },
|
||||
|
||||
{ "dock-close", GIMP_ICON_WINDOW_CLOSE,
|
||||
NC_("dock-action", "Close Dock"), "", NULL,
|
||||
window_close_cmd_callback,
|
||||
GIMP_HELP_DOCK_CLOSE },
|
||||
|
||||
{ "dock-open-display", NULL,
|
||||
NC_("dock-action", "_Open Display..."), NULL,
|
||||
NC_("dock-action", "Connect to another display"),
|
||||
window_open_display_cmd_callback,
|
||||
NULL }
|
||||
};
|
||||
|
||||
static const GimpToggleActionEntry dock_toggle_actions[] =
|
||||
{
|
||||
{ "dock-show-image-menu", NULL,
|
||||
NC_("dock-action", "_Show Image Selection"), NULL, NULL,
|
||||
dock_toggle_image_menu_cmd_callback,
|
||||
TRUE,
|
||||
GIMP_HELP_DOCK_IMAGE_MENU },
|
||||
|
||||
{ "dock-auto-follow-active", NULL,
|
||||
NC_("dock-action", "Auto _Follow Active Image"), NULL, NULL,
|
||||
dock_toggle_auto_cmd_callback,
|
||||
TRUE,
|
||||
GIMP_HELP_DOCK_AUTO_BUTTON }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
dock_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "dock-action",
|
||||
dock_actions,
|
||||
G_N_ELEMENTS (dock_actions));
|
||||
|
||||
gimp_action_group_add_toggle_actions (group, "dock-action",
|
||||
dock_toggle_actions,
|
||||
G_N_ELEMENTS (dock_toggle_actions));
|
||||
|
||||
window_actions_setup (group, GIMP_HELP_DOCK_CHANGE_SCREEN);
|
||||
}
|
||||
|
||||
void
|
||||
dock_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget = action_data_get_widget (data);
|
||||
GtkWidget *toplevel = NULL;
|
||||
|
||||
if (widget)
|
||||
toplevel = gtk_widget_get_toplevel (widget);
|
||||
|
||||
#define SET_ACTIVE(action,active) \
|
||||
gimp_action_group_set_action_active (group, action, (active) != 0)
|
||||
#define SET_VISIBLE(action,active) \
|
||||
gimp_action_group_set_action_visible (group, action, (active) != 0)
|
||||
|
||||
if (GIMP_IS_DOCK_WINDOW (toplevel))
|
||||
{
|
||||
GimpDockWindow *dock_window = GIMP_DOCK_WINDOW (toplevel);
|
||||
gboolean show_image_menu = ! gimp_dock_window_has_toolbox (dock_window);
|
||||
|
||||
if (show_image_menu)
|
||||
{
|
||||
SET_VISIBLE ("dock-show-image-menu", TRUE);
|
||||
SET_VISIBLE ("dock-auto-follow-active", TRUE);
|
||||
|
||||
SET_ACTIVE ("dock-show-image-menu",
|
||||
gimp_dock_window_get_show_image_menu (dock_window));
|
||||
SET_ACTIVE ("dock-auto-follow-active",
|
||||
gimp_dock_window_get_auto_follow_active (dock_window));
|
||||
}
|
||||
else
|
||||
{
|
||||
SET_VISIBLE ("dock-show-image-menu", FALSE);
|
||||
SET_VISIBLE ("dock-auto-follow-active", FALSE);
|
||||
}
|
||||
|
||||
/* update the window actions only in the context of their
|
||||
* own window (not in the context of some display or NULL)
|
||||
* (see view-actions.c)
|
||||
*/
|
||||
window_actions_update (group, toplevel);
|
||||
}
|
||||
else if (GIMP_IS_IMAGE_WINDOW (toplevel))
|
||||
{
|
||||
SET_VISIBLE ("dock-show-image-menu", FALSE);
|
||||
SET_VISIBLE ("dock-auto-follow-active", FALSE);
|
||||
}
|
||||
|
||||
#undef SET_ACTIVE
|
||||
#undef SET_VISIBLE
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DOCK_ACTIONS_H__
|
||||
#define __DOCK_ACTIONS_H__
|
||||
|
||||
|
||||
void dock_actions_setup (GimpActionGroup *group);
|
||||
void dock_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DOCK_ACTIONS_H__ */
|
|
@ -1,85 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpdockwindow.h"
|
||||
#include "widgets/gimpdockwindow.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "dock-commands.h"
|
||||
|
||||
|
||||
static GimpDockWindow *
|
||||
dock_commands_get_dock_window_from_widget (GtkWidget *widget)
|
||||
{
|
||||
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
|
||||
GimpDockWindow *dock_window = NULL;
|
||||
|
||||
if (GIMP_IS_DOCK_WINDOW (toplevel))
|
||||
dock_window = GIMP_DOCK_WINDOW (toplevel);
|
||||
|
||||
return dock_window;
|
||||
}
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
dock_toggle_image_menu_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget = NULL;
|
||||
GimpDockWindow *dock_window = NULL;
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
dock_window = dock_commands_get_dock_window_from_widget (widget);
|
||||
|
||||
if (dock_window)
|
||||
{
|
||||
gboolean active = g_variant_get_boolean (value);
|
||||
|
||||
gimp_dock_window_set_show_image_menu (dock_window, active);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dock_toggle_auto_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget = NULL;
|
||||
GimpDockWindow *dock_window = NULL;
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
dock_window = dock_commands_get_dock_window_from_widget (widget);
|
||||
|
||||
if (dock_window)
|
||||
{
|
||||
gboolean active = g_variant_get_boolean (value);
|
||||
|
||||
gimp_dock_window_set_auto_follow_active (dock_window, active);
|
||||
}
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DOCK_COMMANDS_H__
|
||||
#define __DOCK_COMMANDS_H__
|
||||
|
||||
|
||||
void dock_toggle_image_menu_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dock_toggle_auto_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DOCK_COMMANDS_H__ */
|
|
@ -1,375 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimpcontainerview-utils.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpdock.h"
|
||||
#include "widgets/gimpdockable.h"
|
||||
#include "widgets/gimpdockbook.h"
|
||||
#include "widgets/gimpdocked.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "dialogs-actions.h"
|
||||
#include "dockable-actions.h"
|
||||
#include "dockable-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry dockable_actions[] =
|
||||
{
|
||||
{ "dockable-popup", NULL,
|
||||
NC_("dockable-action", "Dialogs Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_DOCK },
|
||||
|
||||
{ "dockable-menu", "image-missing", "" },
|
||||
{ "dockable-add-tab-menu", NULL, NC_("dockable-action",
|
||||
"_Add Tab") },
|
||||
{ "dockable-preview-size-menu", NULL, NC_("dockable-action",
|
||||
"_Preview Size") },
|
||||
{ "dockable-tab-style-menu", NULL, NC_("dockable-action",
|
||||
"_Tab Style") },
|
||||
|
||||
{ "dockable-close-tab", "window-close",
|
||||
NC_("dockable-action", "_Close Tab"), "", NULL,
|
||||
dockable_close_tab_cmd_callback,
|
||||
GIMP_HELP_DOCK_TAB_CLOSE },
|
||||
|
||||
{ "dockable-detach-tab", GIMP_ICON_DETACH,
|
||||
NC_("dockable-action", "_Detach Tab"), "", NULL,
|
||||
dockable_detach_tab_cmd_callback,
|
||||
GIMP_HELP_DOCK_TAB_DETACH }
|
||||
};
|
||||
|
||||
#define VIEW_SIZE(action,label,size) \
|
||||
{ "dockable-preview-size-" action, NULL, \
|
||||
(label), NULL, NULL, \
|
||||
(size), \
|
||||
GIMP_HELP_DOCK_PREVIEW_SIZE }
|
||||
#define TAB_STYLE(action,label,style) \
|
||||
{ "dockable-tab-style-" action, NULL, \
|
||||
(label), NULL, NULL, \
|
||||
(style), \
|
||||
GIMP_HELP_DOCK_TAB_STYLE }
|
||||
|
||||
static const GimpRadioActionEntry dockable_view_size_actions[] =
|
||||
{
|
||||
VIEW_SIZE ("tiny",
|
||||
NC_("preview-size", "_Tiny"), GIMP_VIEW_SIZE_TINY),
|
||||
VIEW_SIZE ("extra-small",
|
||||
NC_("preview-size", "E_xtra Small"), GIMP_VIEW_SIZE_EXTRA_SMALL),
|
||||
VIEW_SIZE ("small",
|
||||
NC_("preview-size", "_Small"), GIMP_VIEW_SIZE_SMALL),
|
||||
VIEW_SIZE ("medium",
|
||||
NC_("preview-size", "_Medium"), GIMP_VIEW_SIZE_MEDIUM),
|
||||
VIEW_SIZE ("large",
|
||||
NC_("preview-size", "_Large"), GIMP_VIEW_SIZE_LARGE),
|
||||
VIEW_SIZE ("extra-large",
|
||||
NC_("preview-size", "Ex_tra Large"), GIMP_VIEW_SIZE_EXTRA_LARGE),
|
||||
VIEW_SIZE ("huge",
|
||||
NC_("preview-size", "_Huge"), GIMP_VIEW_SIZE_HUGE),
|
||||
VIEW_SIZE ("enormous",
|
||||
NC_("preview-size", "_Enormous"), GIMP_VIEW_SIZE_ENORMOUS),
|
||||
VIEW_SIZE ("gigantic",
|
||||
NC_("preview-size", "_Gigantic"), GIMP_VIEW_SIZE_GIGANTIC)
|
||||
};
|
||||
|
||||
static const GimpRadioActionEntry dockable_tab_style_actions[] =
|
||||
{
|
||||
TAB_STYLE ("icon",
|
||||
NC_("tab-style", "_Icon"), GIMP_TAB_STYLE_ICON),
|
||||
TAB_STYLE ("preview",
|
||||
NC_("tab-style", "Current _Status"), GIMP_TAB_STYLE_PREVIEW),
|
||||
TAB_STYLE ("name",
|
||||
NC_("tab-style", "_Text"), GIMP_TAB_STYLE_NAME),
|
||||
TAB_STYLE ("icon-name",
|
||||
NC_("tab-style", "I_con & Text"), GIMP_TAB_STYLE_ICON_NAME),
|
||||
TAB_STYLE ("preview-name",
|
||||
NC_("tab-style", "St_atus & Text"), GIMP_TAB_STYLE_PREVIEW_NAME),
|
||||
TAB_STYLE ("automatic",
|
||||
NC_("tab-style", "Automatic"), GIMP_TAB_STYLE_AUTOMATIC)
|
||||
};
|
||||
|
||||
#undef VIEW_SIZE
|
||||
#undef TAB_STYLE
|
||||
|
||||
|
||||
static const GimpToggleActionEntry dockable_toggle_actions[] =
|
||||
{
|
||||
{ "dockable-lock-tab", NULL,
|
||||
NC_("dockable-action", "Loc_k Tab to Dock"), NULL,
|
||||
NC_("dockable-action",
|
||||
"Protect this tab from being dragged with the mouse pointer"),
|
||||
dockable_lock_tab_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_DOCK_TAB_LOCK },
|
||||
|
||||
{ "dockable-show-button-bar", NULL,
|
||||
NC_("dockable-action", "Show _Button Bar"), NULL, NULL,
|
||||
dockable_show_button_bar_cmd_callback,
|
||||
TRUE,
|
||||
GIMP_HELP_DOCK_SHOW_BUTTON_BAR }
|
||||
};
|
||||
|
||||
static const GimpRadioActionEntry dockable_view_type_actions[] =
|
||||
{
|
||||
{ "dockable-view-type-list", NULL,
|
||||
NC_("dockable-action", "View as _List"), NULL, NULL,
|
||||
GIMP_VIEW_TYPE_LIST,
|
||||
GIMP_HELP_DOCK_VIEW_AS_LIST },
|
||||
|
||||
{ "dockable-view-type-grid", NULL,
|
||||
NC_("dockable-action", "View as _Grid"), NULL, NULL,
|
||||
GIMP_VIEW_TYPE_GRID,
|
||||
GIMP_HELP_DOCK_VIEW_AS_GRID }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
dockable_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "dockable-action",
|
||||
dockable_actions,
|
||||
G_N_ELEMENTS (dockable_actions));
|
||||
|
||||
gimp_action_group_add_toggle_actions (group, "dockable-action",
|
||||
dockable_toggle_actions,
|
||||
G_N_ELEMENTS (dockable_toggle_actions));
|
||||
|
||||
gimp_action_group_add_string_actions (group, "dialogs-action",
|
||||
dialogs_dockable_actions,
|
||||
n_dialogs_dockable_actions,
|
||||
dockable_add_tab_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "preview-size",
|
||||
dockable_view_size_actions,
|
||||
G_N_ELEMENTS (dockable_view_size_actions),
|
||||
NULL,
|
||||
GIMP_VIEW_SIZE_MEDIUM,
|
||||
dockable_view_size_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "tab-style",
|
||||
dockable_tab_style_actions,
|
||||
G_N_ELEMENTS (dockable_tab_style_actions),
|
||||
NULL,
|
||||
GIMP_TAB_STYLE_AUTOMATIC,
|
||||
dockable_tab_style_cmd_callback);
|
||||
|
||||
gimp_action_group_add_radio_actions (group, "dockable-action",
|
||||
dockable_view_type_actions,
|
||||
G_N_ELEMENTS (dockable_view_type_actions),
|
||||
NULL,
|
||||
GIMP_VIEW_TYPE_LIST,
|
||||
dockable_toggle_view_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
dockable_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockable *dockable;
|
||||
GimpDockbook *dockbook;
|
||||
GimpDocked *docked;
|
||||
GimpDock *dock;
|
||||
GimpDialogFactoryEntry *entry;
|
||||
GimpContainerView *view;
|
||||
GimpViewType view_type = -1;
|
||||
gboolean list_view_available = FALSE;
|
||||
gboolean grid_view_available = FALSE;
|
||||
gboolean locked = FALSE;
|
||||
GimpViewSize view_size = -1;
|
||||
GimpTabStyle tab_style = -1;
|
||||
gint n_pages = 0;
|
||||
gint n_books = 0;
|
||||
GimpDockedInterface *docked_iface = NULL;
|
||||
|
||||
if (GIMP_IS_DOCKBOOK (data))
|
||||
{
|
||||
gint page_num;
|
||||
|
||||
dockbook = GIMP_DOCKBOOK (data);
|
||||
|
||||
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (dockbook));
|
||||
|
||||
dockable = (GimpDockable *)
|
||||
gtk_notebook_get_nth_page (GTK_NOTEBOOK (dockbook), page_num);
|
||||
}
|
||||
else if (GIMP_IS_DOCKABLE (data))
|
||||
{
|
||||
dockable = GIMP_DOCKABLE (data);
|
||||
dockbook = gimp_dockable_get_dockbook (dockable);
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
docked = GIMP_DOCKED (gtk_bin_get_child (GTK_BIN (dockable)));
|
||||
dock = gimp_dockbook_get_dock (dockbook);
|
||||
|
||||
|
||||
gimp_dialog_factory_from_widget (GTK_WIDGET (dockable), &entry);
|
||||
|
||||
if (entry)
|
||||
{
|
||||
gchar *identifier;
|
||||
gchar *substring = NULL;
|
||||
|
||||
identifier = g_strdup (entry->identifier);
|
||||
|
||||
if ((substring = strstr (identifier, "grid")))
|
||||
view_type = GIMP_VIEW_TYPE_GRID;
|
||||
else if ((substring = strstr (identifier, "list")))
|
||||
view_type = GIMP_VIEW_TYPE_LIST;
|
||||
|
||||
if (substring)
|
||||
{
|
||||
memcpy (substring, "list", 4);
|
||||
if (gimp_dialog_factory_find_entry (gimp_dock_get_dialog_factory (dock),
|
||||
identifier))
|
||||
list_view_available = TRUE;
|
||||
|
||||
memcpy (substring, "grid", 4);
|
||||
if (gimp_dialog_factory_find_entry (gimp_dock_get_dialog_factory (dock),
|
||||
identifier))
|
||||
grid_view_available = TRUE;
|
||||
}
|
||||
|
||||
g_free (identifier);
|
||||
}
|
||||
|
||||
view = gimp_container_view_get_by_dockable (dockable);
|
||||
|
||||
if (view)
|
||||
view_size = gimp_container_view_get_view_size (view, NULL);
|
||||
|
||||
tab_style = gimp_dockable_get_tab_style (dockable);
|
||||
|
||||
n_pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (dockbook));
|
||||
n_books = g_list_length (gimp_dock_get_dockbooks (dock));
|
||||
|
||||
#define SET_ACTIVE(action,active) \
|
||||
gimp_action_group_set_action_active (group, action, (active) != 0)
|
||||
#define SET_VISIBLE(action,active) \
|
||||
gimp_action_group_set_action_visible (group, action, (active) != 0)
|
||||
#define SET_SENSITIVE(action,sensitive) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (sensitive) != 0)
|
||||
|
||||
|
||||
locked = gimp_dockable_is_locked (dockable);
|
||||
|
||||
SET_SENSITIVE ("dockable-detach-tab", (! locked &&
|
||||
(n_pages > 1 || n_books > 1)));
|
||||
|
||||
SET_ACTIVE ("dockable-lock-tab", locked);
|
||||
|
||||
SET_VISIBLE ("dockable-preview-size-menu", view_size != -1);
|
||||
|
||||
if (view_size != -1)
|
||||
{
|
||||
if (view_size >= GIMP_VIEW_SIZE_GIGANTIC)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-gigantic", TRUE);
|
||||
}
|
||||
else if (view_size >= GIMP_VIEW_SIZE_ENORMOUS)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-enormous", TRUE);
|
||||
}
|
||||
else if (view_size >= GIMP_VIEW_SIZE_HUGE)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-huge", TRUE);
|
||||
}
|
||||
else if (view_size >= GIMP_VIEW_SIZE_EXTRA_LARGE)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-extra-large", TRUE);
|
||||
}
|
||||
else if (view_size >= GIMP_VIEW_SIZE_LARGE)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-large", TRUE);
|
||||
}
|
||||
else if (view_size >= GIMP_VIEW_SIZE_MEDIUM)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-medium", TRUE);
|
||||
}
|
||||
else if (view_size >= GIMP_VIEW_SIZE_SMALL)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-small", TRUE);
|
||||
}
|
||||
else if (view_size >= GIMP_VIEW_SIZE_EXTRA_SMALL)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-extra-small", TRUE);
|
||||
}
|
||||
else if (view_size >= GIMP_VIEW_SIZE_TINY)
|
||||
{
|
||||
SET_ACTIVE ("dockable-preview-size-tiny", TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
if (tab_style == GIMP_TAB_STYLE_ICON)
|
||||
SET_ACTIVE ("dockable-tab-style-icon", TRUE);
|
||||
else if (tab_style == GIMP_TAB_STYLE_PREVIEW)
|
||||
SET_ACTIVE ("dockable-tab-style-preview", TRUE);
|
||||
else if (tab_style == GIMP_TAB_STYLE_NAME)
|
||||
SET_ACTIVE ("dockable-tab-style-name", TRUE);
|
||||
else if (tab_style == GIMP_TAB_STYLE_ICON_NAME)
|
||||
SET_ACTIVE ("dockable-tab-style-icon-name", TRUE);
|
||||
else if (tab_style == GIMP_TAB_STYLE_PREVIEW_NAME)
|
||||
SET_ACTIVE ("dockable-tab-style-preview-name", TRUE);
|
||||
else if (tab_style == GIMP_TAB_STYLE_AUTOMATIC)
|
||||
SET_ACTIVE ("dockable-tab-style-automatic", TRUE);
|
||||
|
||||
docked_iface = GIMP_DOCKED_GET_INTERFACE (docked);
|
||||
SET_SENSITIVE ("dockable-tab-style-preview",
|
||||
docked_iface->get_preview);
|
||||
SET_SENSITIVE ("dockable-tab-style-preview-name",
|
||||
docked_iface->get_preview);
|
||||
|
||||
SET_VISIBLE ("dockable-view-type-grid", view_type != -1);
|
||||
SET_VISIBLE ("dockable-view-type-list", view_type != -1);
|
||||
|
||||
if (view_type != -1)
|
||||
{
|
||||
if (view_type == GIMP_VIEW_TYPE_LIST)
|
||||
SET_ACTIVE ("dockable-view-type-list", TRUE);
|
||||
else
|
||||
SET_ACTIVE ("dockable-view-type-grid", TRUE);
|
||||
|
||||
SET_SENSITIVE ("dockable-view-type-grid", grid_view_available);
|
||||
SET_SENSITIVE ("dockable-view-type-list", list_view_available);
|
||||
}
|
||||
|
||||
SET_VISIBLE ("dockable-show-button-bar", gimp_docked_has_button_bar (docked));
|
||||
SET_ACTIVE ("dockable-show-button-bar",
|
||||
gimp_docked_get_show_button_bar (docked));
|
||||
|
||||
#undef SET_ACTIVE
|
||||
#undef SET_VISIBLE
|
||||
#undef SET_SENSITIVE
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DOCKABLE_ACTIONS_H__
|
||||
#define __DOCKABLE_ACTIONS_H__
|
||||
|
||||
|
||||
void dockable_actions_setup (GimpActionGroup *group);
|
||||
void dockable_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DOCKABLE_ACTIONS_H__ */
|
|
@ -1,298 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimpcontainerview-utils.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpdock.h"
|
||||
#include "widgets/gimpdockable.h"
|
||||
#include "widgets/gimpdockbook.h"
|
||||
#include "widgets/gimpdocked.h"
|
||||
#include "widgets/gimpsessioninfo.h"
|
||||
|
||||
#include "dockable-commands.h"
|
||||
|
||||
|
||||
static GimpDockable * dockable_get_current (GimpDockbook *dockbook);
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
dockable_add_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
|
||||
gimp_dockbook_add_from_dialog_factory (dockbook,
|
||||
g_variant_get_string (value, NULL),
|
||||
-1);
|
||||
}
|
||||
|
||||
void
|
||||
dockable_close_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
|
||||
if (dockable)
|
||||
{
|
||||
g_object_ref (dockable);
|
||||
gimp_dockbook_remove (dockbook, dockable);
|
||||
gtk_widget_destroy (GTK_WIDGET (dockable));
|
||||
g_object_unref (dockable);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dockable_detach_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
|
||||
if (dockable)
|
||||
gimp_dockable_detach (dockable);
|
||||
}
|
||||
|
||||
void
|
||||
dockable_lock_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
|
||||
if (dockable)
|
||||
{
|
||||
gboolean lock = g_variant_get_boolean (value);
|
||||
|
||||
gimp_dockable_set_locked (dockable, lock);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dockable_toggle_view_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable;
|
||||
GimpViewType view_type;
|
||||
gint page_num;
|
||||
|
||||
view_type = (GimpViewType) g_variant_get_int32 (value);
|
||||
|
||||
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (dockbook));
|
||||
|
||||
dockable = (GimpDockable *)
|
||||
gtk_notebook_get_nth_page (GTK_NOTEBOOK (dockbook), page_num);
|
||||
|
||||
if (dockable)
|
||||
{
|
||||
GimpDialogFactoryEntry *entry;
|
||||
|
||||
gimp_dialog_factory_from_widget (GTK_WIDGET (dockable), &entry);
|
||||
|
||||
if (entry)
|
||||
{
|
||||
gchar *identifier;
|
||||
gchar *substring = NULL;
|
||||
|
||||
identifier = g_strdup (entry->identifier);
|
||||
|
||||
substring = strstr (identifier, "grid");
|
||||
|
||||
if (substring && view_type == GIMP_VIEW_TYPE_GRID)
|
||||
{
|
||||
g_free (identifier);
|
||||
return;
|
||||
}
|
||||
|
||||
if (! substring)
|
||||
{
|
||||
substring = strstr (identifier, "list");
|
||||
|
||||
if (substring && view_type == GIMP_VIEW_TYPE_LIST)
|
||||
{
|
||||
g_free (identifier);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (substring)
|
||||
{
|
||||
GimpContainerView *old_view;
|
||||
GtkWidget *new_dockable;
|
||||
GimpDock *dock;
|
||||
gint view_size = -1;
|
||||
|
||||
if (view_type == GIMP_VIEW_TYPE_LIST)
|
||||
memcpy (substring, "list", 4);
|
||||
else if (view_type == GIMP_VIEW_TYPE_GRID)
|
||||
memcpy (substring, "grid", 4);
|
||||
|
||||
old_view = gimp_container_view_get_by_dockable (dockable);
|
||||
|
||||
if (old_view)
|
||||
view_size = gimp_container_view_get_view_size (old_view, NULL);
|
||||
|
||||
dock = gimp_dockbook_get_dock (dockbook);
|
||||
new_dockable = gimp_dialog_factory_dockable_new (gimp_dock_get_dialog_factory (dock),
|
||||
dock,
|
||||
identifier,
|
||||
view_size);
|
||||
|
||||
if (new_dockable)
|
||||
{
|
||||
GimpDocked *old;
|
||||
GimpDocked *new;
|
||||
gboolean show;
|
||||
|
||||
gimp_dockable_set_locked (GIMP_DOCKABLE (new_dockable),
|
||||
gimp_dockable_is_locked (dockable));
|
||||
|
||||
old = GIMP_DOCKED (gtk_bin_get_child (GTK_BIN (dockable)));
|
||||
new = GIMP_DOCKED (gtk_bin_get_child (GTK_BIN (new_dockable)));
|
||||
|
||||
show = gimp_docked_get_show_button_bar (old);
|
||||
gimp_docked_set_show_button_bar (new, show);
|
||||
|
||||
/* Maybe gimp_dialog_factory_dockable_new() returned
|
||||
* an already existing singleton dockable, so check
|
||||
* if it already is attached to a dockbook.
|
||||
*/
|
||||
if (! gimp_dockable_get_dockbook (GIMP_DOCKABLE (new_dockable)))
|
||||
{
|
||||
gimp_dockbook_add (dockbook, GIMP_DOCKABLE (new_dockable),
|
||||
page_num);
|
||||
|
||||
g_object_ref (dockable);
|
||||
gimp_dockbook_remove (dockbook, dockable);
|
||||
gtk_widget_destroy (GTK_WIDGET (dockable));
|
||||
g_object_unref (dockable);
|
||||
|
||||
gtk_notebook_set_current_page (GTK_NOTEBOOK (dockbook),
|
||||
page_num);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_free (identifier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dockable_view_size_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
gint view_size;
|
||||
|
||||
view_size = g_variant_get_int32 (value);
|
||||
|
||||
if (dockable)
|
||||
{
|
||||
GimpContainerView *view = gimp_container_view_get_by_dockable (dockable);
|
||||
|
||||
if (view)
|
||||
{
|
||||
gint old_size;
|
||||
gint border_width;
|
||||
|
||||
old_size = gimp_container_view_get_view_size (view, &border_width);
|
||||
|
||||
if (old_size != view_size)
|
||||
gimp_container_view_set_view_size (view, view_size, border_width);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dockable_tab_style_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
GimpTabStyle tab_style;
|
||||
|
||||
tab_style = (GimpTabStyle) g_variant_get_int32 (value);
|
||||
|
||||
if (dockable && gimp_dockable_get_tab_style (dockable) != tab_style)
|
||||
{
|
||||
GtkWidget *tab_widget;
|
||||
|
||||
gimp_dockable_set_tab_style (dockable, tab_style);
|
||||
|
||||
tab_widget = gimp_dockbook_create_tab_widget (dockbook, dockable);
|
||||
|
||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (dockbook),
|
||||
GTK_WIDGET (dockable),
|
||||
tab_widget);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dockable_show_button_bar_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
|
||||
if (dockable)
|
||||
{
|
||||
GimpDocked *docked;
|
||||
gboolean show;
|
||||
|
||||
docked = GIMP_DOCKED (gtk_bin_get_child (GTK_BIN (dockable)));
|
||||
show = g_variant_get_boolean (value);
|
||||
|
||||
gimp_docked_set_show_button_bar (docked, show);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static GimpDockable *
|
||||
dockable_get_current (GimpDockbook *dockbook)
|
||||
{
|
||||
gint page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (dockbook));
|
||||
|
||||
return (GimpDockable *) gtk_notebook_get_nth_page (GTK_NOTEBOOK (dockbook),
|
||||
page_num);
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DOCKABLE_COMMANDS_H__
|
||||
#define __DOCKABLE_COMMANDS_H__
|
||||
|
||||
|
||||
void dockable_add_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dockable_close_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dockable_detach_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dockable_lock_tab_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void dockable_toggle_view_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dockable_view_size_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dockable_tab_style_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void dockable_show_button_bar_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DOCKABLE_COMMANDS_H__ */
|
|
@ -1,143 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimpcontext.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "documents-actions.h"
|
||||
#include "documents-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry documents_actions[] =
|
||||
{
|
||||
{ "documents-popup", GIMP_ICON_DOCUMENT_OPEN_RECENT,
|
||||
NC_("documents-action", "Documents Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_DOCUMENT_DIALOG },
|
||||
|
||||
{ "documents-open", GIMP_ICON_DOCUMENT_OPEN,
|
||||
NC_("documents-action", "_Open Image"), NULL,
|
||||
NC_("documents-action", "Open the selected entry"),
|
||||
documents_open_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_OPEN },
|
||||
|
||||
{ "documents-raise-or-open", NULL,
|
||||
NC_("documents-action", "_Raise or Open Image"), NULL,
|
||||
NC_("documents-action", "Raise window if already open"),
|
||||
documents_raise_or_open_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_OPEN },
|
||||
|
||||
{ "documents-file-open-dialog", NULL,
|
||||
NC_("documents-action", "File Open _Dialog"), NULL,
|
||||
NC_("documents-action", "Open image dialog"),
|
||||
documents_file_open_dialog_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_OPEN },
|
||||
|
||||
{ "documents-copy-location", GIMP_ICON_EDIT_COPY,
|
||||
NC_("documents-action", "Copy Image _Location"), NULL,
|
||||
NC_("documents-action", "Copy image location to clipboard"),
|
||||
documents_copy_location_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_COPY_LOCATION },
|
||||
|
||||
{ "documents-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
|
||||
NC_("documents-action", "Show in _File Manager"), NULL,
|
||||
NC_("documents-action", "Show image location in the file manager"),
|
||||
documents_show_in_file_manager_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_SHOW_IN_FILE_MANAGER },
|
||||
|
||||
{ "documents-remove", GIMP_ICON_LIST_REMOVE,
|
||||
NC_("documents-action", "Remove _Entry"), NULL,
|
||||
NC_("documents-action", "Remove the selected entry"),
|
||||
documents_remove_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_REMOVE },
|
||||
|
||||
{ "documents-clear", GIMP_ICON_SHRED,
|
||||
NC_("documents-action", "_Clear History"), NULL,
|
||||
NC_("documents-action", "Clear the entire document history"),
|
||||
documents_clear_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_CLEAR },
|
||||
|
||||
{ "documents-recreate-preview", GIMP_ICON_VIEW_REFRESH,
|
||||
NC_("documents-action", "Recreate _Preview"), NULL,
|
||||
NC_("documents-action", "Recreate preview"),
|
||||
documents_recreate_preview_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_REFRESH },
|
||||
|
||||
{ "documents-reload-previews", NULL,
|
||||
NC_("documents-action", "Reload _all Previews"), NULL,
|
||||
NC_("documents-action", "Reload all previews"),
|
||||
documents_reload_previews_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_REFRESH },
|
||||
|
||||
{ "documents-remove-dangling", NULL,
|
||||
NC_("documents-action", "Remove Dangling E_ntries"), NULL,
|
||||
NC_("documents-action",
|
||||
"Remove entries for which the corresponding file is not available"),
|
||||
documents_remove_dangling_cmd_callback,
|
||||
GIMP_HELP_DOCUMENT_REFRESH }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
documents_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "documents-action",
|
||||
documents_actions,
|
||||
G_N_ELEMENTS (documents_actions));
|
||||
}
|
||||
|
||||
void
|
||||
documents_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpImagefile *imagefile = NULL;
|
||||
|
||||
context = action_data_get_context (data);
|
||||
|
||||
if (context)
|
||||
imagefile = gimp_context_get_imagefile (context);
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
|
||||
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
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DOCUMENTS_ACTIONS_H__
|
||||
#define __DOCUMENTS_ACTIONS_H__
|
||||
|
||||
|
||||
void documents_actions_setup (GimpActionGroup *group);
|
||||
void documents_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DOCUMENTS_ACTIONS_H__ */
|
|
@ -1,410 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpthumb/gimpthumb.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "config/gimpcoreconfig.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontainer.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimagefile.h"
|
||||
|
||||
#include "file/file-open.h"
|
||||
|
||||
#include "widgets/gimpclipboard.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
#include "widgets/gimpcontainerview-utils.h"
|
||||
#include "widgets/gimpdocumentview.h"
|
||||
#include "widgets/gimpmessagebox.h"
|
||||
#include "widgets/gimpmessagedialog.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplay-foreach.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
|
||||
#include "documents-commands.h"
|
||||
#include "file-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const gchar *name;
|
||||
gboolean found;
|
||||
} RaiseClosure;
|
||||
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
static void documents_open_image (GtkWidget *editor,
|
||||
GimpContext *context,
|
||||
GimpImagefile *imagefile);
|
||||
static void documents_raise_display (GimpDisplay *display,
|
||||
RaiseClosure *closure);
|
||||
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
documents_open_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
GimpContainer *container;
|
||||
GimpImagefile *imagefile;
|
||||
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
container = gimp_container_view_get_container (editor->view);
|
||||
|
||||
imagefile = gimp_context_get_imagefile (context);
|
||||
|
||||
if (imagefile && gimp_container_have (container, GIMP_OBJECT (imagefile)))
|
||||
{
|
||||
documents_open_image (GTK_WIDGET (editor), context, imagefile);
|
||||
}
|
||||
else
|
||||
{
|
||||
file_file_open_dialog (context->gimp, NULL, GTK_WIDGET (editor));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
documents_raise_or_open_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
GimpContainer *container;
|
||||
GimpImagefile *imagefile;
|
||||
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
container = gimp_container_view_get_container (editor->view);
|
||||
|
||||
imagefile = gimp_context_get_imagefile (context);
|
||||
|
||||
if (imagefile && gimp_container_have (container, GIMP_OBJECT (imagefile)))
|
||||
{
|
||||
RaiseClosure closure;
|
||||
|
||||
closure.name = gimp_object_get_name (imagefile);
|
||||
closure.found = FALSE;
|
||||
|
||||
gimp_container_foreach (context->gimp->displays,
|
||||
(GFunc) documents_raise_display,
|
||||
&closure);
|
||||
|
||||
if (! closure.found)
|
||||
documents_open_image (GTK_WIDGET (editor), context, imagefile);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
documents_file_open_dialog_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
GimpContainer *container;
|
||||
GimpImagefile *imagefile;
|
||||
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
container = gimp_container_view_get_container (editor->view);
|
||||
|
||||
imagefile = gimp_context_get_imagefile (context);
|
||||
|
||||
if (imagefile && gimp_container_have (container, GIMP_OBJECT (imagefile)))
|
||||
{
|
||||
file_file_open_dialog (context->gimp,
|
||||
gimp_imagefile_get_file (imagefile),
|
||||
GTK_WIDGET (editor));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
documents_copy_location_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
GimpImagefile *imagefile;
|
||||
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
imagefile = gimp_context_get_imagefile (context);
|
||||
|
||||
if (imagefile)
|
||||
gimp_clipboard_set_text (context->gimp,
|
||||
gimp_object_get_name (imagefile));
|
||||
}
|
||||
|
||||
void
|
||||
documents_show_in_file_manager_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
GimpImagefile *imagefile;
|
||||
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
imagefile = gimp_context_get_imagefile (context);
|
||||
|
||||
if (imagefile)
|
||||
{
|
||||
GFile *file = g_file_new_for_uri (gimp_object_get_name (imagefile));
|
||||
GError *error = NULL;
|
||||
|
||||
if (! gimp_file_show_in_file_manager (file, &error))
|
||||
{
|
||||
gimp_message (context->gimp, G_OBJECT (editor),
|
||||
GIMP_MESSAGE_ERROR,
|
||||
_("Can't show file in file manager: %s"),
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
|
||||
g_object_unref (file);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
documents_remove_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context = gimp_container_view_get_context (editor->view);
|
||||
GimpImagefile *imagefile = gimp_context_get_imagefile (context);
|
||||
const gchar *uri;
|
||||
|
||||
uri = gimp_object_get_name (imagefile);
|
||||
|
||||
gtk_recent_manager_remove_item (gtk_recent_manager_get_default (), uri, NULL);
|
||||
|
||||
gimp_container_view_remove_active (editor->view);
|
||||
}
|
||||
|
||||
void
|
||||
documents_clear_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context = gimp_container_view_get_context (editor->view);
|
||||
Gimp *gimp = context->gimp;
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gimp_message_dialog_new (_("Clear Document History"),
|
||||
GIMP_ICON_SHRED,
|
||||
GTK_WIDGET (editor),
|
||||
GTK_DIALOG_MODAL |
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
gimp_standard_help_func, NULL,
|
||||
|
||||
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
||||
_("Cl_ear"), GTK_RESPONSE_OK,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
g_signal_connect_object (gtk_widget_get_toplevel (GTK_WIDGET (editor)),
|
||||
"unmap",
|
||||
G_CALLBACK (gtk_widget_destroy),
|
||||
dialog, G_CONNECT_SWAPPED);
|
||||
|
||||
gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (dialog)->box,
|
||||
_("Clear the Recent Documents list?"));
|
||||
|
||||
gimp_message_box_set_text (GIMP_MESSAGE_DIALOG (dialog)->box,
|
||||
_("Clearing the document history will "
|
||||
"permanently remove all images from "
|
||||
"the recent documents list."));
|
||||
|
||||
if (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK)
|
||||
{
|
||||
GtkRecentManager *manager = gtk_recent_manager_get_default ();
|
||||
GList *items;
|
||||
GList *list;
|
||||
|
||||
items = gtk_recent_manager_get_items (manager);
|
||||
|
||||
for (list = items; list; list = list->next)
|
||||
{
|
||||
GtkRecentInfo *info = list->data;
|
||||
|
||||
if (gtk_recent_info_has_application (info,
|
||||
"GNU Image Manipulation Program"))
|
||||
{
|
||||
gtk_recent_manager_remove_item (manager,
|
||||
gtk_recent_info_get_uri (info),
|
||||
NULL);
|
||||
}
|
||||
|
||||
gtk_recent_info_unref (info);
|
||||
}
|
||||
|
||||
g_list_free (items);
|
||||
|
||||
gimp_container_clear (gimp->documents);
|
||||
}
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
void
|
||||
documents_recreate_preview_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context;
|
||||
GimpContainer *container;
|
||||
GimpImagefile *imagefile;
|
||||
|
||||
context = gimp_container_view_get_context (editor->view);
|
||||
container = gimp_container_view_get_container (editor->view);
|
||||
|
||||
imagefile = gimp_context_get_imagefile (context);
|
||||
|
||||
if (imagefile && gimp_container_have (container, GIMP_OBJECT (imagefile)))
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
if (! gimp_imagefile_create_thumbnail (imagefile,
|
||||
context, NULL,
|
||||
context->gimp->config->thumbnail_size,
|
||||
FALSE, &error))
|
||||
{
|
||||
gimp_message_literal (context->gimp,
|
||||
NULL , GIMP_MESSAGE_ERROR,
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
documents_reload_previews_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContainer *container;
|
||||
|
||||
container = gimp_container_view_get_container (editor->view);
|
||||
|
||||
gimp_container_foreach (container,
|
||||
(GFunc) gimp_imagefile_update,
|
||||
editor->view);
|
||||
}
|
||||
|
||||
static void
|
||||
documents_remove_dangling_foreach (GimpImagefile *imagefile,
|
||||
GimpContainer *container)
|
||||
{
|
||||
GimpThumbnail *thumbnail = gimp_imagefile_get_thumbnail (imagefile);
|
||||
|
||||
if (gimp_thumbnail_peek_image (thumbnail) == GIMP_THUMB_STATE_NOT_FOUND)
|
||||
{
|
||||
const gchar *uri = gimp_object_get_name (imagefile);
|
||||
|
||||
gtk_recent_manager_remove_item (gtk_recent_manager_get_default (), uri,
|
||||
NULL);
|
||||
|
||||
gimp_container_remove (container, GIMP_OBJECT (imagefile));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
documents_remove_dangling_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContainer *container;
|
||||
|
||||
container = gimp_container_view_get_container (editor->view);
|
||||
|
||||
gimp_container_foreach (container,
|
||||
(GFunc) documents_remove_dangling_foreach,
|
||||
container);
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static void
|
||||
documents_open_image (GtkWidget *editor,
|
||||
GimpContext *context,
|
||||
GimpImagefile *imagefile)
|
||||
{
|
||||
GFile *file;
|
||||
GimpImage *image;
|
||||
GimpPDBStatusType status;
|
||||
GError *error = NULL;
|
||||
|
||||
file = gimp_imagefile_get_file (imagefile);
|
||||
|
||||
image = file_open_with_display (context->gimp, context, NULL, file, FALSE,
|
||||
G_OBJECT (gtk_widget_get_screen (editor)),
|
||||
gimp_widget_get_monitor (editor),
|
||||
&status, &error);
|
||||
|
||||
if (! image && status != GIMP_PDB_CANCEL)
|
||||
{
|
||||
gimp_message (context->gimp, G_OBJECT (editor), GIMP_MESSAGE_ERROR,
|
||||
_("Opening '%s' failed:\n\n%s"),
|
||||
gimp_file_get_utf8_name (file), error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
documents_raise_display (GimpDisplay *display,
|
||||
RaiseClosure *closure)
|
||||
{
|
||||
const gchar *uri = gimp_object_get_name (gimp_display_get_image (display));
|
||||
|
||||
if (! g_strcmp0 (closure->name, uri))
|
||||
{
|
||||
closure->found = TRUE;
|
||||
gimp_display_shell_present (gimp_display_get_shell (display));
|
||||
}
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DOCUMENTS_COMMANDS_H__
|
||||
#define __DOCUMENTS_COMMANDS_H__
|
||||
|
||||
|
||||
void documents_open_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_raise_or_open_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_file_open_dialog_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_copy_location_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_show_in_file_manager_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_remove_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_clear_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_recreate_preview_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_reload_previews_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void documents_remove_dangling_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DOCUMENTS_COMMANDS_H__ */
|
|
@ -1,231 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimplayermask.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "drawable-actions.h"
|
||||
#include "drawable-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry drawable_actions[] =
|
||||
{
|
||||
{ "drawable-equalize", NULL,
|
||||
NC_("drawable-action", "_Equalize"), NULL,
|
||||
NC_("drawable-action", "Automatic contrast enhancement"),
|
||||
drawable_equalize_cmd_callback,
|
||||
GIMP_HELP_LAYER_EQUALIZE },
|
||||
|
||||
{ "drawable-levels-stretch", NULL,
|
||||
NC_("drawable-action", "_White Balance"), NULL,
|
||||
NC_("drawable-action", "Automatic white balance correction"),
|
||||
drawable_levels_stretch_cmd_callback,
|
||||
GIMP_HELP_LAYER_WHITE_BALANCE }
|
||||
};
|
||||
|
||||
static const GimpToggleActionEntry drawable_toggle_actions[] =
|
||||
{
|
||||
{ "drawable-visible", GIMP_ICON_VISIBLE,
|
||||
NC_("drawable-action", "Toggle Drawable _Visibility"), NULL, NULL,
|
||||
drawable_visible_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_VISIBLE },
|
||||
|
||||
{ "drawable-linked", GIMP_ICON_LINKED,
|
||||
NC_("drawable-action", "Toggle Drawable _Linked State"), NULL, NULL,
|
||||
drawable_linked_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_LINKED },
|
||||
|
||||
{ "drawable-lock-content", NULL /* GIMP_ICON_LOCK */,
|
||||
NC_("drawable-action", "L_ock Pixels of Drawable"), NULL,
|
||||
NC_("drawable-action",
|
||||
"Keep the pixels on this drawable from being modified"),
|
||||
drawable_lock_content_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_LOCK_PIXELS },
|
||||
|
||||
{ "drawable-lock-position", GIMP_ICON_TOOL_MOVE,
|
||||
NC_("drawable-action", "L_ock Position of Drawable"), NULL,
|
||||
NC_("drawable-action",
|
||||
"Keep the position on this drawable from being modified"),
|
||||
drawable_lock_position_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_LOCK_POSITION },
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry drawable_flip_actions[] =
|
||||
{
|
||||
{ "drawable-flip-horizontal", GIMP_ICON_OBJECT_FLIP_HORIZONTAL,
|
||||
NC_("drawable-action", "Flip _Horizontally"), NULL,
|
||||
NC_("drawable-action", "Flip drawable horizontally"),
|
||||
GIMP_ORIENTATION_HORIZONTAL, FALSE,
|
||||
GIMP_HELP_LAYER_FLIP_HORIZONTAL },
|
||||
|
||||
{ "drawable-flip-vertical", GIMP_ICON_OBJECT_FLIP_VERTICAL,
|
||||
NC_("drawable-action", "Flip _Vertically"), NULL,
|
||||
NC_("drawable-action", "Flip drawable vertically"),
|
||||
GIMP_ORIENTATION_VERTICAL, FALSE,
|
||||
GIMP_HELP_LAYER_FLIP_VERTICAL }
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry drawable_rotate_actions[] =
|
||||
{
|
||||
{ "drawable-rotate-90", GIMP_ICON_OBJECT_ROTATE_90,
|
||||
NC_("drawable-action", "Rotate 90° _clockwise"), NULL,
|
||||
NC_("drawable-action", "Rotate drawable 90 degrees to the right"),
|
||||
GIMP_ROTATE_90, FALSE,
|
||||
GIMP_HELP_LAYER_ROTATE_90 },
|
||||
|
||||
{ "drawable-rotate-180", GIMP_ICON_OBJECT_ROTATE_180,
|
||||
NC_("drawable-action", "Rotate _180°"), NULL,
|
||||
NC_("drawable-action", "Turn drawable upside-down"),
|
||||
GIMP_ROTATE_180, FALSE,
|
||||
GIMP_HELP_LAYER_ROTATE_180 },
|
||||
|
||||
{ "drawable-rotate-270", GIMP_ICON_OBJECT_ROTATE_270,
|
||||
NC_("drawable-action", "Rotate 90° counter-clock_wise"), NULL,
|
||||
NC_("drawable-action", "Rotate drawable 90 degrees to the left"),
|
||||
GIMP_ROTATE_270, FALSE,
|
||||
GIMP_HELP_LAYER_ROTATE_270 }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
drawable_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "drawable-action",
|
||||
drawable_actions,
|
||||
G_N_ELEMENTS (drawable_actions));
|
||||
|
||||
gimp_action_group_add_toggle_actions (group, "drawable-action",
|
||||
drawable_toggle_actions,
|
||||
G_N_ELEMENTS (drawable_toggle_actions));
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "drawable-action",
|
||||
drawable_flip_actions,
|
||||
G_N_ELEMENTS (drawable_flip_actions),
|
||||
drawable_flip_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "drawable-action",
|
||||
drawable_rotate_actions,
|
||||
G_N_ELEMENTS (drawable_rotate_actions),
|
||||
drawable_rotate_cmd_callback);
|
||||
|
||||
#define SET_ALWAYS_SHOW_IMAGE(action,show) \
|
||||
gimp_action_group_set_action_always_show_image (group, action, show)
|
||||
|
||||
SET_ALWAYS_SHOW_IMAGE ("drawable-rotate-90", TRUE);
|
||||
SET_ALWAYS_SHOW_IMAGE ("drawable-rotate-180", TRUE);
|
||||
SET_ALWAYS_SHOW_IMAGE ("drawable-rotate-270", TRUE);
|
||||
|
||||
#undef SET_ALWAYS_SHOW_IMAGE
|
||||
}
|
||||
|
||||
void
|
||||
drawable_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable = NULL;
|
||||
gboolean is_rgb = FALSE;
|
||||
gboolean visible = FALSE;
|
||||
gboolean linked = FALSE;
|
||||
gboolean locked = FALSE;
|
||||
gboolean can_lock = FALSE;
|
||||
gboolean locked_pos = FALSE;
|
||||
gboolean can_lock_pos = FALSE;
|
||||
gboolean writable = FALSE;
|
||||
gboolean movable = FALSE;
|
||||
gboolean children = FALSE;
|
||||
|
||||
image = action_data_get_image (data);
|
||||
|
||||
if (image)
|
||||
{
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
if (drawable)
|
||||
{
|
||||
GimpItem *item;
|
||||
|
||||
is_rgb = gimp_drawable_is_rgb (drawable);
|
||||
|
||||
if (GIMP_IS_LAYER_MASK (drawable))
|
||||
item = GIMP_ITEM (gimp_layer_mask_get_layer (GIMP_LAYER_MASK (drawable)));
|
||||
else
|
||||
item = GIMP_ITEM (drawable);
|
||||
|
||||
visible = gimp_item_get_visible (item);
|
||||
linked = gimp_item_get_linked (item);
|
||||
locked = gimp_item_get_lock_content (item);
|
||||
can_lock = gimp_item_can_lock_content (item);
|
||||
writable = ! gimp_item_is_content_locked (item);
|
||||
locked_pos = gimp_item_get_lock_position (item);
|
||||
can_lock_pos = gimp_item_can_lock_position (item);
|
||||
movable = ! gimp_item_is_position_locked (item);
|
||||
|
||||
if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)))
|
||||
children = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
#define SET_ACTIVE(action,condition) \
|
||||
gimp_action_group_set_action_active (group, action, (condition) != 0)
|
||||
|
||||
SET_SENSITIVE ("drawable-equalize", writable && !children);
|
||||
SET_SENSITIVE ("drawable-levels-stretch", writable && !children && is_rgb);
|
||||
|
||||
SET_SENSITIVE ("drawable-visible", drawable);
|
||||
SET_SENSITIVE ("drawable-linked", drawable);
|
||||
SET_SENSITIVE ("drawable-lock-content", can_lock);
|
||||
SET_SENSITIVE ("drawable-lock-position", can_lock_pos);
|
||||
|
||||
SET_ACTIVE ("drawable-visible", visible);
|
||||
SET_ACTIVE ("drawable-linked", linked);
|
||||
SET_ACTIVE ("drawable-lock-content", locked);
|
||||
SET_ACTIVE ("drawable-lock-position", locked_pos);
|
||||
|
||||
SET_SENSITIVE ("drawable-flip-horizontal", writable && movable);
|
||||
SET_SENSITIVE ("drawable-flip-vertical", writable && movable);
|
||||
|
||||
SET_SENSITIVE ("drawable-rotate-90", writable && movable);
|
||||
SET_SENSITIVE ("drawable-rotate-180", writable && movable);
|
||||
SET_SENSITIVE ("drawable-rotate-270", writable && movable);
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
#undef SET_ACTIVE
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DRAWABLE_ACTIONS_H__
|
||||
#define __DRAWABLE_ACTIONS_H__
|
||||
|
||||
|
||||
void drawable_actions_setup (GimpActionGroup *group);
|
||||
void drawable_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DRAWABLE_ACTIONS_H__ */
|
|
@ -1,304 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpdrawable-equalize.h"
|
||||
#include "core/gimpdrawable-levels.h"
|
||||
#include "core/gimpdrawable-operation.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimpitem-linked.h"
|
||||
#include "core/gimpitemundo.h"
|
||||
#include "core/gimplayermask.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "dialogs/dialogs.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "drawable-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
drawable_equalize_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
|
||||
gimp_drawable_equalize (drawable, TRUE);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
void
|
||||
drawable_levels_stretch_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
GimpDisplay *display;
|
||||
GtkWidget *widget;
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
return_if_no_display (display, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
if (! gimp_drawable_is_rgb (drawable))
|
||||
{
|
||||
gimp_message_literal (image->gimp,
|
||||
G_OBJECT (widget), GIMP_MESSAGE_WARNING,
|
||||
_("White Balance operates only on RGB color "
|
||||
"layers."));
|
||||
return;
|
||||
}
|
||||
|
||||
gimp_drawable_levels_stretch (drawable, GIMP_PROGRESS (display));
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
void
|
||||
drawable_linked_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
gboolean linked;
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
|
||||
linked = g_variant_get_boolean (value);
|
||||
|
||||
if (GIMP_IS_LAYER_MASK (drawable))
|
||||
drawable =
|
||||
GIMP_DRAWABLE (gimp_layer_mask_get_layer (GIMP_LAYER_MASK (drawable)));
|
||||
|
||||
if (linked != gimp_item_get_linked (GIMP_ITEM (drawable)))
|
||||
{
|
||||
GimpUndo *undo;
|
||||
gboolean push_undo = TRUE;
|
||||
|
||||
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
|
||||
GIMP_UNDO_ITEM_LINKED);
|
||||
|
||||
if (undo && GIMP_ITEM_UNDO (undo)->item == GIMP_ITEM (drawable))
|
||||
push_undo = FALSE;
|
||||
|
||||
gimp_item_set_linked (GIMP_ITEM (drawable), linked, push_undo);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
drawable_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
gboolean visible;
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
|
||||
visible = g_variant_get_boolean (value);
|
||||
|
||||
if (GIMP_IS_LAYER_MASK (drawable))
|
||||
drawable =
|
||||
GIMP_DRAWABLE (gimp_layer_mask_get_layer (GIMP_LAYER_MASK (drawable)));
|
||||
|
||||
if (visible != gimp_item_get_visible (GIMP_ITEM (drawable)))
|
||||
{
|
||||
GimpUndo *undo;
|
||||
gboolean push_undo = TRUE;
|
||||
|
||||
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
|
||||
GIMP_UNDO_ITEM_VISIBILITY);
|
||||
|
||||
if (undo && GIMP_ITEM_UNDO (undo)->item == GIMP_ITEM (drawable))
|
||||
push_undo = FALSE;
|
||||
|
||||
gimp_item_set_visible (GIMP_ITEM (drawable), visible, push_undo);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
drawable_lock_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
gboolean locked;
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
|
||||
locked = g_variant_get_boolean (value);
|
||||
|
||||
if (GIMP_IS_LAYER_MASK (drawable))
|
||||
drawable =
|
||||
GIMP_DRAWABLE (gimp_layer_mask_get_layer (GIMP_LAYER_MASK (drawable)));
|
||||
|
||||
if (locked != gimp_item_get_lock_content (GIMP_ITEM (drawable)))
|
||||
{
|
||||
#if 0
|
||||
GimpUndo *undo;
|
||||
#endif
|
||||
gboolean push_undo = TRUE;
|
||||
|
||||
#if 0
|
||||
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
|
||||
GIMP_UNDO_ITEM_VISIBILITY);
|
||||
|
||||
if (undo && GIMP_ITEM_UNDO (undo)->item == GIMP_ITEM (drawable))
|
||||
push_undo = FALSE;
|
||||
#endif
|
||||
|
||||
gimp_item_set_lock_content (GIMP_ITEM (drawable), locked, push_undo);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
drawable_lock_position_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
gboolean locked;
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
|
||||
locked = g_variant_get_boolean (value);
|
||||
|
||||
if (GIMP_IS_LAYER_MASK (drawable))
|
||||
drawable =
|
||||
GIMP_DRAWABLE (gimp_layer_mask_get_layer (GIMP_LAYER_MASK (drawable)));
|
||||
|
||||
if (locked != gimp_item_get_lock_position (GIMP_ITEM (drawable)))
|
||||
{
|
||||
GimpUndo *undo;
|
||||
gboolean push_undo = TRUE;
|
||||
|
||||
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_ITEM_UNDO,
|
||||
GIMP_UNDO_ITEM_LOCK_POSITION);
|
||||
|
||||
if (undo && GIMP_ITEM_UNDO (undo)->item == GIMP_ITEM (drawable))
|
||||
push_undo = FALSE;
|
||||
|
||||
gimp_item_set_lock_position (GIMP_ITEM (drawable), locked, push_undo);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
drawable_flip_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
GimpItem *item;
|
||||
GimpContext *context;
|
||||
gint off_x, off_y;
|
||||
gdouble axis = 0.0;
|
||||
GimpOrientationType orientation;
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
return_if_no_context (context, data);
|
||||
|
||||
orientation = (GimpOrientationType) g_variant_get_int32 (value);
|
||||
|
||||
item = GIMP_ITEM (drawable);
|
||||
|
||||
gimp_item_get_offset (item, &off_x, &off_y);
|
||||
|
||||
switch (orientation)
|
||||
{
|
||||
case GIMP_ORIENTATION_HORIZONTAL:
|
||||
axis = ((gdouble) off_x + (gdouble) gimp_item_get_width (item) / 2.0);
|
||||
break;
|
||||
|
||||
case GIMP_ORIENTATION_VERTICAL:
|
||||
axis = ((gdouble) off_y + (gdouble) gimp_item_get_height (item) / 2.0);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (gimp_item_get_linked (item))
|
||||
{
|
||||
gimp_item_linked_flip (item, context, orientation, axis, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_item_flip (item, context, orientation, axis,
|
||||
gimp_item_get_clip (item, FALSE));
|
||||
}
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
void
|
||||
drawable_rotate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
GimpContext *context;
|
||||
GimpItem *item;
|
||||
gint off_x, off_y;
|
||||
gdouble center_x, center_y;
|
||||
GimpRotationType rotation_type;
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
return_if_no_context (context, data);
|
||||
|
||||
rotation_type = (GimpRotationType) g_variant_get_int32 (value);
|
||||
|
||||
item = GIMP_ITEM (drawable);
|
||||
|
||||
gimp_item_get_offset (item, &off_x, &off_y);
|
||||
|
||||
center_x = ((gdouble) off_x + (gdouble) gimp_item_get_width (item) / 2.0);
|
||||
center_y = ((gdouble) off_y + (gdouble) gimp_item_get_height (item) / 2.0);
|
||||
|
||||
if (gimp_item_get_linked (item))
|
||||
{
|
||||
gimp_item_linked_rotate (item, context, rotation_type,
|
||||
center_x, center_y, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_item_rotate (item, context,
|
||||
rotation_type, center_x, center_y,
|
||||
gimp_item_get_clip (item, FALSE));
|
||||
}
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DRAWABLE_COMMANDS_H__
|
||||
#define __DRAWABLE_COMMANDS_H__
|
||||
|
||||
|
||||
void drawable_equalize_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void drawable_levels_stretch_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void drawable_linked_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void drawable_visible_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void drawable_lock_content_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void drawable_lock_position_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void drawable_flip_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void drawable_rotate_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DRAWABLE_COMMANDS_H__ */
|
|
@ -1,137 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpdata.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "data-commands.h"
|
||||
#include "dynamics-actions.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry dynamics_actions[] =
|
||||
{
|
||||
{ "dynamics-popup", GIMP_ICON_DYNAMICS,
|
||||
NC_("dynamics-action", "Paint Dynamics Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_DYNAMICS_DIALOG },
|
||||
|
||||
{ "dynamics-new", GIMP_ICON_DOCUMENT_NEW,
|
||||
NC_("dynamics-action", "_New Dynamics"), NULL,
|
||||
NC_("dynamics-action", "Create a new dynamics"),
|
||||
data_new_cmd_callback,
|
||||
GIMP_HELP_DYNAMICS_NEW },
|
||||
|
||||
{ "dynamics-duplicate", GIMP_ICON_OBJECT_DUPLICATE,
|
||||
NC_("dynamics-action", "D_uplicate Dynamics"), NULL,
|
||||
NC_("dynamics-action", "Duplicate this dynamics"),
|
||||
data_duplicate_cmd_callback,
|
||||
GIMP_HELP_DYNAMICS_DUPLICATE },
|
||||
|
||||
{ "dynamics-copy-location", GIMP_ICON_EDIT_COPY,
|
||||
NC_("dynamics-action", "Copy Dynamics _Location"), NULL,
|
||||
NC_("dynamics-action", "Copy dynamics file location to clipboard"),
|
||||
data_copy_location_cmd_callback,
|
||||
GIMP_HELP_DYNAMICS_COPY_LOCATION },
|
||||
|
||||
{ "dynamics-show-in-file-manager", GIMP_ICON_FILE_MANAGER,
|
||||
NC_("dynamics-action", "Show in _File Manager"), NULL,
|
||||
NC_("dynamics-action", "Show dynamics file location in the file manager"),
|
||||
data_show_in_file_manager_cmd_callback,
|
||||
GIMP_HELP_DYNAMICS_SHOW_IN_FILE_MANAGER },
|
||||
|
||||
{ "dynamics-delete", GIMP_ICON_EDIT_DELETE,
|
||||
NC_("dynamics-action", "_Delete Dynamics"), NULL,
|
||||
NC_("dynamics-action", "Delete this dynamics"),
|
||||
data_delete_cmd_callback,
|
||||
GIMP_HELP_DYNAMICS_DELETE },
|
||||
|
||||
{ "dynamics-refresh", GIMP_ICON_VIEW_REFRESH,
|
||||
NC_("dynamics-action", "_Refresh Dynamics"), NULL,
|
||||
NC_("dynamics-action", "Refresh dynamics"),
|
||||
data_refresh_cmd_callback,
|
||||
GIMP_HELP_DYNAMICS_REFRESH }
|
||||
};
|
||||
|
||||
static const GimpStringActionEntry dynamics_edit_actions[] =
|
||||
{
|
||||
{ "dynamics-edit", GIMP_ICON_EDIT,
|
||||
NC_("dynamics-action", "_Edit Dynamics..."), NULL,
|
||||
NC_("dynamics-action", "Edit this dynamics"),
|
||||
"gimp-dynamics-editor",
|
||||
GIMP_HELP_DYNAMICS_EDIT }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
dynamics_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "dynamics-action",
|
||||
dynamics_actions,
|
||||
G_N_ELEMENTS (dynamics_actions));
|
||||
|
||||
gimp_action_group_add_string_actions (group, "dynamics-action",
|
||||
dynamics_edit_actions,
|
||||
G_N_ELEMENTS (dynamics_edit_actions),
|
||||
data_edit_cmd_callback);
|
||||
}
|
||||
|
||||
void
|
||||
dynamics_actions_update (GimpActionGroup *group,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpContext *context = action_data_get_context (user_data);
|
||||
GimpDynamics *dynamics = NULL;
|
||||
GimpData *data = NULL;
|
||||
GFile *file = NULL;
|
||||
|
||||
if (context)
|
||||
{
|
||||
dynamics = gimp_context_get_dynamics (context);
|
||||
|
||||
if (dynamics)
|
||||
{
|
||||
data = GIMP_DATA (dynamics);
|
||||
|
||||
file = gimp_data_get_file (data);
|
||||
}
|
||||
}
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
|
||||
SET_SENSITIVE ("dynamics-edit", dynamics);
|
||||
SET_SENSITIVE ("dynamics-duplicate", dynamics && gimp_data_is_duplicatable (data));
|
||||
SET_SENSITIVE ("dynamics-copy-location", file);
|
||||
SET_SENSITIVE ("dynamics-show-in-file-manager", file);
|
||||
SET_SENSITIVE ("dynamics-delete", dynamics && gimp_data_is_deletable (data));
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DYNAMICS_ACTIONS_H__
|
||||
#define __DYNAMICS_ACTIONS_H__
|
||||
|
||||
|
||||
void dynamics_actions_setup (GimpActionGroup *group);
|
||||
void dynamics_actions_update (GimpActionGroup *group,
|
||||
gpointer user_data);
|
||||
|
||||
|
||||
#endif /* __DYNAMICS_ACTIONS_H__ */
|
|
@ -1,89 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpdataeditor.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "data-editor-commands.h"
|
||||
#include "dynamics-editor-actions.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpActionEntry dynamics_editor_actions[] =
|
||||
{
|
||||
{ "dynamics-editor-popup", GIMP_ICON_DYNAMICS,
|
||||
NC_("dynamics-editor-action", "Paint Dynamics Editor Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_BRUSH_EDITOR_DIALOG }
|
||||
};
|
||||
|
||||
|
||||
static const GimpToggleActionEntry dynamics_editor_toggle_actions[] =
|
||||
{
|
||||
{ "dynamics-editor-edit-active", GIMP_ICON_LINKED,
|
||||
NC_("dynamics-editor-action", "Edit Active Dynamics"), NULL, NULL,
|
||||
data_editor_edit_active_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_BRUSH_EDITOR_EDIT_ACTIVE }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
dynamics_editor_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group, "dynamics-editor-action",
|
||||
dynamics_editor_actions,
|
||||
G_N_ELEMENTS (dynamics_editor_actions));
|
||||
|
||||
gimp_action_group_add_toggle_actions (group, "dynamics-editor-action",
|
||||
dynamics_editor_toggle_actions,
|
||||
G_N_ELEMENTS (dynamics_editor_toggle_actions));
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
dynamics_editor_actions_update (GimpActionGroup *group,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (user_data);
|
||||
gboolean edit_active = FALSE;
|
||||
|
||||
edit_active = gimp_data_editor_get_edit_active (data_editor);
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
#define SET_ACTIVE(action,condition) \
|
||||
gimp_action_group_set_action_active (group, action, (condition) != 0)
|
||||
|
||||
SET_ACTIVE ("dynamics-editor-edit-active", edit_active);
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
#undef SET_ACTIVE
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DYNAMICS_EDITOR_ACTIONS_H__
|
||||
#define __DYNAMICS_EDITOR_ACTIONS_H__
|
||||
|
||||
|
||||
void dynamics_editor_actions_setup (GimpActionGroup *group);
|
||||
void dynamics_editor_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __DYNAMICS_EDITOR_ACTIONS_H__ */
|
|
@ -1,417 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpchannel.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimplayer.h"
|
||||
#include "core/gimplist.h"
|
||||
#include "core/gimptoolinfo.h"
|
||||
#include "core/gimpundostack.h"
|
||||
|
||||
#include "widgets/gimpaction.h"
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "tools/tool_manager.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "edit-actions.h"
|
||||
#include "edit-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
static void edit_actions_foreground_changed (GimpContext *context,
|
||||
const GimpRGB *color,
|
||||
GimpActionGroup *group);
|
||||
static void edit_actions_background_changed (GimpContext *context,
|
||||
const GimpRGB *color,
|
||||
GimpActionGroup *group);
|
||||
static void edit_actions_pattern_changed (GimpContext *context,
|
||||
GimpPattern *pattern,
|
||||
GimpActionGroup *group);
|
||||
|
||||
|
||||
static const GimpActionEntry edit_actions[] =
|
||||
{
|
||||
{ "edit-menu", NULL, NC_("edit-action", "_Edit") },
|
||||
{ "edit-paste-as-menu", NULL, NC_("edit-action", "Paste _as") },
|
||||
{ "edit-buffer-menu", NULL, NC_("edit-action", "_Buffer") },
|
||||
|
||||
{ "undo-popup",
|
||||
"edit-undo", NC_("edit-action", "Undo History Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_UNDO_DIALOG },
|
||||
|
||||
{ "edit-undo", GIMP_ICON_EDIT_UNDO,
|
||||
NC_("edit-action", "_Undo"), "<primary>Z",
|
||||
NC_("edit-action", "Undo the last operation"),
|
||||
edit_undo_cmd_callback,
|
||||
GIMP_HELP_EDIT_UNDO },
|
||||
|
||||
{ "edit-redo", GIMP_ICON_EDIT_REDO,
|
||||
NC_("edit-action", "_Redo"), "<primary>Y",
|
||||
NC_("edit-action", "Redo the last operation that was undone"),
|
||||
edit_redo_cmd_callback,
|
||||
GIMP_HELP_EDIT_REDO },
|
||||
|
||||
{ "edit-strong-undo", GIMP_ICON_EDIT_UNDO,
|
||||
NC_("edit-action", "Strong Undo"), "<primary><shift>Z",
|
||||
NC_("edit-action", "Undo the last operation, skipping visibility changes"),
|
||||
edit_strong_undo_cmd_callback,
|
||||
GIMP_HELP_EDIT_STRONG_UNDO },
|
||||
|
||||
{ "edit-strong-redo", GIMP_ICON_EDIT_REDO,
|
||||
NC_("edit-action", "Strong Redo"), "<primary><shift>Y",
|
||||
NC_("edit-action",
|
||||
"Redo the last operation that was undone, skipping visibility changes"),
|
||||
edit_strong_redo_cmd_callback,
|
||||
GIMP_HELP_EDIT_STRONG_REDO },
|
||||
|
||||
{ "edit-undo-clear", GIMP_ICON_SHRED,
|
||||
NC_("edit-action", "_Clear Undo History"), NULL,
|
||||
NC_("edit-action", "Remove all operations from the undo history"),
|
||||
edit_undo_clear_cmd_callback,
|
||||
GIMP_HELP_EDIT_UNDO_CLEAR },
|
||||
|
||||
{ "edit-cut", GIMP_ICON_EDIT_CUT,
|
||||
NC_("edit-action", "Cu_t"), "<primary>X",
|
||||
NC_("edit-action", "Move the selected pixels to the clipboard"),
|
||||
edit_cut_cmd_callback,
|
||||
GIMP_HELP_EDIT_CUT },
|
||||
|
||||
{ "edit-copy", GIMP_ICON_EDIT_COPY,
|
||||
NC_("edit-action", "_Copy"), "<primary>C",
|
||||
NC_("edit-action", "Copy the selected pixels to the clipboard"),
|
||||
edit_copy_cmd_callback,
|
||||
GIMP_HELP_EDIT_COPY },
|
||||
|
||||
{ "edit-copy-visible", NULL, /* GIMP_ICON_COPY_VISIBLE, */
|
||||
NC_("edit-action", "Copy _Visible"), "<primary><shift>C",
|
||||
NC_("edit-action", "Copy what is visible in the selected region"),
|
||||
edit_copy_visible_cmd_callback,
|
||||
GIMP_HELP_EDIT_COPY_VISIBLE },
|
||||
|
||||
{ "edit-paste-as-new-image", GIMP_ICON_EDIT_PASTE_AS_NEW,
|
||||
NC_("edit-action", "From _Clipboard"), "<primary><shift>V",
|
||||
NC_("edit-action", "Create a new image from the content of the clipboard"),
|
||||
edit_paste_as_new_image_cmd_callback,
|
||||
GIMP_HELP_EDIT_PASTE_AS_NEW_IMAGE },
|
||||
|
||||
{ "edit-paste-as-new-image-short", GIMP_ICON_EDIT_PASTE_AS_NEW,
|
||||
NC_("edit-action", "_New Image"), NULL,
|
||||
NC_("edit-action", "Create a new image from the content of the clipboard"),
|
||||
edit_paste_as_new_image_cmd_callback,
|
||||
GIMP_HELP_EDIT_PASTE_AS_NEW_IMAGE },
|
||||
|
||||
{ "edit-named-cut", GIMP_ICON_EDIT_CUT,
|
||||
NC_("edit-action", "Cu_t Named..."), NULL,
|
||||
NC_("edit-action", "Move the selected pixels to a named buffer"),
|
||||
edit_named_cut_cmd_callback,
|
||||
GIMP_HELP_BUFFER_CUT },
|
||||
|
||||
{ "edit-named-copy", GIMP_ICON_EDIT_COPY,
|
||||
NC_("edit-action", "_Copy Named..."), NULL,
|
||||
NC_("edit-action", "Copy the selected pixels to a named buffer"),
|
||||
edit_named_copy_cmd_callback,
|
||||
GIMP_HELP_BUFFER_COPY },
|
||||
|
||||
{ "edit-named-copy-visible", NULL, /* GIMP_ICON_COPY_VISIBLE, */
|
||||
NC_("edit-action", "Copy _Visible Named..."), "",
|
||||
NC_("edit-action",
|
||||
"Copy what is visible in the selected region to a named buffer"),
|
||||
edit_named_copy_visible_cmd_callback,
|
||||
GIMP_HELP_BUFFER_COPY },
|
||||
|
||||
{ "edit-named-paste", GIMP_ICON_EDIT_PASTE,
|
||||
NC_("edit-action", "_Paste Named..."), NULL,
|
||||
NC_("edit-action", "Paste the content of a named buffer"),
|
||||
edit_named_paste_cmd_callback,
|
||||
GIMP_HELP_BUFFER_PASTE },
|
||||
|
||||
{ "edit-clear", GIMP_ICON_EDIT_CLEAR,
|
||||
NC_("edit-action", "Cl_ear"), "Delete",
|
||||
NC_("edit-action", "Clear the selected pixels"),
|
||||
edit_clear_cmd_callback,
|
||||
GIMP_HELP_EDIT_CLEAR }
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry edit_paste_actions[] =
|
||||
{
|
||||
{ "edit-paste", GIMP_ICON_EDIT_PASTE,
|
||||
NC_("edit-action", "_Paste"), "<primary>V",
|
||||
NC_("edit-action", "Paste the content of the clipboard"),
|
||||
GIMP_PASTE_TYPE_FLOATING, FALSE,
|
||||
GIMP_HELP_EDIT_PASTE },
|
||||
|
||||
{ "edit-paste-in-place", GIMP_ICON_EDIT_PASTE,
|
||||
NC_("edit-action", "Paste In P_lace"), "<primary><alt>V",
|
||||
NC_("edit-action",
|
||||
"Paste the content of the clipboard at its original position"),
|
||||
GIMP_PASTE_TYPE_FLOATING_IN_PLACE, FALSE,
|
||||
GIMP_HELP_EDIT_PASTE_IN_PLACE },
|
||||
|
||||
{ "edit-paste-into", GIMP_ICON_EDIT_PASTE_INTO,
|
||||
NC_("edit-action", "Paste _Into Selection"), NULL,
|
||||
NC_("edit-action",
|
||||
"Paste the content of the clipboard into the current selection"),
|
||||
GIMP_PASTE_TYPE_FLOATING_INTO, FALSE,
|
||||
GIMP_HELP_EDIT_PASTE_INTO },
|
||||
|
||||
{ "edit-paste-into-in-place", GIMP_ICON_EDIT_PASTE_INTO,
|
||||
NC_("edit-action", "Paste Int_o Selection In Place"), NULL,
|
||||
NC_("edit-action",
|
||||
"Paste the content of the clipboard into the current selection "
|
||||
"at its original position"),
|
||||
GIMP_PASTE_TYPE_FLOATING_INTO_IN_PLACE, FALSE,
|
||||
GIMP_HELP_EDIT_PASTE_INTO_IN_PLACE },
|
||||
|
||||
{ "edit-paste-as-new-layer", GIMP_ICON_EDIT_PASTE_AS_NEW,
|
||||
NC_("edit-action", "New _Layer"), NULL,
|
||||
NC_("edit-action", "Create a new layer from the content of the clipboard"),
|
||||
GIMP_PASTE_TYPE_NEW_LAYER, FALSE,
|
||||
GIMP_HELP_EDIT_PASTE_AS_NEW_LAYER },
|
||||
|
||||
{ "edit-paste-as-new-layer-in-place", GIMP_ICON_EDIT_PASTE_AS_NEW,
|
||||
NC_("edit-action", "New Layer In _Place"), NULL,
|
||||
NC_("edit-action",
|
||||
"Create a new layer from the content of the clipboard "
|
||||
"and place it at its original position"),
|
||||
GIMP_PASTE_TYPE_NEW_LAYER_IN_PLACE, FALSE,
|
||||
GIMP_HELP_EDIT_PASTE_AS_NEW_LAYER_IN_PLACE }
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry edit_fill_actions[] =
|
||||
{
|
||||
{ "edit-fill-fg", GIMP_ICON_TOOL_BUCKET_FILL,
|
||||
NC_("edit-action", "Fill with _FG Color"), "<primary>comma",
|
||||
NC_("edit-action", "Fill the selection using the foreground color"),
|
||||
GIMP_FILL_FOREGROUND, FALSE,
|
||||
GIMP_HELP_EDIT_FILL_FG },
|
||||
|
||||
{ "edit-fill-bg", GIMP_ICON_TOOL_BUCKET_FILL,
|
||||
NC_("edit-action", "Fill with B_G Color"), "<primary>period",
|
||||
NC_("edit-action", "Fill the selection using the background color"),
|
||||
GIMP_FILL_BACKGROUND, FALSE,
|
||||
GIMP_HELP_EDIT_FILL_BG },
|
||||
|
||||
{ "edit-fill-pattern", GIMP_ICON_PATTERN,
|
||||
NC_("edit-action", "Fill _with Pattern"), "<primary>semicolon",
|
||||
NC_("edit-action", "Fill the selection using the active pattern"),
|
||||
GIMP_FILL_PATTERN, FALSE,
|
||||
GIMP_HELP_EDIT_FILL_PATTERN }
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
edit_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
GimpContext *context = gimp_get_user_context (group->gimp);
|
||||
GimpRGB color;
|
||||
GimpPattern *pattern;
|
||||
GimpAction *action;
|
||||
|
||||
gimp_action_group_add_actions (group, "edit-action",
|
||||
edit_actions,
|
||||
G_N_ELEMENTS (edit_actions));
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "edit-action",
|
||||
edit_paste_actions,
|
||||
G_N_ELEMENTS (edit_paste_actions),
|
||||
edit_paste_cmd_callback);
|
||||
|
||||
gimp_action_group_add_enum_actions (group, "edit-action",
|
||||
edit_fill_actions,
|
||||
G_N_ELEMENTS (edit_fill_actions),
|
||||
edit_fill_cmd_callback);
|
||||
|
||||
action = gimp_action_group_get_action (group,
|
||||
"edit-paste-as-new-image-short");
|
||||
gimp_action_set_accel_path (action,
|
||||
"<Actions>/edit/edit-paste-as-new-image");
|
||||
|
||||
gimp_action_group_set_action_context (group, "edit-fill-fg", context);
|
||||
gimp_action_group_set_action_context (group, "edit-fill-bg", context);
|
||||
gimp_action_group_set_action_context (group, "edit-fill-pattern", context);
|
||||
|
||||
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);
|
||||
|
||||
gimp_context_get_foreground (context, &color);
|
||||
edit_actions_foreground_changed (context, &color, group);
|
||||
|
||||
gimp_context_get_background (context, &color);
|
||||
edit_actions_background_changed (context, &color, group);
|
||||
|
||||
pattern = gimp_context_get_pattern (context);
|
||||
edit_actions_pattern_changed (context, pattern, group);
|
||||
|
||||
#define SET_ALWAYS_SHOW_IMAGE(action,show) \
|
||||
gimp_action_group_set_action_always_show_image (group, action, show)
|
||||
|
||||
SET_ALWAYS_SHOW_IMAGE ("edit-fill-fg", TRUE);
|
||||
SET_ALWAYS_SHOW_IMAGE ("edit-fill-bg", TRUE);
|
||||
SET_ALWAYS_SHOW_IMAGE ("edit-fill-pattern", TRUE);
|
||||
|
||||
#undef SET_ALWAYS_SHOW_IMAGE
|
||||
}
|
||||
|
||||
void
|
||||
edit_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image = action_data_get_image (data);
|
||||
GimpDisplay *display = action_data_get_display (data);
|
||||
GimpDrawable *drawable = NULL;
|
||||
gchar *undo_name = NULL;
|
||||
gchar *redo_name = NULL;
|
||||
gboolean writable = FALSE;
|
||||
gboolean children = FALSE;
|
||||
gboolean undo_enabled = FALSE;
|
||||
|
||||
if (image)
|
||||
{
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
if (drawable)
|
||||
{
|
||||
writable = ! gimp_item_is_content_locked (GIMP_ITEM (drawable));
|
||||
|
||||
if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)))
|
||||
children = TRUE;
|
||||
}
|
||||
|
||||
undo_enabled = gimp_image_undo_is_enabled (image);
|
||||
|
||||
if (undo_enabled)
|
||||
{
|
||||
GimpUndoStack *undo_stack = gimp_image_get_undo_stack (image);
|
||||
GimpUndoStack *redo_stack = gimp_image_get_redo_stack (image);
|
||||
GimpUndo *undo = gimp_undo_stack_peek (undo_stack);
|
||||
GimpUndo *redo = gimp_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->gimp, display);
|
||||
tool_redo = tool_manager_can_redo_active (image->gimp, display);
|
||||
}
|
||||
|
||||
if (tool_undo)
|
||||
undo_name = g_strdup_printf (_("_Undo %s"), tool_undo);
|
||||
else if (undo)
|
||||
undo_name = g_strdup_printf (_("_Undo %s"),
|
||||
gimp_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"),
|
||||
gimp_object_get_name (redo));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#define SET_LABEL(action,label) \
|
||||
gimp_action_group_set_action_label (group, action, (label))
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
|
||||
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", writable && !children);
|
||||
SET_SENSITIVE ("edit-copy", drawable);
|
||||
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-paste-as-new-layer", image);
|
||||
SET_SENSITIVE ("edit-paste-as-new-layer-in-place", image);
|
||||
|
||||
SET_SENSITIVE ("edit-named-cut", writable && !children);
|
||||
SET_SENSITIVE ("edit-named-copy", drawable);
|
||||
SET_SENSITIVE ("edit-named-copy-visible", drawable);
|
||||
/* "edit-named-paste" is always active */
|
||||
|
||||
SET_SENSITIVE ("edit-clear", writable && !children);
|
||||
SET_SENSITIVE ("edit-fill-fg", writable && !children);
|
||||
SET_SENSITIVE ("edit-fill-bg", writable && !children);
|
||||
SET_SENSITIVE ("edit-fill-pattern", writable && !children);
|
||||
|
||||
#undef SET_LABEL
|
||||
#undef SET_SENSITIVE
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static void
|
||||
edit_actions_foreground_changed (GimpContext *context,
|
||||
const GimpRGB *color,
|
||||
GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_set_action_color (group, "edit-fill-fg", color, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
edit_actions_background_changed (GimpContext *context,
|
||||
const GimpRGB *color,
|
||||
GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_set_action_color (group, "edit-fill-bg", color, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
edit_actions_pattern_changed (GimpContext *context,
|
||||
GimpPattern *pattern,
|
||||
GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_set_action_viewable (group, "edit-fill-pattern",
|
||||
GIMP_VIEWABLE (pattern));
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __EDIT_ACTIONS_H__
|
||||
#define __EDIT_ACTIONS_H__
|
||||
|
||||
|
||||
void edit_actions_setup (GimpActionGroup *group);
|
||||
void edit_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __EDIT_ACTIONS_H__ */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue