Imported Upstream version 2.8.0
This commit is contained in:
83
AUTHORS
83
AUTHORS
@ -6,22 +6,33 @@ GIMP was originally written by:
|
||||
Peter Mattis
|
||||
|
||||
|
||||
The current maintainers are:
|
||||
|
||||
Sven Neumann
|
||||
Michael Natterer
|
||||
|
||||
|
||||
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
|
||||
Luis Barrancos
|
||||
Jerry Baker
|
||||
John Beale
|
||||
Zach Beane
|
||||
Tom Bech
|
||||
Marc Bless
|
||||
Edward Blevins
|
||||
Reagan Blundell
|
||||
Hendrik Boom
|
||||
Xavier Bouchoux
|
||||
Richard Bowers
|
||||
Roberto Boyd
|
||||
Stanislav Brabec
|
||||
Hans Breuer
|
||||
@ -32,6 +43,7 @@ The following people have contributed code to GIMP:
|
||||
Francisco Bustamante
|
||||
Albert Cahalan
|
||||
George J. Carrette
|
||||
Marco Ciampa
|
||||
Sean Cier
|
||||
Winston Chang
|
||||
Stephane Chauveau
|
||||
@ -49,6 +61,7 @@ The following people have contributed code to GIMP:
|
||||
Brian Degenhardt
|
||||
Karine Delvare
|
||||
Andreas Dilger
|
||||
Nicholas Doyle
|
||||
Austin Donnelly
|
||||
Scott Draves
|
||||
Daniel Dunbar
|
||||
@ -79,33 +92,47 @@ The following people have contributed code to GIMP:
|
||||
Saul Goode
|
||||
David Gowers
|
||||
Cameron Gregory
|
||||
Eric Grivel
|
||||
Stephen Griffiths
|
||||
Pavel Grinfeld
|
||||
Dov Grobgeld
|
||||
Michael Hammel
|
||||
Tim Harder
|
||||
Marcus Heese
|
||||
Robert Helgesson
|
||||
James Henstridge
|
||||
Eric Hernes
|
||||
Lukasz Hladowski
|
||||
David Hodson
|
||||
Christoph Hoegl
|
||||
Wolfgang Hofer
|
||||
Patrick Horgan
|
||||
Alan Horkan
|
||||
Daniel Hornung
|
||||
Christopher Howard
|
||||
Jan Hubička
|
||||
Alexander Hämmerle
|
||||
Barak Itkin
|
||||
Ben Jackson
|
||||
Tim Janik
|
||||
Kristian Jantz
|
||||
Javier Jardón
|
||||
Tim Jedlicka
|
||||
Róman Joost
|
||||
Alexander Jones
|
||||
Geert Jordaens
|
||||
Aurimas Juška
|
||||
Malay Keshav
|
||||
Andrew Kieschnick
|
||||
Peter Kirchgessner
|
||||
Philipp Klaus
|
||||
David Koblas
|
||||
Daniel Kobras
|
||||
Øyvind Kolås
|
||||
Lloyd Konneker
|
||||
Robert L Krawitz
|
||||
Kretynofil
|
||||
Christian Krippendorf
|
||||
Tuomas Kuosmanen
|
||||
Olof S Kylander
|
||||
Philip Lafleur
|
||||
@ -123,20 +150,24 @@ The following people have contributed code to GIMP:
|
||||
Frederic Leroy
|
||||
Raph Levien
|
||||
Wing Tung Leung
|
||||
Dave Lichterman
|
||||
Adrian Likins
|
||||
Tor Lillqvist
|
||||
Ingo Lütkebohle
|
||||
Josh MacDonald
|
||||
Ed Mackey
|
||||
Vidar Madsen
|
||||
Mikael Magnusson
|
||||
Luidnel Maignan
|
||||
Ian Main
|
||||
Kjartan Maraas
|
||||
John Marshall
|
||||
Kelly Martin
|
||||
Torsten Martinsen
|
||||
Takeshi Matsuyama
|
||||
Gordon Matzigkeit
|
||||
Gregory McLean
|
||||
Mike Melancon
|
||||
Federico Mena Quintero
|
||||
Loren Merritt
|
||||
Jim Meyer
|
||||
@ -145,87 +176,114 @@ The following people have contributed code to GIMP:
|
||||
Chris Mohler
|
||||
Chris Moller
|
||||
David Monniaux
|
||||
Christopher Montgomery
|
||||
Tim Mooney
|
||||
Adam D Moss
|
||||
Tobias Mueller
|
||||
Michael Muré
|
||||
Balazs Nagy
|
||||
Yukihiro Nakai
|
||||
Shuji Narazaki
|
||||
Felix Natter
|
||||
Michael Natterer
|
||||
David Neary
|
||||
David Necas
|
||||
Sven Neumann
|
||||
Andreas Neustifter
|
||||
Stephen Robert Norris
|
||||
Tim Newsome
|
||||
Jon Nordby
|
||||
Martin Nordholts
|
||||
Erik Nygren
|
||||
Miles O'Neal
|
||||
David Odin
|
||||
Robert Ögren
|
||||
Nelson A. de Oliveira
|
||||
Victor Oliveira
|
||||
Thom van Os
|
||||
Garry R. Osgood
|
||||
Benjamin Otte
|
||||
Petr Ovtchenkov
|
||||
Alan Paeth
|
||||
Jay Painter
|
||||
Ville Pätsi
|
||||
Akkana Peck
|
||||
Mikael Magnusson
|
||||
Christian Krippendorf
|
||||
Asbjorn Pettersen
|
||||
Mike Phillips
|
||||
Nils Philippsen
|
||||
Ari Pollak
|
||||
Mircea Purdea
|
||||
Raphaël Quinet
|
||||
Dennis Ranke
|
||||
Tom Rathborne
|
||||
Martin Renold
|
||||
Jens Restemeier
|
||||
Maurits Rijk
|
||||
Daniel Risacher
|
||||
Clarence Risher
|
||||
Gilles Rochefort
|
||||
James Robinson
|
||||
Stefan Röllin
|
||||
Guillermo S. Romero
|
||||
Marco Rossini
|
||||
Tim Rowley
|
||||
Karthikeyan S
|
||||
Mike Schaeffer
|
||||
John Schlag
|
||||
Norbert Schmitz
|
||||
Thorsten Schnier
|
||||
Enrico Schröder
|
||||
Alexander Schulz
|
||||
Michael Schumacher
|
||||
Tracy Scott
|
||||
Craig Setera
|
||||
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
|
||||
Nathan Summers
|
||||
Mike Sweet
|
||||
Bogdan Szczurek
|
||||
Eiichi Takamori
|
||||
Tal Trachtman
|
||||
Tristan Tarrant
|
||||
Michael Taylor
|
||||
Owen Taylor
|
||||
Ian Tester
|
||||
Andy Thomas
|
||||
Mason Thomas
|
||||
Patrice Tremblay
|
||||
Kevin Turner
|
||||
Andreas Turtschan
|
||||
Massimo Valentini
|
||||
Brion Vibber
|
||||
Helvetix Victorinox
|
||||
Thorsten Vollmer
|
||||
Rebecca Walter
|
||||
Martin Weber
|
||||
Rupert Weber
|
||||
James Wang
|
||||
Kris Wehner
|
||||
Nigel Wetten
|
||||
Alexis Wilhelm
|
||||
Calvin Williamson
|
||||
Matthew Wilson
|
||||
Karl Günter Wünsch
|
||||
Andrew Wyatt
|
||||
Yoshinori Yamakawa
|
||||
Shirasaki Yasuhiro
|
||||
Zhenfeng Zhao
|
||||
Simon Zilliken
|
||||
Przemyslaw Zych
|
||||
Robert Ögren
|
||||
|
||||
|
||||
The following people have contributed art to GIMP:
|
||||
@ -267,21 +325,6 @@ The following people have helped to document GIMP:
|
||||
Ed Mackey
|
||||
Ian Main
|
||||
Pierre Perrier
|
||||
Baurzhan Muftakhidinov
|
||||
Joe Hansen
|
||||
Carles Ferrando
|
||||
Pedro Barreira
|
||||
Francisco Vila
|
||||
Xandru Armesto
|
||||
Gitte Illum Petersen
|
||||
Dimitris Spingos
|
||||
Sergio Cipolla
|
||||
Rudolfs Mazurs
|
||||
Kristjan SCHMIDT
|
||||
Piotr Drąg
|
||||
Fran Dieguez
|
||||
Nishibori Kiyotaka
|
||||
Muhammet Kara
|
||||
Alexandre Prokoudine
|
||||
Manuel Quiñones
|
||||
James Robinson
|
||||
|
849
COPYING
849
COPYING
@ -1,285 +1,626 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111 USA
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
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
|
||||
this service 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.
|
||||
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 make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
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 give the recipients all the rights that
|
||||
you have. 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.
|
||||
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.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
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.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
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.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
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.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
0. Definitions.
|
||||
|
||||
1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
"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.
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
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.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
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.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
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.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
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.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
1. Source Code.
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
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.
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
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.
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
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 source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
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.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
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.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
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
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
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.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
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.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
14. Revised Versions of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
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 a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
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.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
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.
|
||||
|
||||
NO WARRANTY
|
||||
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.
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE 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.
|
||||
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.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
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
|
||||
@ -287,15 +628,15 @@ 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
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
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) 19yy <name of author>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
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 2 of the License, or
|
||||
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,
|
||||
@ -304,36 +645,30 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
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, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
<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, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
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 your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
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
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This 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 Library General
|
||||
Public License instead of this License.
|
||||
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
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
@ -870,7 +870,7 @@
|
||||
official version of TinyScheme which adds entry point for nested
|
||||
calling. Part of making it more suitable for Scheme->C->Scheme
|
||||
calling. See SourceForge bug #1599945. Updated usage information
|
||||
using text from Manual.txt.
|
||||
using text from Manual.txt. See SourceForge bug #1825395.
|
||||
|
||||
2008-09-11 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
|
57
HACKING
57
HACKING
@ -23,15 +23,15 @@ Beta software can be found at alpha.gnu.org.
|
||||
- ftp://ftp.gnome.org/pub/GNOME/sources/libxslt/1.1/
|
||||
|
||||
These are only the additional requirements if you want to compile from
|
||||
the Subversion repository. The file INSTALL lists the various libraries
|
||||
we depend on.
|
||||
the git repository. The file INSTALL lists the various libraries we
|
||||
depend on.
|
||||
|
||||
|
||||
Compilation
|
||||
-----------
|
||||
If you are accessing gimp via Subversion, then you will need to take
|
||||
several steps to get it to compile. You can do all these steps at once
|
||||
by running:
|
||||
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
|
||||
|
||||
@ -67,23 +67,17 @@ disable the support for gtk-doc so you will not be able to generate
|
||||
the API documentation.
|
||||
|
||||
|
||||
Subversion
|
||||
----------
|
||||
GIMP is available from GNOME Subversion. You can use the following
|
||||
commands to get them from the anonymous Subversion server:
|
||||
Git
|
||||
---
|
||||
GIMP is available from GNOME Git. You can use the following commands
|
||||
to get GIMP from the the git server:
|
||||
|
||||
For getting GIMP trunk, use:
|
||||
$ git clone git://git.gnome.org/gimp
|
||||
|
||||
$ svn co http://svn.gnome.org/svn/gimp/trunk gimp
|
||||
You can read more on using GNOME's git service at these URLs:
|
||||
|
||||
For getting a GIMP branch, use:
|
||||
|
||||
$ svn co http://svn.gnome.org/svn/gimp/branches/<branch> gimp-<branch>
|
||||
|
||||
You can read more on using GNOME's Subversion service at these URLs:
|
||||
|
||||
http://developer.gnome.org/tools/svn.html
|
||||
http://svnbook.red-bean.com/
|
||||
http://live.gnome.org/Git
|
||||
http://www.kernel.org/pub/software/scm/git/docs/
|
||||
|
||||
|
||||
You will also need relatively new stable releases of glib, pango, atk,
|
||||
@ -94,26 +88,19 @@ part of recent Linux distribution releases.
|
||||
Patches
|
||||
-------
|
||||
|
||||
The best way to submit patches is to file a bug report at
|
||||
The best way to submit patches is to publish your git repository and
|
||||
ask developers to git-fetch from you.
|
||||
|
||||
For bug fixes where the patch is small you can file a bug report at
|
||||
http://bugzilla.gnome.org/ and 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@lists.xcf.berkeley.edu mailing list. If the
|
||||
patch needs to be discussed, you should also consider using the
|
||||
it to the gimp-developer@lists.xcf.berkeley.edu mailing list. You can
|
||||
create the patch file with git-format-patch
|
||||
|
||||
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. You can create the
|
||||
patch file with "svn diff", preferably in an annotated patch format.
|
||||
This can be achieved with ~/.subversion/config containing a custom
|
||||
diff command in the [helpers] section:
|
||||
|
||||
[helpers]
|
||||
diff-cmd = /usr/local/bin/_svndiff
|
||||
|
||||
And create an executable script in /usr/local/bin/_svndiff with the
|
||||
following contents:
|
||||
|
||||
#!/bin/sh
|
||||
/usr/bin/diff -up --label "${3}" ${6} --label "${5}" ${7}
|
||||
follow the guidelines given in Hackordnung, below.
|
||||
|
||||
|
||||
Auto-generated Files
|
||||
|
173
INSTALL
173
INSTALL
@ -1,25 +1,26 @@
|
||||
--------------------------------------
|
||||
Installation instructions for GIMP 2.6
|
||||
Installation instructions for GIMP 2.8
|
||||
--------------------------------------
|
||||
|
||||
There are some basic steps to building and installing GIMP.
|
||||
|
||||
GIMP 2.6 replaces earlier GIMP 2.x versions. It is advised that you
|
||||
uninstall them before installing GIMP 2.6. If you want to keep your
|
||||
older GIMP 2.x installation in parallel to GIMP 2.6, you have to
|
||||
GIMP 2.8 replaces earlier GIMP 2.x versions. It is advised that you
|
||||
uninstall them before installing GIMP 2.8. If you want to keep your
|
||||
older GIMP 2.x installation in parallel to GIMP 2.8, you have to
|
||||
choose a separate prefix which is not in your default library search
|
||||
path.
|
||||
|
||||
GIMP 2.6 is fully backward compatible to all earlier GIMP 2.x version.
|
||||
Plug-ins and scripts written for GIMP 2.4, or GIMP 2.2 or even 2.0,
|
||||
GIMP 2.8 is fully backward compatible to all earlier GIMP 2.x version.
|
||||
Plug-ins and scripts written for GIMP 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.x.
|
||||
be used with GIMP 2.8.
|
||||
|
||||
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! *
|
||||
@ -27,34 +28,34 @@ header files installed.
|
||||
* packages of them and use these instead. *
|
||||
******************************************************************
|
||||
|
||||
|
||||
1. You need to have installed a recent version of pkg-config available
|
||||
from http://www.freedesktop.org/software/pkgconfig/.
|
||||
from http://www.freedesktop.org/software/pkgconfig/.
|
||||
|
||||
2. You need intltool (at least 0.36.3, but preferably a newer version).
|
||||
2. You need intltool (at least 0.40.1, but preferably a newer version).
|
||||
Intltool can be downloaded from
|
||||
http://ftp.gnome.org/pub/gnome/sources/intltool/
|
||||
http://ftp.gnome.org/pub/gnome/sources/intltool/
|
||||
|
||||
3. You need to have GEGL version 0.0.18 or newer and babl version
|
||||
0.0.22 or newer. You can get it from http://gegl.org/ or check
|
||||
it out from the subversion repository:
|
||||
3. You need to have GEGL version 0.2.0 or newer and babl version
|
||||
0.1.10 or newer. You can get them from http://gegl.org/ or clone
|
||||
them from the GNOME git repository:
|
||||
|
||||
http://svn.gnome.org/svn/babl/trunk
|
||||
http://svn.gnome.org/svn/gegl/trunk
|
||||
git://git.gnome.org/babl
|
||||
git://git.gnome.org/gegl
|
||||
|
||||
4. You need to have installed GTK+ version 2.12.5 or newer. GIMP
|
||||
also need a recent versions of GLib (>= 2.16.1) and Pango (>= 1.18.0).
|
||||
Sources for these can be grabbed from ftp://ftp.gtk.org/.
|
||||
4. You need to have installed GTK+ version 2.24.10 or newer.
|
||||
GIMP also need a recent versions of GLib (>= 2.30.2), GDK-Pixbuf
|
||||
(>= 2.24.1), and Pango (>= 1.29.4). Sources for these can be grabbed
|
||||
from ftp://ftp.gtk.org/.
|
||||
|
||||
5. We require PangoFT2, a Pango backend that uses FreeType2. Make
|
||||
sure you have FreeType2 and fontconfig installed before you
|
||||
compile Pango. FreeType2 can be downloaded from
|
||||
http://www.freetype.org/. Fontconfig from
|
||||
http://freedesktop.org/fontconfig/. GIMP depends on freetype2
|
||||
being newer than version 2.1.7 and fontconfig 2.2.0 or newer.
|
||||
Older versions are known to have bugs that seriously affect the
|
||||
stability of GIMP.
|
||||
5. We use cairo >= 1.10.2, which is hosted at
|
||||
http://www.cairographics.org/.
|
||||
|
||||
6. We use cairo, which is hosted at http://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.2.0 or newer. Older versions are known to have
|
||||
bugs that seriously affect the stability of GIMP.
|
||||
|
||||
7. We use dbus-glib if available. Grab it from
|
||||
http://dbus.freedesktop.org/releases/dbus-glib/
|
||||
@ -68,10 +69,10 @@ header files installed.
|
||||
method for accessing remote files.
|
||||
|
||||
9. You may want to install other third party libraries or programs
|
||||
that are needed for some of the available plugins. We recommend
|
||||
that are needed for some of the available plug-ins. We recommend
|
||||
to check that the following libraries are installed: lcms,
|
||||
libpng, libjpeg, libpoppler, libtiff, webkit, libmng, librsvg
|
||||
and libwmf.
|
||||
libpng, libjpeg, libpoppler, libtiff, webkit, libmng, librsvg,
|
||||
libwmf, libz, libbzip2, libgs (Ghostscript), libaa and libjasper.
|
||||
|
||||
10. The Python extension requires Python development headers to be
|
||||
present. You will also need PyGTK and the respective development
|
||||
@ -85,12 +86,12 @@ header files installed.
|
||||
of make, we'd appreciate if you'd send us a patch with the changes.
|
||||
|
||||
13. Install GIMP by running `make install'. In order to avoid clashes
|
||||
with other versions of GIMP, we install a binary called gimp-2.6.
|
||||
with other versions of GIMP, we install a binary called gimp-2.8.
|
||||
By default there's also a link created so that you can type 'gimp'
|
||||
to start gimp-2.6.
|
||||
to start gimp-2.8.
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
|
||||
@ -99,8 +100,8 @@ 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.6.x.tar.gz # unpack the sources
|
||||
% cd gimp-2.6.x # change to the toplevel directory
|
||||
% tar xvfz gimp-2.8.x.tar.gz # unpack the sources
|
||||
% cd gimp-2.8.x # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GIMP
|
||||
% make install # install GIMP
|
||||
@ -134,15 +135,15 @@ These are:
|
||||
default is for strict checking to be disabled. NOTE: This option
|
||||
is intended primarily as a convenience for developers.
|
||||
|
||||
--enable-gimpdir=DIR. This option changes the default directory
|
||||
GIMP uses to search for its configuration files from ~/.gimp-2.6
|
||||
(the directory .gimp-2.6 in the users home directory) to DIR.
|
||||
--with-gimpdir=DIR. This option changes the default directory
|
||||
GIMP uses to search for its configuration files from ~/.gimp-2.8
|
||||
(the directory .gimp-2.8 in the users home directory) to DIR.
|
||||
|
||||
--enable-binreloc. When compiled for Linux with this option enabled,
|
||||
GIMP will be binary relocatable. Plug-ins and data files will
|
||||
be searched relative to the gimp binary instead of in the paths
|
||||
defined at compile time.
|
||||
|
||||
|
||||
--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.
|
||||
@ -151,37 +152,42 @@ These are:
|
||||
will bail out if libtiff, libjpeg or libpng 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, JPEG or PNG you need to explicitely disable
|
||||
support for TIFF, JPEG or PNG you need to explicitly disable
|
||||
them using the options given above.
|
||||
|
||||
--without-exif. If libexif is available, the JPEG plug-in will use
|
||||
|
||||
--without-libexif. If libexif is available, the JPEG plug-in will use
|
||||
it to keep EXIF data in your JPEG files intact. If this is
|
||||
causing any trouble at compile-time, you can build --without-exif.
|
||||
causing any trouble at compile-time, you can build --without-libexif.
|
||||
Get libexif from http://www.sourceforge.net/projects/libexif.
|
||||
|
||||
--without-aa. The AA plug-in needs libaa and configure checks for
|
||||
its presense. Use --without-aa if you run into problems.
|
||||
its presence. Use --without-aa if you run into problems.
|
||||
|
||||
--without-mng. The MNG plug-in needs libmng and configure checks
|
||||
for its presense. If for some reason you don't want to build the
|
||||
--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-mng to disable it explicitly.
|
||||
--without-libmng to disable it explicitly.
|
||||
|
||||
--without-wmf. The WMF plug-in needs libwmf2 and configure checks for
|
||||
its presense. Use --without-aa if you run into problems.
|
||||
its presence. Use --without-wmf if you run into problems.
|
||||
|
||||
--without-webkit. If for some reason you don't want to build the
|
||||
helpbrowser plug-in, you can use --without-webkit to disable
|
||||
--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-svg. If for some reason you want to build GIMP without
|
||||
SVG support, you can build --without-svg.
|
||||
--without-librsvg. If for some reason you want to build GIMP without
|
||||
SVG support, you can build --without-librsvg.
|
||||
|
||||
--without-lcms. If for some reason you want to build GIMP without
|
||||
using lcms for color support, you can build with --without-lcms.
|
||||
|
||||
--without-poppler. If for some reason you don't want to build the PDF
|
||||
import plug-in that uses libpoppler, you can use --without-poppler.
|
||||
Import plug-in that uses libpoppler, you can use --without-poppler.
|
||||
|
||||
--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.
|
||||
@ -189,11 +195,8 @@ These are:
|
||||
--without-gvfs. If you don't want to use GIO/GVfs to access remote
|
||||
files, you can pass --without-gvfs to the configure script.
|
||||
|
||||
--without-gnomevfs. If you don't want to use gnomevfs to access remote
|
||||
files, you can pass --without-gnomevfs to the configure script.
|
||||
|
||||
--without-libcurl. If you don't want to use libcurl to access remote
|
||||
files, you can pass --without-gnomevfs to the configure script.
|
||||
files, you can pass --without-libcurl to the configure script.
|
||||
|
||||
--without-alsa. If you don't want to compile ALSA support into the
|
||||
MIDI input controller module, you can use the --without-alsa option.
|
||||
@ -207,6 +210,9 @@ These are:
|
||||
--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
|
||||
@ -214,13 +220,13 @@ These are:
|
||||
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
|
||||
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+ installled
|
||||
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.
|
||||
|
||||
@ -239,33 +245,34 @@ These are:
|
||||
if you call configure with --without-desktop-dir.
|
||||
|
||||
--disable-default-binary. Use this option if you don't want to make
|
||||
gimp-2.6 the default gimp installation. Otherwise a link called
|
||||
gimp pointing to the gimp-2.6 executable will be installed.
|
||||
gimp-2.8 the default GIMP installation. Otherwise a link called
|
||||
gimp pointing to the gimp-2.8 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.
|
||||
|
||||
--enable-gimp-remote. Use this option if you want the gimp-remote
|
||||
binary to be built. This only works with X11 and it is obsolete if#
|
||||
your platform has DBus support.
|
||||
|
||||
--disable-python. If for some reason you don't want to build the
|
||||
Python based pygimp plug-in, you can use --disable-python.
|
||||
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.6' in `app'.
|
||||
- The main GIMP program 'gimp-2.8' 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
|
||||
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'.
|
||||
|
||||
|
||||
@ -273,22 +280,22 @@ When ./configure fails
|
||||
======================
|
||||
|
||||
'configure' uses pkg-config, a tool that replaces the old foo-config
|
||||
scripts. The most recent version is available from
|
||||
scripts. The most recent version is available from
|
||||
http://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
|
||||
* 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
|
||||
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.
|
||||
* 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
|
||||
@ -303,7 +310,7 @@ several reasons why this might fail:
|
||||
or
|
||||
LDFLAGS="-Wl,-rpath -Wl,/home/joe/lib" ./configure
|
||||
|
||||
* An old version of the GTK+ libraries was found instead of
|
||||
* 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.
|
||||
@ -324,10 +331,10 @@ 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 plugin xyz will not
|
||||
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
|
||||
@ -426,6 +433,6 @@ 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.in' is used as a template to create `configure' by
|
||||
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'.
|
||||
|
22
Makefile.am
22
Makefile.am
@ -1,5 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
|
||||
|
||||
SUBDIRS = \
|
||||
m4macros \
|
||||
tools \
|
||||
@ -27,9 +29,8 @@ SUBDIRS = \
|
||||
$(GIMP_PLUGINS) \
|
||||
etc \
|
||||
devel-docs \
|
||||
docs
|
||||
|
||||
bin_SCRIPTS = @GIMPINSTALL@
|
||||
docs \
|
||||
build
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = \
|
||||
@ -40,12 +41,10 @@ pkgconfig_DATA = \
|
||||
|
||||
AUTHORS: authors.xml authors.xsl
|
||||
if HAVE_XSLTPROC
|
||||
$(XSLTPROC) authors.xsl $< > $(@) || rm -f $(@)
|
||||
$(XSLTPROC) -o $(@) $(top_srcdir)/authors.xsl $< || rm -f $(@)
|
||||
endif
|
||||
|
||||
|
||||
EXTRA_SCRIPTS = gimpinstall-@GIMP_TOOL_VERSION@
|
||||
|
||||
EXTRA_DIST = \
|
||||
AUTHORS \
|
||||
COPYING \
|
||||
@ -70,17 +69,12 @@ EXTRA_DIST = \
|
||||
authors.xml \
|
||||
authors.xsl \
|
||||
config.h.win32 \
|
||||
gimp-zip.in \
|
||||
gimpdefs.msc \
|
||||
makefile.msc
|
||||
gimp-zip.in
|
||||
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
|
||||
|
||||
|
||||
gimpinstall-@GIMP_TOOL_VERSION@:
|
||||
$(LN_S) $(srcdir)/install-sh $(srcdir)/gimpinstall-@GIMP_TOOL_VERSION@
|
||||
|
||||
check-defs:
|
||||
@$(PYTHON) $(top_srcdir)/tools/defcheck.py $(top_srcdir) || \
|
||||
( echo "*** .def files inconsistent ***"; exit 1; )
|
||||
@ -97,7 +91,8 @@ all-local: AUTHORS
|
||||
dist-hook: check-defs validate-authors
|
||||
|
||||
|
||||
CHANGELOG_START = f8f3c41320320cb07af2956eca48007a464f14d7
|
||||
|
||||
CHANGELOG_START = 74424325abb54620b370f2595445b2b2a19fe5e7
|
||||
|
||||
ChangeLog: $(srcdir)/ChangeLog $(srcdir)/ChangeLog.pre-git
|
||||
$(srcdir)/ChangeLog:
|
||||
@ -114,5 +109,4 @@ $(srcdir)/ChangeLog:
|
||||
(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
|
||||
|
276
Makefile.in
276
Makefile.in
@ -1,9 +1,9 @@
|
||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.11.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@ -15,8 +15,24 @@
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@ -45,12 +61,11 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
missing py-compile
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/m4macros/detectcflags.m4 \
|
||||
$(top_srcdir)/m4macros/pythondev.m4 \
|
||||
$(top_srcdir)/m4macros/gimpprint.m4 \
|
||||
$(top_srcdir)/m4macros/alsa.m4 \
|
||||
$(top_srcdir)/m4macros/gtk-doc.m4 \
|
||||
$(top_srcdir)/m4macros/binreloc.m4 $(top_srcdir)/configure.in
|
||||
$(top_srcdir)/m4macros/binreloc.m4 \
|
||||
$(top_srcdir)/m4macros/detectcflags.m4 \
|
||||
$(top_srcdir)/m4macros/gimpprint.m4 \
|
||||
$(top_srcdir)/m4macros/pythondev.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
@ -60,6 +75,26 @@ CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES = gimp-zip gimp-2.0.pc gimpthumb-2.0.pc \
|
||||
gimpui-2.0.pc
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
@ -81,17 +116,13 @@ am__nobase_list = $(am__nobase_strip_setup); \
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"
|
||||
SCRIPTS = $(bin_SCRIPTS)
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
|
||||
DATA = $(pkgconfig_DATA)
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
@ -105,9 +136,11 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d "$(distdir)" \
|
||||
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr "$(distdir)"; }; }
|
||||
if test -d "$(distdir)"; then \
|
||||
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -rf "$(distdir)" \
|
||||
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||
else :; fi
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
@ -133,9 +166,11 @@ am__relativize = \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
|
||||
GZIP_ENV = --best
|
||||
DIST_ARCHIVES = $(distdir).tar.bz2 $(distdir).tar.xz
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
AA_LIBS = @AA_LIBS@
|
||||
ACLOCAL = @ACLOCAL@
|
||||
@ -145,8 +180,11 @@ ALSA_CFLAGS = @ALSA_CFLAGS@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
ALTIVEC_EXTRA_CFLAGS = @ALTIVEC_EXTRA_CFLAGS@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
ATK_CFLAGS = @ATK_CFLAGS@
|
||||
ATK_LIBS = @ATK_LIBS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
@ -155,8 +193,12 @@ BABL_CFLAGS = @BABL_CFLAGS@
|
||||
BABL_LIBS = @BABL_LIBS@
|
||||
BINRELOC_CFLAGS = @BINRELOC_CFLAGS@
|
||||
BINRELOC_LIBS = @BINRELOC_LIBS@
|
||||
BZIP2_LIBS = @BZIP2_LIBS@
|
||||
CAIRO_CFLAGS = @CAIRO_CFLAGS@
|
||||
CAIRO_LIBS = @CAIRO_LIBS@
|
||||
CAIRO_PDF_CFLAGS = @CAIRO_PDF_CFLAGS@
|
||||
CAIRO_PDF_LIBS = @CAIRO_PDF_LIBS@
|
||||
CAIRO_REQUIRED_VERSION = @CAIRO_REQUIRED_VERSION@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
@ -190,14 +232,18 @@ EXIF_CFLAGS = @EXIF_CFLAGS@
|
||||
EXIF_LIBS = @EXIF_LIBS@
|
||||
FGREP = @FGREP@
|
||||
FILE_AA = @FILE_AA@
|
||||
FILE_JP2_LOAD = @FILE_JP2_LOAD@
|
||||
FILE_MNG = @FILE_MNG@
|
||||
FILE_PDF = @FILE_PDF@
|
||||
FILE_PDF_LOAD = @FILE_PDF_LOAD@
|
||||
FILE_PDF_SAVE = @FILE_PDF_SAVE@
|
||||
FILE_PNG = @FILE_PNG@
|
||||
FILE_PS = @FILE_PS@
|
||||
FILE_PSP = @FILE_PSP@
|
||||
FILE_SVG = @FILE_SVG@
|
||||
FILE_TIFF_LOAD = @FILE_TIFF_LOAD@
|
||||
FILE_TIFF_SAVE = @FILE_TIFF_SAVE@
|
||||
FILE_WMF = @FILE_WMF@
|
||||
FILE_XMC = @FILE_XMC@
|
||||
FILE_XPM = @FILE_XPM@
|
||||
FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
|
||||
FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
|
||||
@ -206,10 +252,10 @@ FREETYPE_LIBS = @FREETYPE_LIBS@
|
||||
GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
|
||||
GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@
|
||||
GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
|
||||
GDK_PIXBUF_REQUIRED_VERSION = @GDK_PIXBUF_REQUIRED_VERSION@
|
||||
GEGL_CFLAGS = @GEGL_CFLAGS@
|
||||
GEGL_LIBS = @GEGL_LIBS@
|
||||
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
|
||||
GIMPINSTALL = @GIMPINSTALL@
|
||||
GIMP_API_VERSION = @GIMP_API_VERSION@
|
||||
GIMP_APP_VERSION = @GIMP_APP_VERSION@
|
||||
GIMP_BINARY_AGE = @GIMP_BINARY_AGE@
|
||||
@ -226,8 +272,6 @@ GIMP_PKGCONFIG_VERSION = @GIMP_PKGCONFIG_VERSION@
|
||||
GIMP_PLUGINS = @GIMP_PLUGINS@
|
||||
GIMP_PLUGIN_VERSION = @GIMP_PLUGIN_VERSION@
|
||||
GIMP_REAL_VERSION = @GIMP_REAL_VERSION@
|
||||
GIMP_REMOTE = @GIMP_REMOTE@
|
||||
GIMP_REMOTE_MANPAGE = @GIMP_REMOTE_MANPAGE@
|
||||
GIMP_SYSCONF_VERSION = @GIMP_SYSCONF_VERSION@
|
||||
GIMP_TOOL_VERSION = @GIMP_TOOL_VERSION@
|
||||
GIMP_UNSTABLE = @GIMP_UNSTABLE@
|
||||
@ -236,6 +280,7 @@ GIMP_VERSION = @GIMP_VERSION@
|
||||
GIO_CFLAGS = @GIO_CFLAGS@
|
||||
GIO_LIBS = @GIO_LIBS@
|
||||
GLIB_CFLAGS = @GLIB_CFLAGS@
|
||||
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
|
||||
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
|
||||
GLIB_LIBS = @GLIB_LIBS@
|
||||
GLIB_MKENUMS = @GLIB_MKENUMS@
|
||||
@ -244,18 +289,19 @@ GMODULE_NO_EXPORT_CFLAGS = @GMODULE_NO_EXPORT_CFLAGS@
|
||||
GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GNOME_VFS_CFLAGS = @GNOME_VFS_CFLAGS@
|
||||
GNOME_VFS_LIBS = @GNOME_VFS_LIBS@
|
||||
GOBJECT_QUERY = @GOBJECT_QUERY@
|
||||
GREP = @GREP@
|
||||
GS_LIBS = @GS_LIBS@
|
||||
GTKDOC_CHECK = @GTKDOC_CHECK@
|
||||
GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
|
||||
GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
|
||||
GTKDOC_MKPDF = @GTKDOC_MKPDF@
|
||||
GTKDOC_REBASE = @GTKDOC_REBASE@
|
||||
GTK_CFLAGS = @GTK_CFLAGS@
|
||||
GTK_LIBS = @GTK_LIBS@
|
||||
GTK_REQUIRED_VERSION = @GTK_REQUIRED_VERSION@
|
||||
HAL_CFLAGS = @HAL_CFLAGS@
|
||||
HAL_LIBS = @HAL_LIBS@
|
||||
GUDEV_CFLAGS = @GUDEV_CFLAGS@
|
||||
GUDEV_LIBS = @GUDEV_LIBS@
|
||||
HAVE_FINITE = @HAVE_FINITE@
|
||||
HAVE_ISFINITE = @HAVE_ISFINITE@
|
||||
HTML_DIR = @HTML_DIR@
|
||||
@ -270,8 +316,13 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
|
||||
INTLTOOL_MERGE = @INTLTOOL_MERGE@
|
||||
INTLTOOL_PERL = @INTLTOOL_PERL@
|
||||
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
|
||||
INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
|
||||
INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
|
||||
INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
|
||||
INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
|
||||
ISO_CODES_LOCALEDIR = @ISO_CODES_LOCALEDIR@
|
||||
ISO_CODES_LOCATION = @ISO_CODES_LOCATION@
|
||||
JP2_LIBS = @JP2_LIBS@
|
||||
JPEG_LIBS = @JPEG_LIBS@
|
||||
LCMS = @LCMS@
|
||||
LCMS_CFLAGS = @LCMS_CFLAGS@
|
||||
@ -294,6 +345,7 @@ MIME_TYPES = @MIME_TYPES@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MMX_EXTRA_CFLAGS = @MMX_EXTRA_CFLAGS@
|
||||
MNG_CFLAGS = @MNG_CFLAGS@
|
||||
MNG_LIBS = @MNG_LIBS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_OPTS = @MSGFMT_OPTS@
|
||||
@ -311,8 +363,8 @@ PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
|
||||
PANGOFT2_LIBS = @PANGOFT2_LIBS@
|
||||
PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@
|
||||
PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@
|
||||
PATHSEP = @PATHSEP@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
@ -359,6 +411,7 @@ USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WEBKIT_CFLAGS = @WEBKIT_CFLAGS@
|
||||
WEBKIT_LIBS = @WEBKIT_LIBS@
|
||||
WEB_PAGE = @WEB_PAGE@
|
||||
WIN32_LARGE_ADDRESS_AWARE = @WIN32_LARGE_ADDRESS_AWARE@
|
||||
WINDRES = @WINDRES@
|
||||
WMF_CFLAGS = @WMF_CFLAGS@
|
||||
@ -367,11 +420,14 @@ WMF_LIBS = @WMF_LIBS@
|
||||
XFIXES_CFLAGS = @XFIXES_CFLAGS@
|
||||
XFIXES_LIBS = @XFIXES_LIBS@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XMC_CFLAGS = @XMC_CFLAGS@
|
||||
XMC_LIBS = @XMC_LIBS@
|
||||
XMKMF = @XMKMF@
|
||||
XMLLINT = @XMLLINT@
|
||||
XMU_LIBS = @XMU_LIBS@
|
||||
XPM_LIBS = @XPM_LIBS@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
XVFB_RUN = @XVFB_RUN@
|
||||
X_CFLAGS = @X_CFLAGS@
|
||||
X_EXTRA_LIBS = @X_EXTRA_LIBS@
|
||||
X_LIBS = @X_LIBS@
|
||||
@ -415,6 +471,8 @@ htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
intltool__v_merge_options_ = @intltool__v_merge_options_@
|
||||
intltool__v_merge_options_0 = @intltool__v_merge_options_0@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
@ -439,6 +497,7 @@ target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
|
||||
SUBDIRS = \
|
||||
m4macros \
|
||||
tools \
|
||||
@ -466,16 +525,15 @@ SUBDIRS = \
|
||||
$(GIMP_PLUGINS) \
|
||||
etc \
|
||||
devel-docs \
|
||||
docs
|
||||
docs \
|
||||
build
|
||||
|
||||
bin_SCRIPTS = @GIMPINSTALL@
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = \
|
||||
gimp-@GIMP_PKGCONFIG_VERSION@.pc \
|
||||
gimpthumb-@GIMP_PKGCONFIG_VERSION@.pc \
|
||||
gimpui-@GIMP_PKGCONFIG_VERSION@.pc
|
||||
|
||||
EXTRA_SCRIPTS = gimpinstall-@GIMP_TOOL_VERSION@
|
||||
EXTRA_DIST = \
|
||||
AUTHORS \
|
||||
COPYING \
|
||||
@ -500,17 +558,15 @@ EXTRA_DIST = \
|
||||
authors.xml \
|
||||
authors.xsl \
|
||||
config.h.win32 \
|
||||
gimp-zip.in \
|
||||
gimpdefs.msc \
|
||||
makefile.msc
|
||||
gimp-zip.in
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
|
||||
CHANGELOG_START = f8f3c41320320cb07af2956eca48007a464f14d7
|
||||
CHANGELOG_START = 74424325abb54620b370f2595445b2b2a19fe5e7
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
@ -546,10 +602,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
|
||||
else :; fi
|
||||
@if test ! -f $@; then rm -f stamp-h1; else :; fi
|
||||
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
@ -569,40 +623,6 @@ gimpthumb-2.0.pc: $(top_builddir)/config.status $(srcdir)/gimpthumb.pc.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
gimpui-2.0.pc: $(top_builddir)/config.status $(srcdir)/gimpui.pc.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n' \
|
||||
-e 'h;s|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
|
||||
if (++n[d] == $(am__install_max)) { \
|
||||
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
|
||||
else { print "f", d "/" $$4, $$1 } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
||||
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-binSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 's,.*/,,;$(transform)'`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(bindir)" && rm -f $$files
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
@ -614,8 +634,11 @@ distclean-libtool:
|
||||
-rm -f libtool config.lt
|
||||
install-pkgconfigDATA: $(pkgconfig_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
|
||||
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
@ -629,9 +652,7 @@ uninstall-pkgconfigDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
|
||||
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
@ -802,13 +823,10 @@ distdir: $(DISTFILES)
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
@ -842,15 +860,18 @@ dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-lzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
|
||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
@ -867,8 +888,8 @@ dist-zip: distdir
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
@ -882,6 +903,8 @@ distcheck: dist
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lzma*) \
|
||||
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
|
||||
*.tar.lz*) \
|
||||
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
@ -901,6 +924,7 @@ distcheck: dist
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
@ -929,8 +953,16 @@ distcheck: dist
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@$(am__cd) '$(distuninstallcheck_dir)' \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
@test -n '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: trying to run $@ with an empty' \
|
||||
'$$(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
$(am__cd) '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
@ -948,10 +980,10 @@ distcleancheck: distclean
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(SCRIPTS) $(DATA) config.h all-local
|
||||
all-am: Makefile $(DATA) config.h all-local
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"; do \
|
||||
for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
@ -964,10 +996,15 @@ install-am: all-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
@ -1007,7 +1044,7 @@ install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-binSCRIPTS
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
@ -1047,7 +1084,7 @@ ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binSCRIPTS uninstall-pkgconfigDATA
|
||||
uninstall-am: uninstall-pkgconfigDATA
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
|
||||
ctags-recursive install-am install-strip tags-recursive
|
||||
@ -1055,28 +1092,24 @@ uninstall-am: uninstall-binSCRIPTS uninstall-pkgconfigDATA
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am all-local am--refresh check check-am clean \
|
||||
clean-generic clean-libtool ctags ctags-recursive dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar \
|
||||
dist-tarZ dist-xz dist-zip distcheck distclean \
|
||||
dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-lzma \
|
||||
dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-binSCRIPTS install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-pkgconfigDATA install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-binSCRIPTS \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||
ps ps-am tags tags-recursive uninstall uninstall-am \
|
||||
uninstall-pkgconfigDATA
|
||||
|
||||
|
||||
AUTHORS: authors.xml authors.xsl
|
||||
@HAVE_XSLTPROC_TRUE@ $(XSLTPROC) authors.xsl $< > $(@) || rm -f $(@)
|
||||
|
||||
gimpinstall-@GIMP_TOOL_VERSION@:
|
||||
$(LN_S) $(srcdir)/install-sh $(srcdir)/gimpinstall-@GIMP_TOOL_VERSION@
|
||||
@HAVE_XSLTPROC_TRUE@ $(XSLTPROC) -o $(@) $(top_srcdir)/authors.xsl $< || rm -f $(@)
|
||||
|
||||
check-defs:
|
||||
@$(PYTHON) $(top_srcdir)/tools/defcheck.py $(top_srcdir) || \
|
||||
@ -1106,7 +1139,6 @@ $(srcdir)/ChangeLog:
|
||||
(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
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
|
43
README
43
README
@ -1,14 +1,14 @@
|
||||
------------------------------
|
||||
GNU Image Manipulation Program
|
||||
Version 2.6
|
||||
2.8 Stable Branch
|
||||
------------------------------
|
||||
|
||||
GIMP 2.6 replaces earlier GIMP 2.x versions. It is advised that you
|
||||
uninstall them before installing GIMP 2.6. If you want to keep your
|
||||
older GIMP 2.x installation in parallel to GIMP 2.6, you have to
|
||||
GIMP 2.8 replaces earlier GIMP 2.x versions. It is advised that you
|
||||
uninstall them before installing GIMP 2.8. If you want to keep your
|
||||
older GIMP 2.x installation in parallel to GIMP 2.8, you have to
|
||||
choose a separate prefix which is not in your default library search
|
||||
path. Otherwise your GIMP 2.4 or GIMP 2.2 installation will start to
|
||||
use the new libraries. You have been warned.
|
||||
path. Otherwise your prevoius 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
|
||||
@ -50,24 +50,11 @@ discussion. There is more info at
|
||||
|
||||
Links to several archives of the mailing lists are included in that page.
|
||||
|
||||
Gimp-announce is a low-traffic list with announcements about new
|
||||
releases of GIMP and plug-ins. Gimp-user is a mailing list dedicated
|
||||
to user problems, hints and tips, discussion of cool effects, etc.
|
||||
Gimp-developer is oriented to GIMP core and plug-in developers. Most
|
||||
people will only want to be subscribed to gimp-user. If you want to
|
||||
help develop GIMP, the gimp-developer mailing list is a good starting
|
||||
point.
|
||||
|
||||
There is also a mailing list, "gimpwin-users", dedicated to users of the
|
||||
Win32 port. To subscribe, send an empty message to
|
||||
|
||||
gimpwin-users-subscribe@egroups.com
|
||||
|
||||
You can also use the web interface at
|
||||
http://www.egroups.com/group/gimpwin-users/. Note that as this mailing
|
||||
list is hosted on egroups.com, the messages from the list contain
|
||||
relatively unintrusive and easily ignored advertisements at the
|
||||
end. But if you are absolutely allergic to ads, don't subscribe.
|
||||
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. 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.
|
||||
|
||||
|
||||
3. IRC
|
||||
@ -89,13 +76,13 @@ servers are:
|
||||
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://gtk.themes.org. Additionally, GIMP reads ~/.gimp-2.6/gtkrc so
|
||||
you can have settings that only apply to GIMP.
|
||||
http://art.gnome.org/themes/gtk2 . Additionally, GIMP reads the file
|
||||
~/.gimp-2.8/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 ~/.gimp-2.6/menurc. You can also manually change the keybindings to
|
||||
any of your choice by editing ~/.gimp-2.6/menurc.
|
||||
to ~/.gimp-2.8/menurc. You can also manually change the keybindings to
|
||||
any of your choice by editing ~/.gimp-2.8/menurc.
|
||||
|
||||
|
||||
Have fun,
|
||||
|
@ -27,7 +27,7 @@ GIMP is different
|
||||
po-tips/gimp20-tips.pot -- the startup tips
|
||||
|
||||
If you are looking for the translations of gimp-perl, please note that
|
||||
gimp-perl has been moved into it's own Subversion module called
|
||||
gimp-perl has been moved into it's own git module called
|
||||
gimp-perl.
|
||||
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
m4_include([m4macros/detectcflags.m4])
|
||||
m4_include([m4macros/pythondev.m4])
|
||||
m4_include([m4macros/gimpprint.m4])
|
||||
m4_include([m4macros/alsa.m4])
|
||||
m4_include([m4macros/gtk-doc.m4])
|
||||
m4_include([m4macros/binreloc.m4])
|
||||
m4_include([m4macros/detectcflags.m4])
|
||||
m4_include([m4macros/gimpprint.m4])
|
||||
m4_include([m4macros/pythondev.m4])
|
||||
|
2312
aclocal.m4
vendored
2312
aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
234
app/Makefile.am
234
app/Makefile.am
@ -8,20 +8,22 @@ libgimpmodule = $(top_builddir)/libgimpmodule/libgimpmodule-$(GIMP_API_VERSION).
|
||||
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 = \
|
||||
base \
|
||||
paint-funcs \
|
||||
composite \
|
||||
base \
|
||||
gegl \
|
||||
config \
|
||||
composite \
|
||||
core \
|
||||
paint \
|
||||
gegl \
|
||||
text \
|
||||
vectors \
|
||||
paint \
|
||||
plug-in \
|
||||
file \
|
||||
xcf \
|
||||
file \
|
||||
pdb \
|
||||
widgets \
|
||||
display \
|
||||
@ -29,16 +31,21 @@ SUBDIRS = \
|
||||
dialogs \
|
||||
actions \
|
||||
menus \
|
||||
gui
|
||||
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-2.6 gimp-console-2.6
|
||||
bin_PROGRAMS = gimp-2.8 gimp-console-2.8
|
||||
else
|
||||
bin_PROGRAMS = gimp-2.6
|
||||
bin_PROGRAMS = gimp-2.8
|
||||
endif
|
||||
|
||||
app_sources = \
|
||||
libapp_sources = \
|
||||
about.h \
|
||||
app.c \
|
||||
app.h \
|
||||
@ -46,27 +53,41 @@ app_sources = \
|
||||
batch.h \
|
||||
errors.c \
|
||||
errors.h \
|
||||
main.c \
|
||||
language.c \
|
||||
language.h \
|
||||
sanity.c \
|
||||
sanity.h \
|
||||
signals.c \
|
||||
signals.h \
|
||||
tests.c \
|
||||
tests.h \
|
||||
unique.c \
|
||||
unique.h \
|
||||
units.c \
|
||||
units.h \
|
||||
version.c \
|
||||
version.h \
|
||||
gimp-debug.c \
|
||||
gimp-debug.h \
|
||||
gimp-log.c \
|
||||
gimp-log.h \
|
||||
gimp-intl.h
|
||||
|
||||
gimp_2_6_SOURCES = $(app_sources)
|
||||
libapp_generated_sources = \
|
||||
git-version.h
|
||||
|
||||
# Build git-version.h before anything in the subdirs as this is needed
|
||||
# in the about dialog.
|
||||
BUILT_SOURCES = $(libapp_generated_sources)
|
||||
|
||||
CLEANFILES = $(libapp_generated_sources)
|
||||
|
||||
$(srcdir)/version.c: git-version.h
|
||||
|
||||
libapp_a_SOURCES = $(libapp_sources) $(libapp_generated_sources)
|
||||
|
||||
gimp_2_8_SOURCES = $(libapp_sources) main.c
|
||||
|
||||
EXTRA_DIST = \
|
||||
makefile.msc \
|
||||
gimp.rc \
|
||||
fileicon.ico \
|
||||
wilber.ico
|
||||
|
||||
if OS_WIN32
|
||||
win32_ldflags = -mwindows $(WIN32_LARGE_ADDRESS_AWARE)
|
||||
@ -77,7 +98,9 @@ munix = -Wl,-rpath '-Wl,$$ORIGIN/../lib'
|
||||
endif
|
||||
|
||||
if HAVE_WINDRES
|
||||
GIMPICONRC = gimprc.o
|
||||
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 = \
|
||||
@ -87,105 +110,104 @@ AM_CPPFLAGS = \
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
$(GTK_CFLAGS) \
|
||||
$(PANGOFT2_CFLAGS) \
|
||||
$(DBUS_GLIB_CFLAGS) \
|
||||
$(PANGOCAIRO_CFLAGS) \
|
||||
$(GEGL_CFLAGS) \
|
||||
-I$(includedir)
|
||||
|
||||
# FIXME: core should not depend on xcf
|
||||
workaround_that_core_depends_on_xcf = \
|
||||
-u $(SYMPREFIX)xcf_init
|
||||
|
||||
# FIXME: core should not depend on pdb
|
||||
workaround_that_core_depends_on_pdb = \
|
||||
-u $(SYMPREFIX)internal_procs_init \
|
||||
-u $(SYMPREFIX)gimp_plug_in_manager_restore
|
||||
|
||||
# FIXME: plug-in should not depend on pdb
|
||||
workaround_that_plug_in_depends_on_pdb = \
|
||||
-u $(SYMPREFIX)gimp_pdb_compat_param_spec
|
||||
|
||||
# FIXME: file should not depend on plug-in
|
||||
workaround_that_file_depends_on_plug_in = \
|
||||
-u $(SYMPREFIX)plug_in_icc_profile_apply_rgb \
|
||||
-u $(SYMPREFIX)gimp_image_map_config_get_type
|
||||
|
||||
# core, vectors and gegl are on the same architectural layer, prevent
|
||||
# the linker from panicing
|
||||
calm_down_linker = \
|
||||
-u $(SYMPREFIX)gimp_vectors_undo_get_type \
|
||||
-u $(SYMPREFIX)gimp_vectors_mod_undo_get_type \
|
||||
-u $(SYMPREFIX)gimp_vectors_prop_undo_get_type \
|
||||
-u $(SYMPREFIX)gimp_curve_map_pixels
|
||||
|
||||
AM_LDFLAGS = \
|
||||
$(munix) \
|
||||
$(CARBON_LDFLAGS) \
|
||||
-u $(SYMPREFIX)xcf_init \
|
||||
-u $(SYMPREFIX)internal_procs_init \
|
||||
-u $(SYMPREFIX)gimp_coords_mix \
|
||||
-u $(SYMPREFIX)gimp_curve_map_pixels \
|
||||
-u $(SYMPREFIX)gimp_image_map_config_get_type \
|
||||
-u $(SYMPREFIX)gimp_plug_in_manager_restore
|
||||
$(calm_down_linker) \
|
||||
$(workaround_that_core_depends_on_xcf) \
|
||||
$(workaround_that_core_depends_on_pdb) \
|
||||
$(workaround_that_plug_in_depends_on_pdb) \
|
||||
$(workaround_that_file_depends_on_plug_in)
|
||||
|
||||
gimp_2_6_LDFLAGS = $(AM_LDFLAGS) $(win32_ldflags)
|
||||
|
||||
gimp_2_6_LDADD = \
|
||||
gui/libappgui.a \
|
||||
actions/libappactions.a \
|
||||
dialogs/libappdialogs.a \
|
||||
menus/libappmenus.a \
|
||||
display/libappdisplay.a \
|
||||
tools/libapptools.a \
|
||||
widgets/libappwidgets.a \
|
||||
pdb/libappinternal-procs.a \
|
||||
gimpconsoleldadd = \
|
||||
xcf/libappxcf.a \
|
||||
file/libappfile.a \
|
||||
plug-in/libappplug-in.a \
|
||||
pdb/libappinternal-procs.a \
|
||||
pdb/libapppdb.a \
|
||||
core/libappcore.a \
|
||||
plug-in/libappplug-in.a \
|
||||
vectors/libappvectors.a \
|
||||
paint/libapppaint.a \
|
||||
core/libappcore.a \
|
||||
file/libappfile.a \
|
||||
text/libapptext.a \
|
||||
config/libappconfig.a \
|
||||
gegl/libappgegl.a \
|
||||
paint-funcs/libapppaint-funcs.a \
|
||||
paint/libapppaint.a \
|
||||
composite/libappcomposite.a \
|
||||
gegl/libappgegl.a \
|
||||
config/libappconfig.a \
|
||||
paint-funcs/libapppaint-funcs.a \
|
||||
base/libappbase.a \
|
||||
$(libgimpwidgets) \
|
||||
$(libgimpmodule) \
|
||||
$(libgimpcolor) \
|
||||
$(libgimpthumb) \
|
||||
$(libgimpmath) \
|
||||
$(libgimpconfig) \
|
||||
$(libgimpmath) \
|
||||
$(libgimpthumb) \
|
||||
$(libgimpcolor) \
|
||||
$(libgimpmodule) \
|
||||
$(libgimpbase) \
|
||||
$(GTK_LIBS) \
|
||||
$(PANGOFT2_LIBS) \
|
||||
$(FONTCONFIG_LIBS) \
|
||||
$(GDK_PIXBUF_LIBS) \
|
||||
$(FREETYPE_LIBS) \
|
||||
$(DBUS_GLIB_LIBS) \
|
||||
$(FONTCONFIG_LIBS) \
|
||||
$(PANGOCAIRO_LIBS) \
|
||||
$(CAIRO_LIBS) \
|
||||
$(GEGL_LIBS) \
|
||||
$(RT_LIBS) \
|
||||
$(GLIB_LIBS) \
|
||||
$(INTLLIBS) \
|
||||
$(GIMPICONRC)
|
||||
$(RT_LIBS)
|
||||
|
||||
gimp_2_8_LDFLAGS = $(AM_LDFLAGS) $(win32_ldflags)
|
||||
|
||||
gimp_2_8_LDADD = \
|
||||
gui/libappgui.a \
|
||||
menus/libappmenus.a \
|
||||
actions/libappactions.a \
|
||||
dialogs/libappdialogs.a \
|
||||
tools/libapptools.a \
|
||||
display/libappdisplay.a \
|
||||
widgets/libappwidgets.a \
|
||||
$(libgimpwidgets) \
|
||||
$(GTK_LIBS) \
|
||||
$(DBUS_GLIB_LIBS) \
|
||||
$(gimpconsoleldadd) \
|
||||
$(GIMPRC)
|
||||
|
||||
|
||||
if ENABLE_GIMP_CONSOLE
|
||||
|
||||
gimp_console_2_6_SOURCES = $(app_sources)
|
||||
gimp_console_2_8_SOURCES = $(libapp_sources) main.c
|
||||
|
||||
gimp_console_2_6_CPPFLAGS = \
|
||||
gimp_console_2_8_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS) \
|
||||
-DGIMP_CONSOLE_COMPILATION
|
||||
|
||||
gimp_console_2_6_LDADD = \
|
||||
widgets/widgets-enums.o \
|
||||
display/display-enums.o \
|
||||
display/gimpdisplayoptions.o \
|
||||
pdb/libappinternal-procs.a \
|
||||
xcf/libappxcf.a \
|
||||
file/libappfile.a \
|
||||
plug-in/libappplug-in.a \
|
||||
pdb/libapppdb.a \
|
||||
core/libappcore.a \
|
||||
vectors/libappvectors.a \
|
||||
paint/libapppaint.a \
|
||||
text/libapptext.a \
|
||||
config/libappconfig.a \
|
||||
gegl/libappgegl.a \
|
||||
paint-funcs/libapppaint-funcs.a \
|
||||
composite/libappcomposite.a \
|
||||
base/libappbase.a \
|
||||
$(libgimpmodule) \
|
||||
$(libgimpcolor) \
|
||||
$(libgimpthumb) \
|
||||
$(libgimpmath) \
|
||||
$(libgimpconfig) \
|
||||
$(libgimpbase) \
|
||||
$(GDK_PIXBUF_LIBS) \
|
||||
$(CAIRO_LIBS) \
|
||||
$(PANGOFT2_LIBS) \
|
||||
$(FONTCONFIG_LIBS) \
|
||||
$(FREETYPE_LIBS) \
|
||||
$(GEGL_LIBS) \
|
||||
$(GLIB_LIBS) \
|
||||
$(RT_LIBS) \
|
||||
$(INTLLIBS) \
|
||||
$(GIMPICONRC)
|
||||
gimp_console_2_8_LDADD = \
|
||||
$(gimpconsoleldadd) \
|
||||
$(GIMPCONSOLERC)
|
||||
|
||||
endif
|
||||
|
||||
@ -241,5 +263,31 @@ dist-dump-gimprc: gimp-console-$(GIMP_APP_VERSION)$(EXEEXT)
|
||||
|
||||
dist-hook: dist-check-gimp-console dist-dump-gimprc
|
||||
|
||||
gimprc.o:
|
||||
$(WINDRES) gimp.rc gimprc.o
|
||||
# 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 -d "$(top_srcdir)/.git"; then \
|
||||
git_version="`git --git-dir=$(top_srcdir)/.git describe --always`"; \
|
||||
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_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_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
|
||||
|
873
app/Makefile.in
873
app/Makefile.in
File diff suppressed because it is too large
Load Diff
17
app/about.h
17
app/about.h
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __ABOUT_H__
|
||||
@ -26,14 +25,15 @@
|
||||
#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-2008\n" \
|
||||
_("Copyright © 1995-%s\n" \
|
||||
"Spencer Kimball, Peter Mattis and the GIMP Development Team")
|
||||
|
||||
#define GIMP_LICENSE \
|
||||
_("GIMP is free software; you can redistribute it and/or modify it " \
|
||||
_("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 2 of the License, or " \
|
||||
"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, " \
|
||||
@ -42,8 +42,7 @@
|
||||
"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, write to the Free Software Foundation, " \
|
||||
"Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.")
|
||||
"along with GIMP. If not, see <http://www.gnu.org/licenses/>.")
|
||||
|
||||
|
||||
#endif /* __ABOUT_H__ */
|
||||
|
@ -75,6 +75,10 @@ libappactions_a_SOURCES = \
|
||||
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 \
|
||||
@ -149,10 +153,18 @@ libappactions_a_SOURCES = \
|
||||
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-preset-editor-actions.c \
|
||||
tool-preset-editor-actions.h \
|
||||
tools-actions.c \
|
||||
tools-actions.h \
|
||||
tools-commands.c \
|
||||
@ -173,5 +185,3 @@ libappactions_a_SOURCES = \
|
||||
windows-actions.h \
|
||||
windows-commands.c \
|
||||
windows-commands.h
|
||||
|
||||
EXTRA_DIST = makefile.msc
|
||||
|
@ -1,9 +1,9 @@
|
||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.11.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@ -16,6 +16,23 @@
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@ -38,12 +55,11 @@ subdir = app/actions
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/m4macros/detectcflags.m4 \
|
||||
$(top_srcdir)/m4macros/pythondev.m4 \
|
||||
$(top_srcdir)/m4macros/gimpprint.m4 \
|
||||
$(top_srcdir)/m4macros/alsa.m4 \
|
||||
$(top_srcdir)/m4macros/gtk-doc.m4 \
|
||||
$(top_srcdir)/m4macros/binreloc.m4 $(top_srcdir)/configure.in
|
||||
$(top_srcdir)/m4macros/binreloc.m4 \
|
||||
$(top_srcdir)/m4macros/detectcflags.m4 \
|
||||
$(top_srcdir)/m4macros/gimpprint.m4 \
|
||||
$(top_srcdir)/m4macros/pythondev.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
@ -52,6 +68,12 @@ CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
AM_V_AR = $(am__v_AR_@AM_V@)
|
||||
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
|
||||
am__v_AR_0 = @echo " AR " $@;
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
libappactions_a_AR = $(AR) $(ARFLAGS)
|
||||
libappactions_a_LIBADD =
|
||||
am_libappactions_a_OBJECTS = actions.$(OBJEXT) \
|
||||
@ -69,6 +91,7 @@ am_libappactions_a_OBJECTS = actions.$(OBJEXT) \
|
||||
dockable-actions.$(OBJEXT) dockable-commands.$(OBJEXT) \
|
||||
documents-actions.$(OBJEXT) documents-commands.$(OBJEXT) \
|
||||
drawable-actions.$(OBJEXT) drawable-commands.$(OBJEXT) \
|
||||
dynamics-actions.$(OBJEXT) dynamics-editor-actions.$(OBJEXT) \
|
||||
edit-actions.$(OBJEXT) edit-commands.$(OBJEXT) \
|
||||
error-console-actions.$(OBJEXT) \
|
||||
error-console-commands.$(OBJEXT) file-actions.$(OBJEXT) \
|
||||
@ -88,8 +111,10 @@ am_libappactions_a_OBJECTS = actions.$(OBJEXT) \
|
||||
sample-points-commands.$(OBJEXT) select-actions.$(OBJEXT) \
|
||||
select-commands.$(OBJEXT) templates-actions.$(OBJEXT) \
|
||||
templates-commands.$(OBJEXT) text-editor-actions.$(OBJEXT) \
|
||||
text-editor-commands.$(OBJEXT) tool-options-actions.$(OBJEXT) \
|
||||
tool-options-commands.$(OBJEXT) tools-actions.$(OBJEXT) \
|
||||
text-editor-commands.$(OBJEXT) text-tool-actions.$(OBJEXT) \
|
||||
text-tool-commands.$(OBJEXT) tool-options-actions.$(OBJEXT) \
|
||||
tool-options-commands.$(OBJEXT) tool-presets-actions.$(OBJEXT) \
|
||||
tool-preset-editor-actions.$(OBJEXT) tools-actions.$(OBJEXT) \
|
||||
tools-commands.$(OBJEXT) vectors-actions.$(OBJEXT) \
|
||||
vectors-commands.$(OBJEXT) view-actions.$(OBJEXT) \
|
||||
view-commands.$(OBJEXT) window-actions.$(OBJEXT) \
|
||||
@ -102,15 +127,33 @@ am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
SOURCES = $(libappactions_a_SOURCES)
|
||||
DIST_SOURCES = $(libappactions_a_SOURCES)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
@ -122,8 +165,11 @@ ALSA_CFLAGS = @ALSA_CFLAGS@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
ALTIVEC_EXTRA_CFLAGS = @ALTIVEC_EXTRA_CFLAGS@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
ATK_CFLAGS = @ATK_CFLAGS@
|
||||
ATK_LIBS = @ATK_LIBS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
@ -132,8 +178,12 @@ BABL_CFLAGS = @BABL_CFLAGS@
|
||||
BABL_LIBS = @BABL_LIBS@
|
||||
BINRELOC_CFLAGS = @BINRELOC_CFLAGS@
|
||||
BINRELOC_LIBS = @BINRELOC_LIBS@
|
||||
BZIP2_LIBS = @BZIP2_LIBS@
|
||||
CAIRO_CFLAGS = @CAIRO_CFLAGS@
|
||||
CAIRO_LIBS = @CAIRO_LIBS@
|
||||
CAIRO_PDF_CFLAGS = @CAIRO_PDF_CFLAGS@
|
||||
CAIRO_PDF_LIBS = @CAIRO_PDF_LIBS@
|
||||
CAIRO_REQUIRED_VERSION = @CAIRO_REQUIRED_VERSION@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
@ -167,14 +217,18 @@ EXIF_CFLAGS = @EXIF_CFLAGS@
|
||||
EXIF_LIBS = @EXIF_LIBS@
|
||||
FGREP = @FGREP@
|
||||
FILE_AA = @FILE_AA@
|
||||
FILE_JP2_LOAD = @FILE_JP2_LOAD@
|
||||
FILE_MNG = @FILE_MNG@
|
||||
FILE_PDF = @FILE_PDF@
|
||||
FILE_PDF_LOAD = @FILE_PDF_LOAD@
|
||||
FILE_PDF_SAVE = @FILE_PDF_SAVE@
|
||||
FILE_PNG = @FILE_PNG@
|
||||
FILE_PS = @FILE_PS@
|
||||
FILE_PSP = @FILE_PSP@
|
||||
FILE_SVG = @FILE_SVG@
|
||||
FILE_TIFF_LOAD = @FILE_TIFF_LOAD@
|
||||
FILE_TIFF_SAVE = @FILE_TIFF_SAVE@
|
||||
FILE_WMF = @FILE_WMF@
|
||||
FILE_XMC = @FILE_XMC@
|
||||
FILE_XPM = @FILE_XPM@
|
||||
FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
|
||||
FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
|
||||
@ -183,10 +237,10 @@ FREETYPE_LIBS = @FREETYPE_LIBS@
|
||||
GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@
|
||||
GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@
|
||||
GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@
|
||||
GDK_PIXBUF_REQUIRED_VERSION = @GDK_PIXBUF_REQUIRED_VERSION@
|
||||
GEGL_CFLAGS = @GEGL_CFLAGS@
|
||||
GEGL_LIBS = @GEGL_LIBS@
|
||||
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
|
||||
GIMPINSTALL = @GIMPINSTALL@
|
||||
GIMP_API_VERSION = @GIMP_API_VERSION@
|
||||
GIMP_APP_VERSION = @GIMP_APP_VERSION@
|
||||
GIMP_BINARY_AGE = @GIMP_BINARY_AGE@
|
||||
@ -203,8 +257,6 @@ GIMP_PKGCONFIG_VERSION = @GIMP_PKGCONFIG_VERSION@
|
||||
GIMP_PLUGINS = @GIMP_PLUGINS@
|
||||
GIMP_PLUGIN_VERSION = @GIMP_PLUGIN_VERSION@
|
||||
GIMP_REAL_VERSION = @GIMP_REAL_VERSION@
|
||||
GIMP_REMOTE = @GIMP_REMOTE@
|
||||
GIMP_REMOTE_MANPAGE = @GIMP_REMOTE_MANPAGE@
|
||||
GIMP_SYSCONF_VERSION = @GIMP_SYSCONF_VERSION@
|
||||
GIMP_TOOL_VERSION = @GIMP_TOOL_VERSION@
|
||||
GIMP_UNSTABLE = @GIMP_UNSTABLE@
|
||||
@ -213,6 +265,7 @@ GIMP_VERSION = @GIMP_VERSION@
|
||||
GIO_CFLAGS = @GIO_CFLAGS@
|
||||
GIO_LIBS = @GIO_LIBS@
|
||||
GLIB_CFLAGS = @GLIB_CFLAGS@
|
||||
GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
|
||||
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
|
||||
GLIB_LIBS = @GLIB_LIBS@
|
||||
GLIB_MKENUMS = @GLIB_MKENUMS@
|
||||
@ -221,18 +274,19 @@ GMODULE_NO_EXPORT_CFLAGS = @GMODULE_NO_EXPORT_CFLAGS@
|
||||
GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GNOME_VFS_CFLAGS = @GNOME_VFS_CFLAGS@
|
||||
GNOME_VFS_LIBS = @GNOME_VFS_LIBS@
|
||||
GOBJECT_QUERY = @GOBJECT_QUERY@
|
||||
GREP = @GREP@
|
||||
GS_LIBS = @GS_LIBS@
|
||||
GTKDOC_CHECK = @GTKDOC_CHECK@
|
||||
GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
|
||||
GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
|
||||
GTKDOC_MKPDF = @GTKDOC_MKPDF@
|
||||
GTKDOC_REBASE = @GTKDOC_REBASE@
|
||||
GTK_CFLAGS = @GTK_CFLAGS@
|
||||
GTK_LIBS = @GTK_LIBS@
|
||||
GTK_REQUIRED_VERSION = @GTK_REQUIRED_VERSION@
|
||||
HAL_CFLAGS = @HAL_CFLAGS@
|
||||
HAL_LIBS = @HAL_LIBS@
|
||||
GUDEV_CFLAGS = @GUDEV_CFLAGS@
|
||||
GUDEV_LIBS = @GUDEV_LIBS@
|
||||
HAVE_FINITE = @HAVE_FINITE@
|
||||
HAVE_ISFINITE = @HAVE_ISFINITE@
|
||||
HTML_DIR = @HTML_DIR@
|
||||
@ -247,8 +301,13 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
|
||||
INTLTOOL_MERGE = @INTLTOOL_MERGE@
|
||||
INTLTOOL_PERL = @INTLTOOL_PERL@
|
||||
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
|
||||
INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
|
||||
INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
|
||||
INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
|
||||
INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
|
||||
ISO_CODES_LOCALEDIR = @ISO_CODES_LOCALEDIR@
|
||||
ISO_CODES_LOCATION = @ISO_CODES_LOCATION@
|
||||
JP2_LIBS = @JP2_LIBS@
|
||||
JPEG_LIBS = @JPEG_LIBS@
|
||||
LCMS = @LCMS@
|
||||
LCMS_CFLAGS = @LCMS_CFLAGS@
|
||||
@ -271,6 +330,7 @@ MIME_TYPES = @MIME_TYPES@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MMX_EXTRA_CFLAGS = @MMX_EXTRA_CFLAGS@
|
||||
MNG_CFLAGS = @MNG_CFLAGS@
|
||||
MNG_LIBS = @MNG_LIBS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_OPTS = @MSGFMT_OPTS@
|
||||
@ -288,8 +348,8 @@ PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
|
||||
PANGOFT2_LIBS = @PANGOFT2_LIBS@
|
||||
PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@
|
||||
PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@
|
||||
PATHSEP = @PATHSEP@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
@ -336,6 +396,7 @@ USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WEBKIT_CFLAGS = @WEBKIT_CFLAGS@
|
||||
WEBKIT_LIBS = @WEBKIT_LIBS@
|
||||
WEB_PAGE = @WEB_PAGE@
|
||||
WIN32_LARGE_ADDRESS_AWARE = @WIN32_LARGE_ADDRESS_AWARE@
|
||||
WINDRES = @WINDRES@
|
||||
WMF_CFLAGS = @WMF_CFLAGS@
|
||||
@ -344,11 +405,14 @@ WMF_LIBS = @WMF_LIBS@
|
||||
XFIXES_CFLAGS = @XFIXES_CFLAGS@
|
||||
XFIXES_LIBS = @XFIXES_LIBS@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XMC_CFLAGS = @XMC_CFLAGS@
|
||||
XMC_LIBS = @XMC_LIBS@
|
||||
XMKMF = @XMKMF@
|
||||
XMLLINT = @XMLLINT@
|
||||
XMU_LIBS = @XMU_LIBS@
|
||||
XPM_LIBS = @XPM_LIBS@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
XVFB_RUN = @XVFB_RUN@
|
||||
X_CFLAGS = @X_CFLAGS@
|
||||
X_EXTRA_LIBS = @X_EXTRA_LIBS@
|
||||
X_LIBS = @X_LIBS@
|
||||
@ -392,6 +456,8 @@ htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
intltool__v_merge_options_ = @intltool__v_merge_options_@
|
||||
intltool__v_merge_options_0 = @intltool__v_merge_options_0@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
@ -490,6 +556,10 @@ libappactions_a_SOURCES = \
|
||||
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 \
|
||||
@ -564,10 +634,18 @@ libappactions_a_SOURCES = \
|
||||
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-preset-editor-actions.c \
|
||||
tool-preset-editor-actions.h \
|
||||
tools-actions.c \
|
||||
tools-actions.h \
|
||||
tools-commands.c \
|
||||
@ -589,7 +667,6 @@ libappactions_a_SOURCES = \
|
||||
windows-commands.c \
|
||||
windows-commands.h
|
||||
|
||||
EXTRA_DIST = makefile.msc
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
@ -627,10 +704,10 @@ $(am__aclocal_m4_deps):
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libappactions.a: $(libappactions_a_OBJECTS) $(libappactions_a_DEPENDENCIES)
|
||||
-rm -f libappactions.a
|
||||
$(libappactions_a_AR) libappactions.a $(libappactions_a_OBJECTS) $(libappactions_a_LIBADD)
|
||||
$(RANLIB) libappactions.a
|
||||
libappactions.a: $(libappactions_a_OBJECTS) $(libappactions_a_DEPENDENCIES) $(EXTRA_libappactions_a_DEPENDENCIES)
|
||||
$(AM_V_at)-rm -f libappactions.a
|
||||
$(AM_V_AR)$(libappactions_a_AR) libappactions.a $(libappactions_a_OBJECTS) $(libappactions_a_LIBADD)
|
||||
$(AM_V_at)$(RANLIB) libappactions.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
@ -667,6 +744,8 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/documents-commands.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drawable-actions.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drawable-commands.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynamics-actions.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynamics-editor-actions.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edit-actions.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edit-commands.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error-console-actions.Po@am__quote@
|
||||
@ -704,8 +783,12 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/templates-commands.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text-editor-actions.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text-editor-commands.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text-tool-actions.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text-tool-commands.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tool-options-actions.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tool-options-commands.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tool-preset-editor-actions.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tool-presets-actions.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tools-actions.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tools-commands.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vectors-actions.Po@am__quote@
|
||||
@ -718,25 +801,25 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows-commands.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
@ -840,10 +923,15 @@ install-am: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __ACTIONS_TYPES_H__
|
||||
@ -45,7 +44,10 @@ 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_SAVE_AND_CLOSE,
|
||||
GIMP_SAVE_MODE_EXPORT,
|
||||
GIMP_SAVE_MODE_EXPORT_TO,
|
||||
GIMP_SAVE_MODE_OVERWRITE
|
||||
} GimpSaveMode;
|
||||
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,24 +12,24 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "config/gimpguiconfig.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"
|
||||
@ -37,12 +37,15 @@
|
||||
#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"
|
||||
|
||||
@ -61,6 +64,8 @@
|
||||
#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"
|
||||
@ -80,7 +85,10 @@
|
||||
#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"
|
||||
@ -96,7 +104,7 @@ GimpActionFactory *global_action_factory = NULL;
|
||||
|
||||
/* private variables */
|
||||
|
||||
static GimpActionFactoryEntry action_groups[] =
|
||||
static const GimpActionFactoryEntry action_groups[] =
|
||||
{
|
||||
{ "brush-editor", N_("Brush Editor"), GIMP_STOCK_BRUSH,
|
||||
brush_editor_actions_setup,
|
||||
@ -140,6 +148,12 @@ static GimpActionFactoryEntry action_groups[] =
|
||||
{ "drawable", N_("Drawable"), GIMP_STOCK_LAYER,
|
||||
drawable_actions_setup,
|
||||
drawable_actions_update },
|
||||
{ "dynamics", N_("Paint Dynamics"), GIMP_STOCK_DYNAMICS,
|
||||
dynamics_actions_setup,
|
||||
dynamics_actions_update },
|
||||
{ "dynamics-editor", N_("Paint Dynamics Editor"), GIMP_STOCK_DYNAMICS,
|
||||
dynamics_editor_actions_setup,
|
||||
dynamics_editor_actions_update },
|
||||
{ "edit", N_("Edit"), GTK_STOCK_EDIT,
|
||||
edit_actions_setup,
|
||||
edit_actions_update },
|
||||
@ -158,6 +172,12 @@ static GimpActionFactoryEntry action_groups[] =
|
||||
{ "gradients", N_("Gradients"), GIMP_STOCK_GRADIENT,
|
||||
gradients_actions_setup,
|
||||
gradients_actions_update },
|
||||
{ "tool-presets", N_("Tool Presets"), GIMP_STOCK_TOOL_PRESET,
|
||||
tool_presets_actions_setup,
|
||||
tool_presets_actions_update },
|
||||
{ "tool-preset-editor", N_("Tool Preset Editor"), GIMP_STOCK_TOOL_PRESET,
|
||||
tool_preset_editor_actions_setup,
|
||||
tool_preset_editor_actions_update },
|
||||
{ "help", N_("Help"), GTK_STOCK_HELP,
|
||||
help_actions_setup,
|
||||
help_actions_update },
|
||||
@ -194,6 +214,9 @@ static GimpActionFactoryEntry action_groups[] =
|
||||
{ "templates", N_("Templates"), GIMP_STOCK_TEMPLATE,
|
||||
templates_actions_setup,
|
||||
templates_actions_update },
|
||||
{ "text-tool", N_("Text Tool"), GTK_STOCK_EDIT,
|
||||
text_tool_actions_setup,
|
||||
text_tool_actions_update },
|
||||
{ "text-editor", N_("Text Editor"), GTK_STOCK_EDIT,
|
||||
text_editor_actions_setup,
|
||||
text_editor_actions_update },
|
||||
@ -220,16 +243,12 @@ static GimpActionFactoryEntry action_groups[] =
|
||||
void
|
||||
actions_init (Gimp *gimp)
|
||||
{
|
||||
GimpGuiConfig *gui_config;
|
||||
gint i;
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
g_return_if_fail (global_action_factory == NULL);
|
||||
|
||||
gui_config = GIMP_GUI_CONFIG (gimp->config);
|
||||
|
||||
global_action_factory = gimp_action_factory_new (gimp,
|
||||
gui_config->menu_mnemonics);
|
||||
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,
|
||||
@ -261,10 +280,17 @@ action_data_get_gimp (gpointer data)
|
||||
|
||||
if (GIMP_IS_DISPLAY (data))
|
||||
return ((GimpDisplay *) data)->gimp;
|
||||
else if (GIMP_IS_IMAGE_WINDOW (data))
|
||||
{
|
||||
GimpDisplayShell *shell = gimp_image_window_get_active_shell (data);
|
||||
return shell ? shell->display->gimp : NULL;
|
||||
}
|
||||
else if (GIMP_IS_GIMP (data))
|
||||
return data;
|
||||
else if (GIMP_IS_DOCK (data))
|
||||
context = ((GimpDock *) data)->context;
|
||||
context = gimp_dock_get_context (((GimpDock *) data));
|
||||
else if (GIMP_IS_DOCK_WINDOW (data))
|
||||
context = gimp_dock_window_get_context (((GimpDockWindow *) data));
|
||||
else if (GIMP_IS_CONTAINER_VIEW (data))
|
||||
context = gimp_container_view_get_context ((GimpContainerView *) data);
|
||||
else if (GIMP_IS_CONTAINER_EDITOR (data))
|
||||
@ -288,10 +314,17 @@ action_data_get_context (gpointer data)
|
||||
|
||||
if (GIMP_IS_DISPLAY (data))
|
||||
return gimp_get_user_context (((GimpDisplay *) data)->gimp);
|
||||
else if (GIMP_IS_IMAGE_WINDOW (data))
|
||||
{
|
||||
GimpDisplayShell *shell = gimp_image_window_get_active_shell (data);
|
||||
return shell ? gimp_get_user_context (shell->display->gimp) : NULL;
|
||||
}
|
||||
else if (GIMP_IS_GIMP (data))
|
||||
return gimp_get_user_context (data);
|
||||
else if (GIMP_IS_DOCK (data))
|
||||
return ((GimpDock *) data)->context;
|
||||
return gimp_dock_get_context ((GimpDock *) data);
|
||||
else if (GIMP_IS_DOCK_WINDOW (data))
|
||||
return gimp_dock_window_get_context (((GimpDockWindow *) data));
|
||||
else if (GIMP_IS_CONTAINER_VIEW (data))
|
||||
return gimp_container_view_get_context ((GimpContainerView *) data);
|
||||
else if (GIMP_IS_CONTAINER_EDITOR (data))
|
||||
@ -308,18 +341,26 @@ GimpImage *
|
||||
action_data_get_image (gpointer data)
|
||||
{
|
||||
GimpContext *context = NULL;
|
||||
GimpDisplay *display = NULL;
|
||||
|
||||
if (! data)
|
||||
return NULL;
|
||||
|
||||
if (GIMP_IS_DISPLAY (data))
|
||||
return ((GimpDisplay *) data)->image;
|
||||
display = (GimpDisplay *) data;
|
||||
else if (GIMP_IS_IMAGE_WINDOW (data))
|
||||
{
|
||||
GimpDisplayShell *shell = gimp_image_window_get_active_shell (data);
|
||||
display = shell ? shell->display : NULL;
|
||||
}
|
||||
else if (GIMP_IS_GIMP (data))
|
||||
context = gimp_get_user_context (data);
|
||||
else if (GIMP_IS_DOCK (data))
|
||||
context = ((GimpDock *) data)->context;
|
||||
context = gimp_dock_get_context ((GimpDock *) data);
|
||||
else if (GIMP_IS_DOCK_WINDOW (data))
|
||||
context = gimp_dock_window_get_context (((GimpDockWindow *) data));
|
||||
else if (GIMP_IS_ITEM_TREE_VIEW (data))
|
||||
return ((GimpItemTreeView *) data)->image;
|
||||
return gimp_item_tree_view_get_image ((GimpItemTreeView *) data);
|
||||
else if (GIMP_IS_IMAGE_EDITOR (data))
|
||||
return ((GimpImageEditor *) data)->image;
|
||||
else if (GIMP_IS_NAVIGATION_EDITOR (data))
|
||||
@ -327,6 +368,8 @@ action_data_get_image (gpointer data)
|
||||
|
||||
if (context)
|
||||
return gimp_context_get_image (context);
|
||||
else if (display)
|
||||
return gimp_display_get_image (display);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -341,10 +384,17 @@ action_data_get_display (gpointer data)
|
||||
|
||||
if (GIMP_IS_DISPLAY (data))
|
||||
return data;
|
||||
else if (GIMP_IS_IMAGE_WINDOW (data))
|
||||
{
|
||||
GimpDisplayShell *shell = gimp_image_window_get_active_shell (data);
|
||||
return shell ? shell->display : NULL;
|
||||
}
|
||||
else if (GIMP_IS_GIMP (data))
|
||||
context = gimp_get_user_context (data);
|
||||
else if (GIMP_IS_DOCK (data))
|
||||
context = ((GimpDock *) data)->context;
|
||||
context = gimp_dock_get_context ((GimpDock *) data);
|
||||
else if (GIMP_IS_DOCK_WINDOW (data))
|
||||
context = gimp_dock_window_get_context (((GimpDockWindow *) data));
|
||||
else if (GIMP_IS_NAVIGATION_EDITOR (data))
|
||||
context = ((GimpNavigationEditor *) data)->context;
|
||||
|
||||
@ -354,6 +404,20 @@ action_data_get_display (gpointer data)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GimpDisplayShell *
|
||||
action_data_get_shell (gpointer data)
|
||||
{
|
||||
GimpDisplay *display = NULL;
|
||||
GimpDisplayShell *shell = NULL;
|
||||
|
||||
display = action_data_get_display (data);
|
||||
|
||||
if (display)
|
||||
shell = gimp_display_get_shell (display);
|
||||
|
||||
return shell;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
action_data_get_widget (gpointer data)
|
||||
{
|
||||
@ -370,11 +434,27 @@ action_data_get_widget (gpointer data)
|
||||
return data;
|
||||
|
||||
if (display)
|
||||
return display->shell;
|
||||
return GTK_WIDGET (gimp_display_get_shell (display));
|
||||
|
||||
return dialogs_get_toolbox ();
|
||||
}
|
||||
|
||||
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,
|
||||
@ -461,15 +541,18 @@ action_select_value (GimpActionSelectType select_type,
|
||||
|
||||
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);
|
||||
|
||||
@ -487,9 +570,20 @@ action_select_property (GimpActionSelectType select_type,
|
||||
G_PARAM_SPEC_DOUBLE (pspec)->minimum,
|
||||
G_PARAM_SPEC_DOUBLE (pspec)->maximum,
|
||||
G_PARAM_SPEC_DOUBLE (pspec)->default_value,
|
||||
small_inc, inc, skip_inc, 0, wrap);
|
||||
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))
|
||||
{
|
||||
@ -502,9 +596,20 @@ action_select_property (GimpActionSelectType select_type,
|
||||
G_PARAM_SPEC_INT (pspec)->minimum,
|
||||
G_PARAM_SPEC_INT (pspec)->maximum,
|
||||
G_PARAM_SPEC_INT (pspec)->default_value,
|
||||
small_inc, inc, skip_inc, 0, wrap);
|
||||
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
|
||||
{
|
||||
@ -526,7 +631,7 @@ action_select_object (GimpActionSelectType select_type,
|
||||
if (! current)
|
||||
return NULL;
|
||||
|
||||
n_children = gimp_container_num_children (container);
|
||||
n_children = gimp_container_get_n_children (container);
|
||||
|
||||
if (n_children == 0)
|
||||
return NULL;
|
||||
@ -569,3 +674,31 @@ action_select_object (GimpActionSelectType select_type,
|
||||
|
||||
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 *stock_id = NULL;
|
||||
va_list args;
|
||||
|
||||
if (GIMP_IS_TOOL_OPTIONS (object))
|
||||
{
|
||||
GimpToolInfo *tool_info = GIMP_TOOL_OPTIONS (object)->tool_info;
|
||||
|
||||
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
|
||||
}
|
||||
else if (GIMP_IS_VIEWABLE (object))
|
||||
{
|
||||
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (object));
|
||||
}
|
||||
|
||||
va_start (args, format);
|
||||
gimp_statusbar_push_temp_valist (statusbar, GIMP_MESSAGE_INFO,
|
||||
stock_id, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __ACTIONS_H__
|
||||
@ -23,35 +22,43 @@
|
||||
extern GimpActionFactory *global_action_factory;
|
||||
|
||||
|
||||
void actions_init (Gimp *gimp);
|
||||
void actions_exit (Gimp *gimp);
|
||||
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);
|
||||
GtkWidget * action_data_get_widget (gpointer data);
|
||||
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,
|
||||
GObject *object,
|
||||
const gchar *property_name,
|
||||
gdouble small_inc,
|
||||
gdouble inc,
|
||||
gdouble skip_inc,
|
||||
gboolean wrap);
|
||||
GimpObject * action_select_object (GimpActionSelectType select_type,
|
||||
GimpContainer *container,
|
||||
GimpObject *current);
|
||||
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) \
|
||||
@ -74,6 +81,11 @@ GimpObject * action_select_object (GimpActionSelectType select_type,
|
||||
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) \
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -40,14 +39,14 @@
|
||||
static const GimpActionEntry brush_editor_actions[] =
|
||||
{
|
||||
{ "brush-editor-popup", GIMP_STOCK_BRUSH,
|
||||
N_("Brush Editor Menu"), NULL, NULL, NULL,
|
||||
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_STOCK_LINKED,
|
||||
N_("Edit Active Brush"), NULL, NULL,
|
||||
NC_("brush-editor-action", "Edit Active Brush"), NULL, NULL,
|
||||
G_CALLBACK (data_editor_edit_active_cmd_callback),
|
||||
FALSE,
|
||||
GIMP_HELP_BRUSH_EDITOR_EDIT_ACTIVE }
|
||||
@ -57,11 +56,11 @@ static const GimpToggleActionEntry brush_editor_toggle_actions[] =
|
||||
void
|
||||
brush_editor_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (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,
|
||||
gimp_action_group_add_toggle_actions (group, "brush-editor-action",
|
||||
brush_editor_toggle_actions,
|
||||
G_N_ELEMENTS (brush_editor_toggle_actions));
|
||||
}
|
||||
@ -71,18 +70,8 @@ brush_editor_actions_update (GimpActionGroup *group,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (user_data);
|
||||
GimpData *data;
|
||||
gboolean editable = FALSE;
|
||||
gboolean edit_active = FALSE;
|
||||
|
||||
data = data_editor->data;
|
||||
|
||||
if (data)
|
||||
{
|
||||
if (data_editor->data_editable)
|
||||
editable = TRUE;
|
||||
}
|
||||
|
||||
edit_active = gimp_data_editor_get_edit_active (data_editor);
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __BRUSH_EDITOR_ACTIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -40,42 +39,42 @@
|
||||
static const GimpActionEntry brushes_actions[] =
|
||||
{
|
||||
{ "brushes-popup", GIMP_STOCK_BRUSH,
|
||||
N_("Brushes Menu"), NULL, NULL, NULL,
|
||||
NC_("brushes-action", "Brushes Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_BRUSH_DIALOG },
|
||||
|
||||
{ "brushes-open-as-image", GTK_STOCK_OPEN,
|
||||
N_("_Open Brush as Image"), "",
|
||||
N_("Open brush as image"),
|
||||
NC_("brushes-action", "_Open Brush as Image"), "",
|
||||
NC_("brushes-action", "Open brush as image"),
|
||||
G_CALLBACK (data_open_as_image_cmd_callback),
|
||||
GIMP_HELP_BRUSH_OPEN_AS_IMAGE },
|
||||
|
||||
{ "brushes-new", GTK_STOCK_NEW,
|
||||
N_("_New Brush"), "",
|
||||
N_("New brush"),
|
||||
NC_("brushes-action", "_New Brush"), "",
|
||||
NC_("brushes-action", "Create a new brush"),
|
||||
G_CALLBACK (data_new_cmd_callback),
|
||||
GIMP_HELP_BRUSH_NEW },
|
||||
|
||||
{ "brushes-duplicate", GIMP_STOCK_DUPLICATE,
|
||||
N_("D_uplicate Brush"), NULL,
|
||||
N_("Duplicate brush"),
|
||||
NC_("brushes-action", "D_uplicate Brush"), NULL,
|
||||
NC_("brushes-action", "Duplicate this brush"),
|
||||
G_CALLBACK (data_duplicate_cmd_callback),
|
||||
GIMP_HELP_BRUSH_DUPLICATE },
|
||||
|
||||
{ "brushes-copy-location", GTK_STOCK_COPY,
|
||||
N_("Copy Brush _Location"), "",
|
||||
N_("Copy brush file location to clipboard"),
|
||||
NC_("brushes-action", "Copy Brush _Location"), "",
|
||||
NC_("brushes-action", "Copy brush file location to clipboard"),
|
||||
G_CALLBACK (data_copy_location_cmd_callback),
|
||||
GIMP_HELP_BRUSH_COPY_LOCATION },
|
||||
|
||||
{ "brushes-delete", GTK_STOCK_DELETE,
|
||||
N_("_Delete Brush"), "",
|
||||
N_("Delete brush"),
|
||||
NC_("brushes-action", "_Delete Brush"), "",
|
||||
NC_("brushes-action", "Delete this brush"),
|
||||
G_CALLBACK (data_delete_cmd_callback),
|
||||
GIMP_HELP_BRUSH_DELETE },
|
||||
|
||||
{ "brushes-refresh", GTK_STOCK_REFRESH,
|
||||
N_("_Refresh Brushes"), "",
|
||||
N_("Refresh brushes"),
|
||||
NC_("brushes-action", "_Refresh Brushes"), "",
|
||||
NC_("brushes-action", "Refresh brushes"),
|
||||
G_CALLBACK (data_refresh_cmd_callback),
|
||||
GIMP_HELP_BRUSH_REFRESH }
|
||||
};
|
||||
@ -83,8 +82,8 @@ static const GimpActionEntry brushes_actions[] =
|
||||
static const GimpStringActionEntry brushes_edit_actions[] =
|
||||
{
|
||||
{ "brushes-edit", GTK_STOCK_EDIT,
|
||||
N_("_Edit Brush..."), NULL,
|
||||
N_("Edit brush"),
|
||||
NC_("brushes-action", "_Edit Brush..."), NULL,
|
||||
NC_("brushes-action", "Edit this brush"),
|
||||
"gimp-brush-editor",
|
||||
GIMP_HELP_BRUSH_EDIT }
|
||||
};
|
||||
@ -93,11 +92,11 @@ static const GimpStringActionEntry brushes_edit_actions[] =
|
||||
void
|
||||
brushes_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group,
|
||||
gimp_action_group_add_actions (group, "brushes-action",
|
||||
brushes_actions,
|
||||
G_N_ELEMENTS (brushes_actions));
|
||||
|
||||
gimp_action_group_add_string_actions (group,
|
||||
gimp_action_group_add_string_actions (group, "brushes-action",
|
||||
brushes_edit_actions,
|
||||
G_N_ELEMENTS (brushes_edit_actions),
|
||||
G_CALLBACK (data_edit_cmd_callback));
|
||||
@ -107,26 +106,36 @@ void
|
||||
brushes_actions_update (GimpActionGroup *group,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpContext *context = action_data_get_context (user_data);
|
||||
GimpBrush *brush = NULL;
|
||||
GimpData *data = NULL;
|
||||
GimpContext *context = action_data_get_context (user_data);
|
||||
GimpBrush *brush = NULL;
|
||||
GimpData *data = NULL;
|
||||
const gchar *filename = 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);
|
||||
{
|
||||
data = GIMP_DATA (brush);
|
||||
|
||||
filename = gimp_data_get_filename (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", brush && data->filename && ! GIMP_IS_BRUSH_GENERATED (brush));
|
||||
SET_SENSITIVE ("brushes-open-as-image", brush && filename && ! GIMP_IS_BRUSH_GENERATED (brush));
|
||||
SET_SENSITIVE ("brushes-duplicate", brush && GIMP_DATA_GET_CLASS (data)->duplicate);
|
||||
SET_SENSITIVE ("brushes-copy-location", brush && data->filename);
|
||||
SET_SENSITIVE ("brushes-delete", brush && data->deletable);
|
||||
SET_SENSITIVE ("brushes-copy-location", brush && filename);
|
||||
SET_SENSITIVE ("brushes-delete", brush && gimp_data_is_deletable (data));
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __BRUSHES_ACTIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -39,30 +38,30 @@
|
||||
static const GimpActionEntry buffers_actions[] =
|
||||
{
|
||||
{ "buffers-popup", GIMP_STOCK_BUFFER,
|
||||
N_("Buffers Menu"), NULL, NULL, NULL,
|
||||
NC_("buffers-action", "Buffers Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_BUFFER_DIALOG },
|
||||
|
||||
{ "buffers-paste", GTK_STOCK_PASTE,
|
||||
N_("_Paste Buffer"), "",
|
||||
N_("Paste the selected buffer"),
|
||||
NC_("buffers-action", "_Paste Buffer"), "",
|
||||
NC_("buffers-action", "Paste the selected buffer"),
|
||||
G_CALLBACK (buffers_paste_cmd_callback),
|
||||
GIMP_HELP_BUFFER_PASTE },
|
||||
|
||||
{ "buffers-paste-into", GIMP_STOCK_PASTE_INTO,
|
||||
N_("Paste Buffer _Into"), NULL,
|
||||
N_("Paste the selected buffer into the selection"),
|
||||
NC_("buffers-action", "Paste Buffer _Into"), NULL,
|
||||
NC_("buffers-action", "Paste the selected buffer into the selection"),
|
||||
G_CALLBACK (buffers_paste_into_cmd_callback),
|
||||
GIMP_HELP_BUFFER_PASTE_INTO },
|
||||
|
||||
{ "buffers-paste-as-new", GIMP_STOCK_PASTE_AS_NEW,
|
||||
N_("Paste Buffer as _New"), NULL,
|
||||
N_("Paste the selected buffer as new image"),
|
||||
NC_("buffers-action", "Paste Buffer as _New"), NULL,
|
||||
NC_("buffers-action", "Paste the selected buffer as a new image"),
|
||||
G_CALLBACK (buffers_paste_as_new_cmd_callback),
|
||||
GIMP_HELP_BUFFER_PASTE_AS_NEW },
|
||||
|
||||
{ "buffers-delete", GTK_STOCK_DELETE,
|
||||
N_("_Delete Buffer"), "",
|
||||
N_("Delete the selected buffer"),
|
||||
NC_("buffers-action", "_Delete Buffer"), "",
|
||||
NC_("buffers-action", "Delete the selected buffer"),
|
||||
G_CALLBACK (buffers_delete_cmd_callback),
|
||||
GIMP_HELP_BUFFER_DELETE }
|
||||
};
|
||||
@ -71,7 +70,7 @@ static const GimpActionEntry buffers_actions[] =
|
||||
void
|
||||
buffers_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group,
|
||||
gimp_action_group_add_actions (group, "buffers-action",
|
||||
buffers_actions,
|
||||
G_N_ELEMENTS (buffers_actions));
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __BUFFERS_ACTIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,12 +12,12 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "actions-types.h"
|
||||
@ -27,6 +27,7 @@
|
||||
#include "core/gimpcontainer.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-new.h"
|
||||
|
||||
#include "widgets/gimpbufferview.h"
|
||||
#include "widgets/gimpcontainerview.h"
|
||||
@ -85,14 +86,10 @@ buffers_paste_as_new_cmd_callback (GtkAction *action,
|
||||
{
|
||||
GimpImage *new_image;
|
||||
|
||||
new_image = gimp_edit_paste_as_new (image->gimp, image, buffer);
|
||||
|
||||
if (new_image)
|
||||
{
|
||||
gimp_create_display (image->gimp, new_image,
|
||||
GIMP_UNIT_PIXEL, 1.0);
|
||||
g_object_unref (new_image);
|
||||
}
|
||||
new_image = gimp_image_new_from_buffer (image->gimp, image, buffer);
|
||||
gimp_create_display (image->gimp, new_image,
|
||||
GIMP_UNIT_PIXEL, 1.0);
|
||||
g_object_unref (new_image);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -134,12 +131,12 @@ buffers_paste (GimpBufferView *view,
|
||||
|
||||
if (display)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
|
||||
gimp_display_shell_untransform_viewport (shell,
|
||||
&x, &y, &width, &height);
|
||||
|
||||
image = display->image;
|
||||
image = gimp_display_get_image (display);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __BUFFERS_COMMANDS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,12 +12,12 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
@ -25,7 +25,7 @@
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimplist.h"
|
||||
#include "core/gimpitem.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpcomponenteditor.h"
|
||||
@ -41,60 +41,63 @@
|
||||
static const GimpActionEntry channels_actions[] =
|
||||
{
|
||||
{ "channels-popup", GIMP_STOCK_CHANNELS,
|
||||
N_("Channels Menu"), NULL, NULL, NULL,
|
||||
NC_("channels-action", "Channels Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_CHANNEL_DIALOG },
|
||||
|
||||
{ "channels-edit-attributes", GTK_STOCK_EDIT,
|
||||
N_("_Edit Channel Attributes..."), NULL,
|
||||
N_("Edit the channel's name, color and opacity"),
|
||||
NC_("channels-action", "_Edit Channel Attributes..."), NULL,
|
||||
NC_("channels-action", "Edit the channel's name, color and opacity"),
|
||||
G_CALLBACK (channels_edit_attributes_cmd_callback),
|
||||
GIMP_HELP_CHANNEL_EDIT },
|
||||
|
||||
{ "channels-new", GTK_STOCK_NEW,
|
||||
N_("_New Channel..."), "",
|
||||
N_("Create a new channel"),
|
||||
NC_("channels-action", "_New Channel..."), "",
|
||||
NC_("channels-action", "Create a new channel"),
|
||||
G_CALLBACK (channels_new_cmd_callback),
|
||||
GIMP_HELP_CHANNEL_NEW },
|
||||
|
||||
{ "channels-new-last-values", GTK_STOCK_NEW,
|
||||
N_("_New Channel"), "",
|
||||
N_("Create a new channel with last used values"),
|
||||
NC_("channels-action", "_New Channel"), "",
|
||||
NC_("channels-action", "Create a new channel with last used values"),
|
||||
G_CALLBACK (channels_new_last_vals_cmd_callback),
|
||||
GIMP_HELP_CHANNEL_NEW },
|
||||
|
||||
{ "channels-duplicate", GIMP_STOCK_DUPLICATE,
|
||||
N_("D_uplicate Channel"), NULL,
|
||||
N_("Create a duplicate of this channel and add it to the image"),
|
||||
NC_("channels-action", "D_uplicate Channel"), NULL,
|
||||
NC_("channels-action",
|
||||
"Create a duplicate of this channel and add it to the image"),
|
||||
G_CALLBACK (channels_duplicate_cmd_callback),
|
||||
GIMP_HELP_CHANNEL_DUPLICATE },
|
||||
|
||||
{ "channels-delete", GTK_STOCK_DELETE,
|
||||
N_("_Delete Channel"), "",
|
||||
N_("Delete this channel"),
|
||||
NC_("channels-action", "_Delete Channel"), "",
|
||||
NC_("channels-action", "Delete this channel"),
|
||||
G_CALLBACK (channels_delete_cmd_callback),
|
||||
GIMP_HELP_CHANNEL_DELETE },
|
||||
|
||||
{ "channels-raise", GTK_STOCK_GO_UP,
|
||||
N_("_Raise Channel"), "",
|
||||
N_("Raise this channel one step in the channel stack"),
|
||||
NC_("channels-action", "_Raise Channel"), "",
|
||||
NC_("channels-action", "Raise this channel one step in the channel stack"),
|
||||
G_CALLBACK (channels_raise_cmd_callback),
|
||||
GIMP_HELP_CHANNEL_RAISE },
|
||||
|
||||
{ "channels-raise-to-top", GTK_STOCK_GOTO_TOP,
|
||||
N_("Raise Channel to _Top"), "",
|
||||
N_("Raise this channel to the top of the channel stack"),
|
||||
NC_("channels-action", "Raise Channel to _Top"), "",
|
||||
NC_("channels-action",
|
||||
"Raise this channel to the top of the channel stack"),
|
||||
G_CALLBACK (channels_raise_to_top_cmd_callback),
|
||||
GIMP_HELP_CHANNEL_RAISE_TO_TOP },
|
||||
|
||||
{ "channels-lower", GTK_STOCK_GO_DOWN,
|
||||
N_("_Lower Channel"), "",
|
||||
N_("Lower this channel one step in the channel stack"),
|
||||
NC_("channels-action", "_Lower Channel"), "",
|
||||
NC_("channels-action", "Lower this channel one step in the channel stack"),
|
||||
G_CALLBACK (channels_lower_cmd_callback),
|
||||
GIMP_HELP_CHANNEL_LOWER },
|
||||
|
||||
{ "channels-lower-to-bottom", GTK_STOCK_GOTO_BOTTOM,
|
||||
N_("Lower Channel to _Bottom"), "",
|
||||
N_("Lower this channel to the bottom of the channel stack"),
|
||||
NC_("channels-action", "Lower Channel to _Bottom"), "",
|
||||
NC_("channels-action",
|
||||
"Lower this channel to the bottom of the channel stack"),
|
||||
G_CALLBACK (channels_lower_to_bottom_cmd_callback),
|
||||
GIMP_HELP_CHANNEL_LOWER_TO_BOTTOM }
|
||||
};
|
||||
@ -102,26 +105,26 @@ static const GimpActionEntry channels_actions[] =
|
||||
static const GimpEnumActionEntry channels_to_selection_actions[] =
|
||||
{
|
||||
{ "channels-selection-replace", GIMP_STOCK_SELECTION_REPLACE,
|
||||
N_("Channel to Sele_ction"), NULL,
|
||||
N_("Replace the selection with this channel"),
|
||||
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_STOCK_SELECTION_ADD,
|
||||
N_("_Add to Selection"), NULL,
|
||||
N_("Add this channel to the current selection"),
|
||||
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_STOCK_SELECTION_SUBTRACT,
|
||||
N_("_Subtract from Selection"), NULL,
|
||||
N_("Subtract this channel from the current selection"),
|
||||
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_STOCK_SELECTION_INTERSECT,
|
||||
N_("_Intersect with Selection"), NULL,
|
||||
N_("Intersect this channel with the current selection"),
|
||||
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 }
|
||||
};
|
||||
@ -130,11 +133,11 @@ static const GimpEnumActionEntry channels_to_selection_actions[] =
|
||||
void
|
||||
channels_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group,
|
||||
gimp_action_group_add_actions (group, "channels-action",
|
||||
channels_actions,
|
||||
G_N_ELEMENTS (channels_actions));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, "channels-action",
|
||||
channels_to_selection_actions,
|
||||
G_N_ELEMENTS (channels_to_selection_actions),
|
||||
G_CALLBACK (channels_to_selection_cmd_callback));
|
||||
@ -144,7 +147,7 @@ void
|
||||
channels_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image = action_data_get_image (data);
|
||||
GimpImage *image = action_data_get_image (data);
|
||||
GimpChannel *channel = NULL;
|
||||
gboolean fs = FALSE;
|
||||
gboolean component = FALSE;
|
||||
@ -153,7 +156,7 @@ channels_actions_update (GimpActionGroup *group,
|
||||
|
||||
if (image)
|
||||
{
|
||||
fs = (gimp_image_floating_sel (image) != NULL);
|
||||
fs = (gimp_image_get_floating_selection (image) != NULL);
|
||||
|
||||
if (GIMP_IS_COMPONENT_EDITOR (data))
|
||||
{
|
||||
@ -166,9 +169,12 @@ channels_actions_update (GimpActionGroup *group,
|
||||
|
||||
if (channel)
|
||||
{
|
||||
GList *channel_list;
|
||||
GList *list;
|
||||
|
||||
list = g_list_find (GIMP_LIST (image->channels)->list, channel);
|
||||
channel_list = gimp_item_get_container_iter (GIMP_ITEM (channel));
|
||||
|
||||
list = g_list_find (channel_list, channel);
|
||||
|
||||
if (list)
|
||||
{
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __CHANNELS_ACTIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,14 +12,14 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
@ -81,7 +81,7 @@ channels_edit_attributes_cmd_callback (GtkAction *action,
|
||||
action_data_get_context (data),
|
||||
widget,
|
||||
&channel->color,
|
||||
gimp_object_get_name (GIMP_OBJECT (channel)),
|
||||
gimp_object_get_name (channel),
|
||||
_("Channel Attributes"),
|
||||
"gimp-channel-edit",
|
||||
GTK_STOCK_EDIT,
|
||||
@ -113,7 +113,7 @@ channels_new_cmd_callback (GtkAction *action,
|
||||
widget,
|
||||
&channel_color,
|
||||
channel_name ? channel_name :
|
||||
_("New Channel"),
|
||||
_("Channel"),
|
||||
_("New Channel"),
|
||||
"gimp-channel-new",
|
||||
GIMP_STOCK_CHANNEL,
|
||||
@ -144,8 +144,8 @@ channels_new_last_vals_cmd_callback (GtkAction *action,
|
||||
{
|
||||
GimpChannel *template = GIMP_CHANNEL (GIMP_ACTION (action)->viewable);
|
||||
|
||||
width = gimp_item_width (GIMP_ITEM (template));
|
||||
height = gimp_item_height (GIMP_ITEM (template));
|
||||
width = gimp_item_get_width (GIMP_ITEM (template));
|
||||
height = gimp_item_get_height (GIMP_ITEM (template));
|
||||
color = template->color;
|
||||
}
|
||||
else
|
||||
@ -159,14 +159,14 @@ channels_new_last_vals_cmd_callback (GtkAction *action,
|
||||
_("New Channel"));
|
||||
|
||||
new_channel = gimp_channel_new (image, width, height,
|
||||
channel_name ? channel_name :
|
||||
_("New Channel"), &color);
|
||||
channel_name, &color);
|
||||
|
||||
gimp_drawable_fill_by_type (GIMP_DRAWABLE (new_channel),
|
||||
action_data_get_context (data),
|
||||
GIMP_TRANSPARENT_FILL);
|
||||
|
||||
gimp_image_add_channel (image, new_channel, -1);
|
||||
gimp_image_add_channel (image, new_channel,
|
||||
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
|
||||
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
@ -181,7 +181,7 @@ channels_raise_cmd_callback (GtkAction *action,
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
gimp_image_raise_channel (image, channel, NULL);
|
||||
gimp_image_raise_item (image, GIMP_ITEM (channel), NULL);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
@ -193,7 +193,7 @@ channels_raise_to_top_cmd_callback (GtkAction *action,
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
gimp_image_raise_channel_to_top (image, channel);
|
||||
gimp_image_raise_item_to_top (image, GIMP_ITEM (channel));
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
@ -205,7 +205,7 @@ channels_lower_cmd_callback (GtkAction *action,
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
gimp_image_lower_channel (image, channel, NULL);
|
||||
gimp_image_lower_item (image, GIMP_ITEM (channel), NULL);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
@ -217,7 +217,7 @@ channels_lower_to_bottom_cmd_callback (GtkAction *action,
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
gimp_image_lower_channel_to_bottom (image, channel);
|
||||
gimp_image_lower_item_to_bottom (image, GIMP_ITEM (channel));
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
@ -227,6 +227,7 @@ channels_duplicate_cmd_callback (GtkAction *action,
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpChannel *new_channel;
|
||||
GimpChannel *parent = GIMP_IMAGE_ACTIVE_PARENT;
|
||||
|
||||
if (GIMP_IS_COMPONENT_EDITOR (data))
|
||||
{
|
||||
@ -260,9 +261,16 @@ channels_duplicate_cmd_callback (GtkAction *action,
|
||||
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, -1);
|
||||
gimp_image_add_channel (image, new_channel, parent, -1, TRUE);
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
@ -274,7 +282,7 @@ channels_delete_cmd_callback (GtkAction *action,
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
gimp_image_remove_channel (image, channel);
|
||||
gimp_image_remove_channel (image, channel, TRUE, NULL);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
@ -303,10 +311,8 @@ channels_to_selection_cmd_callback (GtkAction *action,
|
||||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
gimp_channel_select_channel (gimp_image_get_mask (image),
|
||||
_("Channel to Selection"),
|
||||
channel, 0, 0,
|
||||
op, FALSE, 0.0, 0.0);
|
||||
gimp_item_to_selection (GIMP_ITEM (channel),
|
||||
op, TRUE, FALSE, 0.0, 0.0);
|
||||
}
|
||||
|
||||
gimp_image_flush (image);
|
||||
@ -326,6 +332,7 @@ channels_new_channel_response (GtkWidget *widget,
|
||||
|
||||
if (channel_name)
|
||||
g_free (channel_name);
|
||||
|
||||
channel_name =
|
||||
g_strdup (gtk_entry_get_text (GTK_ENTRY (options->name_entry)));
|
||||
|
||||
@ -356,7 +363,9 @@ channels_new_channel_response (GtkWidget *widget,
|
||||
GIMP_TRANSPARENT_FILL);
|
||||
}
|
||||
|
||||
gimp_image_add_channel (options->image, new_channel, -1);
|
||||
gimp_image_add_channel (options->image, new_channel,
|
||||
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
|
||||
|
||||
gimp_image_flush (options->image);
|
||||
}
|
||||
|
||||
@ -381,7 +390,7 @@ channels_edit_channel_response (GtkWidget *widget,
|
||||
gimp_color_button_get_color (GIMP_COLOR_BUTTON (options->color_panel),
|
||||
&color);
|
||||
|
||||
if (strcmp (new_name, gimp_object_get_name (GIMP_OBJECT (channel))))
|
||||
if (strcmp (new_name, gimp_object_get_name (channel)))
|
||||
name_changed = TRUE;
|
||||
|
||||
if (gimp_rgba_distance (&color, &channel->color) > 0.0001)
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __CHANNELS_COMMANDS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,12 +12,12 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
@ -41,12 +41,12 @@
|
||||
static const GimpActionEntry colormap_actions[] =
|
||||
{
|
||||
{ "colormap-popup", GIMP_STOCK_COLORMAP,
|
||||
N_("Colormap Menu"), NULL, NULL, NULL,
|
||||
NC_("colormap-action", "Colormap Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_INDEXED_PALETTE_DIALOG },
|
||||
|
||||
{ "colormap-edit-color", GTK_STOCK_EDIT,
|
||||
N_("_Edit Color..."), NULL,
|
||||
N_("Edit color"),
|
||||
NC_("colormap-action", "_Edit Color..."), NULL,
|
||||
NC_("colormap-action", "Edit this color"),
|
||||
G_CALLBACK (colormap_edit_color_cmd_callback),
|
||||
GIMP_HELP_INDEXED_PALETTE_EDIT }
|
||||
};
|
||||
@ -54,14 +54,14 @@ static const GimpActionEntry colormap_actions[] =
|
||||
static const GimpEnumActionEntry colormap_add_color_actions[] =
|
||||
{
|
||||
{ "colormap-add-color-from-fg", GTK_STOCK_ADD,
|
||||
N_("_Add Color from FG"), "",
|
||||
N_("Add current foreground color"),
|
||||
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", GTK_STOCK_ADD,
|
||||
N_("_Add Color from BG"), "",
|
||||
N_("Add current background color"),
|
||||
NC_("colormap-action", "_Add Color from BG"), "",
|
||||
NC_("colormap-action", "Add current background color"),
|
||||
TRUE, FALSE,
|
||||
GIMP_HELP_INDEXED_PALETTE_ADD }
|
||||
};
|
||||
@ -70,11 +70,11 @@ static const GimpEnumActionEntry colormap_add_color_actions[] =
|
||||
void
|
||||
colormap_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group,
|
||||
gimp_action_group_add_actions (group, "colormap-action",
|
||||
colormap_actions,
|
||||
G_N_ELEMENTS (colormap_actions));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, "colormap-action",
|
||||
colormap_add_color_actions,
|
||||
G_N_ELEMENTS (colormap_add_color_actions),
|
||||
G_CALLBACK (colormap_add_color_cmd_callback));
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __COLORMAP_ACTIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,12 +12,12 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
@ -81,7 +81,7 @@ colormap_edit_color_cmd_callback (GtkAction *action,
|
||||
GIMP_STOCK_COLORMAP,
|
||||
desc,
|
||||
GTK_WIDGET (editor),
|
||||
gimp_dialog_factory_from_name ("toplevel"),
|
||||
gimp_dialog_factory_get_singleton (),
|
||||
"gimp-colormap-editor-color-dialog",
|
||||
(const GimpRGB *) &color,
|
||||
FALSE, FALSE);
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __COLORMAP_COMMANDS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -36,8 +35,8 @@
|
||||
static const GimpToggleActionEntry config_toggle_actions[] =
|
||||
{
|
||||
{ "config-use-gegl", NULL,
|
||||
N_("Use _GEGL"), NULL,
|
||||
N_("If possible, use GEGL for image processing"),
|
||||
NC_("config-action", "Use _GEGL"), NULL,
|
||||
NC_("config-action", "If possible, use GEGL for image processing"),
|
||||
G_CALLBACK (config_use_gegl_cmd_callback),
|
||||
FALSE,
|
||||
GIMP_HELP_CONFIG_USE_GEGL }
|
||||
@ -61,7 +60,7 @@ config_actions_use_gegl_notify (GObject *config,
|
||||
void
|
||||
config_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_toggle_actions (group,
|
||||
gimp_action_group_add_toggle_actions (group, "config-action",
|
||||
config_toggle_actions,
|
||||
G_N_ELEMENTS (config_toggle_actions));
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __CONFIG_ACTIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -35,7 +34,8 @@ config_use_gegl_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
{
|
||||
GtkToggleAction *toggle_action = GTK_TOGGLE_ACTION (action);
|
||||
Gimp *gimp = action_data_get_gimp (data);
|
||||
Gimp *gimp = NULL;
|
||||
return_if_no_gimp (gimp, data);
|
||||
|
||||
g_object_set (gimp->config,
|
||||
"use-gegl", gtk_toggle_action_get_active (toggle_action),
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __CONFIG_COMMANDS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -43,33 +42,50 @@
|
||||
|
||||
static const GimpActionEntry context_actions[] =
|
||||
{
|
||||
{ "context-menu", NULL, N_("_Context") },
|
||||
{ "context-colors-menu", GIMP_STOCK_DEFAULT_COLORS, N_("_Colors") },
|
||||
{ "context-opacity-menu", GIMP_STOCK_TRANSPARENCY, N_("_Opacity") },
|
||||
{ "context-paint-mode-menu", GIMP_STOCK_TOOL_PENCIL, N_("Paint _Mode") },
|
||||
{ "context-tool-menu", GIMP_STOCK_TOOLS, N_("_Tool") },
|
||||
{ "context-brush-menu", GIMP_STOCK_BRUSH, N_("_Brush") },
|
||||
{ "context-pattern-menu", GIMP_STOCK_PATTERN, N_("_Pattern") },
|
||||
{ "context-palette-menu", GIMP_STOCK_PALETTE, N_("_Palette") },
|
||||
{ "context-gradient-menu", GIMP_STOCK_GRADIENT, N_("_Gradient") },
|
||||
{ "context-font-menu", GIMP_STOCK_FONT, N_("_Font") },
|
||||
{ "context-menu", NULL, NC_("context-action",
|
||||
"_Context") },
|
||||
{ "context-colors-menu", GIMP_STOCK_DEFAULT_COLORS, NC_("context-action",
|
||||
"_Colors") },
|
||||
{ "context-opacity-menu", GIMP_STOCK_TRANSPARENCY, NC_("context-action",
|
||||
"_Opacity") },
|
||||
{ "context-paint-mode-menu", GIMP_STOCK_TOOL_PENCIL, NC_("context-action",
|
||||
"Paint _Mode") },
|
||||
{ "context-tool-menu", GIMP_STOCK_TOOLS, NC_("context-action",
|
||||
"_Tool") },
|
||||
{ "context-brush-menu", GIMP_STOCK_BRUSH, NC_("context-action",
|
||||
"_Brush") },
|
||||
{ "context-pattern-menu", GIMP_STOCK_PATTERN, NC_("context-action",
|
||||
"_Pattern") },
|
||||
{ "context-palette-menu", GIMP_STOCK_PALETTE, NC_("context-action",
|
||||
"_Palette") },
|
||||
{ "context-gradient-menu", GIMP_STOCK_GRADIENT, NC_("context-action",
|
||||
"_Gradient") },
|
||||
{ "context-font-menu", GIMP_STOCK_FONT, NC_("context-action",
|
||||
"_Font") },
|
||||
|
||||
{ "context-brush-shape-menu", NULL, N_("_Shape") },
|
||||
{ "context-brush-radius-menu", NULL, N_("_Radius") },
|
||||
{ "context-brush-spikes-menu", NULL, N_("S_pikes") },
|
||||
{ "context-brush-hardness-menu", NULL, N_("_Hardness") },
|
||||
{ "context-brush-aspect-menu", NULL, N_("_Aspect") },
|
||||
{ "context-brush-angle-menu", NULL, N_("A_ngle") },
|
||||
{ "context-brush-shape-menu", NULL, NC_("context-action",
|
||||
"_Shape") },
|
||||
{ "context-brush-radius-menu", NULL, NC_("context-action",
|
||||
"_Radius") },
|
||||
{ "context-brush-spikes-menu", NULL, NC_("context-action",
|
||||
"S_pikes") },
|
||||
{ "context-brush-hardness-menu", NULL, NC_("context-action",
|
||||
"_Hardness") },
|
||||
{ "context-brush-aspect-menu", NULL, NC_("context-action",
|
||||
"_Aspect Ratio")},
|
||||
{ "context-brush-angle-menu", NULL, NC_("context-action",
|
||||
"A_ngle") },
|
||||
|
||||
{ "context-colors-default", GIMP_STOCK_DEFAULT_COLORS,
|
||||
N_("_Default Colors"), "D",
|
||||
N_("Set foreground color to black, background color to white"),
|
||||
NC_("context-action", "_Default Colors"), "D",
|
||||
NC_("context-action",
|
||||
"Set foreground color to black, background color to white"),
|
||||
G_CALLBACK (context_colors_default_cmd_callback),
|
||||
GIMP_HELP_TOOLBOX_DEFAULT_COLORS },
|
||||
|
||||
{ "context-colors-swap", GIMP_STOCK_SWAP_COLORS,
|
||||
N_("S_wap Colors"), "X",
|
||||
N_("Exchange foreground and background colors"),
|
||||
NC_("context-action", "S_wap Colors"), "X",
|
||||
NC_("context-action", "Exchange foreground and background colors"),
|
||||
G_CALLBACK (context_colors_swap_cmd_callback),
|
||||
GIMP_HELP_TOOLBOX_SWAP_COLORS }
|
||||
};
|
||||
@ -1074,149 +1090,149 @@ static const GimpEnumActionEntry context_brush_angle_actions[] =
|
||||
void
|
||||
context_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group,
|
||||
gimp_action_group_add_actions (group, "context-action",
|
||||
context_actions,
|
||||
G_N_ELEMENTS (context_actions));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_palette_foreground_actions,
|
||||
G_N_ELEMENTS (context_palette_foreground_actions),
|
||||
G_CALLBACK (context_palette_foreground_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_palette_background_actions,
|
||||
G_N_ELEMENTS (context_palette_background_actions),
|
||||
G_CALLBACK (context_palette_background_cmd_callback));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_colormap_foreground_actions,
|
||||
G_N_ELEMENTS (context_colormap_foreground_actions),
|
||||
G_CALLBACK (context_colormap_foreground_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_colormap_background_actions,
|
||||
G_N_ELEMENTS (context_colormap_background_actions),
|
||||
G_CALLBACK (context_colormap_background_cmd_callback));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_swatch_foreground_actions,
|
||||
G_N_ELEMENTS (context_swatch_foreground_actions),
|
||||
G_CALLBACK (context_swatch_foreground_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_swatch_background_actions,
|
||||
G_N_ELEMENTS (context_swatch_background_actions),
|
||||
G_CALLBACK (context_swatch_background_cmd_callback));
|
||||
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_foreground_red_actions,
|
||||
G_N_ELEMENTS (context_foreground_red_actions),
|
||||
G_CALLBACK (context_foreground_red_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_foreground_green_actions,
|
||||
G_N_ELEMENTS (context_foreground_green_actions),
|
||||
G_CALLBACK (context_foreground_green_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_foreground_blue_actions,
|
||||
G_N_ELEMENTS (context_foreground_blue_actions),
|
||||
G_CALLBACK (context_foreground_blue_cmd_callback));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_foreground_hue_actions,
|
||||
G_N_ELEMENTS (context_foreground_hue_actions),
|
||||
G_CALLBACK (context_foreground_hue_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_foreground_saturation_actions,
|
||||
G_N_ELEMENTS (context_foreground_saturation_actions),
|
||||
G_CALLBACK (context_foreground_saturation_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_foreground_value_actions,
|
||||
G_N_ELEMENTS (context_foreground_value_actions),
|
||||
G_CALLBACK (context_foreground_value_cmd_callback));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_background_red_actions,
|
||||
G_N_ELEMENTS (context_background_red_actions),
|
||||
G_CALLBACK (context_background_red_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_background_green_actions,
|
||||
G_N_ELEMENTS (context_background_green_actions),
|
||||
G_CALLBACK (context_background_green_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_background_blue_actions,
|
||||
G_N_ELEMENTS (context_background_blue_actions),
|
||||
G_CALLBACK (context_background_blue_cmd_callback));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_background_hue_actions,
|
||||
G_N_ELEMENTS (context_background_hue_actions),
|
||||
G_CALLBACK (context_background_hue_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_background_saturation_actions,
|
||||
G_N_ELEMENTS (context_background_saturation_actions),
|
||||
G_CALLBACK (context_background_saturation_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_background_value_actions,
|
||||
G_N_ELEMENTS (context_background_value_actions),
|
||||
G_CALLBACK (context_background_value_cmd_callback));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_opacity_actions,
|
||||
G_N_ELEMENTS (context_opacity_actions),
|
||||
G_CALLBACK (context_opacity_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_paint_mode_actions,
|
||||
G_N_ELEMENTS (context_paint_mode_actions),
|
||||
G_CALLBACK (context_paint_mode_cmd_callback));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_tool_select_actions,
|
||||
G_N_ELEMENTS (context_tool_select_actions),
|
||||
G_CALLBACK (context_tool_select_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_brush_select_actions,
|
||||
G_N_ELEMENTS (context_brush_select_actions),
|
||||
G_CALLBACK (context_brush_select_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_pattern_select_actions,
|
||||
G_N_ELEMENTS (context_pattern_select_actions),
|
||||
G_CALLBACK (context_pattern_select_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_palette_select_actions,
|
||||
G_N_ELEMENTS (context_palette_select_actions),
|
||||
G_CALLBACK (context_palette_select_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_gradient_select_actions,
|
||||
G_N_ELEMENTS (context_gradient_select_actions),
|
||||
G_CALLBACK (context_gradient_select_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_font_select_actions,
|
||||
G_N_ELEMENTS (context_font_select_actions),
|
||||
G_CALLBACK (context_font_select_cmd_callback));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_brush_spacing_actions,
|
||||
G_N_ELEMENTS (context_brush_spacing_actions),
|
||||
G_CALLBACK (context_brush_spacing_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_brush_shape_actions,
|
||||
G_N_ELEMENTS (context_brush_shape_actions),
|
||||
G_CALLBACK (context_brush_shape_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_brush_radius_actions,
|
||||
G_N_ELEMENTS (context_brush_radius_actions),
|
||||
G_CALLBACK (context_brush_radius_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_brush_spikes_actions,
|
||||
G_N_ELEMENTS (context_brush_spikes_actions),
|
||||
G_CALLBACK (context_brush_spikes_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_brush_hardness_actions,
|
||||
G_N_ELEMENTS (context_brush_hardness_actions),
|
||||
G_CALLBACK (context_brush_hardness_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_brush_aspect_actions,
|
||||
G_N_ELEMENTS (context_brush_aspect_actions),
|
||||
G_CALLBACK (context_brush_aspect_cmd_callback));
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
context_brush_angle_actions,
|
||||
G_N_ELEMENTS (context_brush_angle_actions),
|
||||
G_CALLBACK (context_brush_angle_cmd_callback));
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __CONTEXT_ACTIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -22,6 +21,7 @@
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
@ -32,6 +32,9 @@
|
||||
#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"
|
||||
@ -41,6 +44,8 @@
|
||||
#include "actions.h"
|
||||
#include "context-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpLayerModeEffects paint_modes[] =
|
||||
{
|
||||
@ -368,17 +373,20 @@ context_opacity_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
gdouble opacity;
|
||||
GimpContext *context;
|
||||
GimpToolInfo *tool_info;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
opacity = action_select_value ((GimpActionSelectType) value,
|
||||
gimp_context_get_opacity (context),
|
||||
GIMP_OPACITY_TRANSPARENT,
|
||||
GIMP_OPACITY_OPAQUE,
|
||||
GIMP_OPACITY_OPAQUE,
|
||||
1.0 / 255.0, 0.01, 0.1, 0.0, FALSE);
|
||||
gimp_context_set_opacity (context, opacity);
|
||||
tool_info = gimp_context_get_tool (context);
|
||||
|
||||
if (tool_info && GIMP_IS_TOOL_OPTIONS (tool_info->tool_options))
|
||||
{
|
||||
action_select_property ((GimpActionSelectType) value,
|
||||
action_data_get_display (data),
|
||||
G_OBJECT (tool_info->tool_options),
|
||||
"opacity",
|
||||
1.0 / 255.0, 0.01, 0.1, 0.1, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -387,6 +395,7 @@ context_paint_mode_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpToolInfo *tool_info;
|
||||
GimpLayerModeEffects paint_mode;
|
||||
gint index;
|
||||
return_if_no_context (context, data);
|
||||
@ -398,6 +407,25 @@ context_paint_mode_cmd_callback (GtkAction *action,
|
||||
0, G_N_ELEMENTS (paint_modes) - 1, 0,
|
||||
0.0, 1.0, 1.0, 0.0, FALSE);
|
||||
gimp_context_set_paint_mode (context, paint_modes[index]);
|
||||
|
||||
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_EFFECTS, index,
|
||||
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
|
||||
@ -421,7 +449,7 @@ context_brush_select_cmd_callback (GtkAction *action,
|
||||
return_if_no_context (context, data);
|
||||
|
||||
context_select_object ((GimpActionSelectType) value,
|
||||
context, context->gimp->brush_factory->container);
|
||||
context, gimp_data_factory_get_container (context->gimp->brush_factory));
|
||||
}
|
||||
|
||||
void
|
||||
@ -433,7 +461,7 @@ context_pattern_select_cmd_callback (GtkAction *action,
|
||||
return_if_no_context (context, data);
|
||||
|
||||
context_select_object ((GimpActionSelectType) value,
|
||||
context, context->gimp->pattern_factory->container);
|
||||
context, gimp_data_factory_get_container (context->gimp->pattern_factory));
|
||||
}
|
||||
|
||||
void
|
||||
@ -445,7 +473,7 @@ context_palette_select_cmd_callback (GtkAction *action,
|
||||
return_if_no_context (context, data);
|
||||
|
||||
context_select_object ((GimpActionSelectType) value,
|
||||
context, context->gimp->palette_factory->container);
|
||||
context, gimp_data_factory_get_container (context->gimp->palette_factory));
|
||||
}
|
||||
|
||||
void
|
||||
@ -457,7 +485,7 @@ context_gradient_select_cmd_callback (GtkAction *action,
|
||||
return_if_no_context (context, data);
|
||||
|
||||
context_select_object ((GimpActionSelectType) value,
|
||||
context, context->gimp->gradient_factory->container);
|
||||
context, gimp_data_factory_get_container (context->gimp->gradient_factory));
|
||||
}
|
||||
|
||||
void
|
||||
@ -479,17 +507,18 @@ context_brush_spacing_cmd_callback (GtkAction *action,
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpBrush *brush;
|
||||
gint spacing;
|
||||
return_if_no_context (context, data);
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
spacing = gimp_brush_get_spacing (brush);
|
||||
spacing = action_select_value ((GimpActionSelectType) value,
|
||||
spacing,
|
||||
1.0, 5000.0, 20.0,
|
||||
1.0, 5.0, 20.0, 0.0, FALSE);
|
||||
gimp_brush_set_spacing (brush, spacing);
|
||||
|
||||
if (GIMP_IS_BRUSH (brush) && gimp_data_is_writable (GIMP_DATA (brush)))
|
||||
{
|
||||
action_select_property ((GimpActionSelectType) value,
|
||||
action_data_get_display (data),
|
||||
G_OBJECT (brush),
|
||||
"spacing",
|
||||
1.0, 5.0, 20.0, 0.1, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -503,12 +532,25 @@ context_brush_shape_cmd_callback (GtkAction *action,
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) && GIMP_DATA (brush)->writable)
|
||||
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,
|
||||
(GimpBrushGeneratedShape) value);
|
||||
|
||||
gimp_enum_get_value (GIMP_TYPE_BRUSH_GENERATED_SHAPE, value,
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -523,9 +565,11 @@ context_brush_radius_cmd_callback (GtkAction *action,
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) && GIMP_DATA (brush)->writable)
|
||||
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;
|
||||
|
||||
@ -559,6 +603,14 @@ context_brush_radius_cmd_callback (GtkAction *action,
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -573,17 +625,14 @@ context_brush_spikes_cmd_callback (GtkAction *action,
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) && GIMP_DATA (brush)->writable)
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) &&
|
||||
gimp_data_is_writable (GIMP_DATA (brush)))
|
||||
{
|
||||
GimpBrushGenerated *generated = GIMP_BRUSH_GENERATED (brush);
|
||||
gint spikes;
|
||||
|
||||
spikes = gimp_brush_generated_get_spikes (generated);
|
||||
spikes = action_select_value ((GimpActionSelectType) value,
|
||||
spikes,
|
||||
2.0, 20.0, 2.0,
|
||||
0.0, 1.0, 4.0, 0.0, FALSE);
|
||||
gimp_brush_generated_set_spikes (generated, spikes);
|
||||
action_select_property ((GimpActionSelectType) value,
|
||||
action_data_get_display (data),
|
||||
G_OBJECT (brush),
|
||||
"spikes",
|
||||
0.0, 1.0, 4.0, 0.1, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -598,17 +647,14 @@ context_brush_hardness_cmd_callback (GtkAction *action,
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) && GIMP_DATA (brush)->writable)
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) &&
|
||||
gimp_data_is_writable (GIMP_DATA (brush)))
|
||||
{
|
||||
GimpBrushGenerated *generated = GIMP_BRUSH_GENERATED (brush);
|
||||
gdouble hardness;
|
||||
|
||||
hardness = gimp_brush_generated_get_hardness (generated);
|
||||
hardness = action_select_value ((GimpActionSelectType) value,
|
||||
hardness,
|
||||
0.0, 1.0, 1.0,
|
||||
0.001, 0.01, 0.1, 0.0, FALSE);
|
||||
gimp_brush_generated_set_hardness (generated, hardness);
|
||||
action_select_property ((GimpActionSelectType) value,
|
||||
action_data_get_display (data),
|
||||
G_OBJECT (brush),
|
||||
"hardness",
|
||||
0.001, 0.01, 0.1, 0.1, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -623,17 +669,14 @@ context_brush_aspect_cmd_callback (GtkAction *action,
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) && GIMP_DATA (brush)->writable)
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) &&
|
||||
gimp_data_is_writable (GIMP_DATA (brush)))
|
||||
{
|
||||
GimpBrushGenerated *generated = GIMP_BRUSH_GENERATED (brush);
|
||||
gdouble aspect;
|
||||
|
||||
aspect = gimp_brush_generated_get_aspect_ratio (generated);
|
||||
aspect = action_select_value ((GimpActionSelectType) value,
|
||||
aspect,
|
||||
1.0, 20.0, 1.0,
|
||||
0.1, 1.0, 4.0, 0.0, FALSE);
|
||||
gimp_brush_generated_set_aspect_ratio (generated, aspect);
|
||||
action_select_property ((GimpActionSelectType) value,
|
||||
action_data_get_display (data),
|
||||
G_OBJECT (brush),
|
||||
"aspect-ratio",
|
||||
0.1, 1.0, 4.0, 0.1, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -648,9 +691,11 @@ context_brush_angle_cmd_callback (GtkAction *action,
|
||||
|
||||
brush = gimp_context_get_brush (context);
|
||||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush) && GIMP_DATA (brush)->writable)
|
||||
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);
|
||||
@ -663,9 +708,17 @@ context_brush_angle_cmd_callback (GtkAction *action,
|
||||
angle = action_select_value ((GimpActionSelectType) value,
|
||||
angle,
|
||||
0.0, 180.0, 0.0,
|
||||
0.1, 1.0, 15.0, 0.0, TRUE);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -679,12 +732,14 @@ context_select_object (GimpActionSelectType select_type,
|
||||
{
|
||||
GimpObject *current;
|
||||
|
||||
current = gimp_context_get_by_type (context, container->children_type);
|
||||
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, container->children_type, current);
|
||||
gimp_context_set_by_type (context,
|
||||
gimp_container_get_children_type (container), current);
|
||||
}
|
||||
|
||||
static gint
|
||||
@ -813,17 +868,14 @@ context_set_color_index (gint index,
|
||||
static GimpPaletteEditor *
|
||||
context_get_palette_editor (void)
|
||||
{
|
||||
GimpDialogFactory *dialog_factory;
|
||||
GimpSessionInfo *info;
|
||||
GtkWidget *widget;
|
||||
|
||||
dialog_factory = gimp_dialog_factory_from_name ("dock");
|
||||
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (gimp_dialog_factory_get_singleton ()), NULL);
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (dialog_factory), NULL);
|
||||
|
||||
info = gimp_dialog_factory_find_session_info (dialog_factory,
|
||||
"gimp-palette-editor");
|
||||
if (info && info->widget)
|
||||
return GIMP_PALETTE_EDITOR (gtk_bin_get_child (GTK_BIN (info->widget)));
|
||||
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;
|
||||
}
|
||||
@ -831,17 +883,14 @@ context_get_palette_editor (void)
|
||||
static GimpColormapEditor *
|
||||
context_get_colormap_editor (void)
|
||||
{
|
||||
GimpDialogFactory *dialog_factory;
|
||||
GimpSessionInfo *info;
|
||||
GtkWidget *widget;
|
||||
|
||||
dialog_factory = gimp_dialog_factory_from_name ("dock");
|
||||
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (gimp_dialog_factory_get_singleton ()), NULL);
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (dialog_factory), NULL);
|
||||
|
||||
info = gimp_dialog_factory_find_session_info (dialog_factory,
|
||||
"gimp-indexed-palette");
|
||||
if (info && info->widget)
|
||||
return GIMP_COLORMAP_EDITOR (gtk_bin_get_child (GTK_BIN (info->widget)));
|
||||
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,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __CONTEXT_COMMANDS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -25,9 +24,10 @@
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpcursorview.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "display/gimpcursorview.h"
|
||||
|
||||
#include "cursor-info-actions.h"
|
||||
#include "cursor-info-commands.h"
|
||||
|
||||
@ -37,15 +37,15 @@
|
||||
static const GimpActionEntry cursor_info_actions[] =
|
||||
{
|
||||
{ "cursor-info-popup", GIMP_STOCK_CURSOR,
|
||||
N_("Pointer Information Menu"), NULL, NULL, NULL,
|
||||
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,
|
||||
N_("_Sample Merged"), "",
|
||||
N_("Sample Merged"),
|
||||
NC_("cursor-info-action", "_Sample Merged"), "",
|
||||
NC_("cursor-info-action", "Use the composite color of all visible layers"),
|
||||
G_CALLBACK (cursor_info_sample_merged_cmd_callback),
|
||||
TRUE,
|
||||
GIMP_HELP_POINTER_INFO_SAMPLE_MERGED }
|
||||
@ -55,11 +55,11 @@ static const GimpToggleActionEntry cursor_info_toggle_actions[] =
|
||||
void
|
||||
cursor_info_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (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,
|
||||
gimp_action_group_add_toggle_actions (group, "cursor-info-action",
|
||||
cursor_info_toggle_actions,
|
||||
G_N_ELEMENTS (cursor_info_toggle_actions));
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __CURSOR_INFO_ACIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -25,10 +24,11 @@
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpcursorview.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
#include "display/gimpcursorview.h"
|
||||
|
||||
#include "cursor-info-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __CURSOR_INFO_COMMANDS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -25,7 +24,6 @@
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimp-utils.h"
|
||||
#include "core/gimpcontainer.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpdata.h"
|
||||
@ -41,8 +39,9 @@
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpmessagebox.h"
|
||||
#include "widgets/gimpmessagedialog.h"
|
||||
#include "widgets/gimpwindowstrategy.h"
|
||||
|
||||
#include "dialogs/dialogs.h"
|
||||
#include "dialogs/data-delete-dialog.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "data-commands.h"
|
||||
@ -50,23 +49,6 @@
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
typedef struct _GimpDataDeleteData GimpDataDeleteData;
|
||||
|
||||
struct _GimpDataDeleteData
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpDataFactoryView *view;
|
||||
GimpData *data;
|
||||
};
|
||||
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
static void data_delete_confirm_response (GtkWidget *dialog,
|
||||
gint response_id,
|
||||
GimpDataDeleteData *delete_data);
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
@ -82,11 +64,11 @@ data_open_as_image_cmd_callback (GtkAction *action,
|
||||
|
||||
data = (GimpData *)
|
||||
gimp_context_get_by_type (context,
|
||||
view->factory->container->children_type);
|
||||
gimp_data_factory_view_get_children_type (view));
|
||||
|
||||
if (data && data->filename)
|
||||
if (data && gimp_data_get_filename (data))
|
||||
{
|
||||
gchar *uri = g_filename_to_uri (data->filename, NULL, NULL);
|
||||
gchar *uri = g_filename_to_uri (gimp_data_get_filename (data), NULL, NULL);
|
||||
|
||||
if (uri)
|
||||
{
|
||||
@ -122,23 +104,26 @@ data_new_cmd_callback (GtkAction *action,
|
||||
{
|
||||
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
|
||||
|
||||
if (view->factory->data_new_func)
|
||||
if (gimp_data_factory_view_has_data_new_func (view))
|
||||
{
|
||||
GimpContext *context;
|
||||
GimpData *data;
|
||||
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 (view->factory, _("Untitled"));
|
||||
data = gimp_data_factory_data_new (factory, context, _("Untitled"));
|
||||
|
||||
if (data)
|
||||
{
|
||||
gimp_context_set_by_type (context,
|
||||
view->factory->container->children_type,
|
||||
gimp_data_factory_view_get_children_type (view),
|
||||
GIMP_OBJECT (data));
|
||||
|
||||
gtk_button_clicked (GTK_BUTTON (view->edit_button));
|
||||
gtk_button_clicked (GTK_BUTTON (gimp_data_factory_view_get_edit_button (view)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -155,22 +140,22 @@ data_duplicate_cmd_callback (GtkAction *action,
|
||||
|
||||
data = (GimpData *)
|
||||
gimp_context_get_by_type (context,
|
||||
view->factory->container->children_type);
|
||||
gimp_data_factory_view_get_children_type (view));
|
||||
|
||||
if (data && gimp_container_have (view->factory->container,
|
||||
GIMP_OBJECT (data)))
|
||||
if (data && gimp_data_factory_view_have (view,
|
||||
GIMP_OBJECT (data)))
|
||||
{
|
||||
GimpData *new_data;
|
||||
|
||||
new_data = gimp_data_factory_data_duplicate (view->factory, 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,
|
||||
view->factory->container->children_type,
|
||||
gimp_data_factory_view_get_children_type (view),
|
||||
GIMP_OBJECT (new_data));
|
||||
|
||||
gtk_button_clicked (GTK_BUTTON (view->edit_button));
|
||||
gtk_button_clicked (GTK_BUTTON (gimp_data_factory_view_get_edit_button (view)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -187,16 +172,21 @@ data_copy_location_cmd_callback (GtkAction *action,
|
||||
|
||||
data = (GimpData *)
|
||||
gimp_context_get_by_type (context,
|
||||
view->factory->container->children_type);
|
||||
gimp_data_factory_view_get_children_type (view));
|
||||
|
||||
if (data && data->filename && *data->filename)
|
||||
if (data)
|
||||
{
|
||||
gchar *uri = g_filename_to_uri (data->filename, NULL, NULL);
|
||||
const gchar *filename = gimp_data_get_filename (data);
|
||||
|
||||
if (uri)
|
||||
if (filename && *filename)
|
||||
{
|
||||
gimp_clipboard_set_text (context->gimp, uri);
|
||||
g_free (uri);
|
||||
gchar *uri = g_filename_to_uri (filename, NULL, NULL);
|
||||
|
||||
if (uri)
|
||||
{
|
||||
gimp_clipboard_set_text (context->gimp, uri);
|
||||
g_free (uri);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -214,50 +204,20 @@ data_delete_cmd_callback (GtkAction *action,
|
||||
|
||||
data = (GimpData *)
|
||||
gimp_context_get_by_type (context,
|
||||
view->factory->container->children_type);
|
||||
gimp_data_factory_view_get_children_type (view));
|
||||
|
||||
if (data && data->deletable && gimp_container_have (view->factory->container,
|
||||
GIMP_OBJECT (data)))
|
||||
if (data &&
|
||||
gimp_data_is_deletable (data) &&
|
||||
gimp_data_factory_view_have (view,
|
||||
GIMP_OBJECT (data)))
|
||||
{
|
||||
GimpDataDeleteData *delete_data;
|
||||
GtkWidget *dialog;
|
||||
GimpDataFactory *factory;
|
||||
GtkWidget *dialog;
|
||||
|
||||
delete_data = g_slice_new0 (GimpDataDeleteData);
|
||||
|
||||
delete_data->context = context;
|
||||
delete_data->view = view;
|
||||
delete_data->data = data;
|
||||
|
||||
dialog = gimp_message_dialog_new (_("Delete Object"), GTK_STOCK_DELETE,
|
||||
GTK_WIDGET (view), 0,
|
||||
gimp_standard_help_func, NULL,
|
||||
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_DELETE, GTK_RESPONSE_OK,
|
||||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
g_signal_connect_object (data, "disconnect",
|
||||
G_CALLBACK (gtk_widget_destroy),
|
||||
dialog, G_CONNECT_SWAPPED);
|
||||
|
||||
g_signal_connect (dialog, "response",
|
||||
G_CALLBACK (data_delete_confirm_response),
|
||||
delete_data);
|
||||
|
||||
gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (dialog)->box,
|
||||
_("Delete '%s'?"),
|
||||
GIMP_OBJECT (data)->name);
|
||||
gimp_message_box_set_text(GIMP_MESSAGE_DIALOG (dialog)->box,
|
||||
_("Are you sure you want to remove '%s' "
|
||||
"from the list and delete it on disk?"),
|
||||
GIMP_OBJECT (data)->name);
|
||||
factory = gimp_data_factory_view_get_data_factory (view);
|
||||
|
||||
dialog = data_delete_dialog_new (factory, data, context,
|
||||
GTK_WIDGET (view));
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
}
|
||||
@ -271,7 +231,8 @@ data_refresh_cmd_callback (GtkAction *action,
|
||||
return_if_no_gimp (gimp, user_data);
|
||||
|
||||
gimp_set_busy (gimp);
|
||||
gimp_data_factory_data_refresh (view->factory);
|
||||
gimp_data_factory_data_refresh (gimp_data_factory_view_get_data_factory (view),
|
||||
action_data_get_context (user_data));
|
||||
gimp_unset_busy (gimp);
|
||||
}
|
||||
|
||||
@ -288,56 +249,22 @@ data_edit_cmd_callback (GtkAction *action,
|
||||
|
||||
data = (GimpData *)
|
||||
gimp_context_get_by_type (context,
|
||||
view->factory->container->children_type);
|
||||
gimp_data_factory_view_get_children_type (view));
|
||||
|
||||
if (data && gimp_container_have (view->factory->container,
|
||||
GIMP_OBJECT (data)))
|
||||
if (data && gimp_data_factory_view_have (view,
|
||||
GIMP_OBJECT (data)))
|
||||
{
|
||||
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (view));
|
||||
GtkWidget *dockable;
|
||||
|
||||
dockable = gimp_dialog_factory_dialog_raise (global_dock_factory, screen,
|
||||
value, -1);
|
||||
dockable =
|
||||
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (context->gimp)),
|
||||
context->gimp,
|
||||
gimp_dialog_factory_get_singleton (),
|
||||
screen,
|
||||
value);
|
||||
|
||||
gimp_data_editor_set_data (GIMP_DATA_EDITOR (gtk_bin_get_child (GTK_BIN (dockable))),
|
||||
data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static void
|
||||
data_delete_confirm_response (GtkWidget *dialog,
|
||||
gint response_id,
|
||||
GimpDataDeleteData *delete_data)
|
||||
{
|
||||
gtk_widget_destroy (dialog);
|
||||
|
||||
if (response_id == GTK_RESPONSE_OK)
|
||||
{
|
||||
GimpDataFactory *factory = delete_data->view->factory;
|
||||
GimpData *data = delete_data->data;
|
||||
GimpObject *new_active;
|
||||
GError *error = NULL;
|
||||
|
||||
new_active = gimp_container_get_neighbor_of_active (factory->container,
|
||||
delete_data->context,
|
||||
GIMP_OBJECT (data));
|
||||
|
||||
if (! gimp_data_factory_data_delete (factory, data, TRUE, &error))
|
||||
{
|
||||
gimp_message (factory->gimp,
|
||||
G_OBJECT (delete_data->view), GIMP_MESSAGE_ERROR,
|
||||
"%s", error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
|
||||
if (new_active)
|
||||
gimp_context_set_by_type (delete_data->context,
|
||||
factory->container->children_type,
|
||||
new_active);
|
||||
}
|
||||
|
||||
g_slice_free (GimpDataDeleteData, delete_data);
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DATA_COMMANDS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DATA_EDITOR_COMMANDS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -36,13 +35,26 @@
|
||||
|
||||
static const GimpActionEntry debug_actions[] =
|
||||
{
|
||||
{ "debug-menu", NULL, "D_ebug" },
|
||||
{ "debug-menu", NULL, "_Debug" },
|
||||
|
||||
{ "debug-mem-profile", NULL,
|
||||
"_Memory Profile", NULL, NULL,
|
||||
G_CALLBACK (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) it again, and print the result to stdout.",
|
||||
G_CALLBACK (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",
|
||||
G_CALLBACK (debug_show_image_graph_cmd_callback),
|
||||
NULL },
|
||||
|
||||
{ "debug-dump-items", NULL,
|
||||
"_Dump Items", NULL, NULL,
|
||||
G_CALLBACK (debug_dump_menus_cmd_callback),
|
||||
@ -53,6 +65,11 @@ static const GimpActionEntry debug_actions[] =
|
||||
G_CALLBACK (debug_dump_managers_cmd_callback),
|
||||
NULL },
|
||||
|
||||
{ "debug-dump-keyboard-shortcuts", NULL,
|
||||
"Dump _Keyboard Shortcuts", NULL, NULL,
|
||||
G_CALLBACK (debug_dump_keyboard_shortcuts_cmd_callback),
|
||||
NULL },
|
||||
|
||||
{ "debug-dump-attached-data", NULL,
|
||||
"Dump Attached Data", NULL, NULL,
|
||||
G_CALLBACK (debug_dump_attached_data_cmd_callback),
|
||||
@ -65,7 +82,7 @@ void
|
||||
debug_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
#ifdef ENABLE_DEBUG_MENU
|
||||
gimp_action_group_add_actions (group,
|
||||
gimp_action_group_add_actions (group, NULL,
|
||||
debug_actions,
|
||||
G_N_ELEMENTS (debug_actions));
|
||||
#endif
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DEBUG_ACTIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,23 +12,42 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <glib/gprintf.h>
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "base/tile-manager.h"
|
||||
#include "base/tile.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimp-utils.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimplayer.h"
|
||||
#include "core/gimppickable.h"
|
||||
#include "core/gimpprojectable.h"
|
||||
#include "core/gimpprojection.h"
|
||||
|
||||
#include "file/file-utils.h"
|
||||
|
||||
#include "gegl/gimp-gegl-utils.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
#include "display/gimpimagewindow.h"
|
||||
|
||||
#include "widgets/gimpaction.h"
|
||||
#include "widgets/gimpmenufactory.h"
|
||||
#include "widgets/gimpuimanager.h"
|
||||
|
||||
@ -42,13 +61,21 @@
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
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_benchmark_projection (GimpImage *image);
|
||||
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 */
|
||||
@ -68,13 +95,33 @@ debug_mem_profile_cmd_callback (GtkAction *action,
|
||||
gimp_debug_memsize = FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
debug_benchmark_projection_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
return_if_no_image (image, data);
|
||||
|
||||
g_idle_add ((GSourceFunc) debug_benchmark_projection, g_object_ref (image));
|
||||
}
|
||||
|
||||
void
|
||||
debug_show_image_graph_cmd_callback (GtkAction *action,
|
||||
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 (GtkAction *action,
|
||||
gpointer data)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
for (list = global_menu_factory->registered_menus;
|
||||
for (list = gimp_menu_factory_get_registered_menus (global_menu_factory);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -94,7 +141,8 @@ debug_dump_menus_cmd_callback (GtkAction *action,
|
||||
|
||||
if (GTK_IS_MENU_SHELL (ui_entry->widget))
|
||||
{
|
||||
g_print ("\n\n========================================\n"
|
||||
g_print ("\n\n"
|
||||
"========================================\n"
|
||||
"Menu: %s%s\n"
|
||||
"========================================\n\n",
|
||||
entry->identifier, ui_entry->ui_path);
|
||||
@ -114,7 +162,7 @@ debug_dump_managers_cmd_callback (GtkAction *action,
|
||||
{
|
||||
GList *list;
|
||||
|
||||
for (list = global_menu_factory->registered_menus;
|
||||
for (list = gimp_menu_factory_get_registered_menus (global_menu_factory);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -125,16 +173,106 @@ debug_dump_managers_cmd_callback (GtkAction *action,
|
||||
|
||||
if (managers)
|
||||
{
|
||||
g_print ("\n\n========================================\n"
|
||||
g_print ("\n\n"
|
||||
"========================================\n"
|
||||
"UI Manager: %s\n"
|
||||
"========================================\n\n",
|
||||
entry->identifier);
|
||||
|
||||
g_print (gtk_ui_manager_get_ui (managers->data));
|
||||
g_print ("%s\n", gtk_ui_manager_get_ui (managers->data));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImageWindow *window;
|
||||
GtkUIManager *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 = GTK_UI_MANAGER (gimp_image_window_get_ui_manager (window));
|
||||
|
||||
accel_group = gtk_ui_manager_get_accel_group (manager);
|
||||
|
||||
/* Gather formated strings of keyboard shortcuts */
|
||||
for (group_it = gtk_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 = gtk_action_group_list_actions (GTK_ACTION_GROUP (group));
|
||||
actions = g_list_sort (actions, (GCompareFunc) gimp_action_name_compare);
|
||||
|
||||
for (action_it = actions; action_it; action_it = g_list_next (action_it))
|
||||
{
|
||||
GtkAction *action = action_it->data;
|
||||
const gchar *name = gtk_action_get_name (action);
|
||||
GClosure *accel_closure = NULL;
|
||||
|
||||
if (strstr (name, "-menu") ||
|
||||
strstr (name, "-popup") ||
|
||||
name[0] == '<')
|
||||
continue;
|
||||
|
||||
accel_closure = gtk_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 = gtk_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 (GtkAction *action,
|
||||
gpointer data)
|
||||
@ -149,20 +287,116 @@ debug_dump_attached_data_cmd_callback (GtkAction *action,
|
||||
|
||||
/* private functions */
|
||||
|
||||
static gboolean
|
||||
debug_benchmark_projection (GimpImage *image)
|
||||
{
|
||||
GimpProjection *projection = gimp_image_get_projection (image);
|
||||
TileManager *tiles;
|
||||
gint x, y;
|
||||
|
||||
gimp_image_invalidate (image,
|
||||
0, 0,
|
||||
gimp_image_get_width (image),
|
||||
gimp_image_get_height (image));
|
||||
gimp_projection_flush_now (projection);
|
||||
|
||||
tiles = gimp_pickable_get_tiles (GIMP_PICKABLE (projection));
|
||||
|
||||
GIMP_TIMER_START ();
|
||||
|
||||
for (x = 0; x < tile_manager_width (tiles); x += TILE_WIDTH)
|
||||
{
|
||||
for (y = 0; y < tile_manager_height (tiles); y += TILE_HEIGHT)
|
||||
{
|
||||
Tile *tile = tile_manager_get_tile (tiles, x, y, TRUE, FALSE);
|
||||
|
||||
tile_release (tile, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
GIMP_TIMER_END ("Validation of the entire projection");
|
||||
|
||||
g_object_unref (image);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
debug_show_image_graph (GimpImage *source_image)
|
||||
{
|
||||
Gimp *gimp = source_image->gimp;
|
||||
GimpProjectable *projectable = GIMP_PROJECTABLE (source_image);
|
||||
GeglNode *image_graph = gimp_projectable_get_graph (projectable);
|
||||
GeglNode *output_node = gegl_node_get_output_proxy (image_graph, "output");
|
||||
GimpImage *new_image = NULL;
|
||||
TileManager *tiles = NULL;
|
||||
GimpLayer *layer = NULL;
|
||||
GeglNode *introspect = NULL;
|
||||
GeglNode *sink = NULL;
|
||||
GeglBuffer *buffer = NULL;
|
||||
gchar *new_name = NULL;
|
||||
|
||||
/* Setup and process the introspection graph */
|
||||
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);
|
||||
|
||||
/* Create a new image of the result */
|
||||
tiles = gimp_buffer_to_tiles (buffer);
|
||||
new_name = g_strdup_printf ("%s GEGL graph",
|
||||
file_utils_uri_display_name (gimp_image_get_uri_or_untitled (source_image)));
|
||||
new_image = gimp_create_image (gimp,
|
||||
tile_manager_width (tiles),
|
||||
tile_manager_height (tiles),
|
||||
GIMP_RGB,
|
||||
FALSE);
|
||||
gimp_image_set_uri (new_image, new_name);
|
||||
layer = gimp_layer_new_from_tiles (tiles,
|
||||
new_image,
|
||||
GIMP_RGBA_IMAGE,
|
||||
new_name,
|
||||
1.0,
|
||||
GIMP_NORMAL_MODE);
|
||||
gimp_image_add_layer (new_image, layer, NULL, 0, FALSE);
|
||||
gimp_create_display (gimp, new_image, GIMP_UNIT_PIXEL, 1.0);
|
||||
|
||||
/* Cleanup */
|
||||
g_object_unref (new_image);
|
||||
g_free (new_name);
|
||||
tile_manager_unref (tiles);
|
||||
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;
|
||||
|
||||
for (list = GTK_MENU_SHELL (menu)->children; list; list = g_list_next (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;
|
||||
@ -181,13 +415,16 @@ debug_dump_menus_recurse_menu (GtkWidget *menu,
|
||||
g_free (format_str);
|
||||
g_free (help_page);
|
||||
|
||||
if (GTK_MENU_ITEM (menu_item)->submenu)
|
||||
debug_dump_menus_recurse_menu (GTK_MENU_ITEM (menu_item)->submenu,
|
||||
depth + 1, full_path);
|
||||
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
|
||||
@ -208,4 +445,13 @@ debug_print_qdata_foreach (GQuark key_id,
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
#endif /* ENABLE_DEBUG_MENU */
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DEBUG_COMMANDS_H__
|
||||
@ -27,14 +26,20 @@
|
||||
|
||||
#ifdef ENABLE_DEBUG_MENU
|
||||
|
||||
void debug_mem_profile_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void debug_dump_menus_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void debug_dump_managers_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void debug_dump_attached_data_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void debug_mem_profile_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void debug_dump_menus_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void debug_dump_managers_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void debug_dump_attached_data_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void debug_benchmark_projection_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void debug_show_image_graph_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
|
||||
#endif /* ENABLE_DEBUG_MENU */
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -24,176 +23,205 @@
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.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"
|
||||
|
||||
|
||||
static gboolean dialogs_actions_toolbox_exists (Gimp *gimp);
|
||||
|
||||
|
||||
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_STOCK_TOOL_OPTIONS,
|
||||
N_("Tool _Options"), NULL,
|
||||
N_("Open the tool options dialog"),
|
||||
NC_("dialogs-action", "Tool _Options"), NULL,
|
||||
NC_("dialogs-action", "Open the tool options dialog"),
|
||||
"gimp-tool-options",
|
||||
GIMP_HELP_TOOL_OPTIONS_DIALOG },
|
||||
|
||||
{ "dialogs-device-status", GIMP_STOCK_DEVICE_STATUS,
|
||||
N_("_Device Status"), NULL,
|
||||
N_("Open the device status dialog"),
|
||||
NC_("dialogs-action", "_Device Status"), NULL,
|
||||
NC_("dialogs-action", "Open the device status dialog"),
|
||||
"gimp-device-status",
|
||||
GIMP_HELP_DEVICE_STATUS_DIALOG },
|
||||
|
||||
{ "dialogs-layers", GIMP_STOCK_LAYERS,
|
||||
N_("_Layers"), "<control>L",
|
||||
N_("Open the layers dialog"),
|
||||
NC_("dialogs-action", "_Layers"), "<primary>L",
|
||||
NC_("dialogs-action", "Open the layers dialog"),
|
||||
"gimp-layer-list",
|
||||
GIMP_HELP_LAYER_DIALOG },
|
||||
|
||||
{ "dialogs-channels", GIMP_STOCK_CHANNELS,
|
||||
N_("_Channels"), NULL,
|
||||
N_("Open the channels dialog"),
|
||||
NC_("dialogs-action", "_Channels"), NULL,
|
||||
NC_("dialogs-action", "Open the channels dialog"),
|
||||
"gimp-channel-list",
|
||||
GIMP_HELP_CHANNEL_DIALOG },
|
||||
|
||||
{ "dialogs-vectors", GIMP_STOCK_PATHS,
|
||||
N_("_Paths"), NULL,
|
||||
N_("Open the paths dialog"),
|
||||
NC_("dialogs-action", "_Paths"), NULL,
|
||||
NC_("dialogs-action", "Open the paths dialog"),
|
||||
"gimp-vectors-list",
|
||||
GIMP_HELP_PATH_DIALOG },
|
||||
|
||||
{ "dialogs-indexed-palette", GIMP_STOCK_COLORMAP,
|
||||
N_("Color_map"), NULL,
|
||||
N_("Open the colormap dialog"),
|
||||
NC_("dialogs-action", "Color_map"), NULL,
|
||||
NC_("dialogs-action", "Open the colormap dialog"),
|
||||
"gimp-indexed-palette",
|
||||
GIMP_HELP_INDEXED_PALETTE_DIALOG },
|
||||
|
||||
{ "dialogs-histogram", GIMP_STOCK_HISTOGRAM,
|
||||
N_("Histogra_m"), NULL,
|
||||
N_("Open the histogram dialog"),
|
||||
NC_("dialogs-action", "Histogra_m"), NULL,
|
||||
NC_("dialogs-action", "Open the histogram dialog"),
|
||||
"gimp-histogram-editor",
|
||||
GIMP_HELP_HISTOGRAM_DIALOG },
|
||||
|
||||
{ "dialogs-selection-editor", GIMP_STOCK_TOOL_RECT_SELECT,
|
||||
N_("_Selection Editor"), NULL,
|
||||
N_("Open the selection editor"),
|
||||
NC_("dialogs-action", "_Selection Editor"), NULL,
|
||||
NC_("dialogs-action", "Open the selection editor"),
|
||||
"gimp-selection-editor",
|
||||
GIMP_HELP_SELECTION_DIALOG },
|
||||
|
||||
{ "dialogs-navigation", GIMP_STOCK_NAVIGATION,
|
||||
N_("Na_vigation"), NULL,
|
||||
N_("Open the display navigation dialog"),
|
||||
NC_("dialogs-action", "Na_vigation"), NULL,
|
||||
NC_("dialogs-action", "Open the display navigation dialog"),
|
||||
"gimp-navigation-view",
|
||||
GIMP_HELP_NAVIGATION_DIALOG },
|
||||
|
||||
{ "dialogs-undo-history", GIMP_STOCK_UNDO_HISTORY,
|
||||
N_("Undo _History"), NULL,
|
||||
N_("Open the undo history dialog"),
|
||||
NC_("dialogs-action", "Undo _History"), NULL,
|
||||
NC_("dialogs-action", "Open the undo history dialog"),
|
||||
"gimp-undo-history",
|
||||
GIMP_HELP_UNDO_DIALOG },
|
||||
|
||||
{ "dialogs-cursor", GIMP_STOCK_CURSOR,
|
||||
N_("Pointer"), NULL,
|
||||
N_("Open the pointer information dialog"),
|
||||
NC_("dialogs-action", "Pointer"), NULL,
|
||||
NC_("dialogs-action", "Open the pointer information dialog"),
|
||||
"gimp-cursor-view",
|
||||
GIMP_HELP_POINTER_INFO_DIALOG },
|
||||
|
||||
{ "dialogs-sample-points", GIMP_STOCK_SAMPLE_POINT,
|
||||
N_("_Sample Points"), NULL,
|
||||
N_("Open the sample points dialog"),
|
||||
NC_("dialogs-action", "_Sample Points"), NULL,
|
||||
NC_("dialogs-action", "Open the sample points dialog"),
|
||||
"gimp-sample-point-editor",
|
||||
GIMP_HELP_SAMPLE_POINT_DIALOG },
|
||||
|
||||
{ "dialogs-colors", GIMP_STOCK_DEFAULT_COLORS,
|
||||
N_("Colo_rs"), NULL,
|
||||
N_("Open the FG/BG color dialog"),
|
||||
NC_("dialogs-action", "Colo_rs"), NULL,
|
||||
NC_("dialogs-action", "Open the FG/BG color dialog"),
|
||||
"gimp-color-editor",
|
||||
GIMP_HELP_COLOR_DIALOG },
|
||||
|
||||
{ "dialogs-brushes", GIMP_STOCK_BRUSH,
|
||||
N_("_Brushes"), "<control><shift>B",
|
||||
N_("Open the brushes dialog"),
|
||||
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_STOCK_BRUSH,
|
||||
N_("Brush Editor"), NULL,
|
||||
N_("Open the brush editor"),
|
||||
NC_("dialogs-action", "Brush Editor"), NULL,
|
||||
NC_("dialogs-action", "Open the brush editor"),
|
||||
"gimp-brush-editor",
|
||||
GIMP_HELP_BRUSH_EDIT },
|
||||
|
||||
{ "dialogs-dynamics", GIMP_STOCK_DYNAMICS,
|
||||
NC_("dialogs-action", "Paint Dynamics"), NULL,
|
||||
NC_("dialogs-action", "Open paint dynamics dialog"),
|
||||
"gimp-dynamics-list",
|
||||
GIMP_HELP_DYNAMICS_DIALOG },
|
||||
|
||||
{ "dialogs-dynamics-editor", GIMP_STOCK_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-patterns", GIMP_STOCK_PATTERN,
|
||||
N_("P_atterns"), "<control><shift>P",
|
||||
N_("Open the patterns dialog"),
|
||||
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_STOCK_GRADIENT,
|
||||
N_("_Gradients"), "<control>G",
|
||||
N_("Open the gradients dialog"),
|
||||
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_STOCK_GRADIENT,
|
||||
N_("Gradient Editor"), NULL,
|
||||
N_("Open the gradient editor"),
|
||||
NC_("dialogs-action", "Gradient Editor"), NULL,
|
||||
NC_("dialogs-action", "Open the gradient editor"),
|
||||
"gimp-gradient-editor",
|
||||
GIMP_HELP_GRADIENT_EDIT },
|
||||
|
||||
{ "dialogs-palettes", GIMP_STOCK_PALETTE,
|
||||
N_("Pal_ettes"), NULL,
|
||||
N_("Open the palettes dialog"),
|
||||
NC_("dialogs-action", "Pal_ettes"), NULL,
|
||||
NC_("dialogs-action", "Open the palettes dialog"),
|
||||
"gimp-palette-list|gimp-palette-grid",
|
||||
GIMP_HELP_PALETTE_DIALOG },
|
||||
|
||||
{ "dialogs-palette-editor", GIMP_STOCK_PALETTE,
|
||||
N_("Palette Editor"), NULL,
|
||||
N_("Open the palette editor"),
|
||||
NC_("dialogs-action", "Palette Editor"), NULL,
|
||||
NC_("dialogs-action", "Open the palette editor"),
|
||||
"gimp-palette-editor",
|
||||
GIMP_HELP_PALETTE_EDIT },
|
||||
|
||||
{ "dialogs-tool-presets", GIMP_STOCK_TOOL_PRESET,
|
||||
NC_("dialogs-action", "Tool presets"), NULL,
|
||||
NC_("dialogs-action", "Open tool presets dialog"),
|
||||
"gimp-tool-preset-list",
|
||||
GIMP_HELP_TOOL_PRESET_DIALOG },
|
||||
|
||||
{ "dialogs-fonts", GIMP_STOCK_FONT,
|
||||
N_("_Fonts"), NULL,
|
||||
N_("Open the fonts dialog"),
|
||||
NC_("dialogs-action", "_Fonts"), NULL,
|
||||
NC_("dialogs-action", "Open the fonts dialog"),
|
||||
"gimp-font-list|gimp-font-grid",
|
||||
GIMP_HELP_FONT_DIALOG },
|
||||
|
||||
{ "dialogs-buffers", GIMP_STOCK_BUFFER,
|
||||
N_("B_uffers"), "",
|
||||
N_("Open the named buffers dialog"),
|
||||
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_STOCK_IMAGES,
|
||||
N_("_Images"), NULL,
|
||||
N_("Open the images dialog"),
|
||||
NC_("dialogs-action", "_Images"), NULL,
|
||||
NC_("dialogs-action", "Open the images dialog"),
|
||||
"gimp-image-list|gimp-image-grid",
|
||||
GIMP_HELP_IMAGE_DIALOG },
|
||||
|
||||
{ "dialogs-document-history", "document-open-recent",
|
||||
N_("Document Histor_y"), "",
|
||||
N_("Open the document history dialog"),
|
||||
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_STOCK_TEMPLATE,
|
||||
N_("_Templates"), "",
|
||||
N_("Open the image templates dialog"),
|
||||
NC_("dialogs-action", "_Templates"), "",
|
||||
NC_("dialogs-action", "Open the image templates dialog"),
|
||||
"gimp-template-list|gimp-template-grid",
|
||||
GIMP_HELP_TEMPLATE_DIALOG },
|
||||
|
||||
{ "dialogs-tools", GIMP_STOCK_TOOLS,
|
||||
N_("T_ools"), NULL,
|
||||
N_("Open the tools dialog"),
|
||||
"gimp-tool-list|gimp-tool-grid",
|
||||
GIMP_HELP_TOOLS_DIALOG },
|
||||
|
||||
{ "dialogs-error-console", GIMP_STOCK_WARNING,
|
||||
N_("Error Co_nsole"), NULL,
|
||||
N_("Open the error console"),
|
||||
NC_("dialogs-action", "Error Co_nsole"), NULL,
|
||||
NC_("dialogs-action", "Open the error console"),
|
||||
"gimp-error-console",
|
||||
GIMP_HELP_ERRORS_DIALOG }
|
||||
};
|
||||
@ -203,46 +231,85 @@ gint n_dialogs_dockable_actions = G_N_ELEMENTS (dialogs_dockable_actions);
|
||||
static const GimpStringActionEntry dialogs_toplevel_actions[] =
|
||||
{
|
||||
{ "dialogs-preferences", GTK_STOCK_PREFERENCES,
|
||||
N_("_Preferences"), NULL,
|
||||
N_("Open the preferences dialog"),
|
||||
NC_("dialogs-action", "_Preferences"), NULL,
|
||||
NC_("dialogs-action", "Open the preferences dialog"),
|
||||
"gimp-preferences-dialog",
|
||||
GIMP_HELP_PREFS_DIALOG },
|
||||
|
||||
{ "dialogs-input-devices", GIMP_STOCK_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_STOCK_CHAR_PICKER,
|
||||
N_("_Keyboard Shortcuts"), NULL,
|
||||
N_("Open the keyboard shortcuts editor"),
|
||||
NC_("dialogs-action", "_Keyboard Shortcuts"), NULL,
|
||||
NC_("dialogs-action", "Open the keyboard shortcuts editor"),
|
||||
"gimp-keyboard-shortcuts-dialog",
|
||||
GIMP_HELP_KEYBOARD_SHORTCUTS },
|
||||
|
||||
{ "dialogs-module-dialog", GTK_STOCK_EXECUTE,
|
||||
N_("_Modules"), NULL,
|
||||
N_("Open the module manager dialog"),
|
||||
NC_("dialogs-action", "_Modules"), NULL,
|
||||
NC_("dialogs-action", "Open the module manager dialog"),
|
||||
"gimp-module-dialog",
|
||||
GIMP_HELP_MODULE_DIALOG },
|
||||
|
||||
{ "dialogs-tips", GIMP_STOCK_INFO,
|
||||
N_("_Tip of the Day"), NULL,
|
||||
N_("Show some helpful tips on using GIMP"),
|
||||
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", GTK_STOCK_ABOUT,
|
||||
N_("_About"), NULL,
|
||||
N_("About GIMP"),
|
||||
NC_("dialogs-action", "_About"), NULL,
|
||||
NC_("dialogs-action", "About GIMP"),
|
||||
"gimp-about-dialog",
|
||||
GIMP_HELP_ABOUT_DIALOG }
|
||||
};
|
||||
|
||||
|
||||
static 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,
|
||||
gimp_action_group_add_string_actions (group, "dialogs-action",
|
||||
dialogs_dockable_actions,
|
||||
G_N_ELEMENTS (dialogs_dockable_actions),
|
||||
G_CALLBACK (dialogs_create_dockable_cmd_callback));
|
||||
|
||||
gimp_action_group_add_string_actions (group,
|
||||
gimp_action_group_add_string_actions (group, "dialogs-action",
|
||||
dialogs_toplevel_actions,
|
||||
G_N_ELEMENTS (dialogs_toplevel_actions),
|
||||
G_CALLBACK (dialogs_create_toplevel_cmd_callback));
|
||||
@ -252,4 +319,21 @@ 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 = _("Toolbox");
|
||||
toolbox_tooltip = _("Raise the toolbox");
|
||||
}
|
||||
else
|
||||
{
|
||||
toolbox_label = _("New Toolbox");
|
||||
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,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DIALOGS_ACTIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -24,9 +23,10 @@
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "dialogs/dialogs.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpwindowstrategy.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "dialogs-commands.h"
|
||||
@ -43,8 +43,9 @@ dialogs_create_toplevel_cmd_callback (GtkAction *action,
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
if (value)
|
||||
gimp_dialog_factory_dialog_new (global_dialog_factory,
|
||||
gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (widget),
|
||||
NULL /*ui_manager*/,
|
||||
value, -1, TRUE);
|
||||
}
|
||||
|
||||
@ -53,11 +54,15 @@ dialogs_create_dockable_cmd_callback (GtkAction *action,
|
||||
const gchar *value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GtkWidget *widget;
|
||||
return_if_no_gimp (gimp, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
if (value)
|
||||
gimp_dialog_factory_dialog_raise (global_dock_factory,
|
||||
gtk_widget_get_screen (widget),
|
||||
value, -1);
|
||||
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),
|
||||
value);
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DIALOGS_COMMANDS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -25,9 +24,12 @@
|
||||
#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"
|
||||
@ -40,17 +42,17 @@
|
||||
static const GimpActionEntry dock_actions[] =
|
||||
{
|
||||
{ "dock-move-to-screen-menu", GIMP_STOCK_MOVE_TO_SCREEN,
|
||||
N_("M_ove to Screen"), NULL, NULL, NULL,
|
||||
NC_("dock-action", "M_ove to Screen"), NULL, NULL, NULL,
|
||||
GIMP_HELP_DOCK_CHANGE_SCREEN },
|
||||
|
||||
{ "dock-close", GTK_STOCK_CLOSE,
|
||||
N_("Close Dock"), NULL, NULL,
|
||||
NC_("dock-action", "Close Dock"), NULL, NULL,
|
||||
G_CALLBACK (window_close_cmd_callback),
|
||||
GIMP_HELP_DOCK_CLOSE },
|
||||
|
||||
{ "dock-open-display", NULL,
|
||||
N_("_Open Display..."), NULL,
|
||||
N_("Connect to another display"),
|
||||
NC_("dock-action", "_Open Display..."), NULL,
|
||||
NC_("dock-action", "Connect to another display"),
|
||||
G_CALLBACK (window_open_display_cmd_callback),
|
||||
NULL }
|
||||
};
|
||||
@ -58,13 +60,13 @@ static const GimpActionEntry dock_actions[] =
|
||||
static const GimpToggleActionEntry dock_toggle_actions[] =
|
||||
{
|
||||
{ "dock-show-image-menu", NULL,
|
||||
N_("_Show Image Selection"), NULL, NULL,
|
||||
NC_("dock-action", "_Show Image Selection"), NULL, NULL,
|
||||
G_CALLBACK (dock_toggle_image_menu_cmd_callback),
|
||||
TRUE,
|
||||
GIMP_HELP_DOCK_IMAGE_MENU },
|
||||
|
||||
{ "dock-auto-follow-active", NULL,
|
||||
N_("Auto _Follow Active Image"), NULL, NULL,
|
||||
NC_("dock-action", "Auto _Follow Active Image"), NULL, NULL,
|
||||
G_CALLBACK (dock_toggle_auto_cmd_callback),
|
||||
TRUE,
|
||||
GIMP_HELP_DOCK_AUTO_BUTTON }
|
||||
@ -74,11 +76,11 @@ static const GimpToggleActionEntry dock_toggle_actions[] =
|
||||
void
|
||||
dock_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group,
|
||||
gimp_action_group_add_actions (group, "dock-action",
|
||||
dock_actions,
|
||||
G_N_ELEMENTS (dock_actions));
|
||||
|
||||
gimp_action_group_add_toggle_actions (group,
|
||||
gimp_action_group_add_toggle_actions (group, "dock-action",
|
||||
dock_toggle_actions,
|
||||
G_N_ELEMENTS (dock_toggle_actions));
|
||||
|
||||
@ -100,30 +102,36 @@ dock_actions_update (GimpActionGroup *group,
|
||||
#define SET_VISIBLE(action,active) \
|
||||
gimp_action_group_set_action_visible (group, action, (active) != 0)
|
||||
|
||||
if (GIMP_IS_MENU_DOCK (toplevel))
|
||||
if (GIMP_IS_DOCK_WINDOW (toplevel))
|
||||
{
|
||||
GimpMenuDock *menu_dock = GIMP_MENU_DOCK (toplevel);
|
||||
GimpDockWindow *dock_window = GIMP_DOCK_WINDOW (toplevel);
|
||||
gboolean show_image_menu = ! gimp_dock_window_has_toolbox (dock_window);
|
||||
|
||||
SET_VISIBLE ("dock-show-image-menu", TRUE);
|
||||
SET_VISIBLE ("dock-auto-follow-active", TRUE);
|
||||
if (show_image_menu)
|
||||
{
|
||||
SET_VISIBLE ("dock-show-image-menu", TRUE);
|
||||
SET_VISIBLE ("dock-auto-follow-active", TRUE);
|
||||
|
||||
SET_ACTIVE ("dock-show-image-menu", menu_dock->show_image_menu);
|
||||
SET_ACTIVE ("dock-auto-follow-active", menu_dock->auto_follow_active);
|
||||
}
|
||||
else
|
||||
{
|
||||
SET_VISIBLE ("dock-show-image-menu", FALSE);
|
||||
SET_VISIBLE ("dock-auto-follow-active", FALSE);
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
if (GIMP_IS_DOCK (toplevel))
|
||||
{
|
||||
/* 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,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DOCK_ACTIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -24,44 +23,58 @@
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "widgets/gimpmenudock.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 (GtkAction *action,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
gboolean active;
|
||||
GtkWidget *widget = NULL;
|
||||
GimpDockWindow *dock_window = NULL;
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
if (! GTK_WIDGET_TOPLEVEL (widget))
|
||||
widget = gtk_widget_get_toplevel (widget);
|
||||
dock_window = dock_commands_get_dock_window_from_widget (widget);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
if (GIMP_IS_MENU_DOCK (widget))
|
||||
gimp_menu_dock_set_show_image_menu (GIMP_MENU_DOCK (widget), active);
|
||||
if (dock_window)
|
||||
{
|
||||
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
gimp_dock_window_set_show_image_menu (dock_window, active);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dock_toggle_auto_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
gboolean active;
|
||||
GtkWidget *widget = NULL;
|
||||
GimpDockWindow *dock_window = NULL;
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
if (! GTK_WIDGET_TOPLEVEL (widget))
|
||||
widget = gtk_widget_get_toplevel (widget);
|
||||
dock_window = dock_commands_get_dock_window_from_widget (widget);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
if (GIMP_IS_MENU_DOCK (widget))
|
||||
gimp_menu_dock_set_auto_follow_active (GIMP_MENU_DOCK (widget), active);
|
||||
if (dock_window)
|
||||
{
|
||||
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
gimp_dock_window_set_auto_follow_active (dock_window, active);
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DOCK_COMMANDS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -46,21 +45,24 @@
|
||||
static const GimpActionEntry dockable_actions[] =
|
||||
{
|
||||
{ "dockable-popup", NULL,
|
||||
N_("Dialogs Menu"), NULL, NULL, NULL,
|
||||
NC_("dockable-action", "Dialogs Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_DOCK },
|
||||
|
||||
{ "dockable-menu", GTK_STOCK_MISSING_IMAGE, "" },
|
||||
{ "dockable-add-tab-menu", NULL, N_("_Add Tab") },
|
||||
{ "dockable-preview-size-menu", NULL, N_("_Preview Size") },
|
||||
{ "dockable-tab-style-menu", NULL, N_("_Tab Style") },
|
||||
{ "dockable-menu", GTK_STOCK_MISSING_IMAGE, "" },
|
||||
{ "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", GTK_STOCK_CLOSE,
|
||||
N_("_Close Tab"), "", NULL,
|
||||
NC_("dockable-action", "_Close Tab"), "", NULL,
|
||||
G_CALLBACK (dockable_close_tab_cmd_callback),
|
||||
GIMP_HELP_DOCK_TAB_CLOSE },
|
||||
|
||||
{ "dockable-detach-tab", GIMP_STOCK_DETACH,
|
||||
N_("_Detach Tab"), "", NULL,
|
||||
NC_("dockable-action", "_Detach Tab"), "", NULL,
|
||||
G_CALLBACK (dockable_detach_tab_cmd_callback),
|
||||
GIMP_HELP_DOCK_TAB_DETACH }
|
||||
};
|
||||
@ -78,24 +80,40 @@ static const GimpActionEntry dockable_actions[] =
|
||||
|
||||
static const GimpRadioActionEntry dockable_view_size_actions[] =
|
||||
{
|
||||
VIEW_SIZE ("tiny", N_("_Tiny"), GIMP_VIEW_SIZE_TINY),
|
||||
VIEW_SIZE ("extra-small", N_("E_xtra Small"), GIMP_VIEW_SIZE_EXTRA_SMALL),
|
||||
VIEW_SIZE ("small", N_("_Small"), GIMP_VIEW_SIZE_SMALL),
|
||||
VIEW_SIZE ("medium", N_("_Medium"), GIMP_VIEW_SIZE_MEDIUM),
|
||||
VIEW_SIZE ("large", N_("_Large"), GIMP_VIEW_SIZE_LARGE),
|
||||
VIEW_SIZE ("extra-large", N_("Ex_tra Large"), GIMP_VIEW_SIZE_EXTRA_LARGE),
|
||||
VIEW_SIZE ("huge", N_("_Huge"), GIMP_VIEW_SIZE_HUGE),
|
||||
VIEW_SIZE ("enormous", N_("_Enormous"), GIMP_VIEW_SIZE_ENORMOUS),
|
||||
VIEW_SIZE ("gigantic", N_("_Gigantic"), GIMP_VIEW_SIZE_GIGANTIC)
|
||||
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", N_("_Icon"), GIMP_TAB_STYLE_ICON),
|
||||
TAB_STYLE ("preview", N_("Current _Status"), GIMP_TAB_STYLE_PREVIEW),
|
||||
TAB_STYLE ("name", N_("_Text"), GIMP_TAB_STYLE_NAME),
|
||||
TAB_STYLE ("icon-name", N_("I_con & Text"), GIMP_TAB_STYLE_ICON_NAME),
|
||||
TAB_STYLE ("preview-name", N_("St_atus & Text"), GIMP_TAB_STYLE_PREVIEW_NAME)
|
||||
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
|
||||
@ -105,14 +123,15 @@ static const GimpRadioActionEntry dockable_tab_style_actions[] =
|
||||
static const GimpToggleActionEntry dockable_toggle_actions[] =
|
||||
{
|
||||
{ "dockable-lock-tab", NULL,
|
||||
N_("Loc_k Tab to Dock"), NULL,
|
||||
N_("Protect this tab from being dragged with the mouse pointer"),
|
||||
NC_("dockable-action", "Loc_k Tab to Dock"), NULL,
|
||||
NC_("dockable-action",
|
||||
"Protect this tab from being dragged with the mouse pointer"),
|
||||
G_CALLBACK (dockable_lock_tab_cmd_callback),
|
||||
FALSE,
|
||||
GIMP_HELP_DOCK_TAB_LOCK },
|
||||
|
||||
{ "dockable-show-button-bar", NULL,
|
||||
N_("Show _Button Bar"), NULL, NULL,
|
||||
NC_("dockable-action", "Show _Button Bar"), NULL, NULL,
|
||||
G_CALLBACK (dockable_show_button_bar_cmd_callback),
|
||||
TRUE,
|
||||
GIMP_HELP_DOCK_SHOW_BUTTON_BAR }
|
||||
@ -121,12 +140,12 @@ static const GimpToggleActionEntry dockable_toggle_actions[] =
|
||||
static const GimpRadioActionEntry dockable_view_type_actions[] =
|
||||
{
|
||||
{ "dockable-view-type-list", NULL,
|
||||
N_("View as _List"), NULL, NULL,
|
||||
NC_("dockable-action", "View as _List"), NULL, NULL,
|
||||
GIMP_VIEW_TYPE_LIST,
|
||||
GIMP_HELP_DOCK_VIEW_AS_LIST },
|
||||
|
||||
{ "dockable-view-type-grid", NULL,
|
||||
N_("View as _Grid"), NULL, NULL,
|
||||
NC_("dockable-action", "View as _Grid"), NULL, NULL,
|
||||
GIMP_VIEW_TYPE_GRID,
|
||||
GIMP_HELP_DOCK_VIEW_AS_GRID }
|
||||
};
|
||||
@ -135,34 +154,34 @@ static const GimpRadioActionEntry dockable_view_type_actions[] =
|
||||
void
|
||||
dockable_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group,
|
||||
gimp_action_group_add_actions (group, "dockable-action",
|
||||
dockable_actions,
|
||||
G_N_ELEMENTS (dockable_actions));
|
||||
|
||||
gimp_action_group_add_toggle_actions (group,
|
||||
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,
|
||||
gimp_action_group_add_string_actions (group, "dialogs-action",
|
||||
dialogs_dockable_actions,
|
||||
n_dialogs_dockable_actions,
|
||||
G_CALLBACK (dockable_add_tab_cmd_callback));
|
||||
|
||||
gimp_action_group_add_radio_actions (group,
|
||||
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,
|
||||
G_CALLBACK (dockable_view_size_cmd_callback));
|
||||
|
||||
gimp_action_group_add_radio_actions (group,
|
||||
gimp_action_group_add_radio_actions (group, "tab-style",
|
||||
dockable_tab_style_actions,
|
||||
G_N_ELEMENTS (dockable_tab_style_actions),
|
||||
NULL,
|
||||
GIMP_TAB_STYLE_PREVIEW,
|
||||
GIMP_TAB_STYLE_AUTOMATIC,
|
||||
G_CALLBACK (dockable_tab_style_cmd_callback));
|
||||
|
||||
gimp_action_group_add_radio_actions (group,
|
||||
gimp_action_group_add_radio_actions (group, "dockable-action",
|
||||
dockable_view_type_actions,
|
||||
G_N_ELEMENTS (dockable_view_type_actions),
|
||||
NULL,
|
||||
@ -177,6 +196,7 @@ dockable_actions_update (GimpActionGroup *group,
|
||||
GimpDockable *dockable;
|
||||
GimpDockbook *dockbook;
|
||||
GimpDocked *docked;
|
||||
GimpDock *dock;
|
||||
GimpDialogFactoryEntry *entry;
|
||||
GimpContainerView *view;
|
||||
GimpViewType view_type = -1;
|
||||
@ -187,6 +207,7 @@ dockable_actions_update (GimpActionGroup *group,
|
||||
GimpTabStyle tab_style = -1;
|
||||
gint n_pages = 0;
|
||||
gint n_books = 0;
|
||||
GimpDockedInterface *docked_iface = NULL;
|
||||
|
||||
if (GIMP_IS_DOCKBOOK (data))
|
||||
{
|
||||
@ -202,7 +223,7 @@ dockable_actions_update (GimpActionGroup *group,
|
||||
else if (GIMP_IS_DOCKABLE (data))
|
||||
{
|
||||
dockable = GIMP_DOCKABLE (data);
|
||||
dockbook = dockable->dockbook;
|
||||
dockbook = gimp_dockable_get_dockbook (dockable);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -210,6 +231,8 @@ dockable_actions_update (GimpActionGroup *group,
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
@ -228,12 +251,12 @@ dockable_actions_update (GimpActionGroup *group,
|
||||
if (substring)
|
||||
{
|
||||
memcpy (substring, "list", 4);
|
||||
if (gimp_dialog_factory_find_entry (dockbook->dock->dialog_factory,
|
||||
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 (dockbook->dock->dialog_factory,
|
||||
if (gimp_dialog_factory_find_entry (gimp_dock_get_dialog_factory (dock),
|
||||
identifier))
|
||||
grid_view_available = TRUE;
|
||||
}
|
||||
@ -246,10 +269,10 @@ dockable_actions_update (GimpActionGroup *group,
|
||||
if (view)
|
||||
view_size = gimp_container_view_get_view_size (view, NULL);
|
||||
|
||||
tab_style = dockable->tab_style;
|
||||
tab_style = gimp_dockable_get_tab_style (dockable);
|
||||
|
||||
n_pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (dockbook));
|
||||
n_books = g_list_length (dockbook->dock->dockbooks);
|
||||
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)
|
||||
@ -308,28 +331,24 @@ dockable_actions_update (GimpActionGroup *group,
|
||||
}
|
||||
}
|
||||
|
||||
SET_VISIBLE ("dockable-tab-style-menu", n_pages > 1);
|
||||
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);
|
||||
|
||||
if (n_pages > 1)
|
||||
{
|
||||
GimpDockedInterface *docked_iface = GIMP_DOCKED_GET_INTERFACE (docked);
|
||||
|
||||
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);
|
||||
|
||||
SET_SENSITIVE ("dockable-tab-style-preview",
|
||||
docked_iface->get_preview);
|
||||
SET_SENSITIVE ("dockable-tab-style-preview-name",
|
||||
docked_iface->get_preview);
|
||||
}
|
||||
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);
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DOCKABLE_ACTIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -35,8 +34,6 @@
|
||||
#include "widgets/gimpdocked.h"
|
||||
#include "widgets/gimpsessioninfo.h"
|
||||
|
||||
#include "dialogs/dialogs.h"
|
||||
|
||||
#include "dockable-commands.h"
|
||||
|
||||
|
||||
@ -52,33 +49,9 @@ dockable_add_tab_cmd_callback (GtkAction *action,
|
||||
{
|
||||
GimpDockbook *dockbook = GIMP_DOCKBOOK (data);
|
||||
|
||||
if (value)
|
||||
{
|
||||
GtkWidget *dockable;
|
||||
gchar *identifier;
|
||||
gchar *p;
|
||||
|
||||
identifier = g_strdup (value);
|
||||
|
||||
p = strchr (identifier, '|');
|
||||
|
||||
if (p)
|
||||
*p = '\0';
|
||||
|
||||
dockable =
|
||||
gimp_dialog_factory_dockable_new (dockbook->dock->dialog_factory,
|
||||
dockbook->dock,
|
||||
identifier, -1);
|
||||
|
||||
g_free (identifier);
|
||||
|
||||
/* Maybe gimp_dialog_factory_dockable_new() returned an already
|
||||
* existing singleton dockable, so check if it already is
|
||||
* attached to a dockbook.
|
||||
*/
|
||||
if (dockable && ! GIMP_DOCKABLE (dockable)->dockbook)
|
||||
gimp_dockbook_add (dockbook, GIMP_DOCKABLE (dockable), -1);
|
||||
}
|
||||
gimp_dockbook_add_from_dialog_factory (dockbook,
|
||||
value /*identifiers*/,
|
||||
-1);
|
||||
}
|
||||
|
||||
void
|
||||
@ -89,7 +62,12 @@ dockable_close_tab_cmd_callback (GtkAction *action,
|
||||
GimpDockable *dockable = dockable_get_current (dockbook);
|
||||
|
||||
if (dockable)
|
||||
gimp_dockbook_remove (dockbook, dockable);
|
||||
{
|
||||
g_object_ref (dockable);
|
||||
gimp_dockbook_remove (dockbook, dockable);
|
||||
gtk_widget_destroy (GTK_WIDGET (dockable));
|
||||
g_object_unref (dockable);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -152,20 +130,27 @@ dockable_toggle_view_cmd_callback (GtkAction *action,
|
||||
substring = strstr (identifier, "grid");
|
||||
|
||||
if (substring && view_type == GIMP_VIEW_TYPE_GRID)
|
||||
return;
|
||||
{
|
||||
g_free (identifier);
|
||||
return;
|
||||
}
|
||||
|
||||
if (! substring)
|
||||
{
|
||||
substring = strstr (identifier, "list");
|
||||
|
||||
if (substring && view_type == GIMP_VIEW_TYPE_LIST)
|
||||
return;
|
||||
{
|
||||
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)
|
||||
@ -178,12 +163,11 @@ dockable_toggle_view_cmd_callback (GtkAction *action,
|
||||
if (old_view)
|
||||
view_size = gimp_container_view_get_view_size (old_view, NULL);
|
||||
|
||||
|
||||
new_dockable =
|
||||
gimp_dialog_factory_dockable_new (dockbook->dock->dialog_factory,
|
||||
dockbook->dock,
|
||||
identifier,
|
||||
view_size);
|
||||
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)
|
||||
{
|
||||
@ -199,21 +183,24 @@ dockable_toggle_view_cmd_callback (GtkAction *action,
|
||||
|
||||
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 (new_dockable && ! GIMP_DOCKABLE (new_dockable)->dockbook)
|
||||
{
|
||||
gimp_dockbook_add (dockbook, GIMP_DOCKABLE (new_dockable),
|
||||
page_num);
|
||||
/* 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);
|
||||
|
||||
gimp_dockbook_remove (dockbook, dockable);
|
||||
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);
|
||||
gtk_notebook_set_current_page (GTK_NOTEBOOK (dockbook),
|
||||
page_num);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -262,7 +249,7 @@ dockable_tab_style_cmd_callback (GtkAction *action,
|
||||
tab_style = (GimpTabStyle)
|
||||
gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
|
||||
|
||||
if (dockable && dockable->tab_style != tab_style)
|
||||
if (dockable && gimp_dockable_get_tab_style (dockable) != tab_style)
|
||||
{
|
||||
GtkWidget *tab_widget;
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DOCKABLE_COMMANDS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -39,60 +38,61 @@
|
||||
static const GimpActionEntry documents_actions[] =
|
||||
{
|
||||
{ "documents-popup", "document-open-recent",
|
||||
N_("Documents Menu"), NULL, NULL, NULL,
|
||||
NC_("documents-action", "Documents Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_DOCUMENT_DIALOG },
|
||||
|
||||
{ "documents-open", GTK_STOCK_OPEN,
|
||||
N_("_Open Image"), "",
|
||||
N_("Open the selected entry"),
|
||||
NC_("documents-action", "_Open Image"), "",
|
||||
NC_("documents-action", "Open the selected entry"),
|
||||
G_CALLBACK (documents_open_cmd_callback),
|
||||
GIMP_HELP_DOCUMENT_OPEN },
|
||||
|
||||
{ "documents-raise-or-open", NULL,
|
||||
N_("_Raise or Open Image"), "",
|
||||
N_("Raise window if already open"),
|
||||
NC_("documents-action", "_Raise or Open Image"), "",
|
||||
NC_("documents-action", "Raise window if already open"),
|
||||
G_CALLBACK (documents_raise_or_open_cmd_callback),
|
||||
GIMP_HELP_DOCUMENT_OPEN },
|
||||
|
||||
{ "documents-file-open-dialog", NULL,
|
||||
N_("File Open _Dialog"), "",
|
||||
N_("Open image dialog"),
|
||||
NC_("documents-action", "File Open _Dialog"), "",
|
||||
NC_("documents-action", "Open image dialog"),
|
||||
G_CALLBACK (documents_file_open_dialog_cmd_callback),
|
||||
GIMP_HELP_DOCUMENT_OPEN },
|
||||
|
||||
{ "documents-copy-location", GTK_STOCK_COPY,
|
||||
N_("Copy Image _Location"), "",
|
||||
N_("Copy image location to clipboard"),
|
||||
NC_("documents-action", "Copy Image _Location"), "",
|
||||
NC_("documents-action", "Copy image location to clipboard"),
|
||||
G_CALLBACK (documents_copy_location_cmd_callback),
|
||||
GIMP_HELP_DOCUMENT_COPY_LOCATION },
|
||||
|
||||
{ "documents-remove", GTK_STOCK_REMOVE,
|
||||
N_("Remove _Entry"), "",
|
||||
N_("Remove the selected entry"),
|
||||
NC_("documents-action", "Remove _Entry"), "",
|
||||
NC_("documents-action", "Remove the selected entry"),
|
||||
G_CALLBACK (documents_remove_cmd_callback),
|
||||
GIMP_HELP_DOCUMENT_REMOVE },
|
||||
|
||||
{ "documents-clear", GTK_STOCK_CLEAR,
|
||||
N_("_Clear History"), "",
|
||||
N_("Clear the entire document history"),
|
||||
NC_("documents-action", "_Clear History"), "",
|
||||
NC_("documents-action", "Clear the entire document history"),
|
||||
G_CALLBACK (documents_clear_cmd_callback),
|
||||
GIMP_HELP_DOCUMENT_CLEAR },
|
||||
|
||||
{ "documents-recreate-preview", GTK_STOCK_REFRESH,
|
||||
N_("Recreate _Preview"), "",
|
||||
N_("Recreate preview"),
|
||||
NC_("documents-action", "Recreate _Preview"), "",
|
||||
NC_("documents-action", "Recreate preview"),
|
||||
G_CALLBACK (documents_recreate_preview_cmd_callback),
|
||||
GIMP_HELP_DOCUMENT_REFRESH },
|
||||
|
||||
{ "documents-reload-previews", NULL,
|
||||
N_("Reload _all Previews"), "",
|
||||
N_("Reload all previews"),
|
||||
NC_("documents-action", "Reload _all Previews"), "",
|
||||
NC_("documents-action", "Reload all previews"),
|
||||
G_CALLBACK (documents_reload_previews_cmd_callback),
|
||||
GIMP_HELP_DOCUMENT_REFRESH },
|
||||
|
||||
{ "documents-remove-dangling", NULL,
|
||||
N_("Remove Dangling E_ntries"), "",
|
||||
N_("Remove dangling entries"),
|
||||
NC_("documents-action", "Remove Dangling E_ntries"), "",
|
||||
NC_("documents-action",
|
||||
"Remove entries for which the corresponding file is not available"),
|
||||
G_CALLBACK (documents_remove_dangling_cmd_callback),
|
||||
GIMP_HELP_DOCUMENT_REFRESH }
|
||||
};
|
||||
@ -101,7 +101,7 @@ static const GimpActionEntry documents_actions[] =
|
||||
void
|
||||
documents_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group,
|
||||
gimp_action_group_add_actions (group, "documents-action",
|
||||
documents_actions,
|
||||
G_N_ELEMENTS (documents_actions));
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DOCUMENTS_ACTIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -46,6 +45,7 @@
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplay-foreach.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
|
||||
#include "documents-commands.h"
|
||||
#include "file-commands.h"
|
||||
@ -114,7 +114,7 @@ documents_raise_or_open_cmd_callback (GtkAction *action,
|
||||
{
|
||||
RaiseClosure closure;
|
||||
|
||||
closure.name = gimp_object_get_name (GIMP_OBJECT (imagefile));
|
||||
closure.name = gimp_object_get_name (imagefile);
|
||||
closure.found = FALSE;
|
||||
|
||||
gimp_container_foreach (context->gimp->displays,
|
||||
@ -143,7 +143,7 @@ documents_file_open_dialog_cmd_callback (GtkAction *action,
|
||||
if (imagefile && gimp_container_have (container, GIMP_OBJECT (imagefile)))
|
||||
{
|
||||
file_file_open_dialog (context->gimp,
|
||||
gimp_object_get_name (GIMP_OBJECT (imagefile)),
|
||||
gimp_object_get_name (imagefile),
|
||||
GTK_WIDGET (editor));
|
||||
}
|
||||
}
|
||||
@ -161,7 +161,7 @@ documents_copy_location_cmd_callback (GtkAction *action,
|
||||
|
||||
if (imagefile)
|
||||
gimp_clipboard_set_text (context->gimp,
|
||||
gimp_object_get_name (GIMP_OBJECT (imagefile)));
|
||||
gimp_object_get_name (imagefile));
|
||||
}
|
||||
|
||||
void
|
||||
@ -170,15 +170,12 @@ documents_remove_cmd_callback (GtkAction *action,
|
||||
{
|
||||
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;
|
||||
|
||||
if (context->gimp->config->save_document_history)
|
||||
{
|
||||
GimpImagefile *imagefile = gimp_context_get_imagefile (context);
|
||||
const gchar *uri = gimp_object_get_name (GIMP_OBJECT (imagefile));
|
||||
uri = gimp_object_get_name (imagefile);
|
||||
|
||||
gtk_recent_manager_remove_item (gtk_recent_manager_get_default (),
|
||||
uri, NULL);
|
||||
}
|
||||
gtk_recent_manager_remove_item (gtk_recent_manager_get_default (), uri, NULL);
|
||||
|
||||
gimp_container_view_remove_active (editor->view);
|
||||
}
|
||||
@ -190,65 +187,67 @@ documents_clear_cmd_callback (GtkAction *action,
|
||||
GimpContainerEditor *editor = GIMP_CONTAINER_EDITOR (data);
|
||||
GimpContext *context = gimp_container_view_get_context (editor->view);
|
||||
Gimp *gimp = context->gimp;
|
||||
GtkWidget *dialog;
|
||||
|
||||
if (gimp->config->save_document_history)
|
||||
dialog = gimp_message_dialog_new (_("Clear Document History"),
|
||||
GTK_STOCK_CLEAR,
|
||||
GTK_WIDGET (editor),
|
||||
GTK_DIALOG_MODAL |
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
gimp_standard_help_func, NULL,
|
||||
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_CLEAR, 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)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GtkRecentManager *manager = gtk_recent_manager_get_default ();
|
||||
GList *items;
|
||||
GList *list;
|
||||
|
||||
dialog = gimp_message_dialog_new (_("Clear Document History"),
|
||||
GTK_STOCK_CLEAR,
|
||||
GTK_WIDGET (editor),
|
||||
GTK_DIALOG_MODAL |
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
gimp_standard_help_func, NULL,
|
||||
items = gtk_recent_manager_get_items (manager);
|
||||
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_CLEAR, 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 items from "
|
||||
"the recent documents list in all "
|
||||
"applications."));
|
||||
|
||||
if (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK)
|
||||
for (list = items; list; list = list->next)
|
||||
{
|
||||
GError *error = NULL;
|
||||
GtkRecentInfo *info = list->data;
|
||||
|
||||
gimp_container_clear (gimp->documents);
|
||||
|
||||
gtk_recent_manager_purge_items (gtk_recent_manager_get_default (),
|
||||
&error);
|
||||
|
||||
if (error)
|
||||
if (gtk_recent_info_has_application (info,
|
||||
"GNU Image Manipulation Program"))
|
||||
{
|
||||
gimp_message (gimp, G_OBJECT (dialog), GIMP_MESSAGE_ERROR,
|
||||
"%s", error->message);
|
||||
g_clear_error (&error);
|
||||
gtk_recent_manager_remove_item (manager,
|
||||
gtk_recent_info_get_uri (info),
|
||||
NULL);
|
||||
}
|
||||
|
||||
gtk_recent_info_unref (info);
|
||||
}
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_list_free (items);
|
||||
|
||||
gimp_container_clear (gimp->documents);
|
||||
}
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
void
|
||||
@ -269,7 +268,7 @@ documents_recreate_preview_cmd_callback (GtkAction *action,
|
||||
{
|
||||
gimp_imagefile_create_thumbnail (imagefile,
|
||||
context, NULL,
|
||||
imagefile->gimp->config->thumbnail_size,
|
||||
context->gimp->config->thumbnail_size,
|
||||
FALSE);
|
||||
}
|
||||
}
|
||||
@ -292,10 +291,11 @@ static void
|
||||
documents_remove_dangling_foreach (GimpImagefile *imagefile,
|
||||
GimpContainer *container)
|
||||
{
|
||||
if (gimp_thumbnail_peek_image (imagefile->thumbnail) ==
|
||||
GIMP_THUMB_STATE_NOT_FOUND)
|
||||
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 (GIMP_OBJECT (imagefile));
|
||||
const gchar *uri = gimp_object_get_name (imagefile);
|
||||
|
||||
gtk_recent_manager_remove_item (gtk_recent_manager_get_default (), uri,
|
||||
NULL);
|
||||
@ -331,7 +331,7 @@ documents_open_image (GtkWidget *editor,
|
||||
GimpPDBStatusType status;
|
||||
GError *error = NULL;
|
||||
|
||||
uri = gimp_object_get_name (GIMP_OBJECT (imagefile));
|
||||
uri = gimp_object_get_name (imagefile);
|
||||
|
||||
image = file_open_with_display (context->gimp, context, NULL, uri, FALSE,
|
||||
&status, &error);
|
||||
@ -353,11 +353,11 @@ static void
|
||||
documents_raise_display (GimpDisplay *display,
|
||||
RaiseClosure *closure)
|
||||
{
|
||||
const gchar *uri = gimp_object_get_name (GIMP_OBJECT (display->image));
|
||||
const gchar *uri = gimp_object_get_name (gimp_display_get_image (display));
|
||||
|
||||
if (uri && ! strcmp (closure->name, uri))
|
||||
if (! g_strcmp0 (closure->name, uri))
|
||||
{
|
||||
closure->found = TRUE;
|
||||
gtk_window_present (GTK_WINDOW (display->shell));
|
||||
gimp_display_shell_present (gimp_display_get_shell (display));
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DOCUMENTS_COMMANDS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,12 +12,12 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
@ -42,58 +42,67 @@
|
||||
static const GimpActionEntry drawable_actions[] =
|
||||
{
|
||||
{ "drawable-equalize", NULL,
|
||||
N_("_Equalize"), NULL,
|
||||
N_("Automatic contrast enhancement"),
|
||||
NC_("drawable-action", "_Equalize"), NULL,
|
||||
NC_("drawable-action", "Automatic contrast enhancement"),
|
||||
G_CALLBACK (drawable_equalize_cmd_callback),
|
||||
GIMP_HELP_LAYER_EQUALIZE },
|
||||
|
||||
{ "drawable-invert", GIMP_STOCK_INVERT,
|
||||
N_("In_vert"), NULL,
|
||||
N_("Invert the colors"),
|
||||
NC_("drawable-action", "In_vert"), NULL,
|
||||
NC_("drawable-action", "Invert the colors"),
|
||||
G_CALLBACK (drawable_invert_cmd_callback),
|
||||
GIMP_HELP_LAYER_INVERT },
|
||||
|
||||
{ "drawable-levels-stretch", NULL,
|
||||
N_("_White Balance"), NULL,
|
||||
N_("Automatic white balance correction"),
|
||||
NC_("drawable-action", "_White Balance"), NULL,
|
||||
NC_("drawable-action", "Automatic white balance correction"),
|
||||
G_CALLBACK (drawable_levels_stretch_cmd_callback),
|
||||
GIMP_HELP_LAYER_WHITE_BALANCE},
|
||||
|
||||
{ "drawable-offset", NULL,
|
||||
N_("_Offset..."), "<control><shift>O",
|
||||
N_("Shift the pixels, optionally wrapping them at the borders"),
|
||||
NC_("drawable-action", "_Offset..."), "<primary><shift>O",
|
||||
NC_("drawable-action",
|
||||
"Shift the pixels, optionally wrapping them at the borders"),
|
||||
G_CALLBACK (drawable_offset_cmd_callback),
|
||||
GIMP_HELP_LAYER_OFFSET }
|
||||
};
|
||||
|
||||
static const GimpToggleActionEntry drawable_toggle_actions[] =
|
||||
{
|
||||
{ "drawable-visible", GIMP_STOCK_VISIBLE,
|
||||
NC_("drawable-action", "_Visible"), NULL,
|
||||
NC_("drawable-action", "Toggle visibility"),
|
||||
G_CALLBACK (drawable_visible_cmd_callback),
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_VISIBLE },
|
||||
|
||||
{ "drawable-linked", GIMP_STOCK_LINKED,
|
||||
N_("_Linked"), NULL,
|
||||
N_("Toggle the linked state"),
|
||||
NC_("drawable-action", "_Linked"), NULL,
|
||||
NC_("drawable-action", "Toggle the linked state"),
|
||||
G_CALLBACK (drawable_linked_cmd_callback),
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_LINKED },
|
||||
|
||||
{ "drawable-visible", GIMP_STOCK_VISIBLE,
|
||||
N_("_Visible"), NULL,
|
||||
N_("Toggle visibility"),
|
||||
G_CALLBACK (drawable_visible_cmd_callback),
|
||||
{ "drawable-lock-content", NULL /* GIMP_STOCK_LOCK */,
|
||||
NC_("drawable-action", "L_ock pixels"), NULL,
|
||||
NC_("drawable-action",
|
||||
"Keep the pixels on this drawable from being modified"),
|
||||
G_CALLBACK (drawable_lock_content_cmd_callback),
|
||||
FALSE,
|
||||
GIMP_HELP_LAYER_VISIBLE }
|
||||
NULL, /* GIMP_HELP_LAYER_LOCK_PIXELS */ }
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry drawable_flip_actions[] =
|
||||
{
|
||||
{ "drawable-flip-horizontal", GIMP_STOCK_FLIP_HORIZONTAL,
|
||||
N_("Flip _Horizontally"), NULL,
|
||||
N_("Flip horizontally"),
|
||||
NC_("drawable-action", "Flip _Horizontally"), NULL,
|
||||
NC_("drawable-action", "Flip horizontally"),
|
||||
GIMP_ORIENTATION_HORIZONTAL, FALSE,
|
||||
GIMP_HELP_LAYER_FLIP_HORIZONTAL },
|
||||
|
||||
{ "drawable-flip-vertical", GIMP_STOCK_FLIP_VERTICAL,
|
||||
N_("Flip _Vertically"), NULL,
|
||||
N_("Flip vertically"),
|
||||
NC_("drawable-action", "Flip _Vertically"), NULL,
|
||||
NC_("drawable-action", "Flip vertically"),
|
||||
GIMP_ORIENTATION_VERTICAL, FALSE,
|
||||
GIMP_HELP_LAYER_FLIP_VERTICAL }
|
||||
};
|
||||
@ -101,20 +110,20 @@ static const GimpEnumActionEntry drawable_flip_actions[] =
|
||||
static const GimpEnumActionEntry drawable_rotate_actions[] =
|
||||
{
|
||||
{ "drawable-rotate-90", GIMP_STOCK_ROTATE_90,
|
||||
N_("Rotate 90° _clockwise"), NULL,
|
||||
N_("Rotate 90 degrees to the right"),
|
||||
NC_("drawable-action", "Rotate 90° _clockwise"), NULL,
|
||||
NC_("drawable-action", "Rotate 90 degrees to the right"),
|
||||
GIMP_ROTATE_90, FALSE,
|
||||
GIMP_HELP_LAYER_ROTATE_90 },
|
||||
|
||||
{ "drawable-rotate-180", GIMP_STOCK_ROTATE_180,
|
||||
N_("Rotate _180°"), NULL,
|
||||
N_("Turn upside-down"),
|
||||
NC_("drawable-action", "Rotate _180°"), NULL,
|
||||
NC_("drawable-action", "Turn upside-down"),
|
||||
GIMP_ROTATE_180, FALSE,
|
||||
GIMP_HELP_LAYER_ROTATE_180 },
|
||||
|
||||
{ "drawable-rotate-270", GIMP_STOCK_ROTATE_270,
|
||||
N_("Rotate 90° counter-clock_wise"), NULL,
|
||||
N_("Rotate 90 degrees to the left"),
|
||||
NC_("drawable-action", "Rotate 90° counter-clock_wise"), NULL,
|
||||
NC_("drawable-action", "Rotate 90 degrees to the left"),
|
||||
GIMP_ROTATE_270, FALSE,
|
||||
GIMP_HELP_LAYER_ROTATE_270 }
|
||||
};
|
||||
@ -123,23 +132,32 @@ static const GimpEnumActionEntry drawable_rotate_actions[] =
|
||||
void
|
||||
drawable_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group,
|
||||
gimp_action_group_add_actions (group, "drawable-action",
|
||||
drawable_actions,
|
||||
G_N_ELEMENTS (drawable_actions));
|
||||
|
||||
gimp_action_group_add_toggle_actions (group,
|
||||
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,
|
||||
gimp_action_group_add_enum_actions (group, "drawable-action",
|
||||
drawable_flip_actions,
|
||||
G_N_ELEMENTS (drawable_flip_actions),
|
||||
G_CALLBACK (drawable_flip_cmd_callback));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, "drawable-action",
|
||||
drawable_rotate_actions,
|
||||
G_N_ELEMENTS (drawable_rotate_actions),
|
||||
G_CALLBACK (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
|
||||
@ -149,10 +167,13 @@ drawable_actions_update (GimpActionGroup *group,
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable = NULL;
|
||||
gboolean is_rgb = FALSE;
|
||||
gboolean is_gray = FALSE;
|
||||
gboolean is_indexed = FALSE;
|
||||
gboolean visible = FALSE;
|
||||
gboolean linked = FALSE;
|
||||
gboolean locked = FALSE;
|
||||
gboolean can_lock = FALSE;
|
||||
gboolean writable = FALSE;
|
||||
gboolean children = FALSE;
|
||||
|
||||
image = action_data_get_image (data);
|
||||
|
||||
@ -166,7 +187,6 @@ drawable_actions_update (GimpActionGroup *group,
|
||||
GimpItem *item;
|
||||
|
||||
is_rgb = GIMP_IMAGE_TYPE_IS_RGB (drawable_type);
|
||||
is_gray = GIMP_IMAGE_TYPE_IS_GRAY (drawable_type);
|
||||
is_indexed = GIMP_IMAGE_TYPE_IS_INDEXED (drawable_type);
|
||||
|
||||
if (GIMP_IS_LAYER_MASK (drawable))
|
||||
@ -174,8 +194,14 @@ drawable_actions_update (GimpActionGroup *group,
|
||||
else
|
||||
item = GIMP_ITEM (drawable);
|
||||
|
||||
visible = gimp_item_get_visible (item);
|
||||
linked = gimp_item_get_linked (item);
|
||||
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);
|
||||
|
||||
if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)))
|
||||
children = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -184,23 +210,25 @@ drawable_actions_update (GimpActionGroup *group,
|
||||
#define SET_ACTIVE(action,condition) \
|
||||
gimp_action_group_set_action_active (group, action, (condition) != 0)
|
||||
|
||||
SET_SENSITIVE ("drawable-equalize", drawable && ! is_indexed);
|
||||
SET_SENSITIVE ("drawable-invert", drawable && ! is_indexed);
|
||||
SET_SENSITIVE ("drawable-levels-stretch", drawable && is_rgb);
|
||||
SET_SENSITIVE ("drawable-offset", drawable);
|
||||
SET_SENSITIVE ("drawable-equalize", writable && !children && !is_indexed);
|
||||
SET_SENSITIVE ("drawable-invert", writable && !children && !is_indexed);
|
||||
SET_SENSITIVE ("drawable-levels-stretch", writable && !children && is_rgb);
|
||||
SET_SENSITIVE ("drawable-offset", writable && !children);
|
||||
|
||||
SET_SENSITIVE ("drawable-visible", drawable);
|
||||
SET_SENSITIVE ("drawable-linked", drawable);
|
||||
SET_SENSITIVE ("drawable-visible", drawable);
|
||||
SET_SENSITIVE ("drawable-linked", drawable);
|
||||
SET_SENSITIVE ("drawable-lock-content", can_lock);
|
||||
|
||||
SET_ACTIVE ("drawable-visible", visible);
|
||||
SET_ACTIVE ("drawable-linked", linked);
|
||||
SET_ACTIVE ("drawable-visible", visible);
|
||||
SET_ACTIVE ("drawable-linked", linked);
|
||||
SET_ACTIVE ("drawable-lock-content", locked);
|
||||
|
||||
SET_SENSITIVE ("drawable-flip-horizontal", drawable);
|
||||
SET_SENSITIVE ("drawable-flip-vertical", drawable);
|
||||
SET_SENSITIVE ("drawable-flip-horizontal", writable);
|
||||
SET_SENSITIVE ("drawable-flip-vertical", writable);
|
||||
|
||||
SET_SENSITIVE ("drawable-rotate-90", drawable);
|
||||
SET_SENSITIVE ("drawable-rotate-180", drawable);
|
||||
SET_SENSITIVE ("drawable-rotate-270", drawable);
|
||||
SET_SENSITIVE ("drawable-rotate-90", writable);
|
||||
SET_SENSITIVE ("drawable-rotate-180", writable);
|
||||
SET_SENSITIVE ("drawable-rotate-270", writable);
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
#undef SET_ACTIVE
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DRAWABLE_ACTIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,12 +12,12 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
@ -58,8 +58,9 @@ drawable_equalize_cmd_callback (GtkAction *action,
|
||||
|
||||
if (gimp_drawable_is_indexed (drawable))
|
||||
{
|
||||
gimp_message (image->gimp, G_OBJECT (widget), GIMP_MESSAGE_WARNING,
|
||||
_("Equalize does not operate on indexed layers."));
|
||||
gimp_message_literal (image->gimp,
|
||||
G_OBJECT (widget), GIMP_MESSAGE_WARNING,
|
||||
_("Equalize does not operate on indexed layers."));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -81,8 +82,9 @@ drawable_invert_cmd_callback (GtkAction *action,
|
||||
|
||||
if (gimp_drawable_is_indexed (drawable))
|
||||
{
|
||||
gimp_message (image->gimp, G_OBJECT (widget), GIMP_MESSAGE_WARNING,
|
||||
_("Invert does not operate on indexed layers."));
|
||||
gimp_message_literal (image->gimp,
|
||||
G_OBJECT (widget), GIMP_MESSAGE_WARNING,
|
||||
_("Invert does not operate on indexed layers."));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -104,8 +106,9 @@ drawable_levels_stretch_cmd_callback (GtkAction *action,
|
||||
|
||||
if (! gimp_drawable_is_rgb (drawable))
|
||||
{
|
||||
gimp_message (image->gimp, G_OBJECT (widget), GIMP_MESSAGE_WARNING,
|
||||
_("White Balance operates only on RGB color layers."));
|
||||
gimp_message_literal (image->gimp,
|
||||
G_OBJECT (widget), GIMP_MESSAGE_WARNING,
|
||||
_("White Balance operates only on RGB color layers."));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -192,6 +195,41 @@ drawable_visible_cmd_callback (GtkAction *action,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
drawable_lock_content_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDrawable *drawable;
|
||||
gboolean locked;
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
|
||||
locked = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
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_flip_cmd_callback (GtkAction *action,
|
||||
@ -209,16 +247,16 @@ drawable_flip_cmd_callback (GtkAction *action,
|
||||
|
||||
item = GIMP_ITEM (drawable);
|
||||
|
||||
gimp_item_offsets (item, &off_x, &off_y);
|
||||
gimp_item_get_offset (item, &off_x, &off_y);
|
||||
|
||||
switch ((GimpOrientationType) value)
|
||||
{
|
||||
case GIMP_ORIENTATION_HORIZONTAL:
|
||||
axis = ((gdouble) off_x + (gdouble) gimp_item_width (item) / 2.0);
|
||||
axis = ((gdouble) off_x + (gdouble) gimp_item_get_width (item) / 2.0);
|
||||
break;
|
||||
|
||||
case GIMP_ORIENTATION_VERTICAL:
|
||||
axis = ((gdouble) off_y + (gdouble) gimp_item_height (item) / 2.0);
|
||||
axis = ((gdouble) off_y + (gdouble) gimp_item_get_height (item) / 2.0);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -259,10 +297,10 @@ drawable_rotate_cmd_callback (GtkAction *action,
|
||||
|
||||
item = GIMP_ITEM (drawable);
|
||||
|
||||
gimp_item_offsets (item, &off_x, &off_y);
|
||||
gimp_item_get_offset (item, &off_x, &off_y);
|
||||
|
||||
center_x = ((gdouble) off_x + (gdouble) gimp_item_width (item) / 2.0);
|
||||
center_y = ((gdouble) off_y + (gdouble) gimp_item_height (item) / 2.0);
|
||||
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_image_undo_group_start (image, GIMP_UNDO_GROUP_TRANSFORM,
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DRAWABLE_COMMANDS_H__
|
||||
@ -33,6 +32,8 @@ void drawable_linked_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void drawable_visible_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
void drawable_lock_content_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
|
||||
void drawable_flip_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
|
129
app/actions/dynamics-actions.c
Normal file
129
app/actions/dynamics-actions.c
Normal file
@ -0,0 +1,129 @@
|
||||
/* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.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_STOCK_DYNAMICS,
|
||||
NC_("dynamics-action", "Paint Dynamics Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_DYNAMICS_DIALOG },
|
||||
|
||||
{ "dynamics-new", GTK_STOCK_NEW,
|
||||
NC_("dynamics-action", "_New Dynamics"), "",
|
||||
NC_("dynamics-action", "Create a new dynamics"),
|
||||
G_CALLBACK (data_new_cmd_callback),
|
||||
GIMP_HELP_DYNAMICS_NEW },
|
||||
|
||||
{ "dynamics-duplicate", GIMP_STOCK_DUPLICATE,
|
||||
NC_("dynamics-action", "D_uplicate Dynamics"), NULL,
|
||||
NC_("dynamics-action", "Duplicate this dynamics"),
|
||||
G_CALLBACK (data_duplicate_cmd_callback),
|
||||
GIMP_HELP_DYNAMICS_DUPLICATE },
|
||||
|
||||
{ "dynamics-copy-location", GTK_STOCK_COPY,
|
||||
NC_("dynamics-action", "Copy Dynamics _Location"), "",
|
||||
NC_("dynamics-action", "Copy dynamics file location to clipboard"),
|
||||
G_CALLBACK (data_copy_location_cmd_callback),
|
||||
GIMP_HELP_DYNAMICS_COPY_LOCATION },
|
||||
|
||||
{ "dynamics-delete", GTK_STOCK_DELETE,
|
||||
NC_("dynamics-action", "_Delete Dynamics"), "",
|
||||
NC_("dynamics-action", "Delete this dynamics"),
|
||||
G_CALLBACK (data_delete_cmd_callback),
|
||||
GIMP_HELP_DYNAMICS_DELETE },
|
||||
|
||||
{ "dynamics-refresh", GTK_STOCK_REFRESH,
|
||||
NC_("dynamics-action", "_Refresh Dynamics"), "",
|
||||
NC_("dynamics-action", "Refresh dynamics"),
|
||||
G_CALLBACK (data_refresh_cmd_callback),
|
||||
GIMP_HELP_DYNAMICS_REFRESH }
|
||||
};
|
||||
|
||||
static const GimpStringActionEntry dynamics_edit_actions[] =
|
||||
{
|
||||
{ "dynamics-edit", GTK_STOCK_EDIT,
|
||||
NC_("dynamics-action", "_Edit Dynamics..."), NULL,
|
||||
NC_("dynamics-action", "Edit 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),
|
||||
G_CALLBACK (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;
|
||||
const gchar *filename = NULL;
|
||||
|
||||
if (context)
|
||||
{
|
||||
dynamics = gimp_context_get_dynamics (context);
|
||||
|
||||
if (dynamics)
|
||||
{
|
||||
data = GIMP_DATA (dynamics);
|
||||
|
||||
filename = gimp_data_get_filename (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_GET_CLASS (data)->duplicate);
|
||||
SET_SENSITIVE ("dynamics-copy-location", dynamics && filename);
|
||||
SET_SENSITIVE ("dynamics-delete", dynamics && gimp_data_is_deletable (data));
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,16 +12,16 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __TILE_MANAGER_CROP_H__
|
||||
#define __TILE_MANAGER_CROP_H__
|
||||
#ifndef __DYNAMICS_ACTIONS_H__
|
||||
#define __DYNAMICS_ACTIONS_H__
|
||||
|
||||
|
||||
TileManager * tile_manager_crop (TileManager *tiles,
|
||||
gint border);
|
||||
void dynamics_actions_setup (GimpActionGroup *group);
|
||||
void dynamics_actions_update (GimpActionGroup *group,
|
||||
gpointer user_data);
|
||||
|
||||
|
||||
#endif /* __TILE_MANAGER_CROP_H__ */
|
||||
#endif /* __DYNAMICS_ACTIONS_H__ */
|
98
app/actions/dynamics-editor-actions.c
Normal file
98
app/actions/dynamics-editor-actions.c
Normal file
@ -0,0 +1,98 @@
|
||||
/* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.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_STOCK_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_STOCK_LINKED,
|
||||
NC_("dynamics-editor-action", "Edit Active Dynamics"), NULL, NULL,
|
||||
G_CALLBACK (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);
|
||||
GimpData *data;
|
||||
gboolean editable = FALSE;
|
||||
gboolean edit_active = FALSE;
|
||||
|
||||
data = data_editor->data;
|
||||
|
||||
if (data)
|
||||
{
|
||||
if (data_editor->data_editable)
|
||||
editable = TRUE;
|
||||
}
|
||||
|
||||
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
|
||||
}
|
27
app/actions/dynamics-editor-actions.h
Normal file
27
app/actions/dynamics-editor-actions.h
Normal file
@ -0,0 +1,27 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://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,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,12 +12,12 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
@ -60,125 +60,129 @@ static void edit_actions_pattern_changed (GimpContext *context,
|
||||
|
||||
static const GimpActionEntry edit_actions[] =
|
||||
{
|
||||
{ "edit-menu", NULL, N_("_Edit") },
|
||||
{ "edit-paste-as-menu", NULL, N_("_Paste as") },
|
||||
{ "edit-buffer-menu", NULL, N_("_Buffer") },
|
||||
{ "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",
|
||||
GTK_STOCK_UNDO, N_("Undo History Menu"), NULL, NULL, NULL,
|
||||
GTK_STOCK_UNDO, NC_("edit-action", "Undo History Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_UNDO_DIALOG },
|
||||
|
||||
{ "edit-undo", GTK_STOCK_UNDO,
|
||||
N_("_Undo"), "<control>Z",
|
||||
N_("Undo the last operation"),
|
||||
NC_("edit-action", "_Undo"), "<primary>Z",
|
||||
NC_("edit-action", "Undo the last operation"),
|
||||
G_CALLBACK (edit_undo_cmd_callback),
|
||||
GIMP_HELP_EDIT_UNDO },
|
||||
|
||||
{ "edit-redo", GTK_STOCK_REDO,
|
||||
N_("_Redo"), "<control>Y",
|
||||
N_("Redo the last operation that was undone"),
|
||||
NC_("edit-action", "_Redo"), "<primary>Y",
|
||||
NC_("edit-action", "Redo the last operation that was undone"),
|
||||
G_CALLBACK (edit_redo_cmd_callback),
|
||||
GIMP_HELP_EDIT_REDO },
|
||||
|
||||
{ "edit-strong-undo", GTK_STOCK_UNDO,
|
||||
N_("Strong Undo"), "<control><shift>Z",
|
||||
N_("Undo the last operation, skipping visibility changes"),
|
||||
NC_("edit-action", "Strong Undo"), "<primary><shift>Z",
|
||||
NC_("edit-action", "Undo the last operation, skipping visibility changes"),
|
||||
G_CALLBACK (edit_strong_undo_cmd_callback),
|
||||
GIMP_HELP_EDIT_STRONG_UNDO },
|
||||
|
||||
{ "edit-strong-redo", GTK_STOCK_REDO,
|
||||
N_("Strong Redo"), "<control><shift>Y",
|
||||
N_("Redo the last operation that was undone, skipping visibility changes"),
|
||||
NC_("edit-action", "Strong Redo"), "<primary><shift>Y",
|
||||
NC_("edit-action",
|
||||
"Redo the last operation that was undone, skipping visibility changes"),
|
||||
G_CALLBACK (edit_strong_redo_cmd_callback),
|
||||
GIMP_HELP_EDIT_STRONG_REDO },
|
||||
|
||||
{ "edit-undo-clear", GTK_STOCK_CLEAR,
|
||||
N_("_Clear Undo History"), "",
|
||||
N_("Remove all operations from the undo history"),
|
||||
NC_("edit-action", "_Clear Undo History"), "",
|
||||
NC_("edit-action", "Remove all operations from the undo history"),
|
||||
G_CALLBACK (edit_undo_clear_cmd_callback),
|
||||
GIMP_HELP_EDIT_UNDO_CLEAR },
|
||||
|
||||
{ "edit-fade", GTK_STOCK_UNDO,
|
||||
N_("_Fade..."), "",
|
||||
N_("Modify paint mode and opacity of the last pixel manipulation"),
|
||||
NC_("edit-action", "_Fade..."), "",
|
||||
NC_("edit-action",
|
||||
"Modify paint mode and opacity of the last pixel manipulation"),
|
||||
G_CALLBACK (edit_fade_cmd_callback),
|
||||
GIMP_HELP_EDIT_FADE },
|
||||
|
||||
{ "edit-cut", GTK_STOCK_CUT,
|
||||
N_("Cu_t"), "<control>X",
|
||||
N_("Move the selected pixels to the clipboard"),
|
||||
NC_("edit-action", "Cu_t"), "<primary>X",
|
||||
NC_("edit-action", "Move the selected pixels to the clipboard"),
|
||||
G_CALLBACK (edit_cut_cmd_callback),
|
||||
GIMP_HELP_EDIT_CUT },
|
||||
|
||||
{ "edit-copy", GTK_STOCK_COPY,
|
||||
N_("_Copy"), "<control>C",
|
||||
N_("Copy the selected pixels to the clipboard"),
|
||||
NC_("edit-action", "_Copy"), "<primary>C",
|
||||
NC_("edit-action", "Copy the selected pixels to the clipboard"),
|
||||
G_CALLBACK (edit_copy_cmd_callback),
|
||||
GIMP_HELP_EDIT_COPY },
|
||||
|
||||
{ "edit-copy-visible", NULL, /* GIMP_STOCK_COPY_VISIBLE, */
|
||||
N_("Copy _Visible"), "<control><shift>C",
|
||||
N_("Copy what is visible in the selected region"),
|
||||
NC_("edit-action", "Copy _Visible"), "<primary><shift>C",
|
||||
NC_("edit-action", "Copy what is visible in the selected region"),
|
||||
G_CALLBACK (edit_copy_visible_cmd_callback),
|
||||
GIMP_HELP_EDIT_COPY_VISIBLE },
|
||||
|
||||
{ "edit-paste", GTK_STOCK_PASTE,
|
||||
N_("_Paste"), "<control>V",
|
||||
N_("Paste the content of the clipboard"),
|
||||
NC_("edit-action", "_Paste"), "<primary>V",
|
||||
NC_("edit-action", "Paste the content of the clipboard"),
|
||||
G_CALLBACK (edit_paste_cmd_callback),
|
||||
GIMP_HELP_EDIT_PASTE },
|
||||
|
||||
{ "edit-paste-into", GIMP_STOCK_PASTE_INTO,
|
||||
N_("Paste _Into"), NULL,
|
||||
N_("Paste the content of the clipboard into the current selection"),
|
||||
NC_("edit-action", "Paste _Into"), NULL,
|
||||
NC_("edit-action",
|
||||
"Paste the content of the clipboard into the current selection"),
|
||||
G_CALLBACK (edit_paste_into_cmd_callback),
|
||||
GIMP_HELP_EDIT_PASTE_INTO },
|
||||
|
||||
{ "edit-paste-as-new", GIMP_STOCK_PASTE_AS_NEW,
|
||||
N_("From _Clipboard"), "<control><shift>V",
|
||||
N_("Create a new image from the content of the clipboard"),
|
||||
NC_("edit-action", "From _Clipboard"), "<primary><shift>V",
|
||||
NC_("edit-action", "Create a new image from the content of the clipboard"),
|
||||
G_CALLBACK (edit_paste_as_new_cmd_callback),
|
||||
GIMP_HELP_EDIT_PASTE_AS_NEW },
|
||||
|
||||
{ "edit-paste-as-new-short", GIMP_STOCK_PASTE_AS_NEW,
|
||||
N_("_New Image"), NULL,
|
||||
N_("Create a new image from the content of the clipboard"),
|
||||
NC_("edit-action", "_New Image"), NULL,
|
||||
NC_("edit-action", "Create a new image from the content of the clipboard"),
|
||||
G_CALLBACK (edit_paste_as_new_cmd_callback),
|
||||
GIMP_HELP_EDIT_PASTE_AS_NEW },
|
||||
|
||||
{ "edit-paste-as-new-layer", NULL,
|
||||
N_("New _Layer"), NULL,
|
||||
N_("Create a new layer from the content of the clipboard"),
|
||||
NC_("edit-action", "New _Layer"), NULL,
|
||||
NC_("edit-action", "Create a new layer from the content of the clipboard"),
|
||||
G_CALLBACK (edit_paste_as_new_layer_cmd_callback),
|
||||
GIMP_HELP_EDIT_PASTE_AS_NEW_LAYER },
|
||||
|
||||
{ "edit-named-cut", GTK_STOCK_CUT,
|
||||
N_("Cu_t Named..."), "",
|
||||
N_("Move the selected pixels to a named buffer"),
|
||||
NC_("edit-action", "Cu_t Named..."), "",
|
||||
NC_("edit-action", "Move the selected pixels to a named buffer"),
|
||||
G_CALLBACK (edit_named_cut_cmd_callback),
|
||||
GIMP_HELP_BUFFER_CUT },
|
||||
|
||||
{ "edit-named-copy", GTK_STOCK_COPY,
|
||||
N_("_Copy Named..."), "",
|
||||
N_("Copy the selected pixels to a named buffer"),
|
||||
NC_("edit-action", "_Copy Named..."), "",
|
||||
NC_("edit-action", "Copy the selected pixels to a named buffer"),
|
||||
G_CALLBACK (edit_named_copy_cmd_callback),
|
||||
GIMP_HELP_BUFFER_COPY },
|
||||
|
||||
{ "edit-named-copy-visible", NULL, /* GIMP_STOCK_COPY_VISIBLE, */
|
||||
N_("Copy _Visible Named..."), "",
|
||||
N_("Copy the selected region to a named buffer"),
|
||||
NC_("edit-action", "Copy _Visible Named..."), "",
|
||||
NC_("edit-action",
|
||||
"Copy what is visible in the selected region to a named buffer"),
|
||||
G_CALLBACK (edit_named_copy_visible_cmd_callback),
|
||||
GIMP_HELP_BUFFER_COPY },
|
||||
|
||||
{ "edit-named-paste", GTK_STOCK_PASTE,
|
||||
N_("_Paste Named..."), "",
|
||||
N_("Paste the content of a named buffer"),
|
||||
NC_("edit-action", "_Paste Named..."), "",
|
||||
NC_("edit-action", "Paste the content of a named buffer"),
|
||||
G_CALLBACK (edit_named_paste_cmd_callback),
|
||||
GIMP_HELP_BUFFER_PASTE },
|
||||
|
||||
{ "edit-clear", GTK_STOCK_CLEAR,
|
||||
N_("Cl_ear"), "Delete",
|
||||
N_("Clear the selected pixels"),
|
||||
NC_("edit-action", "Cl_ear"), "Delete",
|
||||
NC_("edit-action", "Clear the selected pixels"),
|
||||
G_CALLBACK (edit_clear_cmd_callback),
|
||||
GIMP_HELP_EDIT_CLEAR }
|
||||
};
|
||||
@ -186,20 +190,20 @@ static const GimpActionEntry edit_actions[] =
|
||||
static const GimpEnumActionEntry edit_fill_actions[] =
|
||||
{
|
||||
{ "edit-fill-fg", GIMP_STOCK_TOOL_BUCKET_FILL,
|
||||
N_("Fill with _FG Color"), "<control>comma",
|
||||
N_("Fill the selection using the foreground color"),
|
||||
NC_("edit-action", "Fill with _FG Color"), "<primary>comma",
|
||||
NC_("edit-action", "Fill the selection using the foreground color"),
|
||||
GIMP_FOREGROUND_FILL, FALSE,
|
||||
GIMP_HELP_EDIT_FILL_FG },
|
||||
|
||||
{ "edit-fill-bg", GIMP_STOCK_TOOL_BUCKET_FILL,
|
||||
N_("Fill with B_G Color"), "<control>period",
|
||||
N_("Fill the selection using the background color"),
|
||||
NC_("edit-action", "Fill with B_G Color"), "<primary>period",
|
||||
NC_("edit-action", "Fill the selection using the background color"),
|
||||
GIMP_BACKGROUND_FILL, FALSE,
|
||||
GIMP_HELP_EDIT_FILL_BG },
|
||||
|
||||
{ "edit-fill-pattern", GIMP_STOCK_TOOL_BUCKET_FILL,
|
||||
N_("Fill with P_attern"), "<control>semicolon",
|
||||
N_("Fill the selection using the active pattern"),
|
||||
NC_("edit-action", "Fill _with Pattern"), "<primary>semicolon",
|
||||
NC_("edit-action", "Fill the selection using the active pattern"),
|
||||
GIMP_PATTERN_FILL, FALSE,
|
||||
GIMP_HELP_EDIT_FILL_PATTERN }
|
||||
};
|
||||
@ -213,11 +217,11 @@ edit_actions_setup (GimpActionGroup *group)
|
||||
GimpPattern *pattern;
|
||||
GtkAction *action;
|
||||
|
||||
gimp_action_group_add_actions (group,
|
||||
gimp_action_group_add_actions (group, "edit-action",
|
||||
edit_actions,
|
||||
G_N_ELEMENTS (edit_actions));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, "edit-action",
|
||||
edit_fill_actions,
|
||||
G_N_ELEMENTS (edit_fill_actions),
|
||||
G_CALLBACK (edit_fill_cmd_callback));
|
||||
@ -248,6 +252,15 @@ edit_actions_setup (GimpActionGroup *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
|
||||
@ -259,6 +272,8 @@ edit_actions_update (GimpActionGroup *group,
|
||||
gchar *undo_name = NULL;
|
||||
gchar *redo_name = NULL;
|
||||
gchar *fade_name = NULL;
|
||||
gboolean writable = FALSE;
|
||||
gboolean children = FALSE;
|
||||
gboolean undo_enabled = FALSE;
|
||||
gboolean fade_enabled = FALSE;
|
||||
|
||||
@ -266,25 +281,35 @@ edit_actions_update (GimpActionGroup *group,
|
||||
{
|
||||
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)
|
||||
{
|
||||
GimpUndo *undo = gimp_undo_stack_peek (image->undo_stack);
|
||||
GimpUndo *redo = gimp_undo_stack_peek (image->redo_stack);
|
||||
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);
|
||||
|
||||
if (undo)
|
||||
{
|
||||
undo_name =
|
||||
g_strdup_printf (_("_Undo %s"),
|
||||
gimp_object_get_name (GIMP_OBJECT (undo)));
|
||||
gimp_object_get_name (undo));
|
||||
}
|
||||
|
||||
if (redo)
|
||||
{
|
||||
redo_name =
|
||||
g_strdup_printf (_("_Redo %s"),
|
||||
gimp_object_get_name (GIMP_OBJECT (redo)));
|
||||
gimp_object_get_name (redo));
|
||||
}
|
||||
|
||||
undo = gimp_image_undo_get_fadeable (image);
|
||||
@ -299,7 +324,7 @@ edit_actions_update (GimpActionGroup *group,
|
||||
{
|
||||
fade_name =
|
||||
g_strdup_printf (_("_Fade %s..."),
|
||||
gimp_object_get_name (GIMP_OBJECT (undo)));
|
||||
gimp_object_get_name (undo));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -325,22 +350,24 @@ edit_actions_update (GimpActionGroup *group,
|
||||
g_free (redo_name);
|
||||
g_free (fade_name);
|
||||
|
||||
SET_SENSITIVE ("edit-cut", drawable);
|
||||
SET_SENSITIVE ("edit-cut", writable && !children);
|
||||
SET_SENSITIVE ("edit-copy", drawable);
|
||||
SET_SENSITIVE ("edit-copy-visible", image);
|
||||
/* "edit-paste" is always enabled */
|
||||
SET_SENSITIVE ("edit-paste", !image || (!drawable ||
|
||||
(writable && !children)));
|
||||
SET_SENSITIVE ("edit-paste-as-new-layer", image);
|
||||
SET_SENSITIVE ("edit-paste-into", image);
|
||||
SET_SENSITIVE ("edit-paste-into", image && (!drawable ||
|
||||
(writable && !children)));
|
||||
|
||||
SET_SENSITIVE ("edit-named-cut", drawable);
|
||||
SET_SENSITIVE ("edit-named-cut", writable && !children);
|
||||
SET_SENSITIVE ("edit-named-copy", drawable);
|
||||
SET_SENSITIVE ("edit-named-copy-visible", drawable);
|
||||
SET_SENSITIVE ("edit-named-paste", image);
|
||||
SET_SENSITIVE ("edit-named-paste", TRUE);
|
||||
|
||||
SET_SENSITIVE ("edit-clear", drawable);
|
||||
SET_SENSITIVE ("edit-fill-fg", drawable);
|
||||
SET_SENSITIVE ("edit-fill-bg", drawable);
|
||||
SET_SENSITIVE ("edit-fill-pattern", drawable);
|
||||
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
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __EDIT_ACTIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,14 +12,14 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
@ -34,21 +34,22 @@
|
||||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimplayer.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-new.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
|
||||
#include "vectors/gimpvectors-import.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
#include "display/gimpdisplayshell-transform.h"
|
||||
|
||||
#include "widgets/gimpclipboard.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpmessagebox.h"
|
||||
#include "widgets/gimpmessagedialog.h"
|
||||
#include "widgets/gimpwindowstrategy.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
#include "display/gimpdisplayshell-transform.h"
|
||||
|
||||
#include "dialogs/dialogs.h"
|
||||
#include "dialogs/fade-dialog.h"
|
||||
|
||||
#include "actions.h"
|
||||
@ -122,12 +123,14 @@ void
|
||||
edit_undo_clear_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GtkWidget *widget;
|
||||
GtkWidget *dialog;
|
||||
gchar *size;
|
||||
gint64 memsize;
|
||||
gint64 guisize;
|
||||
GimpImage *image;
|
||||
GimpUndoStack *undo_stack;
|
||||
GimpUndoStack *redo_stack;
|
||||
GtkWidget *widget;
|
||||
GtkWidget *dialog;
|
||||
gchar *size;
|
||||
gint64 memsize;
|
||||
gint64 guisize;
|
||||
return_if_no_image (image, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
@ -159,14 +162,15 @@ edit_undo_clear_cmd_callback (GtkAction *action,
|
||||
gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (dialog)->box,
|
||||
_("Really clear image's undo history?"));
|
||||
|
||||
memsize = gimp_object_get_memsize (GIMP_OBJECT (image->undo_stack),
|
||||
&guisize);
|
||||
undo_stack = gimp_image_get_undo_stack (image);
|
||||
redo_stack = gimp_image_get_redo_stack (image);
|
||||
|
||||
memsize = gimp_object_get_memsize (GIMP_OBJECT (undo_stack), &guisize);
|
||||
memsize += guisize;
|
||||
memsize += gimp_object_get_memsize (GIMP_OBJECT (image->redo_stack),
|
||||
&guisize);
|
||||
memsize += gimp_object_get_memsize (GIMP_OBJECT (redo_stack), &guisize);
|
||||
memsize += guisize;
|
||||
|
||||
size = g_format_size_for_display (memsize);
|
||||
size = g_format_size (memsize);
|
||||
|
||||
gimp_message_box_set_text (GIMP_MESSAGE_DIALOG (dialog)->box,
|
||||
_("Clearing the undo history of this "
|
||||
@ -197,15 +201,18 @@ edit_cut_cmd_callback (GtkAction *action,
|
||||
GimpDisplay *display = action_data_get_display (data);
|
||||
|
||||
if (display)
|
||||
gimp_message (image->gimp, G_OBJECT (display), GIMP_MESSAGE_INFO,
|
||||
_("Cut pixels to the clipboard"));
|
||||
gimp_message_literal (image->gimp,
|
||||
G_OBJECT (display), GIMP_MESSAGE_INFO,
|
||||
_("Cut pixels to the clipboard"));
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_message (image->gimp, G_OBJECT (action_data_get_display (data)),
|
||||
GIMP_MESSAGE_WARNING, "%s", error->message);
|
||||
gimp_message_literal (image->gimp,
|
||||
G_OBJECT (action_data_get_display (data)),
|
||||
GIMP_MESSAGE_WARNING,
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
}
|
||||
@ -224,15 +231,18 @@ edit_copy_cmd_callback (GtkAction *action,
|
||||
GimpDisplay *display = action_data_get_display (data);
|
||||
|
||||
if (display)
|
||||
gimp_message (image->gimp, G_OBJECT (display), GIMP_MESSAGE_INFO,
|
||||
_("Copied pixels to the clipboard"));
|
||||
gimp_message_literal (image->gimp,
|
||||
G_OBJECT (display), GIMP_MESSAGE_INFO,
|
||||
_("Copied pixels to the clipboard"));
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_message (image->gimp, G_OBJECT (action_data_get_display (data)),
|
||||
GIMP_MESSAGE_WARNING, "%s", error->message);
|
||||
gimp_message_literal (image->gimp,
|
||||
G_OBJECT (action_data_get_display (data)),
|
||||
GIMP_MESSAGE_WARNING,
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
}
|
||||
@ -250,15 +260,18 @@ edit_copy_visible_cmd_callback (GtkAction *action,
|
||||
GimpDisplay *display = action_data_get_display (data);
|
||||
|
||||
if (display)
|
||||
gimp_message (image->gimp, G_OBJECT (display), GIMP_MESSAGE_INFO,
|
||||
_("Copied pixels to the clipboard"));
|
||||
gimp_message_literal (image->gimp,
|
||||
G_OBJECT (display), GIMP_MESSAGE_INFO,
|
||||
_("Copied pixels to the clipboard"));
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_message (image->gimp, G_OBJECT (action_data_get_display (data)),
|
||||
GIMP_MESSAGE_WARNING, "%s", error->message);
|
||||
gimp_message_literal (image->gimp,
|
||||
G_OBJECT (action_data_get_display (data)),
|
||||
GIMP_MESSAGE_WARNING,
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
}
|
||||
@ -269,7 +282,7 @@ edit_paste_cmd_callback (GtkAction *action,
|
||||
{
|
||||
GimpDisplay *display = action_data_get_display (data);
|
||||
|
||||
if (display && display->image)
|
||||
if (display && gimp_display_get_image (display))
|
||||
edit_paste (display, FALSE);
|
||||
else
|
||||
edit_paste_as_new_cmd_callback (action, data);
|
||||
@ -299,20 +312,17 @@ edit_paste_as_new_cmd_callback (GtkAction *action,
|
||||
{
|
||||
GimpImage *image;
|
||||
|
||||
image = gimp_edit_paste_as_new (gimp, action_data_get_image (data),
|
||||
buffer);
|
||||
image = gimp_image_new_from_buffer (gimp, action_data_get_image (data),
|
||||
buffer);
|
||||
g_object_unref (buffer);
|
||||
|
||||
if (image)
|
||||
{
|
||||
gimp_create_display (image->gimp, image, GIMP_UNIT_PIXEL, 1.0);
|
||||
g_object_unref (image);
|
||||
}
|
||||
gimp_create_display (image->gimp, image, GIMP_UNIT_PIXEL, 1.0);
|
||||
g_object_unref (image);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_message (gimp, NULL, GIMP_MESSAGE_WARNING,
|
||||
_("There is no image data in the clipboard to paste."));
|
||||
gimp_message_literal (gimp, NULL, GIMP_MESSAGE_WARNING,
|
||||
_("There is no image data in the clipboard to paste."));
|
||||
}
|
||||
}
|
||||
|
||||
@ -339,14 +349,15 @@ edit_paste_as_new_layer_cmd_callback (GtkAction *action,
|
||||
GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
|
||||
g_object_unref (buffer);
|
||||
|
||||
gimp_image_add_layer (image, layer, -1);
|
||||
gimp_image_add_layer (image, layer,
|
||||
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_message (gimp, NULL, GIMP_MESSAGE_WARNING,
|
||||
_("There is no image data in the clipboard to paste."));
|
||||
gimp_message_literal (gimp, NULL, GIMP_MESSAGE_WARNING,
|
||||
_("There is no image data in the clipboard to paste."));
|
||||
}
|
||||
}
|
||||
|
||||
@ -435,12 +446,16 @@ void
|
||||
edit_named_paste_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GtkWidget *widget;
|
||||
return_if_no_gimp (gimp, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
gimp_dialog_factory_dialog_raise (global_dock_factory,
|
||||
gtk_widget_get_screen (widget),
|
||||
"gimp-buffer-list|gimp-buffer-grid", -1);
|
||||
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-buffer-list|gimp-buffer-grid");
|
||||
}
|
||||
|
||||
void
|
||||
@ -479,17 +494,20 @@ static void
|
||||
edit_paste (GimpDisplay *display,
|
||||
gboolean paste_into)
|
||||
{
|
||||
gchar *svg;
|
||||
gsize svg_size;
|
||||
GimpImage *image = gimp_display_get_image (display);
|
||||
gchar *svg;
|
||||
gsize svg_size;
|
||||
|
||||
svg = gimp_clipboard_get_svg (display->image->gimp, &svg_size);
|
||||
svg = gimp_clipboard_get_svg (display->gimp, &svg_size);
|
||||
|
||||
if (svg)
|
||||
{
|
||||
if (gimp_vectors_import_buffer (display->image, svg, svg_size,
|
||||
TRUE, TRUE, -1, NULL, NULL))
|
||||
if (gimp_vectors_import_buffer (image, svg, svg_size,
|
||||
TRUE, FALSE,
|
||||
GIMP_IMAGE_ACTIVE_PARENT, -1,
|
||||
NULL, NULL))
|
||||
{
|
||||
gimp_image_flush (display->image);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
g_free (svg);
|
||||
@ -498,31 +516,31 @@ edit_paste (GimpDisplay *display,
|
||||
{
|
||||
GimpBuffer *buffer;
|
||||
|
||||
buffer = gimp_clipboard_get_buffer (display->image->gimp);
|
||||
buffer = gimp_clipboard_get_buffer (display->gimp);
|
||||
|
||||
if (buffer)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
GimpDisplayShell *shell = gimp_display_get_shell (display);
|
||||
gint x, y;
|
||||
gint width, height;
|
||||
|
||||
gimp_display_shell_untransform_viewport (shell,
|
||||
&x, &y, &width, &height);
|
||||
|
||||
if (gimp_edit_paste (display->image,
|
||||
gimp_image_get_active_drawable (display->image),
|
||||
if (gimp_edit_paste (image,
|
||||
gimp_image_get_active_drawable (image),
|
||||
buffer, paste_into, x, y, width, height))
|
||||
{
|
||||
gimp_image_flush (display->image);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
g_object_unref (buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_message (display->image->gimp, G_OBJECT (display),
|
||||
GIMP_MESSAGE_WARNING,
|
||||
_("There is no image data in the clipboard to paste."));
|
||||
gimp_message_literal (display->gimp, G_OBJECT (display),
|
||||
GIMP_MESSAGE_WARNING,
|
||||
_("There is no image data in the clipboard to paste."));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -538,8 +556,8 @@ cut_named_buffer_callback (GtkWidget *widget,
|
||||
|
||||
if (! drawable)
|
||||
{
|
||||
gimp_message (image->gimp, NULL, GIMP_MESSAGE_WARNING,
|
||||
_("There is no active layer or channel to cut from."));
|
||||
gimp_message_literal (image->gimp, NULL, GIMP_MESSAGE_WARNING,
|
||||
_("There is no active layer or channel to cut from."));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -553,8 +571,8 @@ cut_named_buffer_callback (GtkWidget *widget,
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_message (image->gimp, NULL, GIMP_MESSAGE_WARNING,
|
||||
"%s", error->message);
|
||||
gimp_message_literal (image->gimp, NULL, GIMP_MESSAGE_WARNING,
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
}
|
||||
@ -570,8 +588,8 @@ copy_named_buffer_callback (GtkWidget *widget,
|
||||
|
||||
if (! drawable)
|
||||
{
|
||||
gimp_message (image->gimp, NULL, GIMP_MESSAGE_WARNING,
|
||||
_("There is no active layer or channel to copy from."));
|
||||
gimp_message_literal (image->gimp, NULL, GIMP_MESSAGE_WARNING,
|
||||
_("There is no active layer or channel to copy from."));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -585,8 +603,8 @@ copy_named_buffer_callback (GtkWidget *widget,
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_message (image->gimp, NULL, GIMP_MESSAGE_WARNING,
|
||||
"%s", error->message);
|
||||
gimp_message_literal (image->gimp, NULL, GIMP_MESSAGE_WARNING,
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
}
|
||||
@ -610,8 +628,8 @@ copy_named_visible_buffer_callback (GtkWidget *widget,
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_message (image->gimp, NULL, GIMP_MESSAGE_WARNING,
|
||||
"%s", error->message);
|
||||
gimp_message_literal (image->gimp, NULL, GIMP_MESSAGE_WARNING,
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __EDIT_COMMANDS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -37,18 +36,18 @@
|
||||
static const GimpActionEntry error_console_actions[] =
|
||||
{
|
||||
{ "error-console-popup", GIMP_STOCK_WARNING,
|
||||
N_("Error Console Menu"), NULL, NULL, NULL,
|
||||
NC_("error-console-action", "Error Console Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_ERRORS_DIALOG },
|
||||
|
||||
{ "error-console-clear", GTK_STOCK_CLEAR,
|
||||
N_("_Clear"), "",
|
||||
N_("Clear error console"),
|
||||
NC_("error-console-action", "_Clear"), "",
|
||||
NC_("error-console-action", "Clear error console"),
|
||||
G_CALLBACK (error_console_clear_cmd_callback),
|
||||
GIMP_HELP_ERRORS_CLEAR },
|
||||
|
||||
{ "error-console-select-all", NULL,
|
||||
N_("Select _All"), "",
|
||||
N_("Select all errors"),
|
||||
NC_("error-console-action", "Select _All"), "",
|
||||
NC_("error-console-action", "Select all error messages"),
|
||||
G_CALLBACK (error_console_select_all_cmd_callback),
|
||||
GIMP_HELP_ERRORS_SELECT_ALL }
|
||||
};
|
||||
@ -56,14 +55,14 @@ static const GimpActionEntry error_console_actions[] =
|
||||
static const GimpEnumActionEntry error_console_save_actions[] =
|
||||
{
|
||||
{ "error-console-save-all", GTK_STOCK_SAVE_AS,
|
||||
N_("_Save Error Log to File..."), "",
|
||||
N_("Save error log"),
|
||||
NC_("error-console-action", "_Save Error Log to File..."), "",
|
||||
NC_("error-console-action", "Write all error messages to a file"),
|
||||
FALSE, FALSE,
|
||||
GIMP_HELP_ERRORS_SAVE },
|
||||
|
||||
{ "error-console-save-selection", GTK_STOCK_SAVE_AS,
|
||||
N_("Save S_election to File..."), "",
|
||||
N_("Save selection"),
|
||||
NC_("error-console-action", "Save S_election to File..."), "",
|
||||
NC_("error-console-action", "Write the selected error messages to a file"),
|
||||
TRUE, FALSE,
|
||||
GIMP_HELP_ERRORS_SAVE }
|
||||
};
|
||||
@ -72,11 +71,11 @@ static const GimpEnumActionEntry error_console_save_actions[] =
|
||||
void
|
||||
error_console_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group,
|
||||
gimp_action_group_add_actions (group, "error-console-action",
|
||||
error_console_actions,
|
||||
G_N_ELEMENTS (error_console_actions));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, "error-console-action",
|
||||
error_console_save_actions,
|
||||
G_N_ELEMENTS (error_console_save_actions),
|
||||
G_CALLBACK (error_console_save_cmd_callback));
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __ERROR_CONSOLE_ACIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -29,7 +28,7 @@
|
||||
|
||||
#include "widgets/gimperrorconsole.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
#include "widgets/gimptextbuffer.h"
|
||||
|
||||
#include "error-console-commands.h"
|
||||
|
||||
@ -80,8 +79,9 @@ error_console_save_cmd_callback (GtkAction *action,
|
||||
if (value && ! gtk_text_buffer_get_selection_bounds (console->text_buffer,
|
||||
NULL, NULL))
|
||||
{
|
||||
gimp_message (console->gimp, G_OBJECT (console), GIMP_MESSAGE_WARNING,
|
||||
_("Cannot save. Nothing is selected."));
|
||||
gimp_message_literal (console->gimp,
|
||||
G_OBJECT (console), GIMP_MESSAGE_WARNING,
|
||||
_("Cannot save. Nothing is selected."));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -149,7 +149,8 @@ error_console_save_response (GtkWidget *dialog,
|
||||
|
||||
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
|
||||
|
||||
if (! gimp_text_buffer_save (console->text_buffer, filename,
|
||||
if (! gimp_text_buffer_save (GIMP_TEXT_BUFFER (console->text_buffer),
|
||||
filename,
|
||||
console->save_selection, &error))
|
||||
{
|
||||
gimp_message (console->gimp, G_OBJECT (dialog), GIMP_MESSAGE_ERROR,
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __ERROR_CONSOLE_COMMANDS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,12 +12,12 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
@ -33,6 +33,9 @@
|
||||
#include "core/gimpviewable.h"
|
||||
|
||||
#include "file/file-utils.h"
|
||||
#include "file/gimp-file.h"
|
||||
|
||||
#include "plug-in/gimppluginmanager-file.h"
|
||||
|
||||
#include "widgets/gimpaction.h"
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
@ -49,63 +52,65 @@
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
static void file_actions_last_opened_update (GimpContainer *container,
|
||||
GimpImagefile *unused,
|
||||
GimpActionGroup *group);
|
||||
static void file_actions_last_opened_reorder (GimpContainer *container,
|
||||
GimpImagefile *unused1,
|
||||
gint unused2,
|
||||
GimpActionGroup *group);
|
||||
static void file_actions_close_all_update (GimpContainer *images,
|
||||
GimpObject *unused,
|
||||
GimpActionGroup *group);
|
||||
static void file_actions_last_opened_update (GimpContainer *container,
|
||||
GimpImagefile *unused,
|
||||
GimpActionGroup *group);
|
||||
static void file_actions_last_opened_reorder (GimpContainer *container,
|
||||
GimpImagefile *unused1,
|
||||
gint unused2,
|
||||
GimpActionGroup *group);
|
||||
static void file_actions_close_all_update (GimpContainer *images,
|
||||
GimpObject *unused,
|
||||
GimpActionGroup *group);
|
||||
static gchar * file_actions_create_label (const gchar *format,
|
||||
const gchar *uri);
|
||||
|
||||
|
||||
static const GimpActionEntry file_actions[] =
|
||||
{
|
||||
{ "file-menu", NULL, N_("_File") },
|
||||
{ "file-create-menu", NULL, N_("Create") },
|
||||
{ "file-open-recent-menu", NULL, N_("Open _Recent") },
|
||||
{ "file-menu", NULL, NC_("file-action", "_File") },
|
||||
{ "file-create-menu", NULL, NC_("file-action", "Crea_te") },
|
||||
{ "file-open-recent-menu", NULL, NC_("file-action", "Open _Recent") },
|
||||
|
||||
{ "file-open", GTK_STOCK_OPEN,
|
||||
N_("_Open..."), NULL,
|
||||
N_("Open an image file"),
|
||||
NC_("file-action", "_Open..."), NULL,
|
||||
NC_("file-action", "Open an image file"),
|
||||
G_CALLBACK (file_open_cmd_callback),
|
||||
GIMP_HELP_FILE_OPEN },
|
||||
|
||||
{ "file-open-as-layers", GIMP_STOCK_LAYER,
|
||||
N_("Op_en as Layers..."), "<control><alt>O",
|
||||
N_("Open an image file as layers"),
|
||||
NC_("file-action", "Op_en as Layers..."), "<primary><alt>O",
|
||||
NC_("file-action", "Open an image file as layers"),
|
||||
G_CALLBACK (file_open_as_layers_cmd_callback),
|
||||
GIMP_HELP_FILE_OPEN_AS_LAYER },
|
||||
|
||||
{ "file-open-location", GIMP_STOCK_WEB,
|
||||
N_("Open _Location..."), NULL,
|
||||
N_("Open an image file from a specified location"),
|
||||
NC_("file-action", "Open _Location..."), NULL,
|
||||
NC_("file-action", "Open an image file from a specified location"),
|
||||
G_CALLBACK (file_open_location_cmd_callback),
|
||||
GIMP_HELP_FILE_OPEN_LOCATION },
|
||||
|
||||
{ "file-save-as-template", NULL,
|
||||
N_("Save as _Template..."), NULL,
|
||||
N_("Create a new template from this image"),
|
||||
G_CALLBACK (file_save_template_cmd_callback),
|
||||
GIMP_HELP_FILE_SAVE_AS_TEMPLATE },
|
||||
{ "file-create-template", NULL,
|
||||
NC_("file-action", "Create Template..."), NULL,
|
||||
NC_("file-action", "Create a new template from this image"),
|
||||
G_CALLBACK (file_create_template_cmd_callback),
|
||||
GIMP_HELP_FILE_CREATE_TEMPLATE },
|
||||
|
||||
{ "file-revert", GTK_STOCK_REVERT_TO_SAVED,
|
||||
N_("Re_vert"), NULL,
|
||||
N_("Reload the image file from disk"),
|
||||
NC_("file-action", "Re_vert"), NULL,
|
||||
NC_("file-action", "Reload the image file from disk"),
|
||||
G_CALLBACK (file_revert_cmd_callback),
|
||||
GIMP_HELP_FILE_REVERT },
|
||||
|
||||
{ "file-close-all", GTK_STOCK_CLOSE,
|
||||
N_("Close all"), "<shift><control>W",
|
||||
N_("Close all opened images"),
|
||||
NC_("file-action", "Close all"), "<primary><shift>W",
|
||||
NC_("file-action", "Close all opened images"),
|
||||
G_CALLBACK (file_close_all_cmd_callback),
|
||||
GIMP_HELP_FILE_CLOSE_ALL },
|
||||
|
||||
{ "file-quit", GTK_STOCK_QUIT,
|
||||
N_("_Quit"), "<control>Q",
|
||||
N_("Quit the GNU Image Manipulation Program"),
|
||||
NC_("file-action", "_Quit"), "<primary>Q",
|
||||
NC_("file-action", "Quit the GNU Image Manipulation Program"),
|
||||
G_CALLBACK (file_quit_cmd_callback),
|
||||
GIMP_HELP_FILE_QUIT }
|
||||
};
|
||||
@ -113,28 +118,47 @@ static const GimpActionEntry file_actions[] =
|
||||
static const GimpEnumActionEntry file_save_actions[] =
|
||||
{
|
||||
{ "file-save", GTK_STOCK_SAVE,
|
||||
N_("_Save"), "<control>S",
|
||||
N_("Save this image"),
|
||||
NC_("file-action", "_Save"), "<primary>S",
|
||||
NC_("file-action", "Save this image"),
|
||||
GIMP_SAVE_MODE_SAVE, FALSE,
|
||||
GIMP_HELP_FILE_SAVE },
|
||||
|
||||
{ "file-save-as", GTK_STOCK_SAVE_AS,
|
||||
N_("Save _As..."), "<control><shift>S",
|
||||
N_("Save this image with a different name"),
|
||||
NC_("file-action", "Save _As..."), "<primary><shift>S",
|
||||
NC_("file-action", "Save this image with a different name"),
|
||||
GIMP_SAVE_MODE_SAVE_AS, FALSE,
|
||||
GIMP_HELP_FILE_SAVE_AS },
|
||||
|
||||
{ "file-save-a-copy", NULL,
|
||||
N_("Save a Cop_y..."), NULL,
|
||||
N_("Save this image with a different name, but keep its current name"),
|
||||
NC_("file-action", "Save a Cop_y..."), NULL,
|
||||
NC_("file-action",
|
||||
"Save a copy of this image, without affecting the source file (if any) or the current state of the image"),
|
||||
GIMP_SAVE_MODE_SAVE_A_COPY, FALSE,
|
||||
GIMP_HELP_FILE_SAVE_A_COPY },
|
||||
|
||||
{ "file-save-and-close", NULL,
|
||||
N_("Save and Close..."), NULL,
|
||||
N_("Save this image and close its window"),
|
||||
NC_("file-action", "Save and Close..."), NULL,
|
||||
NC_("file-action", "Save this image and close its window"),
|
||||
GIMP_SAVE_MODE_SAVE_AND_CLOSE, FALSE,
|
||||
GIMP_HELP_FILE_SAVE }
|
||||
GIMP_HELP_FILE_SAVE },
|
||||
|
||||
{ "file-export-to", NULL,
|
||||
NC_("file-action", "Export to"), "<primary>E",
|
||||
NC_("file-action", "Export the image again"),
|
||||
GIMP_SAVE_MODE_EXPORT_TO, FALSE,
|
||||
GIMP_HELP_FILE_EXPORT_TO },
|
||||
|
||||
{ "file-overwrite", NULL,
|
||||
NC_("file-action", "Over_write"), "",
|
||||
NC_("file-action", "Export the image back to the imported file in the import format"),
|
||||
GIMP_SAVE_MODE_OVERWRITE, FALSE,
|
||||
GIMP_HELP_FILE_OVERWRITE },
|
||||
|
||||
{ "file-export", NULL,
|
||||
NC_("file-action", "Export..."), "<primary><shift>E",
|
||||
NC_("file-action", "Export the image to various file formats such as PNG or JPEG"),
|
||||
GIMP_SAVE_MODE_EXPORT, FALSE,
|
||||
GIMP_HELP_FILE_EXPORT }
|
||||
};
|
||||
|
||||
void
|
||||
@ -144,11 +168,11 @@ file_actions_setup (GimpActionGroup *group)
|
||||
gint n_entries;
|
||||
gint i;
|
||||
|
||||
gimp_action_group_add_actions (group,
|
||||
gimp_action_group_add_actions (group, "file-action",
|
||||
file_actions,
|
||||
G_N_ELEMENTS (file_actions));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, "file-action",
|
||||
file_save_actions,
|
||||
G_N_ELEMENTS (file_save_actions),
|
||||
G_CALLBACK (file_save_cmd_callback));
|
||||
@ -168,14 +192,14 @@ file_actions_setup (GimpActionGroup *group)
|
||||
entries[i].value_variable = FALSE;
|
||||
|
||||
if (i < 9)
|
||||
entries[i].accelerator = g_strdup_printf ("<control>%d", i + 1);
|
||||
entries[i].accelerator = g_strdup_printf ("<primary>%d", i + 1);
|
||||
else if (i == 9)
|
||||
entries[i].accelerator = "<control>0";
|
||||
entries[i].accelerator = "<primary>0";
|
||||
else
|
||||
entries[i].accelerator = "";
|
||||
}
|
||||
|
||||
gimp_action_group_add_enum_actions (group, entries, n_entries,
|
||||
gimp_action_group_add_enum_actions (group, NULL, entries, n_entries,
|
||||
G_CALLBACK (file_open_recent_cmd_callback));
|
||||
|
||||
for (i = 0; i < n_entries; i++)
|
||||
@ -183,6 +207,8 @@ file_actions_setup (GimpActionGroup *group)
|
||||
GtkAction *action;
|
||||
|
||||
gimp_action_group_set_action_visible (group, entries[i].name, FALSE);
|
||||
gimp_action_group_set_action_always_show_image (group, entries[i].name,
|
||||
TRUE);
|
||||
|
||||
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
||||
entries[i].name);
|
||||
@ -226,23 +252,62 @@ void
|
||||
file_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image = action_data_get_image (data);
|
||||
GimpDrawable *drawable = NULL;
|
||||
Gimp *gimp = action_data_get_gimp (data);
|
||||
GimpImage *image = action_data_get_image (data);
|
||||
GimpDrawable *drawable = NULL;
|
||||
const gchar *source = NULL;
|
||||
const gchar *export = NULL;
|
||||
gboolean show_overwrite = FALSE;
|
||||
|
||||
if (image)
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
{
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
source = gimp_image_get_imported_uri (image);
|
||||
export = gimp_image_get_exported_uri (image);
|
||||
}
|
||||
|
||||
show_overwrite =
|
||||
(source &&
|
||||
gimp_plug_in_manager_uri_has_exporter (gimp->plug_in_manager,
|
||||
source));
|
||||
|
||||
#define SET_VISIBLE(action,condition) \
|
||||
gimp_action_group_set_action_visible (group, action, (condition) != 0)
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
|
||||
SET_SENSITIVE ("file-save", image && drawable);
|
||||
SET_SENSITIVE ("file-save-as", image && drawable);
|
||||
SET_SENSITIVE ("file-save-a-copy", image && drawable);
|
||||
SET_SENSITIVE ("file-save-as-template", image);
|
||||
SET_SENSITIVE ("file-revert", image && GIMP_OBJECT (image)->name);
|
||||
SET_SENSITIVE ("file-save", drawable);
|
||||
SET_SENSITIVE ("file-save-as", drawable);
|
||||
SET_SENSITIVE ("file-save-a-copy", drawable);
|
||||
SET_SENSITIVE ("file-revert", image && (gimp_image_get_uri (image) || source));
|
||||
SET_SENSITIVE ("file-export-to", drawable);
|
||||
SET_VISIBLE ("file-export-to", ! show_overwrite);
|
||||
SET_SENSITIVE ("file-overwrite", show_overwrite);
|
||||
SET_VISIBLE ("file-overwrite", show_overwrite);
|
||||
SET_SENSITIVE ("file-export", drawable);
|
||||
SET_SENSITIVE ("file-create-template", image);
|
||||
|
||||
if (export)
|
||||
{
|
||||
gchar *label = file_actions_create_label (_("Export to %s"), export);
|
||||
gimp_action_group_set_action_label (group, "file-export-to", label);
|
||||
g_free (label);
|
||||
}
|
||||
else if (show_overwrite)
|
||||
{
|
||||
gchar *label = file_actions_create_label (_("Over_write %s"), source);
|
||||
gimp_action_group_set_action_label (group, "file-overwrite", label);
|
||||
g_free (label);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_action_group_set_action_label (group,
|
||||
"file-export-to", _("Export to"));
|
||||
}
|
||||
|
||||
/* needed for the empty display */
|
||||
SET_SENSITIVE ("file-close-all", image);
|
||||
SET_SENSITIVE ("file-close-all", image);
|
||||
|
||||
#undef SET_SENSITIVE
|
||||
}
|
||||
@ -259,7 +324,7 @@ file_actions_last_opened_update (GimpContainer *container,
|
||||
gint i;
|
||||
gint n = GIMP_GUI_CONFIG (group->gimp->config)->last_opened_size;
|
||||
|
||||
num_documents = gimp_container_num_children (container);
|
||||
num_documents = gimp_container_get_n_children (container);
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
@ -280,7 +345,7 @@ file_actions_last_opened_update (GimpContainer *container,
|
||||
gchar *basename;
|
||||
gchar *escaped;
|
||||
|
||||
uri = gimp_object_get_name (GIMP_OBJECT (imagefile));
|
||||
uri = gimp_object_get_name (imagefile);
|
||||
|
||||
filename = file_utils_uri_display_name (uri);
|
||||
basename = file_utils_uri_display_basename (uri);
|
||||
@ -329,7 +394,7 @@ file_actions_close_all_update (GimpContainer *images,
|
||||
GimpActionGroup *group)
|
||||
{
|
||||
GimpContainer *container = group->gimp->displays;
|
||||
gint n_displays = gimp_container_num_children (container);
|
||||
gint n_displays = gimp_container_get_n_children (container);
|
||||
gboolean sensitive = (n_displays > 0);
|
||||
|
||||
if (n_displays == 1)
|
||||
@ -338,9 +403,23 @@ file_actions_close_all_update (GimpContainer *images,
|
||||
|
||||
display = GIMP_DISPLAY (gimp_container_get_first_child (container));
|
||||
|
||||
if (! display->image)
|
||||
if (! gimp_display_get_image (display))
|
||||
sensitive = FALSE;
|
||||
}
|
||||
|
||||
gimp_action_group_set_action_sensitive (group, "file-close-all", sensitive);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
file_actions_create_label (const gchar *format,
|
||||
const gchar *uri)
|
||||
{
|
||||
gchar *basename = file_utils_uri_display_basename (uri);
|
||||
gchar *escaped_basename = gimp_escape_uline (basename);
|
||||
gchar *label = g_strdup_printf (format, escaped_basename);
|
||||
|
||||
g_free (escaped_basename);
|
||||
g_free (basename);
|
||||
|
||||
return label;
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __FILE_ACTIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,14 +12,14 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
@ -40,6 +40,7 @@
|
||||
#include "file/file-procedure.h"
|
||||
#include "file/file-save.h"
|
||||
#include "file/file-utils.h"
|
||||
#include "file/gimp-file.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
@ -51,7 +52,7 @@
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplay-foreach.h"
|
||||
|
||||
#include "dialogs/dialogs.h"
|
||||
#include "dialogs/file-save-dialog.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "file-commands.h"
|
||||
@ -64,25 +65,32 @@
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
static void file_open_dialog_show (Gimp *gimp,
|
||||
GtkWidget *parent,
|
||||
const gchar *title,
|
||||
GimpImage *image,
|
||||
const gchar *uri,
|
||||
gboolean open_as_layers);
|
||||
static void file_save_dialog_show (GimpImage *image,
|
||||
GtkWidget *parent,
|
||||
const gchar *title,
|
||||
gboolean save_a_copy,
|
||||
gboolean close_after_saving);
|
||||
static void file_save_dialog_destroyed (GtkWidget *dialog,
|
||||
GimpImage *image);
|
||||
static void file_new_template_callback (GtkWidget *widget,
|
||||
const gchar *name,
|
||||
gpointer data);
|
||||
static void file_revert_confirm_response (GtkWidget *dialog,
|
||||
gint response_id,
|
||||
GimpDisplay *display);
|
||||
static void file_open_dialog_show (Gimp *gimp,
|
||||
GtkWidget *parent,
|
||||
const gchar *title,
|
||||
GimpImage *image,
|
||||
const gchar *uri,
|
||||
gboolean open_as_layers);
|
||||
static void file_save_dialog_show (Gimp *gimp,
|
||||
GimpImage *image,
|
||||
GtkWidget *parent,
|
||||
const gchar *title,
|
||||
gboolean save_a_copy,
|
||||
gboolean close_after_saving);
|
||||
static void file_export_dialog_show (Gimp *gimp,
|
||||
GimpImage *image,
|
||||
GtkWidget *parent);
|
||||
static void file_save_dialog_destroyed (GtkWidget *dialog,
|
||||
GimpImage *image);
|
||||
static void file_export_dialog_destroyed (GtkWidget *dialog,
|
||||
GimpImage *image);
|
||||
static void file_new_template_callback (GtkWidget *widget,
|
||||
const gchar *name,
|
||||
gpointer data);
|
||||
static void file_revert_confirm_response (GtkWidget *dialog,
|
||||
gint response_id,
|
||||
GimpDisplay *display);
|
||||
|
||||
|
||||
|
||||
/* public functions */
|
||||
@ -119,7 +127,7 @@ file_open_as_layers_cmd_callback (GtkAction *action,
|
||||
display = action_data_get_display (data);
|
||||
|
||||
if (display)
|
||||
image = display->image;
|
||||
image = gimp_display_get_image (display);
|
||||
|
||||
file_open_dialog_show (gimp, widget,
|
||||
_("Open Image as Layers"),
|
||||
@ -133,8 +141,9 @@ file_open_location_cmd_callback (GtkAction *action,
|
||||
GtkWidget *widget;
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
gimp_dialog_factory_dialog_new (global_dialog_factory,
|
||||
gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (widget),
|
||||
NULL /*ui_manager*/,
|
||||
"gimp-file-open-location-dialog", -1, TRUE);
|
||||
}
|
||||
|
||||
@ -148,7 +157,7 @@ file_open_recent_cmd_callback (GtkAction *action,
|
||||
gint num_entries;
|
||||
return_if_no_gimp (gimp, data);
|
||||
|
||||
num_entries = gimp_container_num_children (gimp->documents);
|
||||
num_entries = gimp_container_get_n_children (gimp->documents);
|
||||
|
||||
if (value >= num_entries)
|
||||
return;
|
||||
@ -168,17 +177,18 @@ file_open_recent_cmd_callback (GtkAction *action,
|
||||
g_object_ref (display);
|
||||
g_object_ref (imagefile);
|
||||
|
||||
progress = display->image ? NULL : GIMP_PROGRESS (display);
|
||||
progress = gimp_display_get_image (display) ?
|
||||
NULL : GIMP_PROGRESS (display);
|
||||
|
||||
image = file_open_with_display (gimp, action_data_get_context (data),
|
||||
progress,
|
||||
GIMP_OBJECT (imagefile)->name, FALSE,
|
||||
gimp_object_get_name (imagefile), FALSE,
|
||||
&status, &error);
|
||||
|
||||
if (! image && status != GIMP_PDB_CANCEL)
|
||||
{
|
||||
gchar *filename =
|
||||
file_utils_uri_display_name (GIMP_OBJECT (imagefile)->name);
|
||||
file_utils_uri_display_name (gimp_object_get_name (imagefile));
|
||||
|
||||
gimp_message (gimp, G_OBJECT (display), GIMP_MESSAGE_ERROR,
|
||||
_("Opening '%s' failed:\n\n%s"),
|
||||
@ -198,30 +208,32 @@ file_save_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
GtkWidget *widget;
|
||||
GimpSaveMode save_mode;
|
||||
const gchar *uri;
|
||||
gboolean saved = FALSE;
|
||||
return_if_no_gimp (gimp, data);
|
||||
return_if_no_display (display, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
image = display->image;
|
||||
image = gimp_display_get_image (display);
|
||||
|
||||
save_mode = (GimpSaveMode) value;
|
||||
|
||||
if (! gimp_image_get_active_drawable (image))
|
||||
return;
|
||||
|
||||
uri = gimp_object_get_name (GIMP_OBJECT (image));
|
||||
uri = gimp_image_get_uri (image);
|
||||
|
||||
switch (save_mode)
|
||||
{
|
||||
case GIMP_SAVE_MODE_SAVE:
|
||||
case GIMP_SAVE_MODE_SAVE_AND_CLOSE:
|
||||
/* Only save if the image has been modified, or if it is new. */
|
||||
if ((image->dirty ||
|
||||
if ((gimp_image_is_dirty (image) ||
|
||||
! GIMP_GUI_CONFIG (image->gimp->config)->trust_dirty_flag) ||
|
||||
uri == NULL)
|
||||
{
|
||||
@ -236,59 +248,11 @@ file_save_cmd_callback (GtkAction *action,
|
||||
|
||||
if (uri && save_proc)
|
||||
{
|
||||
GimpPDBStatusType status;
|
||||
GError *error = NULL;
|
||||
GList *list;
|
||||
|
||||
for (list = gimp_action_groups_from_name ("file");
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
gimp_action_group_set_action_sensitive (list->data,
|
||||
"file-quit",
|
||||
FALSE);
|
||||
}
|
||||
|
||||
status = file_save (image, action_data_get_context (data),
|
||||
GIMP_PROGRESS (display),
|
||||
uri, save_proc,
|
||||
GIMP_RUN_WITH_LAST_VALS, FALSE, &error);
|
||||
|
||||
switch (status)
|
||||
{
|
||||
case GIMP_PDB_SUCCESS:
|
||||
saved = TRUE;
|
||||
break;
|
||||
|
||||
case GIMP_PDB_CANCEL:
|
||||
gimp_message (image->gimp, G_OBJECT (display),
|
||||
GIMP_MESSAGE_INFO,
|
||||
_("Saving canceled"));
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
gchar *filename = file_utils_uri_display_name (uri);
|
||||
|
||||
gimp_message (image->gimp, G_OBJECT (display),
|
||||
GIMP_MESSAGE_ERROR,
|
||||
_("Saving '%s' failed:\n\n%s"),
|
||||
filename, error->message);
|
||||
g_free (filename);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
for (list = gimp_action_groups_from_name ("file");
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
gimp_action_group_set_action_sensitive (list->data,
|
||||
"file-quit",
|
||||
TRUE);
|
||||
}
|
||||
|
||||
saved = file_save_dialog_save_image (GIMP_PROGRESS (display),
|
||||
gimp, image, uri,
|
||||
save_proc,
|
||||
GIMP_RUN_WITH_LAST_VALS,
|
||||
TRUE, FALSE, TRUE);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -296,48 +260,107 @@ file_save_cmd_callback (GtkAction *action,
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_message (image->gimp, G_OBJECT (display),
|
||||
GIMP_MESSAGE_INFO, _("No changes need to be saved"));
|
||||
gimp_message_literal (image->gimp,
|
||||
G_OBJECT (display), GIMP_MESSAGE_INFO,
|
||||
_("No changes need to be saved"));
|
||||
saved = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
case GIMP_SAVE_MODE_SAVE_AS:
|
||||
file_save_dialog_show (display->image, widget,
|
||||
file_save_dialog_show (gimp, image, widget,
|
||||
_("Save Image"), FALSE,
|
||||
save_mode == GIMP_SAVE_MODE_SAVE_AND_CLOSE);
|
||||
break;
|
||||
|
||||
case GIMP_SAVE_MODE_SAVE_A_COPY:
|
||||
file_save_dialog_show (display->image, widget,
|
||||
file_save_dialog_show (gimp, image, widget,
|
||||
_("Save a Copy of the Image"), TRUE,
|
||||
FALSE);
|
||||
break;
|
||||
|
||||
case GIMP_SAVE_MODE_EXPORT:
|
||||
file_export_dialog_show (gimp, image, widget);
|
||||
break;
|
||||
|
||||
case GIMP_SAVE_MODE_EXPORT_TO:
|
||||
case GIMP_SAVE_MODE_OVERWRITE:
|
||||
{
|
||||
const gchar *uri = NULL;
|
||||
GimpPlugInProcedure *export_proc;
|
||||
|
||||
if (save_mode == GIMP_SAVE_MODE_EXPORT_TO)
|
||||
{
|
||||
uri = gimp_image_get_exported_uri (image);
|
||||
|
||||
if (! uri)
|
||||
{
|
||||
/* Behave as if Export... was invoked */
|
||||
file_export_dialog_show (gimp, image, widget);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (save_mode == GIMP_SAVE_MODE_OVERWRITE)
|
||||
{
|
||||
uri = gimp_image_get_imported_uri (image);
|
||||
}
|
||||
|
||||
if (uri)
|
||||
{
|
||||
export_proc =
|
||||
file_procedure_find (image->gimp->plug_in_manager->export_procs,
|
||||
uri, NULL);
|
||||
}
|
||||
|
||||
if (uri && export_proc)
|
||||
{
|
||||
char *uri_copy;
|
||||
|
||||
/* The memory that 'uri' points to can be freed by
|
||||
file_save_dialog_save_image(), when it eventually calls
|
||||
gimp_image_set_imported_uri() to reset the imported uri,
|
||||
resulting in garbage. So make a duplicate of it here. */
|
||||
|
||||
uri_copy = g_strdup (uri);
|
||||
|
||||
saved = file_save_dialog_save_image (GIMP_PROGRESS (display),
|
||||
gimp, image, uri_copy,
|
||||
export_proc,
|
||||
GIMP_RUN_WITH_LAST_VALS,
|
||||
FALSE, TRUE, TRUE);
|
||||
g_free (uri_copy);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (save_mode == GIMP_SAVE_MODE_SAVE_AND_CLOSE &&
|
||||
saved && ! display->image->dirty)
|
||||
saved &&
|
||||
! gimp_image_is_dirty (image))
|
||||
{
|
||||
gimp_display_close (display);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
file_save_template_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
file_create_template_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
GtkWidget *dialog;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
image = gimp_display_get_image (display);
|
||||
|
||||
dialog = gimp_query_string_box (_("Create New Template"),
|
||||
display->shell,
|
||||
GTK_WIDGET (gimp_display_get_shell (display)),
|
||||
gimp_standard_help_func,
|
||||
GIMP_HELP_FILE_SAVE_AS_TEMPLATE,
|
||||
GIMP_HELP_FILE_CREATE_TEMPLATE,
|
||||
_("Enter a name for this template"),
|
||||
NULL,
|
||||
G_OBJECT (display->image), "disconnect",
|
||||
file_new_template_callback, display->image);
|
||||
G_OBJECT (image), "disconnect",
|
||||
file_new_template_callback, image);
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
@ -348,20 +371,28 @@ file_revert_cmd_callback (GtkAction *action,
|
||||
GimpDisplay *display;
|
||||
GimpImage *image;
|
||||
GtkWidget *dialog;
|
||||
const gchar *uri;
|
||||
const gchar *uri = NULL;
|
||||
const gchar *source = NULL;
|
||||
return_if_no_display (display, data);
|
||||
|
||||
image = display->image;
|
||||
image = gimp_display_get_image (display);
|
||||
|
||||
uri = gimp_object_get_name (GIMP_OBJECT (image));
|
||||
|
||||
dialog = g_object_get_data (G_OBJECT (image), REVERT_DATA_KEY);
|
||||
uri = gimp_image_get_uri (image);
|
||||
|
||||
if (! uri)
|
||||
{
|
||||
gimp_message (image->gimp, G_OBJECT (display), GIMP_MESSAGE_ERROR,
|
||||
_("Revert failed. "
|
||||
"No file name associated with this image."));
|
||||
uri = gimp_image_get_imported_uri (image);
|
||||
source = uri;
|
||||
}
|
||||
|
||||
dialog = g_object_get_data (G_OBJECT (image), REVERT_DATA_KEY);
|
||||
|
||||
if (! uri && ! source)
|
||||
{
|
||||
gimp_message_literal (image->gimp,
|
||||
G_OBJECT (display), GIMP_MESSAGE_ERROR,
|
||||
_("Revert failed. "
|
||||
"No file name associated with this image."));
|
||||
}
|
||||
else if (dialog)
|
||||
{
|
||||
@ -374,7 +405,8 @@ file_revert_cmd_callback (GtkAction *action,
|
||||
|
||||
dialog =
|
||||
gimp_message_dialog_new (_("Revert Image"), GTK_STOCK_REVERT_TO_SAVED,
|
||||
display->shell, 0,
|
||||
GTK_WIDGET (gimp_display_get_shell (display)),
|
||||
0,
|
||||
gimp_standard_help_func, GIMP_HELP_FILE_REVERT,
|
||||
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
@ -395,7 +427,11 @@ file_revert_cmd_callback (GtkAction *action,
|
||||
G_CALLBACK (file_revert_confirm_response),
|
||||
display);
|
||||
|
||||
basename = file_utils_uri_display_basename (uri);
|
||||
if (! source)
|
||||
basename = file_utils_uri_display_basename (uri);
|
||||
else
|
||||
basename = g_strdup (gimp_image_get_uri_or_untitled (image));
|
||||
|
||||
filename = file_utils_uri_display_name (uri);
|
||||
|
||||
gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (dialog)->box,
|
||||
@ -431,7 +467,7 @@ file_close_all_cmd_callback (GtkAction *action,
|
||||
GtkWidget *widget;
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||
gimp_dialog_factory_dialog_raise (gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (widget),
|
||||
"gimp-close-all-dialog", -1);
|
||||
}
|
||||
@ -470,17 +506,18 @@ file_open_dialog_show (Gimp *gimp,
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gimp_dialog_factory_dialog_new (global_dialog_factory,
|
||||
dialog = gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (parent),
|
||||
NULL /*ui_manager*/,
|
||||
"gimp-file-open-dialog", -1, FALSE);
|
||||
|
||||
if (dialog)
|
||||
{
|
||||
if (! uri && image)
|
||||
uri = gimp_object_get_name (GIMP_OBJECT (image));
|
||||
uri = gimp_image_get_uri (image);
|
||||
|
||||
if (! uri)
|
||||
uri = g_object_get_data (G_OBJECT (gimp), "gimp-file-open-last-uri");
|
||||
uri = g_object_get_data (G_OBJECT (gimp), GIMP_FILE_OPEN_LAST_URI_KEY);
|
||||
|
||||
if (uri)
|
||||
gtk_file_chooser_set_uri (GTK_FILE_CHOOSER (dialog), uri);
|
||||
@ -499,7 +536,8 @@ file_open_dialog_show (Gimp *gimp,
|
||||
}
|
||||
|
||||
static void
|
||||
file_save_dialog_show (GimpImage *image,
|
||||
file_save_dialog_show (Gimp *gimp,
|
||||
GimpImage *image,
|
||||
GtkWidget *parent,
|
||||
const gchar *title,
|
||||
gboolean save_a_copy,
|
||||
@ -511,8 +549,9 @@ file_save_dialog_show (GimpImage *image,
|
||||
|
||||
if (! dialog)
|
||||
{
|
||||
dialog = gimp_dialog_factory_dialog_new (global_dialog_factory,
|
||||
dialog = gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (parent),
|
||||
NULL /*ui_manager*/,
|
||||
"gimp-file-save-dialog",
|
||||
-1, FALSE);
|
||||
|
||||
@ -535,7 +574,8 @@ file_save_dialog_show (GimpImage *image,
|
||||
gtk_window_set_title (GTK_WINDOW (dialog), title);
|
||||
|
||||
gimp_file_dialog_set_save_image (GIMP_FILE_DIALOG (dialog),
|
||||
image, save_a_copy, close_after_saving);
|
||||
gimp, image, save_a_copy, FALSE,
|
||||
close_after_saving);
|
||||
|
||||
gtk_window_present (GTK_WINDOW (dialog));
|
||||
}
|
||||
@ -549,6 +589,58 @@ file_save_dialog_destroyed (GtkWidget *dialog,
|
||||
g_object_set_data (G_OBJECT (image), "gimp-file-save-dialog", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
file_export_dialog_show (Gimp *gimp,
|
||||
GimpImage *image,
|
||||
GtkWidget *parent)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = g_object_get_data (G_OBJECT (image), "gimp-file-export-dialog");
|
||||
|
||||
if (! dialog)
|
||||
{
|
||||
dialog = gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
|
||||
gtk_widget_get_screen (parent),
|
||||
NULL /*ui_manager*/,
|
||||
"gimp-file-export-dialog",
|
||||
-1, FALSE);
|
||||
|
||||
if (dialog)
|
||||
{
|
||||
gtk_window_set_transient_for (GTK_WINDOW (dialog),
|
||||
GTK_WINDOW (parent));
|
||||
|
||||
g_object_set_data_full (G_OBJECT (image),
|
||||
"gimp-file-export-dialog", dialog,
|
||||
(GDestroyNotify) gtk_widget_destroy);
|
||||
g_signal_connect (dialog, "destroy",
|
||||
G_CALLBACK (file_export_dialog_destroyed),
|
||||
image);
|
||||
}
|
||||
}
|
||||
|
||||
if (dialog)
|
||||
{
|
||||
gimp_file_dialog_set_save_image (GIMP_FILE_DIALOG (dialog),
|
||||
gimp,
|
||||
image,
|
||||
FALSE,
|
||||
TRUE,
|
||||
FALSE);
|
||||
|
||||
gtk_window_present (GTK_WINDOW (dialog));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
file_export_dialog_destroyed (GtkWidget *dialog,
|
||||
GimpImage *image)
|
||||
{
|
||||
if (GIMP_FILE_DIALOG (dialog)->image == image)
|
||||
g_object_set_data (G_OBJECT (image), "gimp-file-export-dialog", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
file_new_template_callback (GtkWidget *widget,
|
||||
const gchar *name,
|
||||
@ -573,7 +665,7 @@ file_revert_confirm_response (GtkWidget *dialog,
|
||||
gint response_id,
|
||||
GimpDisplay *display)
|
||||
{
|
||||
GimpImage *old_image = display->image;
|
||||
GimpImage *old_image = gimp_display_get_image (display);
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
|
||||
@ -587,7 +679,10 @@ file_revert_confirm_response (GtkWidget *dialog,
|
||||
GimpPDBStatusType status;
|
||||
GError *error = NULL;
|
||||
|
||||
uri = gimp_object_get_name (GIMP_OBJECT (old_image));
|
||||
uri = gimp_image_get_uri (old_image);
|
||||
|
||||
if (! uri)
|
||||
uri = gimp_image_get_imported_uri (old_image);
|
||||
|
||||
new_image = file_open_image (gimp, gimp_get_user_context (gimp),
|
||||
GIMP_PROGRESS (display),
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __FILE_COMMANDS_H__
|
||||
@ -33,7 +32,7 @@ void file_open_recent_cmd_callback (GtkAction *action,
|
||||
void file_save_cmd_callback (GtkAction *action,
|
||||
gint value,
|
||||
gpointer data);
|
||||
void file_save_template_cmd_callback (GtkAction *action,
|
||||
void file_create_template_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
|
||||
void file_revert_cmd_callback (GtkAction *action,
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -41,12 +40,12 @@
|
||||
static const GimpActionEntry fonts_actions[] =
|
||||
{
|
||||
{ "fonts-popup", GIMP_STOCK_FONT,
|
||||
N_("Fonts Menu"), NULL, NULL, NULL,
|
||||
NC_("fonts-action", "Fonts Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_FONT_DIALOG },
|
||||
|
||||
{ "fonts-refresh", GTK_STOCK_REFRESH,
|
||||
N_("_Rescan Font List"), "",
|
||||
N_("Rescan font list"),
|
||||
NC_("fonts-action", "_Rescan Font List"), "",
|
||||
NC_("fonts-action", "Rescan the installed fonts"),
|
||||
G_CALLBACK (fonts_refresh_cmd_callback),
|
||||
GIMP_HELP_FONT_REFRESH }
|
||||
};
|
||||
@ -55,7 +54,7 @@ static const GimpActionEntry fonts_actions[] =
|
||||
void
|
||||
fonts_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group,
|
||||
gimp_action_group_add_actions (group, "fonts-action",
|
||||
fonts_actions,
|
||||
G_N_ELEMENTS (fonts_actions));
|
||||
}
|
||||
@ -64,12 +63,6 @@ void
|
||||
fonts_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpContext *context = action_data_get_context (data);
|
||||
GimpFont *font = NULL;
|
||||
|
||||
if (context)
|
||||
font = gimp_context_get_font (context);
|
||||
|
||||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __FONTS_ACTIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __FONTS_COMMANDS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -43,33 +42,33 @@
|
||||
static const GimpActionEntry gradient_editor_actions[] =
|
||||
{
|
||||
{ "gradient-editor-popup", GIMP_STOCK_GRADIENT,
|
||||
N_("Gradient Editor Menu"), NULL, NULL, NULL,
|
||||
NC_("gradient-editor-action", "Gradient Editor Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_GRADIENT_EDITOR_DIALOG },
|
||||
|
||||
{ "gradient-editor-left-color-type", NULL,
|
||||
N_("Left Color Type") },
|
||||
NC_("gradient-editor-action", "Left Color Type") },
|
||||
{ "gradient-editor-load-left-color", GTK_STOCK_REVERT_TO_SAVED,
|
||||
N_("_Load Left Color From") },
|
||||
NC_("gradient-editor-action", "_Load Left Color From") },
|
||||
{ "gradient-editor-save-left-color", GTK_STOCK_SAVE,
|
||||
N_("_Save Left Color To") },
|
||||
NC_("gradient-editor-action", "_Save Left Color To") },
|
||||
|
||||
{ "gradient-editor-right-color-type", NULL,
|
||||
N_("Right Color Type") },
|
||||
NC_("gradient-editor-action", "Right Color Type") },
|
||||
{ "gradient-editor-load-right-color", GTK_STOCK_REVERT_TO_SAVED,
|
||||
N_("Load Right Color Fr_om") },
|
||||
NC_("gradient-editor-action", "Load Right Color Fr_om") },
|
||||
{ "gradient-editor-save-right-color", GTK_STOCK_SAVE,
|
||||
N_("Sa_ve Right Color To") },
|
||||
NC_("gradient-editor-action", "Sa_ve Right Color To") },
|
||||
|
||||
{ "gradient-editor-blending-func", NULL, "blending-function" },
|
||||
{ "gradient-editor-coloring-type", NULL, "coloring-type" },
|
||||
|
||||
{ "gradient-editor-left-color", NULL,
|
||||
N_("L_eft Endpoint's Color..."), NULL, NULL,
|
||||
NC_("gradient-editor-action", "L_eft Endpoint's Color..."), NULL, NULL,
|
||||
G_CALLBACK (gradient_editor_left_color_cmd_callback),
|
||||
GIMP_HELP_GRADIENT_EDITOR_LEFT_COLOR },
|
||||
|
||||
{ "gradient-editor-right-color", NULL,
|
||||
N_("R_ight Endpoint's Color..."), NULL, NULL,
|
||||
NC_("gradient-editor-action", "R_ight Endpoint's Color..."), NULL, NULL,
|
||||
G_CALLBACK (gradient_editor_right_color_cmd_callback),
|
||||
GIMP_HELP_GRADIENT_EDITOR_RIGHT_COLOR },
|
||||
|
||||
@ -109,12 +108,12 @@ static const GimpActionEntry gradient_editor_actions[] =
|
||||
GIMP_HELP_GRADIENT_EDITOR_REDISTRIBUTE },
|
||||
|
||||
{ "gradient-editor-blend-color", NULL,
|
||||
N_("Ble_nd Endpoints' Colors"), NULL, NULL,
|
||||
NC_("gradient-editor-action", "Ble_nd Endpoints' Colors"), NULL, NULL,
|
||||
G_CALLBACK (gradient_editor_blend_color_cmd_callback),
|
||||
GIMP_HELP_GRADIENT_EDITOR_BLEND_COLOR },
|
||||
|
||||
{ "gradient-editor-blend-opacity", NULL,
|
||||
N_("Blend Endpoints' Opacit_y"), NULL, NULL,
|
||||
NC_("gradient-editor-action", "Blend Endpoints' Opacit_y"), NULL, NULL,
|
||||
G_CALLBACK (gradient_editor_blend_opacity_cmd_callback),
|
||||
GIMP_HELP_GRADIENT_EDITOR_BLEND_OPACITY }
|
||||
};
|
||||
@ -122,7 +121,7 @@ static const GimpActionEntry gradient_editor_actions[] =
|
||||
static const GimpToggleActionEntry gradient_editor_toggle_actions[] =
|
||||
{
|
||||
{ "gradient-editor-edit-active", GIMP_STOCK_LINKED,
|
||||
N_("Edit Active Gradient"), NULL, NULL,
|
||||
NC_("gradient-editor-action", "Edit Active Gradient"), NULL, NULL,
|
||||
G_CALLBACK (data_editor_edit_active_cmd_callback),
|
||||
FALSE,
|
||||
GIMP_HELP_GRADIENT_EDITOR_EDIT_ACTIVE }
|
||||
@ -153,22 +152,22 @@ static const GimpToggleActionEntry gradient_editor_toggle_actions[] =
|
||||
static const GimpEnumActionEntry gradient_editor_load_left_actions[] =
|
||||
{
|
||||
{ "gradient-editor-load-left-left-neighbor", NULL,
|
||||
N_("_Left Neighbor's Right Endpoint"), NULL, NULL,
|
||||
NC_("gradient-editor-action", "_Left Neighbor's Right Endpoint"), NULL, NULL,
|
||||
GRADIENT_EDITOR_COLOR_NEIGHBOR_ENDPOINT, FALSE,
|
||||
GIMP_HELP_GRADIENT_EDITOR_LEFT_LOAD },
|
||||
|
||||
{ "gradient-editor-load-left-right-endpoint", NULL,
|
||||
N_("_Right Endpoint"), NULL, NULL,
|
||||
NC_("gradient-editor-action", "_Right Endpoint"), NULL, NULL,
|
||||
GRADIENT_EDITOR_COLOR_OTHER_ENDPOINT, FALSE,
|
||||
GIMP_HELP_GRADIENT_EDITOR_LEFT_LOAD },
|
||||
|
||||
{ "gradient-editor-load-left-fg", NULL,
|
||||
N_("_Foreground Color"), NULL, NULL,
|
||||
NC_("gradient-editor-action", "_Foreground Color"), NULL, NULL,
|
||||
GRADIENT_EDITOR_COLOR_FOREGROUND, FALSE,
|
||||
GIMP_HELP_GRADIENT_EDITOR_LEFT_LOAD },
|
||||
|
||||
{ "gradient-editor-load-left-bg", NULL,
|
||||
N_("_Background Color"), NULL, NULL,
|
||||
NC_("gradient-editor-action", "_Background Color"), NULL, NULL,
|
||||
GRADIENT_EDITOR_COLOR_BACKGROUND, FALSE,
|
||||
GIMP_HELP_GRADIENT_EDITOR_LEFT_LOAD },
|
||||
|
||||
@ -201,22 +200,22 @@ static const GimpEnumActionEntry gradient_editor_save_left_actions[] =
|
||||
static const GimpEnumActionEntry gradient_editor_load_right_actions[] =
|
||||
{
|
||||
{ "gradient-editor-load-right-right-neighbor", NULL,
|
||||
N_("_Right Neighbor's Left Endpoint"), NULL, NULL,
|
||||
NC_("gradient-editor-action", "_Right Neighbor's Left Endpoint"), NULL, NULL,
|
||||
GRADIENT_EDITOR_COLOR_NEIGHBOR_ENDPOINT, FALSE,
|
||||
GIMP_HELP_GRADIENT_EDITOR_RIGHT_LOAD },
|
||||
|
||||
{ "gradient-editor-load-right-left-endpoint", NULL,
|
||||
N_("_Left Endpoint"), NULL, NULL,
|
||||
NC_("gradient-editor-action", "_Left Endpoint"), NULL, NULL,
|
||||
GRADIENT_EDITOR_COLOR_OTHER_ENDPOINT, FALSE,
|
||||
GIMP_HELP_GRADIENT_EDITOR_RIGHT_LOAD },
|
||||
|
||||
{ "gradient-editor-load-right-fg", NULL,
|
||||
N_("_Foreground Color"), NULL, NULL,
|
||||
NC_("gradient-editor-action", "_Foreground Color"), NULL, NULL,
|
||||
GRADIENT_EDITOR_COLOR_FOREGROUND, FALSE,
|
||||
GIMP_HELP_GRADIENT_EDITOR_RIGHT_LOAD },
|
||||
|
||||
{ "gradient-editor-load-right-bg", NULL,
|
||||
N_("_Background Color"), NULL, NULL,
|
||||
NC_("gradient-editor-action", "_Background Color"), NULL, NULL,
|
||||
GRADIENT_EDITOR_COLOR_BACKGROUND, FALSE,
|
||||
GIMP_HELP_GRADIENT_EDITOR_RIGHT_LOAD },
|
||||
|
||||
@ -255,27 +254,29 @@ static const GimpEnumActionEntry gradient_editor_save_right_actions[] =
|
||||
static const GimpRadioActionEntry gradient_editor_left_color_type_actions[] =
|
||||
{
|
||||
{ "gradient-editor-left-color-fixed", NULL,
|
||||
N_("_Fixed"), NULL, NULL,
|
||||
NC_("gradient-editor-color-type", "_Fixed"), NULL, NULL,
|
||||
GIMP_GRADIENT_COLOR_FIXED,
|
||||
GIMP_HELP_GRADIENT_EDITOR_LEFT_COLOR },
|
||||
|
||||
{ "gradient-editor-left-color-foreground", NULL,
|
||||
N_("F_oreground Color"), NULL, NULL,
|
||||
NC_("gradient-editor-color-type", "F_oreground Color"), NULL, NULL,
|
||||
GIMP_GRADIENT_COLOR_FOREGROUND,
|
||||
GIMP_HELP_GRADIENT_EDITOR_LEFT_COLOR },
|
||||
|
||||
{ "gradient-editor-left-color-foreground-transparent", NULL,
|
||||
N_("Fo_reground Color (Transparent)"), NULL, NULL,
|
||||
NC_("gradient-editor-color-type",
|
||||
"Fo_reground Color (Transparent)"), NULL, NULL,
|
||||
GIMP_GRADIENT_COLOR_FOREGROUND_TRANSPARENT,
|
||||
GIMP_HELP_GRADIENT_EDITOR_LEFT_COLOR },
|
||||
|
||||
{ "gradient-editor-left-color-background", NULL,
|
||||
N_("_Background Color"), NULL, NULL,
|
||||
NC_("gradient-editor-color-type", "_Background Color"), NULL, NULL,
|
||||
GIMP_GRADIENT_COLOR_BACKGROUND,
|
||||
GIMP_HELP_GRADIENT_EDITOR_LEFT_COLOR },
|
||||
|
||||
{ "gradient-editor-left-color-background-transparent", NULL,
|
||||
N_("B_ackground Color (Transparent)"), NULL, NULL,
|
||||
NC_("gradient-editor-color-type",
|
||||
"B_ackground Color (Transparent)"), NULL, NULL,
|
||||
GIMP_GRADIENT_COLOR_BACKGROUND_TRANSPARENT,
|
||||
GIMP_HELP_GRADIENT_EDITOR_LEFT_COLOR }
|
||||
};
|
||||
@ -283,27 +284,29 @@ static const GimpRadioActionEntry gradient_editor_left_color_type_actions[] =
|
||||
static const GimpRadioActionEntry gradient_editor_right_color_type_actions[] =
|
||||
{
|
||||
{ "gradient-editor-right-color-fixed", NULL,
|
||||
N_("_Fixed"), NULL, NULL,
|
||||
NC_("gradient-editor-color-type", "_Fixed"), NULL, NULL,
|
||||
GIMP_GRADIENT_COLOR_FIXED,
|
||||
GIMP_HELP_GRADIENT_EDITOR_RIGHT_COLOR },
|
||||
|
||||
{ "gradient-editor-right-color-foreground", NULL,
|
||||
N_("F_oreground Color"), NULL, NULL,
|
||||
NC_("gradient-editor-color-type", "F_oreground Color"), NULL, NULL,
|
||||
GIMP_GRADIENT_COLOR_FOREGROUND,
|
||||
GIMP_HELP_GRADIENT_EDITOR_RIGHT_COLOR },
|
||||
|
||||
{ "gradient-editor-right-color-foreground-transparent", NULL,
|
||||
N_("Fo_reground Color (Transparent)"), NULL, NULL,
|
||||
NC_("gradient-editor-color-type",
|
||||
"Fo_reground Color (Transparent)"), NULL, NULL,
|
||||
GIMP_GRADIENT_COLOR_FOREGROUND_TRANSPARENT,
|
||||
GIMP_HELP_GRADIENT_EDITOR_RIGHT_COLOR },
|
||||
|
||||
{ "gradient-editor-right-color-background", NULL,
|
||||
N_("_Background Color"), NULL, NULL,
|
||||
NC_("gradient-editor-color-type", "_Background Color"), NULL, NULL,
|
||||
GIMP_GRADIENT_COLOR_BACKGROUND,
|
||||
GIMP_HELP_GRADIENT_EDITOR_RIGHT_COLOR },
|
||||
|
||||
{ "gradient-editor-right-color-background-transparent", NULL,
|
||||
N_("B_ackground Color (Transparent)"), NULL, NULL,
|
||||
NC_("gradient-editor-color-type",
|
||||
"B_ackground Color (Transparent)"), NULL, NULL,
|
||||
GIMP_GRADIENT_COLOR_BACKGROUND_TRANSPARENT,
|
||||
GIMP_HELP_GRADIENT_EDITOR_RIGHT_COLOR }
|
||||
};
|
||||
@ -311,32 +314,32 @@ static const GimpRadioActionEntry gradient_editor_right_color_type_actions[] =
|
||||
static const GimpRadioActionEntry gradient_editor_blending_actions[] =
|
||||
{
|
||||
{ "gradient-editor-blending-linear", NULL,
|
||||
N_("_Linear"), NULL, NULL,
|
||||
NC_("gradient-editor-blending", "_Linear"), NULL, NULL,
|
||||
GIMP_GRADIENT_SEGMENT_LINEAR,
|
||||
GIMP_HELP_GRADIENT_EDITOR_BLENDING },
|
||||
|
||||
{ "gradient-editor-blending-curved", NULL,
|
||||
N_("_Curved"), NULL, NULL,
|
||||
NC_("gradient-editor-blending", "_Curved"), NULL, NULL,
|
||||
GIMP_GRADIENT_SEGMENT_CURVED,
|
||||
GIMP_HELP_GRADIENT_EDITOR_BLENDING },
|
||||
|
||||
{ "gradient-editor-blending-sine", NULL,
|
||||
N_("_Sinusoidal"), NULL, NULL,
|
||||
NC_("gradient-editor-blending", "_Sinusoidal"), NULL, NULL,
|
||||
GIMP_GRADIENT_SEGMENT_SINE,
|
||||
GIMP_HELP_GRADIENT_EDITOR_BLENDING },
|
||||
|
||||
{ "gradient-editor-blending-sphere-increasing", NULL,
|
||||
N_("Spherical (i_ncreasing)"), NULL, NULL,
|
||||
NC_("gradient-editor-blending", "Spherical (i_ncreasing)"), NULL, NULL,
|
||||
GIMP_GRADIENT_SEGMENT_SPHERE_INCREASING,
|
||||
GIMP_HELP_GRADIENT_EDITOR_BLENDING },
|
||||
|
||||
{ "gradient-editor-blending-sphere-decreasing", NULL,
|
||||
N_("Spherical (_decreasing)"), NULL, NULL,
|
||||
NC_("gradient-editor-blending", "Spherical (_decreasing)"), NULL, NULL,
|
||||
GIMP_GRADIENT_SEGMENT_SPHERE_DECREASING,
|
||||
GIMP_HELP_GRADIENT_EDITOR_BLENDING },
|
||||
|
||||
{ "gradient-editor-blending-varies", NULL,
|
||||
N_("(Varies)"), NULL, NULL,
|
||||
NC_("gradient-editor-blending", "(Varies)"), NULL, NULL,
|
||||
-1,
|
||||
GIMP_HELP_GRADIENT_EDITOR_BLENDING }
|
||||
};
|
||||
@ -344,22 +347,22 @@ static const GimpRadioActionEntry gradient_editor_blending_actions[] =
|
||||
static const GimpRadioActionEntry gradient_editor_coloring_actions[] =
|
||||
{
|
||||
{ "gradient-editor-coloring-rgb", NULL,
|
||||
N_("_RGB"), NULL, NULL,
|
||||
NC_("gradient-editor-coloring", "_RGB"), NULL, NULL,
|
||||
GIMP_GRADIENT_SEGMENT_RGB,
|
||||
GIMP_HELP_GRADIENT_EDITOR_COLORING },
|
||||
|
||||
{ "gradient-editor-coloring-hsv-ccw", NULL,
|
||||
N_("HSV (_counter-clockwise hue)"), NULL, NULL,
|
||||
NC_("gradient-editor-coloring", "HSV (_counter-clockwise hue)"), NULL, NULL,
|
||||
GIMP_GRADIENT_SEGMENT_HSV_CCW,
|
||||
GIMP_HELP_GRADIENT_EDITOR_COLORING },
|
||||
|
||||
{ "gradient-editor-coloring-hsv-cw", NULL,
|
||||
N_("HSV (clockwise _hue)"), NULL, NULL,
|
||||
NC_("gradient-editor-coloring", "HSV (clockwise _hue)"), NULL, NULL,
|
||||
GIMP_GRADIENT_SEGMENT_HSV_CW,
|
||||
GIMP_HELP_GRADIENT_EDITOR_COLORING },
|
||||
|
||||
{ "gradient-editor-coloring-varies", NULL,
|
||||
N_("(Varies)"), NULL, NULL,
|
||||
NC_("gradient-editor-coloring", "(Varies)"), NULL, NULL,
|
||||
-1,
|
||||
GIMP_HELP_GRADIENT_EDITOR_COLORING }
|
||||
};
|
||||
@ -389,64 +392,64 @@ static const GimpEnumActionEntry gradient_editor_zoom_actions[] =
|
||||
void
|
||||
gradient_editor_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_actions (group,
|
||||
gimp_action_group_add_actions (group, "gradient-editor-action",
|
||||
gradient_editor_actions,
|
||||
G_N_ELEMENTS (gradient_editor_actions));
|
||||
|
||||
gimp_action_group_add_toggle_actions (group,
|
||||
gimp_action_group_add_toggle_actions (group, "gradient-editor-action",
|
||||
gradient_editor_toggle_actions,
|
||||
G_N_ELEMENTS (gradient_editor_toggle_actions));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, "gradient-editor-action",
|
||||
gradient_editor_load_left_actions,
|
||||
G_N_ELEMENTS (gradient_editor_load_left_actions),
|
||||
G_CALLBACK (gradient_editor_load_left_cmd_callback));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, "gradient-editor-action",
|
||||
gradient_editor_save_left_actions,
|
||||
G_N_ELEMENTS (gradient_editor_save_left_actions),
|
||||
G_CALLBACK (gradient_editor_save_left_cmd_callback));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, "gradient-editor-action",
|
||||
gradient_editor_load_right_actions,
|
||||
G_N_ELEMENTS (gradient_editor_load_right_actions),
|
||||
G_CALLBACK (gradient_editor_load_right_cmd_callback));
|
||||
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, "gradient-editor-action",
|
||||
gradient_editor_save_right_actions,
|
||||
G_N_ELEMENTS (gradient_editor_save_right_actions),
|
||||
G_CALLBACK (gradient_editor_save_right_cmd_callback));
|
||||
|
||||
gimp_action_group_add_radio_actions (group,
|
||||
gimp_action_group_add_radio_actions (group, "gradient-editor-color-type",
|
||||
gradient_editor_left_color_type_actions,
|
||||
G_N_ELEMENTS (gradient_editor_left_color_type_actions),
|
||||
NULL,
|
||||
0,
|
||||
G_CALLBACK (gradient_editor_left_color_type_cmd_callback));
|
||||
|
||||
gimp_action_group_add_radio_actions (group,
|
||||
gimp_action_group_add_radio_actions (group, "gradient-editor-color-type",
|
||||
gradient_editor_right_color_type_actions,
|
||||
G_N_ELEMENTS (gradient_editor_right_color_type_actions),
|
||||
NULL,
|
||||
0,
|
||||
G_CALLBACK (gradient_editor_right_color_type_cmd_callback));
|
||||
|
||||
gimp_action_group_add_radio_actions (group,
|
||||
gimp_action_group_add_radio_actions (group, "gradient-editor-blending",
|
||||
gradient_editor_blending_actions,
|
||||
G_N_ELEMENTS (gradient_editor_blending_actions),
|
||||
NULL,
|
||||
0,
|
||||
G_CALLBACK (gradient_editor_blending_func_cmd_callback));
|
||||
|
||||
gimp_action_group_add_radio_actions (group,
|
||||
gimp_action_group_add_radio_actions (group, "gradient-editor-coloring",
|
||||
gradient_editor_coloring_actions,
|
||||
G_N_ELEMENTS (gradient_editor_coloring_actions),
|
||||
NULL,
|
||||
0,
|
||||
G_CALLBACK (gradient_editor_coloring_type_cmd_callback));
|
||||
|
||||
gimp_action_group_add_enum_actions (group,
|
||||
gimp_action_group_add_enum_actions (group, NULL,
|
||||
gradient_editor_zoom_actions,
|
||||
G_N_ELEMENTS (gradient_editor_zoom_actions),
|
||||
G_CALLBACK (gradient_editor_zoom_cmd_callback));
|
||||
@ -549,7 +552,7 @@ gradient_editor_actions_update (GimpActionGroup *group,
|
||||
* insensitive. prevents the gradient from being modified while a
|
||||
* dialog is running. bug #161411 --mitch
|
||||
*/
|
||||
if (! GTK_WIDGET_SENSITIVE (editor))
|
||||
if (! gtk_widget_is_sensitive (GTK_WIDGET (editor)))
|
||||
editable = FALSE;
|
||||
|
||||
if (! editable)
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GRADIENT_EDITOR_ACTIONS_H__
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* 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
|
||||
* 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 2 of the License, or
|
||||
* 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,
|
||||
@ -12,8 +12,7 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -30,13 +29,12 @@
|
||||
#include "core/gimpgradient.h"
|
||||
|
||||
#include "widgets/gimpcolordialog.h"
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpgradienteditor.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpuimanager.h"
|
||||
#include "widgets/gimpviewabledialog.h"
|
||||
|
||||
#include "dialogs/dialogs.h"
|
||||
|
||||
#include "gradient-editor-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
@ -77,7 +75,7 @@ gradient_editor_left_color_cmd_callback (GtkAction *action,
|
||||
|
||||
gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
|
||||
|
||||
editor->left_saved_dirty = GIMP_DATA (gradient)->dirty;
|
||||
editor->left_saved_dirty = gimp_data_is_dirty (GIMP_DATA (gradient));
|
||||
editor->left_saved_segments = gradient_editor_save_selection (editor);
|
||||
|
||||
editor->color_dialog =
|
||||
@ -87,10 +85,10 @@ gradient_editor_left_color_cmd_callback (GtkAction *action,
|
||||
GIMP_STOCK_GRADIENT,
|
||||
_("Gradient Segment's Left Endpoint Color"),
|
||||
GTK_WIDGET (editor),
|
||||
global_dialog_factory,
|
||||
gimp_dialog_factory_get_singleton (),
|
||||
"gimp-gradient-editor-color-dialog",
|
||||
&editor->control_sel_l->left_color,
|
||||
editor->instant_update, TRUE);
|
||||
TRUE, TRUE);
|
||||
|
||||
g_signal_connect (editor->color_dialog, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
@ -101,8 +99,8 @@ gradient_editor_left_color_cmd_callback (GtkAction *action,
|
||||
editor);
|
||||
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (editor), FALSE);
|
||||
gimp_ui_manager_update (GIMP_EDITOR (editor)->ui_manager,
|
||||
GIMP_EDITOR (editor)->popup_data);
|
||||
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
|
||||
gimp_editor_get_popup_data (GIMP_EDITOR (editor)));
|
||||
|
||||
gtk_window_present (GTK_WINDOW (editor->color_dialog));
|
||||
}
|
||||
@ -228,7 +226,7 @@ gradient_editor_right_color_cmd_callback (GtkAction *action,
|
||||
|
||||
gradient = GIMP_GRADIENT (GIMP_DATA_EDITOR (editor)->data);
|
||||
|
||||
editor->right_saved_dirty = GIMP_DATA (gradient)->dirty;
|
||||
editor->right_saved_dirty = gimp_data_is_dirty (GIMP_DATA (gradient));
|
||||
editor->right_saved_segments = gradient_editor_save_selection (editor);
|
||||
|
||||
editor->color_dialog =
|
||||
@ -238,10 +236,10 @@ gradient_editor_right_color_cmd_callback (GtkAction *action,
|
||||
GIMP_STOCK_GRADIENT,
|
||||
_("Gradient Segment's Right Endpoint Color"),
|
||||
GTK_WIDGET (editor),
|
||||
global_dialog_factory,
|
||||
gimp_dialog_factory_get_singleton (),
|
||||
"gimp-gradient-editor-color-dialog",
|
||||
&editor->control_sel_l->right_color,
|
||||
editor->instant_update, TRUE);
|
||||
TRUE, TRUE);
|
||||
|
||||
g_signal_connect (editor->color_dialog, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
@ -252,8 +250,8 @@ gradient_editor_right_color_cmd_callback (GtkAction *action,
|
||||
editor);
|
||||
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (editor), FALSE);
|
||||
gimp_ui_manager_update (GIMP_EDITOR (editor)->ui_manager,
|
||||
GIMP_EDITOR (editor)->popup_data);
|
||||
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
|
||||
gimp_editor_get_popup_data (GIMP_EDITOR (editor)));
|
||||
|
||||
gtk_window_present (GTK_WINDOW (editor->color_dialog));
|
||||
}
|
||||
@ -444,7 +442,7 @@ gradient_editor_replicate_cmd_callback (GtkAction *action,
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *label;
|
||||
GtkWidget *scale;
|
||||
GtkObject *scale_data;
|
||||
GtkAdjustment *scale_data;
|
||||
const gchar *title;
|
||||
const gchar *desc;
|
||||
|
||||
@ -482,9 +480,10 @@ gradient_editor_replicate_cmd_callback (GtkAction *action,
|
||||
G_CALLBACK (gradient_editor_replicate_response),
|
||||
editor);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 12);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
|
||||
vbox, TRUE, TRUE, 0);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
/* Instructions */
|
||||
@ -500,9 +499,9 @@ gradient_editor_replicate_cmd_callback (GtkAction *action,
|
||||
|
||||
/* Scale */
|
||||
editor->replicate_times = 2;
|
||||
scale_data = gtk_adjustment_new (2.0, 2.0, 21.0, 1.0, 1.0, 1.0);
|
||||
scale_data = GTK_ADJUSTMENT (gtk_adjustment_new (2.0, 2.0, 21.0, 1.0, 1.0, 1.0));
|
||||
|
||||
scale = gtk_hscale_new (GTK_ADJUSTMENT (scale_data));
|
||||
scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, scale_data);
|
||||
gtk_scale_set_digits (GTK_SCALE (scale), 0);
|
||||
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, TRUE, 4);
|
||||
@ -513,8 +512,8 @@ gradient_editor_replicate_cmd_callback (GtkAction *action,
|
||||
&editor->replicate_times);
|
||||
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (editor), FALSE);
|
||||
gimp_ui_manager_update (GIMP_EDITOR (editor)->ui_manager,
|
||||
GIMP_EDITOR (editor)->popup_data);
|
||||
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
|
||||
gimp_editor_get_popup_data (GIMP_EDITOR (editor)));
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
@ -545,7 +544,7 @@ gradient_editor_split_uniformly_cmd_callback (GtkAction *action,
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *label;
|
||||
GtkWidget *scale;
|
||||
GtkObject *scale_data;
|
||||
GtkAdjustment *scale_data;
|
||||
const gchar *title;
|
||||
const gchar *desc;
|
||||
|
||||
@ -584,9 +583,10 @@ gradient_editor_split_uniformly_cmd_callback (GtkAction *action,
|
||||
editor);
|
||||
|
||||
/* The main vbox */
|
||||
vbox = gtk_vbox_new (FALSE, 12);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
|
||||
vbox, TRUE, TRUE, 0);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
/* Instructions */
|
||||
@ -602,9 +602,9 @@ gradient_editor_split_uniformly_cmd_callback (GtkAction *action,
|
||||
|
||||
/* Scale */
|
||||
editor->split_parts = 2;
|
||||
scale_data = gtk_adjustment_new (2.0, 2.0, 21.0, 1.0, 1.0, 1.0);
|
||||
scale_data = GTK_ADJUSTMENT (gtk_adjustment_new (2.0, 2.0, 21.0, 1.0, 1.0, 1.0));
|
||||
|
||||
scale = gtk_hscale_new (GTK_ADJUSTMENT (scale_data));
|
||||
scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, scale_data);
|
||||
gtk_scale_set_digits (GTK_SCALE (scale), 0);
|
||||
gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 4);
|
||||
@ -615,8 +615,8 @@ gradient_editor_split_uniformly_cmd_callback (GtkAction *action,
|
||||
&editor->split_parts);
|
||||
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (editor), FALSE);
|
||||
gimp_ui_manager_update (GIMP_EDITOR (editor)->ui_manager,
|
||||
GIMP_EDITOR (editor)->popup_data);
|
||||
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
|
||||
gimp_editor_get_popup_data (GIMP_EDITOR (editor)));
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
@ -742,19 +742,20 @@ gradient_editor_left_color_update (GimpColorDialog *dialog,
|
||||
gtk_widget_destroy (editor->color_dialog);
|
||||
editor->color_dialog = NULL;
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (editor), TRUE);
|
||||
gimp_ui_manager_update (GIMP_EDITOR (editor)->ui_manager,
|
||||
GIMP_EDITOR (editor)->popup_data);
|
||||
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
|
||||
gimp_editor_get_popup_data (GIMP_EDITOR (editor)));
|
||||
break;
|
||||
|
||||
case GIMP_COLOR_DIALOG_CANCEL:
|
||||
gradient_editor_replace_selection (editor, editor->left_saved_segments);
|
||||
GIMP_DATA (gradient)->dirty = editor->left_saved_dirty;
|
||||
if (! editor->left_saved_dirty)
|
||||
gimp_data_clean (GIMP_DATA (gradient));
|
||||
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (gradient));
|
||||
gtk_widget_destroy (editor->color_dialog);
|
||||
editor->color_dialog = NULL;
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (editor), TRUE);
|
||||
gimp_ui_manager_update (GIMP_EDITOR (editor)->ui_manager,
|
||||
GIMP_EDITOR (editor)->popup_data);
|
||||
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
|
||||
gimp_editor_get_popup_data (GIMP_EDITOR (editor)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -789,19 +790,20 @@ gradient_editor_right_color_update (GimpColorDialog *dialog,
|
||||
gtk_widget_destroy (editor->color_dialog);
|
||||
editor->color_dialog = NULL;
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (editor), TRUE);
|
||||
gimp_ui_manager_update (GIMP_EDITOR (editor)->ui_manager,
|
||||
GIMP_EDITOR (editor)->popup_data);
|
||||
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
|
||||
gimp_editor_get_popup_data (GIMP_EDITOR (editor)));
|
||||
break;
|
||||
|
||||
case GIMP_COLOR_DIALOG_CANCEL:
|
||||
gradient_editor_replace_selection (editor, editor->right_saved_segments);
|
||||
GIMP_DATA (gradient)->dirty = editor->right_saved_dirty;
|
||||
if (! editor->right_saved_dirty)
|
||||
gimp_data_clean (GIMP_DATA (gradient));
|
||||
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (gradient));
|
||||
gtk_widget_destroy (editor->color_dialog);
|
||||
editor->color_dialog = NULL;
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (editor), TRUE);
|
||||
gimp_ui_manager_update (GIMP_EDITOR (editor)->ui_manager,
|
||||
GIMP_EDITOR (editor)->popup_data);
|
||||
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
|
||||
gimp_editor_get_popup_data (GIMP_EDITOR (editor)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -887,8 +889,8 @@ gradient_editor_split_uniform_response (GtkWidget *widget,
|
||||
{
|
||||
gtk_widget_destroy (widget);
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (editor), TRUE);
|
||||
gimp_ui_manager_update (GIMP_EDITOR (editor)->ui_manager,
|
||||
GIMP_EDITOR (editor)->popup_data);
|
||||
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
|
||||
gimp_editor_get_popup_data (GIMP_EDITOR (editor)));
|
||||
|
||||
if (response_id == GTK_RESPONSE_OK)
|
||||
{
|
||||
@ -912,8 +914,8 @@ gradient_editor_replicate_response (GtkWidget *widget,
|
||||
{
|
||||
gtk_widget_destroy (widget);
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (editor), TRUE);
|
||||
gimp_ui_manager_update (GIMP_EDITOR (editor)->ui_manager,
|
||||
GIMP_EDITOR (editor)->popup_data);
|
||||
gimp_ui_manager_update (gimp_editor_get_ui_manager (GIMP_EDITOR (editor)),
|
||||
gimp_editor_get_popup_data (GIMP_EDITOR (editor)));
|
||||
|
||||
if (response_id == GTK_RESPONSE_OK)
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user