Added KDE3 version of kuickshow
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kuickshow@1095340 283d02a7-25f6-0310-bc7c-ecb5cbfe19dav3.5.13-sru
commit
56d206e89d
@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
Look in the subdirs to get info about the authors.
|
||||||
|
|
@ -0,0 +1,397 @@
|
|||||||
|
GNU Free Documentation License
|
||||||
|
Version 1.2, November 2002
|
||||||
|
|
||||||
|
|
||||||
|
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
|
||||||
|
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
||||||
|
0. PREAMBLE
|
||||||
|
|
||||||
|
The purpose of this License is to make a manual, textbook, or other
|
||||||
|
functional and useful document "free" in the sense of freedom: to
|
||||||
|
assure everyone the effective freedom to copy and redistribute it,
|
||||||
|
with or without modifying it, either commercially or noncommercially.
|
||||||
|
Secondarily, this License preserves for the author and publisher a way
|
||||||
|
to get credit for their work, while not being considered responsible
|
||||||
|
for modifications made by others.
|
||||||
|
|
||||||
|
This License is a kind of "copyleft", which means that derivative
|
||||||
|
works of the document must themselves be free in the same sense. It
|
||||||
|
complements the GNU General Public License, which is a copyleft
|
||||||
|
license designed for free software.
|
||||||
|
|
||||||
|
We have designed this License in order to use it for manuals for free
|
||||||
|
software, because free software needs free documentation: a free
|
||||||
|
program should come with manuals providing the same freedoms that the
|
||||||
|
software does. But this License is not limited to software manuals;
|
||||||
|
it can be used for any textual work, regardless of subject matter or
|
||||||
|
whether it is published as a printed book. We recommend this License
|
||||||
|
principally for works whose purpose is instruction or reference.
|
||||||
|
|
||||||
|
|
||||||
|
1. APPLICABILITY AND DEFINITIONS
|
||||||
|
|
||||||
|
This License applies to any manual or other work, in any medium, that
|
||||||
|
contains a notice placed by the copyright holder saying it can be
|
||||||
|
distributed under the terms of this License. Such a notice grants a
|
||||||
|
world-wide, royalty-free license, unlimited in duration, to use that
|
||||||
|
work under the conditions stated herein. The "Document", below,
|
||||||
|
refers to any such manual or work. Any member of the public is a
|
||||||
|
licensee, and is addressed as "you". You accept the license if you
|
||||||
|
copy, modify or distribute the work in a way requiring permission
|
||||||
|
under copyright law.
|
||||||
|
|
||||||
|
A "Modified Version" of the Document means any work containing the
|
||||||
|
Document or a portion of it, either copied verbatim, or with
|
||||||
|
modifications and/or translated into another language.
|
||||||
|
|
||||||
|
A "Secondary Section" is a named appendix or a front-matter section of
|
||||||
|
the Document that deals exclusively with the relationship of the
|
||||||
|
publishers or authors of the Document to the Document's overall subject
|
||||||
|
(or to related matters) and contains nothing that could fall directly
|
||||||
|
within that overall subject. (Thus, if the Document is in part a
|
||||||
|
textbook of mathematics, a Secondary Section may not explain any
|
||||||
|
mathematics.) The relationship could be a matter of historical
|
||||||
|
connection with the subject or with related matters, or of legal,
|
||||||
|
commercial, philosophical, ethical or political position regarding
|
||||||
|
them.
|
||||||
|
|
||||||
|
The "Invariant Sections" are certain Secondary Sections whose titles
|
||||||
|
are designated, as being those of Invariant Sections, in the notice
|
||||||
|
that says that the Document is released under this License. If a
|
||||||
|
section does not fit the above definition of Secondary then it is not
|
||||||
|
allowed to be designated as Invariant. The Document may contain zero
|
||||||
|
Invariant Sections. If the Document does not identify any Invariant
|
||||||
|
Sections then there are none.
|
||||||
|
|
||||||
|
The "Cover Texts" are certain short passages of text that are listed,
|
||||||
|
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
||||||
|
the Document is released under this License. A Front-Cover Text may
|
||||||
|
be at most 5 words, and a Back-Cover Text may be at most 25 words.
|
||||||
|
|
||||||
|
A "Transparent" copy of the Document means a machine-readable copy,
|
||||||
|
represented in a format whose specification is available to the
|
||||||
|
general public, that is suitable for revising the document
|
||||||
|
straightforwardly with generic text editors or (for images composed of
|
||||||
|
pixels) generic paint programs or (for drawings) some widely available
|
||||||
|
drawing editor, and that is suitable for input to text formatters or
|
||||||
|
for automatic translation to a variety of formats suitable for input
|
||||||
|
to text formatters. A copy made in an otherwise Transparent file
|
||||||
|
format whose markup, or absence of markup, has been arranged to thwart
|
||||||
|
or discourage subsequent modification by readers is not Transparent.
|
||||||
|
An image format is not Transparent if used for any substantial amount
|
||||||
|
of text. A copy that is not "Transparent" is called "Opaque".
|
||||||
|
|
||||||
|
Examples of suitable formats for Transparent copies include plain
|
||||||
|
ASCII without markup, Texinfo input format, LaTeX input format, SGML
|
||||||
|
or XML using a publicly available DTD, and standard-conforming simple
|
||||||
|
HTML, PostScript or PDF designed for human modification. Examples of
|
||||||
|
transparent image formats include PNG, XCF and JPG. Opaque formats
|
||||||
|
include proprietary formats that can be read and edited only by
|
||||||
|
proprietary word processors, SGML or XML for which the DTD and/or
|
||||||
|
processing tools are not generally available, and the
|
||||||
|
machine-generated HTML, PostScript or PDF produced by some word
|
||||||
|
processors for output purposes only.
|
||||||
|
|
||||||
|
The "Title Page" means, for a printed book, the title page itself,
|
||||||
|
plus such following pages as are needed to hold, legibly, the material
|
||||||
|
this License requires to appear in the title page. For works in
|
||||||
|
formats which do not have any title page as such, "Title Page" means
|
||||||
|
the text near the most prominent appearance of the work's title,
|
||||||
|
preceding the beginning of the body of the text.
|
||||||
|
|
||||||
|
A section "Entitled XYZ" means a named subunit of the Document whose
|
||||||
|
title either is precisely XYZ or contains XYZ in parentheses following
|
||||||
|
text that translates XYZ in another language. (Here XYZ stands for a
|
||||||
|
specific section name mentioned below, such as "Acknowledgements",
|
||||||
|
"Dedications", "Endorsements", or "History".) To "Preserve the Title"
|
||||||
|
of such a section when you modify the Document means that it remains a
|
||||||
|
section "Entitled XYZ" according to this definition.
|
||||||
|
|
||||||
|
The Document may include Warranty Disclaimers next to the notice which
|
||||||
|
states that this License applies to the Document. These Warranty
|
||||||
|
Disclaimers are considered to be included by reference in this
|
||||||
|
License, but only as regards disclaiming warranties: any other
|
||||||
|
implication that these Warranty Disclaimers may have is void and has
|
||||||
|
no effect on the meaning of this License.
|
||||||
|
|
||||||
|
|
||||||
|
2. VERBATIM COPYING
|
||||||
|
|
||||||
|
You may copy and distribute the Document in any medium, either
|
||||||
|
commercially or noncommercially, provided that this License, the
|
||||||
|
copyright notices, and the license notice saying this License applies
|
||||||
|
to the Document are reproduced in all copies, and that you add no other
|
||||||
|
conditions whatsoever to those of this License. You may not use
|
||||||
|
technical measures to obstruct or control the reading or further
|
||||||
|
copying of the copies you make or distribute. However, you may accept
|
||||||
|
compensation in exchange for copies. If you distribute a large enough
|
||||||
|
number of copies you must also follow the conditions in section 3.
|
||||||
|
|
||||||
|
You may also lend copies, under the same conditions stated above, and
|
||||||
|
you may publicly display copies.
|
||||||
|
|
||||||
|
|
||||||
|
3. COPYING IN QUANTITY
|
||||||
|
|
||||||
|
If you publish printed copies (or copies in media that commonly have
|
||||||
|
printed covers) of the Document, numbering more than 100, and the
|
||||||
|
Document's license notice requires Cover Texts, you must enclose the
|
||||||
|
copies in covers that carry, clearly and legibly, all these Cover
|
||||||
|
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
||||||
|
the back cover. Both covers must also clearly and legibly identify
|
||||||
|
you as the publisher of these copies. The front cover must present
|
||||||
|
the full title with all words of the title equally prominent and
|
||||||
|
visible. You may add other material on the covers in addition.
|
||||||
|
Copying with changes limited to the covers, as long as they preserve
|
||||||
|
the title of the Document and satisfy these conditions, can be treated
|
||||||
|
as verbatim copying in other respects.
|
||||||
|
|
||||||
|
If the required texts for either cover are too voluminous to fit
|
||||||
|
legibly, you should put the first ones listed (as many as fit
|
||||||
|
reasonably) on the actual cover, and continue the rest onto adjacent
|
||||||
|
pages.
|
||||||
|
|
||||||
|
If you publish or distribute Opaque copies of the Document numbering
|
||||||
|
more than 100, you must either include a machine-readable Transparent
|
||||||
|
copy along with each Opaque copy, or state in or with each Opaque copy
|
||||||
|
a computer-network location from which the general network-using
|
||||||
|
public has access to download using public-standard network protocols
|
||||||
|
a complete Transparent copy of the Document, free of added material.
|
||||||
|
If you use the latter option, you must take reasonably prudent steps,
|
||||||
|
when you begin distribution of Opaque copies in quantity, to ensure
|
||||||
|
that this Transparent copy will remain thus accessible at the stated
|
||||||
|
location until at least one year after the last time you distribute an
|
||||||
|
Opaque copy (directly or through your agents or retailers) of that
|
||||||
|
edition to the public.
|
||||||
|
|
||||||
|
It is requested, but not required, that you contact the authors of the
|
||||||
|
Document well before redistributing any large number of copies, to give
|
||||||
|
them a chance to provide you with an updated version of the Document.
|
||||||
|
|
||||||
|
|
||||||
|
4. MODIFICATIONS
|
||||||
|
|
||||||
|
You may copy and distribute a Modified Version of the Document under
|
||||||
|
the conditions of sections 2 and 3 above, provided that you release
|
||||||
|
the Modified Version under precisely this License, with the Modified
|
||||||
|
Version filling the role of the Document, thus licensing distribution
|
||||||
|
and modification of the Modified Version to whoever possesses a copy
|
||||||
|
of it. In addition, you must do these things in the Modified Version:
|
||||||
|
|
||||||
|
A. Use in the Title Page (and on the covers, if any) a title distinct
|
||||||
|
from that of the Document, and from those of previous versions
|
||||||
|
(which should, if there were any, be listed in the History section
|
||||||
|
of the Document). You may use the same title as a previous version
|
||||||
|
if the original publisher of that version gives permission.
|
||||||
|
B. List on the Title Page, as authors, one or more persons or entities
|
||||||
|
responsible for authorship of the modifications in the Modified
|
||||||
|
Version, together with at least five of the principal authors of the
|
||||||
|
Document (all of its principal authors, if it has fewer than five),
|
||||||
|
unless they release you from this requirement.
|
||||||
|
C. State on the Title page the name of the publisher of the
|
||||||
|
Modified Version, as the publisher.
|
||||||
|
D. Preserve all the copyright notices of the Document.
|
||||||
|
E. Add an appropriate copyright notice for your modifications
|
||||||
|
adjacent to the other copyright notices.
|
||||||
|
F. Include, immediately after the copyright notices, a license notice
|
||||||
|
giving the public permission to use the Modified Version under the
|
||||||
|
terms of this License, in the form shown in the Addendum below.
|
||||||
|
G. Preserve in that license notice the full lists of Invariant Sections
|
||||||
|
and required Cover Texts given in the Document's license notice.
|
||||||
|
H. Include an unaltered copy of this License.
|
||||||
|
I. Preserve the section Entitled "History", Preserve its Title, and add
|
||||||
|
to it an item stating at least the title, year, new authors, and
|
||||||
|
publisher of the Modified Version as given on the Title Page. If
|
||||||
|
there is no section Entitled "History" in the Document, create one
|
||||||
|
stating the title, year, authors, and publisher of the Document as
|
||||||
|
given on its Title Page, then add an item describing the Modified
|
||||||
|
Version as stated in the previous sentence.
|
||||||
|
J. Preserve the network location, if any, given in the Document for
|
||||||
|
public access to a Transparent copy of the Document, and likewise
|
||||||
|
the network locations given in the Document for previous versions
|
||||||
|
it was based on. These may be placed in the "History" section.
|
||||||
|
You may omit a network location for a work that was published at
|
||||||
|
least four years before the Document itself, or if the original
|
||||||
|
publisher of the version it refers to gives permission.
|
||||||
|
K. For any section Entitled "Acknowledgements" or "Dedications",
|
||||||
|
Preserve the Title of the section, and preserve in the section all
|
||||||
|
the substance and tone of each of the contributor acknowledgements
|
||||||
|
and/or dedications given therein.
|
||||||
|
L. Preserve all the Invariant Sections of the Document,
|
||||||
|
unaltered in their text and in their titles. Section numbers
|
||||||
|
or the equivalent are not considered part of the section titles.
|
||||||
|
M. Delete any section Entitled "Endorsements". Such a section
|
||||||
|
may not be included in the Modified Version.
|
||||||
|
N. Do not retitle any existing section to be Entitled "Endorsements"
|
||||||
|
or to conflict in title with any Invariant Section.
|
||||||
|
O. Preserve any Warranty Disclaimers.
|
||||||
|
|
||||||
|
If the Modified Version includes new front-matter sections or
|
||||||
|
appendices that qualify as Secondary Sections and contain no material
|
||||||
|
copied from the Document, you may at your option designate some or all
|
||||||
|
of these sections as invariant. To do this, add their titles to the
|
||||||
|
list of Invariant Sections in the Modified Version's license notice.
|
||||||
|
These titles must be distinct from any other section titles.
|
||||||
|
|
||||||
|
You may add a section Entitled "Endorsements", provided it contains
|
||||||
|
nothing but endorsements of your Modified Version by various
|
||||||
|
parties--for example, statements of peer review or that the text has
|
||||||
|
been approved by an organization as the authoritative definition of a
|
||||||
|
standard.
|
||||||
|
|
||||||
|
You may add a passage of up to five words as a Front-Cover Text, and a
|
||||||
|
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
||||||
|
of Cover Texts in the Modified Version. Only one passage of
|
||||||
|
Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||||
|
through arrangements made by) any one entity. If the Document already
|
||||||
|
includes a cover text for the same cover, previously added by you or
|
||||||
|
by arrangement made by the same entity you are acting on behalf of,
|
||||||
|
you may not add another; but you may replace the old one, on explicit
|
||||||
|
permission from the previous publisher that added the old one.
|
||||||
|
|
||||||
|
The author(s) and publisher(s) of the Document do not by this License
|
||||||
|
give permission to use their names for publicity for or to assert or
|
||||||
|
imply endorsement of any Modified Version.
|
||||||
|
|
||||||
|
|
||||||
|
5. COMBINING DOCUMENTS
|
||||||
|
|
||||||
|
You may combine the Document with other documents released under this
|
||||||
|
License, under the terms defined in section 4 above for modified
|
||||||
|
versions, provided that you include in the combination all of the
|
||||||
|
Invariant Sections of all of the original documents, unmodified, and
|
||||||
|
list them all as Invariant Sections of your combined work in its
|
||||||
|
license notice, and that you preserve all their Warranty Disclaimers.
|
||||||
|
|
||||||
|
The combined work need only contain one copy of this License, and
|
||||||
|
multiple identical Invariant Sections may be replaced with a single
|
||||||
|
copy. If there are multiple Invariant Sections with the same name but
|
||||||
|
different contents, make the title of each such section unique by
|
||||||
|
adding at the end of it, in parentheses, the name of the original
|
||||||
|
author or publisher of that section if known, or else a unique number.
|
||||||
|
Make the same adjustment to the section titles in the list of
|
||||||
|
Invariant Sections in the license notice of the combined work.
|
||||||
|
|
||||||
|
In the combination, you must combine any sections Entitled "History"
|
||||||
|
in the various original documents, forming one section Entitled
|
||||||
|
"History"; likewise combine any sections Entitled "Acknowledgements",
|
||||||
|
and any sections Entitled "Dedications". You must delete all sections
|
||||||
|
Entitled "Endorsements".
|
||||||
|
|
||||||
|
|
||||||
|
6. COLLECTIONS OF DOCUMENTS
|
||||||
|
|
||||||
|
You may make a collection consisting of the Document and other documents
|
||||||
|
released under this License, and replace the individual copies of this
|
||||||
|
License in the various documents with a single copy that is included in
|
||||||
|
the collection, provided that you follow the rules of this License for
|
||||||
|
verbatim copying of each of the documents in all other respects.
|
||||||
|
|
||||||
|
You may extract a single document from such a collection, and distribute
|
||||||
|
it individually under this License, provided you insert a copy of this
|
||||||
|
License into the extracted document, and follow this License in all
|
||||||
|
other respects regarding verbatim copying of that document.
|
||||||
|
|
||||||
|
|
||||||
|
7. AGGREGATION WITH INDEPENDENT WORKS
|
||||||
|
|
||||||
|
A compilation of the Document or its derivatives with other separate
|
||||||
|
and independent documents or works, in or on a volume of a storage or
|
||||||
|
distribution medium, is called an "aggregate" if the copyright
|
||||||
|
resulting from the compilation is not used to limit the legal rights
|
||||||
|
of the compilation's users beyond what the individual works permit.
|
||||||
|
When the Document is included in an aggregate, this License does not
|
||||||
|
apply to the other works in the aggregate which are not themselves
|
||||||
|
derivative works of the Document.
|
||||||
|
|
||||||
|
If the Cover Text requirement of section 3 is applicable to these
|
||||||
|
copies of the Document, then if the Document is less than one half of
|
||||||
|
the entire aggregate, the Document's Cover Texts may be placed on
|
||||||
|
covers that bracket the Document within the aggregate, or the
|
||||||
|
electronic equivalent of covers if the Document is in electronic form.
|
||||||
|
Otherwise they must appear on printed covers that bracket the whole
|
||||||
|
aggregate.
|
||||||
|
|
||||||
|
|
||||||
|
8. TRANSLATION
|
||||||
|
|
||||||
|
Translation is considered a kind of modification, so you may
|
||||||
|
distribute translations of the Document under the terms of section 4.
|
||||||
|
Replacing Invariant Sections with translations requires special
|
||||||
|
permission from their copyright holders, but you may include
|
||||||
|
translations of some or all Invariant Sections in addition to the
|
||||||
|
original versions of these Invariant Sections. You may include a
|
||||||
|
translation of this License, and all the license notices in the
|
||||||
|
Document, and any Warranty Disclaimers, provided that you also include
|
||||||
|
the original English version of this License and the original versions
|
||||||
|
of those notices and disclaimers. In case of a disagreement between
|
||||||
|
the translation and the original version of this License or a notice
|
||||||
|
or disclaimer, the original version will prevail.
|
||||||
|
|
||||||
|
If a section in the Document is Entitled "Acknowledgements",
|
||||||
|
"Dedications", or "History", the requirement (section 4) to Preserve
|
||||||
|
its Title (section 1) will typically require changing the actual
|
||||||
|
title.
|
||||||
|
|
||||||
|
|
||||||
|
9. TERMINATION
|
||||||
|
|
||||||
|
You may not copy, modify, sublicense, or distribute the Document except
|
||||||
|
as expressly provided for under this License. Any other attempt to
|
||||||
|
copy, modify, sublicense or distribute the Document 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.
|
||||||
|
|
||||||
|
|
||||||
|
10. FUTURE REVISIONS OF THIS LICENSE
|
||||||
|
|
||||||
|
The Free Software Foundation may publish new, revised versions
|
||||||
|
of the GNU Free Documentation 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. See
|
||||||
|
http://www.gnu.org/copyleft/.
|
||||||
|
|
||||||
|
Each version of the License is given a distinguishing version number.
|
||||||
|
If the Document specifies that a particular numbered version of this
|
||||||
|
License "or any later version" applies to it, you have the option of
|
||||||
|
following the terms and conditions either of that specified version or
|
||||||
|
of any later version that has been published (not as a draft) by the
|
||||||
|
Free Software Foundation. If the Document does not specify a version
|
||||||
|
number of this License, you may choose any version ever published (not
|
||||||
|
as a draft) by the Free Software Foundation.
|
||||||
|
|
||||||
|
|
||||||
|
ADDENDUM: How to use this License for your documents
|
||||||
|
|
||||||
|
To use this License in a document you have written, include a copy of
|
||||||
|
the License in the document and put the following copyright and
|
||||||
|
license notices just after the title page:
|
||||||
|
|
||||||
|
Copyright (c) YEAR YOUR NAME.
|
||||||
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
|
under the terms of the GNU Free Documentation License, Version 1.2
|
||||||
|
or any later version published by the Free Software Foundation;
|
||||||
|
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||||
|
A copy of the license is included in the section entitled "GNU
|
||||||
|
Free Documentation License".
|
||||||
|
|
||||||
|
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
|
||||||
|
replace the "with...Texts." line with this:
|
||||||
|
|
||||||
|
with the Invariant Sections being LIST THEIR TITLES, with the
|
||||||
|
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
|
||||||
|
|
||||||
|
If you have Invariant Sections without Cover Texts, or some other
|
||||||
|
combination of the three, merge those two alternatives to suit the
|
||||||
|
situation.
|
||||||
|
|
||||||
|
If your document contains nontrivial examples of program code, we
|
||||||
|
recommend releasing these examples in parallel under your choice of
|
||||||
|
free software license, such as the GNU General Public License,
|
||||||
|
to permit their use in free software.
|
@ -0,0 +1,17 @@
|
|||||||
|
1998-12-05 Alex Zepeda <garbanzo@hooked.net>
|
||||||
|
|
||||||
|
* README: Use a "new" style README.
|
||||||
|
|
||||||
|
1998-11-13 Alex Zepeda <garbanzo@hooked.net>
|
||||||
|
|
||||||
|
* Makefile.cvs (all): Use an updated Makefile.cvs from kdenetwork that
|
||||||
|
tests for the admin directory.
|
||||||
|
|
||||||
|
* configure.in.1: Remove comment about this being Alpha (quality)
|
||||||
|
software, and update version number (now it's at 1.1pre). Also, now
|
||||||
|
it uses the kde-common copy of the autoconf stuff.
|
||||||
|
|
||||||
|
1998-11-08 Alex Zepeda <alex@zippy.dyn.ml.org>
|
||||||
|
|
||||||
|
* Makefile.cvs (all): Use the kde-common version of automoc.
|
||||||
|
|
@ -0,0 +1,176 @@
|
|||||||
|
Basic Installation
|
||||||
|
==================
|
||||||
|
|
||||||
|
These are generic installation instructions.
|
||||||
|
|
||||||
|
The `configure' shell script attempts to guess correct values for
|
||||||
|
various system-dependent variables used during compilation. It uses
|
||||||
|
those values to create a `Makefile' in each directory of the package.
|
||||||
|
It may also create one or more `.h' files containing system-dependent
|
||||||
|
definitions. Finally, it creates a shell script `config.status' that
|
||||||
|
you can run in the future to recreate the current configuration, a file
|
||||||
|
`config.cache' that saves the results of its tests to speed up
|
||||||
|
reconfiguring, and a file `config.log' containing compiler output
|
||||||
|
(useful mainly for debugging `configure').
|
||||||
|
|
||||||
|
If you need to do unusual things to compile the package, please try
|
||||||
|
to figure out how `configure' could check whether to do them, and mail
|
||||||
|
diffs or instructions to the address given in the `README' so they can
|
||||||
|
be considered for the next release. If at some point `config.cache'
|
||||||
|
contains results you don't want to keep, you may remove or edit it.
|
||||||
|
|
||||||
|
The file `configure.in' is used to create `configure' by a program
|
||||||
|
called `autoconf'. You only need `configure.in' if you want to change
|
||||||
|
it or regenerate `configure' using a newer version of `autoconf'.
|
||||||
|
|
||||||
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
|
1. `cd' to the directory containing the package's source code and type
|
||||||
|
`./configure' to configure the package for your system. If you're
|
||||||
|
using `csh' on an old version of System V, you might need to type
|
||||||
|
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||||
|
`configure' itself.
|
||||||
|
|
||||||
|
Running `configure' takes a while. While running, it prints some
|
||||||
|
messages telling which features it is checking for.
|
||||||
|
|
||||||
|
2. Type `make' to compile the package.
|
||||||
|
|
||||||
|
3. Optionally, type `make check' to run any self-tests that come with
|
||||||
|
the package.
|
||||||
|
|
||||||
|
4. Type `make install' to install the programs and any data files and
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
5. You can remove the program binaries and object files from the
|
||||||
|
source code directory by typing `make clean'. To also remove the
|
||||||
|
files that `configure' created (so you can compile the package for
|
||||||
|
a different kind of computer), type `make distclean'. There is
|
||||||
|
also a `make maintainer-clean' target, but that is intended mainly
|
||||||
|
for the package's developers. If you use it, you may have to get
|
||||||
|
all sorts of other programs in order to regenerate files that came
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
Compilers and Options
|
||||||
|
=====================
|
||||||
|
|
||||||
|
Some systems require unusual options for compilation or linking that
|
||||||
|
the `configure' script does not know about. You can give `configure'
|
||||||
|
initial values for variables by setting them in the environment. Using
|
||||||
|
a Bourne-compatible shell, you can do that on the command line like
|
||||||
|
this:
|
||||||
|
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||||
|
|
||||||
|
Or on systems that have the `env' program, you can do it like this:
|
||||||
|
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||||
|
|
||||||
|
Compiling For Multiple Architectures
|
||||||
|
====================================
|
||||||
|
|
||||||
|
You can compile the package for more than one kind of computer at the
|
||||||
|
same time, by placing the object files for each architecture in their
|
||||||
|
own directory. To do this, you must use a version of `make' that
|
||||||
|
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||||
|
directory where you want the object files and executables to go and run
|
||||||
|
the `configure' script. `configure' automatically checks for the
|
||||||
|
source code in the directory that `configure' is in and in `..'.
|
||||||
|
|
||||||
|
If you have to use a `make' that does not supports the `VPATH'
|
||||||
|
variable, you have to compile the package for one architecture at a time
|
||||||
|
in the source code directory. After you have installed the package for
|
||||||
|
one architecture, use `make distclean' before reconfiguring for another
|
||||||
|
architecture.
|
||||||
|
|
||||||
|
Installation Names
|
||||||
|
==================
|
||||||
|
|
||||||
|
By default, `make install' will install the package's files in
|
||||||
|
`/usr/local/kde/bin', `/usr/local/kde/lib', etc. You can specify an
|
||||||
|
installation prefix other than `/usr/local/kde' by giving `configure'
|
||||||
|
the option `--prefix=PATH'.
|
||||||
|
|
||||||
|
You can specify separate installation prefixes for
|
||||||
|
architecture-specific files and architecture-independent files. If you
|
||||||
|
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||||
|
PATH as the prefix for installing programs and libraries.
|
||||||
|
Documentation and other data files will still use the regular prefix.
|
||||||
|
|
||||||
|
If the package supports it, you can cause programs to be installed
|
||||||
|
with an extra prefix or suffix on their names by giving `configure' the
|
||||||
|
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||||
|
|
||||||
|
Optional Features
|
||||||
|
=================
|
||||||
|
|
||||||
|
Some packages pay attention to `--enable-FEATURE' options to
|
||||||
|
`configure', where FEATURE indicates an optional part of the package.
|
||||||
|
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||||
|
is something like `gnu-as' or `x' (for the X Window System). The
|
||||||
|
`README' should mention any `--enable-' and `--with-' options that the
|
||||||
|
package recognizes.
|
||||||
|
|
||||||
|
For packages that use the X Window System, `configure' can usually
|
||||||
|
find the X include and library files automatically, but if it doesn't,
|
||||||
|
you can use the `configure' options `--x-includes=DIR' and
|
||||||
|
`--x-libraries=DIR' to specify their locations.
|
||||||
|
|
||||||
|
Specifying the System Type
|
||||||
|
==========================
|
||||||
|
|
||||||
|
There may be some features `configure' can not figure out
|
||||||
|
automatically, but needs to determine by the type of host the package
|
||||||
|
will run on. Usually `configure' can figure that out, but if it prints
|
||||||
|
a message saying it can not guess the host type, give it the
|
||||||
|
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||||
|
type, such as `sun4', or a canonical name with three fields:
|
||||||
|
CPU-COMPANY-SYSTEM
|
||||||
|
|
||||||
|
See the file `config.sub' for the possible values of each field. If
|
||||||
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
|
need to know the host type.
|
||||||
|
|
||||||
|
If you are building compiler tools for cross-compiling, you can also
|
||||||
|
use the `--target=TYPE' option to select the type of system they will
|
||||||
|
produce code for and the `--build=TYPE' option to select the type of
|
||||||
|
system on which you are compiling the package.
|
||||||
|
|
||||||
|
Sharing Defaults
|
||||||
|
================
|
||||||
|
|
||||||
|
If you want to set default values for `configure' scripts to share,
|
||||||
|
you can create a site shell script called `config.site' that gives
|
||||||
|
default values for variables like `CC', `cache_file', and `prefix'.
|
||||||
|
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||||
|
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||||
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
|
A warning: not all `configure' scripts look for a site script.
|
||||||
|
|
||||||
|
Operation Controls
|
||||||
|
==================
|
||||||
|
|
||||||
|
`configure' recognizes the following options to control how it
|
||||||
|
operates.
|
||||||
|
|
||||||
|
`--cache-file=FILE'
|
||||||
|
Use and save the results of the tests in FILE instead of
|
||||||
|
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||||
|
debugging `configure'.
|
||||||
|
|
||||||
|
`--help'
|
||||||
|
Print a summary of the options to `configure', and exit.
|
||||||
|
|
||||||
|
`--quiet'
|
||||||
|
`--silent'
|
||||||
|
`-q'
|
||||||
|
Do not print messages saying which checks are being made.
|
||||||
|
|
||||||
|
`--srcdir=DIR'
|
||||||
|
Look for the package's source code in directory DIR. Usually
|
||||||
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
|
`--version'
|
||||||
|
Print the version of Autoconf used to generate the `configure'
|
||||||
|
script, and exit.
|
||||||
|
|
||||||
|
`configure' also accepts some other, not widely useful, options.
|
||||||
|
|
@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
* @mainpage The KDE Graphics API Reference
|
||||||
|
*
|
||||||
|
* This section contains the KDE online class reference for the current
|
||||||
|
* development version of the KDE graphics package.
|
||||||
|
*
|
||||||
|
* - <a href="kviewshell/html/index.html"><b>kviewshell</b></a>
|
||||||
|
* (<a href="kviewshell/html/classes.html">classes</a>)\n
|
||||||
|
* <i>API for the implementation of kviewshell plugins.</i>
|
||||||
|
*
|
||||||
|
* More information about the KDE architecture in form of
|
||||||
|
* tutorials, HOWTOs,
|
||||||
|
* and FAQs can be found at
|
||||||
|
* the <a href="http://developer.kde.org">KDE Developer's corner</a>.
|
||||||
|
*/
|
||||||
|
|
@ -0,0 +1,23 @@
|
|||||||
|
## kdegraphics/Makefile.am $Id: Makefile.am.in 571342 2006-08-09 10:30:55Z mueller $
|
||||||
|
## (C) 1997 Stephan Kulow
|
||||||
|
|
||||||
|
AUTOMAKE_OPTIONS = foreign 1.6.1
|
||||||
|
|
||||||
|
# COMPILE_BEFORE_kooka = libkscan
|
||||||
|
# COMPILE_BEFORE_kfaxview = kfax
|
||||||
|
# COMPILE_BEFORE_kfile-plugins = kghostview
|
||||||
|
# COMPILE_AFTER_kviewshell = kdvi kfaxview
|
||||||
|
|
||||||
|
DISTCLEANFILES = inst-apps
|
||||||
|
|
||||||
|
EXTRA_DIST = admin debian kdebase.spec.in README.pam kde.pamd
|
||||||
|
|
||||||
|
dist-hook:
|
||||||
|
cd $(top_distdir) && perl $(top_srcdir)/admin/am_edit -padmin
|
||||||
|
|
||||||
|
MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 SUBDIRS
|
||||||
|
|
||||||
|
include admin/Doxyfile.am
|
||||||
|
include admin/deps.am
|
||||||
|
|
||||||
|
SUBDIRS=$(TOPSUBDIRS)
|
@ -0,0 +1,22 @@
|
|||||||
|
## kdegraphics/Makefile.am $Id: Makefile.am.in 571342 2006-08-09 10:30:55Z mueller $
|
||||||
|
## (C) 1997 Stephan Kulow
|
||||||
|
|
||||||
|
AUTOMAKE_OPTIONS = foreign 1.6.1
|
||||||
|
|
||||||
|
COMPILE_BEFORE_kooka = libkscan
|
||||||
|
COMPILE_BEFORE_kfaxview = kfax
|
||||||
|
COMPILE_BEFORE_kfile-plugins = kghostview
|
||||||
|
COMPILE_AFTER_kviewshell = kdvi kfaxview
|
||||||
|
|
||||||
|
DISTCLEANFILES = inst-apps
|
||||||
|
|
||||||
|
EXTRA_DIST = admin debian kdebase.spec.in README.pam kde.pamd
|
||||||
|
|
||||||
|
dist-hook:
|
||||||
|
cd $(top_distdir) && perl $(top_srcdir)/admin/am_edit -padmin
|
||||||
|
|
||||||
|
MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 SUBDIRS
|
||||||
|
|
||||||
|
include admin/Doxyfile.am
|
||||||
|
include admin/deps.am
|
||||||
|
|
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
all:
|
||||||
|
@echo "This Makefile is only for the CVS repository"
|
||||||
|
@echo "This will be deleted before making the distribution"
|
||||||
|
@echo ""
|
||||||
|
@if test ! -d admin; then \
|
||||||
|
echo "Please recheckout this module!" ;\
|
||||||
|
echo "for cvs: use checkout once and after that update again" ;\
|
||||||
|
echo "for cvsup: checkout kde-common from cvsup and" ;\
|
||||||
|
echo " link kde-common/admin to ./admin" ;\
|
||||||
|
exit 1 ;\
|
||||||
|
fi
|
||||||
|
$(MAKE) -f admin/Makefile.common cvs
|
||||||
|
|
||||||
|
.SILENT:
|
||||||
|
|
@ -0,0 +1,97 @@
|
|||||||
|
In this file:
|
||||||
|
|
||||||
|
* About kdegraphics
|
||||||
|
* Common Mistakes
|
||||||
|
* Debugging
|
||||||
|
* More Info
|
||||||
|
|
||||||
|
|
||||||
|
About kdegraphics
|
||||||
|
-----------------
|
||||||
|
kdegraphics is a collection of graphic oriented applications:
|
||||||
|
|
||||||
|
* debian
|
||||||
|
Files needed to create Debian packages.
|
||||||
|
|
||||||
|
* doc
|
||||||
|
XML based documentation for the programs.
|
||||||
|
|
||||||
|
* kamera
|
||||||
|
Digital camera io_slave for Konqueror. Together gPhoto this allows you
|
||||||
|
to access your camera's picture with the URL kamera:/
|
||||||
|
|
||||||
|
* kcoloredit
|
||||||
|
Contains two programs: a color value editor and also a color picker.
|
||||||
|
|
||||||
|
* kdvi
|
||||||
|
Program (and embeddable KPart) to display *.DVI files from TeX.
|
||||||
|
|
||||||
|
* kfax
|
||||||
|
A program to display raw and tiffed fax images (g3, g3-2d, g4).
|
||||||
|
|
||||||
|
* kfaxview
|
||||||
|
An embeddable KPart to display tiffed fax images.
|
||||||
|
|
||||||
|
* kfile-plugins
|
||||||
|
Provide meta information for graphic files.
|
||||||
|
|
||||||
|
* kghostview
|
||||||
|
Program (and embeddable KPart) to display *.pdf and *.ps
|
||||||
|
|
||||||
|
* kiconedit
|
||||||
|
An icon editor.
|
||||||
|
|
||||||
|
* kmrml
|
||||||
|
Connects to a MRML server and find similar images
|
||||||
|
|
||||||
|
* kooka
|
||||||
|
A raster image scan program, based on SANE and libkscan.
|
||||||
|
|
||||||
|
* kolourpaint
|
||||||
|
An easy-to-use paint program designed for everyday tasks like drawing
|
||||||
|
simple diagrams/logos/icons and editing screenshots.
|
||||||
|
|
||||||
|
* kpovmodeler
|
||||||
|
Program to enter scenes for the 3D rendering engine PovRay.
|
||||||
|
|
||||||
|
* kruler
|
||||||
|
A ruler in inch, centimeter and pixel to check distances on the screen.
|
||||||
|
|
||||||
|
* ksnapshot
|
||||||
|
Make snapshots of the screen contents.
|
||||||
|
|
||||||
|
* kuickshow
|
||||||
|
Fast and comfortable imageviewer.
|
||||||
|
|
||||||
|
* kview
|
||||||
|
Picture viewer, provided as standalone program and embeddable KPart.
|
||||||
|
|
||||||
|
* kviewshell
|
||||||
|
Generic framework for viewer applications.
|
||||||
|
|
||||||
|
* libkscan
|
||||||
|
Library to access scanners used by kooka (and koffice), needs SANE to be
|
||||||
|
used
|
||||||
|
|
||||||
|
|
||||||
|
Common Mistakes
|
||||||
|
---------------
|
||||||
|
If configure claims Qt cannot be found, have a look at http://www.trolltech.com
|
||||||
|
to get a copy of latest Qt 3.3.x version.
|
||||||
|
|
||||||
|
|
||||||
|
Debugging
|
||||||
|
---------
|
||||||
|
You can use --enable-debug with the configure script, if you want to have
|
||||||
|
debug code in your KDE apps and libs. This will ensure useful and more
|
||||||
|
verbose backtraces, but will require a lot more disk space.
|
||||||
|
|
||||||
|
|
||||||
|
More Info
|
||||||
|
---------
|
||||||
|
Please direct any bug reports to our bug list by visiting
|
||||||
|
http://bugs.kde.org.
|
||||||
|
|
||||||
|
General KDE discussions should go to the KDE mailing list (kde@kde.org).
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,863 @@
|
|||||||
|
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||||
|
# 2005 Free Software Foundation, Inc.
|
||||||
|
# This file 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.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file 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.
|
||||||
|
|
||||||
|
# AM_AUTOMAKE_VERSION(VERSION)
|
||||||
|
# ----------------------------
|
||||||
|
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
||||||
|
# generated from the m4 files accompanying Automake X.Y.
|
||||||
|
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
|
||||||
|
|
||||||
|
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||||
|
# -------------------------------
|
||||||
|
# Call AM_AUTOMAKE_VERSION so it can be traced.
|
||||||
|
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
|
||||||
|
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||||
|
[AM_AUTOMAKE_VERSION([1.9.6])])
|
||||||
|
|
||||||
|
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file 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.
|
||||||
|
|
||||||
|
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
||||||
|
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
||||||
|
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
|
||||||
|
#
|
||||||
|
# Of course, Automake must honor this variable whenever it calls a
|
||||||
|
# tool from the auxiliary directory. The problem is that $srcdir (and
|
||||||
|
# therefore $ac_aux_dir as well) can be either absolute or relative,
|
||||||
|
# depending on how configure is run. This is pretty annoying, since
|
||||||
|
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
||||||
|
# source directory, any form will work fine, but in subdirectories a
|
||||||
|
# relative path needs to be adjusted first.
|
||||||
|
#
|
||||||
|
# $ac_aux_dir/missing
|
||||||
|
# fails when called from a subdirectory if $ac_aux_dir is relative
|
||||||
|
# $top_srcdir/$ac_aux_dir/missing
|
||||||
|
# fails if $ac_aux_dir is absolute,
|
||||||
|
# fails when called from a subdirectory in a VPATH build with
|
||||||
|
# a relative $ac_aux_dir
|
||||||
|
#
|
||||||
|
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
||||||
|
# are both prefixed by $srcdir. In an in-source build this is usually
|
||||||
|
# harmless because $srcdir is `.', but things will broke when you
|
||||||
|
# start a VPATH build or use an absolute $srcdir.
|
||||||
|
#
|
||||||
|
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
|
||||||
|
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
|
||||||
|
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
|
||||||
|
# and then we would define $MISSING as
|
||||||
|
# MISSING="\${SHELL} $am_aux_dir/missing"
|
||||||
|
# This will work as long as MISSING is not called from configure, because
|
||||||
|
# unfortunately $(top_srcdir) has no meaning in configure.
|
||||||
|
# However there are other variables, like CC, which are often used in
|
||||||
|
# configure, and could therefore not use this "fixed" $ac_aux_dir.
|
||||||
|
#
|
||||||
|
# Another solution, used here, is to always expand $ac_aux_dir to an
|
||||||
|
# absolute PATH. The drawback is that using absolute paths prevent a
|
||||||
|
# configured tree to be moved without reconfiguration.
|
||||||
|
|
||||||
|
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
||||||
|
[dnl Rely on autoconf to set up CDPATH properly.
|
||||||
|
AC_PREREQ([2.50])dnl
|
||||||
|
# expand $ac_aux_dir to an absolute path
|
||||||
|
am_aux_dir=`cd $ac_aux_dir && pwd`
|
||||||
|
])
|
||||||
|
|
||||||
|
# AM_CONDITIONAL -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file 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.
|
||||||
|
|
||||||
|
# serial 7
|
||||||
|
|
||||||
|
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||||
|
# -------------------------------------
|
||||||
|
# Define a conditional.
|
||||||
|
AC_DEFUN([AM_CONDITIONAL],
|
||||||
|
[AC_PREREQ(2.52)dnl
|
||||||
|
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||||
|
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||||
|
AC_SUBST([$1_TRUE])
|
||||||
|
AC_SUBST([$1_FALSE])
|
||||||
|
if $2; then
|
||||||
|
$1_TRUE=
|
||||||
|
$1_FALSE='#'
|
||||||
|
else
|
||||||
|
$1_TRUE='#'
|
||||||
|
$1_FALSE=
|
||||||
|
fi
|
||||||
|
AC_CONFIG_COMMANDS_PRE(
|
||||||
|
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||||
|
AC_MSG_ERROR([[conditional "$1" was never defined.
|
||||||
|
Usually this means the macro was only invoked conditionally.]])
|
||||||
|
fi])])
|
||||||
|
|
||||||
|
|
||||||
|
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file 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.
|
||||||
|
|
||||||
|
# serial 8
|
||||||
|
|
||||||
|
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||||||
|
# written in clear, in which case automake, when reading aclocal.m4,
|
||||||
|
# will think it sees a *use*, and therefore will trigger all it's
|
||||||
|
# C support machinery. Also note that it means that autoscan, seeing
|
||||||
|
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
||||||
|
|
||||||
|
|
||||||
|
# _AM_DEPENDENCIES(NAME)
|
||||||
|
# ----------------------
|
||||||
|
# See how the compiler implements dependency checking.
|
||||||
|
# NAME is "CC", "CXX", "GCJ", or "OBJC".
|
||||||
|
# We try a few techniques and use that to set a single cache variable.
|
||||||
|
#
|
||||||
|
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
||||||
|
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
||||||
|
# dependency, and given that the user is not expected to run this macro,
|
||||||
|
# just rely on AC_PROG_CC.
|
||||||
|
AC_DEFUN([_AM_DEPENDENCIES],
|
||||||
|
[AC_REQUIRE([AM_SET_DEPDIR])dnl
|
||||||
|
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
||||||
|
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
||||||
|
AC_REQUIRE([AM_DEP_TRACK])dnl
|
||||||
|
|
||||||
|
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
||||||
|
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
||||||
|
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||||
|
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||||
|
[depcc="$$1" am_compiler_list=])
|
||||||
|
|
||||||
|
AC_CACHE_CHECK([dependency style of $depcc],
|
||||||
|
[am_cv_$1_dependencies_compiler_type],
|
||||||
|
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||||
|
# We make a subdir and do the tests there. Otherwise we can end up
|
||||||
|
# making bogus files that we don't know about and never remove. For
|
||||||
|
# instance it was reported that on HP-UX the gcc test will end up
|
||||||
|
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||||
|
# in D'.
|
||||||
|
mkdir conftest.dir
|
||||||
|
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||||
|
# using a relative directory.
|
||||||
|
cp "$am_depcomp" conftest.dir
|
||||||
|
cd conftest.dir
|
||||||
|
# We will build objects and dependencies in a subdirectory because
|
||||||
|
# it helps to detect inapplicable dependency modes. For instance
|
||||||
|
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||||
|
# side effect of compilation, but ICC will put the dependencies in
|
||||||
|
# the current directory while Tru64 will put them in the object
|
||||||
|
# directory.
|
||||||
|
mkdir sub
|
||||||
|
|
||||||
|
am_cv_$1_dependencies_compiler_type=none
|
||||||
|
if test "$am_compiler_list" = ""; then
|
||||||
|
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||||
|
fi
|
||||||
|
for depmode in $am_compiler_list; do
|
||||||
|
# Setup a source with many dependencies, because some compilers
|
||||||
|
# like to wrap large dependency lists on column 80 (with \), and
|
||||||
|
# we should not choose a depcomp mode which is confused by this.
|
||||||
|
#
|
||||||
|
# We need to recreate these files for each test, as the compiler may
|
||||||
|
# overwrite some of them when testing with obscure command lines.
|
||||||
|
# This happens at least with the AIX C compiler.
|
||||||
|
: > sub/conftest.c
|
||||||
|
for i in 1 2 3 4 5 6; do
|
||||||
|
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||||
|
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||||
|
# Solaris 8's {/usr,}/bin/sh.
|
||||||
|
touch sub/conftst$i.h
|
||||||
|
done
|
||||||
|
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||||
|
|
||||||
|
case $depmode in
|
||||||
|
nosideeffect)
|
||||||
|
# after this tag, mechanisms are not by side-effect, so they'll
|
||||||
|
# only be used when explicitly requested
|
||||||
|
if test "x$enable_dependency_tracking" = xyes; then
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
none) break ;;
|
||||||
|
esac
|
||||||
|
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||||
|
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||||
|
# handle `-M -o', and we need to detect this.
|
||||||
|
if depmode=$depmode \
|
||||||
|
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
||||||
|
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||||
|
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
||||||
|
>/dev/null 2>conftest.err &&
|
||||||
|
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||||
|
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||||
|
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||||
|
# icc doesn't choke on unknown options, it will just issue warnings
|
||||||
|
# or remarks (even with -Werror). So we grep stderr for any message
|
||||||
|
# that says an option was ignored or not supported.
|
||||||
|
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||||
|
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||||
|
# The diagnosis changed in icc 8.0:
|
||||||
|
# icc: Command line remark: option '-MP' not supported
|
||||||
|
if (grep 'ignoring option' conftest.err ||
|
||||||
|
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||||
|
am_cv_$1_dependencies_compiler_type=$depmode
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
rm -rf conftest.dir
|
||||||
|
else
|
||||||
|
am_cv_$1_dependencies_compiler_type=none
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||||
|
AM_CONDITIONAL([am__fastdep$1], [
|
||||||
|
test "x$enable_dependency_tracking" != xno \
|
||||||
|
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# AM_SET_DEPDIR
|
||||||
|
# -------------
|
||||||
|
# Choose a directory name for dependency files.
|
||||||
|
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
|
||||||
|
AC_DEFUN([AM_SET_DEPDIR],
|
||||||
|
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||||
|
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# AM_DEP_TRACK
|
||||||
|
# ------------
|
||||||
|
AC_DEFUN([AM_DEP_TRACK],
|
||||||
|
[AC_ARG_ENABLE(dependency-tracking,
|
||||||
|
[ --disable-dependency-tracking speeds up one-time build
|
||||||
|
--enable-dependency-tracking do not reject slow dependency extractors])
|
||||||
|
if test "x$enable_dependency_tracking" != xno; then
|
||||||
|
am_depcomp="$ac_aux_dir/depcomp"
|
||||||
|
AMDEPBACKSLASH='\'
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||||
|
AC_SUBST([AMDEPBACKSLASH])
|
||||||
|
])
|
||||||
|
|
||||||
|
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file 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.
|
||||||
|
|
||||||
|
#serial 3
|
||||||
|
|
||||||
|
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||||
|
# ------------------------------
|
||||||
|
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
|
[for mf in $CONFIG_FILES; do
|
||||||
|
# Strip MF so we end up with the name of the file.
|
||||||
|
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||||
|
# Check whether this is an Automake generated Makefile or not.
|
||||||
|
# We used to match only the files named `Makefile.in', but
|
||||||
|
# some people rename them; so instead we look at the file content.
|
||||||
|
# Grep'ing the first line is not enough: some people post-process
|
||||||
|
# each Makefile.in and add a new line on top of each file to say so.
|
||||||
|
# So let's grep whole file.
|
||||||
|
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
|
||||||
|
dirpart=`AS_DIRNAME("$mf")`
|
||||||
|
else
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||||
|
# from the Makefile without running `make'.
|
||||||
|
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||||
|
test -z "$DEPDIR" && continue
|
||||||
|
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||||
|
test -z "am__include" && continue
|
||||||
|
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||||
|
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||||
|
U=`sed -n 's/^U = //p' < "$mf"`
|
||||||
|
# Find all dependency output files, they are included files with
|
||||||
|
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||||
|
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||||
|
# expansion.
|
||||||
|
for file in `sed -n "
|
||||||
|
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||||
|
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||||
|
# Make sure the directory exists.
|
||||||
|
test -f "$dirpart/$file" && continue
|
||||||
|
fdir=`AS_DIRNAME(["$file"])`
|
||||||
|
AS_MKDIR_P([$dirpart/$fdir])
|
||||||
|
# echo "creating $dirpart/$file"
|
||||||
|
echo '# dummy' > "$dirpart/$file"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||||
|
|
||||||
|
|
||||||
|
# AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||||
|
# -----------------------------
|
||||||
|
# This macro should only be invoked once -- use via AC_REQUIRE.
|
||||||
|
#
|
||||||
|
# This code is only required when automatic dependency tracking
|
||||||
|
# is enabled. FIXME. This creates each `.P' file that we will
|
||||||
|
# need in order to bootstrap the dependency handling code.
|
||||||
|
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
|
[AC_CONFIG_COMMANDS([depfiles],
|
||||||
|
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
|
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||||
|
])
|
||||||
|
|
||||||
|
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file 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.
|
||||||
|
|
||||||
|
# serial 8
|
||||||
|
|
||||||
|
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
|
||||||
|
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
|
||||||
|
|
||||||
|
# Do all the work for Automake. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file 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.
|
||||||
|
|
||||||
|
# serial 12
|
||||||
|
|
||||||
|
# This macro actually does too much. Some checks are only needed if
|
||||||
|
# your package does certain things. But this isn't really a big deal.
|
||||||
|
|
||||||
|
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
||||||
|
# AM_INIT_AUTOMAKE([OPTIONS])
|
||||||
|
# -----------------------------------------------
|
||||||
|
# The call with PACKAGE and VERSION arguments is the old style
|
||||||
|
# call (pre autoconf-2.50), which is being phased out. PACKAGE
|
||||||
|
# and VERSION should now be passed to AC_INIT and removed from
|
||||||
|
# the call to AM_INIT_AUTOMAKE.
|
||||||
|
# We support both call styles for the transition. After
|
||||||
|
# the next Automake release, Autoconf can make the AC_INIT
|
||||||
|
# arguments mandatory, and then we can depend on a new Autoconf
|
||||||
|
# release and drop the old call support.
|
||||||
|
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||||
|
[AC_PREREQ([2.58])dnl
|
||||||
|
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||||
|
dnl the ones we care about.
|
||||||
|
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||||
|
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||||
|
# test to see if srcdir already configured
|
||||||
|
if test "`cd $srcdir && pwd`" != "`pwd`" &&
|
||||||
|
test -f $srcdir/config.status; then
|
||||||
|
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||||
|
fi
|
||||||
|
|
||||||
|
# test whether we have cygpath
|
||||||
|
if test -z "$CYGPATH_W"; then
|
||||||
|
if (cygpath --version) >/dev/null 2>/dev/null; then
|
||||||
|
CYGPATH_W='cygpath -w'
|
||||||
|
else
|
||||||
|
CYGPATH_W=echo
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_SUBST([CYGPATH_W])
|
||||||
|
|
||||||
|
# Define the identity of the package.
|
||||||
|
dnl Distinguish between old-style and new-style calls.
|
||||||
|
m4_ifval([$2],
|
||||||
|
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
||||||
|
AC_SUBST([PACKAGE], [$1])dnl
|
||||||
|
AC_SUBST([VERSION], [$2])],
|
||||||
|
[_AM_SET_OPTIONS([$1])dnl
|
||||||
|
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||||
|
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
||||||
|
|
||||||
|
_AM_IF_OPTION([no-define],,
|
||||||
|
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||||
|
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
|
||||||
|
|
||||||
|
# Some tools Automake needs.
|
||||||
|
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
||||||
|
AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
||||||
|
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
|
||||||
|
AM_MISSING_PROG(AUTOCONF, autoconf)
|
||||||
|
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
||||||
|
AM_MISSING_PROG(AUTOHEADER, autoheader)
|
||||||
|
AM_MISSING_PROG(MAKEINFO, makeinfo)
|
||||||
|
AM_PROG_INSTALL_SH
|
||||||
|
AM_PROG_INSTALL_STRIP
|
||||||
|
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
||||||
|
# We need awk for the "check" target. The system "awk" is bad on
|
||||||
|
# some platforms.
|
||||||
|
AC_REQUIRE([AC_PROG_AWK])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||||
|
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||||
|
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
||||||
|
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||||
|
[_AM_PROG_TAR([v7])])])
|
||||||
|
_AM_IF_OPTION([no-dependencies],,
|
||||||
|
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||||
|
[_AM_DEPENDENCIES(CC)],
|
||||||
|
[define([AC_PROG_CC],
|
||||||
|
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
||||||
|
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
||||||
|
[_AM_DEPENDENCIES(CXX)],
|
||||||
|
[define([AC_PROG_CXX],
|
||||||
|
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# When config.status generates a header, we must update the stamp-h file.
|
||||||
|
# This file resides in the same directory as the config header
|
||||||
|
# that is generated. The stamp files are numbered to have different names.
|
||||||
|
|
||||||
|
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
||||||
|
# loop where config.status creates the headers, so we can generate
|
||||||
|
# our stamp files there.
|
||||||
|
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
||||||
|
[# Compute $1's index in $config_headers.
|
||||||
|
_am_stamp_count=1
|
||||||
|
for _am_header in $config_headers :; do
|
||||||
|
case $_am_header in
|
||||||
|
$1 | $1:* )
|
||||||
|
break ;;
|
||||||
|
* )
|
||||||
|
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
|
||||||
|
|
||||||
|
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file 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.
|
||||||
|
|
||||||
|
# AM_PROG_INSTALL_SH
|
||||||
|
# ------------------
|
||||||
|
# Define $install_sh.
|
||||||
|
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||||
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||||
|
install_sh=${install_sh-"$am_aux_dir/install-sh"}
|
||||||
|
AC_SUBST(install_sh)])
|
||||||
|
|
||||||
|
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file 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.
|
||||||
|
|
||||||
|
# serial 2
|
||||||
|
|
||||||
|
# Check whether the underlying file-system supports filenames
|
||||||
|
# with a leading dot. For instance MS-DOS doesn't.
|
||||||
|
AC_DEFUN([AM_SET_LEADING_DOT],
|
||||||
|
[rm -rf .tst 2>/dev/null
|
||||||
|
mkdir .tst 2>/dev/null
|
||||||
|
if test -d .tst; then
|
||||||
|
am__leading_dot=.
|
||||||
|
else
|
||||||
|
am__leading_dot=_
|
||||||
|
fi
|
||||||
|
rmdir .tst 2>/dev/null
|
||||||
|
AC_SUBST([am__leading_dot])])
|
||||||
|
|
||||||
|
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file 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.
|
||||||
|
|
||||||
|
# serial 3
|
||||||
|
|
||||||
|
# AM_MAKE_INCLUDE()
|
||||||
|
# -----------------
|
||||||
|
# Check to see how make treats includes.
|
||||||
|
AC_DEFUN([AM_MAKE_INCLUDE],
|
||||||
|
[am_make=${MAKE-make}
|
||||||
|
cat > confinc << 'END'
|
||||||
|
am__doit:
|
||||||
|
@echo done
|
||||||
|
.PHONY: am__doit
|
||||||
|
END
|
||||||
|
# If we don't find an include directive, just comment out the code.
|
||||||
|
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||||
|
am__include="#"
|
||||||
|
am__quote=
|
||||||
|
_am_result=none
|
||||||
|
# First try GNU make style include.
|
||||||
|
echo "include confinc" > confmf
|
||||||
|
# We grep out `Entering directory' and `Leaving directory'
|
||||||
|
# messages which can occur if `w' ends up in MAKEFLAGS.
|
||||||
|
# In particular we don't look at `^make:' because GNU make might
|
||||||
|
# be invoked under some other name (usually "gmake"), in which
|
||||||
|
# case it prints its new name instead of `make'.
|
||||||
|
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||||
|
am__include=include
|
||||||
|
am__quote=
|
||||||
|
_am_result=GNU
|
||||||
|
fi
|
||||||
|
# Now try BSD make style include.
|
||||||
|
if test "$am__include" = "#"; then
|
||||||
|
echo '.include "confinc"' > confmf
|
||||||
|
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
||||||
|
am__include=.include
|
||||||
|
am__quote="\""
|
||||||
|
_am_result=BSD
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_SUBST([am__include])
|
||||||
|
AC_SUBST([am__quote])
|
||||||
|
AC_MSG_RESULT([$_am_result])
|
||||||
|
rm -f confinc confmf
|
||||||
|
])
|
||||||
|
|
||||||
|
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file 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.
|
||||||
|
|
||||||
|
# serial 4
|
||||||
|
|
||||||
|
# AM_MISSING_PROG(NAME, PROGRAM)
|
||||||
|
# ------------------------------
|
||||||
|
AC_DEFUN([AM_MISSING_PROG],
|
||||||
|
[AC_REQUIRE([AM_MISSING_HAS_RUN])
|
||||||
|
$1=${$1-"${am_missing_run}$2"}
|
||||||
|
AC_SUBST($1)])
|
||||||
|
|
||||||
|
|
||||||
|
# AM_MISSING_HAS_RUN
|
||||||
|
# ------------------
|
||||||
|
# Define MISSING if not defined so far and test if it supports --run.
|
||||||
|
# If it does, set am_missing_run to use it, otherwise, to nothing.
|
||||||
|
AC_DEFUN([AM_MISSING_HAS_RUN],
|
||||||
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||||
|
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
|
||||||
|
# Use eval to expand $SHELL
|
||||||
|
if eval "$MISSING --run true"; then
|
||||||
|
am_missing_run="$MISSING --run "
|
||||||
|
else
|
||||||
|
am_missing_run=
|
||||||
|
AC_MSG_WARN([`missing' script is too old or missing])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file 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.
|
||||||
|
|
||||||
|
# AM_PROG_MKDIR_P
|
||||||
|
# ---------------
|
||||||
|
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
|
||||||
|
#
|
||||||
|
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
|
||||||
|
# created by `make install' are always world readable, even if the
|
||||||
|
# installer happens to have an overly restrictive umask (e.g. 077).
|
||||||
|
# This was a mistake. There are at least two reasons why we must not
|
||||||
|
# use `-m 0755':
|
||||||
|
# - it causes special bits like SGID to be ignored,
|
||||||
|
# - it may be too restrictive (some setups expect 775 directories).
|
||||||
|
#
|
||||||
|
# Do not use -m 0755 and let people choose whatever they expect by
|
||||||
|
# setting umask.
|
||||||
|
#
|
||||||
|
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
|
||||||
|
# Some implementations (such as Solaris 8's) are not thread-safe: if a
|
||||||
|
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
|
||||||
|
# concurrently, both version can detect that a/ is missing, but only
|
||||||
|
# one can create it and the other will error out. Consequently we
|
||||||
|
# restrict ourselves to GNU make (using the --version option ensures
|
||||||
|
# this.)
|
||||||
|
AC_DEFUN([AM_PROG_MKDIR_P],
|
||||||
|
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||||
|
# We used to keeping the `.' as first argument, in order to
|
||||||
|
# allow $(mkdir_p) to be used without argument. As in
|
||||||
|
# $(mkdir_p) $(somedir)
|
||||||
|
# where $(somedir) is conditionally defined. However this is wrong
|
||||||
|
# for two reasons:
|
||||||
|
# 1. if the package is installed by a user who cannot write `.'
|
||||||
|
# make install will fail,
|
||||||
|
# 2. the above comment should most certainly read
|
||||||
|
# $(mkdir_p) $(DESTDIR)$(somedir)
|
||||||
|
# so it does not work when $(somedir) is undefined and
|
||||||
|
# $(DESTDIR) is not.
|
||||||
|
# To support the latter case, we have to write
|
||||||
|
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
|
||||||
|
# so the `.' trick is pointless.
|
||||||
|
mkdir_p='mkdir -p --'
|
||||||
|
else
|
||||||
|
# On NextStep and OpenStep, the `mkdir' command does not
|
||||||
|
# recognize any option. It will interpret all options as
|
||||||
|
# directories to create, and then abort because `.' already
|
||||||
|
# exists.
|
||||||
|
for d in ./-p ./--version;
|
||||||
|
do
|
||||||
|
test -d $d && rmdir $d
|
||||||
|
done
|
||||||
|
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
|
||||||
|
if test -f "$ac_aux_dir/mkinstalldirs"; then
|
||||||
|
mkdir_p='$(mkinstalldirs)'
|
||||||
|
else
|
||||||
|
mkdir_p='$(install_sh) -d'
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_SUBST([mkdir_p])])
|
||||||
|
|
||||||
|
# Helper functions for option handling. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file 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.
|
||||||
|
|
||||||
|
# serial 3
|
||||||
|
|
||||||
|
# _AM_MANGLE_OPTION(NAME)
|
||||||
|
# -----------------------
|
||||||
|
AC_DEFUN([_AM_MANGLE_OPTION],
|
||||||
|
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
||||||
|
|
||||||
|
# _AM_SET_OPTION(NAME)
|
||||||
|
# ------------------------------
|
||||||
|
# Set option NAME. Presently that only means defining a flag for this option.
|
||||||
|
AC_DEFUN([_AM_SET_OPTION],
|
||||||
|
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
||||||
|
|
||||||
|
# _AM_SET_OPTIONS(OPTIONS)
|
||||||
|
# ----------------------------------
|
||||||
|
# OPTIONS is a space-separated list of Automake options.
|
||||||
|
AC_DEFUN([_AM_SET_OPTIONS],
|
||||||
|
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||||
|
|
||||||
|
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
||||||
|
# -------------------------------------------
|
||||||
|
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||||
|
AC_DEFUN([_AM_IF_OPTION],
|
||||||
|
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||||
|
|
||||||
|
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file 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.
|
||||||
|
|
||||||
|
# serial 4
|
||||||
|
|
||||||
|
# AM_SANITY_CHECK
|
||||||
|
# ---------------
|
||||||
|
AC_DEFUN([AM_SANITY_CHECK],
|
||||||
|
[AC_MSG_CHECKING([whether build environment is sane])
|
||||||
|
# Just in case
|
||||||
|
sleep 1
|
||||||
|
echo timestamp > conftest.file
|
||||||
|
# Do `set' in a subshell so we don't clobber the current shell's
|
||||||
|
# arguments. Must try -L first in case configure is actually a
|
||||||
|
# symlink; some systems play weird games with the mod time of symlinks
|
||||||
|
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||||
|
# directory).
|
||||||
|
if (
|
||||||
|
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
|
||||||
|
if test "$[*]" = "X"; then
|
||||||
|
# -L didn't work.
|
||||||
|
set X `ls -t $srcdir/configure conftest.file`
|
||||||
|
fi
|
||||||
|
rm -f conftest.file
|
||||||
|
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
||||||
|
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
||||||
|
|
||||||
|
# If neither matched, then we have a broken ls. This can happen
|
||||||
|
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||||
|
# broken ls alias from the environment. This has actually
|
||||||
|
# happened. Such a system could not be considered "sane".
|
||||||
|
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||||
|
alias in your environment])
|
||||||
|
fi
|
||||||
|
|
||||||
|
test "$[2]" = conftest.file
|
||||||
|
)
|
||||||
|
then
|
||||||
|
# Ok.
|
||||||
|
:
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||||
|
Check your system clock])
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT(yes)])
|
||||||
|
|
||||||
|
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file 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.
|
||||||
|
|
||||||
|
# AM_PROG_INSTALL_STRIP
|
||||||
|
# ---------------------
|
||||||
|
# One issue with vendor `install' (even GNU) is that you can't
|
||||||
|
# specify the program used to strip binaries. This is especially
|
||||||
|
# annoying in cross-compiling environments, where the build's strip
|
||||||
|
# is unlikely to handle the host's binaries.
|
||||||
|
# Fortunately install-sh will honor a STRIPPROG variable, so we
|
||||||
|
# always use install-sh in `make install-strip', and initialize
|
||||||
|
# STRIPPROG with the value of the STRIP variable (set by the user).
|
||||||
|
AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
||||||
|
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||||
|
# Installed binaries are usually stripped using `strip' when the user
|
||||||
|
# run `make install-strip'. However `strip' might not be the right
|
||||||
|
# tool to use in cross-compilation environments, therefore Automake
|
||||||
|
# will honor the `STRIP' environment variable to overrule this program.
|
||||||
|
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
|
||||||
|
if test "$cross_compiling" != no; then
|
||||||
|
AC_CHECK_TOOL([STRIP], [strip], :)
|
||||||
|
fi
|
||||||
|
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
|
||||||
|
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||||
|
|
||||||
|
# Check how to create a tarball. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file 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.
|
||||||
|
|
||||||
|
# serial 2
|
||||||
|
|
||||||
|
# _AM_PROG_TAR(FORMAT)
|
||||||
|
# --------------------
|
||||||
|
# Check how to create a tarball in format FORMAT.
|
||||||
|
# FORMAT should be one of `v7', `ustar', or `pax'.
|
||||||
|
#
|
||||||
|
# Substitute a variable $(am__tar) that is a command
|
||||||
|
# writing to stdout a FORMAT-tarball containing the directory
|
||||||
|
# $tardir.
|
||||||
|
# tardir=directory && $(am__tar) > result.tar
|
||||||
|
#
|
||||||
|
# Substitute a variable $(am__untar) that extract such
|
||||||
|
# a tarball read from stdin.
|
||||||
|
# $(am__untar) < result.tar
|
||||||
|
AC_DEFUN([_AM_PROG_TAR],
|
||||||
|
[# Always define AMTAR for backward compatibility.
|
||||||
|
AM_MISSING_PROG([AMTAR], [tar])
|
||||||
|
m4_if([$1], [v7],
|
||||||
|
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
|
||||||
|
[m4_case([$1], [ustar],, [pax],,
|
||||||
|
[m4_fatal([Unknown tar format])])
|
||||||
|
AC_MSG_CHECKING([how to create a $1 tar archive])
|
||||||
|
# Loop over all known methods to create a tar archive until one works.
|
||||||
|
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
||||||
|
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
||||||
|
# Do not fold the above two line into one, because Tru64 sh and
|
||||||
|
# Solaris sh will not grok spaces in the rhs of `-'.
|
||||||
|
for _am_tool in $_am_tools
|
||||||
|
do
|
||||||
|
case $_am_tool in
|
||||||
|
gnutar)
|
||||||
|
for _am_tar in tar gnutar gtar;
|
||||||
|
do
|
||||||
|
AM_RUN_LOG([$_am_tar --version]) && break
|
||||||
|
done
|
||||||
|
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
||||||
|
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
||||||
|
am__untar="$_am_tar -xf -"
|
||||||
|
;;
|
||||||
|
plaintar)
|
||||||
|
# Must skip GNU tar: if it does not support --format= it doesn't create
|
||||||
|
# ustar tarball either.
|
||||||
|
(tar --version) >/dev/null 2>&1 && continue
|
||||||
|
am__tar='tar chf - "$$tardir"'
|
||||||
|
am__tar_='tar chf - "$tardir"'
|
||||||
|
am__untar='tar xf -'
|
||||||
|
;;
|
||||||
|
pax)
|
||||||
|
am__tar='pax -L -x $1 -w "$$tardir"'
|
||||||
|
am__tar_='pax -L -x $1 -w "$tardir"'
|
||||||
|
am__untar='pax -r'
|
||||||
|
;;
|
||||||
|
cpio)
|
||||||
|
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
||||||
|
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
||||||
|
am__untar='cpio -i -H $1 -d'
|
||||||
|
;;
|
||||||
|
none)
|
||||||
|
am__tar=false
|
||||||
|
am__tar_=false
|
||||||
|
am__untar=false
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If the value was cached, stop now. We just wanted to have am__tar
|
||||||
|
# and am__untar set.
|
||||||
|
test -n "${am_cv_prog_tar_$1}" && break
|
||||||
|
|
||||||
|
# tar/untar a dummy directory, and stop if the command works
|
||||||
|
rm -rf conftest.dir
|
||||||
|
mkdir conftest.dir
|
||||||
|
echo GrepMe > conftest.dir/file
|
||||||
|
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
||||||
|
rm -rf conftest.dir
|
||||||
|
if test -s conftest.tar; then
|
||||||
|
AM_RUN_LOG([$am__untar <conftest.tar])
|
||||||
|
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rm -rf conftest.dir
|
||||||
|
|
||||||
|
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
||||||
|
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
||||||
|
AC_SUBST([am__tar])
|
||||||
|
AC_SUBST([am__untar])
|
||||||
|
]) # _AM_PROG_TAR
|
||||||
|
|
||||||
|
m4_include([acinclude.m4])
|
@ -0,0 +1,102 @@
|
|||||||
|
## generate API documentation with doxygen
|
||||||
|
apidox-am-yes:
|
||||||
|
@if test \! -d "$(top_srcdir)/doc/common/" && test -z "$$DOXDATA" ; then \
|
||||||
|
export DOXDATA=$(kde_libs_htmldir)/en/common ; \
|
||||||
|
fi ; \
|
||||||
|
abs_top_srcdir=`cd $(top_srcdir) && pwd` ;\
|
||||||
|
test -d $(top_builddir)/apidocs || \
|
||||||
|
( cd $(top_builddir) && sh $$abs_top_srcdir/admin/doxygen.sh \
|
||||||
|
--no-modulename --installdir=$(kde_libs_htmldir)/en \
|
||||||
|
--no-recurse $(abs_top_srcdir) . ) ; \
|
||||||
|
cd $(top_builddir) && sh $$abs_top_srcdir/admin/doxygen.sh \
|
||||||
|
--recurse --no-modulename --installdir=$(kde_libs_htmldir)/en \
|
||||||
|
$$abs_top_srcdir $(subdir)
|
||||||
|
|
||||||
|
apidox-am-toplevel-yes:
|
||||||
|
@if test \! -d "$(top_srcdir)/doc/common/" && test -z "$$ADMIN" ; then \
|
||||||
|
export DOXDATA=$(kde_libs_htmldir)/en/common ; \
|
||||||
|
fi ; \
|
||||||
|
abs_top_srcdir=`cd $(top_srcdir) && pwd` ;\
|
||||||
|
cd $(top_builddir) && sh $$abs_top_srcdir/admin/doxygen.sh \
|
||||||
|
--no-modulename --installdir=$(kde_libs_htmldir)/en \
|
||||||
|
$$abs_top_srcdir
|
||||||
|
|
||||||
|
## Don't generate API documentation without doxygen
|
||||||
|
apidox-am-no:
|
||||||
|
|
||||||
|
apidox-am-toplevel-no:
|
||||||
|
|
||||||
|
|
||||||
|
apidox:
|
||||||
|
@if test "$(subdir)" != "."; then \
|
||||||
|
$(MAKE) apidox-am-@KDE_HAS_DOXYGEN@ ;\
|
||||||
|
else \
|
||||||
|
$(MAKE) apidox-am-toplevel-@KDE_HAS_DOXYGEN@ ;\
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
install-data-local: install-apidox
|
||||||
|
|
||||||
|
## install API documentation
|
||||||
|
install-apidox:
|
||||||
|
@if test "$(subdir)" != "."; then \
|
||||||
|
$(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir)/html ; \
|
||||||
|
if test -f $(top_builddir)/apidocs/$(subdir)/$(subdir).tag; then \
|
||||||
|
echo $(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/$(subdir).tag $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \
|
||||||
|
$(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/$(subdir).tag $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \
|
||||||
|
fi; \
|
||||||
|
if test -d $(top_builddir)/apidocs/$(subdir)/html; then \
|
||||||
|
list=`ls $(top_builddir)/apidocs/$(subdir)/html`; \
|
||||||
|
echo "installing $(top_builddir)/apidocs/$(subdir)/html" ;\
|
||||||
|
for file in $$list; do \
|
||||||
|
$(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/html/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir)/html; \
|
||||||
|
done; \
|
||||||
|
fi; \
|
||||||
|
else\
|
||||||
|
if test -d $(top_builddir)/apidocs; then \
|
||||||
|
$(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs ;\
|
||||||
|
list=`cd $(top_builddir)/apidocs && ls -1`; \
|
||||||
|
echo "installing $(top_builddir)/apidocs/$$file" ;\
|
||||||
|
echo "target directory $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs" ; \
|
||||||
|
for file in $$list; do \
|
||||||
|
if test -f $(top_builddir)/apidocs/$$file; then \
|
||||||
|
$(INSTALL_DATA) $(top_builddir)/apidocs/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \
|
||||||
|
fi; \
|
||||||
|
done ; fi; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
uninstall-local: uninstall-apidox
|
||||||
|
|
||||||
|
## uninstall API documentation
|
||||||
|
uninstall-apidox:
|
||||||
|
@if test "$(subdir)" != "."; then \
|
||||||
|
if test -d $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); then \
|
||||||
|
rm -rfv $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \
|
||||||
|
fi \
|
||||||
|
else \
|
||||||
|
if test -d $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; then \
|
||||||
|
rm -rfv $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \
|
||||||
|
fi \
|
||||||
|
fi
|
||||||
|
|
||||||
|
install-apidox-recurse: install-apidox
|
||||||
|
@set fnord $(MAKEFLAGS); amf=$$2; if test -n '$(SUBDIRS)'; then \
|
||||||
|
list='$(SUBDIRS)'; \
|
||||||
|
for subdir in $$list; do \
|
||||||
|
if grep '^include .*Doxyfile.am' $(srcdir)/$$subdir/Makefile.am > /dev/null ; then \
|
||||||
|
echo "Installing apidox from $$subdir"; \
|
||||||
|
if test "$$subdir" != "."; then \
|
||||||
|
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) GENERATE_FLAG=no install-apidox-recurse) || exit 1; \
|
||||||
|
fi ; fi ;\
|
||||||
|
done; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: apidox-am-yes apidox-am-no install-data-local install-apidox install-apidox uninstall-local uninstall-apidox uninstall-apidox apidox apidox-am-toplevel-no apidox-am-toplevel-yes
|
||||||
|
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: makefile
|
||||||
|
# End:
|
@ -0,0 +1,192 @@
|
|||||||
|
OUTPUT_LANGUAGE = English
|
||||||
|
USE_WINDOWS_ENCODING = NO
|
||||||
|
BRIEF_MEMBER_DESC = NO
|
||||||
|
REPEAT_BRIEF = YES
|
||||||
|
ABBREVIATE_BRIEF =
|
||||||
|
ALWAYS_DETAILED_SEC = YES
|
||||||
|
INLINE_INHERITED_MEMB = NO
|
||||||
|
FULL_PATH_NAMES = NO
|
||||||
|
STRIP_FROM_PATH =
|
||||||
|
SHORT_NAMES = NO
|
||||||
|
JAVADOC_AUTOBRIEF = YES
|
||||||
|
MULTILINE_CPP_IS_BRIEF = NO
|
||||||
|
INHERIT_DOCS = YES
|
||||||
|
DISTRIBUTE_GROUP_DOC = NO
|
||||||
|
TAB_SIZE = 4
|
||||||
|
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||||
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
|
SUBGROUPING = YES
|
||||||
|
EXTRACT_ALL = NO
|
||||||
|
EXTRACT_PRIVATE = NO
|
||||||
|
EXTRACT_STATIC = YES
|
||||||
|
EXTRACT_LOCAL_CLASSES = NO
|
||||||
|
HIDE_UNDOC_MEMBERS = NO
|
||||||
|
HIDE_UNDOC_CLASSES = YES
|
||||||
|
HIDE_FRIEND_COMPOUNDS = NO
|
||||||
|
HIDE_IN_BODY_DOCS = NO
|
||||||
|
INTERNAL_DOCS = NO
|
||||||
|
CASE_SENSE_NAMES = YES
|
||||||
|
HIDE_SCOPE_NAMES = NO
|
||||||
|
SHOW_INCLUDE_FILES = YES
|
||||||
|
INLINE_INFO = YES
|
||||||
|
SORT_BRIEF_DOCS = NO
|
||||||
|
SORT_BY_SCOPE_NAME = NO
|
||||||
|
GENERATE_TESTLIST = NO
|
||||||
|
GENERATE_BUGLIST = YES
|
||||||
|
GENERATE_DEPRECATEDLIST= YES
|
||||||
|
ENABLED_SECTIONS =
|
||||||
|
MAX_INITIALIZER_LINES = 30
|
||||||
|
SHOW_USED_FILES = YES
|
||||||
|
QUIET = YES
|
||||||
|
WARNINGS = NO
|
||||||
|
WARN_IF_UNDOCUMENTED = NO
|
||||||
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
WARN_FORMAT =
|
||||||
|
WARN_LOGFILE =
|
||||||
|
INPUT =
|
||||||
|
FILE_PATTERNS = *.h \
|
||||||
|
*.cpp \
|
||||||
|
*.cc \
|
||||||
|
*.hpp \
|
||||||
|
*.dox \
|
||||||
|
*.c++ \
|
||||||
|
*.cxx \
|
||||||
|
*.h++ \
|
||||||
|
*.hh
|
||||||
|
RECURSIVE = YES
|
||||||
|
EXCLUDE =
|
||||||
|
EXCLUDE_SYMLINKS = NO
|
||||||
|
EXCLUDE_PATTERNS = *.moc.* \
|
||||||
|
moc* \
|
||||||
|
*.all_cpp.* \
|
||||||
|
*unload.* \
|
||||||
|
*/test/* \
|
||||||
|
*/tests/* \
|
||||||
|
*_p.h
|
||||||
|
EXAMPLE_PATH =
|
||||||
|
EXAMPLE_PATTERNS =
|
||||||
|
EXAMPLE_RECURSIVE = NO
|
||||||
|
IMAGE_PATH =
|
||||||
|
INPUT_FILTER =
|
||||||
|
FILTER_SOURCE_FILES = NO
|
||||||
|
SOURCE_BROWSER = YES
|
||||||
|
INLINE_SOURCES = NO
|
||||||
|
STRIP_CODE_COMMENTS = YES
|
||||||
|
REFERENCED_BY_RELATION = YES
|
||||||
|
REFERENCES_RELATION = YES
|
||||||
|
VERBATIM_HEADERS = YES
|
||||||
|
ALPHABETICAL_INDEX = YES
|
||||||
|
COLS_IN_ALPHA_INDEX = 3
|
||||||
|
HTML_OUTPUT =
|
||||||
|
HTML_FILE_EXTENSION = .html
|
||||||
|
HTML_HEADER = ../apidocs/common/header.html
|
||||||
|
HTML_FOOTER = ../apidocs/common/footer.html
|
||||||
|
HTML_STYLESHEET = ../apidocs/common/doxygen.css
|
||||||
|
HTML_ALIGN_MEMBERS = YES
|
||||||
|
GENERATE_HTMLHELP = NO
|
||||||
|
CHM_FILE =
|
||||||
|
HHC_LOCATION =
|
||||||
|
GENERATE_CHI = NO
|
||||||
|
BINARY_TOC = NO
|
||||||
|
TOC_EXPAND = NO
|
||||||
|
DISABLE_INDEX = YES
|
||||||
|
ENUM_VALUES_PER_LINE = 4
|
||||||
|
GENERATE_TREEVIEW = NO
|
||||||
|
TREEVIEW_WIDTH = 250
|
||||||
|
GENERATE_LATEX = NO
|
||||||
|
LATEX_OUTPUT =
|
||||||
|
LATEX_CMD_NAME = latex
|
||||||
|
MAKEINDEX_CMD_NAME = makeindex
|
||||||
|
COMPACT_LATEX = NO
|
||||||
|
PAPER_TYPE = a4wide
|
||||||
|
EXTRA_PACKAGES =
|
||||||
|
LATEX_HEADER =
|
||||||
|
PDF_HYPERLINKS = NO
|
||||||
|
USE_PDFLATEX = NO
|
||||||
|
LATEX_BATCHMODE = NO
|
||||||
|
LATEX_HIDE_INDICES = NO
|
||||||
|
GENERATE_RTF = NO
|
||||||
|
RTF_OUTPUT =
|
||||||
|
COMPACT_RTF = NO
|
||||||
|
RTF_HYPERLINKS = NO
|
||||||
|
RTF_STYLESHEET_FILE =
|
||||||
|
RTF_EXTENSIONS_FILE =
|
||||||
|
GENERATE_MAN = NO
|
||||||
|
MAN_OUTPUT =
|
||||||
|
MAN_EXTENSION = .kde3
|
||||||
|
MAN_LINKS = YES
|
||||||
|
GENERATE_XML = NO
|
||||||
|
XML_OUTPUT = xml
|
||||||
|
XML_SCHEMA =
|
||||||
|
XML_DTD =
|
||||||
|
XML_PROGRAMLISTING = NO
|
||||||
|
GENERATE_AUTOGEN_DEF = NO
|
||||||
|
GENERATE_PERLMOD = NO
|
||||||
|
PERLMOD_LATEX = NO
|
||||||
|
PERLMOD_PRETTY = YES
|
||||||
|
PERLMOD_MAKEVAR_PREFIX =
|
||||||
|
ENABLE_PREPROCESSING = YES
|
||||||
|
SEARCH_INCLUDES = YES
|
||||||
|
INCLUDE_PATH =
|
||||||
|
INCLUDE_FILE_PATTERNS =
|
||||||
|
PREDEFINED = QT_VERSION=320 \
|
||||||
|
__cplusplus \
|
||||||
|
Q_WS_X11
|
||||||
|
EXPAND_AS_DEFINED =
|
||||||
|
SKIP_FUNCTION_MACROS = YES
|
||||||
|
TAGFILES =
|
||||||
|
GENERATE_TAGFILE =
|
||||||
|
ALLEXTERNALS = NO
|
||||||
|
EXTERNAL_GROUPS = NO
|
||||||
|
PERL_PATH =
|
||||||
|
CLASS_DIAGRAMS = YES
|
||||||
|
HIDE_UNDOC_RELATIONS = NO
|
||||||
|
HAVE_DOT = NO
|
||||||
|
UML_LOOK = NO
|
||||||
|
TEMPLATE_RELATIONS = YES
|
||||||
|
INCLUDE_GRAPH = YES
|
||||||
|
INCLUDED_BY_GRAPH = YES
|
||||||
|
CALL_GRAPH = NO
|
||||||
|
GRAPHICAL_HIERARCHY = YES
|
||||||
|
DOT_IMAGE_FORMAT = png
|
||||||
|
DOT_PATH =
|
||||||
|
DOTFILE_DIRS =
|
||||||
|
MAX_DOT_GRAPH_WIDTH = 800
|
||||||
|
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||||
|
MAX_DOT_GRAPH_DEPTH = 0
|
||||||
|
GENERATE_LEGEND = YES
|
||||||
|
DOT_CLEANUP = YES
|
||||||
|
SEARCHENGINE = NO
|
||||||
|
|
||||||
|
### KDE Settings
|
||||||
|
ALIASES = \
|
||||||
|
"intern=\par<b>Internal use only.</b>" \
|
||||||
|
"reimp=\par<b>Reimplemented from superclass.</b>" \
|
||||||
|
"obsolete=@deprecated" \
|
||||||
|
"feature=\xrefitem features \"Feature(s)\" \"Features\"" \
|
||||||
|
"maintainer=\xrefitem maintainers \"Maintainer(s)\" \"Maintainers\"" \
|
||||||
|
"unmaintained=\xrefitem unmaintained \"Unmaintained\" \"Unmaintained\"" \
|
||||||
|
"requirement=\xrefitem requirements \"Requirement(s)\" \"Requirements\"" \
|
||||||
|
"faq=\xrefitem FAQ \"F.A.Q.\" \"F.A.Q.\"" \
|
||||||
|
"authors=\xrefitem authors \"Author(s)\" \"Authors\"" \
|
||||||
|
"FIXME=\xrefitem fixme \"Fixme\" \"Fixme\""
|
||||||
|
|
||||||
|
HTML_ALIGN_MEMBERS = YES
|
||||||
|
REFERENCED_BY_RELATION = NO
|
||||||
|
REFERENCES_RELATION = NO
|
||||||
|
VERBATIM_HEADERS = NO
|
||||||
|
GENERATE_HTML = YES
|
||||||
|
SOURCE_BROWSER = YES
|
||||||
|
GENERATE_AUTOGEN_DEF = NO
|
||||||
|
DETAILS_AT_TOP = YES
|
||||||
|
SORT_MEMBER_DOCS = YES
|
||||||
|
GENERATE_TODOLIST = YES
|
||||||
|
IGNORE_PREFIX = K
|
||||||
|
GENERATE_HTML = YES
|
||||||
|
CLASS_GRAPH = YES
|
||||||
|
COLLABORATION_GRAPH = NO
|
||||||
|
|
||||||
|
|
||||||
|
MACRO_EXPANSION = YES
|
||||||
|
EXPAND_ONLY_PREDEF = YES
|
||||||
|
|
@ -0,0 +1,37 @@
|
|||||||
|
### Makefile.common
|
||||||
|
###
|
||||||
|
### Copyright (C) 2002 by the KDE developers
|
||||||
|
|
||||||
|
### All the real work is done by the shellscript cvs.sh
|
||||||
|
|
||||||
|
SHELL=/bin/sh
|
||||||
|
|
||||||
|
cvs dist configure configure.in configure.files subdirs package-messages package-merge Makefile.am acinclude.m4 extract-messages:
|
||||||
|
@admindir=$(admindir); \
|
||||||
|
if test "x$$admindir" = x; then \
|
||||||
|
admindir=.; until test -f $$admindir/admin/cvs.sh; do \
|
||||||
|
admindir=$$admindir/..; \
|
||||||
|
if test `cd $$admindir && pwd` = / ; then break; fi; \
|
||||||
|
done; \
|
||||||
|
admindir=$$admindir/admin; \
|
||||||
|
if test -f $$admindir/cvs.sh; then :; else \
|
||||||
|
echo "Can't find the admin/ directory in any parent of the"; \
|
||||||
|
echo "current directory. Please set it with admindir=..."; \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
if test "$@" = "package-merge"; then \
|
||||||
|
MAKE="$(MAKE)" POFILES="$(POFILES)" PACKAGE="$(PACKAGE)" \
|
||||||
|
$(SHELL) $$admindir/cvs.sh package-merge ;\
|
||||||
|
else \
|
||||||
|
MAKE="$(MAKE)" $(SHELL) $$admindir/cvs.sh $@ ;\
|
||||||
|
fi
|
||||||
|
|
||||||
|
configure.in: configure.files subdirs
|
||||||
|
configure.files: subdirs
|
||||||
|
|
||||||
|
svn: cvs
|
||||||
|
|
||||||
|
.SILENT:
|
||||||
|
|
||||||
|
.PHONY: svn cvs dist package-merge package-messages
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,157 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
use DB_File;
|
||||||
|
use Fcntl ':flock';
|
||||||
|
|
||||||
|
if (!defined($ARGV[0])) {
|
||||||
|
print "usage: requires .class dump as parameter!\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub bailout
|
||||||
|
{
|
||||||
|
untie %bcheckdb if(defined(%bcheckdb));
|
||||||
|
|
||||||
|
if(defined(MYLOCK)) {
|
||||||
|
flock MYLOCK, LOCK_UN;
|
||||||
|
close(MYLOCK);
|
||||||
|
}
|
||||||
|
|
||||||
|
print @_;
|
||||||
|
exit 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub ask_user
|
||||||
|
{
|
||||||
|
my ($dbkey, $dbchunk) = @_;
|
||||||
|
|
||||||
|
if (defined($ENV{"BCHECK_UPDATE"})) {
|
||||||
|
$bcheckdb{$dbkey} = $dbchunk;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
&bailout("BC problem detected") if (! -t STDIN);
|
||||||
|
|
||||||
|
print "(I)gnore / (Q)uit / (U)pdate: ";
|
||||||
|
|
||||||
|
my $key;
|
||||||
|
while(defined(read STDIN, $key, 1)) {
|
||||||
|
$key = lc($key);
|
||||||
|
|
||||||
|
print "got: >$key<\n";
|
||||||
|
|
||||||
|
return if ($key eq 'i');
|
||||||
|
|
||||||
|
&bailout("BC problem. aborted") if ($key eq 'q');
|
||||||
|
|
||||||
|
if ($key eq 'u') {
|
||||||
|
$bcheckdb{$dbkey} = $dbchunk;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
print "\n(I)gnore / (Q)uit / (U)pdate: ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub diff_chunk($$)
|
||||||
|
{
|
||||||
|
my ($oldl, $newl) = @_;
|
||||||
|
my @old = split /^/m, $oldl;
|
||||||
|
my @new = split /^/m, $newl;
|
||||||
|
my $haschanges = 0;
|
||||||
|
my $max = $#old > $#new ? $#old : $#new;
|
||||||
|
|
||||||
|
die "whoops. key different" if ($old[0] ne $new[0]);
|
||||||
|
|
||||||
|
if ($#old != $#new) {
|
||||||
|
warn ("Structural difference.\n");
|
||||||
|
print @old;
|
||||||
|
print "-----------------------------------------------\n";
|
||||||
|
print @new;
|
||||||
|
$haschanges = 1;
|
||||||
|
return $haschanges;
|
||||||
|
}
|
||||||
|
|
||||||
|
print $old[0];
|
||||||
|
|
||||||
|
my ($class) = ($old[0] =~ /^(?:Class |Vtable for )(\S+)/);
|
||||||
|
|
||||||
|
my $c = 1;
|
||||||
|
while ($c < $max) {
|
||||||
|
my ($o, $n) = ($old[$c], $new[$c]);
|
||||||
|
chomp $o;
|
||||||
|
chomp $n;
|
||||||
|
$c++;
|
||||||
|
next if ($o eq $n);
|
||||||
|
|
||||||
|
if(defined($class) and $n =~ /^(\d+\s+)\w+(::\S+\s*.*)$/) {
|
||||||
|
next if ($n eq "$1$class$2");
|
||||||
|
}
|
||||||
|
|
||||||
|
$haschanges = 1;
|
||||||
|
|
||||||
|
print "-$o\n+$n\n\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
return $haschanges;
|
||||||
|
}
|
||||||
|
|
||||||
|
local $dblock = $ENV{"HOME"} . "/bcheck.lock";
|
||||||
|
my $dbfile = $ENV{"HOME"} . "/bcheck.db";
|
||||||
|
my $cdump = $ARGV[0];
|
||||||
|
|
||||||
|
die "file $cdump is not readable: $!" if (! -f $cdump);
|
||||||
|
|
||||||
|
# make sure the advisory lock exists
|
||||||
|
open(MYLOCK, ">$dblock");
|
||||||
|
print MYLOCK "";
|
||||||
|
|
||||||
|
flock MYLOCK, LOCK_EX;
|
||||||
|
|
||||||
|
tie %bcheckdb, 'DB_File', $dbfile;
|
||||||
|
|
||||||
|
my $chunk = "";
|
||||||
|
|
||||||
|
open (IN, "<$cdump") or die "cannot open $cdump: $!";
|
||||||
|
while (<IN>) {
|
||||||
|
|
||||||
|
chop;
|
||||||
|
|
||||||
|
s/0x[0-9a-fA-F]+/0x......../g;
|
||||||
|
s/base size=/size=/g;
|
||||||
|
s/\(\)\s*$//g;
|
||||||
|
s/base align=/align=/g;
|
||||||
|
|
||||||
|
$chunk .= $_ . "\n";
|
||||||
|
|
||||||
|
if(/^\s*$/) {
|
||||||
|
my @lines = split /^/m, $chunk;
|
||||||
|
my $key = $lines[0];
|
||||||
|
chomp $key;
|
||||||
|
|
||||||
|
if($key !~ /<anonymous struct>/ &&
|
||||||
|
$key !~ /<anonymous union>/) {
|
||||||
|
if(defined($bcheckdb{$key})) {
|
||||||
|
my $dbversion = $bcheckdb{$key};
|
||||||
|
|
||||||
|
if($dbversion ne $chunk) {
|
||||||
|
&ask_user($key, $chunk) if(&diff_chunk($dbversion, $chunk));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$bcheckdb{$key} = $chunk;
|
||||||
|
print "NEW: $key\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$chunk = "";
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
close(IN);
|
||||||
|
|
||||||
|
untie %bcheckdb;
|
||||||
|
flock MYLOCK, LOCK_UN;
|
||||||
|
close(MYLOCK);
|
||||||
|
|
||||||
|
exit 0;
|
@ -0,0 +1,142 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Wrapper for compilers which do not understand `-c -o'.
|
||||||
|
|
||||||
|
scriptversion=2005-05-14.22
|
||||||
|
|
||||||
|
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||||
|
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||||
|
#
|
||||||
|
# This program is free software; you can 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, 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, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# This file is maintained in Automake, please report
|
||||||
|
# bugs to <bug-automake@gnu.org> or send patches to
|
||||||
|
# <automake-patches@gnu.org>.
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
'')
|
||||||
|
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
-h | --h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||||
|
|
||||||
|
Wrapper for compilers which do not understand `-c -o'.
|
||||||
|
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||||
|
arguments, and rename the output as expected.
|
||||||
|
|
||||||
|
If you are trying to build a whole package this is not the
|
||||||
|
right script to run: please start by reading the file `INSTALL'.
|
||||||
|
|
||||||
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
EOF
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-v | --v*)
|
||||||
|
echo "compile $scriptversion"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
ofile=
|
||||||
|
cfile=
|
||||||
|
eat=
|
||||||
|
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$eat"; then
|
||||||
|
eat=
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
-o)
|
||||||
|
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||||
|
# So we strip `-o arg' only if arg is an object.
|
||||||
|
eat=1
|
||||||
|
case $2 in
|
||||||
|
*.o | *.obj)
|
||||||
|
ofile=$2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" -o "$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*.c)
|
||||||
|
cfile=$1
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -z "$ofile" || test -z "$cfile"; then
|
||||||
|
# If no `-o' option was seen then we might have been invoked from a
|
||||||
|
# pattern rule where we don't need one. That is ok -- this is a
|
||||||
|
# normal compilation that the losing compiler can handle. If no
|
||||||
|
# `.c' file was seen then we are probably linking. That is also
|
||||||
|
# ok.
|
||||||
|
exec "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Name of file we expect compiler to create.
|
||||||
|
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
|
||||||
|
|
||||||
|
# Create the lock directory.
|
||||||
|
# Note: use `[/.-]' here to ensure that we don't use the same name
|
||||||
|
# that we are using for the .o file. Also, base the name on the expected
|
||||||
|
# object file name, since that is what matters with a parallel build.
|
||||||
|
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
|
||||||
|
while true; do
|
||||||
|
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
# FIXME: race condition here if user kills between mkdir and trap.
|
||||||
|
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||||
|
|
||||||
|
# Run the compile.
|
||||||
|
"$@"
|
||||||
|
ret=$?
|
||||||
|
|
||||||
|
if test -f "$cofile"; then
|
||||||
|
mv "$cofile" "$ofile"
|
||||||
|
elif test -f "${cofile}bj"; then
|
||||||
|
mv "${cofile}bj" "$ofile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rmdir "$lockdir"
|
||||||
|
exit $ret
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-end: "$"
|
||||||
|
# End:
|
@ -0,0 +1,191 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
|
# this script patches a config.status file, to use our own perl script
|
||||||
|
# in the main loop
|
||||||
|
# we do it this way to circumvent hacking (and thereby including)
|
||||||
|
# autoconf function (which are GPL) into our LGPL acinclude.m4.in
|
||||||
|
# written by Michael Matz <matz@kde.org>
|
||||||
|
# adapted by Dirk Mueller <mueller@kde.org>
|
||||||
|
#
|
||||||
|
# This file is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Library General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
# This library 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
|
||||||
|
# Library General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU Library General Public License
|
||||||
|
# along with this library; see the file COPYING.LIB. If not, write to
|
||||||
|
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
# Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
# we have to change two places
|
||||||
|
# 1. the splitting of the substitutions into chunks of 90 (or even 48 in
|
||||||
|
# later autoconf's
|
||||||
|
# 2. the big main loop which patches all Makefile.in's
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use File::Basename;
|
||||||
|
|
||||||
|
my $ac_aux_dir = dirname($0);
|
||||||
|
my ($flag);
|
||||||
|
my $ac_version = 0;
|
||||||
|
my $vpath_seen = 0;
|
||||||
|
$flag = 0;
|
||||||
|
|
||||||
|
while (<>) {
|
||||||
|
# usage of $flag: 0 -- we have seen nothing yet
|
||||||
|
# 1 -- we are in (1)
|
||||||
|
# 2 -- we have ended (1)
|
||||||
|
# 3 -- we are in (2)
|
||||||
|
# 4 -- we ended (2)
|
||||||
|
|
||||||
|
if ($flag == 4) {
|
||||||
|
print;
|
||||||
|
} elsif ($flag == 0) {
|
||||||
|
# 1. begins with (including): "ac_max_sed_\S+\s*=\s*[0-9]+..."
|
||||||
|
# ends with (excluding) "CONFIG_FILE=..."
|
||||||
|
# in later autoconf (2.14.1) there is no CONFIG_FILES= line,
|
||||||
|
# but instead the (2) directly follow (1)
|
||||||
|
if (/^\s*ac_max_sed_([a-z]+).*=\s*([0-9]+)/ ) {
|
||||||
|
$flag = 1;
|
||||||
|
if ($1 eq 'lines') {
|
||||||
|
# lets hope its different with 2141,
|
||||||
|
# wasn't able to verify that
|
||||||
|
if ($2 eq '48') {
|
||||||
|
$ac_version = 250;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$ac_version = 2141;
|
||||||
|
}
|
||||||
|
} elsif ($1 eq 'cmds') {
|
||||||
|
$ac_version = 213;
|
||||||
|
}
|
||||||
|
# hmm, we don't know the autoconf version, but we try anyway
|
||||||
|
} else {
|
||||||
|
print;
|
||||||
|
}
|
||||||
|
} elsif ($flag == 1) {
|
||||||
|
if (/^\s*CONFIG_FILES=/ && ($ac_version != 250)) {
|
||||||
|
print;
|
||||||
|
$flag = 2;
|
||||||
|
} elsif (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) {
|
||||||
|
$flag = 3;
|
||||||
|
}
|
||||||
|
} elsif ($flag == 2) {
|
||||||
|
# 2. begins with: "for ac_file in.*CONFIG_FILES" (the next 'for' after (1))
|
||||||
|
# end with: "rm -f conftest.s\*"
|
||||||
|
# on autoconf 250, it ends with '# CONFIG_HEADER section'
|
||||||
|
#
|
||||||
|
# gg: if a post-processing commands section is found first,
|
||||||
|
# stop there and insert a new loop to honor the case/esac.
|
||||||
|
# (pattern: /^\s+#\sRun the commands associated with the file./)
|
||||||
|
|
||||||
|
if (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) {
|
||||||
|
$flag = 3;
|
||||||
|
} else {
|
||||||
|
print;
|
||||||
|
}
|
||||||
|
} elsif ($flag == 3) {
|
||||||
|
if (/^\s*rm\s+-f\s+conftest/ ) {
|
||||||
|
$flag = 4;
|
||||||
|
&insert_main_loop();
|
||||||
|
} elsif (/^\s*rm\s+-f\s+.*ac_cs_root/ ) {
|
||||||
|
$flag = 4;
|
||||||
|
&insert_main_loop();
|
||||||
|
#die "hhhhhhh";
|
||||||
|
if ($ac_version != 2141) {
|
||||||
|
print STDERR "hmm, don't know autoconf version\n";
|
||||||
|
}
|
||||||
|
} elsif (/^\#\s*CONFIG_(HEADER|COMMANDS) section.*|^\s+#\s(Run) the commands associated/) {
|
||||||
|
$flag = 4;
|
||||||
|
my $commands = defined $2;
|
||||||
|
&insert_main_loop();
|
||||||
|
$commands && insert_command_loop();
|
||||||
|
if($ac_version != 250) {
|
||||||
|
print STDERR "hmm, something went wrong :-(\n";
|
||||||
|
}
|
||||||
|
} elsif (/VPATH/ ) {
|
||||||
|
$vpath_seen = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
die "wrong input (flag != 4)" unless $flag == 4;
|
||||||
|
print STDERR "hmm, don't know autoconf version\n" unless $ac_version;
|
||||||
|
|
||||||
|
sub insert_main_loop {
|
||||||
|
|
||||||
|
if ($ac_version == 250) {
|
||||||
|
&insert_main_loop_250();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
&insert_main_loop_213();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub insert_main_loop_250 {
|
||||||
|
|
||||||
|
print <<EOF;
|
||||||
|
#echo Doing the fast build of Makefiles -- autoconf $ac_version
|
||||||
|
EOF
|
||||||
|
if ($vpath_seen) {
|
||||||
|
print <<EOF;
|
||||||
|
# VPATH subst was seen in original config.status main loop
|
||||||
|
echo '/^[ ]*VPATH[ ]*=[^:]*\$/d' >>\$tmp/subs.sed
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
print <<EOF;
|
||||||
|
rm -f \$tmp/subs.files
|
||||||
|
for ac_file in .. \$CONFIG_FILES ; do
|
||||||
|
if test "x\$ac_file" != x..; then
|
||||||
|
echo \$ac_file >> \$tmp/subs.files
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test -f \$tmp/subs.files ; then
|
||||||
|
perl $ac_aux_dir/config.pl "\$tmp/subs.sed" "\$tmp/subs.files" "\$srcdir" "\$INSTALL"
|
||||||
|
fi
|
||||||
|
rm -f \$tmp/subs.files
|
||||||
|
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub insert_main_loop_213 {
|
||||||
|
print <<EOF;
|
||||||
|
#echo Doing the fast build of Makefiles -- autoconf $ac_version
|
||||||
|
if test "x\$ac_cs_root" = "x" ; then
|
||||||
|
ac_cs_root=conftest
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
if ($vpath_seen) {
|
||||||
|
print <<EOF;
|
||||||
|
# VPATH subst was seen in original config.status main loop
|
||||||
|
echo '/^[ ]*VPATH[ ]*=[^:]*\$/d' >> \$ac_cs_root.subs
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
print <<EOF;
|
||||||
|
rm -f \$ac_cs_root.sacfiles
|
||||||
|
for ac_file in .. \$CONFIG_FILES ; do
|
||||||
|
if test "x\$ac_file" != x..; then
|
||||||
|
echo \$ac_file >> \$ac_cs_root.sacfiles
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test -f \$ac_cs_root.sacfiles ; then
|
||||||
|
perl $ac_aux_dir/config.pl "\$ac_cs_root.subs" "\$ac_cs_root.sacfiles" "\$ac_given_srcdir" "\$ac_given_INSTALL"
|
||||||
|
fi
|
||||||
|
rm -f \$ac_cs_root.s*
|
||||||
|
|
||||||
|
EOF
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub insert_command_loop {
|
||||||
|
print <<EOF;
|
||||||
|
for ac_file in .. \$CONFIG_FILES ; do
|
||||||
|
EOF
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,238 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
# a script for use by autoconf to make the Makefiles
|
||||||
|
# from the Makefile.in's
|
||||||
|
#
|
||||||
|
# the original autoconf mechanism first splits all substitutions into groups
|
||||||
|
# of ca. 90, and than invokes sed for _every_ Makefile.in and every group
|
||||||
|
# (so around 2-3 times per Makefile.in). So this takes forever, as sed
|
||||||
|
# has to recompile the regexps every time.
|
||||||
|
#
|
||||||
|
# this script does better. It changes all Makefile.ins in one process.
|
||||||
|
# in kdelibs the time for building Makefile went down from 2:59 min to 13 sec!
|
||||||
|
#
|
||||||
|
# written by Michael Matz <matz@kde.org>
|
||||||
|
# adapted by Dirk Mueller <mueller@kde.org>
|
||||||
|
|
||||||
|
# This file is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Library General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
# This library 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
|
||||||
|
# Library General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU Library General Public License
|
||||||
|
# along with this library; see the file COPYING.LIB. If not, write to
|
||||||
|
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
# Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
|
||||||
|
use File::Path;
|
||||||
|
|
||||||
|
my $ac_subs=$ARGV[0];
|
||||||
|
my $ac_sacfiles = $ARGV[1];
|
||||||
|
my $ac_given_srcdir=$ARGV[2];
|
||||||
|
my $ac_given_INSTALL=$ARGV[3];
|
||||||
|
|
||||||
|
my @comp_match;
|
||||||
|
my @comp_subs;
|
||||||
|
|
||||||
|
#print "ac_subs=$ac_subs\n";
|
||||||
|
#print "ac_sacfiles=$ac_sacfiles\n";
|
||||||
|
#print "ac_given_srcdir=$ac_given_srcdir\n";
|
||||||
|
#print "ac_given_INSTALL=$ac_given_INSTALL\n";
|
||||||
|
|
||||||
|
my $configure_input;
|
||||||
|
my ($srcdir, $top_srcdir);
|
||||||
|
my $INSTALL;
|
||||||
|
my $bad_perl = ($] < 5.005);
|
||||||
|
my $created_file_count = 0;
|
||||||
|
|
||||||
|
open(CF, "< $ac_subs") || die "can't open $ac_subs: $!";
|
||||||
|
my @subs = <CF>;
|
||||||
|
my $pat;
|
||||||
|
close(CF);
|
||||||
|
chomp @subs;
|
||||||
|
@comp_match=();
|
||||||
|
@comp_subs=();
|
||||||
|
|
||||||
|
if ($bad_perl) {
|
||||||
|
print "Using perl older than version 5.005\n";
|
||||||
|
foreach $pat (@subs) {
|
||||||
|
if ( ($pat =~ m/s%([^%]*)%([^%]*)%g/ )
|
||||||
|
|| ($pat =~ m/s%([^%]*)%([^%]*)%;t/ )
|
||||||
|
|| ($pat =~ m/s,([^,]*),(.*),;t/)
|
||||||
|
|| ($pat =~ m%s/([^/]*)/([^/]*)/g% )
|
||||||
|
|| ($pat =~ m%s/([^/]*)/([^/]*)/;t% )
|
||||||
|
) {
|
||||||
|
# form : s%bla%blubb%g
|
||||||
|
# or s%bla%blubb%;t t (autoconf > 2.13 and < 2.52 ?)
|
||||||
|
# or s,bla,blubb,;t t (autoconf 2.52)
|
||||||
|
my $srch = $1;
|
||||||
|
my $repl = $2;
|
||||||
|
$repl =~ s/\\(.)/$1/g;
|
||||||
|
push @comp_subs, make_closure($srch, $repl);
|
||||||
|
|
||||||
|
} elsif ( ($pat =~ /%([^%]*)%d/ )
|
||||||
|
|| ($pat =~ m%/([^/]*)/d% )
|
||||||
|
) {
|
||||||
|
push @comp_subs, make_closure($1, "");
|
||||||
|
} else {
|
||||||
|
die "Uhh. Malformed pattern in $ac_subs ($pat)"
|
||||||
|
unless ( $pat =~ /^\s*$/ ); # ignore white lines
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
foreach $pat (@subs) {
|
||||||
|
if ( ($pat =~ /s%([^%]*)%([^%]*)%g/ ) ||
|
||||||
|
($pat =~ /s%([^%]*)%([^%]*)%;t/ ) ||
|
||||||
|
($pat =~ /s,([^,]*),(.*),;t/) ) {
|
||||||
|
# form : s%bla%blubb%g
|
||||||
|
# or s%bla%blubb%;t t (autoconf > 2.13 and < 2.52 ?)
|
||||||
|
# or s,bla,blubb,;t t (autoconf 2.52)
|
||||||
|
my $srch = $1;
|
||||||
|
my $repl = $2;
|
||||||
|
push @comp_match, eval "qr/\Q$srch\E/"; # compile match pattern
|
||||||
|
$repl =~ s/\\(.)/$1/g;
|
||||||
|
push @comp_subs, $repl;
|
||||||
|
} elsif ( ($pat =~ /%([^%]*)%d/ )
|
||||||
|
|| ($pat =~ m%/([^/]*)/d% )
|
||||||
|
) {
|
||||||
|
push @comp_match, eval "qr/\Q$1\E/";
|
||||||
|
push @comp_subs, "";
|
||||||
|
} else {
|
||||||
|
die "Uhh. Malformed pattern in $ac_subs ($pat)"
|
||||||
|
unless ( $pat =~ /^\s*$/ ); # ignore white lines
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
undef @subs;
|
||||||
|
|
||||||
|
# read the list of files to be patched, form:
|
||||||
|
# ./Makefile arts/Makefile arts/examples/Makefile arts/flow/Makefile
|
||||||
|
|
||||||
|
open(CF, "< $ac_sacfiles") || die "can't open $ac_sacfiles: $!";
|
||||||
|
my @ac_files = <CF>;
|
||||||
|
close(CF);
|
||||||
|
chomp @ac_files;
|
||||||
|
|
||||||
|
|
||||||
|
my $ac_file;
|
||||||
|
foreach $ac_file (@ac_files) {
|
||||||
|
next if $ac_file =~ /\.\./;
|
||||||
|
next if $ac_file =~ /^\s*$/;
|
||||||
|
my $ac_file_in;
|
||||||
|
my ($ac_dir, $ac_dots, $ac_dir_suffix);
|
||||||
|
|
||||||
|
if ($ac_file =~ /.*:.*/ ) {
|
||||||
|
($ac_file_in = $ac_file) =~ s%[^:]*:%%;
|
||||||
|
$ac_file =~ s%:.*%%;
|
||||||
|
} else {
|
||||||
|
$ac_file_in = $ac_file.".in";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
|
||||||
|
|
||||||
|
# Remove last slash and all that follows it. Not all systems have dirname.
|
||||||
|
($ac_dir = $ac_file) =~ s%/[^/][^/]*$%%;
|
||||||
|
if ( ($ac_dir ne $ac_file) && ($ac_dir ne ".")) {
|
||||||
|
# The file is in a subdirectory.
|
||||||
|
if (! -d "$ac_dir") { mkpath "$ac_dir", 0, 0777; }
|
||||||
|
($ac_dir_suffix = $ac_dir) =~ s%^./%%;
|
||||||
|
$ac_dir_suffix="/".$ac_dir_suffix;
|
||||||
|
# A "../" for each directory in $ac_dir_suffix.
|
||||||
|
($ac_dots = $ac_dir_suffix) =~ s%/[^/]*%../%g;
|
||||||
|
} else {
|
||||||
|
$ac_dir_suffix="";
|
||||||
|
$ac_dots="";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($ac_given_srcdir eq ".") {
|
||||||
|
$srcdir=".";
|
||||||
|
if ($ac_dots) {
|
||||||
|
( $top_srcdir = $ac_dots) =~ s%/$%%;
|
||||||
|
} else { $top_srcdir="."; }
|
||||||
|
} elsif ($ac_given_srcdir =~ m%^/%) {
|
||||||
|
$srcdir=$ac_given_srcdir.$ac_dir_suffix;
|
||||||
|
$top_srcdir = $ac_given_srcdir;
|
||||||
|
} else {
|
||||||
|
$srcdir = $ac_dots.$ac_given_srcdir.$ac_dir_suffix;
|
||||||
|
$top_srcdir = $ac_dots.$ac_given_srcdir;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($ac_given_INSTALL) {
|
||||||
|
if ($ac_given_INSTALL =~ m%^/% ) {
|
||||||
|
$INSTALL = $ac_given_INSTALL;
|
||||||
|
} else {
|
||||||
|
$INSTALL = $ac_dots.$ac_given_INSTALL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
print "fast creating $ac_file\n";
|
||||||
|
unlink $ac_file;
|
||||||
|
my $ac_comsub="";
|
||||||
|
my $fname=$ac_file_in;
|
||||||
|
$fname =~ s%.*/%%;
|
||||||
|
$configure_input="$ac_file. Generated from $fname by config.pl.";
|
||||||
|
|
||||||
|
my $ac_file_inputs;
|
||||||
|
($ac_file_inputs = $ac_file_in) =~ s%^%$ac_given_srcdir/%;
|
||||||
|
$ac_file_inputs =~ s%:% $ac_given_srcdir/%g;
|
||||||
|
|
||||||
|
patch_file($ac_file, $ac_file_inputs);
|
||||||
|
++$created_file_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
print "config.pl: fast created $created_file_count file(s).\n";
|
||||||
|
|
||||||
|
sub patch_file {
|
||||||
|
my ($outf, $infiles) = @_;
|
||||||
|
my $filedata;
|
||||||
|
my @infiles=split(' ', $infiles);
|
||||||
|
my $i=0;
|
||||||
|
my $name;
|
||||||
|
|
||||||
|
foreach $name (@infiles) {
|
||||||
|
if (open(CF, "< $name")) {
|
||||||
|
while (<CF>) {
|
||||||
|
$filedata .= $_;
|
||||||
|
}
|
||||||
|
close(CF);
|
||||||
|
} else {
|
||||||
|
print STDERR "can't open $name: $!"."\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$filedata =~ s%\@configure_input\@%$configure_input%g;
|
||||||
|
$filedata =~ s%\@srcdir\@%$srcdir%g;
|
||||||
|
$filedata =~ s%\@top_srcdir\@%$top_srcdir%g;
|
||||||
|
$filedata =~ s%\@INSTALL\@%$INSTALL%g;
|
||||||
|
|
||||||
|
if ($bad_perl) {
|
||||||
|
while ($i <= $#comp_subs) {
|
||||||
|
my $ref = $comp_subs[$i];
|
||||||
|
&$ref(\$filedata);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
while ($i <= $#comp_match) {
|
||||||
|
$filedata =~ s/$comp_match[$i]/$comp_subs[$i]/g;
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
open(CF, "> $outf") || die "can't create $outf: $!";
|
||||||
|
print CF $filedata;
|
||||||
|
close(CF);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub make_closure {
|
||||||
|
my ($pat, $sub) = @_;
|
||||||
|
my $ret = eval "return sub { my \$ref=shift; \$\$ref =~ s%\Q$pat\E%\Q$sub\E%g; }";
|
||||||
|
if ($@) {
|
||||||
|
print "can't create CODE: $@\n";
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,45 @@
|
|||||||
|
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
|
||||||
|
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
|
||||||
|
# And if so, warn when they don't match
|
||||||
|
if test "$kde_libs_prefix" != "$given_prefix"; then
|
||||||
|
# And if kde doesn't know about the prefix yet
|
||||||
|
echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
|
||||||
|
if test $? -ne 0; then
|
||||||
|
echo ""
|
||||||
|
echo "Warning: you chose to install this package in $given_prefix,"
|
||||||
|
echo "but KDE was found in $kde_libs_prefix."
|
||||||
|
echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
|
||||||
|
echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
|
||||||
|
echo "Then restart KDE."
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then
|
||||||
|
echo ""
|
||||||
|
echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility"
|
||||||
|
echo "was not included. Therefore, GCC symbol visibility support remains disabled."
|
||||||
|
echo ""
|
||||||
|
echo "For better performance, consider including the Qt visibility supporting patch"
|
||||||
|
echo "located at:"
|
||||||
|
echo ""
|
||||||
|
echo "http://bugs.kde.org/show_bug.cgi?id=109386"
|
||||||
|
echo ""
|
||||||
|
echo "and recompile all of Qt and KDE. Note, this is entirely optional and"
|
||||||
|
echo "everything will continue to work just fine without it."
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$all_tests" = "bad"; then
|
||||||
|
if test ! "$cache_file" = "/dev/null"; then
|
||||||
|
echo ""
|
||||||
|
echo "Please remove the file $cache_file after changing your setup"
|
||||||
|
echo "so that configure will find the changes next time."
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "Good - your configure finished. Start make now"
|
||||||
|
echo ""
|
||||||
|
fi
|
@ -0,0 +1,57 @@
|
|||||||
|
dnl This file is part of the KDE libraries/packages
|
||||||
|
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
|
||||||
|
|
||||||
|
dnl This file is free software; you can redistribute it and/or
|
||||||
|
dnl modify it under the terms of the GNU Library General Public
|
||||||
|
dnl License as published by the Free Software Foundation; either
|
||||||
|
dnl version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
dnl This library is distributed in the hope that it will be useful,
|
||||||
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
dnl Library General Public License for more details.
|
||||||
|
|
||||||
|
dnl You should have received a copy of the GNU Library General Public License
|
||||||
|
dnl along with this library; see the file COPYING.LIB. If not, write to
|
||||||
|
dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
dnl Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
# Original Author was Kalle@kde.org
|
||||||
|
# I lifted it in some mater. (Stephan Kulow)
|
||||||
|
# I used much code from Janos Farkas
|
||||||
|
|
||||||
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
|
AC_INIT(acinclude.m4) dnl a source file from your sub dir
|
||||||
|
|
||||||
|
dnl This is so we can use kde-common
|
||||||
|
AC_CONFIG_AUX_DIR(admin)
|
||||||
|
|
||||||
|
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
|
||||||
|
unset CDPATH
|
||||||
|
|
||||||
|
dnl Checking host/target/build systems, for make, install etc.
|
||||||
|
AC_CANONICAL_SYSTEM
|
||||||
|
dnl Perform program name transformation
|
||||||
|
AC_ARG_PROGRAM
|
||||||
|
|
||||||
|
dnl Automake doc recommends to do this only here. (Janos)
|
||||||
|
AM_INIT_AUTOMAKE(@MODULENAME@, @VERSION@) dnl searches for some needed programs
|
||||||
|
|
||||||
|
KDE_SET_PREFIX
|
||||||
|
|
||||||
|
dnl generate the config header
|
||||||
|
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
|
||||||
|
|
||||||
|
dnl Checks for programs.
|
||||||
|
AC_CHECK_COMPILERS
|
||||||
|
AC_ENABLE_SHARED(yes)
|
||||||
|
AC_ENABLE_STATIC(no)
|
||||||
|
KDE_PROG_LIBTOOL
|
||||||
|
|
||||||
|
dnl for NLS support. Call them in this order!
|
||||||
|
dnl WITH_NLS is for the po files
|
||||||
|
AM_KDE_WITH_NLS
|
||||||
|
|
||||||
|
dnl KDE_USE_QT
|
||||||
|
AC_PATH_KDE
|
@ -0,0 +1,661 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# cvs.sh
|
||||||
|
#
|
||||||
|
# This file contains support code from Makefile.common
|
||||||
|
# It defines a shell function for each known target
|
||||||
|
# and then does a case to call the correct function.
|
||||||
|
|
||||||
|
unset MAKEFLAGS
|
||||||
|
|
||||||
|
call_and_fix_autoconf()
|
||||||
|
{
|
||||||
|
$AUTOCONF || exit 1
|
||||||
|
if test -r configure.in.in ; then
|
||||||
|
perl -pi -e "print \"if test \\\"x\\\$with_fast_perl\\\" = \\\"xyes\\\"; then\
|
||||||
|
\\n perl -i.bak \\\$ac_aux_dir/conf.change.pl \\\$CONFIG_STATUS\
|
||||||
|
\\\\\\n || mv \\\$CONFIG_STATUS.bak \\\$CONFIG_STATUS\
|
||||||
|
\\n rm -f \\\$CONFIG_STATUS.bak\\nfi\
|
||||||
|
\\n\" if /^\\s*chmod\\s+.*\\+x\\s+.*CONFIG_STATUS/; s,^#line.*LINENO.*\$,/* \$& */, ;" configure
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
strip_makefile()
|
||||||
|
{
|
||||||
|
if test ! -f $makefile_wo; then
|
||||||
|
perl -e '$in=0; while ( <> ) { $in = 1 if ($_ =~ m/^if / ); print $_ unless ($in || $_ =~ m/^include /); $in = 0 if ($_ =~ m/^endif/); }' < $makefile_am > $makefile_wo
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
check_autotool_versions()
|
||||||
|
{
|
||||||
|
required_autoconf_version="2.53 or newer"
|
||||||
|
AUTOCONF_VERSION=`$AUTOCONF --version | head -n 1`
|
||||||
|
case $AUTOCONF_VERSION in
|
||||||
|
Autoconf*2.5* | autoconf*2.5* | autoconf*2.6* ) : ;;
|
||||||
|
"" )
|
||||||
|
echo "*** AUTOCONF NOT FOUND!."
|
||||||
|
echo "*** KDE requires autoconf $required_autoconf_version"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
echo "*** YOU'RE USING $AUTOCONF_VERSION."
|
||||||
|
echo "*** KDE requires autoconf $required_autoconf_version"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AUTOHEADER_VERSION=`$AUTOHEADER --version | head -n 1`
|
||||||
|
case $AUTOHEADER_VERSION in
|
||||||
|
Autoconf*2.5* | autoheader*2.5* | autoheader*2.6* ) : ;;
|
||||||
|
"" )
|
||||||
|
echo "*** AUTOHEADER NOT FOUND!."
|
||||||
|
echo "*** KDE requires autoheader $required_autoconf_version"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
echo "*** YOU'RE USING $AUTOHEADER_VERSION."
|
||||||
|
echo "*** KDE requires autoheader $required_autoconf_version"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AUTOMAKE_STRING=`$AUTOMAKE --version | head -n 1`
|
||||||
|
required_automake_version="1.6.1 or newer"
|
||||||
|
case $AUTOMAKE_STRING in
|
||||||
|
automake*1.5d* | automake*1.5* | automake*1.5-* )
|
||||||
|
echo "*** YOU'RE USING $AUTOMAKE_STRING."
|
||||||
|
echo "*** KDE requires automake $required_automake_version"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
automake*1.6.* | automake*1.7* | automake*1.8* | automake*1.9* | automake*1.10*)
|
||||||
|
echo "*** $AUTOMAKE_STRING found."
|
||||||
|
UNSERMAKE=no
|
||||||
|
;;
|
||||||
|
"" )
|
||||||
|
echo "*** AUTOMAKE NOT FOUND!."
|
||||||
|
echo "*** KDE requires automake $required_automake_version"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*unsermake* ) :
|
||||||
|
echo "*** YOU'RE USING UNSERMAKE."
|
||||||
|
echo "*** GOOD LUCK!! :)"
|
||||||
|
UNSERMAKE=unsermake
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
echo "*** YOU'RE USING $AUTOMAKE_STRING."
|
||||||
|
echo "*** KDE requires automake $required_automake_version"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
unset required_automake_version
|
||||||
|
}
|
||||||
|
|
||||||
|
cvs()
|
||||||
|
{
|
||||||
|
check_autotool_versions
|
||||||
|
acinclude_m4
|
||||||
|
|
||||||
|
### Make new subdirs and configure.in.
|
||||||
|
### The make calls could be optimized away here,
|
||||||
|
### with a little thought.
|
||||||
|
if test -r configure.in.in; then
|
||||||
|
rm -f configure.in
|
||||||
|
echo "*** Creating list of subdirectories"
|
||||||
|
create_subdirs
|
||||||
|
|
||||||
|
if test -r Makefile.am.in; then
|
||||||
|
echo "*** Creating Makefile.am"
|
||||||
|
if grep '\$(top_srcdir)/Makefile.am:' $makefile_am >/dev/null; then
|
||||||
|
strip_makefile
|
||||||
|
$MAKE -f $makefile_wo top_srcdir=. ./Makefile.am || exit 1
|
||||||
|
else
|
||||||
|
Makefile_am
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
configure_files
|
||||||
|
echo "*** Creating configure.in"
|
||||||
|
if grep '\$(top_srcdir)/configure.in:' $makefile_am >/dev/null; then
|
||||||
|
strip_makefile
|
||||||
|
$MAKE -f $makefile_wo top_srcdir=. ./configure.in || exit 1
|
||||||
|
else
|
||||||
|
configure_in
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "*** Creating aclocal.m4"
|
||||||
|
$ACLOCAL $ACLOCALFLAGS || exit 1
|
||||||
|
echo "*** Creating configure"
|
||||||
|
call_and_fix_autoconf
|
||||||
|
|
||||||
|
if egrep "^AM_CONFIG_HEADER" configure.in >/dev/null 2>&1; then
|
||||||
|
echo "*** Creating config.h template"
|
||||||
|
$AUTOHEADER || exit 1
|
||||||
|
touch config.h.in
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "*** Creating Makefile templates"
|
||||||
|
$AUTOMAKE || exit 1
|
||||||
|
|
||||||
|
if test "$UNSERMAKE" = no; then
|
||||||
|
echo "*** Postprocessing Makefile templates"
|
||||||
|
perl -w admin/am_edit || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if egrep "^cvs-local:" $makefile_am >/dev/null; then \
|
||||||
|
strip_makefile
|
||||||
|
$MAKE -f $makefile_wo cvs-local top_srcdir=. || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "*** Creating date/time stamp"
|
||||||
|
touch stamp-h.in
|
||||||
|
|
||||||
|
echo "*** Finished"
|
||||||
|
echo " Don't forget to run ./configure"
|
||||||
|
echo " If you haven't done so in a while, run ./configure --help"
|
||||||
|
}
|
||||||
|
|
||||||
|
dist()
|
||||||
|
{
|
||||||
|
check_autotool_versions
|
||||||
|
|
||||||
|
###
|
||||||
|
### First build all of the files necessary to do just "make"
|
||||||
|
###
|
||||||
|
acinclude_m4
|
||||||
|
if test -r configure.in.in; then
|
||||||
|
rm -f configure.in
|
||||||
|
create_subdirs
|
||||||
|
|
||||||
|
if test -r Makefile.am.in; then
|
||||||
|
if grep '\$(top_srcdir)/Makefile.am:' $makefile_am >/dev/null; then
|
||||||
|
strip_makefile
|
||||||
|
$MAKE -f $makefile_wo top_srcdir=. ./Makefile.am || exit 1
|
||||||
|
else
|
||||||
|
Makefile_am
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
configure_files
|
||||||
|
if grep '\$(top_srcdir)/configure.in:' $makefile_am >/dev/null; then
|
||||||
|
strip_makefile
|
||||||
|
$MAKE -f $makefile_wo top_srcdir=. ./configure.in || exit 1
|
||||||
|
else
|
||||||
|
configure_in
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
$ACLOCAL $ACLOCALFLAGS
|
||||||
|
if egrep "^AM_CONFIG_HEADER" configure.in >/dev/null 2>&1; then
|
||||||
|
echo "*** Creating config.h template"
|
||||||
|
$AUTOHEADER || exit 1
|
||||||
|
touch config.h.in
|
||||||
|
fi
|
||||||
|
$AUTOMAKE --foreign || exit 1
|
||||||
|
if test "$UNSERMAKE" = no; then
|
||||||
|
echo "*** Postprocessing Makefile templates"
|
||||||
|
perl -w admin/am_edit || exit 1
|
||||||
|
fi
|
||||||
|
call_and_fix_autoconf
|
||||||
|
touch stamp-h.in
|
||||||
|
if grep "^cvs-local:" $makefile_am >/dev/null; then
|
||||||
|
strip_makefile
|
||||||
|
$MAKE -f $makefile_wo cvs-local top_srcdir=.
|
||||||
|
fi
|
||||||
|
|
||||||
|
###
|
||||||
|
### Then make messages
|
||||||
|
###
|
||||||
|
if test -d po; then
|
||||||
|
LIST=`find ./po -name "*.po"`
|
||||||
|
for i in $LIST; do
|
||||||
|
file2=`echo $i | sed -e "s#\.po#\.gmo#"`
|
||||||
|
msgfmt -o $file2 $i || touch $file2
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if grep "^cvs-dist-local:" $makefile_am >/dev/null; then
|
||||||
|
strip_makefile
|
||||||
|
$MAKE -f $makefile_wo cvs-dist-local top_srcdir=.
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
subdir_dist()
|
||||||
|
{
|
||||||
|
$ACLOCAL $ACLOCALFLAGS
|
||||||
|
$AUTOHEADER
|
||||||
|
touch config.h.in
|
||||||
|
$AUTOMAKE
|
||||||
|
AUTOMAKE_STRING=`$AUTOMAKE --version | head -n 1`
|
||||||
|
case $AUTOMAKE_STRING in
|
||||||
|
*unsermake* ) :
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
perl -w ../admin/am_edit --path=../admin
|
||||||
|
esac
|
||||||
|
call_and_fix_autoconf
|
||||||
|
touch stamp-h.in
|
||||||
|
}
|
||||||
|
|
||||||
|
configure_in()
|
||||||
|
{
|
||||||
|
rm -f configure.in configure.in.new
|
||||||
|
kde_use_qt_param=
|
||||||
|
test -f configure.files || { echo "need configure.files for configure.in"; exit 1; }
|
||||||
|
list=`fgrep -v "configure.in.bot" < configure.files | fgrep -v "configure.in.mid"`
|
||||||
|
: > configure.in.new
|
||||||
|
for file in $list; do
|
||||||
|
echo "dnl =======================================================" >> configure.in.new
|
||||||
|
echo "dnl FILE: $file" >> configure.in.new
|
||||||
|
echo "dnl =======================================================" >> configure.in.new
|
||||||
|
echo "" >> configure.in.new
|
||||||
|
cat $file >> configure.in.new
|
||||||
|
done
|
||||||
|
echo "KDE_CREATE_SUBDIRSLIST" >> configure.in.new
|
||||||
|
if test -f Makefile.am.in; then
|
||||||
|
subdirs=`cat subdirs`
|
||||||
|
for dir in $subdirs; do
|
||||||
|
vdir=`echo $dir | sed -e 's,[-+.@],_,g'`
|
||||||
|
echo "AM_CONDITIONAL($vdir""_SUBDIR_included, test \"x\$$vdir""_SUBDIR_included\" = xyes)" >> configure.in.new
|
||||||
|
if test -f "$dir/configure.in"; then
|
||||||
|
echo "if test \"x\$$vdir""_SUBDIR_included\" = xyes; then " >> configure.in.new
|
||||||
|
echo " AC_CONFIG_SUBDIRS($dir)" >> configure.in.new
|
||||||
|
echo "fi" >> configure.in.new
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "AC_CONFIG_FILES([ Makefile ])" >> configure.in.new
|
||||||
|
|
||||||
|
if test -f inst-apps; then
|
||||||
|
topleveldirs=`cat inst-apps`
|
||||||
|
else
|
||||||
|
topleveldirs=
|
||||||
|
for dir in `ls -1d * | sort`; do
|
||||||
|
if test "$dir" != "debian" && test -d $dir; then
|
||||||
|
topleveldirs="$topleveldirs $dir"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
for topleveldir in $topleveldirs; do
|
||||||
|
if test -f $topleveldir/configure.in; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
if test -f $topleveldir/Makefile.am; then :; else
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
mfs=`find $topleveldir -follow -name Makefile.am -print | fgrep -v "/." | \
|
||||||
|
sed -e 's#\./##; s#/Makefile.am$##' | sort | sed -e 's#$#/Makefile#'`
|
||||||
|
for i in $mfs; do
|
||||||
|
echo "AC_CONFIG_FILES([ $i ])" >> configure.in.new
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
files=`cat configure.files`
|
||||||
|
list=`egrep '^dnl AC_OUTPUT\(.*\)' $files | sed -e "s#^.*dnl AC_OUTPUT(\(.*\))#\1#"`
|
||||||
|
for file in $list; do
|
||||||
|
echo "AC_CONFIG_FILES([ $file ])" >> configure.in.new
|
||||||
|
done
|
||||||
|
|
||||||
|
midfiles=`cat configure.files | fgrep "configure.in.mid"`
|
||||||
|
test -n "$midfiles" && cat $midfiles >> configure.in.new
|
||||||
|
|
||||||
|
echo "AC_OUTPUT" >> configure.in.new
|
||||||
|
modulename=
|
||||||
|
if test -f configure.in.in; then
|
||||||
|
if head -n 2 configure.in.in | egrep "^#MIN_CONFIG\(.*\)$" > /dev/null; then
|
||||||
|
kde_use_qt_param=`cat configure.in.in | sed -n -e "s/#MIN_CONFIG(\(.*\))/\1/p"`
|
||||||
|
fi
|
||||||
|
if head -n 2 configure.in.in | egrep "^#MIN_CONFIG" > /dev/null; then
|
||||||
|
line=`grep "^AM_INIT_AUTOMAKE(" configure.in.in`
|
||||||
|
if test -n "$line"; then
|
||||||
|
modulename=`echo $line | sed -e "s#AM_INIT_AUTOMAKE(\([^,]*\),.*#\1#"`
|
||||||
|
VERSION=`echo $line | sed -e "s#AM_INIT_AUTOMAKE([^,]*, *\([^)]*\)).*#\1#"`
|
||||||
|
fi
|
||||||
|
sed -e "s#AM_INIT_AUTOMAKE([^@].*#dnl PACKAGE set before#" \
|
||||||
|
configure.in.new > configure.in && mv configure.in configure.in.new
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test -z "$VERSION" || test "$VERSION" = "@VERSION@"; then
|
||||||
|
VERSION="\"3.5.8\""
|
||||||
|
fi
|
||||||
|
if test -z "$modulename" || test "$modulename" = "@MODULENAME@"; then
|
||||||
|
modulename=`pwd`;
|
||||||
|
modulename=`basename $modulename`
|
||||||
|
esc_VERSION=`echo $VERSION | sed -e "s#[^.0-9a-zA-Z]##g"`
|
||||||
|
modulename=`echo $modulename | sed -e "s#-$esc_VERSION##"`
|
||||||
|
|
||||||
|
fi
|
||||||
|
if test -n "$kde_use_qt_param"; then
|
||||||
|
sed -e "s#^dnl KDE_USE_QT#KDE_USE_QT($kde_use_qt_param)#" \
|
||||||
|
configure.in.new > configure.in && mv configure.in configure.in.new
|
||||||
|
fi
|
||||||
|
sed -e "s#@MODULENAME@#$modulename#" configure.in.new |
|
||||||
|
sed -e "s#@VERSION@#$VERSION#" > configure.in
|
||||||
|
botfiles=`cat configure.files | egrep "configure.in.bot"`
|
||||||
|
test -n "$botfiles" && cat $botfiles >> configure.in
|
||||||
|
cat $admindir/configure.in.bot.end >> configure.in
|
||||||
|
rm -f configure.in.new
|
||||||
|
}
|
||||||
|
|
||||||
|
configure_files()
|
||||||
|
{
|
||||||
|
echo "*** Creating configure.files"
|
||||||
|
admindir=NO
|
||||||
|
for i in . .. ../.. ../../..; do
|
||||||
|
if test -x $i/admin; then admindir=$i/admin; break; fi
|
||||||
|
done
|
||||||
|
rm -f configure.files
|
||||||
|
touch configure.files
|
||||||
|
if test -f configure.in.in && head -n 2 configure.in.in | grep "^#MIN_CONFIG" > /dev/null; then
|
||||||
|
echo $admindir/configure.in.min >> configure.files
|
||||||
|
fi
|
||||||
|
test -f configure.in.in && echo configure.in.in >> configure.files
|
||||||
|
# we collect files in the subdirs and do some sorting tricks, so subsubdirs come after subdirs
|
||||||
|
if test -f inst-apps; then
|
||||||
|
inst=`cat inst-apps`
|
||||||
|
list=""
|
||||||
|
for i in $inst; do
|
||||||
|
list="$list `find $i/ -follow -name "configure.in.in" -o -name "configure.in.bot" -o -name "configure.in.mid" | \
|
||||||
|
sed -e "s,/configure,/aaaconfigure," | sort | sed -e "s,/aaaconfigure,/configure,"`"
|
||||||
|
done
|
||||||
|
else
|
||||||
|
list=`find . -follow -name "configure.in.in" -o -name "configure.in.bot" -o -name "configure.in.mid" | \
|
||||||
|
sed -e "s,/configure,/aaaconfigure," | sort | sed -e "s,/aaaconfigure,/configure,"`
|
||||||
|
fi
|
||||||
|
for i in $list; do if test -f $i && test `dirname $i` != "." ; then
|
||||||
|
echo $i >> configure.files
|
||||||
|
fi; done
|
||||||
|
test -f configure.in.mid && echo configure.in.mid >> configure.files
|
||||||
|
test -f configure.in.bot && echo configure.in.bot >> configure.files
|
||||||
|
if test ! -s configure.files; then
|
||||||
|
echo "There are no files to build a configure. Please check your checkout."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
create_subdirs()
|
||||||
|
{
|
||||||
|
if grep '\$(top_srcdir)/subdirs:' $makefile_am >/dev/null; then
|
||||||
|
# as many modules contain rules to create subdirs without any
|
||||||
|
# dependencies make won't create it unless there is no file.
|
||||||
|
# so we check if that's a dummy rule or one that works
|
||||||
|
rm -f subdirs.cvs.sh.$$
|
||||||
|
if test -f subdirs; then
|
||||||
|
mv subdirs subdirs.cvs.sh.$$
|
||||||
|
fi
|
||||||
|
strip_makefile
|
||||||
|
$MAKE -f $makefile_wo top_srcdir=. ./subdirs || exit 1
|
||||||
|
if test -f subdirs.cvs.sh.$$; then
|
||||||
|
if test -s subdirs; then
|
||||||
|
rm subdirs.cvs.sh.$$
|
||||||
|
else
|
||||||
|
mv subdirs.cvs.sh.$$ subdirs
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
subdirs
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
subdirs()
|
||||||
|
{
|
||||||
|
dirs=
|
||||||
|
idirs=
|
||||||
|
if test -f inst-apps; then
|
||||||
|
idirs=`cat inst-apps`
|
||||||
|
else
|
||||||
|
idirs=`ls -1 | sort`
|
||||||
|
fi
|
||||||
|
|
||||||
|
compilefirst=`sed -ne 's#^COMPILE_FIRST[ ]*=[ ]*##p' $makefile_am | head -n 1`
|
||||||
|
compilelast=`sed -ne 's#^COMPILE_LAST[ ]*=[ ]*##p' $makefile_am | head -n 1`
|
||||||
|
for i in $idirs; do
|
||||||
|
if test -f $i/Makefile.am; then
|
||||||
|
case " $compilefirst $compilelast " in
|
||||||
|
*" $i "*) ;;
|
||||||
|
*) dirs="$dirs $i"
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
: > ./_SUBDIRS
|
||||||
|
|
||||||
|
for d in $compilefirst; do
|
||||||
|
echo $d >> ./_SUBDIRS
|
||||||
|
done
|
||||||
|
|
||||||
|
(for d in $dirs; do
|
||||||
|
list=`sed -ne "s#^COMPILE_BEFORE_$d""[ ]*=[ ]*##p" $makefile_am | head -n 1`
|
||||||
|
for s in $list; do
|
||||||
|
echo $s $d
|
||||||
|
done
|
||||||
|
list=`sed -ne "s#^COMPILE_AFTER_$d""[ ]*=[ ]*##p" $makefile_am | head -n 1`
|
||||||
|
for s in $list; do
|
||||||
|
echo $d $s
|
||||||
|
done
|
||||||
|
echo $d $d
|
||||||
|
done ) | tsort >> ./_SUBDIRS
|
||||||
|
|
||||||
|
for d in $compilelast; do
|
||||||
|
echo $d >> ./_SUBDIRS
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -r subdirs && cmp -s subdirs _SUBDIRS; then
|
||||||
|
rm -f _SUBDIRS
|
||||||
|
fi
|
||||||
|
test -r _SUBDIRS && mv _SUBDIRS subdirs || true
|
||||||
|
}
|
||||||
|
|
||||||
|
Makefile_am()
|
||||||
|
{
|
||||||
|
if test -f Makefile.am.in; then
|
||||||
|
compilefirst=`sed -ne 's#^COMPILE_FIRST[ ]*=[ ]*##p' $makefile_am | head -n 1`
|
||||||
|
compilelast=`sed -ne 's#^COMPILE_LAST[ ]*=[ ]*##p' $makefile_am | head -n 1`
|
||||||
|
|
||||||
|
idirs=
|
||||||
|
dirs=
|
||||||
|
if test -f inst-apps; then
|
||||||
|
idirs=`cat inst-apps`
|
||||||
|
else
|
||||||
|
idirs=`cat subdirs`
|
||||||
|
fi
|
||||||
|
for i in $idirs; do
|
||||||
|
case " $compilefirst $compilelast " in
|
||||||
|
*" $i "*) ;;
|
||||||
|
*) dirs="$dirs $i"
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
adds=`fgrep '$(top_srcdir)/acinclude.m4:' Makefile.am.in | sed -e 's,^[^:]*: *,,; s,\$(top_srcdir)/,,g'`
|
||||||
|
if echo "$adds" | fgrep "*" >/dev/null ; then
|
||||||
|
adds=`ls -d -1 $adds 2>/dev/null`
|
||||||
|
fgrep -v '$(top_srcdir)/acinclude.m4:' Makefile.am.in > Makefile.am.in.adds
|
||||||
|
str='$(top_srcdir)/acinclude.m4:'
|
||||||
|
for add in $adds; do
|
||||||
|
str="$str \$(top_srcdir)/$add"
|
||||||
|
done
|
||||||
|
echo $str >> Makefile.am.in.adds
|
||||||
|
else
|
||||||
|
cat Makefile.am.in > Makefile.am.in.adds
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat Makefile.am.in.adds | \
|
||||||
|
sed -e 's,^\s*\(COMPILE_BEFORE.*\),# \1,' | \
|
||||||
|
sed -e 's,^\s*\(COMPILE_AFTER.*\),# \1,' > Makefile.am
|
||||||
|
echo "SUBDIRS="'$(TOPSUBDIRS)' >> Makefile.am
|
||||||
|
rm Makefile.am.in.adds
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
acinclude_m4()
|
||||||
|
{
|
||||||
|
echo "*** Creating acinclude.m4"
|
||||||
|
adds=
|
||||||
|
if grep '\$(top_srcdir)/acinclude.m4:' $makefile_am >/dev/null; then
|
||||||
|
strip_makefile
|
||||||
|
rm -f acinclude.m4
|
||||||
|
adds=`grep '\$(top_srcdir)/acinclude.m4:' $makefile_wo | sed -e 's,^[^:]*: *,,; s,\$(top_srcdir),.,g'`
|
||||||
|
if echo $adds | fgrep "*" >/dev/null ; then
|
||||||
|
adds=`ls -d -1 $adds 2>/dev/null`
|
||||||
|
else
|
||||||
|
$MAKE -f $makefile_wo top_srcdir=. ./acinclude.m4 || exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
rm -f acinclude.m4
|
||||||
|
fi
|
||||||
|
# if it wasn't created up to now, then we do it better
|
||||||
|
if test ! -f acinclude.m4; then
|
||||||
|
cat admin/acinclude.m4.in admin/libtool.m4.in admin/pkg.m4.in $adds > acinclude.m4
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
package_merge()
|
||||||
|
{
|
||||||
|
catalogs=$POFILES
|
||||||
|
for cat in $catalogs; do
|
||||||
|
msgmerge -o $cat.new $cat $PACKAGE.pot
|
||||||
|
if test -s $cat.new; then
|
||||||
|
grep -v "\"POT-Creation" $cat.new > $cat.new.2
|
||||||
|
grep -v "\"POT-Creation" $cat >> $cat.new.1
|
||||||
|
if diff $cat.new.1 $cat.new.2; then
|
||||||
|
rm $cat.new
|
||||||
|
else
|
||||||
|
mv $cat.new $cat
|
||||||
|
fi
|
||||||
|
rm -f $cat.new.1 $cat.new.2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
extract_messages()
|
||||||
|
{
|
||||||
|
podir=${podir:-$PWD/po}
|
||||||
|
files=`find . -name Makefile.am | xargs egrep -l '^messages:' `
|
||||||
|
dirs=`for i in $files; do echo \`dirname $i\`; done`
|
||||||
|
tmpname="$PWD/messages.log"
|
||||||
|
if test -z "$EXTRACTRC"; then EXTRACTRC=extractrc ; fi
|
||||||
|
if test -z "$PREPARETIPS"; then PREPARETIPS=preparetips ; fi
|
||||||
|
export EXTRACTRC PREPARETIPS
|
||||||
|
|
||||||
|
for subdir in $dirs; do
|
||||||
|
test -z "$VERBOSE" || echo "Making messages in $subdir"
|
||||||
|
(cd $subdir
|
||||||
|
if test -n "`grep -e '^messages:.*rc.cpp' Makefile.am`"; then
|
||||||
|
$EXTRACTRC *.rc *.ui *.kcfg > rc.cpp
|
||||||
|
else
|
||||||
|
candidates=`ls -1 *.rc *.ui *.kcfg 2>/dev/null`
|
||||||
|
if test -n "$candidates"; then
|
||||||
|
echo "$subdir has *.rc, *.ui or *.kcfg files, but not correct messages line"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if find . -name \*.c\* -o -name \*.h\* | fgrep -v ".svn" | xargs fgrep -s -q KAboutData ; then
|
||||||
|
echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > _translatorinfo.cpp
|
||||||
|
else echo " " > _translatorinfo.cpp
|
||||||
|
fi
|
||||||
|
perl -e '$mes=0; while (<STDIN>) { next if (/^(if\s|else\s|endif)/); if (/^messages:/) { $mes=1; print $_; next; } if ($mes) { if (/$\\(XGETTEXT\)/ && / -o/) { s/ -o \$\(podir\)/ _translatorinfo.cpp -o \$\(podir\)/ } print $_; } else { print $_; } }' < Makefile.am | egrep -v '^include ' > _transMakefile
|
||||||
|
|
||||||
|
kdepotpath=${includedir:-`kde-config --expandvars --install include`}/kde.pot
|
||||||
|
if ! test -f $kdepotpath; then
|
||||||
|
kdepotpath=`kde-config --expandvars --prefix`/include/kde.pot
|
||||||
|
fi
|
||||||
|
|
||||||
|
$MAKE -s -f _transMakefile podir=$podir EXTRACTRC="$EXTRACTRC" PREPARETIPS="$PREPARETIPS" srcdir=. \
|
||||||
|
XGETTEXT="${XGETTEXT:-xgettext} --foreign-user -C -ci18n -ki18n -ktr2i18n -kI18N_NOOP -kI18N_NOOP2 -kaliasLocale -x $kdepotpath" messages
|
||||||
|
exit_code=$?
|
||||||
|
if test "$exit_code" != 0; then
|
||||||
|
echo "make exit code: $exit_code"
|
||||||
|
fi
|
||||||
|
) 2>&1 | grep -v '^make\[1\]' > $tmpname
|
||||||
|
test -s $tmpname && { echo $subdir ; cat "$tmpname"; }
|
||||||
|
test -f $subdir/rc.cpp && rm -f $subdir/rc.cpp
|
||||||
|
rm -f $subdir/_translatorinfo.cpp
|
||||||
|
rm -f $subdir/_transMakefile
|
||||||
|
done
|
||||||
|
rm -f $tmpname
|
||||||
|
}
|
||||||
|
|
||||||
|
package_messages()
|
||||||
|
{
|
||||||
|
rm -rf po.backup
|
||||||
|
mkdir po.backup
|
||||||
|
|
||||||
|
for i in `ls -1 po/*.pot 2>/dev/null | sed -e "s#po/##"`; do
|
||||||
|
egrep -v '^#[^,]' po/$i | egrep '^.*[^ ]+.*$' | grep -v "\"POT-Creation" > po.backup/$i
|
||||||
|
cat po/$i > po.backup/backup_$i
|
||||||
|
touch -r po/$i po.backup/backup_$i
|
||||||
|
rm po/$i
|
||||||
|
done
|
||||||
|
|
||||||
|
extract_messages
|
||||||
|
|
||||||
|
for i in `ls -1 po.backup/*.pot 2>/dev/null | sed -e "s#po.backup/##" | egrep -v '^backup_'`; do
|
||||||
|
test -f po/$i || echo "disappeared: $i"
|
||||||
|
done
|
||||||
|
for i in `ls -1 po/*.pot 2>/dev/null | sed -e "s#po/##"`; do
|
||||||
|
sed -e 's,^"Content-Type: text/plain; charset=CHARSET\\n"$,"Content-Type: text/plain; charset=UTF-8\\n",' po/$i > po/$i.new && mv po/$i.new po/$i
|
||||||
|
#msgmerge -q -o po/$i po/$i po/$i
|
||||||
|
egrep -v '^#[^,]' po/$i | egrep '^.*[^ ]+.*$' | grep -v "\"POT-Creation" > temp.pot
|
||||||
|
if test -f po.backup/$i && ! cmp -s temp.pot po.backup/$i; then
|
||||||
|
echo "will update $i"
|
||||||
|
else
|
||||||
|
if test -f po.backup/backup_$i; then
|
||||||
|
test -z "$VERBOSE" || echo "I'm restoring $i"
|
||||||
|
mv po.backup/backup_$i po/$i
|
||||||
|
rm po.backup/$i
|
||||||
|
else
|
||||||
|
echo "will add $i"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rm -f temp.pot
|
||||||
|
rm -rf po.backup
|
||||||
|
}
|
||||||
|
|
||||||
|
# Make sure that sorting is always done the same way
|
||||||
|
LC_ALL=C
|
||||||
|
export LC_ALL
|
||||||
|
unset LANG || :
|
||||||
|
unset LC_CTYPE || :
|
||||||
|
unset LANGUAGE || :
|
||||||
|
|
||||||
|
unset CDPATH || :
|
||||||
|
admindir=`echo "$0" | sed 's%[\\/][^\\/][^\\/]*$%%'`
|
||||||
|
test "x$admindir" = "x$0" && admindir=.
|
||||||
|
|
||||||
|
test "x$MAKE" = x && MAKE=make
|
||||||
|
makefile_am=Makefile.am
|
||||||
|
makefile_wo=Makefile.am.wo
|
||||||
|
if test -f Makefile.am.in; then
|
||||||
|
makefile_am=Makefile.am.in
|
||||||
|
makefile_wo=Makefile.am.in.wo
|
||||||
|
rm -f $makefile_wo
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Call script to find autoconf and friends. Uses eval since the script outputs
|
||||||
|
# sh-compatible code.
|
||||||
|
eval `$admindir/detect-autoconf.pl`
|
||||||
|
|
||||||
|
###
|
||||||
|
### Main
|
||||||
|
###
|
||||||
|
|
||||||
|
arg=`echo $1 | tr .- __`
|
||||||
|
case $arg in
|
||||||
|
cvs | dist | subdir_dist | configure_in | configure_files | subdirs | \
|
||||||
|
cvs_clean | package_merge | package_messages | Makefile_am | acinclude_m4 | extract_messages ) $arg ;;
|
||||||
|
configure ) call_and_fix_autoconf ;;
|
||||||
|
* ) echo "Usage: cvs.sh <target>"
|
||||||
|
echo "Target can be one of:"
|
||||||
|
echo " cvs svn dist"
|
||||||
|
echo " configure.in configure.files"
|
||||||
|
echo " package-merge package-messages"
|
||||||
|
echo ""
|
||||||
|
echo "Usage: anything but $1"
|
||||||
|
exit 1 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test -f $makefile_wo; then
|
||||||
|
rm $makefile_wo
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
@ -0,0 +1,43 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
use Shell qw(mv cp mkdir rm) ;
|
||||||
|
use File::Find;
|
||||||
|
use Cwd;
|
||||||
|
|
||||||
|
$origPwd = `pwd`;
|
||||||
|
chomp $origPwd;
|
||||||
|
|
||||||
|
$kde_prefix = "/usr";
|
||||||
|
$sysconfdir = "/etc";
|
||||||
|
$kde_includedir = "$kde_prefix/include/kde";
|
||||||
|
$infodir = "$kde_prefix/share/info";
|
||||||
|
$mandir = "$kde_prefix/share/man";
|
||||||
|
$qtdir = "/usr/share/qt3";
|
||||||
|
|
||||||
|
$kde_cgidir = "$kde_prefix/lib/cgi-bin";
|
||||||
|
$kde_confdir = "$sysconfdir/kde3";
|
||||||
|
$kde_htmldir = "$kde_prefix/share/doc/kde/HTML";
|
||||||
|
|
||||||
|
if (defined $ENV{DEB_BUILD_OPTIONS} &&
|
||||||
|
$ENV{DEB_BUILD_OPTIONS} =~ /\bnostrip\b/) {
|
||||||
|
$enable_debug="--enable-debug=full";
|
||||||
|
} else {
|
||||||
|
$enable_debug="--disable-debug";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (@ARGV && $ARGV[0] eq 'echodirs') {
|
||||||
|
print STDOUT "export kde_prefix=$kde_prefix\n";
|
||||||
|
print STDOUT "export sysconfdir=$sysconfdir\n";
|
||||||
|
print STDOUT "export kde_includedir=$kde_includedir\n";
|
||||||
|
print STDOUT "export infodir=$infodir\n";
|
||||||
|
print STDOUT "export mandir=$mandir\n";
|
||||||
|
print STDOUT "export qtdir=$qtdir\n";
|
||||||
|
|
||||||
|
print STDOUT "export kde_cgidir=$kde_cgidir\n";
|
||||||
|
print STDOUT "export kde_confdir=$kde_confdir\n";
|
||||||
|
print STDOUT "export kde_htmldir=$kde_htmldir\n";
|
||||||
|
|
||||||
|
print STDOUT "configkde=$enable_debug --disable-rpath --prefix=\$(kde_prefix) --sysconfdir=\$(sysconfdir) --includedir=\$(kde_includedir) --infodir=\$(infodir) --mandir=\$(mandir) --with-qt-dir=\$(qtdir)\n";
|
||||||
|
|
||||||
|
exit
|
||||||
|
}
|
@ -0,0 +1,530 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# depcomp - compile a program generating dependencies as side-effects
|
||||||
|
|
||||||
|
scriptversion=2005-07-09.11
|
||||||
|
|
||||||
|
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can 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, 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, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
# 02110-1301, USA.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
'')
|
||||||
|
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
-h | --h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||||
|
|
||||||
|
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||||
|
as side-effects.
|
||||||
|
|
||||||
|
Environment variables:
|
||||||
|
depmode Dependency tracking mode.
|
||||||
|
source Source file read by `PROGRAMS ARGS'.
|
||||||
|
object Object file output by `PROGRAMS ARGS'.
|
||||||
|
DEPDIR directory where to store dependencies.
|
||||||
|
depfile Dependency file to output.
|
||||||
|
tmpdepfile Temporary file to use when outputing dependencies.
|
||||||
|
libtool Whether libtool is used (yes/no).
|
||||||
|
|
||||||
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
EOF
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-v | --v*)
|
||||||
|
echo "depcomp $scriptversion"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||||
|
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||||
|
depfile=${depfile-`echo "$object" |
|
||||||
|
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||||
|
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||||
|
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
|
||||||
|
# Some modes work just like other modes, but use different flags. We
|
||||||
|
# parameterize here, but still list the modes in the big case below,
|
||||||
|
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||||
|
# here, because this file can only contain one case statement.
|
||||||
|
if test "$depmode" = hp; then
|
||||||
|
# HP compiler uses -M and no extra arg.
|
||||||
|
gccflag=-M
|
||||||
|
depmode=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = dashXmstdout; then
|
||||||
|
# This is just like dashmstdout with a different argument.
|
||||||
|
dashmflag=-xM
|
||||||
|
depmode=dashmstdout
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$depmode" in
|
||||||
|
gcc3)
|
||||||
|
## gcc 3 implements dependency tracking that does exactly what
|
||||||
|
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||||
|
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||||
|
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
mv "$tmpdepfile" "$depfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
gcc)
|
||||||
|
## There are various ways to get dependency output from gcc. Here's
|
||||||
|
## why we pick this rather obscure method:
|
||||||
|
## - Don't want to use -MD because we'd like the dependencies to end
|
||||||
|
## up in a subdir. Having to rename by hand is ugly.
|
||||||
|
## (We might end up doing this anyway to support other compilers.)
|
||||||
|
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||||
|
## -MM, not -M (despite what the docs say).
|
||||||
|
## - Using -M directly means running the compiler twice (even worse
|
||||||
|
## than renaming).
|
||||||
|
if test -z "$gccflag"; then
|
||||||
|
gccflag=-MD,
|
||||||
|
fi
|
||||||
|
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||||
|
## The second -e expression handles DOS-style file names with drive letters.
|
||||||
|
sed -e 's/^[^:]*: / /' \
|
||||||
|
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||||
|
## This next piece of magic avoids the `deleted header file' problem.
|
||||||
|
## The problem is that when a header file which appears in a .P file
|
||||||
|
## is deleted, the dependency causes make to die (because there is
|
||||||
|
## typically no way to rebuild the header). We avoid this by adding
|
||||||
|
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||||
|
## this for us directly.
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" |
|
||||||
|
## Some versions of gcc put a space before the `:'. On the theory
|
||||||
|
## that the space means something, we add a space to the output as
|
||||||
|
## well.
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
hp)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
sgi)
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||||
|
else
|
||||||
|
"$@" -MDupdate "$tmpdepfile"
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
|
||||||
|
# Clip off the initial element (the dependent). Don't try to be
|
||||||
|
# clever and replace this with sed code, as IRIX sed won't handle
|
||||||
|
# lines with more than a fixed number of characters (4096 in
|
||||||
|
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||||
|
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||||
|
# dependency line.
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||||
|
tr '
|
||||||
|
' ' ' >> $depfile
|
||||||
|
echo >> $depfile
|
||||||
|
|
||||||
|
# The second pass generates a dummy entry for each header file.
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||||
|
>> $depfile
|
||||||
|
else
|
||||||
|
# The sourcefile does not contain any dependencies, so just
|
||||||
|
# store a dummy comment line, to avoid errors with the Makefile
|
||||||
|
# "include basename.Plo" scheme.
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
aix)
|
||||||
|
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||||
|
# in a .u file. In older versions, this file always lives in the
|
||||||
|
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||||
|
# start of each line; $object doesn't have directory information.
|
||||||
|
# Version 6 uses the directory in both cases.
|
||||||
|
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
|
||||||
|
tmpdepfile="$stripped.u"
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
"$@" -Wc,-M
|
||||||
|
else
|
||||||
|
"$@" -M
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile"; then :
|
||||||
|
else
|
||||||
|
stripped=`echo "$stripped" | sed 's,^.*/,,'`
|
||||||
|
tmpdepfile="$stripped.u"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
outname="$stripped.o"
|
||||||
|
# Each line is of the form `foo.o: dependent.h'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||||
|
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||||
|
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||||
|
else
|
||||||
|
# The sourcefile does not contain any dependencies, so just
|
||||||
|
# store a dummy comment line, to avoid errors with the Makefile
|
||||||
|
# "include basename.Plo" scheme.
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
icc)
|
||||||
|
# Intel's C compiler understands `-MD -MF file'. However on
|
||||||
|
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||||
|
# ICC 7.0 will fill foo.d with something like
|
||||||
|
# foo.o: sub/foo.c
|
||||||
|
# foo.o: sub/foo.h
|
||||||
|
# which is wrong. We want:
|
||||||
|
# sub/foo.o: sub/foo.c
|
||||||
|
# sub/foo.o: sub/foo.h
|
||||||
|
# sub/foo.c:
|
||||||
|
# sub/foo.h:
|
||||||
|
# ICC 7.1 will output
|
||||||
|
# foo.o: sub/foo.c sub/foo.h
|
||||||
|
# and will wrap long lines using \ :
|
||||||
|
# foo.o: sub/foo.c ... \
|
||||||
|
# sub/foo.h ... \
|
||||||
|
# ...
|
||||||
|
|
||||||
|
"$@" -MD -MF "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
# Each line is of the form `foo.o: dependent.h',
|
||||||
|
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||||
|
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||||
|
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||||
|
sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
tru64)
|
||||||
|
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||||
|
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||||
|
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||||
|
# dependencies in `foo.d' instead, so we check for that too.
|
||||||
|
# Subdirectories are respected.
|
||||||
|
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||||
|
test "x$dir" = "x$object" && dir=
|
||||||
|
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||||
|
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
# With Tru64 cc, shared objects can also be used to make a
|
||||||
|
# static library. This mecanism is used in libtool 1.4 series to
|
||||||
|
# handle both shared and static libraries in a single compilation.
|
||||||
|
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||||
|
#
|
||||||
|
# With libtool 1.5 this exception was removed, and libtool now
|
||||||
|
# generates 2 separate objects for the 2 libraries. These two
|
||||||
|
# compilations output dependencies in in $dir.libs/$base.o.d and
|
||||||
|
# in $dir$base.o.d. We have to check for both files, because
|
||||||
|
# one of the two compilations can be disabled. We should prefer
|
||||||
|
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||||
|
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||||
|
# the former would cause a distcleancheck panic.
|
||||||
|
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||||
|
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||||
|
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||||
|
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||||
|
"$@" -Wc,-MD
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.o.d
|
||||||
|
tmpdepfile2=$dir$base.d
|
||||||
|
tmpdepfile3=$dir$base.d
|
||||||
|
tmpdepfile4=$dir$base.d
|
||||||
|
"$@" -MD
|
||||||
|
fi
|
||||||
|
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||||
|
# That's a tab and a space in the [].
|
||||||
|
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||||
|
else
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
#nosideeffect)
|
||||||
|
# This comment above is used by automake to tell side-effect
|
||||||
|
# dependency tracking mechanisms from slower ones.
|
||||||
|
|
||||||
|
dashmstdout)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout, regardless of -o.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test $1 != '--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove `-o $object'.
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
test -z "$dashmflag" && dashmflag=-M
|
||||||
|
# Require at least two characters before searching for `:'
|
||||||
|
# in the target name. This is to cope with DOS-style filenames:
|
||||||
|
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||||
|
"$@" $dashmflag |
|
||||||
|
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" | \
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
dashXmstdout)
|
||||||
|
# This case only exists to satisfy depend.m4. It is never actually
|
||||||
|
# run, as this mode is specially recognized in the preamble.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
makedepend)
|
||||||
|
"$@" || exit $?
|
||||||
|
# Remove any Libtool call
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test $1 != '--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
# X makedepend
|
||||||
|
shift
|
||||||
|
cleared=no
|
||||||
|
for arg in "$@"; do
|
||||||
|
case $cleared in
|
||||||
|
no)
|
||||||
|
set ""; shift
|
||||||
|
cleared=yes ;;
|
||||||
|
esac
|
||||||
|
case "$arg" in
|
||||||
|
-D*|-I*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
# Strip any option that makedepend may not understand. Remove
|
||||||
|
# the object too, otherwise makedepend will parse it as a source file.
|
||||||
|
-*|$object)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||||
|
touch "$tmpdepfile"
|
||||||
|
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||||
|
rm -f "$depfile"
|
||||||
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
|
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||||
|
' | \
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||||
|
;;
|
||||||
|
|
||||||
|
cpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test $1 != '--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove `-o $object'.
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
"$@" -E |
|
||||||
|
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||||
|
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||||
|
sed '$ s: \\$::' > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
cat < "$tmpdepfile" >> "$depfile"
|
||||||
|
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvisualcpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout, regardless of -o,
|
||||||
|
# because we must use -o when running libtool.
|
||||||
|
"$@" || exit $?
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case "$arg" in
|
||||||
|
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||||
|
set fnord "$@"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
"$@" -E |
|
||||||
|
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||||
|
echo " " >> "$depfile"
|
||||||
|
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
none)
|
||||||
|
exec "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Unknown depmode $depmode" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-end: "$"
|
||||||
|
# End:
|
@ -0,0 +1,19 @@
|
|||||||
|
$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in $(top_srcdir)/admin/cvs.sh $(top_srcdir)/admin/pkg.m4.in
|
||||||
|
@cd $(top_srcdir) && $(SHELL) admin/cvs.sh acinclude_m4
|
||||||
|
|
||||||
|
$(top_srcdir)/configure.in: $(top_srcdir)/subdirs $(top_srcdir)/configure.files $(top_srcdir)/admin/cvs.sh
|
||||||
|
@cd $(top_srcdir) && $(SHELL) admin/cvs.sh configure_in
|
||||||
|
|
||||||
|
$(top_srcdir)/configure.files: $(top_srcdir)/subdirs $(CONF_FILES)
|
||||||
|
@cd $(top_srcdir) && $(SHELL) admin/cvs.sh configure.files $(top_srcdir)/admin/cvs.sh
|
||||||
|
|
||||||
|
$(top_srcdir)/Makefile.am: $(top_srcdir)/Makefile.am.in $(top_srcdir)/subdirs $(top_srcdir)/admin/cvs.sh
|
||||||
|
@cd $(top_srcdir) && $(SHELL) admin/cvs.sh Makefile_am
|
||||||
|
|
||||||
|
$(top_srcdir)/subdirs: $(top_srcdir)/Makefile.am.in $(top_srcdir)/admin/cvs.sh
|
||||||
|
@cd $(top_srcdir) && $(SHELL) admin/cvs.sh subdirs
|
||||||
|
|
||||||
|
# defining default rules for files that may not be present
|
||||||
|
$(top_srcdir)/Makefile.am.in:
|
||||||
|
$(CONF_FILES):
|
||||||
|
|
@ -0,0 +1,175 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
|
# Try to locate best version of auto*
|
||||||
|
# By Michael Pyne <michael.pyne@kdemail.net>
|
||||||
|
#
|
||||||
|
# Copyright (c) 2005.
|
||||||
|
# This code is public domain. You may use it however you like (including
|
||||||
|
# relicensing).
|
||||||
|
|
||||||
|
# Emulate the 'which' program.
|
||||||
|
sub which
|
||||||
|
{
|
||||||
|
my $prog = shift;
|
||||||
|
my @paths = split(/:/, $ENV{'PATH'});
|
||||||
|
|
||||||
|
for $path (@paths)
|
||||||
|
{
|
||||||
|
return "$path/$prog" if -x "$path/$prog";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Subroutine to determine the highest installed version of the given program,
|
||||||
|
# searching from the given paths.
|
||||||
|
sub findBest
|
||||||
|
{
|
||||||
|
my ($program, @paths) = @_;
|
||||||
|
my $best_version_found = '0'; # Deliberately a string.
|
||||||
|
my %versions;
|
||||||
|
my %minimumVersions = (
|
||||||
|
'autoconf' => '2.5',
|
||||||
|
'automake' => '1.6',
|
||||||
|
);
|
||||||
|
|
||||||
|
# Allow user to use environment variable to override search.
|
||||||
|
return $ENV{uc $program} if $ENV{uc $program};
|
||||||
|
|
||||||
|
for $prefix (@paths)
|
||||||
|
{
|
||||||
|
@files = glob "$prefix/$program*";
|
||||||
|
for $file (@files)
|
||||||
|
{
|
||||||
|
# Don't check non-executable scripts.
|
||||||
|
next unless -x $file;
|
||||||
|
|
||||||
|
($version) = $file =~ /$prefix\/$program-?(.*)$/;
|
||||||
|
$version =~ s/-|\.//g;
|
||||||
|
# Don't check the -wrapper ones
|
||||||
|
next if $version eq "wrapper";
|
||||||
|
|
||||||
|
# Special case some programs to make sure it has a minimum version.
|
||||||
|
if (not $version and exists $minimumVersions{$program})
|
||||||
|
{
|
||||||
|
my $min_version = $minimumVersions{$program};
|
||||||
|
my $versionOutput = `$program --version 2>/dev/null | head -n 1`;
|
||||||
|
|
||||||
|
# If we can't run the script to get the version it likely won't work later.
|
||||||
|
next unless $versionOutput;
|
||||||
|
|
||||||
|
# Use number.number for version (we don't need the excess in general).
|
||||||
|
($versionOutput) = ($versionOutput =~ /(\d\.\d)/);
|
||||||
|
|
||||||
|
# Use lt to do lexicographical comparison of strings (which should be
|
||||||
|
# equivalent and doesn't involve issues with floating point conversions).
|
||||||
|
if (not $versionOutput or $versionOutput lt $min_version)
|
||||||
|
{
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# If no version suffix then use it in favor of a versioned autotool
|
||||||
|
# since the ever-popular WANT_AUTOFOO should then work (in theory).
|
||||||
|
return $file unless $version;
|
||||||
|
|
||||||
|
# Emulate 'which', and abort if we've already seen this version.
|
||||||
|
next if exists $versions{$version};
|
||||||
|
|
||||||
|
# Save filename of program.
|
||||||
|
$versions{$version} = $file;
|
||||||
|
|
||||||
|
# Use string comparison so that e.g. 253a will be > 253 but < 254.
|
||||||
|
if ($version gt $best_version_found)
|
||||||
|
{
|
||||||
|
$best_version_found = $version;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $versions{$best_version_found};
|
||||||
|
}
|
||||||
|
|
||||||
|
# Find an appropriate "which" program for later use by the shell script calling
|
||||||
|
# us.
|
||||||
|
sub findWhich
|
||||||
|
{
|
||||||
|
for $candidate ('type -p', 'which', 'type')
|
||||||
|
{
|
||||||
|
$test = `$candidate sh 2>/dev/null`;
|
||||||
|
chomp $test;
|
||||||
|
|
||||||
|
return $candidate if -x $test;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Uses which() to find a program unless the user provided its path in the
|
||||||
|
# environment (the upper case program name is searched).
|
||||||
|
sub findProgram
|
||||||
|
{
|
||||||
|
$suffix = ""; # For use if @_ has only one param.
|
||||||
|
my ($program, $suffix) = @_;
|
||||||
|
|
||||||
|
return $ENV{uc $program} if $ENV{uc $program};
|
||||||
|
return which("$program$suffix");
|
||||||
|
}
|
||||||
|
|
||||||
|
# SCRIPT STARTS.
|
||||||
|
|
||||||
|
# Search in path.
|
||||||
|
@paths = split(/:/, $ENV{'PATH'});
|
||||||
|
|
||||||
|
# Make sure at least /usr/bin and /usr/local/bin are in this search.
|
||||||
|
unshift @paths, '/usr/local/bin' unless grep $_ eq '/usr/local/bin', @paths;
|
||||||
|
unshift @paths, '/usr/bin' unless grep $_ eq '/usr/bin', @paths;
|
||||||
|
|
||||||
|
$autoconf = findBest('autoconf', @paths);
|
||||||
|
($autoconf_suffix) = $autoconf =~ /.*autoconf(.*)$/;
|
||||||
|
|
||||||
|
# Find matching autoconf companions.
|
||||||
|
$autoheader = findProgram('autoheader', $autoconf_suffix);
|
||||||
|
$autom4te = findProgram('autom4te', $autoconf_suffix);
|
||||||
|
|
||||||
|
# Get best automake, and look for unsermake to possibly override it.
|
||||||
|
$automake = findBest('automake', @paths);
|
||||||
|
$unsermake = "";
|
||||||
|
# backward compatible: if $UNSERMAKE points to a path, use it
|
||||||
|
$unsermake = findProgram('unsermake') if (defined($ENV{'UNSERMAKE'}) and $ENV{'UNSERMAKE'} =~ /\//);
|
||||||
|
# new compatible: if it says 'yes', use the one from path
|
||||||
|
$unsermake = which('unsermake') if ($ENV{'UNSERMAKE'} ne 'no');
|
||||||
|
|
||||||
|
($automake_suffix) = $automake =~ /.*automake(.*)$/;
|
||||||
|
|
||||||
|
# Use unsermake if we found it.
|
||||||
|
$automake = "$unsermake -c" if $unsermake;
|
||||||
|
|
||||||
|
# Find matching automake companions.
|
||||||
|
$aclocal = findProgram('aclocal', $automake_suffix);
|
||||||
|
|
||||||
|
$which = findWhich();
|
||||||
|
|
||||||
|
# Make sure we have all of the needed programs.
|
||||||
|
for $i (qw'autoconf autoheader autom4te automake aclocal')
|
||||||
|
{
|
||||||
|
unless(${$i})
|
||||||
|
{
|
||||||
|
print "# Unable to find $i!!\n";
|
||||||
|
exit 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Print results in eval-able form.
|
||||||
|
print <<EOF;
|
||||||
|
AUTOCONF="$autoconf"
|
||||||
|
AUTOHEADER="$autoheader"
|
||||||
|
AUTOM4TE="$autom4te"
|
||||||
|
|
||||||
|
AUTOMAKE="$automake"
|
||||||
|
ACLOCAL="$aclocal"
|
||||||
|
|
||||||
|
WHICH="$which"
|
||||||
|
|
||||||
|
export AUTOCONF AUTOHEADER AUTOM4TE AUTOMAKE ACLOCAL WHICH
|
||||||
|
EOF
|
||||||
|
|
||||||
|
exit 0;
|
@ -0,0 +1,883 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# doxygen.sh Copyright (C) 2005 by Adriaan de Groot
|
||||||
|
# Based on some code from Doxyfile.am, among other things.
|
||||||
|
# License: GPL version 2.
|
||||||
|
# See file COPYING in kdelibs for details.
|
||||||
|
|
||||||
|
echo "*** doxygen.sh"
|
||||||
|
|
||||||
|
# Recurse handling is a little complicated, since normally
|
||||||
|
# subdir (given on the command-line) processing doesn't recurse
|
||||||
|
# but you can force it to do so.
|
||||||
|
recurse=1
|
||||||
|
recurse_given=NO
|
||||||
|
use_modulename=1
|
||||||
|
cleanup=YES
|
||||||
|
|
||||||
|
while test -n "$1" ; do
|
||||||
|
case "x$1" in
|
||||||
|
"x--no-cleanup" )
|
||||||
|
cleanup=NO
|
||||||
|
;;
|
||||||
|
"x--no-recurse" )
|
||||||
|
recurse=0
|
||||||
|
recurse_given=YES
|
||||||
|
;;
|
||||||
|
"x--recurse" )
|
||||||
|
recurse=1
|
||||||
|
recurse_given=YES
|
||||||
|
;;
|
||||||
|
"x--no-modulename" )
|
||||||
|
use_modulename=0
|
||||||
|
;;
|
||||||
|
"x--modulename" )
|
||||||
|
use_modulename=1
|
||||||
|
;;
|
||||||
|
"x--help" )
|
||||||
|
echo "doxygen.sh usage:"
|
||||||
|
echo "doxygen.sh [--no-recurse] [--no-modulename] <srcdir> [<subdir>]"
|
||||||
|
exit 2
|
||||||
|
;;
|
||||||
|
x--doxdatadir=* )
|
||||||
|
DOXDATA=`echo $1 | sed -e 's+--doxdatadir=++'`
|
||||||
|
;;
|
||||||
|
x--installdir=*)
|
||||||
|
PREFIX=`echo $1 | sed -e 's+--installdir=++'`
|
||||||
|
;;
|
||||||
|
x--* )
|
||||||
|
echo "Unknown option: $1"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
top_srcdir="$1"
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
### Sanity check the mandatory "top srcdir" argument.
|
||||||
|
if test -z "$top_srcdir" ; then
|
||||||
|
echo "Usage: doxygen.sh <top_srcdir>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if test ! -d "$top_srcdir" ; then
|
||||||
|
echo "top_srcdir ($top_srcdir) is not a directory."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
### Normalize top_srcdir so it is an absolute path.
|
||||||
|
if expr "x$top_srcdir" : "x/" > /dev/null ; then
|
||||||
|
# top_srcdir is absolute already
|
||||||
|
:
|
||||||
|
else
|
||||||
|
top_srcdir=`cd "$top_srcdir" 2> /dev/null && pwd`
|
||||||
|
if test ! -d "$top_srcdir" ; then
|
||||||
|
echo "top_srcdir ($top_srcdir) is not a directory."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Sanity check and guess QTDOCDIR.
|
||||||
|
if test -z "$QTDOCDIR" ; then
|
||||||
|
if test -z "$QTDIR" ; then
|
||||||
|
for i in /usr/X11R6/share/doc/qt/html
|
||||||
|
do
|
||||||
|
QTDOCDIR="$i"
|
||||||
|
test -d "$QTDOCDIR" && break
|
||||||
|
done
|
||||||
|
else
|
||||||
|
for i in share/doc/qt/html doc/html
|
||||||
|
do
|
||||||
|
QTDOCDIR="$QTDIR/$i"
|
||||||
|
test -d "$QTDOCDIR" && break
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test -z "$QTDOCDIR" || test ! -d "$QTDOCDIR" ; then
|
||||||
|
if test -z "$QTDOCDIR" ; then
|
||||||
|
echo "* QTDOCDIR could not be guessed."
|
||||||
|
else
|
||||||
|
echo "* QTDOCDIR does not name a directory."
|
||||||
|
fi
|
||||||
|
if test -z "$QTDOCTAG" ; then
|
||||||
|
echo "* QTDOCDIR set to \"\""
|
||||||
|
QTDOCDIR=""
|
||||||
|
else
|
||||||
|
echo "* But I'll use $QTDOCDIR anyway because of QTDOCTAG."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
### Get the "top srcdir", also its name, and handle the case that subdir "."
|
||||||
|
### is given (which would be top_srcdir then, so it's equal to none-given
|
||||||
|
### but no recursion either).
|
||||||
|
###
|
||||||
|
# top_srcdir="$1" # Already set by options processing
|
||||||
|
module_name=`basename "$top_srcdir"`
|
||||||
|
subdir="$2"
|
||||||
|
if test "x." = "x$subdir" ; then
|
||||||
|
subdir=""
|
||||||
|
if test "x$recurse_given" = "xNO" ; then
|
||||||
|
recurse=0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "x" != "x$subdir" ; then
|
||||||
|
# If no recurse option given explicitly, default to
|
||||||
|
# no recurse when processing subdirs given on the command-line.
|
||||||
|
if test "x$recurse_given" = "xNO" ; then
|
||||||
|
recurse=0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$DOXDATA" || test ! -d "$DOXDATA" ; then
|
||||||
|
if test -n "$DOXDATA" ; then
|
||||||
|
echo "* \$DOXDATA is '$DOXDATA' which does not name a directory"
|
||||||
|
fi
|
||||||
|
DOXDATA="$top_srcdir/doc/common"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test ! -d "$DOXDATA" ; then
|
||||||
|
echo "* \$DOXDATA does not name a directory ( or is unset ), tried \"$DOXDATA\""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$PREFIX" && test ! -d "$PREFIX" ; then
|
||||||
|
echo "* \$PREFIX does not name a directory, tried \"$PREFIX\""
|
||||||
|
echo "* \$PREFIX is disabled."
|
||||||
|
PREFIX=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
### We need some values from top-level files, which
|
||||||
|
### are not preserved between invocations of this
|
||||||
|
### script, so factor it out for easy use.
|
||||||
|
create_doxyfile_in()
|
||||||
|
{
|
||||||
|
eval `grep 'VERSION="' "$top_srcdir/admin/cvs.sh"`
|
||||||
|
echo "PROJECT_NUMBER = $VERSION" > Doxyfile.in
|
||||||
|
grep '^KDE_INIT_DOXYGEN' "$top_srcdir/configure.in.in" | \
|
||||||
|
sed -e 's+[^[]*\[\([^]]*\)+PROJECT_NAME = "\1"+' \
|
||||||
|
-e 's+].*++' >> Doxyfile.in
|
||||||
|
}
|
||||||
|
|
||||||
|
apidoxdir="$module_name"-apidocs
|
||||||
|
test "x$use_modulename" = "x0" && apidoxdir="apidocs"
|
||||||
|
|
||||||
|
### If we're making the top subdir, create the structure
|
||||||
|
### for the apidox and initialize it. Otherwise, just use the
|
||||||
|
### structure assumed to be there.
|
||||||
|
if test -z "$subdir" ; then
|
||||||
|
if test ! -d "$apidoxdir" ; then
|
||||||
|
mkdir "$apidoxdir" > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
cd "$apidoxdir" > /dev/null 2>&1 || {
|
||||||
|
echo "Cannot create and cd into $apidoxdir"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
test -f "Doxyfile.in" || create_doxyfile_in
|
||||||
|
|
||||||
|
# Copy in logos and the like
|
||||||
|
for i in "favicon.ico" "kde_gear_64.png"
|
||||||
|
do
|
||||||
|
cp "$DOXDATA/$i" . > /dev/null 2> /dev/null
|
||||||
|
done
|
||||||
|
for i in "$top_srcdir/doc/api/Dox-"*.png
|
||||||
|
do
|
||||||
|
T=`basename "$i" | sed -e 's+Dox-++'`
|
||||||
|
test -f "$i" && cp "$i" "./$T" > /dev/null 2> /dev/null
|
||||||
|
done
|
||||||
|
|
||||||
|
top_builddir="."
|
||||||
|
srcdir="$1"
|
||||||
|
subdir="."
|
||||||
|
else
|
||||||
|
cd "$apidoxdir" > /dev/null 2>&1 || {
|
||||||
|
echo "Cannot cd into $apidoxdir -- maybe you need to"
|
||||||
|
echo "build the top-level dox first."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if test "x1" = "x$recurse" ; then
|
||||||
|
# OK, so --recurse was requested
|
||||||
|
if test ! -f "subdirs.top" ; then
|
||||||
|
echo "* No subdirs.top available in the $apidoxdir."
|
||||||
|
echo "* The --recurse option will be ignored."
|
||||||
|
recurse=0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
### Read a single line (TODO: support \ continuations) from the Makefile.am.
|
||||||
|
### Used to extract variable assignments from it.
|
||||||
|
extract_line()
|
||||||
|
{
|
||||||
|
file="$2" ; test -z "$file" && file="$srcdir/Makefile.am"
|
||||||
|
pattern=`echo "$1" | tr + .`
|
||||||
|
grep "^$1" "$file" | \
|
||||||
|
sed -e "s+$pattern.*=\s*++"
|
||||||
|
}
|
||||||
|
|
||||||
|
### Handle the COMPILE_{FIRST,LAST,BEFORE,AFTER} part of Makefile.am
|
||||||
|
### in the toplevel. Copied from admin/cvs.sh. Licence presumed LGPL).
|
||||||
|
create_subdirs()
|
||||||
|
{
|
||||||
|
echo "* Sorting top-level subdirs"
|
||||||
|
dirs=
|
||||||
|
idirs=
|
||||||
|
if test -f "$top_srcdir/inst-apps"; then
|
||||||
|
idirs=`cat "$top_srcdir/"inst-apps`
|
||||||
|
else
|
||||||
|
idirs=`cd "$top_srcdir" && ls -1 | sort`
|
||||||
|
fi
|
||||||
|
|
||||||
|
compilefirst=""
|
||||||
|
compilelast=""
|
||||||
|
if test -f "$top_srcdir/"Makefile.am.in ; then
|
||||||
|
compilefirst=`sed -ne 's#^COMPILE_FIRST[ ]*=[ ]*##p' "$top_srcdir/"Makefile.am.in | head -n 1`
|
||||||
|
compilelast=`sed -ne 's#^COMPILE_LAST[ ]*=[ ]*##p' "$top_srcdir/"Makefile.am.in | head -n 1`
|
||||||
|
fi
|
||||||
|
for i in $idirs; do
|
||||||
|
if test -f "$top_srcdir/$i"/Makefile.am; then
|
||||||
|
case " $compilefirst $compilelast " in
|
||||||
|
*" $i "*) ;;
|
||||||
|
*) dirs="$dirs $i"
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
: > ./_SUBDIRS
|
||||||
|
|
||||||
|
for d in $compilefirst; do
|
||||||
|
echo $d >> ./_SUBDIRS
|
||||||
|
done
|
||||||
|
|
||||||
|
(for d in $dirs; do
|
||||||
|
list=""
|
||||||
|
if test -f "$top_srcdir/"Makefile.am.in ; then
|
||||||
|
list=`sed -ne "s#^COMPILE_BEFORE_$d""[ ]*=[ ]*##p" "$top_srcdir/"Makefile.am.in | head -n 1`
|
||||||
|
fi
|
||||||
|
for s in $list; do
|
||||||
|
echo $s $d
|
||||||
|
done
|
||||||
|
list=""
|
||||||
|
if test -f "$top_srcdir/"Makefile.am.in ; then
|
||||||
|
list=`sed -ne "s#^COMPILE_AFTER_$d""[ ]*=[ ]*##p" "$top_srcdir/"Makefile.am.in | head -n 1`
|
||||||
|
fi
|
||||||
|
for s in $list; do
|
||||||
|
echo $d $s
|
||||||
|
done
|
||||||
|
echo $d $d
|
||||||
|
done ) | tsort >> ./_SUBDIRS
|
||||||
|
|
||||||
|
for d in $compilelast; do
|
||||||
|
echo $d >> ./_SUBDIRS
|
||||||
|
done
|
||||||
|
|
||||||
|
test -r _SUBDIRS && mv _SUBDIRS subdirs.top || true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
### Add HTML header, footer, CSS tags to Doxyfile.
|
||||||
|
### Assumes $subdir is set. Argument is a string
|
||||||
|
### to stick in front of the file if needed.
|
||||||
|
apidox_htmlfiles()
|
||||||
|
{
|
||||||
|
dox_header="$top_srcdir/doc/api/$1header.html"
|
||||||
|
dox_footer="$top_srcdir/doc/api/$1footer.html"
|
||||||
|
dox_css="$top_srcdir/doc/api/doxygen.css"
|
||||||
|
test -f "$dox_header" || dox_header="$DOXDATA/$1header.html"
|
||||||
|
test -f "$dox_footer" || dox_footer="$DOXDATA/$1footer.html"
|
||||||
|
test -f "$dox_css" || dox_css="$DOXDATA/doxygen.css"
|
||||||
|
|
||||||
|
echo "HTML_HEADER = $dox_header" >> "$subdir/Doxyfile" ; \
|
||||||
|
echo "HTML_FOOTER = $dox_footer" >> "$subdir/Doxyfile" ; \
|
||||||
|
echo "HTML_STYLESHEET = $dox_css" >> "$subdir/Doxyfile"
|
||||||
|
}
|
||||||
|
|
||||||
|
apidox_specials()
|
||||||
|
{
|
||||||
|
line=`extract_line DOXYGEN_PROJECTNAME "$1"`
|
||||||
|
test -n "$line" && echo "PROJECT_NAME = \"$line\"" >> "$2"
|
||||||
|
}
|
||||||
|
|
||||||
|
apidox_local()
|
||||||
|
{
|
||||||
|
for i in "$top_srcdir/doc/api/Doxyfile.local"
|
||||||
|
do
|
||||||
|
if test -f "$i" ; then
|
||||||
|
cat "$i" >> "$subdir/Doxyfile"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
### Post-process HTML files by substituting in the menu files
|
||||||
|
#
|
||||||
|
# In non-top directories, both <!-- menu --> and <!-- gmenu -->
|
||||||
|
# are calculated and replaced. Top directories get an empty <!-- menu -->
|
||||||
|
# if any.
|
||||||
|
doxyndex()
|
||||||
|
{
|
||||||
|
# Special case top-level to have an empty MENU.
|
||||||
|
if test "x$subdir" = "x." ; then
|
||||||
|
MENU=""
|
||||||
|
htmldir="."
|
||||||
|
htmltop="$top_builddir" # Just ., presumably
|
||||||
|
echo "* Post-processing top-level files"
|
||||||
|
else
|
||||||
|
MENU="<ul>"
|
||||||
|
htmldir="$subdir/html"
|
||||||
|
htmltop="$top_builddir.." # top_builddir ends with /
|
||||||
|
echo "* Post-processing files in $htmldir"
|
||||||
|
|
||||||
|
# Build a little PHP file that maps class names to file
|
||||||
|
# names, for the quick-class-picker functionality.
|
||||||
|
# (The quick-class-picker is disabled due to styling
|
||||||
|
# problems in IE & FF).
|
||||||
|
(
|
||||||
|
echo "<?php \$map = array("; \
|
||||||
|
for htmlfile in `find $htmldir/ -type f -name "class[A-Z]*.html" | grep -v "\-members.html$"`; do
|
||||||
|
classname=`echo $htmlfile | sed -e "s,.*/class\\(.*\\).html,\1," -e "s,_1_1,::,g" -e "s,_01, ,g" -e "s,_4,>,g" -e "s+_00+,+g" -e "s+_3+<+g" | tr "[A-Z]" "[a-z]"`
|
||||||
|
echo " \"$classname\" => \"$htmlfile\","
|
||||||
|
done | sort ; \
|
||||||
|
echo ") ?>"
|
||||||
|
) > "$subdir/classmap.inc"
|
||||||
|
|
||||||
|
# This is a list of pairs, with / separators so we can use
|
||||||
|
# basename and dirname (a crude shell hack) to split them
|
||||||
|
# into parts. For each, if the file part exists (as a html
|
||||||
|
# file) tack it onto the MENU variable as a <li> with link.
|
||||||
|
for i in "Main Page/index" \
|
||||||
|
"Modules/modules" \
|
||||||
|
"Namespace List/namespaces" \
|
||||||
|
"Class Hierarchy/hierarchy" \
|
||||||
|
"Alphabetical List/classes" \
|
||||||
|
"Class List/annotated" \
|
||||||
|
"File List/files" \
|
||||||
|
"Directories/dirs" \
|
||||||
|
"Namespace Members/namespacemembers" \
|
||||||
|
"Class Members/functions" \
|
||||||
|
"Related Pages/pages"
|
||||||
|
do
|
||||||
|
NAME=`dirname "$i"`
|
||||||
|
FILE=`basename "$i"`
|
||||||
|
test -f "$htmldir/$FILE.html" && MENU="$MENU<li><a href=\"$FILE.html\">$NAME</a></li>"
|
||||||
|
done
|
||||||
|
|
||||||
|
MENU="$MENU</ul>"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Get the list of global Menu entries.
|
||||||
|
GMENU=`cat subdirs | tr -d '\n'`
|
||||||
|
|
||||||
|
PMENU=`grep '<!-- pmenu' "$htmldir/index.html" | sed -e 's+.*pmenu *++' -e 's+ *-->++' | awk '{ c=split($0,a,"/"); for (j=1; j<=c; j++) { printf " / <a href=\""; if (j==c) { printf("."); } for (k=j; k<c; k++) { printf "../"; } if (j<c) { printf("../html/index.html"); } printf "\">%s</a>\n" , a[j]; } }' | tr -d '\n'`
|
||||||
|
|
||||||
|
# Map the PHP file into HTML options so that
|
||||||
|
# it can be substituted in for the quick-class-picker.
|
||||||
|
CMENU=""
|
||||||
|
# For now, leave the CMENU disabled
|
||||||
|
CMENUBEGIN="<!--"
|
||||||
|
CMENUEND="-->"
|
||||||
|
|
||||||
|
if test "x$subdir" = "x." ; then
|
||||||
|
# Disable CMENU on toplevel anyway
|
||||||
|
CMENUBEGIN="<!--"
|
||||||
|
CMENUEND="-->"
|
||||||
|
else
|
||||||
|
test -f "$subdir/classmap.inc" && \
|
||||||
|
CMENU=`grep '=>' "$subdir/classmap.inc" | sed -e 's+"\([^"]*\)" => "'"$subdir/html/"'\([^"]*\)"+<option value="\2">\1<\/option>+' | tr -d '\n'`
|
||||||
|
|
||||||
|
if test -f "$subdir/classmap.inc" && grep "=>" "$subdir/classmap.inc" > /dev/null 2>&1 ; then
|
||||||
|
# Keep the menu, it's useful
|
||||||
|
:
|
||||||
|
else
|
||||||
|
CMENUBEGIN="<!--"
|
||||||
|
CMENUEND="-->"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Now substitute in the MENU in every file. This depends
|
||||||
|
# on HTML_HEADER (ie. header.html) containing the
|
||||||
|
# <!-- menu --> comment.
|
||||||
|
for i in "$htmldir"/*.html
|
||||||
|
do
|
||||||
|
if test -f "$i" ; then
|
||||||
|
sed -e "s+<!-- menu -->+$MENU+" \
|
||||||
|
-e "s+<!-- gmenu -->+$GMENU+" \
|
||||||
|
-e "s+<!-- pmenu.*-->+$PMENU+" \
|
||||||
|
-e "s+<!-- cmenu.begin -->+$CMENUBEGIN+" \
|
||||||
|
-e "s+<!-- cmenu.end -->+$CMENUEND+" \
|
||||||
|
< "$i" | sed -e "s+@topdir@+$htmltop+g" > "$i.new" && mv "$i.new" "$i"
|
||||||
|
sed -e "s+<!-- cmenu -->+$CMENU+" < "$i" > "$i.new"
|
||||||
|
test -s "$i.new" && mv "$i.new" "$i"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Handle the Doxygen processing of a toplevel directory.
|
||||||
|
apidox_toplevel()
|
||||||
|
{
|
||||||
|
echo ""
|
||||||
|
echo "*** Creating API documentation main page for $module_name"
|
||||||
|
echo "*"
|
||||||
|
rm -f "Doxyfile"
|
||||||
|
for i in "$top_srcdir/doc/api/Doxyfile.global" \
|
||||||
|
"$top_srcdir/admin/Doxyfile.global" \
|
||||||
|
"$DOXDATA/Doxyfile.global"
|
||||||
|
do
|
||||||
|
if test -f "$i" ; then
|
||||||
|
cp "$i" Doxyfile
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if test ! -f "Doxyfile" ; then
|
||||||
|
echo "* Cannot create Doxyfile."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat "$top_builddir/Doxyfile.in" >> Doxyfile
|
||||||
|
|
||||||
|
|
||||||
|
echo "INPUT = $top_srcdir" >> Doxyfile
|
||||||
|
echo "OUTPUT_DIRECTORY = $top_builddir" >> Doxyfile ; \
|
||||||
|
echo "FILE_PATTERNS = *.dox" >> Doxyfile ; \
|
||||||
|
echo "RECURSIVE = NO" >> Doxyfile ; \
|
||||||
|
echo "ALPHABETICAL_INDEX = NO" >> Doxyfile ; \
|
||||||
|
echo "HTML_OUTPUT = ." >> Doxyfile ; \
|
||||||
|
apidox_htmlfiles "main"
|
||||||
|
|
||||||
|
# KDevelop has a top-level Makefile.am with settings.
|
||||||
|
for i in "$top_srcdir/Makefile.am.in" "$top_srcdir/Makefile.am"
|
||||||
|
do
|
||||||
|
if test -f "$i" ; then
|
||||||
|
grep '^DOXYGEN_SET_' "$i" | \
|
||||||
|
sed -e 's+DOXYGEN_SET_++' -e "s+@topdir@+$top_srcdir+" >> Doxyfile
|
||||||
|
apidox_specials "$srcdir/Makefile.am" "$subdir/Doxyfile"
|
||||||
|
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
apidox_local
|
||||||
|
|
||||||
|
doxygen Doxyfile
|
||||||
|
|
||||||
|
( cd "$top_srcdir" && grep -l '^include.*Doxyfile.am' `find . -name Makefile.am` ) | sed -e 's+/Makefile.am$++' -e 's+^\./++' | sort > subdirs.in
|
||||||
|
for i in `cat subdirs.in`
|
||||||
|
do
|
||||||
|
test "x." = "x$i" && continue;
|
||||||
|
|
||||||
|
dir=`dirname "$i"`
|
||||||
|
file=`basename "$i"`
|
||||||
|
if test "x." = "x$dir" ; then
|
||||||
|
dir=""
|
||||||
|
else
|
||||||
|
dir="$dir/"
|
||||||
|
fi
|
||||||
|
indent=`echo "$dir" | sed -e 's+[^/]*/+\ \ +g' | sed -e 's+&+\\\&+g'`
|
||||||
|
entryname=`extract_line DOXYGEN_SET_PROJECT_NAME "$top_srcdir/$dir/$file/Makefile.am"`
|
||||||
|
test -z "$entryname" && entryname="$file"
|
||||||
|
|
||||||
|
if grep DOXYGEN_EMPTY "$top_srcdir/$dir/$file/Makefile.am" > /dev/null 2>&1 ; then
|
||||||
|
echo "<li>$indent$file</li>"
|
||||||
|
else
|
||||||
|
echo "<li>$indent<a href=\"@topdir@/$dir$file/html/index.html\">$entryname</a></li>"
|
||||||
|
fi
|
||||||
|
done > subdirs
|
||||||
|
|
||||||
|
doxyndex
|
||||||
|
}
|
||||||
|
|
||||||
|
### Handle the Doxygen processing of a non-toplevel directory.
|
||||||
|
apidox_subdir()
|
||||||
|
{
|
||||||
|
echo ""
|
||||||
|
echo "*** Creating apidox in $subdir"
|
||||||
|
echo "*"
|
||||||
|
rm -f "$subdir/Doxyfile"
|
||||||
|
if test ! -d "$top_srcdir/$subdir" ; then
|
||||||
|
echo "* No source (sub)directory $subdir"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
for i in "$top_srcdir/doc/api/Doxyfile.global" \
|
||||||
|
"$top_srcdir/admin/Doxyfile.global" \
|
||||||
|
"$DOXDATA/Doxyfile.global"
|
||||||
|
do
|
||||||
|
if test -f "$i" ; then
|
||||||
|
cp "$i" "$subdir/Doxyfile"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
test -f "Doxyfile.in" || create_doxyfile_in
|
||||||
|
cat "Doxyfile.in" >> "$subdir/Doxyfile"
|
||||||
|
|
||||||
|
echo "PROJECT_NAME = \"$subdir\"" >> "$subdir/Doxyfile"
|
||||||
|
echo "INPUT = $srcdir" >> "$subdir/Doxyfile"
|
||||||
|
echo "OUTPUT_DIRECTORY = ." >> "$subdir/Doxyfile"
|
||||||
|
if grep -l "$subdir/" subdirs.in > /dev/null 2>&1 ; then
|
||||||
|
echo "RECURSIVE = NO" >> "$subdir/Doxyfile"
|
||||||
|
fi
|
||||||
|
echo "HTML_OUTPUT = $subdir/html" >> "$subdir/Doxyfile"
|
||||||
|
echo "GENERATE_TAGFILE = $subdir/$subdirname.tag" >> "$subdir/Doxyfile"
|
||||||
|
test -d "$top_srcdir/doc/api" && \
|
||||||
|
echo "IMAGE_PATH = $top_srcdir/doc/api" >> "$subdir/Doxyfile"
|
||||||
|
|
||||||
|
apidox_htmlfiles ""
|
||||||
|
|
||||||
|
# Makefile.ams may contain overrides to our settings,
|
||||||
|
# so copy them in.
|
||||||
|
grep '^DOXYGEN_SET_' "$srcdir/Makefile.am" | \
|
||||||
|
sed -e 's+DOXYGEN_SET_++' >> "$subdir/Doxyfile"
|
||||||
|
apidox_specials "$srcdir/Makefile.am" "$subdir/Doxyfile"
|
||||||
|
|
||||||
|
excludes=`extract_line DOXYGEN_EXCLUDE`
|
||||||
|
if test -n "$excludes"; then
|
||||||
|
patterns=""
|
||||||
|
dirs=""
|
||||||
|
for item in `echo "$excludes"`; do
|
||||||
|
if test -d "$top_srcdir/$subdir/$item"; then
|
||||||
|
dirs="$dirs $top_srcdir/$subdir/$item/"
|
||||||
|
else
|
||||||
|
patterns="$patterns $item"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "EXCLUDE_PATTERNS += $patterns" >> "$subdir/Doxyfile"
|
||||||
|
echo "EXCLUDE += $dirs" >> "$subdir/Doxyfile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "TAGFILES = \\" >> "$subdir/Doxyfile"
|
||||||
|
## For now, don't support \ continued references lines
|
||||||
|
tags=`extract_line DOXYGEN_REFERENCES`
|
||||||
|
for i in $tags qt ; do
|
||||||
|
tagsubdir=`dirname $i` ; tag=`basename $i`
|
||||||
|
tagpath=""
|
||||||
|
not_found=""
|
||||||
|
|
||||||
|
if test "x$tagsubdir" = "x." ; then
|
||||||
|
tagsubdir=""
|
||||||
|
else
|
||||||
|
tagsubdir="$tagsubdir/"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Find location of tag file
|
||||||
|
if test -f "$tagsubdir$tag/$tag.tag" ; then
|
||||||
|
file="$tagsubdir$tag/$tag.tag"
|
||||||
|
loc="$tagsubdir$tag/html"
|
||||||
|
else
|
||||||
|
# This checks for dox built with_out_ --no-modulename
|
||||||
|
# in the same build dir as this dox run was started in.
|
||||||
|
file=`ls -1 ../*-apidocs/"$tagsubdir$tag/$tag.tag" 2> /dev/null`
|
||||||
|
|
||||||
|
if test -n "$file" ; then
|
||||||
|
loc=`echo "$file" | sed -e "s/$tag.tag\$/html/"`
|
||||||
|
else
|
||||||
|
# If the tag file doesn't exist yet, but should
|
||||||
|
# because we have the right dirs here, queue
|
||||||
|
# this directory for re-processing later.
|
||||||
|
if test -d "$top_srcdir/$tagsubdir$tag" ; then
|
||||||
|
echo "* Need to re-process $subdir for tag $i"
|
||||||
|
echo "$subdir" >> "subdirs.later"
|
||||||
|
else
|
||||||
|
# Re-check in $PREFIX if needed.
|
||||||
|
test -n "$PREFIX" && \
|
||||||
|
file=`cd "$PREFIX" && \
|
||||||
|
ls -1 *-apidocs/"$tagsubdir$tag/$tag.tag" 2> /dev/null`
|
||||||
|
|
||||||
|
# If something is found, patch it up. The location must be
|
||||||
|
# relative to the installed location of the dox and the
|
||||||
|
# file must be absolute.
|
||||||
|
if test -n "$file" ; then
|
||||||
|
loc=`echo "../$file" | sed -e "s/$tag.tag\$/html/"`
|
||||||
|
file="$PREFIX/$file"
|
||||||
|
echo "* Tags for $tagsubdir$tag will only work when installed."
|
||||||
|
not_found="YES"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "$tag" = "qt" ; then
|
||||||
|
if test -z "$QTDOCDIR" ; then
|
||||||
|
echo " $file" >> "$subdir/Doxyfile"
|
||||||
|
else
|
||||||
|
if test -z "$file" ; then
|
||||||
|
# Really no Qt tags
|
||||||
|
echo "" >> "$subdir/Doxyfile"
|
||||||
|
else
|
||||||
|
echo " $file=$QTDOCDIR" >> "$subdir/Doxyfile"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if test -n "$file" ; then
|
||||||
|
test -z "$not_found" && echo "* Found tag $file"
|
||||||
|
echo " $file=../$top_builddir$loc \\" >> "$subdir/Doxyfile"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
apidox_local
|
||||||
|
|
||||||
|
if grep '^DOXYGEN_EMPTY' "$srcdir/Makefile.am" > /dev/null 2>&1 ; then
|
||||||
|
# This directory is empty, so don't process it, but
|
||||||
|
# *do* handle subdirs that might have dox.
|
||||||
|
:
|
||||||
|
else
|
||||||
|
# Regular processing
|
||||||
|
doxygen "$subdir/Doxyfile"
|
||||||
|
doxyndex
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
### Run a given subdir by setting up global variables first.
|
||||||
|
do_subdir()
|
||||||
|
{
|
||||||
|
subdir=`echo "$1" | sed -e 's+/$++'`
|
||||||
|
srcdir="$top_srcdir/$subdir"
|
||||||
|
subdirname=`basename "$subdir"`
|
||||||
|
mkdir -p "$subdir" 2> /dev/null
|
||||||
|
if test ! -d "$subdir" ; then
|
||||||
|
echo "Can't create dox subdirectory $subdir"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
top_builddir=`echo "/$subdir" | sed -e 's+/[^/]*+../+g'`
|
||||||
|
apidox_subdir
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
### Create installdox-slow in the toplevel
|
||||||
|
create_installdox()
|
||||||
|
{
|
||||||
|
# Fix up the installdox script so it accepts empty args
|
||||||
|
#
|
||||||
|
# This code is copied from the installdox generated by Doxygen,
|
||||||
|
# copyright by Dimitri van Heesch and released under the GPL.
|
||||||
|
# This does a _slow_ update of the dox, because it loops
|
||||||
|
# over the given substitutions instead of assuming all the
|
||||||
|
# needed ones are given.
|
||||||
|
#
|
||||||
|
cat <<\EOF
|
||||||
|
#! /usr/bin/env perl
|
||||||
|
|
||||||
|
%subst = () ;
|
||||||
|
$quiet = 0;
|
||||||
|
|
||||||
|
if (open(F,"search.cfg"))
|
||||||
|
{
|
||||||
|
$_=<F> ; s/[ \t\n]*$//g ; $subst{"_doc"} = $_;
|
||||||
|
$_=<F> ; s/[ \t\n]*$//g ; $subst{"_cgi"} = $_;
|
||||||
|
}
|
||||||
|
|
||||||
|
while ( @ARGV ) {
|
||||||
|
$_ = shift @ARGV;
|
||||||
|
if ( s/^-// ) {
|
||||||
|
if ( /^l(.*)/ ) {
|
||||||
|
$v = ($1 eq "") ? shift @ARGV : $1;
|
||||||
|
($v =~ /\/$/) || ($v .= "/");
|
||||||
|
$_ = $v;
|
||||||
|
if ( /(.+)\@(.+)/ ) {
|
||||||
|
$subst{$1} = $2;
|
||||||
|
} else {
|
||||||
|
print STDERR "Argument $_ is invalid for option -l\n";
|
||||||
|
&usage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elsif ( /^q/ ) {
|
||||||
|
$quiet = 1;
|
||||||
|
}
|
||||||
|
elsif ( /^\?|^h/ ) {
|
||||||
|
&usage();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
print STDERR "Illegal option -$_\n";
|
||||||
|
&usage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
push (@files, $_ );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ( ! @files ) {
|
||||||
|
if (opendir(D,".")) {
|
||||||
|
foreach $file ( readdir(D) ) {
|
||||||
|
$match = ".html";
|
||||||
|
next if ( $file =~ /^\.\.?$/ );
|
||||||
|
($file =~ /$match/) && (push @files, $file);
|
||||||
|
($file =~ "tree.js") && (push @files, $file);
|
||||||
|
}
|
||||||
|
closedir(D);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! @files ) {
|
||||||
|
print STDERR "Warning: No input files given and none found!\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach $f (@files)
|
||||||
|
{
|
||||||
|
if ( ! $quiet ) {
|
||||||
|
print "Editing: $f...\n";
|
||||||
|
}
|
||||||
|
$oldf = $f;
|
||||||
|
$f .= ".bak";
|
||||||
|
unless (rename $oldf,$f) {
|
||||||
|
print STDERR "Error: cannot rename file $oldf\n";
|
||||||
|
exit 1;
|
||||||
|
}
|
||||||
|
if (open(F,"<$f")) {
|
||||||
|
unless (open(G,">$oldf")) {
|
||||||
|
print STDERR "Error: opening file $oldf for writing\n";
|
||||||
|
exit 1;
|
||||||
|
}
|
||||||
|
if ($oldf ne "tree.js") {
|
||||||
|
while (<F>) {
|
||||||
|
foreach $sub (keys %subst) {
|
||||||
|
s/doxygen\=\"$sub\:([^ \"\t\>\<]*)\" (href|src)=\"\1/doxygen\=\"$sub:$subst{$sub}\" \2=\"$subst{$sub}/g;
|
||||||
|
print G "$_";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
while (<F>) {
|
||||||
|
foreach $sub (keys %subst) {
|
||||||
|
s/\"$sub\:([^ \"\t\>\<]*)\", \"\1/\"$sub:$subst{$sub}\" ,\"$subst{$sub}/g;
|
||||||
|
print G "$_";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
print STDERR "Warning file $f does not exist\n";
|
||||||
|
}
|
||||||
|
unlink $f;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub usage {
|
||||||
|
print STDERR "Usage: installdox [options] [html-file [html-file ...]]\n";
|
||||||
|
print STDERR "Options:\n";
|
||||||
|
print STDERR " -l tagfile\@linkName tag file + URL or directory \n";
|
||||||
|
print STDERR " -q Quiet mode\n\n";
|
||||||
|
exit 1;
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
# Do only the subdirs that match the RE passed in as $1
|
||||||
|
do_subdirs_re()
|
||||||
|
{
|
||||||
|
RE=`echo "$1" | sed -e 's+/$++'`
|
||||||
|
|
||||||
|
# Here's a queue of dirs to re-process later when
|
||||||
|
# all the rest have been done already.
|
||||||
|
> subdirs.later
|
||||||
|
|
||||||
|
# subdirs.top lists _all_ subdirs of top in the order they
|
||||||
|
# should be handled; subdirs.in lists those dirs that contain
|
||||||
|
# dox. So the intersection of the two is the ordered list
|
||||||
|
# of top-level subdirs that contain dox.
|
||||||
|
#
|
||||||
|
# subdirs.top also doesn't contain ".", so that special
|
||||||
|
# case can be ignored in the loop.
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
|
for i in `grep "^$RE" subdirs.top`
|
||||||
|
do
|
||||||
|
if test "x$i" = "x." ; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
# Calculate intersection of this element and the
|
||||||
|
# set of dox dirs.
|
||||||
|
if grep "^$i\$" subdirs.in > /dev/null 2>&1 ; then
|
||||||
|
echo "$i"
|
||||||
|
mkdir -p "$i" 2> /dev/null
|
||||||
|
|
||||||
|
# Handle the subdirs of this one
|
||||||
|
for j in `grep "$i/" subdirs.in`
|
||||||
|
do
|
||||||
|
echo "$j"
|
||||||
|
mkdir -p "$j" 2> /dev/null
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Now we still need to handle whatever is left
|
||||||
|
for i in `cat subdirs.in`
|
||||||
|
do
|
||||||
|
test -d "$i" || echo "$i"
|
||||||
|
mkdir -p "$i" 2> /dev/null
|
||||||
|
done
|
||||||
|
) > subdirs.sort
|
||||||
|
for i in `cat subdirs.sort`
|
||||||
|
do
|
||||||
|
do_subdir "$i"
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -s "subdirs.later" ; then
|
||||||
|
sort subdirs.later | uniq > subdirs.sort
|
||||||
|
for i in `cat subdirs.sort`
|
||||||
|
do
|
||||||
|
: > subdirs.later
|
||||||
|
echo "*** Reprocessing $i"
|
||||||
|
do_subdir "$i"
|
||||||
|
test -s "subdirs.later" && echo "* Some tag files were still not found."
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if test "x." = "x$top_builddir" ; then
|
||||||
|
apidox_toplevel
|
||||||
|
create_subdirs
|
||||||
|
create_installdox > installdox-slow
|
||||||
|
if test "x$recurse" = "x1" ; then
|
||||||
|
if test "x$module_name" = "xkdelibs" ; then
|
||||||
|
if test -z "$QTDOCTAG" && test -d "$QTDOCDIR" && \
|
||||||
|
test ! -f "qt/qt.tag" ; then
|
||||||
|
# Special case: create a qt tag file.
|
||||||
|
echo "*** Creating a tag file for the Qt library:"
|
||||||
|
mkdir qt
|
||||||
|
doxytag -t qt/qt.tag "$QTDOCDIR" > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test -n "$QTDOCTAG" && test -r "$QTDOCTAG" ; then
|
||||||
|
echo "*** Copying tag file for the Qt library:"
|
||||||
|
mkdir qt
|
||||||
|
cp "$QTDOCTAG" qt/qt.tag
|
||||||
|
fi
|
||||||
|
|
||||||
|
do_subdirs_re "."
|
||||||
|
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if test "x$recurse" = "x1" ; then
|
||||||
|
do_subdirs_re "$subdir"
|
||||||
|
else
|
||||||
|
do_subdir "$subdir"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# At the end of a run, clean up stuff.
|
||||||
|
if test "YES" = "$cleanup" ; then
|
||||||
|
rm -f subdirs.in subdirs.later subdirs.sort subdirs.top Doxyfile.in
|
||||||
|
rm -f `find . -name Doxyfile`
|
||||||
|
rm -f qt/qt.tag
|
||||||
|
rmdir qt > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
@ -0,0 +1,401 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# install - install a program, script, or datafile
|
||||||
|
|
||||||
|
scriptversion=2005-11-07.23
|
||||||
|
|
||||||
|
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||||
|
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||||
|
# following copyright and license.
|
||||||
|
#
|
||||||
|
# Copyright (C) 1994 X Consortium
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to
|
||||||
|
# deal in the Software without restriction, including without limitation the
|
||||||
|
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
# sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||||
|
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||||
|
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
#
|
||||||
|
# Except as contained in this notice, the name of the X Consortium shall not
|
||||||
|
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||||
|
# ings in this Software without prior written authorization from the X Consor-
|
||||||
|
# tium.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# FSF changes to this file are in the public domain.
|
||||||
|
#
|
||||||
|
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||||
|
# `make' implicit rules from creating a file called install from it
|
||||||
|
# when there is no Makefile.
|
||||||
|
#
|
||||||
|
# This script is compatible with the BSD install script, but was written
|
||||||
|
# from scratch. It can only install one file at a time, a restriction
|
||||||
|
# shared with many OS's install programs.
|
||||||
|
|
||||||
|
# set DOITPROG to echo to test this script
|
||||||
|
|
||||||
|
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||||
|
doit="${DOITPROG-}"
|
||||||
|
|
||||||
|
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||||
|
|
||||||
|
mvprog="${MVPROG-mv}"
|
||||||
|
cpprog="${CPPROG-cp}"
|
||||||
|
chmodprog="${CHMODPROG-chmod}"
|
||||||
|
chownprog="${CHOWNPROG-chown}"
|
||||||
|
chgrpprog="${CHGRPPROG-chgrp}"
|
||||||
|
stripprog="${STRIPPROG-strip}"
|
||||||
|
rmprog="${RMPROG-rm}"
|
||||||
|
mkdirprog="${MKDIRPROG-mkdir}"
|
||||||
|
|
||||||
|
posix_glob=
|
||||||
|
posix_mkdir=
|
||||||
|
|
||||||
|
# Symbolic mode for testing mkdir with directories.
|
||||||
|
# It is the same as 755, but also tests that "u+" works.
|
||||||
|
test_mode=u=rwx,g=rx,o=rx,u+wx
|
||||||
|
|
||||||
|
# Desired mode of installed file.
|
||||||
|
mode=0755
|
||||||
|
|
||||||
|
# Desired mode of newly created intermediate directories.
|
||||||
|
# It is empty if not known yet.
|
||||||
|
intermediate_mode=
|
||||||
|
|
||||||
|
chmodcmd=$chmodprog
|
||||||
|
chowncmd=
|
||||||
|
chgrpcmd=
|
||||||
|
stripcmd=
|
||||||
|
rmcmd="$rmprog -f"
|
||||||
|
mvcmd="$mvprog"
|
||||||
|
src=
|
||||||
|
dst=
|
||||||
|
dir_arg=
|
||||||
|
dstarg=
|
||||||
|
no_target_directory=
|
||||||
|
|
||||||
|
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||||
|
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||||
|
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||||
|
or: $0 [OPTION]... -d DIRECTORIES...
|
||||||
|
|
||||||
|
In the 1st form, copy SRCFILE to DSTFILE.
|
||||||
|
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||||
|
In the 4th, create DIRECTORIES.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-c (ignored)
|
||||||
|
-d create directories instead of installing files.
|
||||||
|
-g GROUP $chgrpprog installed files to GROUP.
|
||||||
|
-m MODE $chmodprog installed files to MODE.
|
||||||
|
-o USER $chownprog installed files to USER.
|
||||||
|
-s $stripprog installed files.
|
||||||
|
-t DIRECTORY install into DIRECTORY.
|
||||||
|
-T report an error if DSTFILE is a directory.
|
||||||
|
--help display this help and exit.
|
||||||
|
--version display version info and exit.
|
||||||
|
|
||||||
|
Environment variables override the default commands:
|
||||||
|
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
|
||||||
|
"
|
||||||
|
|
||||||
|
while test -n "$1"; do
|
||||||
|
case $1 in
|
||||||
|
-c) shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-d) dir_arg=true
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-g) chgrpcmd="$chgrpprog $2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
--help) echo "$usage"; exit $?;;
|
||||||
|
|
||||||
|
-m) mode=$2
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-o) chowncmd="$chownprog $2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-s) stripcmd=$stripprog
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-t) dstarg=$2
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-T) no_target_directory=true
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
--version) echo "$0 $scriptversion"; exit $?;;
|
||||||
|
|
||||||
|
*) # When -d is used, all remaining arguments are directories to create.
|
||||||
|
# When -t is used, the destination is already specified.
|
||||||
|
test -n "$dir_arg$dstarg" && break
|
||||||
|
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$dstarg"; then
|
||||||
|
# $@ is not empty: it contains at least $arg.
|
||||||
|
set fnord "$@" "$dstarg"
|
||||||
|
shift # fnord
|
||||||
|
fi
|
||||||
|
shift # arg
|
||||||
|
dstarg=$arg
|
||||||
|
done
|
||||||
|
break;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -z "$1"; then
|
||||||
|
if test -z "$dir_arg"; then
|
||||||
|
echo "$0: no input file specified." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# It's OK to call `install-sh -d' without argument.
|
||||||
|
# This can happen when creating conditional directories.
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
test -n "$dir_arg" || trap '(exit $?); exit' 1 2 13 15
|
||||||
|
|
||||||
|
for src
|
||||||
|
do
|
||||||
|
# Protect names starting with `-'.
|
||||||
|
case $src in
|
||||||
|
-*) src=./$src ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
dst=$src
|
||||||
|
dstdir=$dst
|
||||||
|
test -d "$dstdir"
|
||||||
|
dstdir_status=$?
|
||||||
|
else
|
||||||
|
|
||||||
|
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||||
|
# might cause directories to be created, which would be especially bad
|
||||||
|
# if $src (and thus $dsttmp) contains '*'.
|
||||||
|
if test ! -f "$src" && test ! -d "$src"; then
|
||||||
|
echo "$0: $src does not exist." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$dstarg"; then
|
||||||
|
echo "$0: no destination specified." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
dst=$dstarg
|
||||||
|
# Protect names starting with `-'.
|
||||||
|
case $dst in
|
||||||
|
-*) dst=./$dst ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If destination is a directory, append the input filename; won't work
|
||||||
|
# if double slashes aren't ignored.
|
||||||
|
if test -d "$dst"; then
|
||||||
|
if test -n "$no_target_directory"; then
|
||||||
|
echo "$0: $dstarg: Is a directory" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
dstdir=$dst
|
||||||
|
dst=$dstdir/`basename "$src"`
|
||||||
|
dstdir_status=0
|
||||||
|
else
|
||||||
|
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||||
|
dstdir=`
|
||||||
|
(dirname "$dst") 2>/dev/null ||
|
||||||
|
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||||
|
X"$dst" : 'X\(//\)[^/]' \| \
|
||||||
|
X"$dst" : 'X\(//\)$' \| \
|
||||||
|
X"$dst" : 'X\(/\)' \| \
|
||||||
|
. : '\(.\)' 2>/dev/null ||
|
||||||
|
echo X"$dst" |
|
||||||
|
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
|
||||||
|
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
|
||||||
|
/^X\(\/\/\)$/{ s//\1/; q; }
|
||||||
|
/^X\(\/\).*/{ s//\1/; q; }
|
||||||
|
s/.*/./; q'
|
||||||
|
`
|
||||||
|
|
||||||
|
test -d "$dstdir"
|
||||||
|
dstdir_status=$?
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
obsolete_mkdir_used=false
|
||||||
|
|
||||||
|
if test $dstdir_status != 0; then
|
||||||
|
case $posix_mkdir in
|
||||||
|
'')
|
||||||
|
posix_mkdir=false
|
||||||
|
if $mkdirprog -m $test_mode -p -- / >/dev/null 2>&1; then
|
||||||
|
posix_mkdir=true
|
||||||
|
else
|
||||||
|
# Remove any dirs left behind by ancient mkdir implementations.
|
||||||
|
rmdir ./-m "$test_mode" ./-p ./-- 2>/dev/null
|
||||||
|
fi ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if
|
||||||
|
$posix_mkdir && {
|
||||||
|
|
||||||
|
# With -d, create the new directory with the user-specified mode.
|
||||||
|
# Otherwise, create it using the same intermediate mode that
|
||||||
|
# mkdir -p would use when creating intermediate directories.
|
||||||
|
# POSIX says that this mode is "$(umask -S),u+wx", so use that
|
||||||
|
# if umask -S works.
|
||||||
|
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
mkdir_mode=$mode
|
||||||
|
else
|
||||||
|
case $intermediate_mode in
|
||||||
|
'')
|
||||||
|
if umask_S=`(umask -S) 2>/dev/null`; then
|
||||||
|
intermediate_mode=$umask_S,u+wx
|
||||||
|
else
|
||||||
|
intermediate_mode=$test_mode
|
||||||
|
fi ;;
|
||||||
|
esac
|
||||||
|
mkdir_mode=$intermediate_mode
|
||||||
|
fi
|
||||||
|
|
||||||
|
$mkdirprog -m "$mkdir_mode" -p -- "$dstdir"
|
||||||
|
}
|
||||||
|
then :
|
||||||
|
else
|
||||||
|
|
||||||
|
# mkdir does not conform to POSIX, or it failed possibly due to
|
||||||
|
# a race condition. Create the directory the slow way, step by
|
||||||
|
# step, checking for races as we go.
|
||||||
|
|
||||||
|
case $dstdir in
|
||||||
|
/*) pathcomp=/ ;;
|
||||||
|
-*) pathcomp=./ ;;
|
||||||
|
*) pathcomp= ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case $posix_glob in
|
||||||
|
'')
|
||||||
|
if (set -f) 2>/dev/null; then
|
||||||
|
posix_glob=true
|
||||||
|
else
|
||||||
|
posix_glob=false
|
||||||
|
fi ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
oIFS=$IFS
|
||||||
|
IFS=/
|
||||||
|
$posix_glob && set -f
|
||||||
|
set fnord $dstdir
|
||||||
|
shift
|
||||||
|
$posix_glob && set +f
|
||||||
|
IFS=$oIFS
|
||||||
|
|
||||||
|
for d
|
||||||
|
do
|
||||||
|
test "x$d" = x && continue
|
||||||
|
|
||||||
|
pathcomp=$pathcomp$d
|
||||||
|
if test ! -d "$pathcomp"; then
|
||||||
|
$mkdirprog "$pathcomp"
|
||||||
|
# Don't fail if two instances are running concurrently.
|
||||||
|
test -d "$pathcomp" || exit 1
|
||||||
|
fi
|
||||||
|
pathcomp=$pathcomp/
|
||||||
|
done
|
||||||
|
obsolete_mkdir_used=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||||
|
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||||
|
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||||
|
test -z "$chmodcmd" || $doit $chmodcmd "$mode" "$dst"; } || exit 1
|
||||||
|
else
|
||||||
|
|
||||||
|
# Make a couple of temp file names in the proper directory.
|
||||||
|
dsttmp=$dstdir/_inst.$$_
|
||||||
|
rmtmp=$dstdir/_rm.$$_
|
||||||
|
|
||||||
|
# Trap to clean up those temp files at exit.
|
||||||
|
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||||
|
|
||||||
|
# Copy the file name to the temp name.
|
||||||
|
$doit $cpprog "$src" "$dsttmp" &&
|
||||||
|
|
||||||
|
# and set any options; do chmod last to preserve setuid bits.
|
||||||
|
#
|
||||||
|
# If any of these fail, we abort the whole thing. If we want to
|
||||||
|
# ignore errors from any of these, just make sure not to ignore
|
||||||
|
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||||
|
#
|
||||||
|
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
|
||||||
|
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
|
||||||
|
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
|
||||||
|
&& { test -z "$chmodcmd" || $doit $chmodcmd "$mode" "$dsttmp"; } &&
|
||||||
|
|
||||||
|
# Now rename the file to the real destination.
|
||||||
|
{ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
|
||||||
|
|| {
|
||||||
|
# The rename failed, perhaps because mv can't rename something else
|
||||||
|
# to itself, or perhaps because mv is so ancient that it does not
|
||||||
|
# support -f.
|
||||||
|
|
||||||
|
# Now remove or move aside any old file at destination location.
|
||||||
|
# We try this two ways since rm can't unlink itself on some
|
||||||
|
# systems and the destination file might be busy for other
|
||||||
|
# reasons. In this case, the final cleanup might fail but the new
|
||||||
|
# file should still install successfully.
|
||||||
|
{
|
||||||
|
if test -f "$dst"; then
|
||||||
|
$doit $rmcmd -f "$dst" 2>/dev/null \
|
||||||
|
|| { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
|
||||||
|
&& { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
|
||||||
|
|| {
|
||||||
|
echo "$0: cannot unlink or rename $dst" >&2
|
||||||
|
(exit 1); exit 1
|
||||||
|
}
|
||||||
|
else
|
||||||
|
:
|
||||||
|
fi
|
||||||
|
} &&
|
||||||
|
|
||||||
|
# Now rename the file to the real destination.
|
||||||
|
$doit $mvcmd "$dsttmp" "$dst"
|
||||||
|
}
|
||||||
|
} || exit 1
|
||||||
|
|
||||||
|
trap '' 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Local variables:
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-end: "$"
|
||||||
|
# End:
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,353 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Common stub for a few missing GNU programs while installing.
|
||||||
|
|
||||||
|
scriptversion=2004-09-07.08
|
||||||
|
|
||||||
|
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||||
|
|
||||||
|
# This program is free software; you can 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, 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, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
# 02110-1301, USA.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
echo 1>&2 "Try \`$0 --help' for more information"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
run=:
|
||||||
|
|
||||||
|
# In the cases where this matters, `missing' is being run in the
|
||||||
|
# srcdir already.
|
||||||
|
if test -f configure.ac; then
|
||||||
|
configure_ac=configure.ac
|
||||||
|
else
|
||||||
|
configure_ac=configure.in
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg="missing on your system"
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
--run)
|
||||||
|
# Try to run requested program, and just exit if it succeeds.
|
||||||
|
run=
|
||||||
|
shift
|
||||||
|
"$@" && exit 0
|
||||||
|
# Exit code 63 means version mismatch. This often happens
|
||||||
|
# when the user try to use an ancient version of a tool on
|
||||||
|
# a file that requires a minimum version. In this case we
|
||||||
|
# we should proceed has if the program had been absent, or
|
||||||
|
# if --run hadn't been passed.
|
||||||
|
if test $? = 63; then
|
||||||
|
run=:
|
||||||
|
msg="probably too old"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
-h|--h|--he|--hel|--help)
|
||||||
|
echo "\
|
||||||
|
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||||
|
|
||||||
|
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||||
|
error status if there is no known handling for PROGRAM.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help display this help and exit
|
||||||
|
-v, --version output version information and exit
|
||||||
|
--run try to run the given command, and emulate it if it fails
|
||||||
|
|
||||||
|
Supported PROGRAM values:
|
||||||
|
aclocal touch file \`aclocal.m4'
|
||||||
|
autoconf touch file \`configure'
|
||||||
|
autoheader touch file \`config.h.in'
|
||||||
|
automake touch all \`Makefile.in' files
|
||||||
|
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||||
|
flex create \`lex.yy.c', if possible, from existing .c
|
||||||
|
help2man touch the output file
|
||||||
|
lex create \`lex.yy.c', if possible, from existing .c
|
||||||
|
makeinfo touch the output file
|
||||||
|
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||||
|
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||||
|
|
||||||
|
Send bug reports to <bug-automake@gnu.org>."
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
|
||||||
|
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||||
|
echo "missing $scriptversion (GNU Automake)"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
|
||||||
|
-*)
|
||||||
|
echo 1>&2 "$0: Unknown \`$1' option"
|
||||||
|
echo 1>&2 "Try \`$0 --help' for more information"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Now exit if we have it, but it failed. Also exit now if we
|
||||||
|
# don't have it and --version was passed (most likely to detect
|
||||||
|
# the program).
|
||||||
|
case "$1" in
|
||||||
|
lex|yacc)
|
||||||
|
# Not GNU programs, they don't have --version.
|
||||||
|
;;
|
||||||
|
|
||||||
|
tar)
|
||||||
|
if test -n "$run"; then
|
||||||
|
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||||
|
exit 1
|
||||||
|
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||||
|
# We have it, but it failed.
|
||||||
|
exit 1
|
||||||
|
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||||
|
# Could not run --version or --help. This is probably someone
|
||||||
|
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||||
|
# $TOOL exists and not knowing $TOOL uses missing.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If it does not exist, or fails to run (possibly an outdated version),
|
||||||
|
# try to emulate it.
|
||||||
|
case "$1" in
|
||||||
|
aclocal*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||||
|
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||||
|
any GNU archive site."
|
||||||
|
touch aclocal.m4
|
||||||
|
;;
|
||||||
|
|
||||||
|
autoconf)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified \`${configure_ac}'. You might want to install the
|
||||||
|
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||||
|
archive site."
|
||||||
|
touch configure
|
||||||
|
;;
|
||||||
|
|
||||||
|
autoheader)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||||
|
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||||
|
from any GNU archive site."
|
||||||
|
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||||
|
test -z "$files" && files="config.h"
|
||||||
|
touch_files=
|
||||||
|
for f in $files; do
|
||||||
|
case "$f" in
|
||||||
|
*:*) touch_files="$touch_files "`echo "$f" |
|
||||||
|
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||||
|
*) touch_files="$touch_files $f.in";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
touch $touch_files
|
||||||
|
;;
|
||||||
|
|
||||||
|
automake*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||||
|
You might want to install the \`Automake' and \`Perl' packages.
|
||||||
|
Grab them from any GNU archive site."
|
||||||
|
find . -type f -name Makefile.am -print |
|
||||||
|
sed 's/\.am$/.in/' |
|
||||||
|
while read f; do touch "$f"; done
|
||||||
|
;;
|
||||||
|
|
||||||
|
autom4te)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is needed, but is $msg.
|
||||||
|
You might have modified some files without having the
|
||||||
|
proper tools for further handling them.
|
||||||
|
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||||
|
archive site."
|
||||||
|
|
||||||
|
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||||
|
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||||
|
if test -f "$file"; then
|
||||||
|
touch $file
|
||||||
|
else
|
||||||
|
test -z "$file" || exec >$file
|
||||||
|
echo "#! /bin/sh"
|
||||||
|
echo "# Created by GNU Automake missing as a replacement of"
|
||||||
|
echo "# $ $@"
|
||||||
|
echo "exit 0"
|
||||||
|
chmod +x $file
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
bison|yacc)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' $msg. You should only need it if
|
||||||
|
you modified a \`.y' file. You may need the \`Bison' package
|
||||||
|
in order for those modifications to take effect. You can get
|
||||||
|
\`Bison' from any GNU archive site."
|
||||||
|
rm -f y.tab.c y.tab.h
|
||||||
|
if [ $# -ne 1 ]; then
|
||||||
|
eval LASTARG="\${$#}"
|
||||||
|
case "$LASTARG" in
|
||||||
|
*.y)
|
||||||
|
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||||
|
if [ -f "$SRCFILE" ]; then
|
||||||
|
cp "$SRCFILE" y.tab.c
|
||||||
|
fi
|
||||||
|
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||||
|
if [ -f "$SRCFILE" ]; then
|
||||||
|
cp "$SRCFILE" y.tab.h
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
if [ ! -f y.tab.h ]; then
|
||||||
|
echo >y.tab.h
|
||||||
|
fi
|
||||||
|
if [ ! -f y.tab.c ]; then
|
||||||
|
echo 'main() { return 0; }' >y.tab.c
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
lex|flex)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified a \`.l' file. You may need the \`Flex' package
|
||||||
|
in order for those modifications to take effect. You can get
|
||||||
|
\`Flex' from any GNU archive site."
|
||||||
|
rm -f lex.yy.c
|
||||||
|
if [ $# -ne 1 ]; then
|
||||||
|
eval LASTARG="\${$#}"
|
||||||
|
case "$LASTARG" in
|
||||||
|
*.l)
|
||||||
|
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||||
|
if [ -f "$SRCFILE" ]; then
|
||||||
|
cp "$SRCFILE" lex.yy.c
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
if [ ! -f lex.yy.c ]; then
|
||||||
|
echo 'main() { return 0; }' >lex.yy.c
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
help2man)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified a dependency of a manual page. You may need the
|
||||||
|
\`Help2man' package in order for those modifications to take
|
||||||
|
effect. You can get \`Help2man' from any GNU archive site."
|
||||||
|
|
||||||
|
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||||
|
if test -z "$file"; then
|
||||||
|
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||||
|
fi
|
||||||
|
if [ -f "$file" ]; then
|
||||||
|
touch $file
|
||||||
|
else
|
||||||
|
test -z "$file" || exec >$file
|
||||||
|
echo ".ab help2man is required to generate this page"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
makeinfo)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||||
|
indirectly affecting the aspect of the manual. The spurious
|
||||||
|
call might also be the consequence of using a buggy \`make' (AIX,
|
||||||
|
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||||
|
the \`GNU make' package. Grab either from any GNU archive site."
|
||||||
|
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||||
|
if test -z "$file"; then
|
||||||
|
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||||
|
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||||
|
fi
|
||||||
|
touch $file
|
||||||
|
;;
|
||||||
|
|
||||||
|
tar)
|
||||||
|
shift
|
||||||
|
|
||||||
|
# We have already tried tar in the generic part.
|
||||||
|
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||||
|
# messages.
|
||||||
|
if (gnutar --version > /dev/null 2>&1); then
|
||||||
|
gnutar "$@" && exit 0
|
||||||
|
fi
|
||||||
|
if (gtar --version > /dev/null 2>&1); then
|
||||||
|
gtar "$@" && exit 0
|
||||||
|
fi
|
||||||
|
firstarg="$1"
|
||||||
|
if shift; then
|
||||||
|
case "$firstarg" in
|
||||||
|
*o*)
|
||||||
|
firstarg=`echo "$firstarg" | sed s/o//`
|
||||||
|
tar "$firstarg" "$@" && exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case "$firstarg" in
|
||||||
|
*h*)
|
||||||
|
firstarg=`echo "$firstarg" | sed s/h//`
|
||||||
|
tar "$firstarg" "$@" && exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||||
|
You may want to install GNU tar or Free paxutils, or check the
|
||||||
|
command line arguments."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is needed, and is $msg.
|
||||||
|
You might have modified some files without having the
|
||||||
|
proper tools for further handling them. Check the \`README' file,
|
||||||
|
it often tells you about the needed prerequisites for installing
|
||||||
|
this package. You may also peek at any GNU archive site, in case
|
||||||
|
some other package would contain this missing \`$1' program."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
# Local variables:
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-end: "$"
|
||||||
|
# End:
|
@ -0,0 +1,158 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# mkinstalldirs --- make directory hierarchy
|
||||||
|
|
||||||
|
scriptversion=2005-06-29.22
|
||||||
|
|
||||||
|
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||||
|
# Created: 1993-05-16
|
||||||
|
# Public domain.
|
||||||
|
#
|
||||||
|
# This file is maintained in Automake, please report
|
||||||
|
# bugs to <bug-automake@gnu.org> or send patches to
|
||||||
|
# <automake-patches@gnu.org>.
|
||||||
|
|
||||||
|
errstatus=0
|
||||||
|
dirmode=
|
||||||
|
|
||||||
|
usage="\
|
||||||
|
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
|
||||||
|
|
||||||
|
Create each directory DIR (with mode MODE, if specified), including all
|
||||||
|
leading file name components.
|
||||||
|
|
||||||
|
Report bugs to <bug-automake@gnu.org>."
|
||||||
|
|
||||||
|
# process command line arguments
|
||||||
|
while test $# -gt 0 ; do
|
||||||
|
case $1 in
|
||||||
|
-h | --help | --h*) # -h for help
|
||||||
|
echo "$usage"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-m) # -m PERM arg
|
||||||
|
shift
|
||||||
|
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
||||||
|
dirmode=$1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--version)
|
||||||
|
echo "$0 $scriptversion"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
--) # stop option processing
|
||||||
|
shift
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
-*) # unknown option
|
||||||
|
echo "$usage" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*) # first non-opt arg
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
for file
|
||||||
|
do
|
||||||
|
if test -d "$file"; then
|
||||||
|
shift
|
||||||
|
else
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
case $# in
|
||||||
|
0) exit 0 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
|
||||||
|
# mkdir -p a/c at the same time, both will detect that a is missing,
|
||||||
|
# one will create a, then the other will try to create a and die with
|
||||||
|
# a "File exists" error. This is a problem when calling mkinstalldirs
|
||||||
|
# from a parallel make. We use --version in the probe to restrict
|
||||||
|
# ourselves to GNU mkdir, which is thread-safe.
|
||||||
|
case $dirmode in
|
||||||
|
'')
|
||||||
|
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||||
|
echo "mkdir -p -- $*"
|
||||||
|
exec mkdir -p -- "$@"
|
||||||
|
else
|
||||||
|
# On NextStep and OpenStep, the `mkdir' command does not
|
||||||
|
# recognize any option. It will interpret all options as
|
||||||
|
# directories to create, and then abort because `.' already
|
||||||
|
# exists.
|
||||||
|
test -d ./-p && rmdir ./-p
|
||||||
|
test -d ./--version && rmdir ./--version
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
|
||||||
|
test ! -d ./--version; then
|
||||||
|
echo "mkdir -m $dirmode -p -- $*"
|
||||||
|
exec mkdir -m "$dirmode" -p -- "$@"
|
||||||
|
else
|
||||||
|
# Clean up after NextStep and OpenStep mkdir.
|
||||||
|
for d in ./-m ./-p ./--version "./$dirmode";
|
||||||
|
do
|
||||||
|
test -d $d && rmdir $d
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
for file
|
||||||
|
do
|
||||||
|
case $file in
|
||||||
|
/*) pathcomp=/ ;;
|
||||||
|
*) pathcomp= ;;
|
||||||
|
esac
|
||||||
|
oIFS=$IFS
|
||||||
|
IFS=/
|
||||||
|
set fnord $file
|
||||||
|
shift
|
||||||
|
IFS=$oIFS
|
||||||
|
|
||||||
|
for d
|
||||||
|
do
|
||||||
|
test "x$d" = x && continue
|
||||||
|
|
||||||
|
pathcomp=$pathcomp$d
|
||||||
|
case $pathcomp in
|
||||||
|
-*) pathcomp=./$pathcomp ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test ! -d "$pathcomp"; then
|
||||||
|
echo "mkdir $pathcomp"
|
||||||
|
|
||||||
|
mkdir "$pathcomp" || lasterr=$?
|
||||||
|
|
||||||
|
if test ! -d "$pathcomp"; then
|
||||||
|
errstatus=$lasterr
|
||||||
|
else
|
||||||
|
if test ! -z "$dirmode"; then
|
||||||
|
echo "chmod $dirmode $pathcomp"
|
||||||
|
lasterr=
|
||||||
|
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||||
|
|
||||||
|
if test ! -z "$lasterr"; then
|
||||||
|
errstatus=$lasterr
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
pathcomp=$pathcomp/
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
exit $errstatus
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-end: "$"
|
||||||
|
# End:
|
@ -0,0 +1,371 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
# Check namespace cleanness of a library.
|
||||||
|
# Allowed symbols are passed as arguments.
|
||||||
|
# They may have trailing * = wildcard.
|
||||||
|
# Wildcards may be also specified as *::* (e.g. K*::* for all KDE classes)
|
||||||
|
# Symbols are listed as full function unmangled names without arguments,
|
||||||
|
# e.g. 'foo bar* nspace::*' allows foo(), foo(int), bar(), barbar()
|
||||||
|
# and all symbols in namespace/class nspace.
|
||||||
|
# If an argument has comma in it, it's a filename of a file containing
|
||||||
|
# allowed symbols, one per line.
|
||||||
|
|
||||||
|
|
||||||
|
$thisProg = "$0"; # This programs name
|
||||||
|
|
||||||
|
$library = "";
|
||||||
|
$allowed_symbols = "";
|
||||||
|
$debug = 0;
|
||||||
|
$allowed_weak = "";
|
||||||
|
$weak_specified = 0;
|
||||||
|
|
||||||
|
while( defined( $ARGV[ 0 ] ))
|
||||||
|
{
|
||||||
|
$_ = shift;
|
||||||
|
if( /^--verbose$|^-v$/ )
|
||||||
|
{
|
||||||
|
$debug = 1;
|
||||||
|
}
|
||||||
|
elsif( /^--help$|^-h$/ )
|
||||||
|
{
|
||||||
|
print STDOUT "Usage $thisProg [OPTION] ... library [allowed symbols] ...\n",
|
||||||
|
"\n",
|
||||||
|
"Check if the given library has only allowed public symbols.\n",
|
||||||
|
"\n",
|
||||||
|
" --allowweak=[symbol] allow only these weak symbols\n",
|
||||||
|
" -v, --verbose verbosely list files processed\n",
|
||||||
|
" -h, --help print this help, then exit\n";
|
||||||
|
exit 0;
|
||||||
|
}
|
||||||
|
elsif( /^--allowweak=(.*)$/ )
|
||||||
|
{
|
||||||
|
$allowed_weak .= " " . $1;
|
||||||
|
$weak_specified = 1;
|
||||||
|
}
|
||||||
|
elsif( /^--allowweak$/ ) # simply list all weak
|
||||||
|
{
|
||||||
|
$allowed_weak .= " ";
|
||||||
|
$weak_specified = 1;
|
||||||
|
}
|
||||||
|
elsif( /^--*/ )
|
||||||
|
{
|
||||||
|
die "Invalid argument!\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if( ! $library )
|
||||||
|
{
|
||||||
|
$library = $_;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$allowed_symbols .= " " . $_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( ! $weak_specified )
|
||||||
|
{
|
||||||
|
$allowed_weak = "*";
|
||||||
|
# allow all weak symbols by default
|
||||||
|
# instances of templates and similar stuff - unfortunately includes also things from other libraries,
|
||||||
|
# so it cannot be on by default
|
||||||
|
}
|
||||||
|
|
||||||
|
print STDERR "library:" . $library . "\n" if $debug;
|
||||||
|
print STDERR "allowed_symbols:" . $allowed_symbols . "\n" if $debug;
|
||||||
|
print STDERR "allowed_weak:" . $allowed_weak . "\n" if $debug;
|
||||||
|
|
||||||
|
$default_symbols = "_fini _init"; # system symbols
|
||||||
|
# on my system, every .so has :
|
||||||
|
# A _DYNAMIC
|
||||||
|
# A _GLOBAL_OFFSET_TABLE_
|
||||||
|
# A __bss_start
|
||||||
|
# A _edata
|
||||||
|
# A _end
|
||||||
|
# T _fini
|
||||||
|
# T _init
|
||||||
|
# no need to list A symbols in $default_symbols
|
||||||
|
|
||||||
|
print STDERR "default_symbols: " . $default_symbols . "\n" if $debug;
|
||||||
|
|
||||||
|
print STDOUT "Namespace cleanness check for " . $library . " :\n";
|
||||||
|
|
||||||
|
$lib_file = "";
|
||||||
|
if( $library =~ /\.la$/ )
|
||||||
|
{
|
||||||
|
# get the real library file from .la
|
||||||
|
open( FILEIN, $library ) || die "Couldn't open $! !\n";
|
||||||
|
while( $line = <FILEIN> )
|
||||||
|
{
|
||||||
|
if( $line =~ /library_names=\'([^ ]*).*/o )
|
||||||
|
{
|
||||||
|
$lib_file = $1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close( FILEIN );
|
||||||
|
if( ! $lib_file )
|
||||||
|
{
|
||||||
|
print STDERR "Library file not found in .la file!\n";
|
||||||
|
exit 1;
|
||||||
|
}
|
||||||
|
my $libpath = $library;
|
||||||
|
$libpath =~ s%[^/]*$%%;
|
||||||
|
if( -e $libpath . ".libs/" . $lib_file )
|
||||||
|
{
|
||||||
|
$lib_file = $libpath . ".libs/" . $lib_file;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$lib_file = $libpath . $lib_file;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$lib_file = $library;
|
||||||
|
}
|
||||||
|
|
||||||
|
print STDERR "libfile: ". $lib_file . "\n" if $debug;
|
||||||
|
|
||||||
|
$allowed_symbols .= " " . $default_symbols;
|
||||||
|
|
||||||
|
sub process_symbols($\@\%\@);
|
||||||
|
|
||||||
|
@wildcards = ();
|
||||||
|
%exacts = ();
|
||||||
|
@regwildcards = ();
|
||||||
|
process_symbols( $allowed_symbols, @wildcards, %exacts, @regwildcards );
|
||||||
|
@weak_wildcards = ();
|
||||||
|
%weak_exacts = ();
|
||||||
|
@weak_regwildcards = ();
|
||||||
|
process_symbols( $allowed_weak, @weak_wildcards, %weak_exacts, @weak_regwildcards );
|
||||||
|
|
||||||
|
# grep is for stripping not exported symbols, which don't have address (=first column)
|
||||||
|
$nm_command = "nm -BDCg " . $lib_file . " | grep -v '^ ' |";
|
||||||
|
|
||||||
|
# TODO how portable is this nmcheck stuff?
|
||||||
|
|
||||||
|
print STDERR "nm command:" . $nm_command . "\n" if $debug;
|
||||||
|
|
||||||
|
open( FILEIN, $nm_command ) || die "nm command failed\n";
|
||||||
|
|
||||||
|
my $exit_code = 0;
|
||||||
|
|
||||||
|
while( $line = <FILEIN> )
|
||||||
|
{
|
||||||
|
my $type;
|
||||||
|
my $symbol;
|
||||||
|
if( $line =~ /^[^ ]* (.) (.*)$/o )
|
||||||
|
{
|
||||||
|
$type = $1;
|
||||||
|
$symbol = $2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
die "Invalid line: " . $line . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
print STDERR "Type: " . $type . " , symbol: " . $symbol . "\n" if $debug;
|
||||||
|
if( $type eq "A" )
|
||||||
|
{ # these should be system symbols, so ignore them
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $orig_symbol = $symbol;
|
||||||
|
|
||||||
|
if( $symbol =~ /\(anonymous namespace\)/o )
|
||||||
|
{ # TODO tell to prefer named namespaces? (shorter symbols)
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# strip prefixes
|
||||||
|
# the :: appending is to make "CLASS::*" work also for "vtable for CLASS"
|
||||||
|
$symbol =~ s/^typeinfo for (.*)$/$1::/o;
|
||||||
|
$symbol =~ s/^typeinfo fn for (.*)$/$1::/o;
|
||||||
|
$symbol =~ s/^typeinfo name for (.*)$/$1::/o;
|
||||||
|
$symbol =~ s/^vtable for (.*)$/$1::/o;
|
||||||
|
$symbol =~ s/^guard variable for (.*)$/$1::/o;
|
||||||
|
$symbol =~ s/^reference temporary for (.*)$/$1::/o;
|
||||||
|
$symbol =~ s/^VTT for (.*)$/$1::/o;
|
||||||
|
$symbol =~ s/^virtual thunk \[[^\]]*\] to (.*)$/$1::/o;
|
||||||
|
$symbol =~ s/^non-virtual thunk \[[^\]]*\] to (.*)$/$1::/o;
|
||||||
|
$symbol =~ s/^covariant return thunk \[[^\]]*\] to (.*)$/$1::/o;
|
||||||
|
$symbol =~ s/^construction vtable thunk for (.*)$/$1::/o;
|
||||||
|
$symbol =~ s/^construction vtable for .*-in-(.*) [0-9]*$/$1::/o;
|
||||||
|
|
||||||
|
# templates seem to have also return types mangled in their name, and nm prints it too
|
||||||
|
# they have also template arguments in the symbol
|
||||||
|
# get rid of both of those
|
||||||
|
while( $symbol =~ /<.*>/o )
|
||||||
|
{
|
||||||
|
$symbol =~ s/<[^<>]*>//o; # strip innermost <>
|
||||||
|
}
|
||||||
|
if( $symbol !~ /operator\(\)/o )
|
||||||
|
{
|
||||||
|
$symbol =~ s/ ?\(.*\).*$//o; # strip () and all after it
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$symbol =~ s/(^|:| )operator\(\) ?\(.*\).*$//o; # strip () and all after it
|
||||||
|
}
|
||||||
|
$symbol =~ s/\[.*\] *$//o; # strip [in-charge] etc.
|
||||||
|
if( $symbol =~ /(^|:| )operator /o )
|
||||||
|
{
|
||||||
|
$symbol =~ s/.* ([^\s]*)operator /$1/o; # strip everything before 'X::operator blah'
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$symbol =~ s/.* ([^\s]+) *$/$1/o; # get last word (strip return type)
|
||||||
|
}
|
||||||
|
|
||||||
|
# print STDERR "Processed symbol: " . $symbol . "\n" if $debug;
|
||||||
|
|
||||||
|
my $found = 0;
|
||||||
|
if( $exacts{ $symbol } )
|
||||||
|
{
|
||||||
|
$found = 1;
|
||||||
|
}
|
||||||
|
if( ! $found )
|
||||||
|
{
|
||||||
|
for my $wild ( @wildcards )
|
||||||
|
{
|
||||||
|
if( index( $symbol, $wild ) == 0 )
|
||||||
|
{
|
||||||
|
$found = 1;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if( ! $found )
|
||||||
|
{
|
||||||
|
for my $wild ( @regwildcards )
|
||||||
|
{
|
||||||
|
if( $symbol =~ /^$wild$/ )
|
||||||
|
{
|
||||||
|
$found = 1;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if( ( ! $found ) && ( $type eq "W" || $type eq "V" ))
|
||||||
|
{
|
||||||
|
if( $weak_exacts{ $symbol } )
|
||||||
|
{
|
||||||
|
$found = 1;
|
||||||
|
}
|
||||||
|
if( ! $found )
|
||||||
|
{
|
||||||
|
for my $wild ( @weak_wildcards )
|
||||||
|
{
|
||||||
|
if( index( $symbol, $wild ) == 0 )
|
||||||
|
{
|
||||||
|
$found = 1;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if( ! $found )
|
||||||
|
{
|
||||||
|
for my $wild ( @weak_regwildcards )
|
||||||
|
{
|
||||||
|
if( $symbol =~ /^$wild$/ )
|
||||||
|
{
|
||||||
|
$found = 1;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( ! $found )
|
||||||
|
{
|
||||||
|
print STDERR "Public symbol " . $orig_symbol . " is not allowed!\n";
|
||||||
|
$exit_code = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
close( FILEIN );
|
||||||
|
|
||||||
|
print STDOUT $exit_code == 0 ? "OK\n" : "FAILED\n";
|
||||||
|
|
||||||
|
exit $exit_code;
|
||||||
|
|
||||||
|
sub process_symbols($\@\%\@)
|
||||||
|
{
|
||||||
|
my $allowed_symbols = $_[ 0 ];
|
||||||
|
my $wildcards_ref = $_[ 1 ];
|
||||||
|
my $exacts_ref = $_[ 2 ];
|
||||||
|
my $regwildcards_ref = $_[ 3 ];
|
||||||
|
|
||||||
|
$allowed_symbols =~ s/^ *//o; # strip whitespace
|
||||||
|
$allowed_symbols =~ s/ *$//o;
|
||||||
|
|
||||||
|
if( $allowed_symbols eq "NONE" )
|
||||||
|
{
|
||||||
|
$allowed_symbols = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
my @symbols1 = split( ' ', $allowed_symbols );
|
||||||
|
my $i = 0;
|
||||||
|
my @symbols2 = ();
|
||||||
|
while( defined( $symbols1[ $i ] ))
|
||||||
|
{
|
||||||
|
my $symbol = $symbols1[ $i ];
|
||||||
|
if( $symbol =~ /\./ ) # dot in name -> file
|
||||||
|
{
|
||||||
|
open( SYMIN, $symbol ) || die ( "Cannot open file " . $symbol . "!" );
|
||||||
|
while( $line = <SYMIN> )
|
||||||
|
{
|
||||||
|
$line =~ s/^\s*//o; # strip whitespace
|
||||||
|
$line =~ s/\s*$//o;
|
||||||
|
if( $line !~ /^$/o # empty line
|
||||||
|
&& $line !~ /^\s*#/ ) # comment line starting with #
|
||||||
|
{
|
||||||
|
$symbols2[ $#symbols2 + 1 ] = $line;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close( SYMIN );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$symbols2[ $#symbols2 + 1 ] = $symbol;
|
||||||
|
}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
$i = 0;
|
||||||
|
while( defined( $symbols2[ $i ] ))
|
||||||
|
{
|
||||||
|
my $symbol = $symbols2[ $i ];
|
||||||
|
if( $symbol =~ /__/
|
||||||
|
|| $symbol =~ /^_[A-Z]/ )
|
||||||
|
{ # ISO C++ 2.10.2
|
||||||
|
die "Symbols containing a double underscore or beginning with an underscore and an upper-case letter are reserved!\n";
|
||||||
|
}
|
||||||
|
elsif( $symbol eq "main"
|
||||||
|
|| $symbol eq "main*" )
|
||||||
|
{
|
||||||
|
die "Symbol main is not allowed!\n";
|
||||||
|
}
|
||||||
|
if( $symbol =~ /^([^\*]*)\*$/o # trailing * without any * before it
|
||||||
|
&& $symbol !~ /operator\*$/o )
|
||||||
|
{
|
||||||
|
print STDERR "wildcard:" . $symbol . "\n" if $debug;
|
||||||
|
$wildcards_ref->[ $#{$wildcards_ref} + 1 ] = $1;
|
||||||
|
}
|
||||||
|
elsif( $symbol =~ /\*$/o
|
||||||
|
&& ( $symbol =~ /\*::/o || $symbol =~ /::\*/o )
|
||||||
|
&& $symbol !~ /^\*/o
|
||||||
|
&& $symbol !~ /operator\*$/o )
|
||||||
|
{
|
||||||
|
print STDERR "regwildcard:" . $symbol . "\n" if $debug;
|
||||||
|
$symbol =~ s/\*/\.\*/go; # change * to .* (regexp)
|
||||||
|
$regwildcards_ref->[ $#{$regwildcards_ref} + 1 ] = $symbol;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print STDERR "exact:" . $symbol . "\n" if $debug;
|
||||||
|
$exacts_ref->{ $symbol } = 1;
|
||||||
|
}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,192 @@
|
|||||||
|
### -*- autoconf -*-
|
||||||
|
|
||||||
|
dnl This file is part of the KDE libraries/packages
|
||||||
|
dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
|
||||||
|
dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
|
||||||
|
|
||||||
|
dnl This file is free software; you can redistribute it and/or
|
||||||
|
dnl modify it under the terms of the GNU Library General Public
|
||||||
|
dnl License as published by the Free Software Foundation; either
|
||||||
|
dnl version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
dnl This library is distributed in the hope that it will be useful,
|
||||||
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
dnl Library General Public License for more details.
|
||||||
|
|
||||||
|
dnl You should have received a copy of the GNU Library General Public License
|
||||||
|
dnl along with this library; see the file COPYING.LIB. If not, write to
|
||||||
|
dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
dnl Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
AC_DEFUN([KDE_CHECK_MICO],
|
||||||
|
[
|
||||||
|
AC_REQUIRE([KDE_CHECK_LIBDL])
|
||||||
|
AC_REQUIRE([KDE_MISC_TESTS])
|
||||||
|
AC_MSG_CHECKING(for MICO)
|
||||||
|
|
||||||
|
if test -z "$MICODIR"; then
|
||||||
|
kde_micodir=/usr/local
|
||||||
|
else
|
||||||
|
kde_micodir="$MICODIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_ARG_WITH(micodir,
|
||||||
|
[ --with-micodir=micodir where mico is installed ],
|
||||||
|
kde_micodir=$withval,
|
||||||
|
kde_micodir=$kde_micodir
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_CACHE_VAL(kde_cv_mico_incdir,
|
||||||
|
[
|
||||||
|
mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
|
||||||
|
AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
|
||||||
|
|
||||||
|
])
|
||||||
|
kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
|
||||||
|
|
||||||
|
if test ! -r $kde_micodir/include/CORBA.h; then
|
||||||
|
AC_MSG_ERROR([No CORBA.h found, specify another micodir])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_RESULT($kde_micodir)
|
||||||
|
|
||||||
|
MICO_INCLUDES=-I$kde_micodir/include
|
||||||
|
AC_SUBST(MICO_INCLUDES)
|
||||||
|
MICO_LDFLAGS=-L$kde_micodir/lib
|
||||||
|
AC_SUBST(MICO_LDFLAGS)
|
||||||
|
micodir=$kde_micodir
|
||||||
|
AC_SUBST(micodir)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for MICO version])
|
||||||
|
AC_CACHE_VAL(kde_cv_mico_version,
|
||||||
|
[
|
||||||
|
AC_LANG_C
|
||||||
|
cat >conftest.$ac_ext <<EOF
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <mico/version.h>
|
||||||
|
int main() {
|
||||||
|
|
||||||
|
printf("MICO_VERSION=%s\n",MICO_VERSION);
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
|
||||||
|
if AC_TRY_EVAL(ac_compile); then
|
||||||
|
if eval `./conftest 2>&5`; then
|
||||||
|
kde_cv_mico_version=$MICO_VERSION
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([your system is not able to execute a small application to
|
||||||
|
find MICO version! Check $kde_micodir/include/mico/version.h])
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([your system is not able to compile a small application to
|
||||||
|
find MICO version! Check $kde_micodir/include/mico/version.h])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl installed MICO version
|
||||||
|
mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
|
||||||
|
mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
|
||||||
|
mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
|
||||||
|
|
||||||
|
if test "x$1" = "x"; then
|
||||||
|
req_version="2.3.0"
|
||||||
|
else
|
||||||
|
req_version=$1
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl required MICO version
|
||||||
|
req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
|
||||||
|
req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
|
||||||
|
req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
|
||||||
|
|
||||||
|
if test "$mico_v_maj" -lt "$req_v_maj" || \
|
||||||
|
( test "$mico_v_maj" -eq "$req_v_maj" && \
|
||||||
|
test "$mico_v_mid" -lt "$req_v_mid" ) || \
|
||||||
|
( test "$mico_v_mid" -eq "$req_v_mid" && \
|
||||||
|
test "$mico_v_min" -lt "$req_v_min" )
|
||||||
|
|
||||||
|
then
|
||||||
|
AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
|
||||||
|
at least is required. You should upgrade MICO.])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
|
||||||
|
fi
|
||||||
|
|
||||||
|
LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
|
||||||
|
AC_SUBST(LIBMICO)
|
||||||
|
if test -z "$IDL"; then
|
||||||
|
IDL='$(kde_bindir)/cuteidl'
|
||||||
|
fi
|
||||||
|
AC_SUBST(IDL)
|
||||||
|
IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
|
||||||
|
AC_SUBST(IDL_DEPENDENCIES)
|
||||||
|
|
||||||
|
idldir="\$(includedir)/idl"
|
||||||
|
AC_SUBST(idldir)
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([KDE_CHECK_MINI_STL],
|
||||||
|
[
|
||||||
|
AC_REQUIRE([KDE_CHECK_MICO])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(if we use mico's mini-STL)
|
||||||
|
AC_CACHE_VAL(kde_cv_have_mini_stl,
|
||||||
|
[
|
||||||
|
AC_LANG_SAVE
|
||||||
|
AC_LANG_CPLUSPLUS
|
||||||
|
kde_save_cxxflags="$CXXFLAGS"
|
||||||
|
CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
|
||||||
|
AC_TRY_COMPILE(
|
||||||
|
[
|
||||||
|
#include <mico/config.h>
|
||||||
|
],
|
||||||
|
[
|
||||||
|
#ifdef HAVE_MINI_STL
|
||||||
|
#error "nothing"
|
||||||
|
#endif
|
||||||
|
],
|
||||||
|
kde_cv_have_mini_stl=no,
|
||||||
|
kde_cv_have_mini_stl=yes)
|
||||||
|
CXXFLAGS="$kde_save_cxxflags"
|
||||||
|
AC_LANG_RESTORE
|
||||||
|
])
|
||||||
|
|
||||||
|
if test "x$kde_cv_have_mini_stl" = "xyes"; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
$1
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
$2
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([KDE_CHECK_ANSI],
|
||||||
|
[
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([KDE_CHECK_INSURE],
|
||||||
|
[
|
||||||
|
AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]],
|
||||||
|
[
|
||||||
|
if test $enableval = "no"; dnl
|
||||||
|
then ac_use_insure="no"
|
||||||
|
else ac_use_insure="yes"
|
||||||
|
fi
|
||||||
|
], [ac_use_insure="no"])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(if we will use Insure++ to debug)
|
||||||
|
AC_MSG_RESULT($ac_use_insure)
|
||||||
|
if test "$ac_use_insure" = "yes"; dnl
|
||||||
|
then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([KDE_CHECK_NEWLIBS],
|
||||||
|
[
|
||||||
|
|
||||||
|
])
|
@ -0,0 +1,57 @@
|
|||||||
|
|
||||||
|
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
|
||||||
|
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
|
||||||
|
dnl also defines GSTUFF_PKG_ERRORS on error
|
||||||
|
AC_DEFUN([PKG_CHECK_MODULES], [
|
||||||
|
succeeded=no
|
||||||
|
|
||||||
|
if test -z "$PKG_CONFIG"; then
|
||||||
|
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$PKG_CONFIG" = "no" ; then
|
||||||
|
echo "*** The pkg-config script could not be found. Make sure it is"
|
||||||
|
echo "*** in your path, or set the PKG_CONFIG environment variable"
|
||||||
|
echo "*** to the full path to pkg-config."
|
||||||
|
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
|
||||||
|
else
|
||||||
|
PKG_CONFIG_MIN_VERSION=0.9.0
|
||||||
|
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
|
||||||
|
AC_MSG_CHECKING(for $2)
|
||||||
|
|
||||||
|
if $PKG_CONFIG --exists "$2" ; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
succeeded=yes
|
||||||
|
|
||||||
|
AC_MSG_CHECKING($1_CFLAGS)
|
||||||
|
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
|
||||||
|
AC_MSG_RESULT($$1_CFLAGS)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING($1_LIBS)
|
||||||
|
$1_LIBS=`$PKG_CONFIG --libs "$2"`
|
||||||
|
AC_MSG_RESULT($$1_LIBS)
|
||||||
|
else
|
||||||
|
$1_CFLAGS=""
|
||||||
|
$1_LIBS=""
|
||||||
|
## If we have a custom action on failure, don't print errors, but
|
||||||
|
## do set a variable so people can do so.
|
||||||
|
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
|
||||||
|
ifelse([$4], ,echo $$1_PKG_ERRORS,)
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST($1_CFLAGS)
|
||||||
|
AC_SUBST($1_LIBS)
|
||||||
|
else
|
||||||
|
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
|
||||||
|
echo "*** See http://www.freedesktop.org/software/pkgconfig"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $succeeded = yes; then
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
else
|
||||||
|
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
|
@ -0,0 +1,223 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# ylwrap - wrapper for lex/yacc invocations.
|
||||||
|
|
||||||
|
scriptversion=2005-05-14.22
|
||||||
|
|
||||||
|
# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||||
|
#
|
||||||
|
# This program is free software; you can 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, 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, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
# 02110-1301, USA.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# This file is maintained in Automake, please report
|
||||||
|
# bugs to <bug-automake@gnu.org> or send patches to
|
||||||
|
# <automake-patches@gnu.org>.
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
'')
|
||||||
|
echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
--basedir)
|
||||||
|
basedir=$2
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
-h|--h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
|
||||||
|
|
||||||
|
Wrapper for lex/yacc invocations, renaming files as desired.
|
||||||
|
|
||||||
|
INPUT is the input file
|
||||||
|
OUTPUT is one file PROG generates
|
||||||
|
DESIRED is the file we actually want instead of OUTPUT
|
||||||
|
PROGRAM is program to run
|
||||||
|
ARGS are passed to PROG
|
||||||
|
|
||||||
|
Any number of OUTPUT,DESIRED pairs may be used.
|
||||||
|
|
||||||
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
EOF
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-v|--v*)
|
||||||
|
echo "ylwrap $scriptversion"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
# The input.
|
||||||
|
input="$1"
|
||||||
|
shift
|
||||||
|
case "$input" in
|
||||||
|
[\\/]* | ?:[\\/]*)
|
||||||
|
# Absolute path; do nothing.
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# Relative path. Make it absolute.
|
||||||
|
input="`pwd`/$input"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
pairlist=
|
||||||
|
while test "$#" -ne 0; do
|
||||||
|
if test "$1" = "--"; then
|
||||||
|
shift
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
pairlist="$pairlist $1"
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
# The program to run.
|
||||||
|
prog="$1"
|
||||||
|
shift
|
||||||
|
# Make any relative path in $prog absolute.
|
||||||
|
case "$prog" in
|
||||||
|
[\\/]* | ?:[\\/]*) ;;
|
||||||
|
*[\\/]*) prog="`pwd`/$prog" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# FIXME: add hostname here for parallel makes that run commands on
|
||||||
|
# other machines. But that might take us over the 14-char limit.
|
||||||
|
dirname=ylwrap$$
|
||||||
|
trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
|
||||||
|
mkdir $dirname || exit 1
|
||||||
|
|
||||||
|
cd $dirname
|
||||||
|
|
||||||
|
case $# in
|
||||||
|
0) $prog "$input" ;;
|
||||||
|
*) $prog "$@" "$input" ;;
|
||||||
|
esac
|
||||||
|
ret=$?
|
||||||
|
|
||||||
|
if test $ret -eq 0; then
|
||||||
|
set X $pairlist
|
||||||
|
shift
|
||||||
|
first=yes
|
||||||
|
# Since DOS filename conventions don't allow two dots,
|
||||||
|
# the DOS version of Bison writes out y_tab.c instead of y.tab.c
|
||||||
|
# and y_tab.h instead of y.tab.h. Test to see if this is the case.
|
||||||
|
y_tab_nodot="no"
|
||||||
|
if test -f y_tab.c || test -f y_tab.h; then
|
||||||
|
y_tab_nodot="yes"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# The directory holding the input.
|
||||||
|
input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
|
||||||
|
# Quote $INPUT_DIR so we can use it in a regexp.
|
||||||
|
# FIXME: really we should care about more than `.' and `\'.
|
||||||
|
input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
|
||||||
|
|
||||||
|
while test "$#" -ne 0; do
|
||||||
|
from="$1"
|
||||||
|
# Handle y_tab.c and y_tab.h output by DOS
|
||||||
|
if test $y_tab_nodot = "yes"; then
|
||||||
|
if test $from = "y.tab.c"; then
|
||||||
|
from="y_tab.c"
|
||||||
|
else
|
||||||
|
if test $from = "y.tab.h"; then
|
||||||
|
from="y_tab.h"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test -f "$from"; then
|
||||||
|
# If $2 is an absolute path name, then just use that,
|
||||||
|
# otherwise prepend `../'.
|
||||||
|
case "$2" in
|
||||||
|
[\\/]* | ?:[\\/]*) target="$2";;
|
||||||
|
*) target="../$2";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# We do not want to overwrite a header file if it hasn't
|
||||||
|
# changed. This avoid useless recompilations. However the
|
||||||
|
# parser itself (the first file) should always be updated,
|
||||||
|
# because it is the destination of the .y.c rule in the
|
||||||
|
# Makefile. Divert the output of all other files to a temporary
|
||||||
|
# file so we can compare them to existing versions.
|
||||||
|
if test $first = no; then
|
||||||
|
realtarget="$target"
|
||||||
|
target="tmp-`echo $target | sed s/.*[\\/]//g`"
|
||||||
|
fi
|
||||||
|
# Edit out `#line' or `#' directives.
|
||||||
|
#
|
||||||
|
# We don't want the resulting debug information to point at
|
||||||
|
# an absolute srcdir; it is better for it to just mention the
|
||||||
|
# .y file with no path.
|
||||||
|
#
|
||||||
|
# We want to use the real output file name, not yy.lex.c for
|
||||||
|
# instance.
|
||||||
|
#
|
||||||
|
# We want the include guards to be adjusted too.
|
||||||
|
FROM=`echo "$from" | sed \
|
||||||
|
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
|
||||||
|
-e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
|
||||||
|
TARGET=`echo "$2" | sed \
|
||||||
|
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
|
||||||
|
-e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
|
||||||
|
|
||||||
|
sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \
|
||||||
|
-e "s,$FROM,$TARGET," "$from" >"$target" || ret=$?
|
||||||
|
|
||||||
|
# Check whether header files must be updated.
|
||||||
|
if test $first = no; then
|
||||||
|
if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
|
||||||
|
echo "$2" is unchanged
|
||||||
|
rm -f "$target"
|
||||||
|
else
|
||||||
|
echo updating "$2"
|
||||||
|
mv -f "$target" "$realtarget"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# A missing file is only an error for the first file. This
|
||||||
|
# is a blatant hack to let us support using "yacc -d". If -d
|
||||||
|
# is not specified, we don't want an error when the header
|
||||||
|
# file is "missing".
|
||||||
|
if test $first = yes; then
|
||||||
|
ret=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
first=no
|
||||||
|
done
|
||||||
|
else
|
||||||
|
ret=$?
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove the directory.
|
||||||
|
cd ..
|
||||||
|
rm -rf $dirname
|
||||||
|
|
||||||
|
exit $ret
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-end: "$"
|
||||||
|
# End:
|
@ -0,0 +1,336 @@
|
|||||||
|
/* config.h.in. Generated from configure.in by autoheader. */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <Carbon/Carbon.h> header file. */
|
||||||
|
#undef HAVE_CARBON_CARBON_H
|
||||||
|
|
||||||
|
/* Define if you have the CoreAudio API */
|
||||||
|
#undef HAVE_COREAUDIO
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <crt_externs.h> header file. */
|
||||||
|
#undef HAVE_CRT_EXTERNS_H
|
||||||
|
|
||||||
|
/* Defines if your system has the crypt function */
|
||||||
|
#undef HAVE_CRYPT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||||
|
*/
|
||||||
|
#undef HAVE_DIRENT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
|
#undef HAVE_DLFCN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||||
|
#undef HAVE_FCNTL_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
/* Define if you have libjpeg */
|
||||||
|
#undef HAVE_LIBJPEG
|
||||||
|
|
||||||
|
/* Define if you have libpng */
|
||||||
|
#undef HAVE_LIBPNG
|
||||||
|
|
||||||
|
/* Define if you have a working libpthread (will enable threaded code) */
|
||||||
|
#undef HAVE_LIBPTHREAD
|
||||||
|
|
||||||
|
/* Define if you have libz */
|
||||||
|
#undef HAVE_LIBZ
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define if you have mkstemps */
|
||||||
|
#undef HAVE_MKSTEMPS
|
||||||
|
|
||||||
|
/* Define if you have the mkstemps prototype */
|
||||||
|
#undef HAVE_MKSTEMPS_PROTO
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||||
|
#undef HAVE_NDIR_H
|
||||||
|
|
||||||
|
/* Define if your system needs _NSGetEnviron to set up the environment */
|
||||||
|
#undef HAVE_NSGETENVIRON
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <paths.h> header file. */
|
||||||
|
#undef HAVE_PATHS_H
|
||||||
|
|
||||||
|
/* Define if you have res_init */
|
||||||
|
#undef HAVE_RES_INIT
|
||||||
|
|
||||||
|
/* Define if you have the res_init prototype */
|
||||||
|
#undef HAVE_RES_INIT_PROTO
|
||||||
|
|
||||||
|
/* Define if you have setenv */
|
||||||
|
#undef HAVE_SETENV
|
||||||
|
|
||||||
|
/* Define if you have the setenv prototype */
|
||||||
|
#undef HAVE_SETENV_PROTO
|
||||||
|
|
||||||
|
/* Define if you have a STL implementation by SGI */
|
||||||
|
#undef HAVE_SGI_STL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `snprintf' function. */
|
||||||
|
#undef HAVE_SNPRINTF
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#undef HAVE_STDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#undef HAVE_STRINGS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#undef HAVE_STRING_H
|
||||||
|
|
||||||
|
/* Define if you have strlcat */
|
||||||
|
#undef HAVE_STRLCAT
|
||||||
|
|
||||||
|
/* Define if you have the strlcat prototype */
|
||||||
|
#undef HAVE_STRLCAT_PROTO
|
||||||
|
|
||||||
|
/* Define if you have strlcpy */
|
||||||
|
#undef HAVE_STRLCPY
|
||||||
|
|
||||||
|
/* Define if you have the strlcpy prototype */
|
||||||
|
#undef HAVE_STRLCPY_PROTO
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/bitypes.h> header file. */
|
||||||
|
#undef HAVE_SYS_BITYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
||||||
|
*/
|
||||||
|
#undef HAVE_SYS_DIR_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
||||||
|
*/
|
||||||
|
#undef HAVE_SYS_NDIR_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#undef HAVE_SYS_STAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||||
|
#undef HAVE_SYS_TIME_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#undef HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
|
/* Define if you have unsetenv */
|
||||||
|
#undef HAVE_UNSETENV
|
||||||
|
|
||||||
|
/* Define if you have the unsetenv prototype */
|
||||||
|
#undef HAVE_UNSETENV_PROTO
|
||||||
|
|
||||||
|
/* Define if you have usleep */
|
||||||
|
#undef HAVE_USLEEP
|
||||||
|
|
||||||
|
/* Define if you have the usleep prototype */
|
||||||
|
#undef HAVE_USLEEP_PROTO
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `vsnprintf' function. */
|
||||||
|
#undef HAVE_VSNPRINTF
|
||||||
|
|
||||||
|
/* Suffix for lib directories */
|
||||||
|
#undef KDELIBSUFF
|
||||||
|
|
||||||
|
/* Name of package */
|
||||||
|
#undef PACKAGE
|
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#undef PACKAGE_BUGREPORT
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#undef PACKAGE_NAME
|
||||||
|
|
||||||
|
/* Define to the full name and version of this package. */
|
||||||
|
#undef PACKAGE_STRING
|
||||||
|
|
||||||
|
/* Define to the one symbol short name of this package. */
|
||||||
|
#undef PACKAGE_TARNAME
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
|
/* The size of `char *', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_CHAR_P
|
||||||
|
|
||||||
|
/* The size of `int', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_INT
|
||||||
|
|
||||||
|
/* The size of `long', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_LONG
|
||||||
|
|
||||||
|
/* The size of `short', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_SHORT
|
||||||
|
|
||||||
|
/* The size of `size_t', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_SIZE_T
|
||||||
|
|
||||||
|
/* The size of `unsigned long', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_UNSIGNED_LONG
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||||
|
#undef TIME_WITH_SYS_TIME
|
||||||
|
|
||||||
|
/* Version number of package */
|
||||||
|
#undef VERSION
|
||||||
|
|
||||||
|
/* Defined if compiling without arts */
|
||||||
|
#undef WITHOUT_ARTS
|
||||||
|
|
||||||
|
/*
|
||||||
|
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
|
||||||
|
* headers and I'm too lazy to write a configure test as long as only
|
||||||
|
* unixware is related
|
||||||
|
*/
|
||||||
|
#ifdef _UNIXWARE
|
||||||
|
#define HAVE_BOOLEAN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
|
||||||
|
* that defines bzero.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(_AIX)
|
||||||
|
#include <strings.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
|
||||||
|
# include <sys/time.h>
|
||||||
|
# include <crt_externs.h>
|
||||||
|
# define environ (*_NSGetEnviron())
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(HAVE_MKSTEMPS_PROTO)
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
int mkstemps(char *, int);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(HAVE_RES_INIT_PROTO)
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
int res_init(void);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(HAVE_SETENV_PROTO)
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
int setenv (const char *, const char *, int);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(HAVE_STRLCAT_PROTO)
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
unsigned long strlcat(char*, const char*, unsigned long);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(HAVE_STRLCPY_PROTO)
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
unsigned long strlcpy(char*, const char*, unsigned long);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(HAVE_UNSETENV_PROTO)
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
void unsetenv (const char *);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(HAVE_USLEEP_PROTO)
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
int usleep (unsigned int);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* On HP-UX, the declaration of vsnprintf() is needed every time !
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
|
||||||
|
#if __STDC__
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#else
|
||||||
|
#include <varargs.h>
|
||||||
|
#endif
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
#endif
|
||||||
|
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
#endif
|
||||||
|
int snprintf(char *str, size_t n, char const *fmt, ...);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__SVR4) && !defined(__svr4__)
|
||||||
|
#define __svr4__ 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* type to use in place of socklen_t if not defined */
|
||||||
|
#undef kde_socklen_t
|
||||||
|
|
||||||
|
/* type to use in place of socklen_t if not defined (deprecated, use
|
||||||
|
kde_socklen_t) */
|
||||||
|
#undef ksize_t
|
@ -0,0 +1,4 @@
|
|||||||
|
./admin/configure.in.min
|
||||||
|
configure.in.in
|
||||||
|
./kuickshow/configure.in.bot
|
||||||
|
./kuickshow/configure.in.in
|
@ -0,0 +1,220 @@
|
|||||||
|
dnl =======================================================
|
||||||
|
dnl FILE: ./admin/configure.in.min
|
||||||
|
dnl =======================================================
|
||||||
|
|
||||||
|
dnl This file is part of the KDE libraries/packages
|
||||||
|
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
|
||||||
|
|
||||||
|
dnl This file is free software; you can redistribute it and/or
|
||||||
|
dnl modify it under the terms of the GNU Library General Public
|
||||||
|
dnl License as published by the Free Software Foundation; either
|
||||||
|
dnl version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
dnl This library is distributed in the hope that it will be useful,
|
||||||
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
dnl Library General Public License for more details.
|
||||||
|
|
||||||
|
dnl You should have received a copy of the GNU Library General Public License
|
||||||
|
dnl along with this library; see the file COPYING.LIB. If not, write to
|
||||||
|
dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
dnl Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
# Original Author was Kalle@kde.org
|
||||||
|
# I lifted it in some mater. (Stephan Kulow)
|
||||||
|
# I used much code from Janos Farkas
|
||||||
|
|
||||||
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
|
AC_INIT(acinclude.m4) dnl a source file from your sub dir
|
||||||
|
|
||||||
|
dnl This is so we can use kde-common
|
||||||
|
AC_CONFIG_AUX_DIR(admin)
|
||||||
|
|
||||||
|
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
|
||||||
|
unset CDPATH
|
||||||
|
|
||||||
|
dnl Checking host/target/build systems, for make, install etc.
|
||||||
|
AC_CANONICAL_SYSTEM
|
||||||
|
dnl Perform program name transformation
|
||||||
|
AC_ARG_PROGRAM
|
||||||
|
|
||||||
|
dnl Automake doc recommends to do this only here. (Janos)
|
||||||
|
AM_INIT_AUTOMAKE(kuickshow, "3.5.8") dnl searches for some needed programs
|
||||||
|
|
||||||
|
KDE_SET_PREFIX
|
||||||
|
|
||||||
|
dnl generate the config header
|
||||||
|
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
|
||||||
|
|
||||||
|
dnl Checks for programs.
|
||||||
|
AC_CHECK_COMPILERS
|
||||||
|
AC_ENABLE_SHARED(yes)
|
||||||
|
AC_ENABLE_STATIC(no)
|
||||||
|
KDE_PROG_LIBTOOL
|
||||||
|
|
||||||
|
dnl for NLS support. Call them in this order!
|
||||||
|
dnl WITH_NLS is for the po files
|
||||||
|
AM_KDE_WITH_NLS
|
||||||
|
|
||||||
|
dnl KDE_USE_QT
|
||||||
|
AC_PATH_KDE
|
||||||
|
dnl =======================================================
|
||||||
|
dnl FILE: configure.in.in
|
||||||
|
dnl =======================================================
|
||||||
|
|
||||||
|
#MIN_CONFIG
|
||||||
|
DO_NOT_COMPILE="$DO_NOT_COMPILE"
|
||||||
|
|
||||||
|
dnl Checks for header files.
|
||||||
|
AC_HEADER_DIRENT
|
||||||
|
AC_HEADER_STDC
|
||||||
|
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h stdlib.h paths.h)
|
||||||
|
AC_CHECK_SETENV
|
||||||
|
AC_CHECK_UNSETENV
|
||||||
|
AC_CHECK_USLEEP
|
||||||
|
AC_CHECK_MKSTEMPS
|
||||||
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_HEADER_TIME
|
||||||
|
|
||||||
|
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
|
||||||
|
|
||||||
|
KDE_INIT_DOXYGEN([KDE Graphics API Reference], [Version $VERSION])
|
||||||
|
dnl =======================================================
|
||||||
|
dnl FILE: ./kuickshow/configure.in.in
|
||||||
|
dnl =======================================================
|
||||||
|
|
||||||
|
#MIN_CONFIG
|
||||||
|
|
||||||
|
#dnl PACKAGE set before
|
||||||
|
|
||||||
|
# my own additions to KDE's version
|
||||||
|
#
|
||||||
|
# checking for Imlib...
|
||||||
|
|
||||||
|
AC_DEFUN([KDE_FIND_IMLIB_CONFIG],
|
||||||
|
[AC_MSG_CHECKING([for imlib-config])
|
||||||
|
|
||||||
|
imlib_config_given=NO
|
||||||
|
ac_imlib_config=""
|
||||||
|
|
||||||
|
AC_ARG_WITH(imlib-config,
|
||||||
|
AC_HELP_STRING([--with-imlib-config=DIR],[directory where "imlib-config" is located]),
|
||||||
|
[ ac_imlib_config="$withval/imlib-config"
|
||||||
|
imlib_config_given=yes
|
||||||
|
])
|
||||||
|
|
||||||
|
if test "$imlib_config_given" = "yes"; then
|
||||||
|
if test ! -r $ac_imlib_config; then
|
||||||
|
AC_MSG_RESULT(wrong file specified)
|
||||||
|
ac_imlib_config=""
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT($ac_imlib_config)
|
||||||
|
LIB_IMLIB=`$ac_imlib_config --libs`
|
||||||
|
AC_SUBST(LIB_IMLIB)
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
ac_imlib_config=`which imlib-config 2>/dev/null`
|
||||||
|
if test -z "$ac_imlib_config"; then
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
else
|
||||||
|
dummy=`echo "$ac_imlib_config" | grep '/imlib-config'`
|
||||||
|
if test -z "$dummy"; then
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
ac_imlib_config=""
|
||||||
|
else
|
||||||
|
LIB_IMLIB=`$ac_imlib_config --libs`
|
||||||
|
IMLIB_CFLAGS=`$ac_imlib_config --cflags`
|
||||||
|
imlib_config=`echo "$LIB_IMLIB" | grep lImlib`
|
||||||
|
if test -z "$imlib_config"; then
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
ac_imlib_config=""
|
||||||
|
else
|
||||||
|
AC_SUBST(LIB_IMLIB)
|
||||||
|
AC_SUBST(IMLIB_CFLAGS)
|
||||||
|
AC_MSG_RESULT($ac_imlib_config)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl #### now some kuickshow stuff ###
|
||||||
|
dnl Check if Imlib is installed properly
|
||||||
|
KDE_PKG_CHECK_MODULES(IMLIB, imlib >= 1.9.10,
|
||||||
|
LIB_IMLIB=$IMLIB_LIBS
|
||||||
|
AC_SUBST(LIB_IMLIB)
|
||||||
|
,
|
||||||
|
KDE_FIND_IMLIB_CONFIG
|
||||||
|
)
|
||||||
|
|
||||||
|
if test -z "$LIB_IMLIB"; then
|
||||||
|
dnl AC_MSG_ERROR([You need to install Imlib 1.x, e.g. http://freshmeat.net/redir/imlib/4385/url_tgz/imlib-1.9.10.tar.gz if your distributor doesn't have a package])
|
||||||
|
DO_NOT_COMPILE="$DO_NOT_COMPILE kuickshow"
|
||||||
|
fi
|
||||||
|
KDE_CREATE_SUBDIRSLIST
|
||||||
|
AM_CONDITIONAL(doc_SUBDIR_included, test "x$doc_SUBDIR_included" = xyes)
|
||||||
|
AM_CONDITIONAL(kuickshow_SUBDIR_included, test "x$kuickshow_SUBDIR_included" = xyes)
|
||||||
|
AC_CONFIG_FILES([ Makefile ])
|
||||||
|
AC_CONFIG_FILES([ doc/Makefile ])
|
||||||
|
AC_CONFIG_FILES([ doc/kuickshow/Makefile ])
|
||||||
|
AC_CONFIG_FILES([ kuickshow/Makefile ])
|
||||||
|
AC_CONFIG_FILES([ kuickshow/misc/Makefile ])
|
||||||
|
AC_CONFIG_FILES([ kuickshow/pics/Makefile ])
|
||||||
|
AC_CONFIG_FILES([ kuickshow/src/Makefile ])
|
||||||
|
AC_OUTPUT
|
||||||
|
if test -z "$LIB_IMLIB"; then
|
||||||
|
echo ""
|
||||||
|
echo "You're missing Imlib 1.x. The graphics browser/viewer KuickShow"
|
||||||
|
echo "won't be compiled without Imlib."
|
||||||
|
echo "You can download it from"
|
||||||
|
echo "http://freshmeat.net/redir/imlib/4385/url_tgz/imlib-1.9.10.tar.gz"
|
||||||
|
echo ""
|
||||||
|
all_tests=bad
|
||||||
|
fi
|
||||||
|
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
|
||||||
|
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
|
||||||
|
# And if so, warn when they don't match
|
||||||
|
if test "$kde_libs_prefix" != "$given_prefix"; then
|
||||||
|
# And if kde doesn't know about the prefix yet
|
||||||
|
echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
|
||||||
|
if test $? -ne 0; then
|
||||||
|
echo ""
|
||||||
|
echo "Warning: you chose to install this package in $given_prefix,"
|
||||||
|
echo "but KDE was found in $kde_libs_prefix."
|
||||||
|
echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
|
||||||
|
echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
|
||||||
|
echo "Then restart KDE."
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then
|
||||||
|
echo ""
|
||||||
|
echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility"
|
||||||
|
echo "was not included. Therefore, GCC symbol visibility support remains disabled."
|
||||||
|
echo ""
|
||||||
|
echo "For better performance, consider including the Qt visibility supporting patch"
|
||||||
|
echo "located at:"
|
||||||
|
echo ""
|
||||||
|
echo "http://bugs.kde.org/show_bug.cgi?id=109386"
|
||||||
|
echo ""
|
||||||
|
echo "and recompile all of Qt and KDE. Note, this is entirely optional and"
|
||||||
|
echo "everything will continue to work just fine without it."
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$all_tests" = "bad"; then
|
||||||
|
if test ! "$cache_file" = "/dev/null"; then
|
||||||
|
echo ""
|
||||||
|
echo "Please remove the file $cache_file after changing your setup"
|
||||||
|
echo "so that configure will find the changes next time."
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "Good - your configure finished. Start make now"
|
||||||
|
echo ""
|
||||||
|
fi
|
@ -0,0 +1,17 @@
|
|||||||
|
#MIN_CONFIG
|
||||||
|
DO_NOT_COMPILE="$DO_NOT_COMPILE"
|
||||||
|
|
||||||
|
dnl Checks for header files.
|
||||||
|
AC_HEADER_DIRENT
|
||||||
|
AC_HEADER_STDC
|
||||||
|
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h stdlib.h paths.h)
|
||||||
|
AC_CHECK_SETENV
|
||||||
|
AC_CHECK_UNSETENV
|
||||||
|
AC_CHECK_USLEEP
|
||||||
|
AC_CHECK_MKSTEMPS
|
||||||
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_HEADER_TIME
|
||||||
|
|
||||||
|
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
|
||||||
|
|
||||||
|
KDE_INIT_DOXYGEN([KDE Graphics API Reference], [Version $VERSION])
|
@ -0,0 +1,108 @@
|
|||||||
|
ifndef _cdbs_bootstrap
|
||||||
|
_cdbs_scripts_path ?= /usr/lib/cdbs
|
||||||
|
_cdbs_rules_path ?= /usr/share/cdbs/1/rules
|
||||||
|
_cdbs_class_path ?= /usr/share/cdbs/1/class
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef _cdbs_class_debian-qt-kde
|
||||||
|
_cdbs_class_debian-qt-kde := 1
|
||||||
|
|
||||||
|
# Note: This _must_ be included before autotools.mk, or it won't work.
|
||||||
|
common-configure-arch common-configure-indep:: debian/stamp-cvs-make
|
||||||
|
debian/stamp-cvs-make:
|
||||||
|
if test -n "$(DEB_KDE_CVS_MAKE)" -a ! -f configure; then \
|
||||||
|
$(MAKE) -C $(DEB_SRCDIR) -f admin/Makefile.common dist; \
|
||||||
|
fi
|
||||||
|
touch debian/stamp-cvs-make
|
||||||
|
|
||||||
|
include /usr/share/cdbs/1/class/kde.mk$(_cdbs_makefile_suffix)
|
||||||
|
|
||||||
|
DEB_PATCHDIRS := debian/patches/common debian/patches
|
||||||
|
|
||||||
|
DEB_KDE_ENABLE_FINAL := yes
|
||||||
|
DEB_INSTALL_DOCS_ALL :=
|
||||||
|
|
||||||
|
DEB_DH_MAKESHLIBS_ARGS_ALL := -V
|
||||||
|
DEB_SHLIBDEPS_INCLUDE = $(foreach p,$(PACKAGES_WITH_LIBS),debian/$(p)/usr/lib)
|
||||||
|
|
||||||
|
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||||
|
cdbs_treat_me_gently_arches := arm m68k alpha ppc64
|
||||||
|
ifeq (,$(filter $(DEB_HOST_ARCH_CPU),$(cdbs_treat_me_gently_arches)))
|
||||||
|
cdbs_kde_enable_final = $(if $(DEB_KDE_ENABLE_FINAL),--enable-final,)
|
||||||
|
else
|
||||||
|
cdbs_kde_enable_final =
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
common-build-arch:: debian/stamp-man-pages
|
||||||
|
debian/stamp-man-pages:
|
||||||
|
if ! test -d debian/man/out; then mkdir -p debian/man/out; fi
|
||||||
|
for f in $$(find debian/man -name '*.sgml'); do \
|
||||||
|
docbook-to-man $$f > debian/man/out/`basename $$f .sgml`.1; \
|
||||||
|
done
|
||||||
|
for f in $$(find debian/man -name '*.man'); do \
|
||||||
|
soelim -I debian/man $$f \
|
||||||
|
> debian/man/out/`basename $$f .man`.`head -n1 $$f | awk '{print $$NF}'`; \
|
||||||
|
done
|
||||||
|
touch debian/stamp-man-pages
|
||||||
|
|
||||||
|
common-binary-indep::
|
||||||
|
( set -e; \
|
||||||
|
tmpf=`mktemp debian/versions.XXXXXX`; \
|
||||||
|
perl debian/cdbs/versions.pl >$$tmpf; \
|
||||||
|
for p in $(DEB_INDEP_PACKAGES); do \
|
||||||
|
cat $$tmpf >>debian/$$p.substvars; \
|
||||||
|
done; \
|
||||||
|
rm -f $$tmpf )
|
||||||
|
|
||||||
|
common-binary-arch::
|
||||||
|
( set -e; \
|
||||||
|
tmpf=`mktemp debian/versions.XXXXXX`; \
|
||||||
|
perl debian/cdbs/versions.pl >$$tmpf; \
|
||||||
|
for p in $(DEB_ARCH_PACKAGES); do \
|
||||||
|
cat $$tmpf >>debian/$$p.substvars; \
|
||||||
|
done; \
|
||||||
|
rm -f $$tmpf )
|
||||||
|
|
||||||
|
clean::
|
||||||
|
rm -rf debian/man/out
|
||||||
|
-rmdir debian/man
|
||||||
|
rm -f debian/stamp-man-pages
|
||||||
|
rm -rf debian/shlibs-check
|
||||||
|
|
||||||
|
$(patsubst %,binary-install/%,$(DEB_PACKAGES)) :: binary-install/%:
|
||||||
|
if test -x /usr/bin/dh_desktop; then dh_desktop -p$(cdbs_curpkg) $(DEB_DH_DESKTOP_ARGS); fi
|
||||||
|
if test -e debian/$(cdbs_curpkg).lintian; then \
|
||||||
|
install -p -D -m644 debian/$(cdbs_curpkg).lintian \
|
||||||
|
debian/$(cdbs_curpkg)/usr/share/lintian/overrides/$(cdbs_curpkg); \
|
||||||
|
fi
|
||||||
|
if test -e debian/$(cdbs_curpkg).presubj; then \
|
||||||
|
install -p -D -m644 debian/$(cdbs_curpkg).presubj \
|
||||||
|
debian/$(cdbs_curpkg)/usr/share/bug/$(cdbs_curpkg)/presubj; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
binary-install/$(DEB_SOURCE_PACKAGE)-doc-html::
|
||||||
|
set -e; \
|
||||||
|
for doc in `cd $(DEB_DESTDIR)/usr/share/doc/kde/HTML/en; find . -name index.docbook`; do \
|
||||||
|
pkg=$${doc%/index.docbook}; pkg=$${pkg#./}; \
|
||||||
|
echo Building $$pkg HTML docs...; \
|
||||||
|
mkdir -p $(CURDIR)/debian/$(DEB_SOURCE_PACKAGE)-doc-html/usr/share/doc/kde/HTML/en/$$pkg; \
|
||||||
|
cd $(CURDIR)/debian/$(DEB_SOURCE_PACKAGE)-doc-html/usr/share/doc/kde/HTML/en/$$pkg; \
|
||||||
|
/usr/kde3/bin/meinproc $(DEB_DESTDIR)/usr/share/doc/kde/HTML/en/$$pkg/index.docbook; \
|
||||||
|
done
|
||||||
|
for pkg in $(DOC_HTML_PRUNE) ; do \
|
||||||
|
rm -rf debian/$(DEB_SOURCE_PACKAGE)-doc-html/usr/share/doc/kde/HTML/en/$$pkg; \
|
||||||
|
done
|
||||||
|
|
||||||
|
clean::
|
||||||
|
if test -n "$(DEB_KDE_CVS_MAKE)" && test -d $(DEB_SRCDIR); then \
|
||||||
|
cd $(DEB_SRCDIR); \
|
||||||
|
find . -name Makefile.in -print | \
|
||||||
|
xargs --no-run-if-empty rm -f; \
|
||||||
|
rm -f Makefile.am acinclude.m4 aclocal.m4 config.h.in \
|
||||||
|
configure configure.files configure.in stamp-h.in \
|
||||||
|
subdirs; \
|
||||||
|
fi
|
||||||
|
rm -f debian/stamp-cvs-make
|
||||||
|
|
||||||
|
endif
|
@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
|
||||||
|
my ($version3, $version3_next);
|
||||||
|
my ($version2, $version2_next);
|
||||||
|
|
||||||
|
($version3 = $version) =~ s/-[^-]+$//;
|
||||||
|
($version2 = $version3) =~ s/\.[^.]+$//;
|
||||||
|
|
||||||
|
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
|
||||||
|
($version2_next = $version2) =~ s/(?<=\.)(\d+)$/($1+1)/e;
|
||||||
|
|
||||||
|
print "KDE-Version3=$version3\n";
|
||||||
|
print "KDE-Version2=$version2\n";
|
||||||
|
print "KDE-Next-Version3=$version3_next\n";
|
||||||
|
print "KDE-Next-Version2=$version2_next\n";
|
@ -0,0 +1,42 @@
|
|||||||
|
kuickshow-kde3 (4:3.5.8-0ubuntu3) karmic; urgency=low
|
||||||
|
|
||||||
|
* Karmic rebuild
|
||||||
|
|
||||||
|
-- Timothy Pearson <kb9vqf@pearsoncomputing.net> Thu, 02 July 2009 16:08:00 -0600
|
||||||
|
|
||||||
|
kuickshow-kde3 (4:3.5.8-0ubuntu2) intrepid; urgency=low
|
||||||
|
|
||||||
|
* Moved KDE3 to /opt/kde3
|
||||||
|
* Integrated properly with KDE4.2+
|
||||||
|
|
||||||
|
-- Timothy Pearson <kb9vqf@pearsoncomputing.net> Fri, 06 March 2009 01:35:00 -0600
|
||||||
|
|
||||||
|
kuickshow-kde3 (4:3.5.8-0ubuntu1) intrepid; urgency=low
|
||||||
|
|
||||||
|
* Added -kde3 suffix
|
||||||
|
|
||||||
|
-- Timothy Pearson <kb9vqf@pearsoncomputing.net> Fri, 12 Dec 2008 14:28:00 -0600
|
||||||
|
|
||||||
|
kuickshow (4:3.5.8-0ubuntu2) hardy; urgency=low
|
||||||
|
|
||||||
|
* No change recompile to build against libgif (not libungif)
|
||||||
|
|
||||||
|
-- Jonathan Riddell <jriddell@ubuntu.com> Mon, 07 Jan 2008 10:26:21 +0000
|
||||||
|
|
||||||
|
kuickshow (4:3.5.8-0ubuntu1) hardy; urgency=low
|
||||||
|
|
||||||
|
* New upstream release, extracted from kdegraphics 3.5.8
|
||||||
|
|
||||||
|
-- Jonathan Riddell <jriddell@ubuntu.com> Wed, 14 Nov 2007 17:59:49 +0000
|
||||||
|
|
||||||
|
kuickshow (4:3.5.7-0ubuntu1) gutsy; urgency=low
|
||||||
|
|
||||||
|
* New upstream release, extracted from kdegraphics 3.5.7
|
||||||
|
|
||||||
|
-- Jonathan Riddell <jriddell@ubuntu.com> Sun, 03 Jun 2007 14:45:49 +0100
|
||||||
|
|
||||||
|
kuickshow (4:3.5.6-0ubuntu1) feisty; urgency=low
|
||||||
|
|
||||||
|
* Initial package, separate from kdegraphics due to imlib11 not being in main
|
||||||
|
|
||||||
|
-- Jonathan Riddell <jriddell@ubuntu.com> Wed, 28 Feb 2007 16:29:08 +0000
|
@ -0,0 +1 @@
|
|||||||
|
5
|
@ -0,0 +1,24 @@
|
|||||||
|
Source: kuickshow-kde3
|
||||||
|
Section: kde
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: Timothy Pearson <kb9vqf@pearsoncomputing.net>
|
||||||
|
Build-Depends: cdbs (>= 0.4.39-0.1), debhelper (>= 5.0.31), autotools-dev, gawk, kdelibs4-kde3-dev (>= 4:3.5.6), imlib11-dev
|
||||||
|
Standards-Version: 3.7.2
|
||||||
|
|
||||||
|
Package: kuickshow-kde3
|
||||||
|
Section: graphics
|
||||||
|
Architecture: any
|
||||||
|
Depends: ${shlibs:Depends}
|
||||||
|
Suggests: khelpcenter-kde3
|
||||||
|
Description: KDE image/slideshow viewer [KDE3]
|
||||||
|
KuickShow is an image browser/viewer with a nice filebrowser to
|
||||||
|
select images to be shown, slideshow support and the ability to
|
||||||
|
display the following image formats: jpg, gif, tiff, png, bmp, psd,
|
||||||
|
xpm, xbm, pbm and eim. Images can be displayed either in their own
|
||||||
|
window, as large as the image, or fullscreen (which shrinks images too
|
||||||
|
large to display). KuickShow also has a slideshow mode.
|
||||||
|
.
|
||||||
|
This package is part of KDE, as a component of the KDE graphics
|
||||||
|
module. See the 'kde' and 'kdegraphics' packages for more information.
|
||||||
|
.
|
||||||
|
Homepage: http://kuickshow.sourceforge.net
|
@ -0,0 +1,424 @@
|
|||||||
|
This package was debianized by Christopher L Cheney <ccheney@debian.org> on
|
||||||
|
Tue, 16 Apr 2002 22:00:00 -0500.
|
||||||
|
|
||||||
|
It was downloaded from: http://www.kde.org/download
|
||||||
|
|
||||||
|
Upstream Authors: Stephan Kulow <coolo@kde.org> and many others.
|
||||||
|
|
||||||
|
|
||||||
|
License:
|
||||||
|
|
||||||
|
All programs are under the GPL. On Debian systems, the complete text of
|
||||||
|
the GPL license can be found in the /usr/share/common-licenses/GPL file.
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
DocBook Documentation:
|
||||||
|
|
||||||
|
Permission is granted to copy, distribute and/or modify this
|
||||||
|
document under the terms of the GNU Free Documentation License,
|
||||||
|
Version 1.1 or any later version published by the Free Software
|
||||||
|
Foundation; with no Invariant Sections, with no Front-Cover Texts,
|
||||||
|
and with no Back-Cover Texts.
|
||||||
|
|
||||||
|
A copy of the GNU Free Documentation License (Version 1.2) is
|
||||||
|
included below.
|
||||||
|
|
||||||
|
|
||||||
|
GNU Free Documentation License
|
||||||
|
Version 1.2, November 2002
|
||||||
|
|
||||||
|
|
||||||
|
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
|
||||||
|
51 Franklin St, Fifth Floor, Boston, MA, 02110-1301, USA.
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
||||||
|
0. PREAMBLE
|
||||||
|
|
||||||
|
The purpose of this License is to make a manual, textbook, or other
|
||||||
|
functional and useful document "free" in the sense of freedom: to
|
||||||
|
assure everyone the effective freedom to copy and redistribute it,
|
||||||
|
with or without modifying it, either commercially or noncommercially.
|
||||||
|
Secondarily, this License preserves for the author and publisher a way
|
||||||
|
to get credit for their work, while not being considered responsible
|
||||||
|
for modifications made by others.
|
||||||
|
|
||||||
|
This License is a kind of "copyleft", which means that derivative
|
||||||
|
works of the document must themselves be free in the same sense. It
|
||||||
|
complements the GNU General Public License, which is a copyleft
|
||||||
|
license designed for free software.
|
||||||
|
|
||||||
|
We have designed this License in order to use it for manuals for free
|
||||||
|
software, because free software needs free documentation: a free
|
||||||
|
program should come with manuals providing the same freedoms that the
|
||||||
|
software does. But this License is not limited to software manuals;
|
||||||
|
it can be used for any textual work, regardless of subject matter or
|
||||||
|
whether it is published as a printed book. We recommend this License
|
||||||
|
principally for works whose purpose is instruction or reference.
|
||||||
|
|
||||||
|
|
||||||
|
1. APPLICABILITY AND DEFINITIONS
|
||||||
|
|
||||||
|
This License applies to any manual or other work, in any medium, that
|
||||||
|
contains a notice placed by the copyright holder saying it can be
|
||||||
|
distributed under the terms of this License. Such a notice grants a
|
||||||
|
world-wide, royalty-free license, unlimited in duration, to use that
|
||||||
|
work under the conditions stated herein. The "Document", below,
|
||||||
|
refers to any such manual or work. Any member of the public is a
|
||||||
|
licensee, and is addressed as "you". You accept the license if you
|
||||||
|
copy, modify or distribute the work in a way requiring permission
|
||||||
|
under copyright law.
|
||||||
|
|
||||||
|
A "Modified Version" of the Document means any work containing the
|
||||||
|
Document or a portion of it, either copied verbatim, or with
|
||||||
|
modifications and/or translated into another language.
|
||||||
|
|
||||||
|
A "Secondary Section" is a named appendix or a front-matter section of
|
||||||
|
the Document that deals exclusively with the relationship of the
|
||||||
|
publishers or authors of the Document to the Document's overall subject
|
||||||
|
(or to related matters) and contains nothing that could fall directly
|
||||||
|
within that overall subject. (Thus, if the Document is in part a
|
||||||
|
textbook of mathematics, a Secondary Section may not explain any
|
||||||
|
mathematics.) The relationship could be a matter of historical
|
||||||
|
connection with the subject or with related matters, or of legal,
|
||||||
|
commercial, philosophical, ethical or political position regarding
|
||||||
|
them.
|
||||||
|
|
||||||
|
The "Invariant Sections" are certain Secondary Sections whose titles
|
||||||
|
are designated, as being those of Invariant Sections, in the notice
|
||||||
|
that says that the Document is released under this License. If a
|
||||||
|
section does not fit the above definition of Secondary then it is not
|
||||||
|
allowed to be designated as Invariant. The Document may contain zero
|
||||||
|
Invariant Sections. If the Document does not identify any Invariant
|
||||||
|
Sections then there are none.
|
||||||
|
|
||||||
|
The "Cover Texts" are certain short passages of text that are listed,
|
||||||
|
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
||||||
|
the Document is released under this License. A Front-Cover Text may
|
||||||
|
be at most 5 words, and a Back-Cover Text may be at most 25 words.
|
||||||
|
|
||||||
|
A "Transparent" copy of the Document means a machine-readable copy,
|
||||||
|
represented in a format whose specification is available to the
|
||||||
|
general public, that is suitable for revising the document
|
||||||
|
straightforwardly with generic text editors or (for images composed of
|
||||||
|
pixels) generic paint programs or (for drawings) some widely available
|
||||||
|
drawing editor, and that is suitable for input to text formatters or
|
||||||
|
for automatic translation to a variety of formats suitable for input
|
||||||
|
to text formatters. A copy made in an otherwise Transparent file
|
||||||
|
format whose markup, or absence of markup, has been arranged to thwart
|
||||||
|
or discourage subsequent modification by readers is not Transparent.
|
||||||
|
An image format is not Transparent if used for any substantial amount
|
||||||
|
of text. A copy that is not "Transparent" is called "Opaque".
|
||||||
|
|
||||||
|
Examples of suitable formats for Transparent copies include plain
|
||||||
|
ASCII without markup, Texinfo input format, LaTeX input format, SGML
|
||||||
|
or XML using a publicly available DTD, and standard-conforming simple
|
||||||
|
HTML, PostScript or PDF designed for human modification. Examples of
|
||||||
|
transparent image formats include PNG, XCF and JPG. Opaque formats
|
||||||
|
include proprietary formats that can be read and edited only by
|
||||||
|
proprietary word processors, SGML or XML for which the DTD and/or
|
||||||
|
processing tools are not generally available, and the
|
||||||
|
machine-generated HTML, PostScript or PDF produced by some word
|
||||||
|
processors for output purposes only.
|
||||||
|
|
||||||
|
The "Title Page" means, for a printed book, the title page itself,
|
||||||
|
plus such following pages as are needed to hold, legibly, the material
|
||||||
|
this License requires to appear in the title page. For works in
|
||||||
|
formats which do not have any title page as such, "Title Page" means
|
||||||
|
the text near the most prominent appearance of the work's title,
|
||||||
|
preceding the beginning of the body of the text.
|
||||||
|
|
||||||
|
A section "Entitled XYZ" means a named subunit of the Document whose
|
||||||
|
title either is precisely XYZ or contains XYZ in parentheses following
|
||||||
|
text that translates XYZ in another language. (Here XYZ stands for a
|
||||||
|
specific section name mentioned below, such as "Acknowledgements",
|
||||||
|
"Dedications", "Endorsements", or "History".) To "Preserve the Title"
|
||||||
|
of such a section when you modify the Document means that it remains a
|
||||||
|
section "Entitled XYZ" according to this definition.
|
||||||
|
|
||||||
|
The Document may include Warranty Disclaimers next to the notice which
|
||||||
|
states that this License applies to the Document. These Warranty
|
||||||
|
Disclaimers are considered to be included by reference in this
|
||||||
|
License, but only as regards disclaiming warranties: any other
|
||||||
|
implication that these Warranty Disclaimers may have is void and has
|
||||||
|
no effect on the meaning of this License.
|
||||||
|
|
||||||
|
|
||||||
|
2. VERBATIM COPYING
|
||||||
|
|
||||||
|
You may copy and distribute the Document in any medium, either
|
||||||
|
commercially or noncommercially, provided that this License, the
|
||||||
|
copyright notices, and the license notice saying this License applies
|
||||||
|
to the Document are reproduced in all copies, and that you add no other
|
||||||
|
conditions whatsoever to those of this License. You may not use
|
||||||
|
technical measures to obstruct or control the reading or further
|
||||||
|
copying of the copies you make or distribute. However, you may accept
|
||||||
|
compensation in exchange for copies. If you distribute a large enough
|
||||||
|
number of copies you must also follow the conditions in section 3.
|
||||||
|
|
||||||
|
You may also lend copies, under the same conditions stated above, and
|
||||||
|
you may publicly display copies.
|
||||||
|
|
||||||
|
|
||||||
|
3. COPYING IN QUANTITY
|
||||||
|
|
||||||
|
If you publish printed copies (or copies in media that commonly have
|
||||||
|
printed covers) of the Document, numbering more than 100, and the
|
||||||
|
Document's license notice requires Cover Texts, you must enclose the
|
||||||
|
copies in covers that carry, clearly and legibly, all these Cover
|
||||||
|
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
||||||
|
the back cover. Both covers must also clearly and legibly identify
|
||||||
|
you as the publisher of these copies. The front cover must present
|
||||||
|
the full title with all words of the title equally prominent and
|
||||||
|
visible. You may add other material on the covers in addition.
|
||||||
|
Copying with changes limited to the covers, as long as they preserve
|
||||||
|
the title of the Document and satisfy these conditions, can be treated
|
||||||
|
as verbatim copying in other respects.
|
||||||
|
|
||||||
|
If the required texts for either cover are too voluminous to fit
|
||||||
|
legibly, you should put the first ones listed (as many as fit
|
||||||
|
reasonably) on the actual cover, and continue the rest onto adjacent
|
||||||
|
pages.
|
||||||
|
|
||||||
|
If you publish or distribute Opaque copies of the Document numbering
|
||||||
|
more than 100, you must either include a machine-readable Transparent
|
||||||
|
copy along with each Opaque copy, or state in or with each Opaque copy
|
||||||
|
a computer-network location from which the general network-using
|
||||||
|
public has access to download using public-standard network protocols
|
||||||
|
a complete Transparent copy of the Document, free of added material.
|
||||||
|
If you use the latter option, you must take reasonably prudent steps,
|
||||||
|
when you begin distribution of Opaque copies in quantity, to ensure
|
||||||
|
that this Transparent copy will remain thus accessible at the stated
|
||||||
|
location until at least one year after the last time you distribute an
|
||||||
|
Opaque copy (directly or through your agents or retailers) of that
|
||||||
|
edition to the public.
|
||||||
|
|
||||||
|
It is requested, but not required, that you contact the authors of the
|
||||||
|
Document well before redistributing any large number of copies, to give
|
||||||
|
them a chance to provide you with an updated version of the Document.
|
||||||
|
|
||||||
|
|
||||||
|
4. MODIFICATIONS
|
||||||
|
|
||||||
|
You may copy and distribute a Modified Version of the Document under
|
||||||
|
the conditions of sections 2 and 3 above, provided that you release
|
||||||
|
the Modified Version under precisely this License, with the Modified
|
||||||
|
Version filling the role of the Document, thus licensing distribution
|
||||||
|
and modification of the Modified Version to whoever possesses a copy
|
||||||
|
of it. In addition, you must do these things in the Modified Version:
|
||||||
|
|
||||||
|
A. Use in the Title Page (and on the covers, if any) a title distinct
|
||||||
|
from that of the Document, and from those of previous versions
|
||||||
|
(which should, if there were any, be listed in the History section
|
||||||
|
of the Document). You may use the same title as a previous version
|
||||||
|
if the original publisher of that version gives permission.
|
||||||
|
B. List on the Title Page, as authors, one or more persons or entities
|
||||||
|
responsible for authorship of the modifications in the Modified
|
||||||
|
Version, together with at least five of the principal authors of the
|
||||||
|
Document (all of its principal authors, if it has fewer than five),
|
||||||
|
unless they release you from this requirement.
|
||||||
|
C. State on the Title page the name of the publisher of the
|
||||||
|
Modified Version, as the publisher.
|
||||||
|
D. Preserve all the copyright notices of the Document.
|
||||||
|
E. Add an appropriate copyright notice for your modifications
|
||||||
|
adjacent to the other copyright notices.
|
||||||
|
F. Include, immediately after the copyright notices, a license notice
|
||||||
|
giving the public permission to use the Modified Version under the
|
||||||
|
terms of this License, in the form shown in the Addendum below.
|
||||||
|
G. Preserve in that license notice the full lists of Invariant Sections
|
||||||
|
and required Cover Texts given in the Document's license notice.
|
||||||
|
H. Include an unaltered copy of this License.
|
||||||
|
I. Preserve the section Entitled "History", Preserve its Title, and add
|
||||||
|
to it an item stating at least the title, year, new authors, and
|
||||||
|
publisher of the Modified Version as given on the Title Page. If
|
||||||
|
there is no section Entitled "History" in the Document, create one
|
||||||
|
stating the title, year, authors, and publisher of the Document as
|
||||||
|
given on its Title Page, then add an item describing the Modified
|
||||||
|
Version as stated in the previous sentence.
|
||||||
|
J. Preserve the network location, if any, given in the Document for
|
||||||
|
public access to a Transparent copy of the Document, and likewise
|
||||||
|
the network locations given in the Document for previous versions
|
||||||
|
it was based on. These may be placed in the "History" section.
|
||||||
|
You may omit a network location for a work that was published at
|
||||||
|
least four years before the Document itself, or if the original
|
||||||
|
publisher of the version it refers to gives permission.
|
||||||
|
K. For any section Entitled "Acknowledgements" or "Dedications",
|
||||||
|
Preserve the Title of the section, and preserve in the section all
|
||||||
|
the substance and tone of each of the contributor acknowledgements
|
||||||
|
and/or dedications given therein.
|
||||||
|
L. Preserve all the Invariant Sections of the Document,
|
||||||
|
unaltered in their text and in their titles. Section numbers
|
||||||
|
or the equivalent are not considered part of the section titles.
|
||||||
|
M. Delete any section Entitled "Endorsements". Such a section
|
||||||
|
may not be included in the Modified Version.
|
||||||
|
N. Do not retitle any existing section to be Entitled "Endorsements"
|
||||||
|
or to conflict in title with any Invariant Section.
|
||||||
|
O. Preserve any Warranty Disclaimers.
|
||||||
|
|
||||||
|
If the Modified Version includes new front-matter sections or
|
||||||
|
appendices that qualify as Secondary Sections and contain no material
|
||||||
|
copied from the Document, you may at your option designate some or all
|
||||||
|
of these sections as invariant. To do this, add their titles to the
|
||||||
|
list of Invariant Sections in the Modified Version's license notice.
|
||||||
|
These titles must be distinct from any other section titles.
|
||||||
|
|
||||||
|
You may add a section Entitled "Endorsements", provided it contains
|
||||||
|
nothing but endorsements of your Modified Version by various
|
||||||
|
parties--for example, statements of peer review or that the text has
|
||||||
|
been approved by an organization as the authoritative definition of a
|
||||||
|
standard.
|
||||||
|
|
||||||
|
You may add a passage of up to five words as a Front-Cover Text, and a
|
||||||
|
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
||||||
|
of Cover Texts in the Modified Version. Only one passage of
|
||||||
|
Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||||
|
through arrangements made by) any one entity. If the Document already
|
||||||
|
includes a cover text for the same cover, previously added by you or
|
||||||
|
by arrangement made by the same entity you are acting on behalf of,
|
||||||
|
you may not add another; but you may replace the old one, on explicit
|
||||||
|
permission from the previous publisher that added the old one.
|
||||||
|
|
||||||
|
The author(s) and publisher(s) of the Document do not by this License
|
||||||
|
give permission to use their names for publicity for or to assert or
|
||||||
|
imply endorsement of any Modified Version.
|
||||||
|
|
||||||
|
|
||||||
|
5. COMBINING DOCUMENTS
|
||||||
|
|
||||||
|
You may combine the Document with other documents released under this
|
||||||
|
License, under the terms defined in section 4 above for modified
|
||||||
|
versions, provided that you include in the combination all of the
|
||||||
|
Invariant Sections of all of the original documents, unmodified, and
|
||||||
|
list them all as Invariant Sections of your combined work in its
|
||||||
|
license notice, and that you preserve all their Warranty Disclaimers.
|
||||||
|
|
||||||
|
The combined work need only contain one copy of this License, and
|
||||||
|
multiple identical Invariant Sections may be replaced with a single
|
||||||
|
copy. If there are multiple Invariant Sections with the same name but
|
||||||
|
different contents, make the title of each such section unique by
|
||||||
|
adding at the end of it, in parentheses, the name of the original
|
||||||
|
author or publisher of that section if known, or else a unique number.
|
||||||
|
Make the same adjustment to the section titles in the list of
|
||||||
|
Invariant Sections in the license notice of the combined work.
|
||||||
|
|
||||||
|
In the combination, you must combine any sections Entitled "History"
|
||||||
|
in the various original documents, forming one section Entitled
|
||||||
|
"History"; likewise combine any sections Entitled "Acknowledgements",
|
||||||
|
and any sections Entitled "Dedications". You must delete all sections
|
||||||
|
Entitled "Endorsements".
|
||||||
|
|
||||||
|
|
||||||
|
6. COLLECTIONS OF DOCUMENTS
|
||||||
|
|
||||||
|
You may make a collection consisting of the Document and other documents
|
||||||
|
released under this License, and replace the individual copies of this
|
||||||
|
License in the various documents with a single copy that is included in
|
||||||
|
the collection, provided that you follow the rules of this License for
|
||||||
|
verbatim copying of each of the documents in all other respects.
|
||||||
|
|
||||||
|
You may extract a single document from such a collection, and distribute
|
||||||
|
it individually under this License, provided you insert a copy of this
|
||||||
|
License into the extracted document, and follow this License in all
|
||||||
|
other respects regarding verbatim copying of that document.
|
||||||
|
|
||||||
|
|
||||||
|
7. AGGREGATION WITH INDEPENDENT WORKS
|
||||||
|
|
||||||
|
A compilation of the Document or its derivatives with other separate
|
||||||
|
and independent documents or works, in or on a volume of a storage or
|
||||||
|
distribution medium, is called an "aggregate" if the copyright
|
||||||
|
resulting from the compilation is not used to limit the legal rights
|
||||||
|
of the compilation's users beyond what the individual works permit.
|
||||||
|
When the Document is included in an aggregate, this License does not
|
||||||
|
apply to the other works in the aggregate which are not themselves
|
||||||
|
derivative works of the Document.
|
||||||
|
|
||||||
|
If the Cover Text requirement of section 3 is applicable to these
|
||||||
|
copies of the Document, then if the Document is less than one half of
|
||||||
|
the entire aggregate, the Document's Cover Texts may be placed on
|
||||||
|
covers that bracket the Document within the aggregate, or the
|
||||||
|
electronic equivalent of covers if the Document is in electronic form.
|
||||||
|
Otherwise they must appear on printed covers that bracket the whole
|
||||||
|
aggregate.
|
||||||
|
|
||||||
|
|
||||||
|
8. TRANSLATION
|
||||||
|
|
||||||
|
Translation is considered a kind of modification, so you may
|
||||||
|
distribute translations of the Document under the terms of section 4.
|
||||||
|
Replacing Invariant Sections with translations requires special
|
||||||
|
permission from their copyright holders, but you may include
|
||||||
|
translations of some or all Invariant Sections in addition to the
|
||||||
|
original versions of these Invariant Sections. You may include a
|
||||||
|
translation of this License, and all the license notices in the
|
||||||
|
Document, and any Warranty Disclaimers, provided that you also include
|
||||||
|
the original English version of this License and the original versions
|
||||||
|
of those notices and disclaimers. In case of a disagreement between
|
||||||
|
the translation and the original version of this License or a notice
|
||||||
|
or disclaimer, the original version will prevail.
|
||||||
|
|
||||||
|
If a section in the Document is Entitled "Acknowledgements",
|
||||||
|
"Dedications", or "History", the requirement (section 4) to Preserve
|
||||||
|
its Title (section 1) will typically require changing the actual
|
||||||
|
title.
|
||||||
|
|
||||||
|
|
||||||
|
9. TERMINATION
|
||||||
|
|
||||||
|
You may not copy, modify, sublicense, or distribute the Document except
|
||||||
|
as expressly provided for under this License. Any other attempt to
|
||||||
|
copy, modify, sublicense or distribute the Document 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.
|
||||||
|
|
||||||
|
|
||||||
|
10. FUTURE REVISIONS OF THIS LICENSE
|
||||||
|
|
||||||
|
The Free Software Foundation may publish new, revised versions
|
||||||
|
of the GNU Free Documentation 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. See
|
||||||
|
http://www.gnu.org/copyleft/.
|
||||||
|
|
||||||
|
Each version of the License is given a distinguishing version number.
|
||||||
|
If the Document specifies that a particular numbered version of this
|
||||||
|
License "or any later version" applies to it, you have the option of
|
||||||
|
following the terms and conditions either of that specified version or
|
||||||
|
of any later version that has been published (not as a draft) by the
|
||||||
|
Free Software Foundation. If the Document does not specify a version
|
||||||
|
number of this License, you may choose any version ever published (not
|
||||||
|
as a draft) by the Free Software Foundation.
|
||||||
|
|
||||||
|
|
||||||
|
ADDENDUM: How to use this License for your documents
|
||||||
|
|
||||||
|
To use this License in a document you have written, include a copy of
|
||||||
|
the License in the document and put the following copyright and
|
||||||
|
license notices just after the title page:
|
||||||
|
|
||||||
|
Copyright (c) YEAR YOUR NAME.
|
||||||
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
|
under the terms of the GNU Free Documentation License, Version 1.2
|
||||||
|
or any later version published by the Free Software Foundation;
|
||||||
|
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
||||||
|
Texts. A copy of the license is included in the section entitled
|
||||||
|
"GNU Free Documentation License".
|
||||||
|
|
||||||
|
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
|
||||||
|
replace the "with...Texts." line with this:
|
||||||
|
|
||||||
|
with the Invariant Sections being LIST THEIR TITLES, with the
|
||||||
|
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
|
||||||
|
|
||||||
|
If you have Invariant Sections without Cover Texts, or some other
|
||||||
|
combination of the three, merge those two alternatives to suit the
|
||||||
|
situation.
|
||||||
|
|
||||||
|
If your document contains nontrivial examples of program code, we
|
||||||
|
recommend releasing these examples in parallel under your choice of
|
||||||
|
free software license, such as the GNU General Public License,
|
||||||
|
to permit their use in free software.
|
@ -0,0 +1,41 @@
|
|||||||
|
/* XPM */
|
||||||
|
static char *kuickshow-16[] = {
|
||||||
|
/* columns rows colors chars-per-pixel */
|
||||||
|
"16 14 21 1",
|
||||||
|
" c black",
|
||||||
|
". c #000033",
|
||||||
|
"X c gray20",
|
||||||
|
"o c #006633",
|
||||||
|
"O c #336633",
|
||||||
|
"+ c #0033FF",
|
||||||
|
"@ c #3333FF",
|
||||||
|
"# c #6666FF",
|
||||||
|
"$ c #009933",
|
||||||
|
"% c #669933",
|
||||||
|
"& c #9900CC",
|
||||||
|
"* c #9933CC",
|
||||||
|
"= c #9933FF",
|
||||||
|
"- c #9966FF",
|
||||||
|
"; c #CC66CC",
|
||||||
|
": c #9999FF",
|
||||||
|
"> c #CC99FF",
|
||||||
|
", c #CCCCFF",
|
||||||
|
"< c #FFCCFF",
|
||||||
|
"1 c gray100",
|
||||||
|
"2 c None",
|
||||||
|
/* pixels */
|
||||||
|
"2222222221,:2222",
|
||||||
|
"22211,:21,>:2222",
|
||||||
|
"22-<>1>-::->1122",
|
||||||
|
"22-,:->--:11>--2",
|
||||||
|
"222:-++@@-+-::#2",
|
||||||
|
"-11>-=>* @@+:@+2",
|
||||||
|
"1<::@=. @-:@*222",
|
||||||
|
">-@>>:@@##>+oo22",
|
||||||
|
"@@1+@>,#@>-=$%O2",
|
||||||
|
"-1-+@1:#--&OOXOO",
|
||||||
|
"-1;:@<:::*&2oOO2",
|
||||||
|
"2+@@2<:*22o%2222",
|
||||||
|
"2222222222o%2222",
|
||||||
|
"22222222222oo222"
|
||||||
|
};
|
@ -0,0 +1,66 @@
|
|||||||
|
/* XPM */
|
||||||
|
static char *kuickshow[] = {
|
||||||
|
/* columns rows colors chars-per-pixel */
|
||||||
|
"32 29 31 1",
|
||||||
|
" c black",
|
||||||
|
". c #000033",
|
||||||
|
"X c #003333",
|
||||||
|
"o c gray20",
|
||||||
|
"O c #006633",
|
||||||
|
"+ c #336633",
|
||||||
|
"@ c #0033FF",
|
||||||
|
"# c #3333FF",
|
||||||
|
"$ c #6666FF",
|
||||||
|
"% c #009933",
|
||||||
|
"& c #339933",
|
||||||
|
"* c #669933",
|
||||||
|
"= c #6699CC",
|
||||||
|
"- c #6699FF",
|
||||||
|
"; c #9900CC",
|
||||||
|
": c #9900FF",
|
||||||
|
"> c #9933CC",
|
||||||
|
", c #9933FF",
|
||||||
|
"< c #9966CC",
|
||||||
|
"1 c #9966FF",
|
||||||
|
"2 c #CC00CC",
|
||||||
|
"3 c #CC66CC",
|
||||||
|
"4 c #CC66FF",
|
||||||
|
"5 c #9999CC",
|
||||||
|
"6 c #9999FF",
|
||||||
|
"7 c #CC99FF",
|
||||||
|
"8 c #FF99FF",
|
||||||
|
"9 c #CCCCFF",
|
||||||
|
"0 c #FFCCFF",
|
||||||
|
"q c gray100",
|
||||||
|
"w c None",
|
||||||
|
/* pixels */
|
||||||
|
"wwwwwwwwwwwwwwwwwww14114wwwwwwww",
|
||||||
|
"wwwwwwwwwwwwwwwwww6qqqq66wwwwwww",
|
||||||
|
"wwwwwww464141wwww4q909941wwwwwww",
|
||||||
|
"wwwwww1qq09976ww1q0917966wwwwwww",
|
||||||
|
"wwwww4q99171416w7q14117$1764wwww",
|
||||||
|
"wwwww1q01719176176667167qqqq7www",
|
||||||
|
"wwwww7q949617116016161qq979916ww",
|
||||||
|
"wwwww1q94661-761-1@6@q9q4771716w",
|
||||||
|
"wwwwww499116#@101#@#946$614616#w",
|
||||||
|
"wwwwwww671#@#@>#@##11@6166666$#w",
|
||||||
|
"www71717616#>,q, 6@6##@15$11@#>w",
|
||||||
|
"w1790997616,q7,, #@#@##@#6@##1ww",
|
||||||
|
"7q971711##>q6>,X#11611@,#@#>,www",
|
||||||
|
"1q9096@6@#.,,. #@#=1666#,>,wwwww",
|
||||||
|
"1q71711#@#-;X7#@#@#1611#>wwwwwww",
|
||||||
|
"1711@##777#67#@##6$6171@,***wwww",
|
||||||
|
"#66##q71##@710@1@166166#>++%**ww",
|
||||||
|
">#@#976@1#17961#6#$791#,*%%+++;w",
|
||||||
|
"w>6q97@6@#q9166$11776@>+o*;%%+:;",
|
||||||
|
"w1q0614@1#q096<67191#;:+*+%o++%;",
|
||||||
|
"w7q946616@q68909901@;,w;+o+%%++:",
|
||||||
|
"w1q963161#@064116@#,%;;w:O++;:;w",
|
||||||
|
"ww#70616@>,#@####>,w%&,ww;::;www",
|
||||||
|
"ww,@##@#,ww>,>,>,wwww%*>wwwwwwww",
|
||||||
|
"www,>,>,wwwwwwwwwwwwww%2wwwwwwww",
|
||||||
|
"wwwwwwwwwwwwwwwwwwwwww%*2wwwwwww",
|
||||||
|
"wwwwwwwwwwwwwwwwwwwwwww%:wwwwwww",
|
||||||
|
"wwwwwwwwwwwwwwwwwwwwwww%*2wwwwww",
|
||||||
|
"wwwwwwwwwwwwwwwwwwwwwwww>:wwwwww"
|
||||||
|
};
|
@ -0,0 +1,2 @@
|
|||||||
|
debian/icons/kuickshow.xpm /opt/kde3/share/pixmaps
|
||||||
|
debian/icons/kuickshow-16.xpm /opt/kde3/share/pixmaps
|
@ -0,0 +1,4 @@
|
|||||||
|
kuickshow-kde3: no-shlibs-control-file opt/kde3/lib/libkdeinit_kuickshow.so
|
||||||
|
kuickshow-kde3: postinst-must-call-ldconfig opt/kde3/lib/libkdeinit_kuickshow.so
|
||||||
|
kuickshow-kde3: postrm-should-call-ldconfig opt/kde3/lib/libkdeinit_kuickshow.so
|
||||||
|
kuickshow-kde3: package-name-doesnt-match-sonames libkdeinit-kuickshow
|
@ -0,0 +1 @@
|
|||||||
|
debian/man/kuickshow.1
|
@ -0,0 +1,11 @@
|
|||||||
|
?package(kuickshow):\
|
||||||
|
needs="X11"\
|
||||||
|
section="Apps/Graphics"\
|
||||||
|
hints="KDE"\
|
||||||
|
title="Kuickshow"\
|
||||||
|
icon32x32="/usr/share/pixmaps/kuickshow.xpm"\
|
||||||
|
icon16x16="/usr/share/pixmaps/kuickshow-16.xpm"\
|
||||||
|
command="/opt/kde3/bin/kuickshow"
|
||||||
|
|
||||||
|
# Icon 32x32 kuickshow/src/cr32-app-kuickshow.png kuickshow.xpm
|
||||||
|
# Icon 16x16 kuickshow/src/cr16-app-kuickshow.png kuickshow-16.xpm
|
@ -0,0 +1,99 @@
|
|||||||
|
.TH KUICKSHOW "1" "September 2002" KDE "KDE Application"
|
||||||
|
.SH NAME
|
||||||
|
kuickshow \- KDE Image Viewer
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B kuickshow
|
||||||
|
[\fIQt-options\fR] [\fIKDE-options\fR] [\fIoptions\fR] [\fIfiles\fR]
|
||||||
|
.SH DESCRIPTION
|
||||||
|
This manual page documents briefly the
|
||||||
|
.B Kuickshow
|
||||||
|
KDE Application.
|
||||||
|
This manual page was written for the Debian GNU/Linux distribution
|
||||||
|
because the original program does not have a manual page.
|
||||||
|
.P
|
||||||
|
.B KuickShow
|
||||||
|
is a comfortable image browser/viewer. It displays a
|
||||||
|
filebrowser where you can select images which are then shown.
|
||||||
|
.P
|
||||||
|
The following image formats are supported:
|
||||||
|
.P
|
||||||
|
.RS
|
||||||
|
\(bu jpg
|
||||||
|
.br
|
||||||
|
\(bu gif
|
||||||
|
.br
|
||||||
|
\(bu tiff
|
||||||
|
.br
|
||||||
|
\(bu png
|
||||||
|
.br
|
||||||
|
\(bu bmp
|
||||||
|
.br
|
||||||
|
\(bu psd
|
||||||
|
.br
|
||||||
|
\(bu xmp
|
||||||
|
.br
|
||||||
|
\(bu xbm
|
||||||
|
.br
|
||||||
|
\(bu eim
|
||||||
|
.RE
|
||||||
|
.P
|
||||||
|
Images can be displayed either in their own window, as large as the
|
||||||
|
image, or fullscreen.
|
||||||
|
.P
|
||||||
|
This program is part of the official KDE graphics module.
|
||||||
|
.SS "Generic options:"
|
||||||
|
.TP
|
||||||
|
\fB\-\-help\fR
|
||||||
|
Show help about options
|
||||||
|
.TP
|
||||||
|
\fB\-\-help\-qt\fR
|
||||||
|
Show Qt specific options
|
||||||
|
.TP
|
||||||
|
\fB\-\-help\-kde\fR
|
||||||
|
Show KDE specific options
|
||||||
|
.TP
|
||||||
|
\fB\-\-help\-all\fR
|
||||||
|
Show all options
|
||||||
|
.TP
|
||||||
|
\fB\-\-author\fR
|
||||||
|
Show author information
|
||||||
|
.TP
|
||||||
|
\fB\-v\fR, \fB\-\-version\fR
|
||||||
|
Show version information
|
||||||
|
.TP
|
||||||
|
\fB\-\-license\fR
|
||||||
|
Show license information
|
||||||
|
.TP
|
||||||
|
\fB\-\-\fR
|
||||||
|
End of options
|
||||||
|
.SH OPTIONS
|
||||||
|
.TP
|
||||||
|
\fB\-\-lastdir\fR
|
||||||
|
Start in the last visited directory, not the current working directory
|
||||||
|
.SS "Arguments:"
|
||||||
|
.TP
|
||||||
|
files
|
||||||
|
Optional image filenames/urls to show
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
The full documentation for
|
||||||
|
.B Kuickshow
|
||||||
|
is maintained as a docbook manual. If the
|
||||||
|
.B khelpcenter
|
||||||
|
program is properly installed at your site, the command
|
||||||
|
.IP
|
||||||
|
.B khelpcenter help:/kuickshow
|
||||||
|
.PP
|
||||||
|
should give you access to the complete manual.
|
||||||
|
.SH AUTHOR
|
||||||
|
KuickShow was written by
|
||||||
|
.nh
|
||||||
|
Carsten Pfeiffer <pfeiffer@kde.org>.
|
||||||
|
.hy
|
||||||
|
.br
|
||||||
|
Please use http://bugs.kde.org to report bugs, do not mail the authors directly.
|
||||||
|
.br
|
||||||
|
This manual page was prepared by
|
||||||
|
.nh
|
||||||
|
Karolina Lindqvist <pgd\-karolinali@algonet.se>
|
||||||
|
.hy
|
||||||
|
for the Debian GNU/Linux system (but may be used by others).
|
@ -0,0 +1,15 @@
|
|||||||
|
#! /usr/bin/make -f
|
||||||
|
|
||||||
|
include /usr/share/cdbs/1/rules/debhelper.mk
|
||||||
|
include debian/cdbs/debian-qt-kde.mk
|
||||||
|
include /usr/share/cdbs/1/rules/simple-patchsys.mk
|
||||||
|
include /usr/share/cdbs/1/rules/utils.mk
|
||||||
|
|
||||||
|
DEB_CONFIGURE_INCLUDEDIR := /opt/kde3/include/kde
|
||||||
|
DEB_CONFIGURE_MANDIR := /opt/kde3/share/man
|
||||||
|
DEB_CONFIGURE_PREFIX := /opt/kde3
|
||||||
|
DEB_CONFIGURE_INFODIR := /opt/kde3/share/info
|
||||||
|
|
||||||
|
cdbs_configure_flags := --with-qt-dir=/usr/share/qt3 --disable-rpath --with-xinerama $(cdbs_kde_enable_final) $(cdbs_kde_enable_debug)
|
||||||
|
|
||||||
|
DEB_CONFIGURE_EXTRA_FLAGS := --prefix=/opt/kde3 --with-extra-libs=/opt/kde3/lib --with-extra-includes=/opt/kde3/include/kde
|
@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
KDE_LANG = en
|
||||||
|
KDE_DOCS = AUTO
|
||||||
|
SUBDIRS = $(AUTODIRS)
|
||||||
|
|
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
KDE_LANG = en
|
||||||
|
KDE_DOCS = AUTO
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -0,0 +1,11 @@
|
|||||||
|
Begin4
|
||||||
|
Title: kdegraphics
|
||||||
|
Version: 3.5.8
|
||||||
|
Entered-date: 2007-10-15
|
||||||
|
Description: Graphical Applications written for the K Desktop Environment (KDE)
|
||||||
|
Keywords: KDE X11 desktop Qt
|
||||||
|
Author: http://bugs.kde.org/ (KDE Bugtracking System)
|
||||||
|
Primary-site: http://www.kde.org/download/
|
||||||
|
Platforms: Unix, Qt
|
||||||
|
Copying-policy: GPL, Artistic
|
||||||
|
End
|
@ -0,0 +1 @@
|
|||||||
|
Carsten Pfeiffer <pfeiffer@kde.org>
|
@ -0,0 +1,3 @@
|
|||||||
|
kdelibs issues:
|
||||||
|
- The filefinder doesn't work when using the splitted view
|
||||||
|
- in the detailed view, the filefinder can't highlight files during typing.
|
@ -0,0 +1,921 @@
|
|||||||
|
<pre>
|
||||||
|
Fri Mar 31 02:04:21 2006 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* fixed one of the most long-standing bugs: non-local browsing
|
||||||
|
(i.e. you can browse remote directories like local ones now, flipping
|
||||||
|
through the images with PageUp/Down etc., including pre-loading
|
||||||
|
images)
|
||||||
|
Browsing through /media should work now, but can be improved by
|
||||||
|
not"downloading" from there. Framework to do this is there, though.
|
||||||
|
|
||||||
|
* also allow saving to remote URLs
|
||||||
|
|
||||||
|
* fixed image not being completely maximized when opening image in
|
||||||
|
fullscreen mode
|
||||||
|
* performance improvement
|
||||||
|
|
||||||
|
* layed groundwork for fixing #48812 and #101986
|
||||||
|
|
||||||
|
* make sure all temporary files get deleted
|
||||||
|
|
||||||
|
Wed Feb 22 16:02:58 2006 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* make autohide-cursor finally work
|
||||||
|
|
||||||
|
Wed Feb 22 02:14:24 2006 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickshow.cpp, imagewindow.*
|
||||||
|
remove nextSlideRequested() and prevSlideRequested() patch, you
|
||||||
|
can already navigate with PageUp/Down. The arrow-keys are used for
|
||||||
|
scrolling.
|
||||||
|
|
||||||
|
Wed Feb 22 01:31:54 2006 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (KuickShow):
|
||||||
|
warn before loading >= 10 images at once from the commandline
|
||||||
|
|
||||||
|
Wed Feb 22 01:03:07 2006 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imagewindow.cpp (rotated):
|
||||||
|
auto-scale image on rotation
|
||||||
|
|
||||||
|
Wed Feb 22 00:01:02 2006 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* add a warning messagebox when zooming to larger than
|
||||||
|
4 * desktop area size. The "4*" is configurable in
|
||||||
|
[GeneralConfiguration]
|
||||||
|
MaximumZoomFactorByDesktop=4.0
|
||||||
|
|
||||||
|
|
||||||
|
Sun Jan 8 09:47:39 2006 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* fix crash when deleting the last image without having a browser
|
||||||
|
|
||||||
|
Sat Jan 7 23:27:32 2006 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* fix deleting images from image window and browser!
|
||||||
|
|
||||||
|
* support moving to trash and make that the default
|
||||||
|
|
||||||
|
* refactor delayed execution of events/actions (for when the browser window needs to
|
||||||
|
be loaded lazily)
|
||||||
|
|
||||||
|
Sat Jan 7 22:36:25 2006 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imagewindow.cpp (addAlternativeShortcut):
|
||||||
|
use F5 as default shortcut for "Reload image", keep Enter as alternative
|
||||||
|
|
||||||
|
Sat Jan 7 22:33:30 2006 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/aboutwidget.cpp:
|
||||||
|
fixed crash (right-clicking on about widget)
|
||||||
|
|
||||||
|
* made the about widget not always-on-top, but a modal widget,
|
||||||
|
which prevents error messages from being hidden below the about
|
||||||
|
widget (i.e. when clicking the homepage link while being offline)
|
||||||
|
|
||||||
|
Sat Aug 25 02:58:31 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imagewindow.cpp (init):
|
||||||
|
mouse-wheel can switch between images now, per request of
|
||||||
|
Bill Benken <bilben1@home.com>
|
||||||
|
|
||||||
|
* also fixed the KStdAccel::save() and close() accels not working
|
||||||
|
in the image window
|
||||||
|
|
||||||
|
Sat Aug 4 03:37:50 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* now completely smooth, flicker-free switching between images
|
||||||
|
and zooming
|
||||||
|
|
||||||
|
* Reverted again to current kde-common/admin stuff
|
||||||
|
|
||||||
|
* added quit-button to toolbar (also makes Ctrl-Q work)
|
||||||
|
|
||||||
|
* made ChangeLog readable by KHelpCenter
|
||||||
|
|
||||||
|
* commented out benchmark debug output
|
||||||
|
|
||||||
|
* added support for objprelink in the specfile
|
||||||
|
(copy the tarball to your rpm-dir/SOURCES and rpm -ba kuickshow.spec)
|
||||||
|
|
||||||
|
* Fixed some bugs coming from kdelibs 2.1.x vs. 2.2 handling
|
||||||
|
Thanks a lot to Robert Charbonneau <etriaph@kdesktop.org>
|
||||||
|
and another anonymous helper from #kde for testing and useful
|
||||||
|
feedback.
|
||||||
|
|
||||||
|
* Added patch from Adrian Schroeter <adrian@suse.de> to make it
|
||||||
|
work with autoconf 2.5x -- Thanks!
|
||||||
|
|
||||||
|
Wed Jul 11 17:19:38 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/filewidget.cpp (initActions):
|
||||||
|
adopt to KDirOperator's contextmenu (i.e. don't add the "Properties..."
|
||||||
|
entry when it's already present)
|
||||||
|
|
||||||
|
* src/imagewindow.cpp:
|
||||||
|
show image size in the caption
|
||||||
|
|
||||||
|
* reverted to admin/* files from KuickShow 0.8 so that users of older
|
||||||
|
KDE versions can compile it again.
|
||||||
|
|
||||||
|
* cleaned up Imlib configure check
|
||||||
|
|
||||||
|
* made background color in viewer configurable
|
||||||
|
|
||||||
|
* added delete-action again for users of older kdelibs
|
||||||
|
|
||||||
|
* fixed some bugs in the filefinder widget
|
||||||
|
|
||||||
|
Wed Jul 4 01:06:58 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imagewindow.cpp (printImage):
|
||||||
|
Grmbl. Really fixed printing. It even works now :)
|
||||||
|
|
||||||
|
Tue Jul 3 3:04:18 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* Oups, the behavior of QPrinter::printCommand() has changed.
|
||||||
|
It returns a null String by default now :-O Fixed.
|
||||||
|
|
||||||
|
Tue Jun 27 15:44:28 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imagewindow.cpp:
|
||||||
|
added KTempFile patch from Kevin Lo <kevlo@kde.org>
|
||||||
|
|
||||||
|
Tue May 29 15:20:34 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imagewindow.cpp (updateAccel):
|
||||||
|
changed accels:
|
||||||
|
shift-accel is now for removing brightness/contrast/gamma
|
||||||
|
|
||||||
|
removed delete action, now provided by kfile
|
||||||
|
|
||||||
|
Thu Apr 19 23:16:12 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* Integrated Multihead patch from Evan Edwards <evan@onepaper.com>
|
||||||
|
who was also so kind, to set up a homepage for KuickShow, as well
|
||||||
|
as a Sourceforge account. See kuickshow.sourceforge.net for details.
|
||||||
|
|
||||||
|
Thanks a lot, Evan!
|
||||||
|
|
||||||
|
Added handcursor from qwertz <kraftw@gmx.de>, thanks a lot!
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (getKuimage):
|
||||||
|
hopefully fixed crash reported by Alexxx and linuxphreak:
|
||||||
|
reorder the kuickimage and file-lists when returning a cached image
|
||||||
|
|
||||||
|
Tue Mar 13 03:16:24 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* added lots of translations from the translation team.
|
||||||
|
I need to add a KAboutDialog somewhere to give them credit
|
||||||
|
for their excellent work!
|
||||||
|
|
||||||
|
Fri Mar 9 21:50:12 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (eventFilter):
|
||||||
|
call our parent class' eventFilter if we don't stop the event
|
||||||
|
-> moving/rearranging the toolbar works :)
|
||||||
|
|
||||||
|
* caption fixes, show the url in the caption
|
||||||
|
|
||||||
|
* save the visible images on SM shutdown and restore them on restore
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp:
|
||||||
|
don't delete this from closeEvent, WDestructiveClose does it better
|
||||||
|
-> sessionmanagement works
|
||||||
|
|
||||||
|
* defaultswidget.cpp:
|
||||||
|
fix typo found by qwertz
|
||||||
|
|
||||||
|
* add icon for delete, as suggested by Florian
|
||||||
|
|
||||||
|
Thu Mar 8 13:29:17 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imagewindow.cpp (mouseReleaseEvent):
|
||||||
|
zooming should work properly now:
|
||||||
|
- the window size is kept
|
||||||
|
- scrolling the zoomed image works correctly
|
||||||
|
- the rubber band sort of works (maybe even as good as in 0.6.7)
|
||||||
|
- respect maxWidth and maxHeight during zoom with the rubberband
|
||||||
|
|
||||||
|
added different icon for image window
|
||||||
|
|
||||||
|
* src/kuickshow.cpp
|
||||||
|
go into window mode when pressing space in fullscreen mode to show
|
||||||
|
the browser (always-on-top issue)
|
||||||
|
|
||||||
|
* src/filewidget.cpp
|
||||||
|
some more ensureItemVisible()
|
||||||
|
|
||||||
|
* installation/spec files fixes
|
||||||
|
|
||||||
|
* added im_palette.pal
|
||||||
|
|
||||||
|
Wed Mar 7 21:25:15 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* doc/en/index.html:
|
||||||
|
updated english documentation
|
||||||
|
|
||||||
|
* src/imagewindow.cpp
|
||||||
|
set our nice icon so that kicker can show it in the taskbar for
|
||||||
|
example. Thanks to Florian for the hint :)
|
||||||
|
|
||||||
|
* i18n fix (° -> degrees), and s/-90/270/, another one from Florian
|
||||||
|
|
||||||
|
* resizeOptimal(): if we don't resize because we already have the right
|
||||||
|
size, call centerImage()
|
||||||
|
|
||||||
|
* zooming with the mouse works again (still not completely right tho:
|
||||||
|
- the rubber band is missing
|
||||||
|
- the size/scrolling does not always match the real imagesize
|
||||||
|
|
||||||
|
* src/filewidget.cpp:
|
||||||
|
ensureItemVisible() in the browser when browsing with PageUp/PageDown
|
||||||
|
|
||||||
|
* src/kuickshow.cpp:
|
||||||
|
disable the slideshow action when a slideshow is running
|
||||||
|
|
||||||
|
Wed Mar 7 01:39:34 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (readProperties):
|
||||||
|
clear the diroperators history stack on startup
|
||||||
|
|
||||||
|
* src/imagewindow.cpp:
|
||||||
|
update the accelerators when applying new configuration
|
||||||
|
(delete the old and create a new KAccel, setKeyDict() doesn't
|
||||||
|
work in our case
|
||||||
|
|
||||||
|
* use QWidget::x11Display() for later multihead support)
|
||||||
|
|
||||||
|
* general cleanup. hmm, this could be added to every entry
|
||||||
|
in the last days, I guess :}
|
||||||
|
|
||||||
|
* added workaround for relative paths not working in the filefinder
|
||||||
|
relative _files_ don't work yet, tho.
|
||||||
|
|
||||||
|
* documentation written for the upcoming 0.8pre release
|
||||||
|
|
||||||
|
Mon Mar 5 13:07:59 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imagewindow.cpp (init):
|
||||||
|
Maximize and close shortcuts, as proposed by Crocodile on IRC.
|
||||||
|
|
||||||
|
* WDestructiveClose in ImlibWidget and close(true) everywhere
|
||||||
|
|
||||||
|
Mon Mar 5 00:12:45 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (slotReplayEvent):
|
||||||
|
going to the next/previous/... image now also works when started with
|
||||||
|
an image on the commandline (== no browser available)
|
||||||
|
Tricky thing: after creating the browser, we can't simply go on,
|
||||||
|
because the browser doesn't have any files at all (async listing).
|
||||||
|
So we save the pageUp/pageDown event and replay it when the browser
|
||||||
|
is ready.
|
||||||
|
|
||||||
|
* fixed Space needed to be hit twice to show the initial browser
|
||||||
|
|
||||||
|
* src/kuickshow.cpp, src/filewidget.cpp (eventFilter)
|
||||||
|
deleting files works from the filebrowser again, not only from the
|
||||||
|
image window
|
||||||
|
|
||||||
|
* Makefile.am
|
||||||
|
build as KLM (kdeinit-loadable-module) to speed up startup
|
||||||
|
|
||||||
|
* hah! Adding two lines makes browsing about twice as fast :)
|
||||||
|
Well, equally as fast as the KDE1 version at least ;) The new caching
|
||||||
|
system set the dirty flag wrongly at one place, so the pixmap was
|
||||||
|
effectively rendered twice per image.
|
||||||
|
|
||||||
|
Sun Mar 4 20:33:44 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (initGUI):
|
||||||
|
open only one window item in toolbar is honored properly now
|
||||||
|
(replaced the checkbox in the configdialog)
|
||||||
|
|
||||||
|
* don't pass the KKeyEntryMap to all the image windows, this doesn't
|
||||||
|
work (and it also crashes after doing it a second time).
|
||||||
|
Thanks to Florian Hacker for the bugreport :)
|
||||||
|
|
||||||
|
* save the view properties of KDirOperator
|
||||||
|
|
||||||
|
* statusbar looks a bit better now (no fixed size entries anymore)
|
||||||
|
|
||||||
|
* src/kuickio.cpp (deleteFile):
|
||||||
|
deletion of directories works, now
|
||||||
|
|
||||||
|
* src/imdata.cpp, kuickdata.cpp:
|
||||||
|
better handling of default values
|
||||||
|
|
||||||
|
Sun Mar 4 13:57:52 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imagewindow.cpp (setFullscreen):
|
||||||
|
hack around QWidget::move() resizing us -> we just ignore that
|
||||||
|
resizeEvent. Gives less flicker when switching into window-mode.
|
||||||
|
|
||||||
|
* initial fullscreen mode works again as well (hacking around a kwin
|
||||||
|
"limitation")
|
||||||
|
|
||||||
|
Sun Mar 4 10:50:23 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickconfigdlg.cpp (KuickConfigDialog):
|
||||||
|
Keyboard shortcuts configurable for browser and image viewer
|
||||||
|
|
||||||
|
* don't check mimetype in isImage() at the moment, people won't have
|
||||||
|
mimetypes for .eim and .psd probably
|
||||||
|
|
||||||
|
* removed unused EditDialog
|
||||||
|
|
||||||
|
* Added auto-hide cursor in viewer (doesn't work properly tho)
|
||||||
|
|
||||||
|
Sat Mar 3 02:00:41 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imagewindow.cpp (resizeOptimal):
|
||||||
|
Honor the window manager decoration in window mode. Now always the
|
||||||
|
entire window including decoration is visible, no matter how large the
|
||||||
|
image is.
|
||||||
|
|
||||||
|
* Fixed a scrolling bug when the window was exactly as large as the
|
||||||
|
desktop (only in fullscreen mode)
|
||||||
|
|
||||||
|
* don't go to the next image when cancelling a deletion of a file or
|
||||||
|
deletion fails
|
||||||
|
|
||||||
|
* some cleanup
|
||||||
|
|
||||||
|
Thu Mar 1 03:49:11 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (showImage):
|
||||||
|
positioning is fixed now. Removed processEvents() after move(),
|
||||||
|
we don't seem to need this anymore. Actually, this was the cause
|
||||||
|
for bogus geometries.
|
||||||
|
|
||||||
|
Thu Mar 1 02:15:49 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imagewindow.cpp, src/imlibwidget.cpp:
|
||||||
|
upScale/downScale mostly works. Some WindowManager positioning
|
||||||
|
problems are left.
|
||||||
|
|
||||||
|
Tue Feb 27 23:30:11 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (viewerDeleted):
|
||||||
|
Fixed crash when the only image on the commandline couldn't be loaded
|
||||||
|
|
||||||
|
Sun Feb 25 23:22:30 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* config-dialog works now, everything is saved, loaded and resetting
|
||||||
|
defaults works, too. All the layout management rewritten (was still
|
||||||
|
Qt 1.x style). Default Image modifications work, including the preview.
|
||||||
|
Only need a nice preview image now :)
|
||||||
|
|
||||||
|
* src/imlibwidget.*:
|
||||||
|
fixed setFlipMode()
|
||||||
|
|
||||||
|
* src/filewidget.cpp (eventFilter):
|
||||||
|
fixed filefinder completion on first character
|
||||||
|
filefinder enters directory/opens image upon return now
|
||||||
|
|
||||||
|
* added nice new calibrate.png from qwertz, thanks!
|
||||||
|
|
||||||
|
Wed Jan 10 23:39:14 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* lots of work... getting closer. Commandline handling is really
|
||||||
|
fixed now %-} Handles multiple files just fine. The filefinder
|
||||||
|
sort of works now (only the sort-order is not considered, this
|
||||||
|
could get hairy, I'm afraid). Added browsing actions to toolbar
|
||||||
|
and shortcuts. Works quite nicely.
|
||||||
|
|
||||||
|
Fri Nov 3 14:32:53 2000 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imagewindow.cpp (setFullscreen):
|
||||||
|
cool, no need to workaround kwin's auto-maximization needed,
|
||||||
|
setMinimumSize() does it! Thanks Matthias Ettrich!
|
||||||
|
|
||||||
|
Fri Nov 3 13:23:41 2000 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/*:
|
||||||
|
some cleanups here and there
|
||||||
|
fixed commandline handling (dirs, files, absolute, relative)
|
||||||
|
made KURLWidget use KURLLabel (and fixed KURLLabel bugs)
|
||||||
|
|
||||||
|
Fri Nov 3 01:49:57 2000 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/*: some more work on the KDE2 port/integration. Workarounds for
|
||||||
|
kwin's auto-maximization added. Fullscreen works. Moving images inside
|
||||||
|
the window works properly again. NETWM/KWin handling is better now.
|
||||||
|
Also better handling of non-loadable files.
|
||||||
|
|
||||||
|
Will make it a kdeinit-loadable module (KLM) for fast startup-times
|
||||||
|
later.
|
||||||
|
|
||||||
|
Finally using it again reminds me how fast it is compared to, erm, the
|
||||||
|
other viewers :)
|
||||||
|
|
||||||
|
Thu Aug 31 01:48:55 2000 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/*: started reworking/rewriting the whole stuff to make it KDE2
|
||||||
|
ready. Now I have to pay for rewriting so much of kdelibs/kfile...
|
||||||
|
The good thing is: it's mostly about removing stuff from KuickShow
|
||||||
|
because the functionality is already in libkfile, now :)
|
||||||
|
|
||||||
|
Tue Sep 28 10:35:39 1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (resizeEvent):
|
||||||
|
ahh, fixed a seldom-happening segfault: when "preload images" was
|
||||||
|
turned on and kuickshow was started with an image as parameter (so that
|
||||||
|
the filebrowser was not shown in the beginning), it would segfault
|
||||||
|
in KuickShow::resizeEvent(). I even got a bugreport about such a
|
||||||
|
segfault a while ago, but I couldn't reproduce it and neither did the
|
||||||
|
reporter answer to my mail.
|
||||||
|
Anyway, this is fixed now.
|
||||||
|
|
||||||
|
* src/imagewindow.cpp (dragEnterEvent):
|
||||||
|
implemented preliminary drag/drop support from Konqueror
|
||||||
|
|
||||||
|
Sat Sep 25 18:30:32 1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imagewindow.cpp (saveImage):
|
||||||
|
(hopefully, untested) fixed bug, that an image was not saved with the
|
||||||
|
current size - the original size was used. Thanks for the report (and
|
||||||
|
for some other suggestions) go to Hugo Lopes <hugolopes@netc.pt>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp:
|
||||||
|
lots of other changes, fixes, there's no sense mentioning them all, as
|
||||||
|
a lot of stuff is being rewritten/restructured and many things have to
|
||||||
|
be fixed.
|
||||||
|
|
||||||
|
Tue Sep 14 23:57:18 1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imagewindow.cpp:
|
||||||
|
Ok, finally I took the time to restructure ImlibWidget.
|
||||||
|
Now there is a simple ImlibWidget, that can load and show images
|
||||||
|
and there is the powerful ImageWindow, that can do all the stuff, the
|
||||||
|
previous ImlibWidget did.
|
||||||
|
There is a nice object-oriented wrapper around ImlibImages named
|
||||||
|
KuickImage - I hated all those C-functions everywhere.
|
||||||
|
|
||||||
|
Additionally, the ImageWindow has fully configurable key-bindings.
|
||||||
|
|
||||||
|
And thanks to Vitor Fernandes <vitor_fernandes@SoftHome.net>
|
||||||
|
I got a Brazilian/Portuguese translation for KuickShow
|
||||||
|
|
||||||
|
Tue Jul 27 20:32:09 1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (setBusyCursor):
|
||||||
|
loading an image from disk could take quite some time (e.g. on NFS),
|
||||||
|
so show a busy cursor during that operation, too.
|
||||||
|
|
||||||
|
Thu Jul 22 21:26:11 1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (preloadImage):
|
||||||
|
Argh, fixed segfault - don't free the cached image, when it is the
|
||||||
|
current shown image as well (imCache == im). Occured when switching
|
||||||
|
back and forth between two images
|
||||||
|
|
||||||
|
Fri Jul 16 13:09:07 1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kfileview.cpp (refresh):
|
||||||
|
Oh well, thanks to Robert Hamberger <Robert.Hamberger@AUDI.DE>, I
|
||||||
|
fixed another (hopefully last, for the next time) segfault. SIGSEGV
|
||||||
|
happened, when opening the about-dialog, NOT giving the focus back
|
||||||
|
to the filebrowser and then pressing the "show-hidden-files-button"
|
||||||
|
twice.
|
||||||
|
|
||||||
|
* src/kuickconfigdlg.cpp (keyPressEvent):
|
||||||
|
fixed bug: pressing escape in config dialog didn't reenable the
|
||||||
|
toolbar button to open the dialog
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (autoRender):
|
||||||
|
LOTS of updates, the new configuration dialog sort of works now
|
||||||
|
- all image manipulations can be daisychained now, just call
|
||||||
|
setAutoRender( false ) and call updateImage() to apply (render)
|
||||||
|
configuration dialog makes use of this to show the settings in an
|
||||||
|
example image
|
||||||
|
- new and nice about dialog, also based on ImlibWidget :o)
|
||||||
|
|
||||||
|
|
||||||
|
Wed Jul 7 01:09:14 1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (loadImageInternal):
|
||||||
|
Applied patch from Thorsten Scheuermann <uddn@rz.uni-karlsruhe.de>
|
||||||
|
(autoscale images to screensize) - thanks!
|
||||||
|
|
||||||
|
Mon Jul 5 15:27:05 1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickconfigdlg.cpp (closeEvent):
|
||||||
|
Eieiei, introduced closeEvent() in configdialog, which just emits
|
||||||
|
cancelButtonPressed() - otherwise the Toolbarbutton wouldn't get
|
||||||
|
reenabled. Thanks to Thorsten Scheuermann for the bugreport!
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (deleteFile):
|
||||||
|
Uh oh, I really thought there were no segfaults in 0.6.6...
|
||||||
|
Thanks go to Vadim Zaliva, who proved me wrong :-} Just fixed that
|
||||||
|
core-dump, when trying to delete a directory.
|
||||||
|
|
||||||
|
Fri Jul 2 14:27:08 1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (initGUI):
|
||||||
|
moved some code around to delay creating the filebrowser and reading
|
||||||
|
the directory contents. If you give a filename on the commandline as
|
||||||
|
parameter, kuickshow will load the filebrowser first, when you really
|
||||||
|
want to.
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (desktopWidth):
|
||||||
|
kuickhow now honors the panel and window-frame-size when displaying
|
||||||
|
images in window-mode - the imagesize is properly adjusted in
|
||||||
|
auto-shrink mode
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (showImageOriginalSize):
|
||||||
|
fixed bug in window-mode: displaying image with "o" (original size)
|
||||||
|
didn't resize the window, if necessary
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (eventFilter):
|
||||||
|
Bugfix: when did I have that crazy idea to set the palette to black
|
||||||
|
in the filebrowser??? In certain cases, I got an almost completely
|
||||||
|
black Messagebox...
|
||||||
|
|
||||||
|
* src/kfileview.cpp (removeItem):
|
||||||
|
oups... segfault fixed: removing the very first item in the
|
||||||
|
filebrowser caused crash
|
||||||
|
|
||||||
|
Sat Jun 26 22:47:05 1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/fileview.cpp (changeDirDialog):
|
||||||
|
goto-dialog (ctrl-g) accepts ~ and replaces it with your homedirectory
|
||||||
|
I love ideas, that can be implemented in half a minute :o)
|
||||||
|
|
||||||
|
Mon May 31 12:08:41 1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (setFullscreen):
|
||||||
|
Save and restore the geometry when switching between fullscreen and
|
||||||
|
window mode. Much nicer now :o)
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (showImage):
|
||||||
|
Honor kpanel's placement, when showing the first image. Don't just move
|
||||||
|
it to (0,0), but use KWM::geometry().
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (showImageOriginalSize):
|
||||||
|
implemented Shortcut "o" to show image in the original size. Useful when
|
||||||
|
autoscaling is active and you want the original size (e.g. scaled text
|
||||||
|
is hardly readable).
|
||||||
|
|
||||||
|
Mon May 31 02:24:56 1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* updated polish translation, many thanks to Krzysztof P. Jasiutowicz
|
||||||
|
|
||||||
|
* added german documentation, many thanks to Robert Hamberger,
|
||||||
|
who also enlargened the TODO-list :-P
|
||||||
|
|
||||||
|
Fri May 28 11:48:46 1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (mouseMoveEvent, mouseReleaseEvent):
|
||||||
|
several cleanups (replaced bool shiftPressed with the appropriate
|
||||||
|
QEvent::state() & ShiftButton in the eventhandlers)
|
||||||
|
|
||||||
|
* fixed bug: Shift + MousePress + MouseRelease without moving the mouse
|
||||||
|
moved the image to the lower right corner
|
||||||
|
|
||||||
|
* implemented "close image on doubleclick", as suggested by Ralph
|
||||||
|
Bernecker. Also put Close into popupmenu.
|
||||||
|
|
||||||
|
* improved cache of preloaded image, now stores the actual rendered
|
||||||
|
Pixmap -> a preloaded image shows almost before you press "next image"
|
||||||
|
;-) It can't get faster now. I only could cache more than one pixmap...
|
||||||
|
hmm, maybe later
|
||||||
|
|
||||||
|
* updated documentation
|
||||||
|
|
||||||
|
Tue May 18 21:19:32 1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kfileview.cpp (refresh):
|
||||||
|
sorting does somehow work. Some code seems to be duplicated in
|
||||||
|
KFileInfoContents and KDir - both offer sorting. However, both
|
||||||
|
don't work 100% :-/ Anyway, if you have KDE 1.1.1, sorting should
|
||||||
|
work, it is disabled for earlier releases, as there was a segfault
|
||||||
|
problem in kfile (nobody ever seemed to use KFileInfoContent's sorting,
|
||||||
|
so that was never realized).
|
||||||
|
|
||||||
|
* src/kfileview.cpp, src/fileview.cpp:
|
||||||
|
some minor fixlets: always try to highlight the last active file,
|
||||||
|
whenever the directory contents are updated
|
||||||
|
|
||||||
|
* src/kuickconfigdlg.cpp (several):
|
||||||
|
changed the two KIntLineEdits to more appropriate QSpinBoxes
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (setFullscreen, several),
|
||||||
|
* src/kuickshow.cpp (several)
|
||||||
|
FINALLY got the fullscreen/kpanel thing together
|
||||||
|
KDE 1.1 introduced KWM::staysOnTop, but unfortunately "on top" meant
|
||||||
|
"below kpanel". Since KDE 1.1.1, on top means on top :o) Even more
|
||||||
|
unfortunately, this revealed several problems with focus handling and
|
||||||
|
other widgets on top of the "top"-widget. So I used a timer, check
|
||||||
|
the focusevents and tell kwm when to make us the top widget, and when
|
||||||
|
not.
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp, src/kuickshow.cpp
|
||||||
|
improved handling of multiple windows - always the window which last
|
||||||
|
had the focus will load new images
|
||||||
|
|
||||||
|
* src/kuickdata.cpp, src/kuickconfigdlg.cpp, src/kuickshow.cpp
|
||||||
|
configurable: open all images in one window, or open a new window
|
||||||
|
|
||||||
|
Sat Apr 17 18:43:03 1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (setToolbarPosition):
|
||||||
|
added methods to (re)store the toolbar position
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp:
|
||||||
|
changed fullscreen code to use the current (and hopefully final) way
|
||||||
|
KWM does "stayOnTop"
|
||||||
|
|
||||||
|
* src/kuickdata.cpp:
|
||||||
|
updated file filters (Photoshop psd and bmp)
|
||||||
|
|
||||||
|
* src/kfileview.cpp:
|
||||||
|
changed the kdir behavior, so that the browser displays files
|
||||||
|
altogether at once, not incrementally. This also let me (finally,
|
||||||
|
yippeee :-P) highlight the last direcory, where you came from.
|
||||||
|
And reading directories is a bit faster now, too.
|
||||||
|
|
||||||
|
Sun Feb 21 16:02:44 1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (zoomImage):
|
||||||
|
added minimum and maximum sizes for zooming images (thanks to
|
||||||
|
Robert Hamberger for the idea (and for some funny emails :-P))
|
||||||
|
|
||||||
|
* src/kwm-workaround.h (keepOnTop):
|
||||||
|
added Matthias' workaround for "always on top"-problem in fullscreen
|
||||||
|
mode, which was introduced with KWM-changes just before KDE 1.1
|
||||||
|
... too bad it doesn't work :-/ Gotta spend some time finding out, why
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (showImage):
|
||||||
|
always move the first opened image-window to 0x0 (top left)
|
||||||
|
(thanks to Andreas Gelezun for the idea)
|
||||||
|
|
||||||
|
Thu Feb 4 11:40:50 1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* doc/en/index.html:
|
||||||
|
updated documentation
|
||||||
|
|
||||||
|
Wed Feb 3 22:43:32 1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (KuickShow):
|
||||||
|
implemented deletion of files (delete/shift-delete/popupmenu)
|
||||||
|
|
||||||
|
fixed quite a few buglets with keyboard navigation (pageUp didn't
|
||||||
|
halt when a directory was found). pageUp/down and the like shall only
|
||||||
|
select files.
|
||||||
|
|
||||||
|
worked around kwm-bug (resize doesn't work properly after
|
||||||
|
KWM::setDecoration( noDecoration )
|
||||||
|
|
||||||
|
Tue Dec 29 16:55:11 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickshow.cpp, imlibwidget.cpp, kfileview.*:
|
||||||
|
fixed updating of directory in statusbar and filename in caption of
|
||||||
|
imlibwidget
|
||||||
|
|
||||||
|
fileview is prepared to support sorting and filtering
|
||||||
|
|
||||||
|
added toggle showing hidden files (accessible via toolbar)
|
||||||
|
|
||||||
|
added Home-Button in toolbar to change to home directory
|
||||||
|
|
||||||
|
Wed Nov 18 15:40:46 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (mouseMoveEvent):
|
||||||
|
|
||||||
|
fixed cursor not being reset to arrorCursor, when shift-key was
|
||||||
|
released during resize ( == abort resizing )
|
||||||
|
|
||||||
|
Wed Nov 18 15:09:36 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (saveSettings):
|
||||||
|
|
||||||
|
size of the browserwindow is now saved and restored on next start
|
||||||
|
|
||||||
|
Mon Nov 9 23:16:32 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* hopefully fixed autoconf stuff, which was broken at least on SunOS
|
||||||
|
Now tries to detect imlib-config and links against
|
||||||
|
`imlib-config --libs`. If this doesn't work, it links against
|
||||||
|
every graphics lib of libgif, libjpeg, libtiff and libpng, that
|
||||||
|
is available.
|
||||||
|
Another little bug is fixed, any changes (contrast/brightness/gamma)
|
||||||
|
were not saved when using "save as"
|
||||||
|
|
||||||
|
Sat Nov 7 15:22:18 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp
|
||||||
|
added changing of brightness, contrast and gamma via keyboard and popup menu
|
||||||
|
added saving image
|
||||||
|
the factor, how much brightness/contrast/gamma you change with one click is
|
||||||
|
only editable in configfile, no dialog, yet.
|
||||||
|
|
||||||
|
Sat Nov 7 12:57:48 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* acinclude.m4 (ac_imlib_config):
|
||||||
|
added some configure-stuff to use `imlib-config' to determine the libs
|
||||||
|
to be linked against.
|
||||||
|
|
||||||
|
Sun Oct 11 23:58:46 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (loadImageInternal):
|
||||||
|
added configuration option to not override the color palette
|
||||||
|
useful for 8bit displays
|
||||||
|
|
||||||
|
* src/kuickshow.cpp:
|
||||||
|
fixed segfault when imlib can't load image
|
||||||
|
(don't preload the next image, then)
|
||||||
|
|
||||||
|
Wed Sep 30 19:39:15 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* acinclude.m4, configure.in:
|
||||||
|
Added a configure-check for Imlib. Still incomplete (does NOT
|
||||||
|
check for all those other libs as libgif, libjpeg, libz, ...),
|
||||||
|
but at least finds libImlibs which are too old.
|
||||||
|
|
||||||
|
src/kuickshow.cpp (about):
|
||||||
|
about dialog is centered, now
|
||||||
|
|
||||||
|
Fri Sep 25 19:32:13 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (keyPressEvent):
|
||||||
|
Now behavior of scrolling/zooming with mouse is fixed:
|
||||||
|
pressing left mousebutton and moving the mouse will move the image
|
||||||
|
(only if it image is larger than current window)
|
||||||
|
|
||||||
|
Pressing Shift, left mousebutton and moving the mouse will zoom into
|
||||||
|
the image. Releasing Shift-button before mousebutton will abort zooming
|
||||||
|
|
||||||
|
Thu Sep 24 02:41:26 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (mouseReleaseEvent):
|
||||||
|
Ahh, finally I got "zoom inside image with mouse" working perfectly.
|
||||||
|
A rectangle is painted and this rectangle is zoomed and centered.
|
||||||
|
Not the very best solution, tho, as imlib is zooming the entire
|
||||||
|
image, not only the selected part... guess how long it can take for
|
||||||
|
bigger images.
|
||||||
|
Gotta find another solution later, creating a new imlib image with
|
||||||
|
just the selected part.
|
||||||
|
|
||||||
|
Tue Sep 22 21:05:58 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (preloadImage):
|
||||||
|
Added preloading facility. Fills the cache with the next image, so it
|
||||||
|
will pop up almost instantaneously, when pressing PageUp/Down.
|
||||||
|
Configurable via dialog.
|
||||||
|
|
||||||
|
Mon Sep 21 16:29:56 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (eventFilter):
|
||||||
|
Added "Enter-key", that reloads current image (so all zoom/move stuff
|
||||||
|
is restored to original settings).
|
||||||
|
|
||||||
|
Sun Sep 20 19:04:23 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kfileview.cpp (prev):
|
||||||
|
whoops, fixed a segfault, when trying to get a kfileinfo of index -1.
|
||||||
|
I shouldn't check, whether an unsigned int is smaller than 0, which it
|
||||||
|
actually was. Now uses int.
|
||||||
|
|
||||||
|
Sun Sep 20 13:35:00 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (closeEvent):
|
||||||
|
reverted to override closeEvent() and changed every occurrence of
|
||||||
|
close( true ) to close( false ), as closeEvent now explicitely
|
||||||
|
deletes itself.
|
||||||
|
This was due to windowmanagers close-button, which should delete widget
|
||||||
|
|
||||||
|
Sun Sep 20 03:08:45 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (printImage):
|
||||||
|
added preliminary support for printing
|
||||||
|
|
||||||
|
Sat Sep 19 01:40:22 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (rotate):
|
||||||
|
added rotate-routine to - doh - rotate an image
|
||||||
|
|
||||||
|
Fri Sep 18 01:08:46 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (scrollImage):
|
||||||
|
Now changes cursor when attempting to move the image with the mouse
|
||||||
|
Also, image can be moved now, when in window mode and window is
|
||||||
|
larger than desktop
|
||||||
|
|
||||||
|
Thu Sep 17 17:25:11 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (setPopupMenu):
|
||||||
|
the fix for the popupmenu also let me finally delete it without
|
||||||
|
segfault :o)
|
||||||
|
|
||||||
|
Thu Sep 17 13:13:09 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/kuickconfigdlg.cpp (KuickConfigDialog):
|
||||||
|
enlargened maxCache lineedit and changed tooltip
|
||||||
|
|
||||||
|
* src/imlibconfig.cpp
|
||||||
|
changed default value for maxCache from 0 to 10000 (10megs)
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (scrollImage):
|
||||||
|
restricted scrolling so that you can move the image only
|
||||||
|
if it doesn't fit onto the screen.
|
||||||
|
You can't move the image out of the screen anymore.
|
||||||
|
|
||||||
|
Also fixed a segfault (ugh) in viewerMenu->popup(), as it was
|
||||||
|
initialized in the wrong place (now in initImlib()).
|
||||||
|
|
||||||
|
|
||||||
|
Thu Sep 17 00:11:53 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (loadImage):
|
||||||
|
re-enabled Imlib_destroy_image()
|
||||||
|
Found another value in imlib configuration struct, pixmapcachesize
|
||||||
|
which I wasn't aware of. Now limiting imlib's cache really works :o))
|
||||||
|
I'm really happy now :-) Running out of Ram and even Swap is not too
|
||||||
|
funny ;o)
|
||||||
|
|
||||||
|
Tue Sep 15 20:28:49 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (centerImage):
|
||||||
|
fixed images not centering when larger than screen and in fullscreen
|
||||||
|
mode.
|
||||||
|
|
||||||
|
|
||||||
|
Tue Sep 15 14:06:27 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (mouseMoveEvent):
|
||||||
|
scrolling the image with the mouse is now possible. Didn't expect
|
||||||
|
scrolling would be so smooth :o)
|
||||||
|
Also added a popupmenu (ImlibWidget::setPopupmenu( bool )) for
|
||||||
|
the basic features like zoom and flip image
|
||||||
|
|
||||||
|
Mon Sep 14 16:20:30 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/fileview.cpp/.h
|
||||||
|
* src/kfileview.cpp/.h
|
||||||
|
* src/kuickshow.cpp
|
||||||
|
added "change directory" possibility. A dialog asks for a directory
|
||||||
|
and the fileview is being updated. Either accessible via the
|
||||||
|
popupmenu, or via Ctrl-g (goto)
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (KuickShow):
|
||||||
|
once again optimized commandline parsing
|
||||||
|
|
||||||
|
Mon Sep 14 13:24:40 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* funny, I added lots of stuff, moved some other stuff around and
|
||||||
|
the result is a binary about 30k smaller than before :-D
|
||||||
|
|
||||||
|
* src/fileview.cpp (findCompletion):
|
||||||
|
*strike* now even filecompletion works :-) If you hit some keys
|
||||||
|
on your keyboard, while in the filebrowser, a small edit window pops
|
||||||
|
up in the bottom-right corner. Just type in the first chars of the
|
||||||
|
filename of the image you want to see, and it will be highlighted.
|
||||||
|
|
||||||
|
* src/kuickshow.cpp, src/imlibwidget.h/.cpp:
|
||||||
|
Cool. Now, I have only one ImlibData object, so I share imlib's
|
||||||
|
cache between all open windows. This does not only speed things
|
||||||
|
up quite a bit, but also reduced memory usage with multiple open
|
||||||
|
windows.
|
||||||
|
ImlibWidget therefore has a new constructor, where you can pass the
|
||||||
|
pointer to the ImlibData object.
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (ImlibWidget):
|
||||||
|
now creates an ImlibConfig object itself, when none has been given
|
||||||
|
in the contructor
|
||||||
|
|
||||||
|
Sun Sep 13 23:28:31 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
* src/imlibwidget.cpp (renderImage):
|
||||||
|
Don't destroy images ( Imlib_destroy_image() ) anymore. This boosts
|
||||||
|
browsing a LOT. Showing cached images is almosts instantaneous now!
|
||||||
|
Hope there's no sideeffect on this :-}
|
||||||
|
|
||||||
|
* src/kuickshow.cpp (eventFilter):
|
||||||
|
space toggles show()ing and hide()ing the browser now.
|
||||||
|
If started with image as parameter, kuickshow doesn't show
|
||||||
|
the browser, hit space to show it.
|
||||||
|
|
||||||
|
* src/fileview.h (class FileView):
|
||||||
|
findCompletion() is now public, so that I can tell the browser
|
||||||
|
to highlight the file, supplied via commandline.
|
||||||
|
|
||||||
|
|
||||||
|
History:
|
||||||
|
--------
|
||||||
|
- found that xemacs can create much better changelogs :o)
|
||||||
|
- hacked a lot of goodies into KuickShow, several configuration options
|
||||||
|
- decided to have a look at the Xlib stuff and found out, how to map
|
||||||
|
an Imlib image onto any QWidget - this is cool :o)
|
||||||
|
- too bad, it was not very reliable and it was a mess, too
|
||||||
|
- with my Xlib non-knowledge, found a way to "swallow" an Imlib image
|
||||||
|
onto a QWidget - imagine how happy I was :o)
|
||||||
|
- if Kopacz got Imlib to work, I could do that, too :-P
|
||||||
|
- end of August 98, saw Adam Kopacz' release of qiv (quick image viewer)
|
||||||
|
damn, this was my name (kiv, kuick image viewer) :o(
|
||||||
|
- first tries to use Imlib to display on Qt/KDE widgets in April 98,
|
||||||
|
too bad, it didn't work :o(
|
||||||
|
- first hack of kview to use a filebrowser in January
|
||||||
|
- had the idea for such an app about December 97
|
||||||
|
</pre>
|
@ -0,0 +1,8 @@
|
|||||||
|
SUBDIRS = src misc pics
|
||||||
|
|
||||||
|
kuickshow-package:
|
||||||
|
@export CVSROOT=`cat CVS/Root`; \
|
||||||
|
kuickdir=$$PWD; \
|
||||||
|
kuickver=`cat src/version.h | grep define | cut -f3 -d' ' | sed -e 's/"//g'`; \
|
||||||
|
cd /tmp; \
|
||||||
|
cvs2dist `dirname $$kuickdir` kuickshow --remove-hidden --version $$kuickver $$kuickdir/TODO $$kuickdir/BUGS $$kuickdir/kuickshow.lsm $$kuickdir/kuickshow.spec $$kuickshow/../Makefile.cvs
|
@ -0,0 +1,8 @@
|
|||||||
|
KuickShow v0.8
|
||||||
|
Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
KuickShow is a very fast and comfortable imageviewer, somewhat inspired
|
||||||
|
by ACDSee (early versions :)
|
||||||
|
|
||||||
|
See http://devel-home.kde.org/~pfeiffer/kuickshow/ for updated versions,
|
||||||
|
see ChangeLog for what has changed.
|
@ -0,0 +1,24 @@
|
|||||||
|
toolbar in imageviewer
|
||||||
|
|
||||||
|
- Ctrl-S = Save current, Shift-Ctrl-S = Filedialog
|
||||||
|
|
||||||
|
- allow to split browser into subwindows (multiple browsers)
|
||||||
|
- mouse-usage better (e.g. left button = next image, middle button = previous
|
||||||
|
image, all configurable)
|
||||||
|
- anim-gif support (QMovie perhaps)
|
||||||
|
- cropping images (via Imlib_clone_scaled_image & Imlib_crop_and_clone_image())
|
||||||
|
- thumbnail view, treeview
|
||||||
|
- menubar (same as popupmenu) (abschaltbar) (mac-mode!)
|
||||||
|
|
||||||
|
- configure-dialog: offer a directory to copy files to -> one click copies to it
|
||||||
|
- rename/delete into popupmenu of imagewindow
|
||||||
|
|
||||||
|
- if image not readable -> no nagscreen, jump to next image
|
||||||
|
- network transparency with kio
|
||||||
|
|
||||||
|
- small preview in browser window
|
||||||
|
- bookmarks?
|
||||||
|
- generate wallpaper (background desktop image)
|
||||||
|
- display more image information (resolution, color depth, image comments...)
|
||||||
|
- better slideshow (randomize, pause/continue, reverse, ...)
|
||||||
|
- what else?
|
@ -0,0 +1,9 @@
|
|||||||
|
if test -z "$LIB_IMLIB"; then
|
||||||
|
echo ""
|
||||||
|
echo "You're missing Imlib 1.x. The graphics browser/viewer KuickShow"
|
||||||
|
echo "won't be compiled without Imlib."
|
||||||
|
echo "You can download it from"
|
||||||
|
echo "http://freshmeat.net/redir/imlib/4385/url_tgz/imlib-1.9.10.tar.gz"
|
||||||
|
echo ""
|
||||||
|
all_tests=bad
|
||||||
|
fi
|
@ -0,0 +1,69 @@
|
|||||||
|
#MIN_CONFIG
|
||||||
|
|
||||||
|
#AM_INIT_AUTOMAKE(kuickshow,0.8.2)
|
||||||
|
|
||||||
|
# my own additions to KDE's version
|
||||||
|
#
|
||||||
|
# checking for Imlib...
|
||||||
|
|
||||||
|
AC_DEFUN([KDE_FIND_IMLIB_CONFIG],
|
||||||
|
[AC_MSG_CHECKING([for imlib-config])
|
||||||
|
|
||||||
|
imlib_config_given=NO
|
||||||
|
ac_imlib_config=""
|
||||||
|
|
||||||
|
AC_ARG_WITH(imlib-config,
|
||||||
|
AC_HELP_STRING([--with-imlib-config=DIR],[directory where "imlib-config" is located]),
|
||||||
|
[ ac_imlib_config="$withval/imlib-config"
|
||||||
|
imlib_config_given=yes
|
||||||
|
])
|
||||||
|
|
||||||
|
if test "$imlib_config_given" = "yes"; then
|
||||||
|
if test ! -r $ac_imlib_config; then
|
||||||
|
AC_MSG_RESULT(wrong file specified)
|
||||||
|
ac_imlib_config=""
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT($ac_imlib_config)
|
||||||
|
LIB_IMLIB=`$ac_imlib_config --libs`
|
||||||
|
AC_SUBST(LIB_IMLIB)
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
ac_imlib_config=`which imlib-config 2>/dev/null`
|
||||||
|
if test -z "$ac_imlib_config"; then
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
else
|
||||||
|
dummy=`echo "$ac_imlib_config" | grep '/imlib-config'`
|
||||||
|
if test -z "$dummy"; then
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
ac_imlib_config=""
|
||||||
|
else
|
||||||
|
LIB_IMLIB=`$ac_imlib_config --libs`
|
||||||
|
IMLIB_CFLAGS=`$ac_imlib_config --cflags`
|
||||||
|
imlib_config=`echo "$LIB_IMLIB" | grep lImlib`
|
||||||
|
if test -z "$imlib_config"; then
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
ac_imlib_config=""
|
||||||
|
else
|
||||||
|
AC_SUBST(LIB_IMLIB)
|
||||||
|
AC_SUBST(IMLIB_CFLAGS)
|
||||||
|
AC_MSG_RESULT($ac_imlib_config)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl #### now some kuickshow stuff ###
|
||||||
|
dnl Check if Imlib is installed properly
|
||||||
|
KDE_PKG_CHECK_MODULES(IMLIB, imlib >= 1.9.10,
|
||||||
|
LIB_IMLIB=$IMLIB_LIBS
|
||||||
|
AC_SUBST(LIB_IMLIB)
|
||||||
|
,
|
||||||
|
KDE_FIND_IMLIB_CONFIG
|
||||||
|
)
|
||||||
|
|
||||||
|
if test -z "$LIB_IMLIB"; then
|
||||||
|
dnl AC_MSG_ERROR([You need to install Imlib 1.x, e.g. http://freshmeat.net/redir/imlib/4385/url_tgz/imlib-1.9.10.tar.gz if your distributor doesn't have a package])
|
||||||
|
DO_NOT_COMPILE="$DO_NOT_COMPILE kuickshow"
|
||||||
|
fi
|
@ -0,0 +1,18 @@
|
|||||||
|
Begin3
|
||||||
|
Title: KuickShow
|
||||||
|
Version: 0.8.5
|
||||||
|
Entered-date: August 2001
|
||||||
|
Description: KuickShow is a very fast image viewer, that lets you easily
|
||||||
|
browse large galleries. A builtin filebrowser and manager
|
||||||
|
is also available. Usage is somewhat inspired by ACDSee.
|
||||||
|
Keywords: KDE Qt Graphics Images Imageviewer Imlib
|
||||||
|
Author: Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
Maintained-by: Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
Home-page: http://devel-home.kde.org/~pfeiffer/kuickshow/
|
||||||
|
Alternate-site: ftp://ftp.kde.org/pub/kde/stable/apps/graphics/
|
||||||
|
Primary-site: http://devel-home.kde.org/~pfeiffer/kuickshow/
|
||||||
|
xxxxxx kuickshow-0.8.5.tar.gz
|
||||||
|
xxx kuickshow-0.8.5.lsm
|
||||||
|
Platform: Unix. Needs Qt >= 3.0.4, KDE (kdelibs) >= 3.0 and Imlib 1.x
|
||||||
|
Copying-policy: GPL
|
||||||
|
End
|
@ -0,0 +1,69 @@
|
|||||||
|
%define version 0.8.5
|
||||||
|
%define release 1
|
||||||
|
%define serial 1
|
||||||
|
%define prefix /opt/kde3
|
||||||
|
|
||||||
|
Name: kuickshow
|
||||||
|
Summary: KuickShow -- A very fast image viewer/browser
|
||||||
|
Version: %{version}
|
||||||
|
Release: %{release}
|
||||||
|
Serial: %{serial}
|
||||||
|
Source: http://devel-home.kde.org/~pfeiffer/kuickshow/kuickshow-%{version}.tar.gz
|
||||||
|
URL: http://devel-home.kde.org/~pfeiffer/kuickshow/
|
||||||
|
Copyright: GPL
|
||||||
|
Packager: Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
Group: X11/KDE/Graphics
|
||||||
|
BuildRoot: /tmp/kuickshow-%{version}-root
|
||||||
|
Prefix: %{prefix}
|
||||||
|
|
||||||
|
%description
|
||||||
|
KuickShow is a very fast image viewer, that lets you easily
|
||||||
|
browse large galleries. A builtin filebrowser and manager
|
||||||
|
is also available. Usage is somewhat inspired by ACDSee.
|
||||||
|
It supports many fileformats, e.g. jpeg, gif, png, psd, bmp,
|
||||||
|
tiff, xpm, xbm, xcf, eim, ...
|
||||||
|
|
||||||
|
KuickShow has a nice user interface, that allows you to browse large amounts
|
||||||
|
of images in a short time. It can zoom, mirror, rotate images, adjust
|
||||||
|
brightness, contrast and gamma and can do a slideshow, of course.
|
||||||
|
It is fully configurable through dialogs.
|
||||||
|
|
||||||
|
Besides that, it offers a nice filebrowser with basic filemanager capabilities
|
||||||
|
like renaming, deleting, creating directories, ...
|
||||||
|
|
||||||
|
Install with '--prefix $KDEDIR' unless you have the kde-config program.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%setup -n kuickshow-%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
PREFIX=""
|
||||||
|
which kde-config || PREFIX=%{prefix}
|
||||||
|
if test -z "$PREFIX"; then
|
||||||
|
PREFIX=`kde-config --prefix`
|
||||||
|
fi
|
||||||
|
|
||||||
|
export KDEDIR="$PREFIX"
|
||||||
|
CXXFLAGS="$RPM_OPT_FLAGS -fno-exceptions -pipe" LDFLAGS=-s ./configure --prefix="$PREFIX" --enable-final --disable-debug
|
||||||
|
mkdir -p $RPM_BUILD_ROOT
|
||||||
|
make
|
||||||
|
|
||||||
|
%install
|
||||||
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
cd $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.%{name}
|
||||||
|
|
||||||
|
find . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name}
|
||||||
|
|
||||||
|
find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name}
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
rm -f $RPM_BUILD_DIR/file.list.%{name}
|
||||||
|
|
||||||
|
%files -f ../file.list.%{name}
|
||||||
|
|
@ -0,0 +1,2 @@
|
|||||||
|
pal_DATA = im_palette.pal
|
||||||
|
paldir = $(kde_datadir)/kuickshow
|
@ -0,0 +1,64 @@
|
|||||||
|
0x0 0x0 0x0
|
||||||
|
0xff 0xff 0xff
|
||||||
|
0xff 0x0 0x0
|
||||||
|
0xff 0xff 0x0
|
||||||
|
0x0 0xff 0x0
|
||||||
|
0x0 0x0 0xff
|
||||||
|
0x0 0xff 0xff
|
||||||
|
0x99 0x99 0x99
|
||||||
|
0xff 0x88 0x0
|
||||||
|
0x88 0x0 0x0
|
||||||
|
0x0 0x88 0x88
|
||||||
|
0x88 0x88 0x0
|
||||||
|
0xff 0xcc 0x97
|
||||||
|
0xbb 0xbb 0xbb
|
||||||
|
0x9f 0x6b 0x42
|
||||||
|
0x55 0x55 0x55
|
||||||
|
0xdd 0xdd 0xdd
|
||||||
|
0x77 0x77 0x77
|
||||||
|
0x33 0x33 0x33
|
||||||
|
0xcc 0x0 0x0
|
||||||
|
0xff 0x44 0x0
|
||||||
|
0xff 0xcc 0x0
|
||||||
|
0xcc 0xcc 0x0
|
||||||
|
0x60 0x60 0x0
|
||||||
|
0x0 0x43 0x0
|
||||||
|
0x0 0x7f 0x0
|
||||||
|
0x0 0xcc 0x0
|
||||||
|
0x0 0x44 0x44
|
||||||
|
0x0 0x0 0x44
|
||||||
|
0x0 0x0 0x88
|
||||||
|
0xef 0xb1 0x7b
|
||||||
|
0xdf 0x98 0x5f
|
||||||
|
0xbf 0x87 0x56
|
||||||
|
0x7f 0x57 0x26
|
||||||
|
0x5f 0x39 0xc
|
||||||
|
0x3f 0x1c 0x0
|
||||||
|
0x21 0x0 0x0
|
||||||
|
0x0 0x43 0x87
|
||||||
|
0x2d 0x70 0xaf
|
||||||
|
0x5a 0x9e 0xd7
|
||||||
|
0x87 0xcc 0xff
|
||||||
|
0xff 0xe0 0xba
|
||||||
|
0x21 0x43 0xf
|
||||||
|
0x3d 0x5d 0x25
|
||||||
|
0x59 0x78 0x3a
|
||||||
|
0x75 0x93 0x4f
|
||||||
|
0x91 0xae 0x64
|
||||||
|
0xad 0xc8 0x7a
|
||||||
|
0xf0 0xa8 0xef
|
||||||
|
0xd0 0x88 0xd0
|
||||||
|
0xaf 0x66 0xaf
|
||||||
|
0x8e 0x44 0x8e
|
||||||
|
0x6d 0x22 0x6d
|
||||||
|
0x4b 0x0 0x4b
|
||||||
|
0xff 0xc0 0xbc
|
||||||
|
0xff 0x93 0x91
|
||||||
|
0xff 0x66 0x67
|
||||||
|
0xd8 0xf2 0xbf
|
||||||
|
0xff 0xc9 0x68
|
||||||
|
0xff 0x96 0x67
|
||||||
|
0xa5 0x60 0xff
|
||||||
|
0x51 0xff 0x99
|
||||||
|
0x3f 0xa5 0x63
|
||||||
|
0x98 0x90 0x67
|
@ -0,0 +1,7 @@
|
|||||||
|
# Add all of your pixmaps here
|
||||||
|
pics_DATA = calibrate.png kuickshow-day.jpg kuickshow-night.jpg logo.png \
|
||||||
|
imageviewer-medium.png imageviewer-small.png handcursor.png \
|
||||||
|
ksslide.png about.png
|
||||||
|
|
||||||
|
# This is where it will all be installed
|
||||||
|
picsdir = $(kde_datadir)/kuickshow/pics
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
Binary file not shown.
@ -0,0 +1,31 @@
|
|||||||
|
## Makefile.am for kuickshow
|
||||||
|
|
||||||
|
bin_PROGRAMS =
|
||||||
|
lib_LTLIBRARIES =
|
||||||
|
kdeinit_LTLIBRARIES = kuickshow.la
|
||||||
|
|
||||||
|
# set the include path for X, qt and KDE
|
||||||
|
INCLUDES = $(all_includes)
|
||||||
|
KDE_CXXFLAGS = $(IMLIB_CFLAGS)
|
||||||
|
METASOURCES = AUTO
|
||||||
|
|
||||||
|
kuickshow_la_LDFLAGS = $(all_libraries) -module -avoid-version
|
||||||
|
kuickshow_la_LIBADD = $(LIB_KDEPRINT) $(LIB_IMLIB)
|
||||||
|
kuickshow_la_SOURCES = kuickshow.cpp \
|
||||||
|
aboutwidget.cpp generalwidget.cpp kuickconfigdlg.cpp main.cpp \
|
||||||
|
defaultswidget.cpp imagewindow.cpp kuickdata.cpp \
|
||||||
|
imdata.cpp filefinder.cpp kurlwidget.cpp filewidget.cpp \
|
||||||
|
kuick.cpp imlibwidget.cpp slideshowwidget.cpp printing.cpp \
|
||||||
|
kuickfile.cpp kuickimage.cpp filecache.cpp
|
||||||
|
|
||||||
|
# if you "make distclean", this files get removed. If you want to remove
|
||||||
|
# them while "make clean", use CLEANFILES
|
||||||
|
DISTCLEANFILES = $(METASOURCES)
|
||||||
|
|
||||||
|
messages:
|
||||||
|
$(XGETTEXT) *.cpp *.h -o $(podir)/kuickshow.pot
|
||||||
|
|
||||||
|
KDE_ICON = kuickshow
|
||||||
|
|
||||||
|
# this is where the kdelnk file will go
|
||||||
|
xdg_apps_DATA = kuickshow.desktop
|
@ -0,0 +1,95 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2002 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <qdatetime.h>
|
||||||
|
#include <qevent.h>
|
||||||
|
#include <qglobal.h>
|
||||||
|
#include <qgroupbox.h>
|
||||||
|
#include <qlabel.h>
|
||||||
|
|
||||||
|
#include <kwin.h>
|
||||||
|
#include <kstandarddirs.h>
|
||||||
|
|
||||||
|
#include "imlibwidget.h"
|
||||||
|
#include "kurlwidget.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
#include "aboutwidget.h"
|
||||||
|
|
||||||
|
AboutWidget::AboutWidget( QWidget *parent, const char *name )
|
||||||
|
: QVBox( parent, name, Qt::WShowModal )
|
||||||
|
{
|
||||||
|
KWin::setType( winId(), NET::Override );
|
||||||
|
KWin::setState( winId(), NET::SkipTaskbar );
|
||||||
|
|
||||||
|
setFrameStyle( WinPanel | Raised );
|
||||||
|
|
||||||
|
QGroupBox *gBox = new QGroupBox( 1, Horizontal, this);
|
||||||
|
gBox->setGeometry( 10, 10, width()-20, height()-20 );
|
||||||
|
gBox->setAlignment( AlignHCenter );
|
||||||
|
gBox->installEventFilter( this );
|
||||||
|
|
||||||
|
gBox->setPalette( QPalette( QColor( white ) ) );
|
||||||
|
gBox->setBackgroundMode( PaletteBackground );
|
||||||
|
|
||||||
|
int hour = QTime::currentTime().hour();
|
||||||
|
QString file;
|
||||||
|
|
||||||
|
if ( hour >= 10 && hour < 16 )
|
||||||
|
file = locate("appdata", "pics/kuickshow-day.jpg");
|
||||||
|
else
|
||||||
|
file = locate("appdata", "pics/kuickshow-night.jpg");
|
||||||
|
|
||||||
|
QLabel *authors = new QLabel("Kuickshow " KUICKSHOWVERSION
|
||||||
|
" was brought to you by", gBox);
|
||||||
|
authors->setAlignment( AlignCenter );
|
||||||
|
|
||||||
|
m_homepage = new KURLWidget("Carsten Pfeiffer", gBox);
|
||||||
|
m_homepage->setURL( "http://devel-home.kde.org/~pfeiffer/kuickshow/" );
|
||||||
|
m_homepage->setAlignment( AlignCenter );
|
||||||
|
|
||||||
|
QLabel *copy = new QLabel("(C) 1998-2006", gBox);
|
||||||
|
copy->setAlignment( AlignCenter );
|
||||||
|
|
||||||
|
ImlibWidget *im = new ImlibWidget( 0L, gBox, "KuickShow Logo" );
|
||||||
|
if ( im->loadImage( file ) )
|
||||||
|
im->setFixedSize( im->width(), im->height() );
|
||||||
|
else {
|
||||||
|
delete im;
|
||||||
|
im = 0L;
|
||||||
|
qWarning( "KuickShow: about-image not found/unreadable." );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AboutWidget::~AboutWidget()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool AboutWidget::eventFilter( QObject *o, QEvent *e )
|
||||||
|
{
|
||||||
|
if ( e->type() == QEvent::MouseButtonPress ) {
|
||||||
|
QMouseEvent *ev = static_cast<QMouseEvent*>( e );
|
||||||
|
if ( !m_homepage->geometry().contains( ev->pos() ) ) {
|
||||||
|
deleteLater();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return QVBox::eventFilter( o, e );
|
||||||
|
}
|
||||||
|
#include "aboutwidget.moc"
|
@ -0,0 +1,43 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2002 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ABOUTWIDGET_H
|
||||||
|
#define ABOUTWIDGET_H
|
||||||
|
|
||||||
|
#include <qevent.h>
|
||||||
|
#include <qvbox.h>
|
||||||
|
|
||||||
|
class KURLWidget;
|
||||||
|
|
||||||
|
class AboutWidget : public QVBox
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
AboutWidget(QWidget *parent = 0, const char *name = 0);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
~AboutWidget();
|
||||||
|
bool eventFilter( QObject*, QEvent * );
|
||||||
|
|
||||||
|
private:
|
||||||
|
KURLWidget *m_homepage;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,282 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2002 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <qcheckbox.h>
|
||||||
|
#include <qgroupbox.h>
|
||||||
|
#include <qlabel.h>
|
||||||
|
#include <qlayout.h>
|
||||||
|
#include <qvgroupbox.h>
|
||||||
|
|
||||||
|
#include <kcombobox.h>
|
||||||
|
#include <kdialog.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
#include <knuminput.h>
|
||||||
|
#include <kstandarddirs.h>
|
||||||
|
|
||||||
|
#include "imlibwidget.h"
|
||||||
|
#include "defaultswidget.h"
|
||||||
|
|
||||||
|
DefaultsWidget::DefaultsWidget( QWidget *parent, const char *name)
|
||||||
|
: QWidget( parent, name )
|
||||||
|
{
|
||||||
|
imFiltered = 0L;
|
||||||
|
|
||||||
|
cbEnableMods = new QCheckBox( i18n("Apply default image modifications"), this );
|
||||||
|
connect( cbEnableMods, SIGNAL( toggled(bool) ), SLOT( enableWidgets(bool) ));
|
||||||
|
|
||||||
|
// create all the widgets
|
||||||
|
|
||||||
|
gbScale = new QGroupBox( i18n("Scaling"), this );
|
||||||
|
gbScale->setColumnLayout( 0, Qt::Horizontal );
|
||||||
|
|
||||||
|
cbDownScale = new QCheckBox( i18n("Shrink image to screen size, if larger"),
|
||||||
|
gbScale, "shrinktoscreen" );
|
||||||
|
|
||||||
|
cbUpScale = new QCheckBox( i18n("Scale image to screen size, if smaller, up to factor:"), gbScale, "upscale checkbox" );
|
||||||
|
|
||||||
|
sbMaxUpScaleFactor = new KIntNumInput( gbScale, "upscale factor" );
|
||||||
|
sbMaxUpScaleFactor->setRange( 1, 100, 1, false );
|
||||||
|
|
||||||
|
connect(cbUpScale, SIGNAL( toggled(bool)), sbMaxUpScaleFactor,
|
||||||
|
SLOT( setEnabled(bool) ));
|
||||||
|
|
||||||
|
// --
|
||||||
|
|
||||||
|
gbGeometry = new QGroupBox( i18n("Geometry"), this );
|
||||||
|
gbGeometry->setColumnLayout( 0, Qt::Horizontal );
|
||||||
|
|
||||||
|
cbFlipVertically = new QCheckBox( i18n("Flip vertically"), gbGeometry );
|
||||||
|
|
||||||
|
cbFlipHorizontally = new QCheckBox( i18n("Flip horizontally"), gbGeometry );
|
||||||
|
|
||||||
|
lbRotate = new QLabel( i18n("Rotate image:"), gbGeometry );
|
||||||
|
|
||||||
|
comboRotate = new KComboBox( gbGeometry, "rotate combobox" );
|
||||||
|
comboRotate->insertItem( i18n("0 Degrees") );
|
||||||
|
comboRotate->insertItem( i18n("90 Degrees") );
|
||||||
|
comboRotate->insertItem( i18n("180 Degrees") );
|
||||||
|
comboRotate->insertItem( i18n("270 Degrees") );
|
||||||
|
|
||||||
|
// --
|
||||||
|
|
||||||
|
gbAdjust = new QVGroupBox( i18n("Adjustments"), this );
|
||||||
|
|
||||||
|
sbBrightness = new KIntNumInput( gbAdjust, "brightness spinbox" );
|
||||||
|
sbBrightness->setRange( -256, 256, 1, true );
|
||||||
|
sbBrightness->setLabel( i18n("Brightness:"), AlignVCenter );
|
||||||
|
|
||||||
|
sbContrast = new KIntNumInput( sbBrightness, 0,gbAdjust, 10,
|
||||||
|
"contrast spinbox");
|
||||||
|
sbContrast->setRange( -256, 256, 1, true );
|
||||||
|
sbContrast->setLabel( i18n("Contrast:"), AlignVCenter );
|
||||||
|
|
||||||
|
sbGamma = new KIntNumInput( sbContrast, 0, gbAdjust, 10, "gamma spinbox" );
|
||||||
|
sbGamma->setRange( -256, 256, 1, true );
|
||||||
|
sbGamma->setLabel( i18n("Gamma:"), AlignVCenter );
|
||||||
|
|
||||||
|
// --
|
||||||
|
|
||||||
|
gbPreview = new QGroupBox( i18n("Preview"), this );
|
||||||
|
gbPreview->setAlignment( AlignCenter );
|
||||||
|
|
||||||
|
lbImOrig = new QLabel( i18n("Original"), gbPreview );
|
||||||
|
imOrig = new ImlibWidget( 0L, gbPreview, "original image" );
|
||||||
|
|
||||||
|
lbImFiltered = new QLabel( i18n("Modified"), gbPreview );
|
||||||
|
imFiltered = new ImlibWidget( 0L, imOrig->getImlibData(), gbPreview, "" );
|
||||||
|
connect( imFiltered, SIGNAL( destroyed() ), SLOT( slotNoImage() ));
|
||||||
|
|
||||||
|
////
|
||||||
|
////////////////
|
||||||
|
|
||||||
|
|
||||||
|
// layout management
|
||||||
|
QVBoxLayout *mainLayout = new QVBoxLayout( this, 0,
|
||||||
|
KDialog::spacingHint(), "main layout" );
|
||||||
|
|
||||||
|
QVBoxLayout *gbScaleLayout = new QVBoxLayout( gbScale->layout(),
|
||||||
|
KDialog::spacingHint());
|
||||||
|
QVBoxLayout *gbGeometryLayout = new QVBoxLayout(gbGeometry->layout(),
|
||||||
|
KDialog::spacingHint());
|
||||||
|
QGridLayout *gbPreviewLayout = new QGridLayout(gbPreview, 2, 3, 0,
|
||||||
|
KDialog::spacingHint());
|
||||||
|
|
||||||
|
QHBoxLayout *scaleLayout = new QHBoxLayout();
|
||||||
|
QHBoxLayout *rotateLayout = new QHBoxLayout();
|
||||||
|
|
||||||
|
mainLayout->addWidget( cbEnableMods );
|
||||||
|
mainLayout->addWidget( gbScale );
|
||||||
|
QHBoxLayout *hl = new QHBoxLayout();
|
||||||
|
hl->addWidget( gbGeometry );
|
||||||
|
hl->addWidget( gbAdjust );
|
||||||
|
mainLayout->addLayout( hl );
|
||||||
|
mainLayout->addWidget( gbPreview );
|
||||||
|
mainLayout->addStretch();
|
||||||
|
|
||||||
|
// --
|
||||||
|
|
||||||
|
gbScaleLayout->addWidget( cbDownScale );
|
||||||
|
gbScaleLayout->addLayout( scaleLayout );
|
||||||
|
|
||||||
|
scaleLayout->addWidget( cbUpScale );
|
||||||
|
scaleLayout->addWidget( sbMaxUpScaleFactor );
|
||||||
|
|
||||||
|
// --
|
||||||
|
|
||||||
|
gbGeometryLayout->addWidget( cbFlipVertically, 0, AlignLeft );
|
||||||
|
gbGeometryLayout->addWidget( cbFlipHorizontally, 0, AlignLeft );
|
||||||
|
gbGeometryLayout->addLayout( rotateLayout, 0 );
|
||||||
|
|
||||||
|
rotateLayout->addWidget( lbRotate, 0, AlignLeft );
|
||||||
|
rotateLayout->addWidget( comboRotate, 0, AlignLeft );
|
||||||
|
|
||||||
|
// --
|
||||||
|
|
||||||
|
gbPreviewLayout->setMargin( 10 );
|
||||||
|
gbPreviewLayout->setSpacing( KDialog::spacingHint() );
|
||||||
|
gbPreviewLayout->addWidget( lbImOrig, 0, 0, AlignCenter );
|
||||||
|
gbPreviewLayout->addWidget( imOrig, 1, 0, AlignCenter | AlignTop );
|
||||||
|
gbPreviewLayout->addWidget( lbImFiltered, 0, 2, AlignCenter );
|
||||||
|
gbPreviewLayout->addWidget( imFiltered, 1, 2, AlignCenter | AlignTop );
|
||||||
|
|
||||||
|
|
||||||
|
////
|
||||||
|
////////////////
|
||||||
|
|
||||||
|
// connect them all to the update slot
|
||||||
|
connect( cbDownScale, SIGNAL( clicked() ), SLOT( updatePreview() ));
|
||||||
|
connect( cbUpScale, SIGNAL( clicked() ), SLOT( updatePreview() ));
|
||||||
|
connect( cbFlipVertically, SIGNAL( clicked() ), SLOT( updatePreview() ));
|
||||||
|
connect( cbFlipHorizontally, SIGNAL( clicked() ), SLOT( updatePreview() ));
|
||||||
|
connect( sbMaxUpScaleFactor, SIGNAL( valueChanged(int) ), SLOT( updatePreview() ));
|
||||||
|
connect( sbBrightness, SIGNAL( valueChanged(int) ), SLOT( updatePreview() ));
|
||||||
|
connect( sbContrast, SIGNAL( valueChanged(int) ), SLOT( updatePreview() ));
|
||||||
|
connect( sbGamma, SIGNAL( valueChanged(int) ), SLOT( updatePreview() ));
|
||||||
|
|
||||||
|
connect( comboRotate, SIGNAL( activated(int) ), SLOT( updatePreview() ));
|
||||||
|
|
||||||
|
|
||||||
|
QString filename = locate( "data", "kuickshow/pics/calibrate.png" );
|
||||||
|
if ( !imOrig->loadImage( filename ) )
|
||||||
|
imOrig = 0L; // FIXME - display some errormessage!
|
||||||
|
if ( !imFiltered->loadImage( filename ) )
|
||||||
|
imFiltered = 0L; // FIXME - display some errormessage!
|
||||||
|
|
||||||
|
loadSettings( *kdata );
|
||||||
|
|
||||||
|
if ( imOrig )
|
||||||
|
imOrig->setFixedSize( imOrig->size() );
|
||||||
|
if ( imFiltered )
|
||||||
|
imFiltered->setFixedSize( imFiltered->size() );
|
||||||
|
|
||||||
|
mainLayout->activate();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DefaultsWidget::~DefaultsWidget()
|
||||||
|
{
|
||||||
|
// those need to be deleted in the right order, as imFiltered
|
||||||
|
// references ImlibData from imOrig
|
||||||
|
delete imFiltered;
|
||||||
|
delete imOrig;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DefaultsWidget::loadSettings( const KuickData& data )
|
||||||
|
{
|
||||||
|
cbDownScale->setChecked( data.downScale );
|
||||||
|
cbUpScale->setChecked( data.upScale );
|
||||||
|
sbMaxUpScaleFactor->setValue( data.maxUpScale );
|
||||||
|
|
||||||
|
cbFlipVertically->setChecked( data.flipVertically );
|
||||||
|
cbFlipHorizontally->setChecked( data.flipHorizontally );
|
||||||
|
|
||||||
|
comboRotate->setCurrentItem( data.rotation );
|
||||||
|
|
||||||
|
ImData *id = data.idata;
|
||||||
|
|
||||||
|
sbBrightness->setValue( id->brightness );
|
||||||
|
sbContrast->setValue( id->contrast );
|
||||||
|
sbGamma->setValue( id->gamma );
|
||||||
|
|
||||||
|
cbEnableMods->setChecked( data.isModsEnabled );
|
||||||
|
enableWidgets( data.isModsEnabled );
|
||||||
|
|
||||||
|
updatePreview();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DefaultsWidget::applySettings( KuickData& data )
|
||||||
|
{
|
||||||
|
data.isModsEnabled = cbEnableMods->isChecked();
|
||||||
|
|
||||||
|
data.downScale = cbDownScale->isChecked();
|
||||||
|
data.upScale = cbUpScale->isChecked();
|
||||||
|
data.maxUpScale = sbMaxUpScaleFactor->value();
|
||||||
|
|
||||||
|
data.flipVertically = cbFlipVertically->isChecked();
|
||||||
|
data.flipHorizontally = cbFlipHorizontally->isChecked();
|
||||||
|
|
||||||
|
data.rotation = currentRotation();
|
||||||
|
|
||||||
|
ImData *id = data.idata;
|
||||||
|
|
||||||
|
id->brightness = sbBrightness->value();
|
||||||
|
id->contrast = sbContrast->value();
|
||||||
|
id->gamma = sbGamma->value();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DefaultsWidget::updatePreview()
|
||||||
|
{
|
||||||
|
if ( !imFiltered )
|
||||||
|
return;
|
||||||
|
|
||||||
|
imFiltered->setAutoRender( false );
|
||||||
|
|
||||||
|
int flipMode = cbFlipHorizontally->isChecked() ? FlipHorizontal : FlipNone;
|
||||||
|
flipMode |= cbFlipVertically->isChecked() ? FlipVertical : FlipNone;
|
||||||
|
imFiltered->setFlipMode( flipMode );
|
||||||
|
|
||||||
|
Rotation rotation = cbEnableMods->isChecked() ? currentRotation() : ROT_0;
|
||||||
|
imFiltered->setRotation( rotation );
|
||||||
|
|
||||||
|
imFiltered->setBrightness( sbBrightness->value() );
|
||||||
|
imFiltered->setContrast( sbContrast->value() );
|
||||||
|
imFiltered->setGamma( sbGamma->value() );
|
||||||
|
|
||||||
|
imFiltered->updateImage();
|
||||||
|
imFiltered->setAutoRender( true );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DefaultsWidget::enableWidgets( bool enable )
|
||||||
|
{
|
||||||
|
gbScale->setEnabled( enable );
|
||||||
|
sbMaxUpScaleFactor->setEnabled( enable & cbUpScale->isChecked() );
|
||||||
|
|
||||||
|
gbGeometry->setEnabled( enable );
|
||||||
|
gbAdjust->setEnabled( enable );
|
||||||
|
gbPreview->setEnabled( enable );
|
||||||
|
updatePreview();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Rotation DefaultsWidget::currentRotation() const
|
||||||
|
{
|
||||||
|
return (Rotation) comboRotate->currentItem();
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "defaultswidget.moc"
|
@ -0,0 +1,73 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2003 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef DEFAULTSWIDGET_H
|
||||||
|
#define DEFAULTSWIDGET_H
|
||||||
|
|
||||||
|
#include "kuickdata.h"
|
||||||
|
|
||||||
|
class ImlibWidget;
|
||||||
|
class ImData;
|
||||||
|
|
||||||
|
class QCheckBox;
|
||||||
|
class QLabel;
|
||||||
|
|
||||||
|
class KComboBox;
|
||||||
|
class KIntNumInput;
|
||||||
|
|
||||||
|
class DefaultsWidget : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
DefaultsWidget( QWidget *parent, const char *name );
|
||||||
|
~DefaultsWidget();
|
||||||
|
|
||||||
|
void loadSettings( const KuickData& data );
|
||||||
|
void applySettings( KuickData& data );
|
||||||
|
|
||||||
|
private:
|
||||||
|
Rotation currentRotation() const;
|
||||||
|
|
||||||
|
QCheckBox *cbEnableMods;
|
||||||
|
|
||||||
|
QGroupBox *gbScale;
|
||||||
|
QCheckBox *cbUpScale, *cbDownScale;
|
||||||
|
KIntNumInput *sbMaxUpScaleFactor;
|
||||||
|
|
||||||
|
QGroupBox *gbAdjust;
|
||||||
|
KIntNumInput *sbBrightness, *sbContrast, *sbGamma;
|
||||||
|
|
||||||
|
QGroupBox *gbGeometry;
|
||||||
|
QLabel *lbRotate;
|
||||||
|
KComboBox *comboRotate;
|
||||||
|
QCheckBox *cbFlipVertically, *cbFlipHorizontally;
|
||||||
|
|
||||||
|
QGroupBox *gbPreview;
|
||||||
|
QLabel *lbImOrig, *lbImFiltered;
|
||||||
|
ImlibWidget *imOrig, *imFiltered;
|
||||||
|
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void updatePreview();
|
||||||
|
void slotNoImage() { imFiltered = 0L; }
|
||||||
|
void enableWidgets( bool );
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,83 @@
|
|||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <qstring.h>
|
||||||
|
|
||||||
|
#include <kdebug.h>
|
||||||
|
#include <kstandarddirs.h>
|
||||||
|
#include <ktempdir.h>
|
||||||
|
|
||||||
|
#include "filecache.h"
|
||||||
|
|
||||||
|
FileCache * FileCache::s_self;
|
||||||
|
|
||||||
|
FileCache::FileCache()
|
||||||
|
: m_limit( 0 ),
|
||||||
|
m_tempDir( 0L )
|
||||||
|
{
|
||||||
|
m_files.setAutoDelete( true );
|
||||||
|
m_files.setMaxCost( 100 ); // good default? ### make configurable?
|
||||||
|
}
|
||||||
|
|
||||||
|
FileCache::~FileCache()
|
||||||
|
{
|
||||||
|
delete m_tempDir;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileCache::shutdown()
|
||||||
|
{
|
||||||
|
if ( s_self )
|
||||||
|
{
|
||||||
|
delete s_self;
|
||||||
|
s_self = 0L;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FileCache * FileCache::self()
|
||||||
|
{
|
||||||
|
if ( !s_self )
|
||||||
|
s_self = new FileCache();
|
||||||
|
return s_self;
|
||||||
|
}
|
||||||
|
|
||||||
|
KuickFile * FileCache::getFile( const KURL& url )
|
||||||
|
{
|
||||||
|
QString urlString = url.prettyURL();
|
||||||
|
KuickFile *file = m_files.find( urlString );
|
||||||
|
if ( !file ) {
|
||||||
|
file = new KuickFile( url );
|
||||||
|
m_files.insert( urlString, file );
|
||||||
|
}
|
||||||
|
|
||||||
|
return file;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString FileCache::tempDir()
|
||||||
|
{
|
||||||
|
if ( !m_tempDir ) {
|
||||||
|
m_tempDir = createTempDir();
|
||||||
|
|
||||||
|
if ( !m_tempDir ) {
|
||||||
|
kdWarning() << "Unable to create temporary directory for KuickShow" << endl;
|
||||||
|
return QString::null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return m_tempDir->name();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KTempDir * FileCache::createTempDir()
|
||||||
|
{
|
||||||
|
QString tmpName = QString::fromLatin1( KGlobal::instance()->instanceName() );
|
||||||
|
tmpName.append( QString::number( getpid() ) );
|
||||||
|
QString dirName = locateLocal( "tmp", tmpName );
|
||||||
|
KTempDir *dir = new KTempDir( dirName );
|
||||||
|
dir->setAutoDelete( true );
|
||||||
|
if ( dir->status() != 0L )
|
||||||
|
{
|
||||||
|
delete dir;
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
return dir;
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** $Id: .emacs,v 1.3 2006/02/20 15:06:53 gis Exp $
|
||||||
|
**
|
||||||
|
** Created : 2006
|
||||||
|
**
|
||||||
|
** Copyright (C) 2006 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef FILECACHE_H
|
||||||
|
#define FILECACHE_H
|
||||||
|
|
||||||
|
#include <qcache.h>
|
||||||
|
|
||||||
|
#include "kuickfile.h"
|
||||||
|
|
||||||
|
class KTempDir;
|
||||||
|
|
||||||
|
class FileCache
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static FileCache * self();
|
||||||
|
static void shutdown();
|
||||||
|
|
||||||
|
KuickFile * getFile( const KURL& url );
|
||||||
|
void setLimit( int numFiles );
|
||||||
|
int getLimit() const { return m_limit; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the temporary directory or QString::null if none available
|
||||||
|
*/
|
||||||
|
QString tempDir();
|
||||||
|
|
||||||
|
private:
|
||||||
|
static FileCache *s_self;
|
||||||
|
FileCache();
|
||||||
|
~FileCache();
|
||||||
|
|
||||||
|
KTempDir * createTempDir();
|
||||||
|
QCache<KuickFile> m_files;
|
||||||
|
|
||||||
|
int m_limit;
|
||||||
|
KTempDir *m_tempDir;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // FILECACHE_H
|
@ -0,0 +1,100 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2002 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <qkeycode.h>
|
||||||
|
|
||||||
|
#include <kapplication.h>
|
||||||
|
#include <kconfig.h>
|
||||||
|
#include <kglobal.h>
|
||||||
|
#include <kcompletionbox.h>
|
||||||
|
#include <kurlcompletion.h>
|
||||||
|
|
||||||
|
#include "filefinder.h"
|
||||||
|
|
||||||
|
FileFinder::FileFinder( QWidget *parent, const char *name )
|
||||||
|
: KLineEdit( parent, name )
|
||||||
|
{
|
||||||
|
// make this widget just as large, as the font is + 8 Pixels
|
||||||
|
int height = fontMetrics().height() + 8;
|
||||||
|
setFixedSize( 150, height );
|
||||||
|
setFrame( true );
|
||||||
|
|
||||||
|
setHandleSignals( true ); // we want the completionbox signals
|
||||||
|
#if KDE_VERSION >= 220
|
||||||
|
completionBox()->setTabHandling( true );
|
||||||
|
#endif
|
||||||
|
connect( completionBox(), SIGNAL( userCancelled(const QString&) ),
|
||||||
|
SLOT( hide() ));
|
||||||
|
connect( completionBox(), SIGNAL( activated( const QString& ) ),
|
||||||
|
SLOT( slotAccept( const QString& )));
|
||||||
|
connect( this, SIGNAL( returnPressed( const QString& )),
|
||||||
|
SLOT( slotAccept( const QString& ) ));
|
||||||
|
|
||||||
|
KURLCompletion *comp = new KURLCompletion();
|
||||||
|
comp->setReplaceHome( true );
|
||||||
|
comp->setReplaceEnv( true );
|
||||||
|
setCompletionObject( comp, false );
|
||||||
|
setAutoDeleteCompletionObject( true );
|
||||||
|
setFocusPolicy( ClickFocus );
|
||||||
|
|
||||||
|
KConfig *config = KGlobal::config();
|
||||||
|
KConfigGroupSaver cs( config, "GeneralConfiguration" );
|
||||||
|
setCompletionMode( (KGlobalSettings::Completion)
|
||||||
|
config->readNumEntry( "FileFinderCompletionMode",
|
||||||
|
KGlobalSettings::completionMode()));
|
||||||
|
}
|
||||||
|
|
||||||
|
FileFinder::~FileFinder()
|
||||||
|
{
|
||||||
|
KConfig *config = KGlobal::config();
|
||||||
|
KConfigGroupSaver cs( config, "GeneralConfiguration" );
|
||||||
|
config->writeEntry( "FileFinderCompletionMode", completionMode() );
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileFinder::focusOutEvent( QFocusEvent *e )
|
||||||
|
{
|
||||||
|
if ( e->reason() != QFocusEvent::Popup )
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileFinder::keyPressEvent( QKeyEvent *e )
|
||||||
|
{
|
||||||
|
int key = e->key();
|
||||||
|
if ( key == Key_Escape ) {
|
||||||
|
hide();
|
||||||
|
e->accept();
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
KLineEdit::keyPressEvent( e );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileFinder::hide()
|
||||||
|
{
|
||||||
|
KLineEdit::hide();
|
||||||
|
parentWidget()->setFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileFinder::slotAccept( const QString& dir )
|
||||||
|
{
|
||||||
|
hide();
|
||||||
|
emit enterDir( dir );
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "filefinder.moc"
|
@ -0,0 +1,54 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2003 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef FILEFINDER_H
|
||||||
|
#define FILEFINDER_H
|
||||||
|
|
||||||
|
#include <qevent.h>
|
||||||
|
|
||||||
|
#include <klineedit.h>
|
||||||
|
|
||||||
|
class KURLCompletion;
|
||||||
|
|
||||||
|
class FileFinder : public KLineEdit
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
FileFinder( QWidget *parent=0, const char *name=0 );
|
||||||
|
~FileFinder();
|
||||||
|
|
||||||
|
KURLCompletion *completion() {
|
||||||
|
return static_cast<KURLCompletion*>( completionObject() );
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void hide();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void enterDir( const QString& );
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void focusOutEvent( QFocusEvent * );
|
||||||
|
virtual void keyPressEvent( QKeyEvent * );
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void slotAccept( const QString& );
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // FILEFINDER_H
|
@ -0,0 +1,464 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2003 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <qkeycode.h>
|
||||||
|
|
||||||
|
#include <kdeversion.h>
|
||||||
|
#include <kglobal.h>
|
||||||
|
#include <kglobalsettings.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
#include <kpopupmenu.h>
|
||||||
|
#include <kpropertiesdialog.h>
|
||||||
|
#include <kurlcompletion.h>
|
||||||
|
|
||||||
|
#include "filefinder.h"
|
||||||
|
#include "filewidget.h"
|
||||||
|
#include "kuickdata.h"
|
||||||
|
#include "kuickshow.h"
|
||||||
|
|
||||||
|
#ifdef KeyPress
|
||||||
|
#undef KeyPress
|
||||||
|
#endif
|
||||||
|
|
||||||
|
FileWidget::FileWidget( const KURL& url, QWidget *parent, const char *name )
|
||||||
|
: KDirOperator( url, parent, name ),
|
||||||
|
m_validCompletion( false ),
|
||||||
|
m_fileFinder( 0L )
|
||||||
|
{
|
||||||
|
setEnableDirHighlighting( true );
|
||||||
|
|
||||||
|
#if KDE_VERSION >= 310
|
||||||
|
setViewConfig( KGlobal::config(), "Filebrowser" );
|
||||||
|
#endif
|
||||||
|
readConfig( KGlobal::config(), "Filebrowser" );
|
||||||
|
setView( KFile::Default );
|
||||||
|
|
||||||
|
// setOnlyDoubleClickSelectsFiles( true );
|
||||||
|
reloadConfiguration();
|
||||||
|
|
||||||
|
completionObject()->setCompletionMode( KGlobalSettings::CompletionAuto );
|
||||||
|
dirCompletionObject()->setCompletionMode( KGlobalSettings::CompletionAuto);
|
||||||
|
|
||||||
|
slotViewChanged();
|
||||||
|
connect( this, SIGNAL( viewChanged( KFileView * )),
|
||||||
|
SLOT( slotViewChanged() ));
|
||||||
|
|
||||||
|
connect( dirLister(), SIGNAL( clear() ), SLOT( slotItemsCleared() ));
|
||||||
|
connect( dirLister(), SIGNAL( deleteItem( KFileItem * ) ),
|
||||||
|
SLOT( slotItemDeleted( KFileItem *) ));
|
||||||
|
|
||||||
|
connect( this, SIGNAL( fileHighlighted( const KFileItem * )),
|
||||||
|
SLOT( slotHighlighted( const KFileItem * )));
|
||||||
|
|
||||||
|
connect( this, SIGNAL(urlEntered(const KURL&)),
|
||||||
|
SLOT( slotURLEntered( const KURL& )));
|
||||||
|
|
||||||
|
// should actually be KDirOperator's job!
|
||||||
|
connect( this, SIGNAL( finishedLoading() ), SLOT( slotFinishedLoading() ));
|
||||||
|
}
|
||||||
|
|
||||||
|
FileWidget::~FileWidget()
|
||||||
|
{
|
||||||
|
delete m_fileFinder;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileWidget::initActions()
|
||||||
|
{
|
||||||
|
int index = 0;
|
||||||
|
KActionCollection *coll = actionCollection();
|
||||||
|
KActionSeparator *sep = new KActionSeparator( coll, "kuicksep" );
|
||||||
|
KActionMenu *menu = static_cast<KActionMenu*>( coll->action("popupMenu") );
|
||||||
|
|
||||||
|
menu->insert( coll->action("kuick_showInOtherWindow"), index++ );
|
||||||
|
menu->insert( coll->action("kuick_showInSameWindow"), index++ );
|
||||||
|
menu->insert( coll->action("kuick_showFullscreen"), index++ );
|
||||||
|
menu->insert( sep, index++ );
|
||||||
|
|
||||||
|
// support for older kdelibs, remove somewhen...
|
||||||
|
if ( coll->action("kuick_delete") )
|
||||||
|
menu->insert( coll->action("kuick_delete"), 9 );
|
||||||
|
|
||||||
|
// properties dialog is now in kfile, but not at the right position,
|
||||||
|
// so we move it to the real bottom
|
||||||
|
menu->remove( coll->action( "properties" ) );
|
||||||
|
|
||||||
|
QPopupMenu *pMenu = menu->popupMenu();
|
||||||
|
int lastItemId = pMenu->idAt( pMenu->count() - 1 );
|
||||||
|
QMenuItem *mItem = pMenu->findItem( lastItemId );
|
||||||
|
if ( mItem && !mItem->isSeparator() )
|
||||||
|
menu->insert( sep );
|
||||||
|
|
||||||
|
// those at the bottom
|
||||||
|
menu->insert( coll->action("kuick_print") );
|
||||||
|
menu->insert( sep );
|
||||||
|
menu->insert( coll->action("properties") );
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileWidget::reloadConfiguration()
|
||||||
|
{
|
||||||
|
if ( kdata->fileFilter != nameFilter() ) {
|
||||||
|
// At first, our list must have folders
|
||||||
|
QStringList mimes;
|
||||||
|
mimes.append("inode/directory");
|
||||||
|
|
||||||
|
// Then, all the images!
|
||||||
|
KMimeType::List l = KMimeType::allMimeTypes();
|
||||||
|
for (KMimeType::List::iterator it = l.begin(); it != l.end(); ++it)
|
||||||
|
if ((*it)->name().startsWith( "image/" ))
|
||||||
|
mimes.append( (*it)->name() );
|
||||||
|
|
||||||
|
// Ok, show what we've done
|
||||||
|
setMimeFilter (mimes);
|
||||||
|
updateDir();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FileWidget::hasFiles() const
|
||||||
|
{
|
||||||
|
return (numFiles() > 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileWidget::activatedMenu( const KFileItem *item, const QPoint& pos )
|
||||||
|
{
|
||||||
|
bool image = isImage( item );
|
||||||
|
actionCollection()->action("kuick_showInSameWindow")->setEnabled( image );
|
||||||
|
actionCollection()->action("kuick_showInOtherWindow")->setEnabled( image );
|
||||||
|
actionCollection()->action("kuick_showFullscreen")->setEnabled( image );
|
||||||
|
actionCollection()->action("kuick_print")->setEnabled( image );
|
||||||
|
actionCollection()->action("properties")->setEnabled( item );
|
||||||
|
|
||||||
|
bool hasSelection = (item != 0L);
|
||||||
|
if ( actionCollection()->action("kuick_delete") )
|
||||||
|
actionCollection()->action("kuick_delete")->setEnabled( hasSelection );
|
||||||
|
|
||||||
|
KDirOperator::activatedMenu( item, pos );
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileWidget::findCompletion( const QString& text )
|
||||||
|
{
|
||||||
|
if ( text.at(0) == '/' || text.at(0) == '~' ||
|
||||||
|
text.find('/') != -1 ) {
|
||||||
|
QString t = m_fileFinder->completion()->makeCompletion( text );
|
||||||
|
|
||||||
|
if (m_fileFinder->completionMode() == KGlobalSettings::CompletionPopup ||
|
||||||
|
m_fileFinder->completionMode() == KGlobalSettings::CompletionPopupAuto)
|
||||||
|
m_fileFinder->setCompletedItems(
|
||||||
|
m_fileFinder->completion()->allMatches() );
|
||||||
|
else
|
||||||
|
if ( !t.isNull() )
|
||||||
|
m_fileFinder->setCompletedText( t );
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString file = makeDirCompletion( text );
|
||||||
|
if ( file.isNull() )
|
||||||
|
file = makeCompletion( text );
|
||||||
|
|
||||||
|
m_validCompletion = !file.isNull();
|
||||||
|
|
||||||
|
if ( m_validCompletion )
|
||||||
|
KDirOperator::setCurrentItem( file );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FileWidget::eventFilter( QObject *o, QEvent *e )
|
||||||
|
{
|
||||||
|
if ( e->type() == QEvent::KeyPress ) {
|
||||||
|
QKeyEvent *k = static_cast<QKeyEvent*>( e );
|
||||||
|
|
||||||
|
if ( (k->state() & (ControlButton | AltButton)) == 0 ) {
|
||||||
|
int key = k->key();
|
||||||
|
if ( actionCollection()->action("delete")->shortcut().contains( key ) )
|
||||||
|
{
|
||||||
|
k->accept();
|
||||||
|
KFileItem *item = getCurrentItem( false );
|
||||||
|
if ( item ) {
|
||||||
|
KFileItemList list;
|
||||||
|
list.append( item );
|
||||||
|
del( list, (k->state() & ShiftButton) == 0 );
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString& text = k->text();
|
||||||
|
if ( !text.isEmpty() && text.unicode()->isPrint() ) {
|
||||||
|
k->accept();
|
||||||
|
|
||||||
|
if ( !m_fileFinder ) {
|
||||||
|
m_fileFinder = new FileFinder( this, "file finder" );
|
||||||
|
connect( m_fileFinder, SIGNAL( completion(const QString&)),
|
||||||
|
SLOT( findCompletion( const QString& )));
|
||||||
|
connect( m_fileFinder,
|
||||||
|
SIGNAL( enterDir( const QString& ) ),
|
||||||
|
SLOT( slotReturnPressed( const QString& )));
|
||||||
|
m_fileFinder->move( width() - m_fileFinder->width(),
|
||||||
|
height() - m_fileFinder->height() );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool first = m_fileFinder->isHidden();
|
||||||
|
|
||||||
|
m_fileFinder->setText( text );
|
||||||
|
m_fileFinder->raise();
|
||||||
|
m_fileFinder->show();
|
||||||
|
m_fileFinder->setFocus();
|
||||||
|
if ( first )
|
||||||
|
findCompletion( text );
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
k->ignore();
|
||||||
|
}
|
||||||
|
return KDirOperator::eventFilter( o, e );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// KIO::NetAccess::stat() does NOT give us the right mimetype, while
|
||||||
|
// KIO::NetAccess::mimetype() does. So we have this hacklet to tell
|
||||||
|
// showImage that the KFileItem is really an image.
|
||||||
|
#define IS_IMAGE 5
|
||||||
|
#define MY_TYPE 55
|
||||||
|
|
||||||
|
bool FileWidget::isImage( const KFileItem *item )
|
||||||
|
{
|
||||||
|
// return item && !item->isDir();
|
||||||
|
if ( item )
|
||||||
|
{
|
||||||
|
return item->isReadable() && item->mimetype().startsWith( "image/") ||
|
||||||
|
item->extraData( (void*) MY_TYPE ) == (void*) IS_IMAGE;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileWidget::setImage( KFileItem& item, bool enable )
|
||||||
|
{
|
||||||
|
if ( enable )
|
||||||
|
item.setExtraData( (void*) MY_TYPE, (void*) IS_IMAGE );
|
||||||
|
else
|
||||||
|
item.removeExtraData( (void*) MY_TYPE );
|
||||||
|
}
|
||||||
|
|
||||||
|
KFileItem * FileWidget::gotoFirstImage()
|
||||||
|
{
|
||||||
|
KFileItemListIterator it( *(fileView()->items()) );
|
||||||
|
|
||||||
|
while ( it.current() ) {
|
||||||
|
if ( isImage( it.current() ) ) {
|
||||||
|
setCurrentItem( it.current() );
|
||||||
|
return it.current();
|
||||||
|
}
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
KFileItem * FileWidget::gotoLastImage()
|
||||||
|
{
|
||||||
|
KFileItemListIterator it( *(fileView()->items()) );
|
||||||
|
it.toLast();
|
||||||
|
|
||||||
|
while ( it.current() ) {
|
||||||
|
if ( isImage( it.current() ) ) {
|
||||||
|
setCurrentItem( it.current() );
|
||||||
|
return it.current();
|
||||||
|
}
|
||||||
|
--it;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
KFileItem * FileWidget::getNext( bool go )
|
||||||
|
{
|
||||||
|
KFileItem *item = getItem( Next, true );
|
||||||
|
if ( item ) {
|
||||||
|
if ( go )
|
||||||
|
setCurrentItem( item );
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
KFileItem * FileWidget::getPrevious( bool go )
|
||||||
|
{
|
||||||
|
KFileItem *item = getItem( Previous, true );
|
||||||
|
if ( item ) {
|
||||||
|
if ( go )
|
||||||
|
setCurrentItem( item );
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
// returns 0L when there is no previous/next item/image
|
||||||
|
// this sucks! Use KFileView::currentFileItem() when implemented
|
||||||
|
KFileItem * FileWidget::getItem( WhichItem which, bool onlyImage ) const
|
||||||
|
{
|
||||||
|
KFileItemListIterator it( *(fileView()->items()) );
|
||||||
|
|
||||||
|
while ( it.current() ) { // find the iterator to the current item
|
||||||
|
if ( it.current()->url() == m_currentURL )
|
||||||
|
break;
|
||||||
|
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( it.current() ) {
|
||||||
|
switch ( which ) {
|
||||||
|
case Previous: {
|
||||||
|
--it;
|
||||||
|
while ( it.current() ) {
|
||||||
|
if ( isImage( it.current() ) || !onlyImage )
|
||||||
|
return it.current();
|
||||||
|
--it;
|
||||||
|
}
|
||||||
|
return 0L; // no previous item / image
|
||||||
|
}
|
||||||
|
|
||||||
|
case Next: {
|
||||||
|
++it;
|
||||||
|
while ( it.current() ) {
|
||||||
|
if ( isImage( it.current() ) || !onlyImage )
|
||||||
|
return it.current();
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
return 0L; // no further item / image
|
||||||
|
}
|
||||||
|
|
||||||
|
case Current:
|
||||||
|
default:
|
||||||
|
return it.current();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileWidget::slotViewChanged()
|
||||||
|
{
|
||||||
|
fileView()->widget()->installEventFilter( this );
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileWidget::slotItemsCleared()
|
||||||
|
{
|
||||||
|
m_currentURL = QString::null;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileWidget::slotItemDeleted( KFileItem *item )
|
||||||
|
{
|
||||||
|
KFileItem *current = getCurrentItem( false );
|
||||||
|
if ( item != current ) {
|
||||||
|
return; // all ok, we already have a new current item
|
||||||
|
}
|
||||||
|
|
||||||
|
KFileItem *next = getNext();
|
||||||
|
if ( !next )
|
||||||
|
next = getPrevious();
|
||||||
|
|
||||||
|
if ( next )
|
||||||
|
m_currentURL = next->url().url();
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileWidget::slotHighlighted( const KFileItem *item )
|
||||||
|
{
|
||||||
|
m_currentURL = item->url().url();
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileWidget::slotReturnPressed( const QString& t )
|
||||||
|
{
|
||||||
|
// we need a / at the end, otherwise replacedPath() will cut off the dir,
|
||||||
|
// assuming it is a filename
|
||||||
|
QString text = t;
|
||||||
|
if ( text.at( text.length()-1 ) != '/' )
|
||||||
|
text += '/';
|
||||||
|
|
||||||
|
if ( text.at(0) == '/' || text.at(0) == '~' ) {
|
||||||
|
QString dir = m_fileFinder->completion()->replacedPath( text );
|
||||||
|
|
||||||
|
KURL url;
|
||||||
|
url.setPath( dir );
|
||||||
|
setURL( url, true );
|
||||||
|
}
|
||||||
|
|
||||||
|
else if ( text.find('/') != (int) text.length() -1 ) { // relative path
|
||||||
|
QString dir = m_fileFinder->completion()->replacedPath( text );
|
||||||
|
KURL u( url(), dir );
|
||||||
|
setURL( u, true );
|
||||||
|
}
|
||||||
|
|
||||||
|
else if ( m_validCompletion ) {
|
||||||
|
KFileItem *item = getCurrentItem( true );
|
||||||
|
|
||||||
|
if ( item ) {
|
||||||
|
if ( item->isDir() )
|
||||||
|
setURL( item->url(), true );
|
||||||
|
else
|
||||||
|
emit fileSelected( item );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileWidget::setCurrentItem( const KFileItem *item )
|
||||||
|
{
|
||||||
|
if ( item ) {
|
||||||
|
fileView()->setCurrentItem( item );
|
||||||
|
fileView()->ensureItemVisible( item );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileWidget::setInitialItem( const QString& filename )
|
||||||
|
{
|
||||||
|
m_initialName = filename;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileWidget::slotURLEntered( const KURL& url )
|
||||||
|
{
|
||||||
|
if ( m_fileFinder )
|
||||||
|
m_fileFinder->completion()->setDir( url.path() );
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileWidget::slotFinishedLoading()
|
||||||
|
{
|
||||||
|
KFileItem *current = getCurrentItem( false );
|
||||||
|
if ( !m_initialName.isEmpty() )
|
||||||
|
setCurrentItem( m_initialName );
|
||||||
|
else if ( !current )
|
||||||
|
setCurrentItem( view()->items()->getFirst() );
|
||||||
|
|
||||||
|
m_initialName = QString::null;
|
||||||
|
emit finished();
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize FileWidget::sizeHint() const
|
||||||
|
{
|
||||||
|
return QSize( 300, 300 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileWidget::resizeEvent( QResizeEvent *e )
|
||||||
|
{
|
||||||
|
KDirOperator::resizeEvent( e );
|
||||||
|
if ( m_fileFinder )
|
||||||
|
m_fileFinder->move( width() - m_fileFinder->width(),
|
||||||
|
height() - m_fileFinder->height() );
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "filewidget.moc"
|
@ -0,0 +1,98 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2003 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef FILEWIDGET_H
|
||||||
|
#define FILEWIDGET_H
|
||||||
|
|
||||||
|
#include <qevent.h>
|
||||||
|
|
||||||
|
#include <kdiroperator.h>
|
||||||
|
|
||||||
|
class FileFinder;
|
||||||
|
class KFileItem;
|
||||||
|
|
||||||
|
class FileWidget : public KDirOperator
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
enum WhichItem { Previous, Next, Current };
|
||||||
|
|
||||||
|
FileWidget( const KURL& url, QWidget *parent = 0L, const char *name = 0L );
|
||||||
|
~FileWidget();
|
||||||
|
|
||||||
|
bool hasFiles() const;
|
||||||
|
void reloadConfiguration();
|
||||||
|
|
||||||
|
void setInitialItem( const QString& filename );
|
||||||
|
|
||||||
|
KFileItem *getCurrentItem( bool onlyImage ) const {
|
||||||
|
return getItem( Current, onlyImage );
|
||||||
|
}
|
||||||
|
|
||||||
|
void setCurrentItem( const KFileItem * );
|
||||||
|
void setCurrentItem( const QString& filename ) {
|
||||||
|
KDirOperator::setCurrentItem( filename );
|
||||||
|
}
|
||||||
|
|
||||||
|
KFileItem * gotoFirstImage();
|
||||||
|
KFileItem * gotoLastImage();
|
||||||
|
KFileItem * getNext( bool go=true );
|
||||||
|
KFileItem * getPrevious( bool go=true );
|
||||||
|
|
||||||
|
|
||||||
|
KFileItem *getItem( WhichItem which, bool onlyImage ) const;
|
||||||
|
|
||||||
|
static bool isImage( const KFileItem * );
|
||||||
|
static void setImage( KFileItem& item, bool enable );
|
||||||
|
|
||||||
|
void initActions();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void finished();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual bool eventFilter( QObject *o, QEvent * );
|
||||||
|
virtual void resizeEvent( QResizeEvent * );
|
||||||
|
virtual void activatedMenu( const KFileItem *, const QPoint& );
|
||||||
|
virtual QSize sizeHint() const;
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void slotReturnPressed( const QString& text );
|
||||||
|
void findCompletion( const QString& );
|
||||||
|
void slotViewChanged();
|
||||||
|
|
||||||
|
void slotItemsCleared();
|
||||||
|
void slotItemDeleted( KFileItem * );
|
||||||
|
void slotHighlighted( const KFileItem * );
|
||||||
|
|
||||||
|
void slotURLEntered( const KURL& url );
|
||||||
|
void slotFinishedLoading();
|
||||||
|
|
||||||
|
private:
|
||||||
|
KFileView * fileView() const { return (KFileView*) view(); }
|
||||||
|
|
||||||
|
bool m_validCompletion;
|
||||||
|
FileFinder *m_fileFinder;
|
||||||
|
QString m_currentURL;
|
||||||
|
QString m_initialName;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // FILEWIDGET_H
|
@ -0,0 +1,163 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2002 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <qcheckbox.h>
|
||||||
|
#include <qlabel.h>
|
||||||
|
#include <qlayout.h>
|
||||||
|
#include <qtooltip.h>
|
||||||
|
#include <qvgroupbox.h>
|
||||||
|
|
||||||
|
#include <kapplication.h>
|
||||||
|
#include <kcolorbutton.h>
|
||||||
|
#include <kdialog.h>
|
||||||
|
#include <kiconloader.h>
|
||||||
|
#include <klineedit.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
#include <knuminput.h>
|
||||||
|
#include <kurllabel.h>
|
||||||
|
|
||||||
|
#include "generalwidget.h"
|
||||||
|
|
||||||
|
GeneralWidget::GeneralWidget( QWidget *parent, const char *name )
|
||||||
|
: QWidget( parent, name )
|
||||||
|
{
|
||||||
|
QVBoxLayout *layout = new QVBoxLayout( this );
|
||||||
|
layout->setSpacing( KDialog::spacingHint() );
|
||||||
|
|
||||||
|
QPixmap pixmap = UserIcon( "logo" );
|
||||||
|
KURLLabel *logo = new KURLLabel( this );
|
||||||
|
logo->setURL( "http://devel-home.kde.org/~pfeiffer/kuickshow/" );
|
||||||
|
logo->setPixmap( pixmap );
|
||||||
|
logo->setFixedSize( pixmap.size() );
|
||||||
|
logo->setTipText( i18n( "Open KuickShow Website" ) );
|
||||||
|
logo->setUseTips( true );
|
||||||
|
|
||||||
|
connect( logo, SIGNAL( leftClickedURL( const QString & ) ),
|
||||||
|
SLOT( slotURLClicked( const QString & ) ) );
|
||||||
|
|
||||||
|
layout->addWidget( logo, 0, AlignRight );
|
||||||
|
|
||||||
|
cbFullscreen = new QCheckBox( i18n("Fullscreen mode"), this, "boscreen" );
|
||||||
|
|
||||||
|
cbPreload = new QCheckBox( i18n("Preload next image"), this, "preload");
|
||||||
|
cbLastdir = new QCheckBox( i18n("Remember last folder"), this, "restart_lastdir");
|
||||||
|
|
||||||
|
QGridLayout *gridLayout = new QGridLayout( 2, 2 );
|
||||||
|
gridLayout->setSpacing( KDialog::spacingHint() );
|
||||||
|
QLabel *l0 = new QLabel( i18n("Background color:"), this );
|
||||||
|
colorButton = new KColorButton( this );
|
||||||
|
|
||||||
|
QLabel *l1 = new QLabel( i18n("Show only files with extension: "), this, "label" );
|
||||||
|
editFilter = new KLineEdit( this, "filteredit" );
|
||||||
|
|
||||||
|
gridLayout->addWidget( l0, 0, 0 );
|
||||||
|
gridLayout->addWidget( colorButton, 0, 1 );
|
||||||
|
gridLayout->addWidget( l1, 1, 0 );
|
||||||
|
gridLayout->addWidget( editFilter, 1, 1 );
|
||||||
|
|
||||||
|
layout->addWidget( cbFullscreen );
|
||||||
|
layout->addWidget( cbPreload );
|
||||||
|
layout->addWidget( cbLastdir );
|
||||||
|
layout->addLayout( gridLayout );
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
QVGroupBox *gbox2 = new QVGroupBox( i18n("Quality/Speed"),
|
||||||
|
this, "qualitybox" );
|
||||||
|
layout->addWidget( gbox2 );
|
||||||
|
layout->addStretch();
|
||||||
|
|
||||||
|
cbSmoothScale = new QCheckBox( i18n("Smooth scaling"), gbox2, "smoothscale" );
|
||||||
|
cbFastRender = new QCheckBox( i18n("Fast rendering"), gbox2, "fastrender" );
|
||||||
|
cbDither16bit = new QCheckBox( i18n("Dither in HiColor (15/16bit) modes"),
|
||||||
|
gbox2, "dither16bit" );
|
||||||
|
|
||||||
|
cbDither8bit = new QCheckBox( i18n("Dither in LowColor (<=8bit) modes"),
|
||||||
|
gbox2, "dither8bit" );
|
||||||
|
|
||||||
|
cbOwnPalette = new QCheckBox( i18n("Use own color palette"),
|
||||||
|
gbox2, "pal");
|
||||||
|
connect( cbOwnPalette, SIGNAL( clicked() ), this, SLOT( useOwnPalette() ) );
|
||||||
|
|
||||||
|
cbFastRemap = new QCheckBox( i18n("Fast palette remapping"), gbox2, "remap");
|
||||||
|
|
||||||
|
maxCacheSpinBox = new KIntNumInput( gbox2, "editmaxcache" );
|
||||||
|
maxCacheSpinBox->setLabel( i18n("Maximum cache size: "), AlignVCenter );
|
||||||
|
maxCacheSpinBox->setSuffix( i18n( " MB" ) );
|
||||||
|
maxCacheSpinBox->setSpecialValueText( i18n( "Unlimited" ) );
|
||||||
|
maxCacheSpinBox->setRange( 0, 400, 1 );
|
||||||
|
|
||||||
|
loadSettings( *kdata );
|
||||||
|
cbFullscreen->setFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
GeneralWidget::~GeneralWidget()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void GeneralWidget::slotURLClicked( const QString & url )
|
||||||
|
{
|
||||||
|
kapp->invokeBrowser( url );
|
||||||
|
}
|
||||||
|
|
||||||
|
void GeneralWidget::loadSettings( const KuickData& data )
|
||||||
|
{
|
||||||
|
ImData *idata = data.idata;
|
||||||
|
|
||||||
|
colorButton->setColor( data.backgroundColor );
|
||||||
|
editFilter->setText( data.fileFilter );
|
||||||
|
cbFullscreen->setChecked( data.fullScreen );
|
||||||
|
cbPreload->setChecked( data.preloadImage );
|
||||||
|
cbLastdir->setChecked( data.startInLastDir );
|
||||||
|
cbFastRemap->setChecked( idata->fastRemap );
|
||||||
|
cbOwnPalette->setChecked( idata->ownPalette );
|
||||||
|
cbSmoothScale->setChecked( idata->smoothScale );
|
||||||
|
cbFastRender->setChecked( idata->fastRender );
|
||||||
|
cbDither16bit->setChecked( idata->dither16bit );
|
||||||
|
cbDither8bit->setChecked( idata->dither8bit );
|
||||||
|
maxCacheSpinBox->setValue( idata->maxCache / 1024 );
|
||||||
|
|
||||||
|
useOwnPalette(); // enable/disable remap-checkbox
|
||||||
|
}
|
||||||
|
|
||||||
|
void GeneralWidget::applySettings( KuickData& data)
|
||||||
|
{
|
||||||
|
ImData *idata = data.idata;
|
||||||
|
|
||||||
|
data.backgroundColor = colorButton->color();
|
||||||
|
data.fileFilter = editFilter->text();
|
||||||
|
data.fullScreen = cbFullscreen->isChecked();
|
||||||
|
data.preloadImage = cbPreload->isChecked();
|
||||||
|
data.startInLastDir = cbLastdir->isChecked();
|
||||||
|
|
||||||
|
idata->smoothScale = cbSmoothScale->isChecked();
|
||||||
|
idata->fastRemap = cbFastRemap->isChecked();
|
||||||
|
idata->ownPalette = cbOwnPalette->isChecked();
|
||||||
|
idata->fastRender = cbFastRender->isChecked();
|
||||||
|
idata->dither16bit = cbDither16bit->isChecked();
|
||||||
|
idata->dither8bit = cbDither8bit->isChecked();
|
||||||
|
|
||||||
|
idata->maxCache = (uint) maxCacheSpinBox->value() * 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GeneralWidget::useOwnPalette()
|
||||||
|
{
|
||||||
|
cbFastRemap->setEnabled( cbOwnPalette->isChecked() );
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "generalwidget.moc"
|
@ -0,0 +1,62 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2003 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GENERALWIDGET_H
|
||||||
|
#define GENERALWIDGET_H
|
||||||
|
|
||||||
|
#include <qwidget.h>
|
||||||
|
|
||||||
|
#include "kuickdata.h"
|
||||||
|
|
||||||
|
class QCheckBox;
|
||||||
|
class KColorButton;
|
||||||
|
class KLineEdit;
|
||||||
|
class KIntNumInput;
|
||||||
|
|
||||||
|
|
||||||
|
class GeneralWidget : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
GeneralWidget( QWidget *parent, const char *name );
|
||||||
|
~GeneralWidget();
|
||||||
|
|
||||||
|
void loadSettings( const KuickData& data );
|
||||||
|
void applySettings( KuickData& data );
|
||||||
|
|
||||||
|
private:
|
||||||
|
QCheckBox *cbFullscreen, *cbActiveWindow, *cbPreload, *cbLastdir;
|
||||||
|
QCheckBox *cbSmoothScale, *cbFastRemap, *cbFastRender;
|
||||||
|
QCheckBox *cbDither16bit, *cbDither8bit, *cbOwnPalette;
|
||||||
|
|
||||||
|
KLineEdit *editFilter;
|
||||||
|
KIntNumInput *maxCacheSpinBox;
|
||||||
|
|
||||||
|
KIntNumInput *sbMaxWidth, *sbMaxHeight;
|
||||||
|
KIntNumInput *sbZoomFactor;
|
||||||
|
|
||||||
|
KColorButton *colorButton;
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void useOwnPalette();
|
||||||
|
void slotURLClicked( const QString & );
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,176 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2003 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef IMAGEWINDOW_H
|
||||||
|
#define IMAGEWINDOW_H
|
||||||
|
|
||||||
|
#include <qevent.h>
|
||||||
|
|
||||||
|
#include <kaction.h>
|
||||||
|
#include <kurl.h>
|
||||||
|
|
||||||
|
#include "imlibwidget.h"
|
||||||
|
|
||||||
|
class QCursor;
|
||||||
|
class QPopupMenu;
|
||||||
|
class QRect;
|
||||||
|
class QString;
|
||||||
|
class QTimer;
|
||||||
|
class QWidget;
|
||||||
|
|
||||||
|
class KuickFile;
|
||||||
|
|
||||||
|
class ImageWindow : public ImlibWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
ImageWindow( ImData *_idata, ImlibData *id, QWidget *parent=0,
|
||||||
|
const char *name=0 );
|
||||||
|
ImageWindow( ImData *_idata=0, QWidget *parent=0, const char *name=0 );
|
||||||
|
|
||||||
|
bool showNextImage( KuickFile * file );
|
||||||
|
bool showNextImage( const KURL& url );
|
||||||
|
void scrollImage( int, int, bool restrict=true );
|
||||||
|
void setFullscreen( bool );
|
||||||
|
bool isFullscreen() const { return myIsFullscreen; }
|
||||||
|
|
||||||
|
void addBrightness( int );
|
||||||
|
void addContrast( int );
|
||||||
|
void addGamma( int );
|
||||||
|
|
||||||
|
void updateActions();
|
||||||
|
|
||||||
|
KActionCollection * actionCollection() const { return m_actions; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resizes image to @p w, @p h, but takes into account the workarea, so
|
||||||
|
* it won't ever get a bigger size than the workarea.
|
||||||
|
*/
|
||||||
|
void resizeOptimal( int w, int h );
|
||||||
|
void autoScale( KuickImage *kuim );
|
||||||
|
virtual bool autoRotate( KuickImage *kuim );
|
||||||
|
|
||||||
|
bool saveImage( const KURL& dest, bool keepOriginalSize );
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void zoomIn();
|
||||||
|
void zoomOut();
|
||||||
|
void moreBrightness();
|
||||||
|
void lessBrightness();
|
||||||
|
void moreContrast();
|
||||||
|
void lessContrast();
|
||||||
|
void moreGamma();
|
||||||
|
void lessGamma();
|
||||||
|
void scrollUp();
|
||||||
|
void scrollDown();
|
||||||
|
void scrollLeft();
|
||||||
|
void scrollRight();
|
||||||
|
void printImage();
|
||||||
|
void toggleFullscreen();
|
||||||
|
void maximize();
|
||||||
|
void imageDelete();
|
||||||
|
void imageTrash();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void sigFocusWindow( ImageWindow * );
|
||||||
|
// go advance images back/forth
|
||||||
|
void requestImage( ImageWindow *, int advance );
|
||||||
|
void deleteImage(ImageWindow *viewer);
|
||||||
|
void trashImage(ImageWindow *viewer);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
~ImageWindow(); // deletes itself, just call close( true );
|
||||||
|
|
||||||
|
void init();
|
||||||
|
void centerImage();
|
||||||
|
void addAlternativeShortcut( KAction *action, int key );
|
||||||
|
virtual void updateGeometry( int imWidth, int imHeight );
|
||||||
|
virtual void loaded( KuickImage * );
|
||||||
|
virtual bool canZoomTo( int newWidth, int newHeight );
|
||||||
|
virtual void rotated( KuickImage *kuim, int rotation );
|
||||||
|
|
||||||
|
virtual void wheelEvent( QWheelEvent * );
|
||||||
|
virtual void keyPressEvent( QKeyEvent * );
|
||||||
|
virtual void keyReleaseEvent( QKeyEvent * );
|
||||||
|
virtual void mousePressEvent( QMouseEvent * );
|
||||||
|
virtual void mouseReleaseEvent( QMouseEvent * );
|
||||||
|
virtual void mouseMoveEvent( QMouseEvent * );
|
||||||
|
virtual void focusInEvent( QFocusEvent * );
|
||||||
|
virtual void resizeEvent( QResizeEvent * );
|
||||||
|
virtual void dragEnterEvent( QDragEnterEvent * );
|
||||||
|
virtual void dropEvent( QDropEvent * );
|
||||||
|
virtual void contextMenuEvent( QContextMenuEvent * );
|
||||||
|
|
||||||
|
void showWindow();
|
||||||
|
enum KuickCursor { DefaultCursor = 0, ZoomCursor, MoveCursor };
|
||||||
|
void updateCursor( KuickCursor cursor = DefaultCursor );
|
||||||
|
|
||||||
|
// popupmenu entries
|
||||||
|
uint itemViewerZoomMax, itemViewerZoomOrig, itemViewerZoomIn;
|
||||||
|
uint itemViewerZoomOut, itemViewerFlipH, itemViewerProps;
|
||||||
|
uint itemRotate90, itemRotate180, itemRotate270;
|
||||||
|
uint itemViewerFlipV, itemViewerPrint;
|
||||||
|
uint itemViewerSave, itemViewerClose;
|
||||||
|
uint itemBrightnessPlus, itemBrightnessMinus;
|
||||||
|
uint itemContrastPlus, itemContrastMinus;
|
||||||
|
uint itemGammaPlus, itemGammaMinus;
|
||||||
|
|
||||||
|
|
||||||
|
uint xmove, ymove; // used for scrolling the image with the mouse
|
||||||
|
int xpos, ypos; // top left corner of the image
|
||||||
|
int xzoom, yzoom; // used for zooming the image with the mouse
|
||||||
|
uint xposPress, yposPress;
|
||||||
|
|
||||||
|
|
||||||
|
QPopupMenu *viewerMenu, *gammaMenu, *brightnessMenu, *contrastMenu;
|
||||||
|
QWidget *transWidget;
|
||||||
|
|
||||||
|
|
||||||
|
protected slots:
|
||||||
|
void saveImage();
|
||||||
|
void slotRequestNext() { emit requestImage( this, +1 ); }
|
||||||
|
void slotRequestPrevious() { emit requestImage( this, -1 ); }
|
||||||
|
void reload();
|
||||||
|
void slotProperties();
|
||||||
|
void pauseSlideShow();
|
||||||
|
virtual void setBusyCursor();
|
||||||
|
virtual void restoreCursor();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void pauseSlideShowSignal();
|
||||||
|
|
||||||
|
private:
|
||||||
|
int desktopWidth( bool totalScreen = false ) const;
|
||||||
|
int desktopHeight( bool totalScreen = false ) const;
|
||||||
|
QSize maxImageSize() const;
|
||||||
|
void setupActions();
|
||||||
|
void setPopupMenu();
|
||||||
|
bool isCursorHidden() const;
|
||||||
|
|
||||||
|
bool myIsFullscreen;
|
||||||
|
int m_numHeads;
|
||||||
|
QString m_saveDirectory;
|
||||||
|
|
||||||
|
KActionCollection *m_actions;
|
||||||
|
|
||||||
|
static QCursor * s_handCursor;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // IMAGEWINDOW_H
|
@ -0,0 +1,92 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <kconfig.h>
|
||||||
|
|
||||||
|
#include "imdata.h"
|
||||||
|
|
||||||
|
|
||||||
|
ImData::ImData()
|
||||||
|
{
|
||||||
|
ownPalette = true;
|
||||||
|
fastRemap = true;
|
||||||
|
fastRender = true;
|
||||||
|
dither16bit = false;
|
||||||
|
dither8bit = true;
|
||||||
|
smoothScale = false;
|
||||||
|
maxCache = 10240;
|
||||||
|
|
||||||
|
gamma = 0;
|
||||||
|
brightness = 0;
|
||||||
|
contrast = 0;
|
||||||
|
|
||||||
|
gammaFactor = 10;
|
||||||
|
brightnessFactor = 10;
|
||||||
|
contrastFactor = 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ImData::load( KConfig *kc )
|
||||||
|
{
|
||||||
|
ImData def;
|
||||||
|
|
||||||
|
kc->setGroup( "ImlibConfiguration" );
|
||||||
|
|
||||||
|
ownPalette = kc->readBoolEntry( "UseOwnPalette", def.ownPalette );
|
||||||
|
fastRemap = kc->readBoolEntry( "FastRemapping", def.fastRemap );
|
||||||
|
fastRender = kc->readBoolEntry( "FastRendering", def.fastRender );
|
||||||
|
dither16bit = kc->readBoolEntry( "Dither16Bit", def.dither16bit );
|
||||||
|
dither8bit = kc->readBoolEntry( "Dither8Bit", def.dither8bit );
|
||||||
|
smoothScale = kc->readBoolEntry( "SmoothScaling", def.smoothScale );
|
||||||
|
|
||||||
|
maxCache = kc->readNumEntry( "MaxCacheSize", 10240 );
|
||||||
|
|
||||||
|
gamma = kc->readNumEntry( "GammaDefault", 0 );
|
||||||
|
brightness = kc->readNumEntry( "BrightnessDefault", 0 );
|
||||||
|
contrast = kc->readNumEntry( "ContrastDefault", 0 );
|
||||||
|
|
||||||
|
gammaFactor = abs( kc->readNumEntry( "GammaFactor", 10 ) );
|
||||||
|
brightnessFactor = abs( kc->readNumEntry( "BrightnessFactor", 10 ) );
|
||||||
|
contrastFactor = abs( kc->readNumEntry( "ContrastFactor", 10 ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ImData::save( KConfig *kc )
|
||||||
|
{
|
||||||
|
kc->setGroup( "ImlibConfiguration" );
|
||||||
|
|
||||||
|
kc->writeEntry( "UseOwnPalette", ownPalette );
|
||||||
|
kc->writeEntry( "FastRemapping", fastRemap );
|
||||||
|
kc->writeEntry( "FastRendering", fastRender );
|
||||||
|
kc->writeEntry( "Dither16Bit", dither16bit );
|
||||||
|
kc->writeEntry( "Dither8Bit", dither8bit );
|
||||||
|
kc->writeEntry( "MaxCacheSize", maxCache );
|
||||||
|
kc->writeEntry( "SmoothScaling", smoothScale );
|
||||||
|
|
||||||
|
kc->writeEntry( "GammaDefault", gamma );
|
||||||
|
kc->writeEntry( "BrightnessDefault", brightness );
|
||||||
|
kc->writeEntry( "ContrastDefault", contrast );
|
||||||
|
|
||||||
|
kc->writeEntry( "GammaFactor", gammaFactor );
|
||||||
|
kc->writeEntry( "BrightnessFactor", brightnessFactor );
|
||||||
|
kc->writeEntry( "ContrastFactor", contrastFactor );
|
||||||
|
|
||||||
|
kc->sync();
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998,1999,2000,2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef IMBLIBCONFIG_H
|
||||||
|
#define IMBLIBCONFIG_H
|
||||||
|
|
||||||
|
class KConfig;
|
||||||
|
class ImData
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ImData();
|
||||||
|
~ImData() {};
|
||||||
|
|
||||||
|
void load( KConfig *kc );
|
||||||
|
void save( KConfig *kc );
|
||||||
|
|
||||||
|
// new stuff..........
|
||||||
|
|
||||||
|
int gamma;
|
||||||
|
int brightness;
|
||||||
|
int contrast;
|
||||||
|
|
||||||
|
// -----------------------
|
||||||
|
|
||||||
|
bool ownPalette :1;
|
||||||
|
bool fastRemap :1;
|
||||||
|
bool fastRender :1;
|
||||||
|
bool dither16bit :1;
|
||||||
|
bool dither8bit :1;
|
||||||
|
bool smoothScale :1;
|
||||||
|
|
||||||
|
|
||||||
|
uint gammaFactor;
|
||||||
|
uint brightnessFactor;
|
||||||
|
uint contrastFactor;
|
||||||
|
|
||||||
|
uint maxCache;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,715 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2002 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "kuickdata.h"
|
||||||
|
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include <qcolor.h>
|
||||||
|
#include <qfile.h>
|
||||||
|
#include <qglobal.h>
|
||||||
|
#include <qimage.h>
|
||||||
|
#include <qobject.h>
|
||||||
|
#include <qpalette.h>
|
||||||
|
|
||||||
|
#include <kcursor.h>
|
||||||
|
#include <kdebug.h>
|
||||||
|
#include <kfilemetainfo.h>
|
||||||
|
#include <kimageio.h>
|
||||||
|
|
||||||
|
#include "filecache.h"
|
||||||
|
#include "kuickfile.h"
|
||||||
|
#include "kuickimage.h"
|
||||||
|
#include "imlibwidget.h"
|
||||||
|
|
||||||
|
const int ImlibWidget::ImlibOffset = 256;
|
||||||
|
|
||||||
|
ImlibWidget::ImlibWidget( ImData *_idata, QWidget *parent, const char *name ) :
|
||||||
|
QWidget( parent, name, WDestructiveClose )
|
||||||
|
{
|
||||||
|
idata = _idata;
|
||||||
|
deleteImData = false;
|
||||||
|
deleteImlibData = true;
|
||||||
|
|
||||||
|
if ( !idata ) { // if no imlib configuration was given, create one ourself
|
||||||
|
idata = new ImData;
|
||||||
|
deleteImData = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
ImlibInitParams par;
|
||||||
|
|
||||||
|
// PARAMS_PALETTEOVERRIDE taken out because of segfault in imlib :o(
|
||||||
|
par.flags = ( PARAMS_REMAP | PARAMS_VISUALID |
|
||||||
|
PARAMS_FASTRENDER | PARAMS_HIQUALITY | PARAMS_DITHER |
|
||||||
|
PARAMS_IMAGECACHESIZE | PARAMS_PIXMAPCACHESIZE );
|
||||||
|
|
||||||
|
Visual* defaultvis = DefaultVisual(x11Display(), x11Screen());
|
||||||
|
|
||||||
|
par.paletteoverride = idata->ownPalette ? 1 : 0;
|
||||||
|
par.remap = idata->fastRemap ? 1 : 0;
|
||||||
|
par.fastrender = idata->fastRender ? 1 : 0;
|
||||||
|
par.hiquality = idata->dither16bit ? 1 : 0;
|
||||||
|
par.dither = idata->dither8bit ? 1 : 0;
|
||||||
|
par.visualid = defaultvis->visualid;
|
||||||
|
uint maxcache = idata->maxCache;
|
||||||
|
|
||||||
|
// 0 == no cache
|
||||||
|
par.imagecachesize = maxcache * 1024;
|
||||||
|
par.pixmapcachesize = maxcache * 1024;
|
||||||
|
|
||||||
|
id = Imlib_init_with_params( x11Display(), &par );
|
||||||
|
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ImlibWidget::ImlibWidget( ImData *_idata, ImlibData *_id, QWidget *parent,
|
||||||
|
const char *name )
|
||||||
|
: QWidget( parent, name, WDestructiveClose )
|
||||||
|
{
|
||||||
|
id = _id;
|
||||||
|
idata = _idata;
|
||||||
|
deleteImData = false;
|
||||||
|
deleteImlibData = false;
|
||||||
|
|
||||||
|
if ( !idata ) {
|
||||||
|
idata = new ImData;
|
||||||
|
deleteImData = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ImlibWidget::init()
|
||||||
|
{
|
||||||
|
int w = 1; // > 0 for XCreateWindow
|
||||||
|
int h = 1;
|
||||||
|
myBackgroundColor = Qt::black;
|
||||||
|
m_kuim = 0L;
|
||||||
|
m_kuickFile = 0L;
|
||||||
|
|
||||||
|
if ( !id )
|
||||||
|
qFatal("ImlibWidget: Imlib not initialized, aborting.");
|
||||||
|
|
||||||
|
setAutoRender( true );
|
||||||
|
|
||||||
|
setPalette( QPalette( myBackgroundColor ));
|
||||||
|
setBackgroundMode( PaletteBackground );
|
||||||
|
|
||||||
|
imageCache = new ImageCache( id, 4 ); // cache 4 images (FIXME?)
|
||||||
|
connect( imageCache, SIGNAL( sigBusy() ), SLOT( setBusyCursor() ));
|
||||||
|
connect( imageCache, SIGNAL( sigIdle() ), SLOT( restoreCursor() ));
|
||||||
|
|
||||||
|
win = XCreateSimpleWindow(x11Display(), winId(), 0,0,w,h,0,0,0);
|
||||||
|
}
|
||||||
|
|
||||||
|
ImlibWidget::~ImlibWidget()
|
||||||
|
{
|
||||||
|
delete imageCache;
|
||||||
|
if ( deleteImlibData && id ) free ( id );
|
||||||
|
if ( win ) XDestroyWindow( x11Display(), win );
|
||||||
|
if ( deleteImData ) delete idata;
|
||||||
|
}
|
||||||
|
|
||||||
|
KURL ImlibWidget::url() const
|
||||||
|
{
|
||||||
|
if ( m_kuickFile )
|
||||||
|
return m_kuickFile->url();
|
||||||
|
|
||||||
|
return KURL();
|
||||||
|
}
|
||||||
|
|
||||||
|
KuickFile * ImlibWidget::currentFile() const
|
||||||
|
{
|
||||||
|
return m_kuickFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
// tries to load "file" and returns the according KuickImage *
|
||||||
|
// or 0L if unsuccessful
|
||||||
|
// Note that the given file MUST already be downloaded prior to calling this function
|
||||||
|
KuickImage * ImlibWidget::loadImageInternal( KuickFile * file )
|
||||||
|
{
|
||||||
|
assert( file->isAvailable() );
|
||||||
|
|
||||||
|
// apply default image modifications
|
||||||
|
mod.brightness = idata->brightness + ImlibOffset;
|
||||||
|
mod.contrast = idata->contrast + ImlibOffset;
|
||||||
|
mod.gamma = idata->gamma + ImlibOffset;
|
||||||
|
|
||||||
|
KuickImage *kuim = imageCache->getKuimage( file, mod );
|
||||||
|
if ( !kuim ) {// couldn't load file, maybe corrupt or wrong format
|
||||||
|
kdWarning() << "ImlibWidget: can't load image " << file->url().prettyURL() << endl;
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
loaded( kuim ); // maybe upscale/downscale/rotate in subclasses
|
||||||
|
|
||||||
|
return kuim;
|
||||||
|
}
|
||||||
|
|
||||||
|
// overridden in subclass
|
||||||
|
void ImlibWidget::loaded( KuickImage * )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ImlibWidget::loadImage( const KURL& url )
|
||||||
|
{
|
||||||
|
return loadImage( FileCache::self()->getFile( url ));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ImlibWidget::loadImage( KuickFile * file )
|
||||||
|
{
|
||||||
|
if ( file->waitForDownload( this ) != KuickFile::OK)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
KuickImage *kuim = loadImageInternal( file );
|
||||||
|
// FIXME - check everywhere if we have a kuim or not!
|
||||||
|
|
||||||
|
if ( kuim ) {
|
||||||
|
m_kuim = kuim;
|
||||||
|
autoUpdate( true ); // -> updateWidget() -> updateGeometry()
|
||||||
|
m_kuickFile = file;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool ImlibWidget::cacheImage( const KURL& url )
|
||||||
|
{
|
||||||
|
// qDebug("cache image: %s", url.url().latin1());
|
||||||
|
KuickFile *file = FileCache::self()->getFile( url );
|
||||||
|
if ( file->isAvailable() )
|
||||||
|
return cacheImage( file );
|
||||||
|
else {
|
||||||
|
if ( !file->download() ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
connect( file, SIGNAL( downloaded( KuickFile * )), SLOT( cacheImage( KuickFile * )) );
|
||||||
|
return true; // optimistic
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ImlibWidget::cacheImage( KuickFile * file )
|
||||||
|
{
|
||||||
|
// qDebug("cache image: %s", file->url().url().latin1());
|
||||||
|
KuickImage *kuim = loadImageInternal( file );
|
||||||
|
if ( kuim ) {
|
||||||
|
kuim->renderPixmap();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ImlibWidget::showImage()
|
||||||
|
{
|
||||||
|
XMapWindow( x11Display(), win );
|
||||||
|
XSync( x11Display(), False );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// -256..256
|
||||||
|
void ImlibWidget::setBrightness( int factor )
|
||||||
|
{
|
||||||
|
mod.brightness = factor + ImlibOffset;
|
||||||
|
setImageModifier();
|
||||||
|
|
||||||
|
autoUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// -256..256
|
||||||
|
void ImlibWidget::setContrast( int factor )
|
||||||
|
{
|
||||||
|
mod.contrast = factor + ImlibOffset;
|
||||||
|
setImageModifier();
|
||||||
|
|
||||||
|
autoUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// -256..256
|
||||||
|
void ImlibWidget::setGamma( int factor )
|
||||||
|
{
|
||||||
|
mod.gamma = factor + ImlibOffset;
|
||||||
|
setImageModifier();
|
||||||
|
|
||||||
|
autoUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Rotation ImlibWidget::rotation() const
|
||||||
|
{
|
||||||
|
return m_kuim ? m_kuim->absRotation() : ROT_0;
|
||||||
|
}
|
||||||
|
|
||||||
|
FlipMode ImlibWidget::flipMode() const
|
||||||
|
{
|
||||||
|
return m_kuim ? m_kuim->flipMode() : FlipNone;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImlibWidget::zoomImage( float factor )
|
||||||
|
{
|
||||||
|
if ( factor == 1 || factor == 0 || !m_kuim )
|
||||||
|
return;
|
||||||
|
|
||||||
|
int newWidth = (int) (factor * (float) m_kuim->width());
|
||||||
|
int newHeight = (int) (factor * (float) m_kuim->height());
|
||||||
|
|
||||||
|
if ( canZoomTo( newWidth, newHeight ) )
|
||||||
|
{
|
||||||
|
m_kuim->resize( newWidth, newHeight, idata->smoothScale ? KuickImage::SMOOTH : KuickImage::FAST );
|
||||||
|
autoUpdate( true );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ImlibWidget::canZoomTo( int newWidth, int newHeight )
|
||||||
|
{
|
||||||
|
if ( newWidth <= 2 || newHeight <= 2 ) // minimum size for an image is 2x2 pixels
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ImlibWidget::showImageOriginalSize()
|
||||||
|
{
|
||||||
|
if ( !m_kuim )
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_kuim->restoreOriginalSize();
|
||||||
|
autoUpdate( true );
|
||||||
|
|
||||||
|
showImage();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ImlibWidget::autoRotate( KuickImage *kuim )
|
||||||
|
{
|
||||||
|
KFileMetaInfo metadatas( kuim->file().localFile() );
|
||||||
|
if ( !metadatas.isValid() )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
KFileMetaInfoItem metaitem = metadatas.item("Orientation");
|
||||||
|
if ( !metaitem.isValid()
|
||||||
|
#if QT_VERSION >= 0x030100
|
||||||
|
|| metaitem.value().isNull()
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
|
||||||
|
switch ( metaitem.value().toInt() )
|
||||||
|
{
|
||||||
|
// Orientation:
|
||||||
|
// 1: normal
|
||||||
|
// 2: flipped horizontally
|
||||||
|
// 3: ROT 180
|
||||||
|
// 4: flipped vertically
|
||||||
|
// 5: ROT 90 -> flip horizontally
|
||||||
|
// 6: ROT 90
|
||||||
|
// 7: ROT 90 -> flip vertically
|
||||||
|
// 8: ROT 270
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
default:
|
||||||
|
kuim->rotateAbs( ROT_0 );
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
kuim->flipAbs( FlipHorizontal );
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
kuim->rotateAbs( ROT_180 );
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
kuim->flipAbs( FlipVertical );
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
kuim->rotateAbs( ROT_90 );
|
||||||
|
kuim->flipAbs( FlipHorizontal );
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
kuim->rotateAbs( ROT_90 );
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
kuim->rotateAbs( ROT_90 );
|
||||||
|
kuim->flipAbs( FlipVertical );
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
kuim->rotateAbs( ROT_270 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ImlibWidget::setRotation( Rotation rot )
|
||||||
|
{
|
||||||
|
if ( m_kuim )
|
||||||
|
{
|
||||||
|
if ( m_kuim->rotateAbs( rot ) )
|
||||||
|
autoUpdate( true );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// slots connected to Accels and popupmenu
|
||||||
|
void ImlibWidget::rotate90()
|
||||||
|
{
|
||||||
|
if ( !m_kuim )
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_kuim->rotate( ROT_90 );
|
||||||
|
rotated( m_kuim, ROT_90 );
|
||||||
|
autoUpdate( true );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImlibWidget::rotate180()
|
||||||
|
{
|
||||||
|
if ( !m_kuim )
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_kuim->rotate( ROT_180 );
|
||||||
|
rotated( m_kuim, ROT_180 );
|
||||||
|
autoUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImlibWidget::rotate270()
|
||||||
|
{
|
||||||
|
if ( !m_kuim )
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_kuim->rotate( ROT_270 );
|
||||||
|
rotated( m_kuim, ROT_270 );
|
||||||
|
autoUpdate( true );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// should this go into a subclass?
|
||||||
|
void ImlibWidget::flipHoriz()
|
||||||
|
{
|
||||||
|
if ( !m_kuim )
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_kuim->flip( FlipHorizontal );
|
||||||
|
autoUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImlibWidget::flipVert()
|
||||||
|
{
|
||||||
|
if ( !m_kuim )
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_kuim->flip( FlipVertical );
|
||||||
|
autoUpdate();
|
||||||
|
}
|
||||||
|
// end slots
|
||||||
|
|
||||||
|
|
||||||
|
void ImlibWidget::setFlipMode( int mode )
|
||||||
|
{
|
||||||
|
if ( !m_kuim )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ( m_kuim->flipAbs( mode ) )
|
||||||
|
autoUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ImlibWidget::updateWidget( bool geometryUpdate )
|
||||||
|
{
|
||||||
|
if ( !m_kuim )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// if ( geometryUpdate )
|
||||||
|
// XUnmapWindow( x11Display(), win );// remove the old image -> no flicker
|
||||||
|
|
||||||
|
XSetWindowBackgroundPixmap( x11Display(), win, m_kuim->pixmap() );
|
||||||
|
|
||||||
|
if ( geometryUpdate )
|
||||||
|
updateGeometry( m_kuim->width(), m_kuim->height() );
|
||||||
|
|
||||||
|
XClearWindow( x11Display(), win );
|
||||||
|
|
||||||
|
showImage();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// here we just use the size of m_kuim, may be overridden in subclass
|
||||||
|
void ImlibWidget::updateGeometry( int w, int h )
|
||||||
|
{
|
||||||
|
XMoveWindow( x11Display(), win, 0, 0 ); // center?
|
||||||
|
XResizeWindow( x11Display(), win, w, h );
|
||||||
|
resize( w, h );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ImlibWidget::closeEvent( QCloseEvent *e )
|
||||||
|
{
|
||||||
|
e->accept();
|
||||||
|
QWidget::closeEvent( e );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ImlibWidget::setBackgroundColor( const QColor& color )
|
||||||
|
{
|
||||||
|
myBackgroundColor = color;
|
||||||
|
setPalette( QPalette( myBackgroundColor ));
|
||||||
|
repaint( false); // FIXME - false? necessary at all?
|
||||||
|
}
|
||||||
|
|
||||||
|
const QColor& ImlibWidget::backgroundColor() const
|
||||||
|
{
|
||||||
|
return myBackgroundColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ImlibWidget::setImageModifier()
|
||||||
|
{
|
||||||
|
if ( !m_kuim )
|
||||||
|
return;
|
||||||
|
|
||||||
|
Imlib_set_image_modifier( id, m_kuim->imlibImage(), &mod );
|
||||||
|
m_kuim->setDirty( true );
|
||||||
|
}
|
||||||
|
|
||||||
|
int ImlibWidget::imageWidth() const
|
||||||
|
{
|
||||||
|
return m_kuim ? m_kuim->width() : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ImlibWidget::imageHeight() const
|
||||||
|
{
|
||||||
|
return m_kuim ? m_kuim->height() : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImlibWidget::setBusyCursor()
|
||||||
|
{
|
||||||
|
if ( ownCursor() )
|
||||||
|
m_oldCursor = cursor();
|
||||||
|
else
|
||||||
|
m_oldCursor = QCursor();
|
||||||
|
|
||||||
|
setCursor( KCursor::waitCursor() );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImlibWidget::restoreCursor()
|
||||||
|
{
|
||||||
|
if ( cursor().shape() == KCursor::waitCursor().shape() ) // only if nobody changed the cursor in the meantime!
|
||||||
|
setCursor( m_oldCursor );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reparenting a widget in Qt in fact means destroying the old X window of the widget
|
||||||
|
// and creating a new one. And since the X window used for the Imlib image is a child
|
||||||
|
// of this widget's X window, destroying this widget's X window would mean also
|
||||||
|
// destroying the Imlib image X window. Therefore it needs to be temporarily reparented
|
||||||
|
// away and reparented back to the new X window.
|
||||||
|
// Reparenting may happen e.g. when doing the old-style (non-NETWM) fullscreen changes.
|
||||||
|
void ImlibWidget::reparent( QWidget* parent, WFlags f, const QPoint& p, bool showIt )
|
||||||
|
{
|
||||||
|
XWindowAttributes attr;
|
||||||
|
XGetWindowAttributes( x11Display(), win, &attr );
|
||||||
|
XUnmapWindow( x11Display(), win );
|
||||||
|
XReparentWindow( x11Display(), win, attr.root, 0, 0 );
|
||||||
|
QWidget::reparent( parent, f, p, showIt );
|
||||||
|
XReparentWindow( x11Display(), win, winId(), attr.x, attr.y );
|
||||||
|
if( attr.map_state != IsUnmapped )
|
||||||
|
XMapWindow( x11Display(), win );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImlibWidget::rotated( KuickImage *, int )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------
|
||||||
|
|
||||||
|
|
||||||
|
// uhh ugly, we have two lists to map from filename to KuickImage :-/
|
||||||
|
ImageCache::ImageCache( ImlibData *id, int maxImages )
|
||||||
|
{
|
||||||
|
myId = id;
|
||||||
|
idleCount = 0;
|
||||||
|
myMaxImages = maxImages;
|
||||||
|
kuickList.setAutoDelete( true );
|
||||||
|
fileList.clear();
|
||||||
|
kuickList.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ImageCache::~ImageCache()
|
||||||
|
{
|
||||||
|
kuickList.clear();
|
||||||
|
fileList.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ImageCache::setMaxImages( int maxImages )
|
||||||
|
{
|
||||||
|
myMaxImages = maxImages;
|
||||||
|
int count = kuickList.count();
|
||||||
|
while ( count > myMaxImages ) {
|
||||||
|
kuickList.removeLast();
|
||||||
|
fileList.remove( fileList.fromLast() );
|
||||||
|
count--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImageCache::slotBusy()
|
||||||
|
{
|
||||||
|
if ( idleCount == 0 )
|
||||||
|
emit sigBusy();
|
||||||
|
|
||||||
|
idleCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImageCache::slotIdle()
|
||||||
|
{
|
||||||
|
idleCount--;
|
||||||
|
|
||||||
|
if ( idleCount == 0 )
|
||||||
|
emit sigIdle();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
KuickImage * ImageCache::getKuimage( KuickFile * file,
|
||||||
|
ImlibColorModifier mod )
|
||||||
|
{
|
||||||
|
if ( !file )
|
||||||
|
return 0L;
|
||||||
|
|
||||||
|
assert( file->isAvailable() ); // debug build
|
||||||
|
if ( file->waitForDownload( 0L ) != KuickFile::OK ) // and for users
|
||||||
|
return 0L;
|
||||||
|
|
||||||
|
KuickImage *kuim = 0L;
|
||||||
|
int index = fileList.findIndex( file );
|
||||||
|
if ( index != -1 ) {
|
||||||
|
if ( index == 0 )
|
||||||
|
kuim = kuickList.at( 0 );
|
||||||
|
|
||||||
|
// need to reorder the lists, otherwise we might delete the current
|
||||||
|
// image when a new one is cached and the current one is the last!
|
||||||
|
else {
|
||||||
|
kuim = kuickList.take( index );
|
||||||
|
kuickList.insert( 0, kuim );
|
||||||
|
fileList.remove( file );
|
||||||
|
fileList.prepend( file );
|
||||||
|
}
|
||||||
|
|
||||||
|
return kuim;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !kuim ) {
|
||||||
|
slotBusy();
|
||||||
|
|
||||||
|
// #ifndef NDEBUG
|
||||||
|
// struct timeval tms1, tms2;
|
||||||
|
// gettimeofday( &tms1, NULL );
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
ImlibImage *im = Imlib_load_image( myId,
|
||||||
|
QFile::encodeName( file->localFile() ).data() );
|
||||||
|
|
||||||
|
// #ifndef NDEBUG
|
||||||
|
// gettimeofday( &tms2, NULL );
|
||||||
|
// qDebug("*** LOADING image: %s, took %ld ms", file.latin1(),
|
||||||
|
// (tms2.tv_usec - tms1.tv_usec)/1000);
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
slotIdle();
|
||||||
|
if ( !im ) {
|
||||||
|
slotBusy();
|
||||||
|
im = loadImageWithQt( file->localFile() );
|
||||||
|
slotIdle();
|
||||||
|
if ( !im )
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
Imlib_set_image_modifier( myId, im, &mod );
|
||||||
|
kuim = new KuickImage( file, im, myId );
|
||||||
|
connect( kuim, SIGNAL( startRendering() ), SLOT( slotBusy() ));
|
||||||
|
connect( kuim, SIGNAL( stoppedRendering() ), SLOT( slotIdle() ));
|
||||||
|
|
||||||
|
kuickList.insert( 0, kuim );
|
||||||
|
fileList.prepend( file );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( kuickList.count() > (uint) myMaxImages ) {
|
||||||
|
// qDebug(":::: now removing from cache: %s", (*fileList.fromLast()).latin1());
|
||||||
|
kuickList.removeLast();
|
||||||
|
fileList.remove( fileList.fromLast() );
|
||||||
|
}
|
||||||
|
|
||||||
|
return kuim;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Note: the returned image's filename will not be the real filename (which it usually
|
||||||
|
// isn't anyway, according to Imlib's sources).
|
||||||
|
ImlibImage * ImageCache::loadImageWithQt( const QString& fileName ) const
|
||||||
|
{
|
||||||
|
kdDebug() << "Trying to load " << fileName << " with KImageIO..." << endl;
|
||||||
|
|
||||||
|
KImageIO::registerFormats();
|
||||||
|
|
||||||
|
QImage image( fileName );
|
||||||
|
if ( image.isNull() )
|
||||||
|
return 0L;
|
||||||
|
if ( image.depth() != 32 ) {
|
||||||
|
image.setAlphaBuffer(false);
|
||||||
|
image = image.convertDepth(32);
|
||||||
|
|
||||||
|
if ( image.isNull() )
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
// convert to 24 bpp (discard alpha)
|
||||||
|
int numPixels = image.width() * image.height();
|
||||||
|
const int NUM_BYTES_NEW = 3; // 24 bpp
|
||||||
|
uchar *newImageData = new uchar[numPixels * NUM_BYTES_NEW];
|
||||||
|
uchar *newData = newImageData;
|
||||||
|
|
||||||
|
int w = image.width();
|
||||||
|
int h = image.height();
|
||||||
|
|
||||||
|
for (int y = 0; y < h; y++) {
|
||||||
|
QRgb *scanLine = reinterpret_cast<QRgb *>( image.scanLine(y) );
|
||||||
|
for (int x = 0; x < w; x++) {
|
||||||
|
const QRgb& pixel = scanLine[x];
|
||||||
|
*(newData++) = qRed(pixel);
|
||||||
|
*(newData++) = qGreen(pixel);
|
||||||
|
*(newData++) = qBlue(pixel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ImlibImage *im = Imlib_create_image_from_data( myId, newImageData, NULL,
|
||||||
|
image.width(), image.height() );
|
||||||
|
|
||||||
|
delete[] newImageData;
|
||||||
|
|
||||||
|
return im;
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "imlibwidget.moc"
|
@ -0,0 +1,187 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** $Id: imlibwidget.h 524709 2006-03-31 00:03:44Z pfeiffer $
|
||||||
|
**
|
||||||
|
** ImlibWidget: maps an Xlib window with Imlib's contents on a QWidget
|
||||||
|
**
|
||||||
|
** Created : 98
|
||||||
|
**
|
||||||
|
** Copyright (C) 1998-2001 by Carsten Pfeiffer. All rights reserved.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef IMLIBWIDGET_H
|
||||||
|
#define IMLIBWIDGET_H
|
||||||
|
|
||||||
|
#include <qvariant.h>
|
||||||
|
|
||||||
|
#include <qcursor.h>
|
||||||
|
#include <qevent.h>
|
||||||
|
#include <qptrlist.h>
|
||||||
|
#include <qtimer.h>
|
||||||
|
#include <qwidget.h>
|
||||||
|
|
||||||
|
#include <kurl.h>
|
||||||
|
|
||||||
|
// #include those AFTER Qt-includes!
|
||||||
|
#include <Imlib.h>
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/Xutil.h>
|
||||||
|
// #include <X11/extensions/shape.h>
|
||||||
|
|
||||||
|
#include "imdata.h"
|
||||||
|
#include "kuickdata.h"
|
||||||
|
|
||||||
|
class KuickFile;
|
||||||
|
class KuickImage;
|
||||||
|
|
||||||
|
class ImageCache : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
ImageCache( ImlibData *id, int maxImages=1 );
|
||||||
|
~ImageCache();
|
||||||
|
|
||||||
|
void setMaxImages( int maxImages );
|
||||||
|
int maxImages() const { return myMaxImages; }
|
||||||
|
|
||||||
|
KuickImage * getKuimage( KuickFile * file, ImlibColorModifier );
|
||||||
|
|
||||||
|
private:
|
||||||
|
ImlibImage * loadImageWithQt( const QString& filename ) const;
|
||||||
|
|
||||||
|
int myMaxImages;
|
||||||
|
QValueList<KuickFile*>fileList;
|
||||||
|
QPtrList<KuickImage> kuickList;
|
||||||
|
// QPtrList<ImlibImage> imList;
|
||||||
|
ImlibData * myId;
|
||||||
|
int idleCount;
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void slotBusy();
|
||||||
|
void slotIdle();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void sigBusy();
|
||||||
|
void sigIdle();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// ------------------------------------------
|
||||||
|
|
||||||
|
class QColor;
|
||||||
|
|
||||||
|
class ImlibWidget : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
ImlibWidget( ImData *_idata=0, QWidget *parent=0, const char *name=0 );
|
||||||
|
ImlibWidget( ImData *_idata, ImlibData *id, QWidget *parent=0,
|
||||||
|
const char *name=0 );
|
||||||
|
virtual ~ImlibWidget();
|
||||||
|
|
||||||
|
KURL url() const;
|
||||||
|
KuickFile * currentFile() const;
|
||||||
|
bool loadImage( KuickFile * file );
|
||||||
|
bool loadImage( const KURL& url );
|
||||||
|
bool cacheImage(const KURL& url );
|
||||||
|
void zoomImage( float );
|
||||||
|
void setBrightness( int );
|
||||||
|
void setContrast( int );
|
||||||
|
void setGamma( int );
|
||||||
|
void setRotation( Rotation );
|
||||||
|
void setFlipMode( int mode );
|
||||||
|
|
||||||
|
int brightness() const; // ### no impl!
|
||||||
|
int contrast() const; // ### no impl!
|
||||||
|
int gamma() const; // ### no impl!
|
||||||
|
Rotation rotation() const;
|
||||||
|
FlipMode flipMode() const;
|
||||||
|
|
||||||
|
int imageWidth() const;
|
||||||
|
int imageHeight() const;
|
||||||
|
|
||||||
|
void setAutoRender( bool enable ) { isAutoRendering = enable;}
|
||||||
|
bool isAutoRenderEnabled() const { return isAutoRendering; }
|
||||||
|
void setMaxImageCache( int );
|
||||||
|
int maxImageCache() const { return myMaxImageCache; }
|
||||||
|
const QColor& backgroundColor() const;
|
||||||
|
void setBackgroundColor( const QColor& );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if auto-rotation is not possible, e.g. because no metadata
|
||||||
|
* about orientation is available
|
||||||
|
*/
|
||||||
|
virtual bool autoRotate( KuickImage *kuim );
|
||||||
|
|
||||||
|
ImlibData* getImlibData() const { return id; }
|
||||||
|
|
||||||
|
virtual void reparent( QWidget* parent, WFlags f, const QPoint& p, bool showIt = FALSE );
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void rotate90();
|
||||||
|
void rotate270();
|
||||||
|
void rotate180();
|
||||||
|
void flipHoriz();
|
||||||
|
void flipVert();
|
||||||
|
void showImageOriginalSize();
|
||||||
|
inline void updateImage() { updateWidget( true ); }
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
KuickImage * loadImageInternal( KuickFile * file );
|
||||||
|
void showImage();
|
||||||
|
void setImageModifier();
|
||||||
|
void rotate( int );
|
||||||
|
void updateWidget( bool geometryUpdate=true );
|
||||||
|
virtual void updateGeometry( int width, int height );
|
||||||
|
virtual void loaded( KuickImage * );
|
||||||
|
virtual bool canZoomTo( int newWidth, int newHeight );
|
||||||
|
virtual void rotated( KuickImage *kuim, int rotation );
|
||||||
|
|
||||||
|
void closeEvent( QCloseEvent * );
|
||||||
|
|
||||||
|
inline void autoUpdate( bool geometryUpdate=false ) {
|
||||||
|
if ( isAutoRendering )
|
||||||
|
updateWidget( geometryUpdate );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool stillResizing, deleteImData, deleteImlibData;
|
||||||
|
bool imlibModifierChanged;
|
||||||
|
|
||||||
|
KuickImage *m_kuim;
|
||||||
|
ImageCache *imageCache;
|
||||||
|
ImlibData *id;
|
||||||
|
ImData *idata;
|
||||||
|
Window win;
|
||||||
|
ImlibColorModifier mod;
|
||||||
|
|
||||||
|
KuickFile *m_kuickFile;
|
||||||
|
QCursor m_oldCursor;
|
||||||
|
|
||||||
|
static const int ImlibOffset;
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
void init();
|
||||||
|
bool isAutoRendering;
|
||||||
|
int myMaxImageCache;
|
||||||
|
QColor myBackgroundColor;
|
||||||
|
|
||||||
|
|
||||||
|
protected slots:
|
||||||
|
bool cacheImage( KuickFile *file );
|
||||||
|
virtual void setBusyCursor();
|
||||||
|
virtual void restoreCursor();
|
||||||
|
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void sigImageError( const KuickFile * file, const QString& );
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,4 @@
|
|||||||
|
#include "kuick.h"
|
||||||
|
|
||||||
|
Kuick * Kuick::s_self = 0L;
|
||||||
|
QSize Kuick::s_frameSize;
|
@ -0,0 +1,70 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 2000,2001,2002 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef KUICKGLOBALS_H
|
||||||
|
#define KUICKGLOBALS_H
|
||||||
|
|
||||||
|
#include <qrect.h>
|
||||||
|
#include <qsize.h>
|
||||||
|
|
||||||
|
#include <kwin.h>
|
||||||
|
#include <kwinmodule.h>
|
||||||
|
|
||||||
|
class Kuick
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static QRect workArea() {
|
||||||
|
return self()->winModule.workArea();
|
||||||
|
}
|
||||||
|
|
||||||
|
static QSize frameSize( WId win = 0L ) {
|
||||||
|
if ( win ) {
|
||||||
|
KWin::WindowInfo info = KWin::windowInfo(win, NET::WMKDEFrameStrut | NET::WMGeometry);
|
||||||
|
int wborder = info.frameGeometry().width() - info.geometry().width();
|
||||||
|
int hborder = info.frameGeometry().height() - info.geometry().height();
|
||||||
|
|
||||||
|
if ( wborder || hborder ) { // we get a 0,0 border when not shown
|
||||||
|
s_frameSize.setWidth( wborder );
|
||||||
|
s_frameSize.setHeight( hborder );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !s_frameSize.isValid() )
|
||||||
|
return QSize( 0, 0 );
|
||||||
|
|
||||||
|
return s_frameSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Kuick * self() {
|
||||||
|
if ( !s_self ) {
|
||||||
|
s_self = new Kuick;
|
||||||
|
}
|
||||||
|
return s_self;
|
||||||
|
}
|
||||||
|
|
||||||
|
KWinModule winModule;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Kuick() {}
|
||||||
|
static Kuick * s_self;
|
||||||
|
|
||||||
|
static QSize s_frameSize;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // KUICKGLOBALS_H
|
@ -0,0 +1,99 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2002 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef index
|
||||||
|
#undef index
|
||||||
|
#endif
|
||||||
|
#include "kuickconfigdlg.h"
|
||||||
|
|
||||||
|
#include <qkeycode.h>
|
||||||
|
#include <qvbox.h>
|
||||||
|
|
||||||
|
#include <kaccel.h>
|
||||||
|
#include <kconfig.h>
|
||||||
|
#include <kglobal.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
|
||||||
|
#include "imagewindow.h"
|
||||||
|
#include "defaultswidget.h"
|
||||||
|
#include "generalwidget.h"
|
||||||
|
#include "slideshowwidget.h"
|
||||||
|
|
||||||
|
#include "kuickdata.h"
|
||||||
|
|
||||||
|
|
||||||
|
KuickConfigDialog::KuickConfigDialog( KActionCollection *_coll, QWidget *parent,
|
||||||
|
const char *name, bool modal )
|
||||||
|
: KDialogBase( Tabbed, i18n("Configure"),
|
||||||
|
Help | Default | Ok | Apply | Cancel, Ok,
|
||||||
|
parent, name, modal )
|
||||||
|
{
|
||||||
|
coll = _coll;
|
||||||
|
QVBox *box = addVBoxPage( i18n("&General") );
|
||||||
|
generalWidget = new GeneralWidget( box, "general widget" );
|
||||||
|
|
||||||
|
box = addVBoxPage( i18n("&Modifications") );
|
||||||
|
defaultsWidget = new DefaultsWidget( box, "defaults widget" );
|
||||||
|
|
||||||
|
box = addVBoxPage( i18n("&Slideshow") );
|
||||||
|
slideshowWidget = new SlideShowWidget( box, "slideshow widget" );
|
||||||
|
|
||||||
|
box = addVBoxPage( i18n("&Viewer Shortcuts") );
|
||||||
|
|
||||||
|
imageWindow = new ImageWindow(); // just to get the accel...
|
||||||
|
imageWindow->hide();
|
||||||
|
|
||||||
|
imageKeyChooser = new KKeyChooser( imageWindow->actionCollection(), box );
|
||||||
|
|
||||||
|
box = addVBoxPage( i18n("Bro&wser Shortcuts") );
|
||||||
|
browserKeyChooser = new KKeyChooser( coll, box );
|
||||||
|
|
||||||
|
connect( this, SIGNAL( defaultClicked() ), SLOT( resetDefaults() ));
|
||||||
|
}
|
||||||
|
|
||||||
|
KuickConfigDialog::~KuickConfigDialog()
|
||||||
|
{
|
||||||
|
imageWindow->close( true );
|
||||||
|
}
|
||||||
|
|
||||||
|
void KuickConfigDialog::applyConfig()
|
||||||
|
{
|
||||||
|
generalWidget->applySettings( *kdata );
|
||||||
|
defaultsWidget->applySettings( *kdata );
|
||||||
|
slideshowWidget->applySettings( *kdata );
|
||||||
|
|
||||||
|
imageKeyChooser->save();
|
||||||
|
browserKeyChooser->save();
|
||||||
|
|
||||||
|
KGlobal::config()->sync();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void KuickConfigDialog::resetDefaults()
|
||||||
|
{
|
||||||
|
KuickData data;
|
||||||
|
generalWidget->loadSettings( data );
|
||||||
|
defaultsWidget->loadSettings( data );
|
||||||
|
slideshowWidget->loadSettings( data );
|
||||||
|
|
||||||
|
imageKeyChooser->allDefault();
|
||||||
|
browserKeyChooser->allDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "kuickconfigdlg.moc"
|
@ -0,0 +1,58 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2003 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef KUICKCONFIGDLG_H
|
||||||
|
#define KUICKCONFIGDLG_H
|
||||||
|
|
||||||
|
#include <qevent.h>
|
||||||
|
|
||||||
|
#include <kkeydialog.h>
|
||||||
|
|
||||||
|
#include <kdialogbase.h>
|
||||||
|
|
||||||
|
class GeneralWidget;
|
||||||
|
class DefaultsWidget;
|
||||||
|
class SlideShowWidget;
|
||||||
|
class ImageWindow;
|
||||||
|
|
||||||
|
class KuickConfigDialog : public KDialogBase
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
KuickConfigDialog( KActionCollection *coll, QWidget *parent=0,
|
||||||
|
const char *name=0, bool modal=true);
|
||||||
|
~KuickConfigDialog();
|
||||||
|
|
||||||
|
void applyConfig();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void resetDefaults();
|
||||||
|
|
||||||
|
private:
|
||||||
|
DefaultsWidget *defaultsWidget;
|
||||||
|
GeneralWidget *generalWidget;
|
||||||
|
SlideShowWidget *slideshowWidget;
|
||||||
|
KKeyChooser *imageKeyChooser, *browserKeyChooser;
|
||||||
|
KActionCollection *coll;
|
||||||
|
|
||||||
|
ImageWindow *imageWindow;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,177 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2003 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <qcolor.h>
|
||||||
|
#include <kconfig.h>
|
||||||
|
#include <kglobal.h>
|
||||||
|
|
||||||
|
#include "kuickdata.h"
|
||||||
|
|
||||||
|
|
||||||
|
KuickData::KuickData()
|
||||||
|
{
|
||||||
|
fileFilter = "*.jpeg *.jpg *.gif *.xpm *.ppm *.pgm *.pbm *.pnm *.png *.bmp *.psd *.eim *.tif *.tiff *.xcf";// *.mng";
|
||||||
|
slideDelay = 3000;
|
||||||
|
slideshowCycles = 1;
|
||||||
|
slideshowFullscreen = true;
|
||||||
|
slideshowStartAtFirst = true;
|
||||||
|
|
||||||
|
preloadImage = true;
|
||||||
|
|
||||||
|
isModsEnabled = true;
|
||||||
|
fullScreen = false;
|
||||||
|
autoRotation = true;
|
||||||
|
downScale = true;
|
||||||
|
upScale = false;
|
||||||
|
flipVertically = false;
|
||||||
|
flipHorizontally = false;
|
||||||
|
|
||||||
|
maxUpScale = 3;
|
||||||
|
rotation = ROT_0;
|
||||||
|
|
||||||
|
brightnessSteps = 1;
|
||||||
|
contrastSteps = 1;
|
||||||
|
gammaSteps = 1;
|
||||||
|
scrollSteps = 1;
|
||||||
|
zoomSteps = 1.5;
|
||||||
|
|
||||||
|
maxZoomFactor = 4.0;
|
||||||
|
|
||||||
|
maxCachedImages = 4;
|
||||||
|
backgroundColor = Qt::black;
|
||||||
|
|
||||||
|
startInLastDir = true;
|
||||||
|
|
||||||
|
idata = new ImData;
|
||||||
|
}
|
||||||
|
|
||||||
|
KuickData::~KuickData()
|
||||||
|
{
|
||||||
|
delete idata;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void KuickData::load()
|
||||||
|
{
|
||||||
|
KConfig *kc = KGlobal::config();
|
||||||
|
|
||||||
|
KuickData def;
|
||||||
|
|
||||||
|
kc->setGroup( "GeneralConfiguration" );
|
||||||
|
fileFilter = kc->readEntry( "FileFilter", def.fileFilter );
|
||||||
|
slideDelay = kc->readNumEntry( "SlideShowDelay", def.slideDelay );
|
||||||
|
slideshowCycles = kc->readUnsignedNumEntry( "SlideshowCycles", 1 );
|
||||||
|
slideshowFullscreen = kc->readBoolEntry( "SlideshowFullscreen", true );
|
||||||
|
slideshowStartAtFirst = kc->readBoolEntry("SlideshowStartAtFirst", true );
|
||||||
|
|
||||||
|
preloadImage = kc->readBoolEntry( "PreloadNextImage", def.preloadImage );
|
||||||
|
|
||||||
|
fullScreen = kc->readBoolEntry( "Fullscreen", def.fullScreen);
|
||||||
|
autoRotation = kc->readBoolEntry( "AutoRotation", def.autoRotation);
|
||||||
|
downScale = kc->readBoolEntry( "ShrinkToScreenSize", def.downScale );
|
||||||
|
upScale = kc->readBoolEntry( "ZoomToScreenSize", def.upScale );
|
||||||
|
flipVertically = kc->readBoolEntry( "FlipVertically", def.flipVertically );
|
||||||
|
flipHorizontally = kc->readBoolEntry( "FlipHorizontally",
|
||||||
|
def.flipHorizontally );
|
||||||
|
maxUpScale = kc->readNumEntry( "MaxUpscale Factor", def.maxUpScale );
|
||||||
|
rotation = (Rotation) kc->readNumEntry( "Rotation", def.rotation );
|
||||||
|
|
||||||
|
isModsEnabled = kc->readBoolEntry( "ApplyDefaultModifications",
|
||||||
|
def.isModsEnabled );
|
||||||
|
|
||||||
|
brightnessSteps = kc->readNumEntry("BrightnessStepSize",def.brightnessSteps);
|
||||||
|
contrastSteps = kc->readNumEntry("ContrastStepSize", def.contrastSteps);
|
||||||
|
gammaSteps = kc->readNumEntry("GammaStepSize", def.gammaSteps);
|
||||||
|
scrollSteps = kc->readNumEntry("ScrollingStepSize", def.scrollSteps);
|
||||||
|
zoomSteps = kc->readDoubleNumEntry("ZoomStepSize", def.zoomSteps);
|
||||||
|
|
||||||
|
maxZoomFactor = kc->readDoubleNumEntry( "MaximumZoomFactorByDesktop", def.maxZoomFactor );
|
||||||
|
|
||||||
|
maxCachedImages = kc->readUnsignedNumEntry( "MaxCachedImages",
|
||||||
|
def.maxCachedImages );
|
||||||
|
backgroundColor = kc->readColorEntry( "BackgroundColor", &Qt::black );
|
||||||
|
|
||||||
|
startInLastDir = kc->readBoolEntry( "StartInLastDir", true);
|
||||||
|
|
||||||
|
idata->load( kc );
|
||||||
|
|
||||||
|
// compatibility with KuickShow <= 0.8.3
|
||||||
|
switch ( rotation )
|
||||||
|
{
|
||||||
|
case 90:
|
||||||
|
rotation = ROT_90;
|
||||||
|
break;
|
||||||
|
case 180:
|
||||||
|
rotation = ROT_180;
|
||||||
|
break;
|
||||||
|
case 270:
|
||||||
|
rotation = ROT_270;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if ( (rotation < ROT_0) || (rotation > ROT_270) )
|
||||||
|
rotation = ROT_0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void KuickData::save()
|
||||||
|
{
|
||||||
|
KConfig *kc = KGlobal::config();
|
||||||
|
kc->setGroup( "GeneralConfiguration" );
|
||||||
|
|
||||||
|
kc->writeEntry( "FileFilter", fileFilter );
|
||||||
|
kc->writeEntry( "SlideShowDelay", slideDelay );
|
||||||
|
kc->writeEntry( "SlideshowCycles", slideshowCycles );
|
||||||
|
kc->writeEntry( "SlideshowFullscreen", slideshowFullscreen );
|
||||||
|
kc->writeEntry( "SlideshowStartAtFirst", slideshowStartAtFirst );
|
||||||
|
|
||||||
|
kc->writeEntry( "PreloadNextImage", preloadImage );
|
||||||
|
|
||||||
|
kc->writeEntry( "Fullscreen", fullScreen );
|
||||||
|
kc->writeEntry( "AutoRotation", autoRotation );
|
||||||
|
kc->writeEntry( "ShrinkToScreenSize", downScale );
|
||||||
|
kc->writeEntry( "ZoomToScreenSize", upScale );
|
||||||
|
kc->writeEntry( "FlipVertically", flipVertically );
|
||||||
|
kc->writeEntry( "FlipHorizontally", flipHorizontally );
|
||||||
|
kc->writeEntry( "MaxUpscale Factor", maxUpScale );
|
||||||
|
kc->writeEntry( "Rotation", rotation );
|
||||||
|
|
||||||
|
kc->writeEntry( "ApplyDefaultModifications", isModsEnabled );
|
||||||
|
|
||||||
|
|
||||||
|
kc->writeEntry( "BrightnessStepSize", brightnessSteps );
|
||||||
|
kc->writeEntry( "ContrastStepSize", contrastSteps );
|
||||||
|
kc->writeEntry( "GammaStepSize", gammaSteps );
|
||||||
|
|
||||||
|
kc->writeEntry( "ScrollingStepSize", scrollSteps );
|
||||||
|
kc->writeEntry( "ZoomStepSize", zoomSteps );
|
||||||
|
|
||||||
|
kc->writeEntry( "MaximumZoomFactorByDesktop", maxZoomFactor );
|
||||||
|
|
||||||
|
kc->writeEntry( "MaxCachedImages", maxCachedImages );
|
||||||
|
kc->writeEntry( "BackgroundColor", backgroundColor );
|
||||||
|
|
||||||
|
kc->writeEntry( "StartInLastDir", startInLastDir );
|
||||||
|
|
||||||
|
idata->save( kc );
|
||||||
|
|
||||||
|
kc->sync();
|
||||||
|
}
|
@ -0,0 +1,86 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2003 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef KUICKDATA_H
|
||||||
|
#define KUICKDATA_H
|
||||||
|
|
||||||
|
#include <qcolor.h>
|
||||||
|
#include <qstring.h>
|
||||||
|
|
||||||
|
#include "imdata.h"
|
||||||
|
|
||||||
|
class KConfig;
|
||||||
|
|
||||||
|
// values are also used as combobox index defaultswidget.*
|
||||||
|
enum Rotation { ROT_0=0, ROT_90=1, ROT_180=2, ROT_270=3 };
|
||||||
|
|
||||||
|
// hmm, global declaration for now
|
||||||
|
enum FlipMode { FlipNone = 0, FlipHorizontal = 1, FlipVertical = 2 };
|
||||||
|
|
||||||
|
class KuickData
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
KuickData();
|
||||||
|
~KuickData();
|
||||||
|
|
||||||
|
void load();
|
||||||
|
void save();
|
||||||
|
|
||||||
|
|
||||||
|
ImData *idata;
|
||||||
|
|
||||||
|
QString fileFilter;
|
||||||
|
uint slideDelay;
|
||||||
|
uint slideshowCycles;
|
||||||
|
bool slideshowFullscreen :1;
|
||||||
|
bool slideshowStartAtFirst :1;
|
||||||
|
|
||||||
|
int brightnessSteps;
|
||||||
|
int contrastSteps;
|
||||||
|
int gammaSteps;
|
||||||
|
|
||||||
|
int scrollSteps;
|
||||||
|
float zoomSteps;
|
||||||
|
|
||||||
|
bool startInLastDir :1;
|
||||||
|
|
||||||
|
bool preloadImage :1;
|
||||||
|
bool autoRotation :1;
|
||||||
|
bool fullScreen :1;
|
||||||
|
|
||||||
|
// default image modifications
|
||||||
|
bool isModsEnabled :1;
|
||||||
|
|
||||||
|
bool flipVertically :1;
|
||||||
|
bool flipHorizontally :1;
|
||||||
|
bool downScale :1;
|
||||||
|
bool upScale :1;
|
||||||
|
int maxUpScale;
|
||||||
|
float maxZoomFactor;
|
||||||
|
uint maxCachedImages;
|
||||||
|
Rotation rotation;
|
||||||
|
|
||||||
|
QColor backgroundColor;
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
extern KuickData* kdata;
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,194 @@
|
|||||||
|
#include <qfile.h>
|
||||||
|
|
||||||
|
#include <kdebug.h>
|
||||||
|
#include <kdeversion.h>
|
||||||
|
#include <kinstance.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
#include <kprogress.h>
|
||||||
|
#include <kio/job.h>
|
||||||
|
#include <kio/netaccess.h>
|
||||||
|
#include <ktempfile.h>
|
||||||
|
|
||||||
|
#include "filecache.h"
|
||||||
|
#include "kuickfile.h"
|
||||||
|
|
||||||
|
KuickFile::KuickFile(const KURL& url)
|
||||||
|
: QObject(),
|
||||||
|
m_url( url ),
|
||||||
|
m_job( 0L ),
|
||||||
|
m_progress( 0L ),
|
||||||
|
m_currentProgress( 0 )
|
||||||
|
{
|
||||||
|
if ( m_url.isLocalFile())
|
||||||
|
m_localFile = m_url.path();
|
||||||
|
else {
|
||||||
|
const KURL& mostLocal = KIO::NetAccess::mostLocalURL( m_url, 0L );
|
||||||
|
if ( mostLocal.isValid() && mostLocal.isLocalFile() )
|
||||||
|
m_localFile = mostLocal.path();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
KuickFile::~KuickFile()
|
||||||
|
{
|
||||||
|
delete m_job;
|
||||||
|
|
||||||
|
if ( hasDownloaded() )
|
||||||
|
QFile::remove( m_localFile );
|
||||||
|
}
|
||||||
|
|
||||||
|
QString KuickFile::localFile() const
|
||||||
|
{
|
||||||
|
// Note: never call isAvailable() from here, directly or indirectly
|
||||||
|
|
||||||
|
if ( isDownloading() )
|
||||||
|
return QString::null;
|
||||||
|
|
||||||
|
return m_localFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool KuickFile::hasDownloaded() const
|
||||||
|
{
|
||||||
|
return !m_url.isLocalFile() && isAvailable() && m_job != 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ### need an API for refreshing the file?
|
||||||
|
bool KuickFile::download()
|
||||||
|
{
|
||||||
|
if ( m_url.isLocalFile() || isAvailable() )
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if ( isDownloading() )
|
||||||
|
return true;
|
||||||
|
|
||||||
|
// reinitialize
|
||||||
|
m_localFile = QString::null;
|
||||||
|
m_currentProgress = 0;
|
||||||
|
|
||||||
|
|
||||||
|
QString ext;
|
||||||
|
QString fileName = m_url.fileName();
|
||||||
|
int extIndex = fileName.findRev('.');
|
||||||
|
if ( extIndex > 0 )
|
||||||
|
ext = fileName.mid( extIndex + 1 );
|
||||||
|
|
||||||
|
QString tempDir = FileCache::self()->tempDir();
|
||||||
|
KTempFile tempFile( tempDir, ext );
|
||||||
|
tempFile.setAutoDelete( tempDir.isNull() ); // in case there is no proper tempdir, make sure to delete those files!
|
||||||
|
if ( tempFile.status() != 0 )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
tempFile.close();
|
||||||
|
if ( tempFile.status() != 0 )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
KURL destURL;
|
||||||
|
destURL.setPath( tempFile.name() );
|
||||||
|
|
||||||
|
m_job = KIO::file_copy( m_url, destURL, -1, true, false, false ); // handling progress ourselves
|
||||||
|
m_job->setAutoErrorHandlingEnabled( true );
|
||||||
|
connect( m_job, SIGNAL( result( KIO::Job * )), SLOT( slotResult( KIO::Job * ) ));
|
||||||
|
connect( m_job, SIGNAL( percent( KIO::Job *, unsigned long )), SLOT( slotProgress( KIO::Job *, unsigned long ) ));
|
||||||
|
|
||||||
|
// TODO: generify background/foreground downloading?
|
||||||
|
|
||||||
|
return m_job != 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
KuickFile::DownloadStatus KuickFile::waitForDownload( QWidget *parent )
|
||||||
|
{
|
||||||
|
if ( isAvailable() )
|
||||||
|
return OK;
|
||||||
|
|
||||||
|
if ( !isDownloading() ) {
|
||||||
|
if ( !download() )
|
||||||
|
return ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
KProgressDialog *dialog = new KProgressDialog( parent );
|
||||||
|
dialog->setModal( true );
|
||||||
|
dialog->setCaption( i18n("Downloading %1...").arg( m_url.fileName() ) );
|
||||||
|
dialog->setLabel( i18n("Please wait while downloading\n%1").arg( m_url.prettyURL() ));
|
||||||
|
dialog->setAllowCancel( true );
|
||||||
|
dialog->setAutoClose( true );
|
||||||
|
|
||||||
|
m_progress = dialog->progressBar();
|
||||||
|
m_progress->setTotalSteps( 100 ); // percent
|
||||||
|
m_progress->setProgress( m_currentProgress );
|
||||||
|
dialog->exec();
|
||||||
|
bool canceled = dialog->wasCancelled();
|
||||||
|
delete dialog;
|
||||||
|
m_progress = 0L;
|
||||||
|
|
||||||
|
if ( canceled && m_job ) {
|
||||||
|
m_job->kill();
|
||||||
|
m_job = 0L;
|
||||||
|
m_currentProgress = 0;
|
||||||
|
}
|
||||||
|
// ### when aborted, remove KuickImage from FileCache?
|
||||||
|
|
||||||
|
if ( canceled )
|
||||||
|
return CANCELED;
|
||||||
|
|
||||||
|
if ( !isAvailable() )
|
||||||
|
return ERROR;
|
||||||
|
|
||||||
|
// ### use custom progress dialog with OK, SKIP, CANCEL?
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void KuickFile::slotResult( KIO::Job *job )
|
||||||
|
{
|
||||||
|
if (job != m_job) { // huh?
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_job = 0L;
|
||||||
|
|
||||||
|
if ( job->error() != 0 ) {
|
||||||
|
m_currentProgress = 0;
|
||||||
|
|
||||||
|
if ( job->error() != KIO::ERR_USER_CANCELED )
|
||||||
|
kdWarning() << "ERROR: KuickFile::slotResult: " << job->errorString() << endl;
|
||||||
|
|
||||||
|
QString canceledFile = static_cast<KIO::FileCopyJob*>(job)->destURL().path();
|
||||||
|
QFile::remove( canceledFile );
|
||||||
|
m_progress->topLevelWidget()->hide();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_localFile = static_cast<KIO::FileCopyJob*>(job)->destURL().path();
|
||||||
|
emit downloaded( this ); // before closing the progress dialog
|
||||||
|
|
||||||
|
if ( m_progress ) {
|
||||||
|
m_progress->setProgress( 100 );
|
||||||
|
#define BUGGY_VERSION KDE_MAKE_VERSION(3,5,2)
|
||||||
|
if ( KDE::version() <= BUGGY_VERSION ) {
|
||||||
|
m_progress->topLevelWidget()->hide(); // ### workaround broken KProgressDialog
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void KuickFile::slotProgress( KIO::Job *job, unsigned long percent )
|
||||||
|
{
|
||||||
|
if (job != m_job) { // huh?
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_currentProgress = percent;
|
||||||
|
|
||||||
|
if ( !m_progress )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// only set 100% in slotResult. Otherwise, the progress dialog would be closed
|
||||||
|
// before slotResult() is called.
|
||||||
|
if ( percent >= 100 )
|
||||||
|
percent = 99;
|
||||||
|
|
||||||
|
m_progress->setProgress( (int) percent );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator==( const KuickFile& first, const KuickFile& second ) {
|
||||||
|
return first.url().equals( second.url() );
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "kuickfile.moc"
|
@ -0,0 +1,99 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** $Id: .emacs,v 1.3 2002/02/20 15:06:53 gis Exp $
|
||||||
|
**
|
||||||
|
** Created : 2006
|
||||||
|
**
|
||||||
|
** Copyright (C) 2006 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef KUICKFILE_H
|
||||||
|
#define KUICKFILE_H
|
||||||
|
|
||||||
|
#include <qobject.h>
|
||||||
|
#include <qstring.h>
|
||||||
|
|
||||||
|
#include <kurl.h>
|
||||||
|
#include <kprogress.h>
|
||||||
|
|
||||||
|
namespace KIO {
|
||||||
|
class Job;
|
||||||
|
class FileCopyJob;
|
||||||
|
}
|
||||||
|
|
||||||
|
class KuickFile : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
enum DownloadStatus
|
||||||
|
{
|
||||||
|
OK = 1,
|
||||||
|
CANCELED,
|
||||||
|
ERROR
|
||||||
|
};
|
||||||
|
|
||||||
|
KuickFile(const KURL& url);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cleans up resources and removes any temporary file, if available.
|
||||||
|
*/
|
||||||
|
~KuickFile();
|
||||||
|
|
||||||
|
const KURL& url() const { return m_url; }
|
||||||
|
|
||||||
|
|
||||||
|
QString localFile() const;
|
||||||
|
|
||||||
|
bool download();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if download is in progress
|
||||||
|
*/
|
||||||
|
bool isDownloading() const { return m_job != 0L; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if a local file is available, that is,
|
||||||
|
* @ref #localFile will return a non-empty name
|
||||||
|
* ### HERE ADD mostlylocal thing!
|
||||||
|
*/
|
||||||
|
bool isAvailable() const { return !localFile().isEmpty(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if @ref #isAvailable() returns true AND @ref #url() is a remote URL,
|
||||||
|
* i.e. the file really has been downloaded.
|
||||||
|
*/
|
||||||
|
bool hasDownloaded() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Opens a modal dialog window, blocking user interaction until the download
|
||||||
|
* has finished. If the file is already available, this function will return true
|
||||||
|
* immediately.
|
||||||
|
* @return true when the download has finished or false when the user aborted the dialog
|
||||||
|
*/
|
||||||
|
KuickFile::DownloadStatus waitForDownload( QWidget *parent );
|
||||||
|
|
||||||
|
// bool needsDownload();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
/**
|
||||||
|
* Signals that download has finished for that file. Will only be emitted for non-local files!
|
||||||
|
*/
|
||||||
|
void downloaded( KuickFile * );
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void slotResult( KIO::Job *job );
|
||||||
|
void slotProgress( KIO::Job *job, unsigned long percent );
|
||||||
|
|
||||||
|
private:
|
||||||
|
KURL m_url;
|
||||||
|
QString m_localFile;
|
||||||
|
KIO::FileCopyJob *m_job;
|
||||||
|
KProgress *m_progress;
|
||||||
|
int m_currentProgress;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
bool operator==( const KuickFile& first, const KuickFile& second );
|
||||||
|
|
||||||
|
#endif // KUICKFILE_H
|
@ -0,0 +1,33 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 2001,2002 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef KUICKGLOBALS_H
|
||||||
|
#define KUICKGLOBALS_H
|
||||||
|
|
||||||
|
#include <kwinmodule.h>
|
||||||
|
|
||||||
|
class KuickGlobals
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
KWinModule winModule;
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // KUICKGLOBALS_H
|
@ -0,0 +1,527 @@
|
|||||||
|
#include "kuickimage.h"
|
||||||
|
|
||||||
|
KuickImage::KuickImage( const KuickFile * file, ImlibImage *im, ImlibData *id)
|
||||||
|
: QObject( 0L, 0L )
|
||||||
|
{
|
||||||
|
myFile = file;
|
||||||
|
myOrigIm = 0L;
|
||||||
|
myIm = im;
|
||||||
|
myId = id;
|
||||||
|
myPixmap = 0L;
|
||||||
|
myWidth = im->rgb_width;
|
||||||
|
myHeight = im->rgb_height;
|
||||||
|
myIsDirty = true;
|
||||||
|
|
||||||
|
myOrigWidth = myWidth;
|
||||||
|
myOrigHeight = myHeight;
|
||||||
|
myRotation = ROT_0;
|
||||||
|
myFlipMode = FlipNone;
|
||||||
|
}
|
||||||
|
|
||||||
|
KuickImage::~KuickImage()
|
||||||
|
{
|
||||||
|
if ( myPixmap )
|
||||||
|
Imlib_free_pixmap( myId, myPixmap );
|
||||||
|
|
||||||
|
if ( myOrigIm )
|
||||||
|
{
|
||||||
|
Imlib_destroy_image( myId, myOrigIm );
|
||||||
|
Imlib_kill_image( myId, myIm ); // kill scaled image (### really? analyze!)
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Imlib_destroy_image( myId, myIm );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Pixmap& KuickImage::pixmap()
|
||||||
|
{
|
||||||
|
if ( myIsDirty )
|
||||||
|
renderPixmap();
|
||||||
|
|
||||||
|
return myPixmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void KuickImage::renderPixmap()
|
||||||
|
{
|
||||||
|
if ( !myIsDirty )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// qDebug("### rendering: %s", myFilename.latin1());
|
||||||
|
|
||||||
|
if ( myPixmap )
|
||||||
|
Imlib_free_pixmap( myId, myPixmap );
|
||||||
|
|
||||||
|
emit startRendering();
|
||||||
|
|
||||||
|
// #ifndef NDEBUG
|
||||||
|
// struct timeval tms1, tms2;
|
||||||
|
// gettimeofday( &tms1, NULL );
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
Imlib_render( myId, myIm, myWidth, myHeight );
|
||||||
|
myPixmap = Imlib_move_image( myId, myIm );
|
||||||
|
|
||||||
|
// #ifndef NDEBUG
|
||||||
|
// gettimeofday( &tms2, NULL );
|
||||||
|
// qDebug("*** rendering image: %s, took %ld ms", myFilename.latin1(),
|
||||||
|
// (tms2.tv_usec - tms1.tv_usec)/1000);
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
emit stoppedRendering();
|
||||||
|
|
||||||
|
myIsDirty = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void KuickImage::rotate( Rotation rot )
|
||||||
|
{
|
||||||
|
if ( rot == ROT_180 ) { // rotate 180 degrees
|
||||||
|
Imlib_flip_image_horizontal( myId, myIm );
|
||||||
|
Imlib_flip_image_vertical( myId, myIm );
|
||||||
|
}
|
||||||
|
|
||||||
|
else if ( rot == ROT_90 || rot == ROT_270 ) {
|
||||||
|
qSwap( myWidth, myHeight );
|
||||||
|
Imlib_rotate_image( myId, myIm, -1 );
|
||||||
|
|
||||||
|
if ( rot == ROT_90 ) // rotate 90 degrees
|
||||||
|
Imlib_flip_image_horizontal( myId, myIm );
|
||||||
|
else if ( rot == ROT_270 ) // rotate 270 degrees
|
||||||
|
Imlib_flip_image_vertical( myId, myIm );
|
||||||
|
}
|
||||||
|
|
||||||
|
myRotation = (Rotation) ((myRotation + rot) % 4);
|
||||||
|
myIsDirty = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool KuickImage::rotateAbs( Rotation rot )
|
||||||
|
{
|
||||||
|
if ( myRotation == rot )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
int diff = rot - myRotation;
|
||||||
|
bool clockWise = (diff > 0);
|
||||||
|
|
||||||
|
switch( abs(diff) ) {
|
||||||
|
case ROT_90:
|
||||||
|
rotate( clockWise ? ROT_90 : ROT_270 );
|
||||||
|
break;
|
||||||
|
case ROT_180:
|
||||||
|
rotate( ROT_180 );
|
||||||
|
break;
|
||||||
|
case ROT_270:
|
||||||
|
rotate( clockWise ? ROT_270 : ROT_90 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void KuickImage::flip( FlipMode flipMode )
|
||||||
|
{
|
||||||
|
if ( flipMode & FlipHorizontal )
|
||||||
|
Imlib_flip_image_horizontal( myId, myIm );
|
||||||
|
if ( flipMode & FlipVertical )
|
||||||
|
Imlib_flip_image_vertical( myId, myIm );
|
||||||
|
|
||||||
|
myFlipMode = (FlipMode) (myFlipMode ^ flipMode);
|
||||||
|
myIsDirty = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool KuickImage::flipAbs( int mode )
|
||||||
|
{
|
||||||
|
if ( myFlipMode == mode )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
bool changed = false;
|
||||||
|
|
||||||
|
if ( ((myFlipMode & FlipHorizontal) && !(mode & FlipHorizontal)) ||
|
||||||
|
(!(myFlipMode & FlipHorizontal) && (mode & FlipHorizontal)) ) {
|
||||||
|
Imlib_flip_image_horizontal( myId, myIm );
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ((myFlipMode & FlipVertical) && !(mode & FlipVertical)) ||
|
||||||
|
(!(myFlipMode & FlipVertical) && (mode & FlipVertical)) ) {
|
||||||
|
Imlib_flip_image_vertical( myId, myIm );
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( changed ) {
|
||||||
|
myFlipMode = (FlipMode) mode;
|
||||||
|
myIsDirty = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void KuickImage::restoreOriginalSize()
|
||||||
|
{
|
||||||
|
if (myWidth == myOrigWidth && myHeight == myOrigHeight)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// qDebug("-- restoreOriginalSize");
|
||||||
|
|
||||||
|
if ( myOrigIm != 0L )
|
||||||
|
{
|
||||||
|
Imlib_destroy_image( myId, myIm );
|
||||||
|
myIm = myOrigIm;
|
||||||
|
myOrigIm = 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
myWidth = myOrigWidth;
|
||||||
|
myHeight = myOrigHeight;
|
||||||
|
myIsDirty = true;
|
||||||
|
|
||||||
|
if ( myRotation == ROT_90 || myRotation == ROT_270 )
|
||||||
|
qSwap( myWidth, myHeight );
|
||||||
|
}
|
||||||
|
|
||||||
|
void KuickImage::resize( int width, int height, KuickImage::ResizeMode mode )
|
||||||
|
{
|
||||||
|
if ( myWidth == width && myHeight == height )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ( mode == KuickImage::SMOOTH )
|
||||||
|
{
|
||||||
|
if ( !smoothResize( width, height ) )
|
||||||
|
fastResize( width, height );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fastResize( width, height );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void KuickImage::fastResize( int width, int height )
|
||||||
|
{
|
||||||
|
// qDebug("-- fastResize: %i x %i", width, height );
|
||||||
|
|
||||||
|
// lazy resizing (only done when rendering pixmap)
|
||||||
|
myWidth = width;
|
||||||
|
myHeight = height;
|
||||||
|
myIsDirty = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool KuickImage::smoothResize( int newWidth, int newHeight )
|
||||||
|
{
|
||||||
|
// qDebug("-- smoothResize: %i x %i", newWidth, newHeight);
|
||||||
|
|
||||||
|
QImage *image = newQImage();
|
||||||
|
// Note: QImage::ScaleMin seems to have a bug (off-by-one, sometimes results in width being 1 pixel too small)
|
||||||
|
QImage scaledImage = image->smoothScale(newWidth, newHeight, QImage::ScaleFree);
|
||||||
|
|
||||||
|
delete image;
|
||||||
|
|
||||||
|
|
||||||
|
ImlibImage *newIm = toImage( myId, scaledImage );
|
||||||
|
if ( newIm )
|
||||||
|
{
|
||||||
|
if ( myOrigIm == 0 )
|
||||||
|
myOrigIm = myIm;
|
||||||
|
|
||||||
|
myIm = newIm;
|
||||||
|
myWidth = newWidth;
|
||||||
|
myHeight = newHeight;
|
||||||
|
myIsDirty = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
QImage * KuickImage::newQImage() const
|
||||||
|
{
|
||||||
|
ImlibImage *im;
|
||||||
|
|
||||||
|
// qDebug("-- newQImage");
|
||||||
|
|
||||||
|
if ( myOrigIm != 0L && myRotation == ROT_0 && myFlipMode == FlipNone )
|
||||||
|
{
|
||||||
|
// use original image if no other modifications have been applied
|
||||||
|
// ### use orig image always and reapply mods?
|
||||||
|
im = myOrigIm;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
im = myIm;
|
||||||
|
}
|
||||||
|
|
||||||
|
int w = im->rgb_width;
|
||||||
|
int h = im->rgb_height;
|
||||||
|
|
||||||
|
QImage *image = new QImage( w, h, 32 );
|
||||||
|
uchar *rgb = im->rgb_data;
|
||||||
|
QRgb **destImageData = reinterpret_cast<QRgb**>( image->jumpTable() );
|
||||||
|
|
||||||
|
|
||||||
|
int byteIndex = 0;
|
||||||
|
int destLineIndex = 0;
|
||||||
|
int destByteIndex = 0;
|
||||||
|
for ( int pixel = 0; pixel < (w * h); pixel++ )
|
||||||
|
{
|
||||||
|
if ( pixel != 0 && (pixel % w) == 0 )
|
||||||
|
{
|
||||||
|
destLineIndex++;
|
||||||
|
destByteIndex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uchar r = rgb[byteIndex++];
|
||||||
|
uchar g = rgb[byteIndex++];
|
||||||
|
uchar b = rgb[byteIndex++];
|
||||||
|
|
||||||
|
QRgb rgbPixel = qRgb( r, g, b );
|
||||||
|
destImageData[destLineIndex][destByteIndex++] = rgbPixel;
|
||||||
|
}
|
||||||
|
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
|
||||||
|
ImlibImage * KuickImage::toImage( ImlibData *id, QImage& image )
|
||||||
|
{
|
||||||
|
if ( image.isNull() )
|
||||||
|
return 0L;
|
||||||
|
|
||||||
|
if ( image.depth() != 32 )
|
||||||
|
{
|
||||||
|
image.setAlphaBuffer(false);
|
||||||
|
image = image.convertDepth(32);
|
||||||
|
|
||||||
|
if ( image.isNull() )
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
// convert to 24 bpp (discard alpha)
|
||||||
|
int numPixels = image.width() * image.height();
|
||||||
|
const int NUM_BYTES_NEW = 3; // 24 bpp
|
||||||
|
uchar *newImageData = new uchar[numPixels * NUM_BYTES_NEW];
|
||||||
|
uchar *newData = newImageData;
|
||||||
|
|
||||||
|
int w = image.width();
|
||||||
|
int h = image.height();
|
||||||
|
|
||||||
|
for (int y = 0; y < h; y++) {
|
||||||
|
QRgb *scanLine = reinterpret_cast<QRgb *>( image.scanLine(y) );
|
||||||
|
for (int x = 0; x < w; x++) {
|
||||||
|
const QRgb& pixel = scanLine[x];
|
||||||
|
*(newData++) = qRed(pixel);
|
||||||
|
*(newData++) = qGreen(pixel);
|
||||||
|
*(newData++) = qBlue(pixel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ImlibImage *im = Imlib_create_image_from_data( id, newImageData, NULL,
|
||||||
|
image.width(), image.height() );
|
||||||
|
|
||||||
|
delete [] newImageData;
|
||||||
|
|
||||||
|
return im;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
bool KuickImage::smoothResize( int newWidth, int newHeight )
|
||||||
|
{
|
||||||
|
int numPixels = newWidth * newHeight;
|
||||||
|
const int NUM_BYTES_NEW = 3; // 24 bpp
|
||||||
|
uchar *newImageData = new uchar[numPixels * NUM_BYTES_NEW];
|
||||||
|
|
||||||
|
// ### endianness
|
||||||
|
// myIm : old image, old size
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////
|
||||||
|
// int w = myOrigWidth; //myViewport.width();
|
||||||
|
//int h = myOrigHeight; //myViewport.height();
|
||||||
|
|
||||||
|
//QImage dst(w, h, myIm->depth(), myIm->numColors(), myIm->bitOrder());
|
||||||
|
|
||||||
|
//QRgb *scanline;
|
||||||
|
|
||||||
|
int basis_ox, basis_oy, basis_xx, basis_yy;
|
||||||
|
|
||||||
|
// ### we only scale with a fixed factor for x and y anyway
|
||||||
|
double scalex = newWidth / (double) myOrigWidth;
|
||||||
|
double scaley = newHeight / (double) myOrigHeight;
|
||||||
|
|
||||||
|
// basis_ox=(int) (myViewport.left() * 4096.0 / scalex);
|
||||||
|
// basis_oy=(int) (myViewport.top() * 4096.0 / scaley);
|
||||||
|
basis_ox = 0;
|
||||||
|
basis_oy = 0;
|
||||||
|
basis_xx = (int) (4096.0 / scalex);
|
||||||
|
basis_yy = (int) (4096.0 / scaley);
|
||||||
|
|
||||||
|
//qDebug("Basis: (%d, %d), (%d, 0), (0, %d)", basis_ox, basis_oy, basis_xx, basis_yy);
|
||||||
|
|
||||||
|
int x2, y2;
|
||||||
|
|
||||||
|
int max_x2 = (myOrigWidth << 12);
|
||||||
|
int max_y2 = (myOrigHeight << 12);
|
||||||
|
|
||||||
|
// QRgb background = idata->backgroundColor.rgb();
|
||||||
|
|
||||||
|
// QRgb **imdata = (QRgb **) myIm->jumpTable();
|
||||||
|
// QRgb *imdata = reinterpret_cast<QRgb*>( myIm->rgb_data );
|
||||||
|
uchar *imdata = myIm->rgb_data;
|
||||||
|
|
||||||
|
|
||||||
|
int y = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// for (;;) //fill the top of the target pixmap with the background color
|
||||||
|
// {
|
||||||
|
// y2 = basis_oy + y * basis_yy;
|
||||||
|
//
|
||||||
|
// if ((y2 >= 0 && (y2 >> 12) < myIm->height()) || y >= h)
|
||||||
|
// break;
|
||||||
|
//
|
||||||
|
// scanline = (QRgb*) dst.scanLine(y);
|
||||||
|
// for (int i = 0; i < w; i++)
|
||||||
|
// *(scanline++) = background; //qRgb(0,255,0);
|
||||||
|
// y++;
|
||||||
|
// }
|
||||||
|
|
||||||
|
for (; y < newHeight; y++)
|
||||||
|
{
|
||||||
|
// scanline = (QRgb*) dst.scanLine(y);
|
||||||
|
|
||||||
|
x2 = basis_ox;
|
||||||
|
y2 = basis_oy + y * basis_yy;
|
||||||
|
|
||||||
|
if (y2 >= max_y2)
|
||||||
|
break;
|
||||||
|
|
||||||
|
int x = 0;
|
||||||
|
|
||||||
|
// while ((x2 < 0 || (x2 >> 12) >= myIm->width()) && x < w) //fill the left of the target pixmap with the background color
|
||||||
|
// {
|
||||||
|
// *(scanline++) = background; //qRgb(0,0,255);
|
||||||
|
// x2 += basis_xx;
|
||||||
|
// x++;
|
||||||
|
// }
|
||||||
|
|
||||||
|
int top = y2 >> 12;
|
||||||
|
int bottom = top + 1;
|
||||||
|
if (bottom >= myOrigHeight)
|
||||||
|
bottom--;
|
||||||
|
|
||||||
|
// for (; x < w; x++)
|
||||||
|
for (; x < newWidth; x++) // ### myOrigWidth orig
|
||||||
|
{
|
||||||
|
int left = x2 >> 12;
|
||||||
|
int right = left + 1;
|
||||||
|
|
||||||
|
if (right >= myOrigWidth)
|
||||||
|
right = myOrigWidth - 1;
|
||||||
|
|
||||||
|
unsigned int wx = x2 & 0xfff; //12 bits of precision for reasons which will become clear
|
||||||
|
unsigned int wy = y2 & 0xfff; //12 bits of precision
|
||||||
|
|
||||||
|
unsigned int iwx = 0xfff - wx;
|
||||||
|
unsigned int iwy = 0xfff - wy;
|
||||||
|
|
||||||
|
QRgb tl = 0, tr = 0, bl = 0, br = 0;
|
||||||
|
int ind = 0;
|
||||||
|
ind = (left + top * myOrigWidth) * 3;
|
||||||
|
tl = (imdata[ind] << 16);
|
||||||
|
tl |= (imdata[ind + 1] << 8);
|
||||||
|
tl |= (imdata[ind + 2] << 0);
|
||||||
|
int bar = imdata[ind + 2] << 8;
|
||||||
|
bar = qBlue(bar);
|
||||||
|
|
||||||
|
ind = (right + top * myOrigWidth) * 3;
|
||||||
|
tr = (imdata[ind] << 16);
|
||||||
|
tr |= (imdata[ind + 1] << 8);
|
||||||
|
tr |= (imdata[ind + 2] << 0);
|
||||||
|
bar = imdata[ind + 2] << 8;
|
||||||
|
|
||||||
|
ind = (left + bottom * myOrigWidth) * 3;
|
||||||
|
bl = (imdata[ind] << 16);
|
||||||
|
bl |= (imdata[ind + 1] << 8);
|
||||||
|
bl |= (imdata[ind + 2] << 0);
|
||||||
|
bar = imdata[ind + 2] << 8;
|
||||||
|
|
||||||
|
ind = (right + bottom * myOrigWidth) * 3;
|
||||||
|
br = (imdata[ind] << 16);
|
||||||
|
br |= (imdata[ind + 1] << 8);
|
||||||
|
br |= (imdata[ind + 2] << 0);
|
||||||
|
// tl=imdata[top][left];
|
||||||
|
// tr=imdata[top][right];
|
||||||
|
// bl=imdata[bottom][left];
|
||||||
|
// br=imdata[bottom][right];
|
||||||
|
|
||||||
|
/*
|
||||||
|
tl=getValidPixel(myIm, left, top, x, y); //these calls are expensive
|
||||||
|
tr=getValidPixel(myIm, right, top, x, y); //use them to debug segfaults in this function
|
||||||
|
bl=getValidPixel(myIm, left, bottom, x, y);
|
||||||
|
br=getValidPixel(myIm, right, bottom, x, y);
|
||||||
|
*/
|
||||||
|
|
||||||
|
unsigned int r = (unsigned int) (qRed(tl) * iwx * iwy + qRed(tr) * wx* iwy + qRed(bl) * iwx * wy + qRed(br) * wx * wy); // NB 12+12+8 == 32
|
||||||
|
unsigned int g = (unsigned int) (qGreen(tl) * iwx * iwy + qGreen(tr) * wx * iwy + qGreen(bl) * iwx * wy + qGreen(br) * wx * wy);
|
||||||
|
unsigned int b = (unsigned int) (qBlue(tl) * iwx * iwy + qBlue(tr) * wx * iwy + qBlue(bl) * iwx * wy + qBlue(br) * wx * wy);
|
||||||
|
|
||||||
|
// ### endianness
|
||||||
|
//we're actually off by one in 255 here! (254 instead of 255)
|
||||||
|
int foo = r >> 24;
|
||||||
|
foo = g >> 24;
|
||||||
|
foo = b >> 24;
|
||||||
|
newImageData[(y * newWidth * 3) + (x * 3) + 0] = (r >> 24);
|
||||||
|
newImageData[(y * newWidth * 3) + (x * 3) + 1] = (g >> 24);
|
||||||
|
newImageData[(y * newWidth * 3) + (x * 3) + 2] = (b >> 24);
|
||||||
|
// *(scanline++) = qRgb(r >> 24, g >> 24, b >> 24); //we're actually off by one in 255 here
|
||||||
|
|
||||||
|
x2 += basis_xx;
|
||||||
|
|
||||||
|
if (x2 > max_x2)
|
||||||
|
{
|
||||||
|
x++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// while (x < w) //fill the right of each scanline with the background colour
|
||||||
|
// {
|
||||||
|
// *(scanline++) = background; //qRgb(255,0,0);
|
||||||
|
// x++;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
// for (;;) //fill the bottom of the target pixmap with the background color
|
||||||
|
// {
|
||||||
|
// y2 = basis_oy + y * basis_yy;
|
||||||
|
//
|
||||||
|
// if (y >= h)
|
||||||
|
// break;
|
||||||
|
//
|
||||||
|
// scanline = (QRgb*) dst.scanLine(y);
|
||||||
|
// for (int i = 0; i < w; i++)
|
||||||
|
// *(scanline++) = background; //qRgb(255,255,0);
|
||||||
|
// y++;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// ### keep orig image somewhere but delete all scaled images!
|
||||||
|
ImlibImage *newIm = Imlib_create_image_from_data( myId, newImageData, NULL,
|
||||||
|
newWidth, newHeight );
|
||||||
|
delete[] newImageData;
|
||||||
|
|
||||||
|
if ( newIm )
|
||||||
|
{
|
||||||
|
myScaledIm = newIm;
|
||||||
|
myIsDirty = true;
|
||||||
|
myWidth = newWidth;
|
||||||
|
myHeight = newHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
return myIm != 0L;
|
||||||
|
// return dst.copy();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "kuickimage.moc"
|
@ -0,0 +1,92 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** $Id: .emacs,v 1.3 2002/02/20 15:06:53 gis Exp $
|
||||||
|
**
|
||||||
|
** Created : 2002
|
||||||
|
**
|
||||||
|
** Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef KUICKIMAGE_H
|
||||||
|
#define KUICKIMAGE_H
|
||||||
|
|
||||||
|
#include <qimage.h>
|
||||||
|
#include <qobject.h>
|
||||||
|
|
||||||
|
#include <kurl.h>
|
||||||
|
|
||||||
|
#include "kuickdata.h"
|
||||||
|
#include "kuickfile.h"
|
||||||
|
|
||||||
|
// #include those AFTER Qt-includes!
|
||||||
|
#include <Imlib.h>
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/Xutil.h>
|
||||||
|
// #include <X11/extensions/shape.h>
|
||||||
|
|
||||||
|
|
||||||
|
class KuickImage : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
enum ResizeMode { FAST, SMOOTH };
|
||||||
|
|
||||||
|
KuickImage( const KuickFile * file, ImlibImage *im, ImlibData *id );
|
||||||
|
~KuickImage();
|
||||||
|
|
||||||
|
int width() const { return myWidth; }
|
||||||
|
int height() const { return myHeight; }
|
||||||
|
int originalWidth() const { return myOrigWidth; }
|
||||||
|
int originalHeight() const { return myOrigHeight; }
|
||||||
|
|
||||||
|
void resize( int width, int height, KuickImage::ResizeMode mode );
|
||||||
|
void restoreOriginalSize();
|
||||||
|
void rotate( Rotation rot );
|
||||||
|
bool rotateAbs( Rotation rot );
|
||||||
|
void flip( FlipMode flipMode );
|
||||||
|
bool flipAbs( int mode );
|
||||||
|
ImlibImage * imlibImage() const { return myIm; }
|
||||||
|
Pixmap& pixmap();
|
||||||
|
void renderPixmap();
|
||||||
|
// const QString& filename() const { return myFilename;}
|
||||||
|
const KuickFile& file() const { return *myFile; }
|
||||||
|
const KURL& url() const { return myFile->url(); }
|
||||||
|
|
||||||
|
void setDirty( bool d ) { myIsDirty = d; }
|
||||||
|
bool isDirty() const { return myIsDirty; }
|
||||||
|
Rotation absRotation() const { return myRotation; }
|
||||||
|
FlipMode flipMode() const { return myFlipMode; }
|
||||||
|
|
||||||
|
static ImlibImage * toImage( ImlibData *id, QImage& image );
|
||||||
|
|
||||||
|
private:
|
||||||
|
void fastResize( int newWidth, int newHeight );
|
||||||
|
bool smoothResize( int width, int height );
|
||||||
|
/**
|
||||||
|
* Note: caller must delete it!
|
||||||
|
*/
|
||||||
|
QImage * newQImage() const;
|
||||||
|
|
||||||
|
const KuickFile * myFile;
|
||||||
|
|
||||||
|
int myWidth;
|
||||||
|
int myHeight;
|
||||||
|
ImlibImage * myOrigIm;
|
||||||
|
ImlibImage * myIm;
|
||||||
|
ImlibData * myId;
|
||||||
|
Pixmap myPixmap;
|
||||||
|
bool myIsDirty;
|
||||||
|
|
||||||
|
int myOrigWidth;
|
||||||
|
int myOrigHeight;
|
||||||
|
Rotation myRotation;
|
||||||
|
FlipMode myFlipMode;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void startRendering();
|
||||||
|
void stoppedRendering();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // KUICKIMAGE_H
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,178 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2006 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef KUICKSHOW_H
|
||||||
|
#define KUICKSHOW_H
|
||||||
|
|
||||||
|
#include <qevent.h>
|
||||||
|
#include <qguardedptr.h>
|
||||||
|
#include <qstring.h>
|
||||||
|
#include <qvaluelist.h>
|
||||||
|
|
||||||
|
#include <kfileitem.h>
|
||||||
|
#include <kmainwindow.h>
|
||||||
|
#include <kurl.h>
|
||||||
|
|
||||||
|
#include <Imlib.h>
|
||||||
|
|
||||||
|
#include "aboutwidget.h"
|
||||||
|
|
||||||
|
class FileWidget;
|
||||||
|
class ImageWindow;
|
||||||
|
class ImData;
|
||||||
|
class KuickConfigDialog;
|
||||||
|
|
||||||
|
class KAccel;
|
||||||
|
class KConfig;
|
||||||
|
class KToggleAction;
|
||||||
|
class AboutWidget;
|
||||||
|
|
||||||
|
class KURL;
|
||||||
|
class KURLComboBox;
|
||||||
|
|
||||||
|
class KuickFile;
|
||||||
|
|
||||||
|
class DelayedRepeatEvent
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DelayedRepeatEvent( ImageWindow *view, QKeyEvent *ev ) {
|
||||||
|
viewer = view;
|
||||||
|
event = ev;
|
||||||
|
}
|
||||||
|
DelayedRepeatEvent( ImageWindow *view, int action, void *data ) {
|
||||||
|
this->viewer = view;
|
||||||
|
this->action = action;
|
||||||
|
this->data = data;
|
||||||
|
this->event = 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
~DelayedRepeatEvent() {
|
||||||
|
delete event;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Action
|
||||||
|
{
|
||||||
|
DeleteCurrentFile,
|
||||||
|
TrashCurrentFile,
|
||||||
|
AdvanceViewer
|
||||||
|
};
|
||||||
|
|
||||||
|
ImageWindow *viewer;
|
||||||
|
QKeyEvent *event;
|
||||||
|
int action;
|
||||||
|
void *data;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class KuickShow : public KMainWindow
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
KuickShow( const char *name=0 );
|
||||||
|
~KuickShow();
|
||||||
|
|
||||||
|
virtual void show();
|
||||||
|
static QValueList<ImageWindow*> s_viewers;
|
||||||
|
|
||||||
|
// overridden to make KDCOPActionProxy work -- all our actions are not
|
||||||
|
// in the mainwindow's collection, but in the filewidget's.
|
||||||
|
virtual KActionCollection* actionCollection() const;
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void readProperties( KConfig * );
|
||||||
|
void initImlibParams( ImData *, ImlibInitParams * );
|
||||||
|
void tryShowNextImage();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void toggleBrowser();
|
||||||
|
void slotQuit() { delete this; }
|
||||||
|
void slotPrint();
|
||||||
|
void slotConfigApplied();
|
||||||
|
void slotConfigClosed();
|
||||||
|
void messageCantLoadImage( const KuickFile * file, const QString& message);
|
||||||
|
bool showImage(const KFileItem *, bool newWindow = false,
|
||||||
|
bool fullscreen = false, bool moveToTopLeft = true );
|
||||||
|
void showFileItem( ImageWindow *, const KFileItem * );
|
||||||
|
void slotHighlighted( const KFileItem * );
|
||||||
|
void slotSelected( const KFileItem * );
|
||||||
|
void dirSelected( const KURL& );
|
||||||
|
void configuration();
|
||||||
|
void about();
|
||||||
|
void startSlideShow();
|
||||||
|
void pauseSlideShow();
|
||||||
|
void nextSlide();
|
||||||
|
void nextSlide( KFileItem *item );
|
||||||
|
void viewerDeleted();
|
||||||
|
void slotDropped( const KFileItem *, QDropEvent *, const KURL::List &);
|
||||||
|
void slotSetActiveViewer( ImageWindow *i ) { m_viewer = i; }
|
||||||
|
void slotAdvanceImage( ImageWindow *, int steps );
|
||||||
|
|
||||||
|
void slotShowInSameWindow();
|
||||||
|
void slotShowInOtherWindow();
|
||||||
|
void slotShowFullscreen();
|
||||||
|
|
||||||
|
void slotReplayEvent();
|
||||||
|
void slotOpenURL();
|
||||||
|
void slotSetURL( const KURL& );
|
||||||
|
void slotURLComboReturnPressed();
|
||||||
|
// void invalidateImages( const KFileItemList& items );
|
||||||
|
void slotDeleteCurrentImage(ImageWindow *viewer);
|
||||||
|
void slotTrashCurrentImage(ImageWindow *viewer);
|
||||||
|
void slotDeleteCurrentImage();
|
||||||
|
void slotTrashCurrentImage();
|
||||||
|
|
||||||
|
void doReplay();
|
||||||
|
|
||||||
|
private:
|
||||||
|
void initGUI( const KURL& startDir );
|
||||||
|
bool eventFilter( QObject *, QEvent * );
|
||||||
|
void initImlib();
|
||||||
|
void saveProperties( KConfig * );
|
||||||
|
void saveSettings();
|
||||||
|
bool haveBrowser() const;
|
||||||
|
void delayedRepeatEvent( ImageWindow *, QKeyEvent * );
|
||||||
|
void abortDelayedEvent();
|
||||||
|
void deleteAllViewers();
|
||||||
|
void redirectDeleteAndTrashActions(KActionCollection *coll);
|
||||||
|
|
||||||
|
void delayAction(DelayedRepeatEvent *event);
|
||||||
|
void replayAdvance(DelayedRepeatEvent *event);
|
||||||
|
|
||||||
|
void performDeleteCurrentImage(QWidget *parent);
|
||||||
|
void performTrashCurrentImage(QWidget *parent);
|
||||||
|
|
||||||
|
uint viewItem, renameItem, deleteItem, printItem;
|
||||||
|
uint m_slideshowCycle;
|
||||||
|
|
||||||
|
FileWidget *fileWidget;
|
||||||
|
KURLComboBox *cmbPath;
|
||||||
|
KuickConfigDialog *dialog;
|
||||||
|
ImlibData *id;
|
||||||
|
ImageWindow *m_viewer;
|
||||||
|
KToggleAction *oneWindowAction;
|
||||||
|
KAccel *m_accel;
|
||||||
|
DelayedRepeatEvent *m_delayedRepeatItem;
|
||||||
|
QTimer *m_slideTimer;
|
||||||
|
bool m_slideShowStopped;
|
||||||
|
KToggleAction *m_toggleBrowserAction;
|
||||||
|
QGuardedPtr<AboutWidget> aboutWidget;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,42 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998,1999,2000 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <qtooltip.h>
|
||||||
|
|
||||||
|
#include <kurl.h>
|
||||||
|
#include <krun.h>
|
||||||
|
|
||||||
|
#include "kurlwidget.h"
|
||||||
|
|
||||||
|
KURLWidget::KURLWidget(const QString& text, QWidget *parent, const char *name)
|
||||||
|
: KURLLabel( parent, name )
|
||||||
|
{
|
||||||
|
setText( text );
|
||||||
|
connect( this, SIGNAL( leftClickedURL() ), SLOT( run() ));
|
||||||
|
setUseTips( true );
|
||||||
|
}
|
||||||
|
|
||||||
|
void KURLWidget::run()
|
||||||
|
{
|
||||||
|
KURL ku( url() );
|
||||||
|
if ( ku.isValid() ) {
|
||||||
|
(void) new KRun( ku, this );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "kurlwidget.moc"
|
@ -0,0 +1,36 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998,1999,2000 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef KURLWIDGET_H
|
||||||
|
#define KURLWIDGET_H
|
||||||
|
|
||||||
|
#include <kurllabel.h>
|
||||||
|
|
||||||
|
class KURLWidget : public KURLLabel
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
KURLWidget( const QString& text, QWidget *, const char *name=0 );
|
||||||
|
|
||||||
|
protected slots:
|
||||||
|
virtual void run();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,66 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998-2002 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <qstring.h>
|
||||||
|
|
||||||
|
#include <kaboutdata.h>
|
||||||
|
#include <kapplication.h>
|
||||||
|
#include <kcmdlineargs.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
#include <kdebug.h>
|
||||||
|
|
||||||
|
#include "kuickshow.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
static KCmdLineOptions options[] =
|
||||||
|
{
|
||||||
|
{ "lastfolder", I18N_NOOP("Start in the last visited folder, not the "
|
||||||
|
"current working folder."), 0 },
|
||||||
|
{ "d", 0, 0 }, // short option for --lastdir
|
||||||
|
{ "+[files]", I18N_NOOP("Optional image filenames/urls to show"), 0 },
|
||||||
|
KCmdLineLastOption
|
||||||
|
};
|
||||||
|
|
||||||
|
extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
|
||||||
|
{
|
||||||
|
KAboutData about(
|
||||||
|
"kuickshow", I18N_NOOP( "KuickShow" ), KUICKSHOWVERSION,
|
||||||
|
I18N_NOOP("A fast and versatile image viewer" ),
|
||||||
|
KAboutData::License_GPL, "(c) 1998-2006, Carsten Pfeiffer",
|
||||||
|
0 /*text*/, "http://devel-home.kde.org/~pfeiffer/" );
|
||||||
|
|
||||||
|
about.addAuthor( "Carsten Pfeiffer", 0, "pfeiffer@kde.org",
|
||||||
|
"http://devel-home.kde.org/~pfeiffer/" );
|
||||||
|
about.addCredit( "Rober Hamberger", 0, "rh474@bingo-ev.de" );
|
||||||
|
about.addCredit( "Thorsten Scheuermann", 0, "uddn@rz.uni-karlsruhe.de" );
|
||||||
|
|
||||||
|
KCmdLineArgs::init( argc, argv, &about );
|
||||||
|
KCmdLineArgs::addCmdLineOptions( options );
|
||||||
|
|
||||||
|
KApplication app;
|
||||||
|
|
||||||
|
if ( app.isRestored() ) {
|
||||||
|
(new KuickShow())->restore( 1, false ); // don't show automatically
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
KuickShow *k = new KuickShow( "kuickshow" );
|
||||||
|
app.setMainWidget( k );
|
||||||
|
}
|
||||||
|
|
||||||
|
return app.exec();
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998,1999 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "fileview.h"
|
||||||
|
#include "kuickdata.h"
|
||||||
|
#include "mainwidget.h"
|
||||||
|
|
||||||
|
|
||||||
|
MainWidget::MainWidget( QString startDir, QWidget *parent,
|
||||||
|
const char *name ) : QWidget ( parent, name )
|
||||||
|
{
|
||||||
|
box = new FileView( startDir, true, (QDir::Dirs | QDir::Files),
|
||||||
|
this, "fileview" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
MainWidget::~MainWidget()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// for now, no layout managers
|
||||||
|
void MainWidget::resizeEvent( QResizeEvent * )
|
||||||
|
{
|
||||||
|
box->resize( width(), height() );
|
||||||
|
}
|
||||||
|
#include "mainwidget.moc"
|
@ -0,0 +1,47 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 1998 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MAINWIDGET_H
|
||||||
|
#define MAINWIDGET_H
|
||||||
|
|
||||||
|
#include <qevent.h>
|
||||||
|
#include <qstring.h>
|
||||||
|
#include <qwidget.h>
|
||||||
|
|
||||||
|
class FileView;
|
||||||
|
|
||||||
|
class MainWidget : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
MainWidget( QString, QWidget *parent, const char *name=0L);
|
||||||
|
~MainWidget();
|
||||||
|
|
||||||
|
FileView* getFileBox() { return box; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void resizeEvent( QResizeEvent * );
|
||||||
|
|
||||||
|
private:
|
||||||
|
FileView *box;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,338 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <qcheckbox.h>
|
||||||
|
#include <qfont.h>
|
||||||
|
#include <qfontmetrics.h>
|
||||||
|
#include <qgrid.h>
|
||||||
|
#include <qhbox.h>
|
||||||
|
#include <qlayout.h>
|
||||||
|
#include <qimage.h>
|
||||||
|
#include <kimageeffect.h>
|
||||||
|
#include <qpaintdevicemetrics.h>
|
||||||
|
#include <qpainter.h>
|
||||||
|
#include <qradiobutton.h>
|
||||||
|
#include <qvbuttongroup.h>
|
||||||
|
#include <qcolor.h>
|
||||||
|
|
||||||
|
#include <kcombobox.h>
|
||||||
|
#include <kdialog.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
#include <kdebug.h>
|
||||||
|
#include <kglobalsettings.h>
|
||||||
|
#include <knuminput.h>
|
||||||
|
#include <kprinter.h>
|
||||||
|
#include <ktempfile.h>
|
||||||
|
|
||||||
|
#include "imagewindow.h"
|
||||||
|
#include "printing.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
bool Printing::printImage( ImageWindow& imageWin, QWidget *parent )
|
||||||
|
{
|
||||||
|
QString imageURL = imageWin.url().prettyURL();
|
||||||
|
KPrinter printer;
|
||||||
|
printer.setDocName( imageURL );
|
||||||
|
printer.setCreator( "KuickShow-" KUICKSHOWVERSION );
|
||||||
|
|
||||||
|
KPrinter::addDialogPage( new KuickPrintDialogPage( parent, "kuick page"));
|
||||||
|
|
||||||
|
if ( printer.setup( parent, i18n("Print %1").arg(printer.docName().section('/', -1)) ) )
|
||||||
|
{
|
||||||
|
KTempFile tmpFile( QString::null, ".png" );
|
||||||
|
if ( tmpFile.status() == 0 )
|
||||||
|
{
|
||||||
|
tmpFile.setAutoDelete( true );
|
||||||
|
if ( imageWin.saveImage( tmpFile.name(), true ) )
|
||||||
|
return printImageWithQt( tmpFile.name(), printer,
|
||||||
|
imageURL );
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true; // user aborted
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Printing::printImageWithQt( const QString& filename, KPrinter& printer,
|
||||||
|
const QString& originalFileName )
|
||||||
|
{
|
||||||
|
QImage image( filename );
|
||||||
|
if ( image.isNull() ) {
|
||||||
|
kdWarning() << "Can't load image: " << filename << " for printing.\n";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPainter p;
|
||||||
|
p.begin( &printer );
|
||||||
|
|
||||||
|
QPaintDeviceMetrics metrics( &printer );
|
||||||
|
p.setFont( KGlobalSettings::generalFont() );
|
||||||
|
QFontMetrics fm = p.fontMetrics();
|
||||||
|
|
||||||
|
int w = metrics.width();
|
||||||
|
int h = metrics.height();
|
||||||
|
|
||||||
|
QString t = "true";
|
||||||
|
QString f = "false";
|
||||||
|
|
||||||
|
// Black & white print?
|
||||||
|
if ( printer.option( "app-kuickshow-blackwhite" ) != f) {
|
||||||
|
image = image.convertDepth( 1, Qt::MonoOnly | Qt::ThresholdDither | Qt::AvoidDither );
|
||||||
|
}
|
||||||
|
|
||||||
|
int filenameOffset = 0;
|
||||||
|
bool printFilename = printer.option( "app-kuickshow-printFilename" ) != f;
|
||||||
|
if ( printFilename ) {
|
||||||
|
filenameOffset = fm.lineSpacing() + 14;
|
||||||
|
h -= filenameOffset; // filename goes into one line!
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// shrink image to pagesize, if necessary
|
||||||
|
//
|
||||||
|
bool shrinkToFit = (printer.option( "app-kuickshow-shrinkToFit" ) != f);
|
||||||
|
QSize imagesize = image.size();
|
||||||
|
if ( shrinkToFit && (image.width() > w || image.height() > h) ) {
|
||||||
|
imagesize.scale( w, h, QSize::ScaleMin );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// align image
|
||||||
|
//
|
||||||
|
bool ok = false;
|
||||||
|
int alignment = printer.option("app-kuickshow-alignment").toInt( &ok );
|
||||||
|
if ( !ok )
|
||||||
|
alignment = Qt::AlignCenter; // default
|
||||||
|
|
||||||
|
int x = 0;
|
||||||
|
int y = 0;
|
||||||
|
|
||||||
|
// ### need a GUI for this in KuickPrintDialogPage!
|
||||||
|
// x - alignment
|
||||||
|
if ( alignment & Qt::AlignHCenter )
|
||||||
|
x = (w - imagesize.width())/2;
|
||||||
|
else if ( alignment & Qt::AlignLeft )
|
||||||
|
x = 0;
|
||||||
|
else if ( alignment & Qt::AlignRight )
|
||||||
|
x = w - imagesize.width();
|
||||||
|
|
||||||
|
// y - alignment
|
||||||
|
if ( alignment & Qt::AlignVCenter )
|
||||||
|
y = (h - imagesize.height())/2;
|
||||||
|
else if ( alignment & Qt::AlignTop )
|
||||||
|
y = 0;
|
||||||
|
else if ( alignment & Qt::AlignBottom )
|
||||||
|
y = h - imagesize.height();
|
||||||
|
|
||||||
|
//
|
||||||
|
// perform the actual drawing
|
||||||
|
//
|
||||||
|
p.drawImage( QRect( x, y, imagesize.width(), imagesize.height()), image );
|
||||||
|
|
||||||
|
if ( printFilename )
|
||||||
|
{
|
||||||
|
QString fname = minimizeString( originalFileName, fm, w );
|
||||||
|
if ( !fname.isEmpty() )
|
||||||
|
{
|
||||||
|
int fw = fm.width( fname );
|
||||||
|
int x = (w - fw)/2;
|
||||||
|
int y = metrics.height() - filenameOffset/2;
|
||||||
|
p.drawText( x, y, fname );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
p.end();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString Printing::minimizeString( QString text, const QFontMetrics&
|
||||||
|
metrics, int maxWidth )
|
||||||
|
{
|
||||||
|
if ( text.length() <= 5 )
|
||||||
|
return QString::null; // no sense to cut that tiny little string
|
||||||
|
|
||||||
|
bool changed = false;
|
||||||
|
while ( metrics.width( text ) > maxWidth )
|
||||||
|
{
|
||||||
|
int mid = text.length() / 2;
|
||||||
|
text.remove( mid, 2 ); // remove 2 characters in the middle
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( changed ) // add "..." in the middle
|
||||||
|
{
|
||||||
|
int mid = text.length() / 2;
|
||||||
|
if ( mid <= 5 ) // sanity check
|
||||||
|
return QString::null;
|
||||||
|
|
||||||
|
text.replace( mid - 1, 3, "..." );
|
||||||
|
}
|
||||||
|
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////
|
||||||
|
///////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
KuickPrintDialogPage::KuickPrintDialogPage( QWidget *parent, const char *name )
|
||||||
|
: KPrintDialogPage( parent, name )
|
||||||
|
{
|
||||||
|
setTitle( i18n("Image Settings") );
|
||||||
|
|
||||||
|
QVBoxLayout *layout = new QVBoxLayout( this );
|
||||||
|
layout->setMargin( KDialog::marginHint() );
|
||||||
|
layout->setSpacing( KDialog::spacingHint() );
|
||||||
|
|
||||||
|
m_addFileName = new QCheckBox( i18n("Print fi&lename below image"), this);
|
||||||
|
m_addFileName->setChecked( true );
|
||||||
|
layout->addWidget( m_addFileName );
|
||||||
|
|
||||||
|
m_blackwhite = new QCheckBox ( i18n("Print image in &black and white"), this);
|
||||||
|
m_blackwhite->setChecked( false );
|
||||||
|
layout->addWidget (m_blackwhite );
|
||||||
|
|
||||||
|
QVButtonGroup *group = new QVButtonGroup( i18n("Scaling"), this );
|
||||||
|
group->setRadioButtonExclusive( true );
|
||||||
|
layout->addWidget( group );
|
||||||
|
// m_shrinkToFit = new QRadioButton( i18n("Shrink image to &fit, if necessary"), group );
|
||||||
|
m_shrinkToFit = new QCheckBox( i18n("Shrink image to &fit, if necessary"), group );
|
||||||
|
m_shrinkToFit->setChecked( true );
|
||||||
|
|
||||||
|
QWidget *widget = new QWidget( group );
|
||||||
|
QGridLayout *grid = new QGridLayout( widget, 3, 3 );
|
||||||
|
grid->addColSpacing( 0, 30 );
|
||||||
|
grid->setColStretch( 0, 0 );
|
||||||
|
grid->setColStretch( 1, 1 );
|
||||||
|
grid->setColStretch( 2, 10 );
|
||||||
|
|
||||||
|
m_scale = new QRadioButton( i18n("Print e&xact size: "), widget );
|
||||||
|
m_scale->setEnabled( false ); // ###
|
||||||
|
grid->addMultiCellWidget( m_scale, 0, 0, 0, 1 );
|
||||||
|
group->insert( m_scale );
|
||||||
|
connect( m_scale, SIGNAL( toggled( bool )), SLOT( toggleScaling( bool )));
|
||||||
|
|
||||||
|
m_units = new KComboBox( false, widget, "unit combobox" );
|
||||||
|
grid->addWidget( m_units, 0, 2, AlignLeft );
|
||||||
|
m_units->insertItem( i18n("Millimeters") );
|
||||||
|
m_units->insertItem( i18n("Centimeters") );
|
||||||
|
m_units->insertItem( i18n("Inches") );
|
||||||
|
|
||||||
|
m_width = new KIntNumInput( widget, "exact width" );
|
||||||
|
grid->addWidget( m_width, 1, 1 );
|
||||||
|
m_width->setLabel( i18n("&Width:" ) );
|
||||||
|
m_width->setMinValue( 1 );
|
||||||
|
|
||||||
|
m_height = new KIntNumInput( widget, "exact height" );
|
||||||
|
grid->addWidget( m_height, 2, 1 );
|
||||||
|
m_height->setLabel( i18n("&Height:" ) );
|
||||||
|
m_height->setMinValue( 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
KuickPrintDialogPage::~KuickPrintDialogPage()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void KuickPrintDialogPage::getOptions( QMap<QString,QString>& opts,
|
||||||
|
bool /*incldef*/ )
|
||||||
|
{
|
||||||
|
QString t = "true";
|
||||||
|
QString f = "false";
|
||||||
|
|
||||||
|
// ### opts["app-kuickshow-alignment"] = ;
|
||||||
|
opts["app-kuickshow-printFilename"] = m_addFileName->isChecked() ? t : f;
|
||||||
|
opts["app-kuickshow-blackwhite"] = m_blackwhite->isChecked() ? t : f;
|
||||||
|
opts["app-kuickshow-shrinkToFit"] = m_shrinkToFit->isChecked() ? t : f;
|
||||||
|
opts["app-kuickshow-scale"] = m_scale->isChecked() ? t : f;
|
||||||
|
opts["app-kuickshow-scale-unit"] = m_units->currentText();
|
||||||
|
opts["app-kuickshow-scale-width-pixels"] = QString::number( scaleWidth() );
|
||||||
|
opts["app-kuickshow-scale-height-pixels"] = QString::number( scaleHeight() );
|
||||||
|
}
|
||||||
|
|
||||||
|
void KuickPrintDialogPage::setOptions( const QMap<QString,QString>& opts )
|
||||||
|
{
|
||||||
|
QString t = "true";
|
||||||
|
QString f = "false";
|
||||||
|
|
||||||
|
m_addFileName->setChecked( opts["app-kuickshow-printFilename"] != f );
|
||||||
|
// This sound strange, but if I copy the code on the line above, the checkbox
|
||||||
|
// was always checked. And this isn't the wanted behavior. So, with this works.
|
||||||
|
// KPrint magic ;-)
|
||||||
|
m_blackwhite->setChecked ( false );
|
||||||
|
m_shrinkToFit->setChecked( opts["app-kuickshow-shrinkToFit"] != f );
|
||||||
|
m_scale->setChecked( opts["app-kuickshow-scale"] == t );
|
||||||
|
|
||||||
|
m_units->setCurrentItem( opts["app-kuickshow-scale-unit"] );
|
||||||
|
|
||||||
|
bool ok;
|
||||||
|
int val = opts["app-kuickshow-scale-width-pixels"].toInt( &ok );
|
||||||
|
if ( ok )
|
||||||
|
setScaleWidth( val );
|
||||||
|
val = opts["app-kuickshow-scale-height-pixels"].toInt( &ok );
|
||||||
|
if ( ok )
|
||||||
|
setScaleHeight( val );
|
||||||
|
|
||||||
|
if ( m_scale->isChecked() == m_shrinkToFit->isChecked() )
|
||||||
|
m_shrinkToFit->setChecked( !m_scale->isChecked() );
|
||||||
|
|
||||||
|
// ### re-enable when implementednn
|
||||||
|
toggleScaling( false && m_scale->isChecked() );
|
||||||
|
}
|
||||||
|
|
||||||
|
void KuickPrintDialogPage::toggleScaling( bool enable )
|
||||||
|
{
|
||||||
|
m_width->setEnabled( enable );
|
||||||
|
m_height->setEnabled( enable );
|
||||||
|
m_units->setEnabled( enable );
|
||||||
|
}
|
||||||
|
|
||||||
|
int KuickPrintDialogPage::scaleWidth() const
|
||||||
|
{
|
||||||
|
return fromUnitToPixels( m_width->value() );
|
||||||
|
}
|
||||||
|
|
||||||
|
int KuickPrintDialogPage::scaleHeight() const
|
||||||
|
{
|
||||||
|
return fromUnitToPixels( m_height->value() );
|
||||||
|
}
|
||||||
|
|
||||||
|
void KuickPrintDialogPage::setScaleWidth( int pixels )
|
||||||
|
{
|
||||||
|
m_width->setValue( (int) pixelsToUnit( pixels ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void KuickPrintDialogPage::setScaleHeight( int pixels )
|
||||||
|
{
|
||||||
|
m_width->setValue( (int) pixelsToUnit( pixels ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
int KuickPrintDialogPage::fromUnitToPixels( float /*value*/ ) const
|
||||||
|
{
|
||||||
|
return 1; // ###
|
||||||
|
}
|
||||||
|
|
||||||
|
float KuickPrintDialogPage::pixelsToUnit( int /*pixels*/ ) const
|
||||||
|
{
|
||||||
|
return 1.0; // ###
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "printing.moc"
|
@ -0,0 +1,85 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PRINTING_H
|
||||||
|
#define PRINTING_H
|
||||||
|
|
||||||
|
#include <qfontmetrics.h>
|
||||||
|
#include <qstring.h>
|
||||||
|
|
||||||
|
#include <kdeprint/kprintdialogpage.h>
|
||||||
|
|
||||||
|
class QCheckBox;
|
||||||
|
class QRadioButton;
|
||||||
|
class KComboBox;
|
||||||
|
class KPrinter;
|
||||||
|
class KIntNumInput;
|
||||||
|
|
||||||
|
class ImageWindow;
|
||||||
|
|
||||||
|
|
||||||
|
class Printing
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static bool printImage( ImageWindow& imageWin, QWidget *parent = 0L);
|
||||||
|
static bool printImageWithQt( const QString& filename, KPrinter& printer,
|
||||||
|
const QString& originalFileName );
|
||||||
|
|
||||||
|
private:
|
||||||
|
static void addConfigPages();
|
||||||
|
static QString minimizeString( QString text, const QFontMetrics& metrics,
|
||||||
|
int maxWidth );
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class KuickPrintDialogPage : public KPrintDialogPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
KuickPrintDialogPage( QWidget *parent = 0L, const char *name = 0 );
|
||||||
|
~KuickPrintDialogPage();
|
||||||
|
|
||||||
|
virtual void getOptions(QMap<QString,QString>& opts, bool incldef = false);
|
||||||
|
virtual void setOptions(const QMap<QString,QString>& opts);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void toggleScaling( bool enable );
|
||||||
|
|
||||||
|
private:
|
||||||
|
// return values in pixels!
|
||||||
|
int scaleWidth() const;
|
||||||
|
int scaleHeight() const;
|
||||||
|
|
||||||
|
void setScaleWidth( int pixels );
|
||||||
|
void setScaleHeight( int pixels );
|
||||||
|
|
||||||
|
int fromUnitToPixels( float val ) const;
|
||||||
|
float pixelsToUnit( int pixels ) const;
|
||||||
|
|
||||||
|
QCheckBox *m_shrinkToFit;
|
||||||
|
QRadioButton *m_scale;
|
||||||
|
KIntNumInput *m_width;
|
||||||
|
KIntNumInput *m_height;
|
||||||
|
KComboBox *m_units;
|
||||||
|
QCheckBox *m_addFileName;
|
||||||
|
QCheckBox *m_blackwhite;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // PRINTING_H
|
@ -0,0 +1,80 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <qcheckbox.h>
|
||||||
|
#include <qlayout.h>
|
||||||
|
|
||||||
|
#include <kdialog.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
#include <knuminput.h>
|
||||||
|
|
||||||
|
#include "slideshowwidget.h"
|
||||||
|
|
||||||
|
|
||||||
|
SlideShowWidget::SlideShowWidget( QWidget *parent, const char *name )
|
||||||
|
: QWidget( parent, name )
|
||||||
|
{
|
||||||
|
// setTitle( i18n("Slideshow") );
|
||||||
|
|
||||||
|
QVBoxLayout *layout = new QVBoxLayout( this );
|
||||||
|
layout->setSpacing( KDialog::spacingHint() );
|
||||||
|
|
||||||
|
m_fullScreen = new QCheckBox( i18n("Switch to &full-screen"), this );
|
||||||
|
m_startWithCurrent = new QCheckBox( i18n("S&tart with current image"), this);
|
||||||
|
|
||||||
|
m_delayTime = new KIntNumInput( this, "delay time" );
|
||||||
|
m_delayTime->setLabel( i18n("De&lay between slides:") );
|
||||||
|
m_delayTime->setSuffix( i18n(" sec") );
|
||||||
|
m_delayTime->setRange( 0, 60 * 60 ); // 1 hour
|
||||||
|
m_delayTime->setSpecialValueText( i18n("Wait for key") );
|
||||||
|
|
||||||
|
m_cycles = new KIntNumInput( m_delayTime, 1, this );
|
||||||
|
m_cycles->setLabel( i18n("&Iterations (0 = infinite):") );
|
||||||
|
m_cycles->setSpecialValueText( i18n("infinite") );
|
||||||
|
m_cycles->setRange( 0, 500 );
|
||||||
|
|
||||||
|
layout->addWidget( m_fullScreen );
|
||||||
|
layout->addWidget( m_startWithCurrent );
|
||||||
|
layout->addWidget( m_delayTime );
|
||||||
|
layout->addWidget( m_cycles );
|
||||||
|
layout->addStretch( 1 );
|
||||||
|
|
||||||
|
loadSettings( *kdata );
|
||||||
|
}
|
||||||
|
|
||||||
|
SlideShowWidget::~SlideShowWidget()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void SlideShowWidget::loadSettings( const KuickData& data )
|
||||||
|
{
|
||||||
|
m_delayTime->setValue( data.slideDelay / 1000 );
|
||||||
|
m_cycles->setValue( data.slideshowCycles );
|
||||||
|
m_fullScreen->setChecked( data.slideshowFullscreen );
|
||||||
|
m_startWithCurrent->setChecked( !data.slideshowStartAtFirst );
|
||||||
|
}
|
||||||
|
|
||||||
|
void SlideShowWidget::applySettings( KuickData& data )
|
||||||
|
{
|
||||||
|
data.slideDelay = m_delayTime->value() * 1000;
|
||||||
|
data.slideshowCycles = m_cycles->value();
|
||||||
|
data.slideshowFullscreen = m_fullScreen->isChecked();
|
||||||
|
data.slideshowStartAtFirst = !m_startWithCurrent->isChecked();
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "slideshowwidget.moc"
|
@ -0,0 +1,44 @@
|
|||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
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; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SLIDESHOWWIDGET_H
|
||||||
|
#define SLIDESHOWWIDGET_H
|
||||||
|
|
||||||
|
#include "kuickdata.h"
|
||||||
|
|
||||||
|
class QCheckBox;
|
||||||
|
class KIntNumInput;
|
||||||
|
|
||||||
|
class SlideShowWidget : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
SlideShowWidget( QWidget *parent, const char *name );
|
||||||
|
~SlideShowWidget();
|
||||||
|
|
||||||
|
virtual void loadSettings( const KuickData& data );
|
||||||
|
virtual void applySettings( KuickData& data );
|
||||||
|
|
||||||
|
private:
|
||||||
|
KIntNumInput *m_delayTime;
|
||||||
|
KIntNumInput *m_cycles;
|
||||||
|
QCheckBox *m_fullScreen;
|
||||||
|
QCheckBox *m_startWithCurrent;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SLIDESHOWWIDGET_H
|
@ -0,0 +1,3 @@
|
|||||||
|
#ifndef KUICKSHOWVERSION
|
||||||
|
#define KUICKSHOWVERSION "0.8.13"
|
||||||
|
#endif
|
Loading…
Reference in New Issue