commit c0fd818dbd11006a00ed62fc8163f2ec2a5281a2 Author: titan Date: Thu Feb 15 10:20:21 2007 +0000 This is the new ephoto. It has been completely redone from the old one, looks nothing like the old one, and works nothing like the old one. It now displays images by using albums, and it focuses much more on image manipulating/editing/viewing than the other did. Slideshows will still be available. Exif data can also be viewed now. Currently to add albums/images or remove them and such you have to use the command line. Looks at ephoto -h for more information. IF you have a ~/.ephoto directory, it needs to be rm -rf for the new stuff to work! You can get a idea of the new ephoto looks like in this ss: www.ecoding.org/files/images/Ephoto_New.png SVN revision: 28371 diff --git a/ABOUT-NLS b/ABOUT-NLS new file mode 100644 index 0000000..47d5e39 --- /dev/null +++ b/ABOUT-NLS @@ -0,0 +1,625 @@ +Notes on the Free Translation Project +************************************* + + Free software is going international! The Free Translation Project +is a way to get maintainers of free software, translators, and users all +together, so that will gradually become able to speak many languages. +A few packages already provide translations for their messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do _not_ +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work at translations should contact the appropriate team. + + When reporting bugs in the `intl/' directory or bugs which may be +related to internationalization, you should tell about the version of +`gettext' which is used. The information can be found in the +`intl/VERSION' file, in internationalized packages. + +Quick configuration advice +========================== + + If you want to exploit the full power of internationalization, you +should configure it using + + ./configure --with-included-gettext + +to force usage of internationalizing routines provided within this +package, despite the existence of internationalizing capabilities in the +operating system where this package is being installed. So far, only +the `gettext' implementation in the GNU C library version 2 provides as +many features (such as locale alias, message inheritance, automatic +charset conversion or plural form handling) as the implementation here. +It is also not possible to offer this additional functionality on top +of a `catgets' implementation. Future versions of GNU `gettext' will +very likely convey even more functionality. So it might be a good idea +to change to GNU `gettext' as soon as possible. + + So you need _not_ provide this option if you are using GNU libc 2 or +you have installed a recent copy of the GNU gettext package with the +included `libintl'. + +INSTALL Matters +=============== + + Some packages are "localizable" when properly installed; the +programs they contain can be made to speak your own native language. +Most such packages use GNU `gettext'. Other packages have their own +ways to internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system already +provides the GNU `gettext' functions. If not, the GNU `gettext' own +library will be used. This library is wholly contained within this +package, usually in the `intl/' subdirectory, so prior installation of +the GNU `gettext' package is _not_ required. Installers may use +special options at configuration time for changing the default +behaviour. The commands: + + ./configure --with-included-gettext + ./configure --disable-nls + +will respectively bypass any pre-existing `gettext' to use the +internationalizing routines provided within this package, or else, +_totally_ disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl.a' file and +will decide to use this. This might be not what is desirable. You +should use the more recent version of the GNU `gettext' library. I.e. +if the file `intl/VERSION' shows that the library which comes with this +package is more recent, you should use + + ./configure --with-included-gettext + +to prevent auto-detection. + + The configuration process will not test for the `catgets' function +and therefore it will not be used. The reason is that even an +emulation of `gettext' on top of `catgets' could not provide all the +extensions of the GNU `gettext' library. + + Internationalized packages have usually many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +Using This Package +================== + + As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, +and `CC' is an ISO 3166 two-letter country code. For example, let's +suppose that you speak German and live in Germany. At the shell +prompt, merely execute `setenv LANG de_DE' (in `csh'), +`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). +This can be done from your `.login' or `.profile' file, once and for +all. + + You might think that the country code specification is redundant. +But in fact, some languages have dialects in different countries. For +example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The +country code serves to distinguish the dialects. + + The locale naming convention of `LL_CC', with `LL' denoting the +language and `CC' denoting the country, is the one use on systems based +on GNU libc. On other systems, some variations of this scheme are +used, such as `LL' or `LL_CC.ENCODING'. You can get the list of +locales supported by your system for your country by running the command +`locale -a | grep '^LL''. + + Not all programs have translations for all languages. By default, an +English message is shown in place of a nonexistent translation. If you +understand other languages, you can set up a priority list of languages. +This is done through a different environment variable, called +`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' +for the purpose of message handling, but you still need to have `LANG' +set to the primary language; this is required by other parts of the +system libraries. For example, some Swedish users who would rather +read translations in German than English for when Swedish is not +available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. + + In the `LANGUAGE' environment variable, but not in the `LANG' +environment variable, `LL_CC' combinations can be abbreviated as `LL' +to denote the language's main dialect. For example, `de' is equivalent +to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' +(Portuguese as spoken in Portugal) in this context. + +Translating Teams +================= + + For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list. The up-to-date list of +teams can be found at the Free Translation Project's homepage, +`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" +area. + + If you'd like to volunteer to _work_ at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is _not_ the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +_actively_ in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `translation@iro.umontreal.ca' to reach the +coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skill are praised more than +programming skill, here. + +Available Packages +================== + + Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of May 2003. +The matrix shows, in regard of each package, for which languages PO +files have been submitted to translation coordination, with a +translation percentage of at least 50%. + + Ready PO files am az be bg ca cs da de el en en_GB eo es + +-------------------------------------------+ + a2ps | [] [] [] [] | + aegis | () | + anubis | | + ap-utils | | + bash | [] [] [] | + batchelor | | + bfd | [] [] | + binutils | [] [] | + bison | [] [] [] | + bluez-pin | [] [] | + clisp | | + clisp | [] [] [] | + coreutils | [] [] [] [] | + cpio | [] [] [] | + darkstat | () [] | + diffutils | [] [] [] [] [] [] [] | + e2fsprogs | [] [] | + enscript | [] [] [] [] | + error | [] [] [] [] [] | + fetchmail | [] () [] [] [] [] | + fileutils | [] [] [] | + findutils | [] [] [] [] [] [] | + flex | [] [] [] [] | + gas | [] | + gawk | [] [] [] [] | + gcal | [] | + gcc | [] [] | + gettext | [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] | + gimp-print | [] [] [] [] [] | + gliv | | + glunarclock | [] [] [] | + gnucash | () [] | + gnucash-glossary | [] () [] | + gnupg | [] () [] [] [] [] | + gpe-calendar | [] | + gpe-conf | [] | + gpe-contacts | [] | + gpe-edit | | + gpe-login | [] | + gpe-ownerinfo | [] | + gpe-sketchbook | [] | + gpe-timesheet | | + gpe-today | [] | + gpe-todo | [] | + gphoto2 | [] [] [] [] | + gprof | [] [] | + gpsdrive | () () () | + grep | [] [] [] [] [] | + gretl | [] | + hello | [] [] [] [] [] [] | + id-utils | [] [] | + indent | [] [] [] [] | + jpilot | [] [] [] [] | + jwhois | [] | + kbd | [] [] [] [] [] | + ld | [] [] | + libc | [] [] [] [] [] [] | + libgpewidget | [] | + libiconv | [] [] [] [] [] | + lifelines | [] () | + lilypond | [] | + lingoteach | | + lingoteach_lessons | () () | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | [] [] | + make | [] [] [] | + man-db | [] () [] [] () | + mysecretdiary | [] [] [] | + nano | [] () [] [] [] | + nano_1_0 | [] () [] [] [] | + opcodes | [] [] | + parted | [] [] [] [] [] | + ptx | [] [] [] [] [] | + python | | + radius | | + recode | [] [] [] [] [] [] | + screem | | + sed | [] [] [] [] [] | + sh-utils | [] [] [] | + sharutils | [] [] [] [] [] [] | + sketch | [] () [] | + soundtracker | [] [] [] | + sp | [] | + tar | [] [] [] [] | + texinfo | [] [] [] [] | + textutils | [] [] [] [] | + tin | () () | + util-linux | [] [] [] [] [] | + vorbis-tools | [] [] [] | + wastesedge | () | + wdiff | [] [] [] [] | + wget | [] [] [] [] [] [] [] | + xchat | [] [] [] | + xpad | | + +-------------------------------------------+ + am az be bg ca cs da de el en en_GB eo es + 0 1 4 2 31 17 54 60 14 1 4 12 56 + + et fa fi fr ga gl he hr hu id it ja ko + +----------------------------------------+ + a2ps | [] [] [] () () | + aegis | | + anubis | [] | + ap-utils | [] | + bash | [] [] | + batchelor | [] | + bfd | [] [] | + binutils | [] [] | + bison | [] [] [] [] | + bluez-pin | [] [] [] [] | + clisp | | + clisp | [] | + coreutils | [] [] [] [] | + cpio | [] [] [] [] | + darkstat | () [] [] [] | + diffutils | [] [] [] [] [] [] [] | + e2fsprogs | | + enscript | [] [] | + error | [] [] [] [] | + fetchmail | [] | + fileutils | [] [] [] [] [] | + findutils | [] [] [] [] [] [] [] [] [] [] [] | + flex | [] [] | + gas | [] | + gawk | [] [] | + gcal | [] | + gcc | [] | + gettext | [] [] [] | + gettext-runtime | [] [] [] [] | + gettext-tools | [] | + gimp-print | [] [] | + gliv | () | + glunarclock | [] [] [] [] | + gnucash | [] | + gnucash-glossary | [] | + gnupg | [] [] [] [] [] [] [] | + gpe-calendar | [] | + gpe-conf | | + gpe-contacts | [] | + gpe-edit | [] [] | + gpe-login | [] | + gpe-ownerinfo | [] [] [] | + gpe-sketchbook | [] | + gpe-timesheet | [] [] [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | [] [] [] | + gprof | [] [] | + gpsdrive | () [] () () | + grep | [] [] [] [] [] [] [] [] [] [] [] | + gretl | [] | + hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] | + indent | [] [] [] [] [] [] [] [] | + jpilot | [] () | + jwhois | [] [] [] [] | + kbd | [] | + ld | [] | + libc | [] [] [] [] [] [] | + libgpewidget | [] [] [] | + libiconv | [] [] [] [] [] [] [] [] | + lifelines | () | + lilypond | [] | + lingoteach | [] [] | + lingoteach_lessons | | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | | + make | [] [] [] [] [] [] | + man-db | [] () () | + mysecretdiary | [] [] | + nano | [] [] [] [] | + nano_1_0 | [] [] [] [] | + opcodes | [] [] | + parted | [] [] [] | + ptx | [] [] [] [] [] [] [] | + python | | + radius | | + recode | [] [] [] [] [] [] | + screem | | + sed | [] [] [] [] [] [] [] [] | + sh-utils | [] [] [] [] [] [] | + sharutils | [] [] [] [] [] | + sketch | [] | + soundtracker | [] [] [] | + sp | [] () | + tar | [] [] [] [] [] [] [] [] [] | + texinfo | [] [] [] [] | + textutils | [] [] [] [] [] | + tin | [] () | + util-linux | [] [] [] [] () [] | + vorbis-tools | [] | + wastesedge | () | + wdiff | [] [] [] [] [] | + wget | [] [] [] [] [] [] [] [] | + xchat | [] [] [] | + xpad | | + +----------------------------------------+ + et fa fi fr ga gl he hr hu id it ja ko + 20 1 15 73 14 24 8 10 30 31 19 31 9 + + lg lt lv ms nb nl nn no pl pt pt_BR ro + +----------------------------------------+ + a2ps | [] [] () () () [] [] | + aegis | () | + anubis | [] [] | + ap-utils | () | + bash | [] | + batchelor | | + bfd | | + binutils | | + bison | [] [] [] [] | + bluez-pin | [] | + clisp | | + clisp | [] | + coreutils | [] | + cpio | [] [] [] | + darkstat | [] [] [] [] | + diffutils | [] [] [] | + e2fsprogs | | + enscript | [] [] | + error | [] [] | + fetchmail | () () | + fileutils | [] | + findutils | [] [] [] [] | + flex | [] | + gas | | + gawk | [] | + gcal | | + gcc | | + gettext | [] | + gettext-runtime | [] | + gettext-tools | | + gimp-print | [] | + gliv | [] | + glunarclock | [] | + gnucash | | + gnucash-glossary | [] [] | + gnupg | | + gpe-calendar | [] [] | + gpe-conf | [] [] | + gpe-contacts | [] | + gpe-edit | [] [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] | + gpe-sketchbook | [] [] | + gpe-timesheet | [] [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | | + gprof | [] | + gpsdrive | () () () | + grep | [] [] [] [] | + gretl | | + hello | [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] | + indent | [] [] [] | + jpilot | () () | + jwhois | [] [] [] | + kbd | | + ld | | + libc | [] [] [] [] | + libgpewidget | [] [] | + libiconv | [] [] | + lifelines | | + lilypond | [] | + lingoteach | | + lingoteach_lessons | | + lynx | [] [] | + m4 | [] [] [] [] | + mailutils | | + make | [] [] | + man-db | [] | + mysecretdiary | [] | + nano | [] [] [] [] | + nano_1_0 | [] [] [] [] | + opcodes | [] [] [] | + parted | [] [] [] | + ptx | [] [] [] [] [] [] [] | + python | | + radius | | + recode | [] [] [] | + screem | | + sed | [] [] | + sh-utils | [] | + sharutils | [] | + sketch | [] | + soundtracker | | + sp | | + tar | [] [] [] [] [] [] | + texinfo | [] | + textutils | [] | + tin | | + util-linux | [] [] | + vorbis-tools | [] [] | + wastesedge | | + wdiff | [] [] [] [] | + wget | [] [] [] | + xchat | [] [] | + xpad | [] | + +----------------------------------------+ + lg lt lv ms nb nl nn no pl pt pt_BR ro + 0 0 2 11 7 26 3 4 18 15 34 34 + + ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW + +-------------------------------------------+ + a2ps | [] [] [] [] [] | 16 + aegis | () | 0 + anubis | [] [] | 5 + ap-utils | () | 1 + bash | [] | 7 + batchelor | | 1 + bfd | [] [] [] | 7 + binutils | [] [] [] | 7 + bison | [] [] | 13 + bluez-pin | | 7 + clisp | | 0 + clisp | | 5 + coreutils | [] [] [] [] [] | 14 + cpio | [] [] [] | 13 + darkstat | [] () () | 9 + diffutils | [] [] [] [] | 21 + e2fsprogs | [] | 3 + enscript | [] [] [] | 11 + error | [] [] [] | 14 + fetchmail | [] | 7 + fileutils | [] [] [] [] [] [] | 15 + findutils | [] [] [] [] [] [] | 27 + flex | [] [] [] | 10 + gas | [] | 3 + gawk | [] [] | 9 + gcal | [] [] | 4 + gcc | [] | 4 + gettext | [] [] [] [] [] [] | 15 + gettext-runtime | [] [] [] [] [] [] | 16 + gettext-tools | [] [] | 5 + gimp-print | [] [] | 10 + gliv | | 1 + glunarclock | [] [] [] | 11 + gnucash | [] [] | 4 + gnucash-glossary | [] [] [] | 8 + gnupg | [] [] [] [] | 16 + gpe-calendar | [] | 5 + gpe-conf | | 3 + gpe-contacts | [] | 4 + gpe-edit | [] | 5 + gpe-login | [] | 5 + gpe-ownerinfo | [] | 7 + gpe-sketchbook | [] | 5 + gpe-timesheet | [] | 6 + gpe-today | [] | 6 + gpe-todo | [] | 6 + gphoto2 | [] [] | 9 + gprof | [] [] | 7 + gpsdrive | [] [] | 3 + grep | [] [] [] [] | 24 + gretl | | 2 + hello | [] [] [] [] [] | 33 + id-utils | [] [] [] | 11 + indent | [] [] [] [] | 19 + jpilot | [] [] [] [] [] | 10 + jwhois | () () [] [] | 10 + kbd | [] [] | 8 + ld | [] [] | 5 + libc | [] [] [] [] | 20 + libgpewidget | | 6 + libiconv | [] [] [] [] [] [] | 21 + lifelines | [] | 2 + lilypond | [] | 4 + lingoteach | | 2 + lingoteach_lessons | () | 0 + lynx | [] [] [] [] | 14 + m4 | [] [] [] | 15 + mailutils | | 2 + make | [] [] [] [] | 15 + man-db | [] | 6 + mysecretdiary | [] [] | 8 + nano | [] [] [] | 15 + nano_1_0 | [] [] [] | 15 + opcodes | [] [] | 9 + parted | [] [] | 13 + ptx | [] [] [] | 22 + python | | 0 + radius | | 0 + recode | [] [] [] [] | 19 + screem | [] | 1 + sed | [] [] [] [] [] | 20 + sh-utils | [] [] [] | 13 + sharutils | [] [] [] [] | 16 + sketch | [] | 5 + soundtracker | [] | 7 + sp | [] | 3 + tar | [] [] [] [] [] | 24 + texinfo | [] [] [] [] | 13 + textutils | [] [] [] [] [] | 15 + tin | | 1 + util-linux | [] [] | 14 + vorbis-tools | [] | 7 + wastesedge | | 0 + wdiff | [] [] [] [] | 17 + wget | [] [] [] [] [] [] [] | 25 + xchat | [] [] [] | 11 + xpad | | 1 + +-------------------------------------------+ + 50 teams ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW + 97 domains 32 19 16 0 56 0 48 10 1 1 12 23 913 + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and +distributed as such by its maintainer. There might be an observable +lag between the mere existence a PO file and its wide availability in a +distribution. + + If May 2003 seems to be old, you may fetch a more recent copy of +this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date +matrix with full percentage details can be found at +`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. + +Using `gettext' in new packages +=============================== + + If you are writing a freely available program and want to +internationalize it you are welcome to use GNU `gettext' in your +package. Of course you have to respect the GNU Library General Public +License which covers the use of the GNU `gettext' library. This means +in particular that even non-free programs can use `libintl' as a shared +library, whereas only free software can use `libintl' as a static +library or use modified versions of `libintl'. + + Once the sources are changed appropriately and the setup can handle +the use of `gettext' the only thing missing are the translations. The +Free Translation Project is also available for packages which are not +developed inside the GNU project. Therefore the information given above +applies also for every other Free Software Project. Contact +`translation@iro.umontreal.ca' to make the `.pot' files available to +the translation teams. + diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..0db86d5 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,11 @@ + ________ ________ ___ ___ ________ ________ ________ + / _____/ / __ / / / / / / __ / /__ ___/ / __ / + / /____ / /_/ / / /_/ / / / / / / / / / / / + / _____/ / _____/ / __ / / / / / / / / / / / +/ /_____ / / / / / / / /_/ / / / / /_/ / +________/ /__/ /__/ /__/ /_______/ /_/ /_______/ + +===Project Manager/Lead Developer=== +Stephen "UnixTitan" Houston +===People That Helped=== +boycott tokyo diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..05d62d2 --- /dev/null +++ b/COPYING @@ -0,0 +1,28 @@ +Icons from the tango project (http://tango.freedesktop.org) +For information see COPYING.icons + +Copyright (c) <2006>, +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of ephoto nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY +OF SUCH DAMAGE. diff --git a/COPYING.icons b/COPYING.icons new file mode 100644 index 0000000..e709d0c --- /dev/null +++ b/COPYING.icons @@ -0,0 +1,67 @@ +Creative Commons Attribution-ShareAlike 2.5 License Agreement + +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + + 1. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. + 2. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. + 3. "Licensor" means the individual or entity that offers the Work under the terms of this License. + 4. "Original Author" means the individual or entity who created the Work. + 5. "Work" means the copyrightable work of authorship offered under the terms of this License. + 6. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. + 7. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike. + +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + + 1. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; + 2. to create and reproduce Derivative Works; + 3. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; + 4. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works. + 5. + + For the avoidance of doubt, where the work is a musical composition: + 1. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work. + 2. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions). + 6. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). + +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. + +4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + + 1. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(c), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(c), as requested. + 2. You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.5 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License. + 3. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + 1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. + 2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. + +8. Miscellaneous + + 1. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. + 2. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. + 3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + 4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. + 5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. + +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. + +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. + +Creative Commons may be contacted at http://creativecommons.org/. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..31248ef --- /dev/null +++ b/ChangeLog @@ -0,0 +1,3 @@ +We have redone ephoto to make it an all around image app providing +everything a user could want from an image app. +See TODO for future options. diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..89b3702 --- /dev/null +++ b/INSTALL @@ -0,0 +1,236 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007 +Free Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +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, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + 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 you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' 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 awhile. 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. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +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 support 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' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + 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' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + 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 machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +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. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). Here is a another example: + + /bin/bash ./configure CONFIG_SHELL=/bin/bash + +Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent +configuration-related scripts to be executed by `/bin/bash'. + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..09113f5 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,24 @@ +## Process this file with automake to produce Makefile.in + +SUBDIRS = src data po + +EXTRA_DIST = \ + README AUTHORS COPYING ephoto.spec \ + debian/changelog \ + debian/changelog.in \ + debian/compat \ + debian/control \ + debian/copyright \ + debian/rules + + +MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \ + config.h.in config.sub configure install-sh \ + ltconfig ltmain.sh missing mkinstalldirs \ + stamp-h.in ephoto.spec \ + debian/changelog + +dist-hook: + if test -d data; then \ + (cd $(srcdir); tar -cf - data) | (cd $(distdir); tar -xf -; rm -rf `find . -name CVS`) \ + fi diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..1b1433d --- /dev/null +++ b/NEWS @@ -0,0 +1,9 @@ + ________ ________ ___ ___ ________ ________ ________ + / _____/ / __ / / / / / / __ / /__ ___/ / __ / + / /____ / /_/ / / /_/ / / / / / / / / / / / + / _____/ / _____/ / __ / / / / / / / / / / / +/ /_____ / / / / / / / /_/ / / / / /_/ / +________/ /__/ /__/ /__/ /_______/ /_/ /_______/ + + +New ephoto has been added to e17/apps/ephoto in cvs! diff --git a/README b/README new file mode 100644 index 0000000..45b8897 --- /dev/null +++ b/README @@ -0,0 +1,11 @@ + ________ ________ ___ ___ ________ ________ ________ + / _____/ / __ / / / / / / __ / /__ ___/ / __ / + / /____ / /_/ / / /_/ / / / / / / / / / / / + / _____/ / _____/ / __ / / / / / / / / / / / +/ /_____ / / / / / / / /_/ / / / / /_/ / +________/ /__/ /__/ /__/ /_______/ /_/ /_______/ + + +Ephoto Image Viewer/Editor/Manipulator/Slideshow creator. + +Icons belong to the tango project (http://tango.freedesktop.org) diff --git a/TODO b/TODO new file mode 100644 index 0000000..38436ae --- /dev/null +++ b/TODO @@ -0,0 +1,24 @@ + ________ ________ ___ ___ ________ ________ ________ + / _____/ / __ / / / / / / __ / /__ ___/ / __ / + / /____ / /_/ / / /_/ / / / / / / / / / / / + / _____/ / _____/ / __ / / / / / / / / / / / +/ /_____ / / / / / / / /_/ / / / / /_/ / +________/ /__/ /__/ /__/ /_______/ /_/ /_______/ + + +TODO- +===General=== +Dialogs For Adding/Removing Albums/Images. +DRAG AND DROP IS A MUST! +===Normal View=== +Multiple Selection. +Seeker to Resize Thumbnails. +===Edit View=== +Add Editing Controls(Rotate/Zoom/Blur/Sharpen/Color/Histogram/etc..). +===List View=== +Multiple Selection. +===Slideshow=== +Need to Add Slideshow Code. +===Theme=== +Need to Theme Text to Have a Blue State like Label Does. +Need a Better Seeker Theme. diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..0e5e6ed --- /dev/null +++ b/autogen.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +rm -rf autom4te.cache +rm -f aclocal.m4 ltmain.sh + +touch README +touch ABOUT-NLS + +echo "Running autopoint..."; autopoint -f || exit 1 +echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1 +echo "Running autoconf..." ; autoconf || exit 1 +echo "Running autoheader..." ; autoheader || exit 1 +echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1 +echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1 +echo "Generating gettext ephoto.pot template"; \ +xgettext \ +-n \ +-C \ +-d ephoto \ +-p po \ +--foreign-user \ +-k -k_ -kN_ -kS_ \ +-o ephoto.pot \ +`find . -name "*.[ch]" -print` || exit 1 + +if [ -z "$NOCONFIGURE" ]; then + ./configure "$@" +fi + diff --git a/configure.in b/configure.in new file mode 100644 index 0000000..0907620 --- /dev/null +++ b/configure.in @@ -0,0 +1,192 @@ +dnl Process this file with autoconf to produce a configure script. + +# get rid of that stupid cache mechanism +rm -f config.cache + +AC_INIT(configure.in) +AM_INIT_AUTOMAKE(ephoto, 2.15.0) +AM_CONFIG_HEADER(src/bin/config.h) + +AC_ISC_POSIX +AC_PROG_CC +AM_PROG_CC_STDC +AC_HEADER_STDC +AC_C_CONST +AM_ENABLE_SHARED +AM_PROG_LIBTOOL + +AM_WITH_DMALLOC + +dnl Add the languages which your application supports here. +ALL_LINGUAS="sv de it fr" +AC_SUBST(ALL_LINGUAS) + +AM_GNU_GETTEXT([external]) +AM_GNU_GETTEXT_VERSION([0.12.1]) + +dnl Set PACKAGE_LOCALE_DIR in config.h. +if test "x$LIBINTL" = "x"; then + LIBINTL="$INTLLIBS" +fi +if test "x${prefix}" = "xNONE"; then + AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/share/locale", [Locale-specific data directory]) +else + AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/share/locale", [Locale-specific data directory]) +fi + +dnl Set PACKAGE_DATA_DIR in config.h. +if test "x${prefix}" = "xNONE"; then + AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}", [Shared Data Directory]) +else + AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}", [Shared Data Directory]) +fi + +dnl Set PACKAGE_BIN_DIR in config.h. +if test "x${datadir}" = 'x${prefix}/bin'; then + if test "x${prefix}" = "xNONE"; then + AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${ac_default_prefix}/bin", [Installation directory for user executables]) + else + AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${prefix}/bin", [Installation directory for user executables]) + fi +else + AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${bindir}", [Installation directory for user executables]) +fi + +dnl Set PACKAGE_LIB_DIR in config.h. +if test "x${datadir}" = 'x${prefix}/lib'; then + if test "x${prefix}" = "xNONE"; then + AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${ac_default_prefix}/lib", [Installation directory for libraries]) + else + AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${prefix}/lib", [Installation directory for libraries]) + fi +else + AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${libdir}", [Installation directory for libraries]) +fi + +dnl Set PACKAGE_SOURCE_DIR in config.h. +packagesrcdir=`cd $srcdir && pwd` +AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [Source code directory]) + +AC_CHECK_HEADERS(sqlite3.h, + SQLITE_LIBS="$SQLITE_LIBS -lsqlite3", + AC_MSG_ERROR([Ephoto needs sqlite3 to compile.]) + ) +AC_SUBST(SQLITE_LIBS) + +AC_CHECK_HEADERS(libexif/exif-data.h, + EXIF_LIBS="$EXIF_LIBS -lexif", + AC_MSG_ERROR([Ephoto needs libexif to compile.]) + ) +AC_SUBST(EXIF_LIBS) + +PROG="evas-config"; +AC_PATH_PROG(EVAS_CONFIG, $PROG, "", $PATH) +if test -z "$EVAS_CONFIG" ; then + echo $PROG " is not in your \$PATH. Please ensure it is."; + echo "Read the manual page for you shell as to how to extend your path."; + AC_MSG_ERROR(Cannot find $PROG) +fi +evas_cflags=`$EVAS_CONFIG --cflags` +evas_libs=`$EVAS_CONFIG --libs` +AC_SUBST(evas_cflags) +AC_SUBST(evas_libs) + +PROG="ecore-config"; +AC_PATH_PROG(ECORE_CONFIG, $PROG, "", $PATH) +if test -z "$ECORE_CONFIG" ; then + echo $PROG " is not in your \$PATH. Please ensure it is."; + echo "Read the manual page for you shell as to how to extend your path."; + AC_MSG_ERROR(Cannot find $PROG) +fi +ecore_cflags=`$ECORE_CONFIG --cflags` +ecore_libs=`$ECORE_CONFIG --libs` +AC_SUBST(ecore_cflags) +AC_SUBST(ecore_libs) + +PROG="ewl-config"; +AC_PATH_PROG(EWL_CONFIG, $PROG, "", $PATH) +if test -z "$EWL_CONFIG" ; then + echo $PROG " is not in your \$PATH. Please ensure it is."; + echo "Read the manual page for your shell as to how to extend your path."; + AC_MSG_ERROR(Cannot find $PROG) +fi +ewl_cflags=`$EWL_CONFIG --cflags` +ewl_libs=`$EWL_CONFIG --libs` +AC_SUBST(ewl_cflags) +AC_SUBST(ewl_libs) + +PROG="edje-config"; +AC_PATH_PROG(EDJE_CONFIG, $PROG, "", $PATH) +if test -z "$EDJE_CONFIG" ; then + echo $PROG " is not in your \$PATH. Please ensure it is."; + echo "Read the manual page for you shell as to how to extend your path."; + AC_MSG_ERROR(Cannot find $PROG) +fi +edje_cflags=`$EDJE_CONFIG --cflags` +edje_libs=`$EDJE_CONFIG --libs` +AC_SUBST(edje_cflags) +AC_SUBST(edje_libs) + + +PROG="epsilon-config"; +AC_PATH_PROG(EPSILON_CONFIG, $PROG, "", $PATH) +if test -z "$EPSILON_CONFIG" ; then + echo $PROG " is not in your \$PATH. Please ensure it is."; + echo "Read the manual page for you shell as to how to extend your path."; + AC_MSG_ERROR(Cannot find $PROG) +fi +epsilon_cflags=`$EPSILON_CONFIG --cflags` +epsilon_libs=`$EPSILON_CONFIG --libs` +AC_SUBST(epsilon_cflags) +AC_SUBST(epsilon_libs) + +AC_OUTPUT([ +Makefile +ephoto.spec +data/Makefile +data/images/Makefile +data/themes/Makefile +data/themes/ephoto/Makefile +data/themes/ephoto/bits/Makefile +data/themes/ephoto/fonts/Makefile +data/themes/ephoto/images/Makefile +debian/changelog +po/Makefile +src/Makefile +src/bin/Makefile +]) + +echo +echo +echo +echo "------------------------------------------------------------------------" +echo "$PACKAGE $VERSION" +echo "------------------------------------------------------------------------" +echo +echo " ________ ________ ___ ___ ________ ________ ________" +echo " / _____/ / __ / / / / / / __ / /__ ___/ / __ /" +echo " / /____ / /_/ / / /_/ / / / / / / / / / / / " +echo " / _____/ / _____/ / __ / / / / / / / / / / / " +echo "/ /_____ / / / / / / / /_/ / / / / /_/ / " +echo "________/ /__/ /__/ /__/ /_______/ /_/ /_______/ " +echo +echo +echo "------------------------------------------------------------------------" +echo "$PACKAGE $VERSION" +echo "------------------------------------------------------------------------" +echo +echo "Configuration Options Summary:" +echo +echo " Evas ............: Yes" +echo " Ecore ...........: Yes" +echo " Edje ............: Yes" +echo " Epsilon .........: Yes" +echo " EWL .............: Yes" +echo " Libexif .........: Yes" +echo " Sqlite3 .........: Yes" +echo +echo "Installation Path.........: $prefix" +echo +echo "Compilation...............: make" +echo "Installation..............: make install" +echo diff --git a/data/Makefile.am b/data/Makefile.am new file mode 100644 index 0000000..333aba6 --- /dev/null +++ b/data/Makefile.am @@ -0,0 +1,3 @@ +MAINTAINERCLEANFILES = Makefile.in + +SUBDIRS = images themes diff --git a/data/images/Makefile.am b/data/images/Makefile.am new file mode 100644 index 0000000..0b4a45c --- /dev/null +++ b/data/images/Makefile.am @@ -0,0 +1,30 @@ +MAINTAINERCLEANFILES = Makefile.in + +FILES = add.png \ + camera-photo.png \ + dialog-close.png \ + edit_view.png \ + emblem-favorite.png \ + emblem-photos.png \ + exit.png \ + folder.png \ + get_exif.png \ + go-up.png \ + go-home.png \ + go-down.png \ + go-next.png \ + image.png \ + list_view.png \ + normal_view.png \ + preferences-system.png \ + redo.png \ + remove.png \ + search.png \ + stock_fullscreen.png \ + stock_save.png \ + undo.png \ + x-office-presentation.png +imagedir = $(pkgdatadir)/images +image_DATA = $(FILES) +EXTRA_DIST = $(FILES) + diff --git a/data/images/add.png b/data/images/add.png new file mode 100644 index 0000000..bc0f572 Binary files /dev/null and b/data/images/add.png differ diff --git a/data/images/camera-photo.png b/data/images/camera-photo.png new file mode 100644 index 0000000..e190ea1 Binary files /dev/null and b/data/images/camera-photo.png differ diff --git a/data/images/dialog-close.png b/data/images/dialog-close.png new file mode 100644 index 0000000..70eeec9 Binary files /dev/null and b/data/images/dialog-close.png differ diff --git a/data/images/edit_view.png b/data/images/edit_view.png new file mode 100644 index 0000000..945f4d1 Binary files /dev/null and b/data/images/edit_view.png differ diff --git a/data/images/emblem-favorite.png b/data/images/emblem-favorite.png new file mode 100644 index 0000000..d9aecaf Binary files /dev/null and b/data/images/emblem-favorite.png differ diff --git a/data/images/emblem-photos.png b/data/images/emblem-photos.png new file mode 100644 index 0000000..1581ed2 Binary files /dev/null and b/data/images/emblem-photos.png differ diff --git a/data/images/exit.png b/data/images/exit.png new file mode 100644 index 0000000..2e739bd Binary files /dev/null and b/data/images/exit.png differ diff --git a/data/images/folder.png b/data/images/folder.png new file mode 100644 index 0000000..63f7c2a Binary files /dev/null and b/data/images/folder.png differ diff --git a/data/images/get_exif.png b/data/images/get_exif.png new file mode 100644 index 0000000..f342695 Binary files /dev/null and b/data/images/get_exif.png differ diff --git a/data/images/go-down.png b/data/images/go-down.png new file mode 100644 index 0000000..1e03969 Binary files /dev/null and b/data/images/go-down.png differ diff --git a/data/images/go-home.png b/data/images/go-home.png new file mode 100644 index 0000000..ddf3b83 Binary files /dev/null and b/data/images/go-home.png differ diff --git a/data/images/go-next.png b/data/images/go-next.png new file mode 100644 index 0000000..30d67cb Binary files /dev/null and b/data/images/go-next.png differ diff --git a/data/images/go-up.png b/data/images/go-up.png new file mode 100644 index 0000000..ed3dbd9 Binary files /dev/null and b/data/images/go-up.png differ diff --git a/data/images/image.png b/data/images/image.png new file mode 100644 index 0000000..9c7a277 Binary files /dev/null and b/data/images/image.png differ diff --git a/data/images/list_view.png b/data/images/list_view.png new file mode 100644 index 0000000..d734b4b Binary files /dev/null and b/data/images/list_view.png differ diff --git a/data/images/normal_view.png b/data/images/normal_view.png new file mode 100644 index 0000000..b9d57c8 Binary files /dev/null and b/data/images/normal_view.png differ diff --git a/data/images/preferences-system.png b/data/images/preferences-system.png new file mode 100644 index 0000000..51d71ac Binary files /dev/null and b/data/images/preferences-system.png differ diff --git a/data/images/redo.png b/data/images/redo.png new file mode 100644 index 0000000..dc472a8 Binary files /dev/null and b/data/images/redo.png differ diff --git a/data/images/remove.png b/data/images/remove.png new file mode 100644 index 0000000..8eacd4b Binary files /dev/null and b/data/images/remove.png differ diff --git a/data/images/search.png b/data/images/search.png new file mode 100644 index 0000000..172e648 Binary files /dev/null and b/data/images/search.png differ diff --git a/data/images/stock_fullscreen.png b/data/images/stock_fullscreen.png new file mode 100644 index 0000000..8418eba Binary files /dev/null and b/data/images/stock_fullscreen.png differ diff --git a/data/images/stock_save.png b/data/images/stock_save.png new file mode 100644 index 0000000..817ab81 Binary files /dev/null and b/data/images/stock_save.png differ diff --git a/data/images/undo.png b/data/images/undo.png new file mode 100644 index 0000000..3f216cd Binary files /dev/null and b/data/images/undo.png differ diff --git a/data/images/x-office-presentation.png b/data/images/x-office-presentation.png new file mode 100644 index 0000000..4f9c04d Binary files /dev/null and b/data/images/x-office-presentation.png differ diff --git a/data/themes/Makefile.am b/data/themes/Makefile.am new file mode 100644 index 0000000..58918bc --- /dev/null +++ b/data/themes/Makefile.am @@ -0,0 +1,3 @@ +MAINTAINERCLEANFILES = Makefile.in + +SUBDIRS = ephoto diff --git a/data/themes/ephoto/AUTHORS b/data/themes/ephoto/AUTHORS new file mode 100644 index 0000000..29ef33b --- /dev/null +++ b/data/themes/ephoto/AUTHORS @@ -0,0 +1,3 @@ +Clearlooks is a GTK+ 2.x engine based on Bluecurve. +It features a modern look without sacrificing (much) speed. +The lead developers are Richard Stellingwerff and Daniel Borgmann. diff --git a/data/themes/ephoto/COPYING b/data/themes/ephoto/COPYING new file mode 100644 index 0000000..39520ee --- /dev/null +++ b/data/themes/ephoto/COPYING @@ -0,0 +1,25 @@ + +Copyright (c) 2006 Contributors (see theme ABOUT) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/data/themes/ephoto/Makefile.am b/data/themes/ephoto/Makefile.am new file mode 100644 index 0000000..f8f2e0c --- /dev/null +++ b/data/themes/ephoto/Makefile.am @@ -0,0 +1,31 @@ +MAINTAINERCLEANFILES = Makefile.in +SUBDIRS = bits fonts images + +EDJE_FLAGS = \ +-v \ +-id $(top_srcdir)/data/themes/ephoto/images \ +-fd $(top_srcdir)/data/themes/ephoto/fonts + +themedir = $(pkgdatadir)/themes/ +theme_DATA = \ +ephoto.edj + +EXTRA_DIST = \ + bits/button.edc \ + bits/combo.edc \ + bits/entry.edc \ + bits/label.edc \ + bits/scrollbar.edc \ + bits/scrollpane.edc \ + bits/select.edc \ + bits/spacer.edc \ + bits/tree.edc \ + bits/window.edc + +ephoto.edj: Makefile $(EXTRA_DIST) + edje_cc $(EDJE_FLAGS) \ + $(top_srcdir)/data/themes/ephoto/main.edc \ + $(top_builddir)/data/themes/ephoto/ephoto.edj + +clean-local: + rm -f *.edj diff --git a/data/themes/ephoto/bits/Makefile.am b/data/themes/ephoto/bits/Makefile.am new file mode 100644 index 0000000..4eb0255 --- /dev/null +++ b/data/themes/ephoto/bits/Makefile.am @@ -0,0 +1,13 @@ +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = \ +button.edc \ +combo.edc \ +label.edc \ +scrollbar.edc \ +scrollpane.edc \ +select.edc \ +spacer.edc \ +tree.edc \ +window.edc + diff --git a/data/themes/ephoto/bits/button.edc b/data/themes/ephoto/bits/button.edc new file mode 100644 index 0000000..dde58ac --- /dev/null +++ b/data/themes/ephoto/bits/button.edc @@ -0,0 +1,70 @@ +group +{ + name: "/ephoto/button"; + min: 16 16; + data + { + item: "inset/left" 14; + item: "inset/right" 14; + item: "inset/top" 5; + item: "inset/bottom" 5; + item: "pad" 2; + } + parts + { + part + { + name: "background"; + mouse_events: 1; + description + { + state: "default" 0.0; + rel1 + { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 + { + relative: 1.0 1.0; + offset: -1 -1; + } + image + { + normal: "button.png"; + border: 5 5 5 5; + } + } + description + { + state: "clicked" 0.0; + inherit: "default" 0.0; + image + { + normal: "button_clicked.png"; + border: 5 5 5 5; + } + } + } + } + programs + { + program + { + name: "clicked"; + signal: "mouse,down,1"; + source: "EWL"; + action: STATE_SET "clicked" 1.0; + target: "background"; + } + program + { + name: "unclicked"; + signal: "mouse,up,1"; + source: "EWL"; + action: STATE_SET "default" 1.0; + target: "background"; + } + } +} + diff --git a/data/themes/ephoto/bits/combo.edc b/data/themes/ephoto/bits/combo.edc new file mode 100644 index 0000000..e6fefcc --- /dev/null +++ b/data/themes/ephoto/bits/combo.edc @@ -0,0 +1,182 @@ +group +{ + name: "/ephoto/combo"; + min: 1 28; + data + { + item: "inset" 0.5; + } + parts + { + part + { + name: "background"; + mouse_events: 1; + description + { + state: "default" 0.0; + rel1 + { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 + { + relative: 1.0 1.0; + offset: -1 -1; + } + image + { + normal: "button.png"; + border: 5 5 5 5; + } + } + description + { + state: "clicked" 0.0; + inherit: "default" 0.0; + image + { + normal: "button_clicked.png"; + border: 5 5 5 5; + } + } + } + } + programs + { + program + { + name: "clicked"; + signal: "mouse,down,1"; + source: "EWL"; + action: STATE_SET "clicked" 1.0; + target: "background"; + } + program + { + name: "unclicked"; + signal: "mouse,up,1"; + source: "EWL"; + action: STATE_SET "default" 1.0; + target: "background"; + } + } +} + +group +{ + name: "/ephoto/combo/contents"; + data + { + item: "pad/left" 2; + item: "pad/right" 10; + item: "inset/top" 1; + item: "inset/bottom" 1; + } +} + +group +{ + name: "/ephoto/combo/button"; + min: 18 17; + max: 18 17; + data + { + item: "pad" 5; + } + parts + { + part + { + name: "background"; + mouse_events: 1; + description + { + state: "default" 0.0; + rel1 + { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 + { + relative: 1.0 1.0; + offset: -1 -1; + } + image + { + normal: "combo_arrows.png"; + } + } + } + } +} + +group +{ + name: "/ephoto/combo/popup"; + parts + { + part + { + name: "base3"; + mouse_events: 0; + type: RECT; + description { + state: "default" 0.0; + rel1 + { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 + { + relative: 1.0 1.0; + offset: -1 -1; + } + color: 184 171 143 255; + } + } + part { + name: "border"; + mouse_events: 0; + type: RECT; + description { + state: "default" 0.0; + rel1 + { + to_y: "base"; + relative: 0.0 1.0; + offset: 1 0; + } + rel2 { + relative: 1.0 1.0; + offset: -2 -2; + } + color: 184 171 143 255; + } + } + part { + name: "base"; + mouse_events: 0; + type: RECT; + description { + state: "default" 0.0; + align: 0.5 0.0; + rel1 + { + relative: 0.0 0.0; + offset: 1 1; + } + rel2 + { + relative: 1.0 1.0; + offset: -2 -2; + } + color: 249 247 243 255; + } + } + } +} + diff --git a/data/themes/ephoto/bits/entry.edc b/data/themes/ephoto/bits/entry.edc new file mode 100644 index 0000000..8d23ad2 --- /dev/null +++ b/data/themes/ephoto/bits/entry.edc @@ -0,0 +1,149 @@ +group +{ + name: "/ephoto/entry"; + min: 18 18; + data + { + item: "inset/left" 6; + item: "inset/right" 2; + item: "inset/top" 2; + item: "inset/bottom" 2; + } + parts + { + part + { + name: "background"; + mouse_events: 0; + description + { + state: "default" 0.0; + image + { + normal: "entry.png"; + border: 5 5 8 6; + } + } + } + part { + name: "entry_focus"; + description { + state: "default" 0.0; + color: 255 255 255 0; + visible: 0; + image { + normal: "entry_focus.png"; + border: 7 7 6 6; + middle: 0; + } + fill { + smooth: 0; + } + } + description { + state: "focus" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + visible: 1; + } + } + } + programs + { + program + { + name: "focus,in"; + signal: "focus,in"; + source: "*"; + action: STATE_SET "focus" 0.0; + transition: DECELERATE 0.2; + target: "entry_focus"; + } + program + { + name: "focus,out"; + signal: "focus,out"; + source: "*"; + action: STATE_SET "default" 0.0; + transition: DECELERATE 0.5; + target: "entry_focus"; + } + } + +} + +group +{ + name: "/ephoto/entry/cursor"; + min: 1 12; + max: 1 10000; + + data + { + item: "pad" 0; + item: "pad/top" 4; + } + + parts + { + part + { + name, "cursor"; + type: RECT; + description + { + state: "default" 0.0; + color: 0 0 0 255; + visible: 0; + } + description + { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + } + programs + { + program + { + name: "blink-on"; + signal: "show"; + source: ""; + action: STATE_SET "visible" 0.0; + target: "cursor"; + after: "blink-hold-on"; + } + program + { + name: "blink-off"; + action: STATE_SET "default" 0.0; + target: "cursor"; + after: "blink-hold-off"; + } + program + { + name: "blink-hold-on"; + in: 1.0 0.0; + after: "blink-off"; + } + program + { + name: "blink-hold-off"; + in: 0.5 0.0; + after: "blink-on"; + } + program + { + name: "no-blink"; + signal: "noblink"; + source, "EWL"; + action: ACTION_STOP; + target: "blink-hold-on"; + target: "blink-hold-off"; + after: "blink-on"; + } + } +} + diff --git a/data/themes/ephoto/bits/label.edc b/data/themes/ephoto/bits/label.edc new file mode 100644 index 0000000..7352aa1 --- /dev/null +++ b/data/themes/ephoto/bits/label.edc @@ -0,0 +1,95 @@ +group +{ + name: "/ephoto/label"; + data + { + item: "pad" 2; + } + parts + { + part + { + name: "background"; + type: RECT; + description + { + state: "default" 0.0; + color: 0 0 0 0; + } + description + { + state: "blue" 0.0; + color: 71 135 195 255; + } + } + part + { + name: "/ephoto/label/text"; + type: TEXT; + effect: NONE; + + description + { + state: "default" 0.0; + align: 0.5 0.5; + + rel1 + { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 + { + relative: 1.0 1.0; + offset: -1 -1; + } + text + { + text: "text"; + font: "ewl/default"; + size: 10; + min: 1 1; + align: 0.5 0.5; + } + color: 0 0 0 255; + } + description + { + state: "blue" 0.0; + inherit: "default" 0.0; + text + { + text: "text"; + font: "ewl/default/bold"; + size: 10; + min: 1 1; + align: 0.5 0.5; + } + color: 255 255 255 255; + } + } + } + programs + { + program + { + name: "blue"; + signal: "blue"; + source: "*"; + action: STATE_SET "blue" 0.0; + target: "background"; + target: "/ephoto/label/text"; + } + program + { + name: "default"; + signal: "default"; + source: "*"; + action: STATE_SET "default" 0.0; + target: "background"; + target: "/ephoto/label/text"; + } + } +} + + diff --git a/data/themes/ephoto/bits/scrollbar.edc b/data/themes/ephoto/bits/scrollbar.edc new file mode 100644 index 0000000..cf621c0 --- /dev/null +++ b/data/themes/ephoto/bits/scrollbar.edc @@ -0,0 +1,473 @@ +group +{ + name: "/ephoto/vrunner"; + parts + { + part + { + name: "runner"; + description + { + state: "default" 0.0; + image + { + normal: "sf_vb_runner.png"; + border: 8 8 6 6; + } + fill + { + smooth: 0; + } + } + } + } +} + +group +{ + name: "/ephoto/vscrollbar"; + min: 15 36; + parts + { + part + { + name: "scrollbar"; + description + { + state: "default" 0.0; + rel1 + { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 + { + relative: 1.0 1.0; + offset: -1 -1; + } + image + { + normal: "sf_barv1.png"; + border: 6 6 6 6; + } + fill + { + smooth: 0; + } + } + description + { + state: "hilited" 0.0; + inherit: "default" 0.0; + image + { + normal: "sf_barv1_h.png"; + border: 6 6 6 6; + } + } + } + part + { + name: "vscrollbar_thumb"; + description + { + min: 7 8; + max: 7 8; + fixed: 1 1; + rel1 + { + relative: 0.5 0.5; + offset: 0 0; + } + rel2 + { + relative: 0.5 0.5; + offset: 0 0; + } + image + { + normal: "sf_barv_thumb.png"; + border: 2 2 2 2; + } + } + } + } + programs + { + program + { + name: "hilite"; + signal: "mouse,in"; + source: "*"; + action: STATE_SET "hilited" 0.0; + target: "scrollbar"; + } + program + { + name: "default"; + signal: "mouse,out"; + source: "*"; + action: STATE_SET "default" 0.0; + target: "scrollbar"; + } + } +} +group +{ + name: "/ephoto/vscrollbar/decrement"; + min: 15 15; + max: 15 15; + parts + { + part + { + name: "arrow"; + mouse_events: 1; + description + { + state: "default" 0.0; + align: 0.5 1.0; + aspect: 1.0 1.0; + aspect_preference: HORIZONTAL; + rel1 + { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 + { + relative: 1.0 1.0; + offset: -1 -1; + } + image + { + normal: "sf_btd1.png"; + } + } + description + { + state: "clicked" 0.0; + inherit: "default" 0.0; + image + { + normal: "sf_btd1d.png"; + } + } + } + } + programs + { + program + { + name: "mouse,down"; + signal: "mouse,down,*"; + source: "*"; + action: STATE_SET "clicked" 0.0; + target: "arrow"; + } + program + { + name: "mouse,up"; + signal: "mouse,up,*"; + source: "*"; + action: STATE_SET "default" 0.0; + target: "arrow"; + } + } +} + +group +{ + name: "/ephoto/vscrollbar/increment"; + min: 15 15; + max: 15 15; + parts + { + part + { + name: "arrow"; + mouse_events: 1; + description + { + state: "default" 0.0; + align: 0.5 1.0; + aspect: 1.0 1.0; + aspect_preference: HORIZONTAL; + rel1 + { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 + { + relative: 1.0 1.0; + offset: -1 -1; + } + image + { + normal: "sf_btu1.png"; + } + } + description + { + state: "clicked" 0.0; + inherit: "default" 0.0; + image + { + normal: "sf_btu1d.png"; + } + } + } + } + programs + { + program + { + name: "mouse,down"; + signal: "mouse,down,*"; + source: "*"; + action: STATE_SET "clicked" 0.0; + target: "arrow"; + } + program + { + name: "mouse,up"; + signal: "mouse,up,*"; + source: "EWL"; + action: STATE_SET "default" 0.0; + target: "arrow"; + } + } +} + +group +{ + name: "/ephoto/hrunner"; + parts + { + part + { + name: "runner"; + description + { + state: "default" 0.0; + image + { + normal: "sf_hb_runner.png"; + border: 6 6 8 8; + } + fill + { + smooth: 0; + } + } + } + } +} + +group +{ + name: "/ephoto/hscrollbar"; + min: 36 15; + parts + { + part + { + name: "scrollbar"; + description + { + state: "default" 0.0; + image + { + normal: "sf_barh1.png"; + border: 6 6 6 6; + } + fill + { + smooth: 0; + } + } + description + { + state: "hilited" 0.0; + inherit: "default" 0.0; + image + { + normal: "sf_barh1_h.png"; + border: 6 6 6 6; + } + } + } + part + { + name: "hscrollbar_thumb"; + description + { + min: 8 7; + max: 8 7; + fixed: 1 1; + rel1 + { + relative: 0.5 0.5; + offset: 0 0; + } + rel2 + { + relative: 0.5 0.5; + offset: 0 0; + } + image + { + normal: "sf_barh_thumb.png"; + border: 2 2 2 2; + } + } + } + } + programs + { + program + { + name: "hilite"; + signal: "mouse,in"; + source: "*"; + action: STATE_SET "hilited" 0.0; + target: "scrollbar"; + } + program + { + name: "default"; + signal: "mouse,out"; + source: "*"; + action: STATE_SET "default" 0.0; + target: "scrollbar"; + } + } +} +group +{ + name: "/ephoto/hscrollbar/decrement"; + min: 15 15; + max: 15 15; + parts + { + part + { + name: "arrow"; + mouse_events: 1; + description + { + state: "default" 0.0; + align: 0.5 1.0; + aspect: 1.0 1.0; + aspect_preference: VERTICAL; + rel1 + { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 + { + relative: 1.0 1.0; + offset: -1 -1; + } + image + { + normal: "sf_btl1.png"; + } + } + description + { + state: "clicked" 0.0; + inherit: "default" 0.0; + image + { + normal: "sf_btl1d.png"; + } + } + } + } + programs + { + program + { + name: "mouse,down"; + signal: "mouse,down,*"; + source: "*"; + action: STATE_SET "clicked" 0.0; + target: "arrow"; + } + program + { + name: "mouse,up"; + signal: "mouse,up,*"; + source: "*"; + action: STATE_SET "default" 0.0; + target: "arrow"; + } + } +} + +group +{ + name: "/ephoto/hscrollbar/increment"; + min: 15 15; + max: 15 15; + parts + { + part + { + name: "arrow"; + mouse_events: 1; + description + { + state: "default" 0.0; + align: 0.5 1.0; + aspect: 1.0 1.0; + aspect_preference: VERTICAL; + rel1 + { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 + { + relative: 1.0 1.0; + offset: -1 -1; + } + image + { + normal: "sf_btr1.png"; + } + } + description + { + state: "clicked" 0.0; + inherit: "default" 0.0; + image + { + normal: "sf_btr1d.png"; + } + } + } + } + programs + { + program + { + name: "mouse,down"; + signal: "mouse,down,*"; + source: "*"; + action: STATE_SET "clicked" 0.0; + target: "arrow"; + } + program + { + name: "mouse,up"; + signal: "mouse,up,*"; + source: "EWL"; + action: STATE_SET "default" 0.0; + target: "arrow"; + } + } +} diff --git a/data/themes/ephoto/bits/scrollpane.edc b/data/themes/ephoto/bits/scrollpane.edc new file mode 100644 index 0000000..c6e5b28 --- /dev/null +++ b/data/themes/ephoto/bits/scrollpane.edc @@ -0,0 +1,36 @@ +group +{ + name: "/ephoto/scrollpane"; + data + { + item: "inset" 3; + } + parts + { + part + { + name: "background"; + mouse_events: 0; + type: IMAGE; + description + { + state: "default" 0.0; + rel1 + { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 + { + relative: 1.0 1.0; + offset: -1 -1; + } + image + { + normal: "scrollpane_bg.png"; + border: 8 8 8 8; + } + } + } + } +} diff --git a/data/themes/ephoto/bits/seeker.edc b/data/themes/ephoto/bits/seeker.edc new file mode 100644 index 0000000..3119810 --- /dev/null +++ b/data/themes/ephoto/bits/seeker.edc @@ -0,0 +1,196 @@ +group +{ + name: "/ephoto/hseeker"; + parts + { + part + { + name: "line"; + description + { + max: 99999 7; + state: "default" 0.0; + image + { + normal: "seeker_bg.png"; + border: 3 3 3 3; + } + } + } + + part { + name: "slider_p1"; + type: RECT; + mouse_events: 1; + + description { + state: "default" 0.0; + color: 251 232 78 128; + + rel2 { + to: "dragable.slider"; + relative: 0.0 1.0; offset: -1 -1; + } + } + } + + + part { + name: "slider_p2"; + type: RECT; + mouse_events: 1; + + description { + state: "default" 0.0; + color: 231 93 7 128; + + rel1 { + to: "dragable.slider"; + relative: 1.0 0.0; offset: 0 0; + } + } + } + + /* part { + name: "test"; + + description { + state: "default" 0.0; + min: 26 14; + max: 26 14; + + color: 108 67 1 128; + } + } + */ + + part { + name: "confine_area"; + type: RECT; + mouse_events: 0; + + description { + state: "default" 0.0; + max: 99999 5; + + rel1 { to: "line"; relative: 0.0 0.0; offset: 1 0; } + rel2 { to: "line"; relative: 1.0 1.0; offset: -1 -1; } + + color: 166 166 166 128; + } + } + +part { + name: "dragable.slider"; + type: RECT; + mouse_events: 0; + + dragable { + x: 1 1 0; + y: 0 0 0; + confine: "confine_area"; + } + + description { + state: "default" 0.0; + min: 26 14; + max: 26 14; + + rel1 { to: "line"; relative: 0.5 0.5; offset: 0 0; } + rel2 { to: "line"; relative: 0.5 0.5; offset: 0 0; } + + color: 255 0 0 128; + } +} + + } + + programs + { + +# ifdef PROG +# undef PROG +# endif + +#define PROG(NAME,SIGNAL,SRC,ACT,TARGET)\ +program {\ + name: NAME;\ + signal: SIGNAL;\ + source: SRC;\ + action: ACT;\ + target: TARGET;\ +} + +PROG("slider+", "mouse,in", "slider_p2", DRAG_VAL_PAGE 1.0 0.0, "dragable.slider") +PROG("slider-", "mouse,in", "slider_p1", DRAG_VAL_PAGE -1.0 0.0, "dragable.slider") + + } +} + +group +{ + name: "/ephoto/hseeker/button"; + min: 26 14; + + parts + { + part + { + name: "drag"; + description + { + state: "default" 0.0; + min: 26 14; + max: 26 14; + fixed: 1 1; + image + { + normal: "seeker.png"; + // image is of fixed size no need to do any border scaling + //border: 8 8 8 8; + } + fill + { + smooth: 0; + } + } + description + { + state: "highlight" 0.0; + inherit: "default" 0.0; + min: 26 14; + max: 26 14; + image + { + normal: "seeker_h.png"; + // image is of fixed size no need to do any border scaling + //border: 8 8 8 8; + } + fill + { + smooth: 0; + } + } + } + } + programs + { + program + { + name: "highlight"; + signal: "mouse,in"; + source: "EWL"; + action: STATE_SET "highlight" 0.0; + target: "drag"; + } + program + { + name: "un-highlight"; + signal: "mouse,out"; + source: "EWL"; + action: STATE_SET "default" 0.0; + target: "drag"; + } + } +} + diff --git a/data/themes/ephoto/bits/select.edc b/data/themes/ephoto/bits/select.edc new file mode 100644 index 0000000..3e24159 --- /dev/null +++ b/data/themes/ephoto/bits/select.edc @@ -0,0 +1,89 @@ +group +{ + name: "/ephoto/select"; + parts + { + part + { + name: "selection"; + type: RECT; + mouse_events: 1; + description + { + state: "default" 0.0; + color: 0 0 0 0; + visible: 0; + } + description + { + state: "selected" 0.0; + color: 71 135 195 255; + visible: 1; + } + } + } + programs + { + program + { + name: "select"; + signal: "selected"; + source: "*"; + action: STATE_SET "selected" 0.0; + target: "selection"; + } + program + { + name: "unselect"; + signal: "unselected"; + source: "*"; + action: STATE_SET "default" 0.0; + target: "selection"; + } + } +} + +group +{ + name: "/ephoto/select/highlight"; + parts + { + part + { + name: "highlight"; + type: RECT; + mouse_events: 1; + description + { + state: "default" 0.0; + color: 0 0 0 0; + visible: 0; + } + description + { + state: "highlighted" 0.0; + color: 71 135 195 255; + visible: 1; + } + } + } + programs + { + program + { + name: "highlighted"; + signal: "mouse,in"; + source: "*"; + action: STATE_SET "highlighted" 0.0; + target: "highlight"; + } + program + { + name: "default"; + signal: "mouse,out"; + source: "*"; + action: STATE_SET "default" 0.0; + target: "highlight"; + } + } +} diff --git a/data/themes/ephoto/bits/separator.edc b/data/themes/ephoto/bits/separator.edc new file mode 100644 index 0000000..7b756af --- /dev/null +++ b/data/themes/ephoto/bits/separator.edc @@ -0,0 +1,80 @@ +group +{ + name: "/ephoto/hseparator"; + min: 6 2; + max: 10000 2; + + parts + { + part + { + name: "separator"; + mouse_events: 0; + description + { + state: "default" 0.0; + min: 20 2; + rel1 + { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 + { + relative: 1.0 1.0; + offset: -1 -1; + } + image + { + normal: "hseparator.png"; + border: 1 1 1 1; + } + fill + { + smooth: 0; + } + } + } + } +} + +group +{ + name: "/ephoto/vseparator"; + min: 2 6; + max: 2 10000; + + parts + { + part + { + name: "separator"; + mouse_events: 0; + description + { + state: "default" 0.0; + min: 2 20; + rel1 + { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 + { + relative: 1.0 1.0; + offset: -1 -1; + } + image + { + normal: "vseparator.png"; + border: 1 1 1 1; + } + fill + { + smooth: 0; + } + } + } + } +} + diff --git a/data/themes/ephoto/bits/shadow.edc b/data/themes/ephoto/bits/shadow.edc new file mode 100644 index 0000000..ce64e7f --- /dev/null +++ b/data/themes/ephoto/bits/shadow.edc @@ -0,0 +1,41 @@ +group +{ + name: "/ephoto/shadow"; + data + { + item: "inset" 4; + item: "pad" 2; + } + parts + { + part + { + name: "shadow"; + type: IMAGE; + mouse_events: 0; + description + { + state: "default" 0.0; + rel1 + { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 + { + relative: 1.0 1.0; + offset: -1 -1; + } + image + { + normal: "shadow.png"; + } + fill + { + smooth: 0; + } + } + } + } +} + diff --git a/data/themes/ephoto/bits/spacer.edc b/data/themes/ephoto/bits/spacer.edc new file mode 100644 index 0000000..48e67e5 --- /dev/null +++ b/data/themes/ephoto/bits/spacer.edc @@ -0,0 +1,30 @@ +group +{ + name: "/ephoto/spacer"; + + parts + { + part + { + name: "base"; + type: RECT; + + description + { + state: "default" 0.0; + rel1 + { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 + { + relative: 1.0 1.0; + offset: -1 -1; + } + color: 0 0 0 0; + } + } + } +} + diff --git a/data/themes/ephoto/bits/text.edc b/data/themes/ephoto/bits/text.edc new file mode 100644 index 0000000..e69de29 diff --git a/data/themes/ephoto/bits/tree.edc b/data/themes/ephoto/bits/tree.edc new file mode 100644 index 0000000..8c1a818 --- /dev/null +++ b/data/themes/ephoto/bits/tree.edc @@ -0,0 +1,45 @@ +group +{ + name: "/ephoto/row"; + data + { + item: "inset" 3; + } + parts + { + part + { + name: "background"; + type: RECT; + description + { + state: "even" 0.0; + color: 238 238 238 255; + } + description + { + state: "odd" 0.0; + color: 255 255 255 255; + } + } + } + programs + { + program + { + name: "even"; + signal: "even"; + source: "*"; + action: STATE_SET "even" 0.0; + target: "background"; + } + program + { + name: "odd"; + signal: "odd"; + source: "*"; + action: STATE_SET "odd" 0.0; + target: "background"; + } + } +} diff --git a/data/themes/ephoto/bits/window.edc b/data/themes/ephoto/bits/window.edc new file mode 100644 index 0000000..87b2197 --- /dev/null +++ b/data/themes/ephoto/bits/window.edc @@ -0,0 +1,32 @@ +group +{ + name: "/ephoto/window"; + data + { + item: "inset" 1; + } + parts + { + part + { + name: "background"; + mouse_events: 0; + type: RECT; + description + { + state: "default" 0.0; + rel1 + { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 + { + relative: 1.0 1.0; + offset: -1 -1; + } + color: 237 233 227 255; + } + } + } +} diff --git a/data/themes/ephoto/fonts/AUTHORS b/data/themes/ephoto/fonts/AUTHORS new file mode 100644 index 0000000..f430509 --- /dev/null +++ b/data/themes/ephoto/fonts/AUTHORS @@ -0,0 +1,32 @@ +Adrian Schroeter +Andrey Valentinovich Panov +Ben Laenen +Bhikkhu Pesala +Dafydd Harries +Danilo Segan +David Jez +David Lawrence Ramsey +Denis Jacquerye +Dwayne Bailey +Eugeniy Meshcheryakov +Gee Fung Sit +Heikki Lindroos +James Cloos +James Crippen +Keenan Pepper +Lars Naesbye Christensen +Mashrab Kuvatov +Mederic Boquien +Misu Moldovan +Ognyan Kulev +Ondrej Koala Vacha +Peter Cernak +Remy Oudompheng +Sander Vesik +Stepan Roh +Tavmjong Bah +Tim May +Valentin Stoykov +Vasek Stodulka + +$Id$ diff --git a/data/themes/ephoto/fonts/DejaVuSansMono-Bold.ttf b/data/themes/ephoto/fonts/DejaVuSansMono-Bold.ttf new file mode 100644 index 0000000..7ad0ca1 Binary files /dev/null and b/data/themes/ephoto/fonts/DejaVuSansMono-Bold.ttf differ diff --git a/data/themes/ephoto/fonts/DejaVuSansMono-BoldOblique.ttf b/data/themes/ephoto/fonts/DejaVuSansMono-BoldOblique.ttf new file mode 100644 index 0000000..5de6a43 Binary files /dev/null and b/data/themes/ephoto/fonts/DejaVuSansMono-BoldOblique.ttf differ diff --git a/data/themes/ephoto/fonts/DejaVuSansMono-Oblique.ttf b/data/themes/ephoto/fonts/DejaVuSansMono-Oblique.ttf new file mode 100644 index 0000000..f735f9c Binary files /dev/null and b/data/themes/ephoto/fonts/DejaVuSansMono-Oblique.ttf differ diff --git a/data/themes/ephoto/fonts/DejaVuSansMono.ttf b/data/themes/ephoto/fonts/DejaVuSansMono.ttf new file mode 100644 index 0000000..8ac1a25 Binary files /dev/null and b/data/themes/ephoto/fonts/DejaVuSansMono.ttf differ diff --git a/data/themes/ephoto/fonts/DejaVuSerif-Bold.ttf b/data/themes/ephoto/fonts/DejaVuSerif-Bold.ttf new file mode 100644 index 0000000..4524da6 Binary files /dev/null and b/data/themes/ephoto/fonts/DejaVuSerif-Bold.ttf differ diff --git a/data/themes/ephoto/fonts/DejaVuSerif-BoldOblique.ttf b/data/themes/ephoto/fonts/DejaVuSerif-BoldOblique.ttf new file mode 100644 index 0000000..cbb08cc Binary files /dev/null and b/data/themes/ephoto/fonts/DejaVuSerif-BoldOblique.ttf differ diff --git a/data/themes/ephoto/fonts/DejaVuSerif-Oblique.ttf b/data/themes/ephoto/fonts/DejaVuSerif-Oblique.ttf new file mode 100644 index 0000000..06a9c85 Binary files /dev/null and b/data/themes/ephoto/fonts/DejaVuSerif-Oblique.ttf differ diff --git a/data/themes/ephoto/fonts/DejaVuSerif.ttf b/data/themes/ephoto/fonts/DejaVuSerif.ttf new file mode 100644 index 0000000..94da611 Binary files /dev/null and b/data/themes/ephoto/fonts/DejaVuSerif.ttf differ diff --git a/data/themes/ephoto/fonts/LICENSE b/data/themes/ephoto/fonts/LICENSE new file mode 100644 index 0000000..56db9c0 --- /dev/null +++ b/data/themes/ephoto/fonts/LICENSE @@ -0,0 +1,98 @@ +Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. Glyphs imported from Arev fonts are (c) Tavmjung Bah (see below) + +Bitstream Vera Fonts Copyright +------------------------------ + +Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is +a trademark of Bitstream, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of the fonts accompanying this license ("Fonts") and associated +documentation files (the "Font Software"), to reproduce and distribute the +Font Software, including without limitation the rights to use, copy, merge, +publish, distribute, and/or sell copies of the Font Software, and to permit +persons to whom the Font Software is furnished to do so, subject to the +following conditions: + +The above copyright and trademark notices and this permission notice shall +be included in all copies of one or more of the Font Software typefaces. + +The Font Software may be modified, altered, or added to, and in particular +the designs of glyphs or characters in the Fonts may be modified and +additional glyphs or characters may be added to the Fonts, only if the fonts +are renamed to names not containing either the words "Bitstream" or the word +"Vera". + +This License becomes null and void to the extent applicable to Fonts or Font +Software that has been modified and is distributed under the "Bitstream +Vera" names. + +The Font Software may be sold as part of a larger software package but no +copy of one or more of the Font Software typefaces may be sold by itself. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME +FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING +ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE +FONT SOFTWARE. + +Except as contained in this notice, the names of Gnome, the Gnome +Foundation, and Bitstream Inc., shall not be used in advertising or +otherwise to promote the sale, use or other dealings in this Font Software +without prior written authorization from the Gnome Foundation or Bitstream +Inc., respectively. For further information, contact: fonts at gnome dot +org. + +Arev Fonts Copyright +------------------------------ + +Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of the fonts accompanying this license ("Fonts") and +associated documentation files (the "Font Software"), to reproduce +and distribute the modifications to the Bitstream Vera Font Software, +including without limitation the rights to use, copy, merge, publish, +distribute, and/or sell copies of the Font Software, and to permit +persons to whom the Font Software is furnished to do so, subject to +the following conditions: + +The above copyright and trademark notices and this permission notice +shall be included in all copies of one or more of the Font Software +typefaces. + +The Font Software may be modified, altered, or added to, and in +particular the designs of glyphs or characters in the Fonts may be +modified and additional glyphs or characters may be added to the +Fonts, only if the fonts are renamed to names not containing either +the words "Tavmjong Bah" or the word "Arev". + +This License becomes null and void to the extent applicable to Fonts +or Font Software that has been modified and is distributed under the +"Tavmjong Bah Arev" names. + +The Font Software may be sold as part of a larger software package but +no copy of one or more of the Font Software typefaces may be sold by +itself. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL +TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +Except as contained in this notice, the name of Tavmjong Bah shall not +be used in advertising or otherwise to promote the sale, use or other +dealings in this Font Software without prior written authorization +from Tavmjong Bah. For further information, contact: tavmjong @ free +. fr. + +$Id$ diff --git a/data/themes/ephoto/fonts/Makefile.am b/data/themes/ephoto/fonts/Makefile.am new file mode 100644 index 0000000..e2b82dc --- /dev/null +++ b/data/themes/ephoto/fonts/Makefile.am @@ -0,0 +1,13 @@ +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = \ +AUTHORS \ +LICENSE \ +DejaVuSerif-Bold.ttf \ +DejaVuSerif-Oblique.ttf \ +DejaVuSerif-BoldOblique.ttf \ +DejaVuSerif.ttf \ +DejaVuSansMono-Bold.ttf \ +DejaVuSansMono-Oblique.ttf \ +DejaVuSansMono-BoldOblique.ttf \ +DejaVuSansMono.ttf diff --git a/data/themes/ephoto/images/Makefile.am b/data/themes/ephoto/images/Makefile.am new file mode 100644 index 0000000..611752a --- /dev/null +++ b/data/themes/ephoto/images/Makefile.am @@ -0,0 +1,26 @@ +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = \ +button_clicked.png \ +button.png \ +combo_arrows.png \ +entry.png \ +images.edc \ +scrollpane_bg.png \ +sf_barh1_h.png \ +sf_barh1.png \ +sf_barh_thumb.png \ +sf_barv1_h.png \ +sf_barv1.png \ +sf_barv_thumb.png \ +sf_btd1d.png \ +sf_btd1.png \ +sf_btl1d.png \ +sf_btl1.png \ +sf_btr1d.png \ +sf_btr1.png \ +sf_btu1d.png \ +sf_btu1.png \ +sf_hb_runner.png \ +sf_vb_runner.png + diff --git a/data/themes/ephoto/images/button.png b/data/themes/ephoto/images/button.png new file mode 100644 index 0000000..13bfc28 Binary files /dev/null and b/data/themes/ephoto/images/button.png differ diff --git a/data/themes/ephoto/images/button_clicked.png b/data/themes/ephoto/images/button_clicked.png new file mode 100644 index 0000000..22fca3e Binary files /dev/null and b/data/themes/ephoto/images/button_clicked.png differ diff --git a/data/themes/ephoto/images/combo_arrows.png b/data/themes/ephoto/images/combo_arrows.png new file mode 100644 index 0000000..09e3a35 Binary files /dev/null and b/data/themes/ephoto/images/combo_arrows.png differ diff --git a/data/themes/ephoto/images/entry.png b/data/themes/ephoto/images/entry.png new file mode 100644 index 0000000..fb487a3 Binary files /dev/null and b/data/themes/ephoto/images/entry.png differ diff --git a/data/themes/ephoto/images/entry_focus.png b/data/themes/ephoto/images/entry_focus.png new file mode 100644 index 0000000..9a17803 Binary files /dev/null and b/data/themes/ephoto/images/entry_focus.png differ diff --git a/data/themes/ephoto/images/hseparator.png b/data/themes/ephoto/images/hseparator.png new file mode 100644 index 0000000..dc60079 Binary files /dev/null and b/data/themes/ephoto/images/hseparator.png differ diff --git a/data/themes/ephoto/images/images.edc b/data/themes/ephoto/images/images.edc new file mode 100644 index 0000000..c134fa3 --- /dev/null +++ b/data/themes/ephoto/images/images.edc @@ -0,0 +1,31 @@ +images +{ + image: "button.png" COMP; + image: "button_clicked.png" COMP; + image: "combo_arrows.png" COMP; + image: "entry.png" COMP; + image: "entry_focus.png" COMP; + image: "hseparator.png" COMP; + image: "scrollpane_bg.png" COMP; + image: "seeker_bg.png" COMP; + image: "seeker.png" COMP; + image: "seeker_h.png" COMP; + image: "sf_barh1.png" COMP; + image: "sf_barh1_h.png" COMP; + image: "sf_barh_thumb.png" COMP; + image: "sf_btl1.png" COMP; + image: "sf_btl1d.png" COMP; + image: "sf_btr1.png" COMP; + image: "sf_btr1d.png" COMP; + image: "sf_hb_runner.png" COMP; + image: "sf_barv1.png" COMP; + image: "sf_barv1_h.png" COMP; + image: "sf_barv_thumb.png" COMP; + image: "sf_btd1.png" COMP; + image: "sf_btd1d.png" COMP; + image: "sf_btu1.png" COMP; + image: "sf_btu1d.png" COMP; + image: "sf_vb_runner.png" COMP; + image: "shadow.png" COMP; + image: "vseparator.png" COMP; +} diff --git a/data/themes/ephoto/images/scrollpane_bg.png b/data/themes/ephoto/images/scrollpane_bg.png new file mode 100644 index 0000000..fb487a3 Binary files /dev/null and b/data/themes/ephoto/images/scrollpane_bg.png differ diff --git a/data/themes/ephoto/images/seeker.png b/data/themes/ephoto/images/seeker.png new file mode 100644 index 0000000..4955ffa Binary files /dev/null and b/data/themes/ephoto/images/seeker.png differ diff --git a/data/themes/ephoto/images/seeker_bg.png b/data/themes/ephoto/images/seeker_bg.png new file mode 100644 index 0000000..882f695 Binary files /dev/null and b/data/themes/ephoto/images/seeker_bg.png differ diff --git a/data/themes/ephoto/images/seeker_h.png b/data/themes/ephoto/images/seeker_h.png new file mode 100644 index 0000000..bb04606 Binary files /dev/null and b/data/themes/ephoto/images/seeker_h.png differ diff --git a/data/themes/ephoto/images/sf_barh1.png b/data/themes/ephoto/images/sf_barh1.png new file mode 100644 index 0000000..16820d2 Binary files /dev/null and b/data/themes/ephoto/images/sf_barh1.png differ diff --git a/data/themes/ephoto/images/sf_barh1_h.png b/data/themes/ephoto/images/sf_barh1_h.png new file mode 100644 index 0000000..0f7d9ce Binary files /dev/null and b/data/themes/ephoto/images/sf_barh1_h.png differ diff --git a/data/themes/ephoto/images/sf_barh_thumb.png b/data/themes/ephoto/images/sf_barh_thumb.png new file mode 100644 index 0000000..99fdecd Binary files /dev/null and b/data/themes/ephoto/images/sf_barh_thumb.png differ diff --git a/data/themes/ephoto/images/sf_barv1.png b/data/themes/ephoto/images/sf_barv1.png new file mode 100644 index 0000000..7a984a0 Binary files /dev/null and b/data/themes/ephoto/images/sf_barv1.png differ diff --git a/data/themes/ephoto/images/sf_barv1_h.png b/data/themes/ephoto/images/sf_barv1_h.png new file mode 100644 index 0000000..92d442a Binary files /dev/null and b/data/themes/ephoto/images/sf_barv1_h.png differ diff --git a/data/themes/ephoto/images/sf_barv_thumb.png b/data/themes/ephoto/images/sf_barv_thumb.png new file mode 100644 index 0000000..f93ec48 Binary files /dev/null and b/data/themes/ephoto/images/sf_barv_thumb.png differ diff --git a/data/themes/ephoto/images/sf_btd1.png b/data/themes/ephoto/images/sf_btd1.png new file mode 100644 index 0000000..7f5ed76 Binary files /dev/null and b/data/themes/ephoto/images/sf_btd1.png differ diff --git a/data/themes/ephoto/images/sf_btd1d.png b/data/themes/ephoto/images/sf_btd1d.png new file mode 100644 index 0000000..591b15c Binary files /dev/null and b/data/themes/ephoto/images/sf_btd1d.png differ diff --git a/data/themes/ephoto/images/sf_btl1.png b/data/themes/ephoto/images/sf_btl1.png new file mode 100644 index 0000000..4b63bbf Binary files /dev/null and b/data/themes/ephoto/images/sf_btl1.png differ diff --git a/data/themes/ephoto/images/sf_btl1d.png b/data/themes/ephoto/images/sf_btl1d.png new file mode 100644 index 0000000..906ec4f Binary files /dev/null and b/data/themes/ephoto/images/sf_btl1d.png differ diff --git a/data/themes/ephoto/images/sf_btr1.png b/data/themes/ephoto/images/sf_btr1.png new file mode 100644 index 0000000..0472767 Binary files /dev/null and b/data/themes/ephoto/images/sf_btr1.png differ diff --git a/data/themes/ephoto/images/sf_btr1d.png b/data/themes/ephoto/images/sf_btr1d.png new file mode 100644 index 0000000..0ad8566 Binary files /dev/null and b/data/themes/ephoto/images/sf_btr1d.png differ diff --git a/data/themes/ephoto/images/sf_btu1.png b/data/themes/ephoto/images/sf_btu1.png new file mode 100644 index 0000000..f7ab2d4 Binary files /dev/null and b/data/themes/ephoto/images/sf_btu1.png differ diff --git a/data/themes/ephoto/images/sf_btu1d.png b/data/themes/ephoto/images/sf_btu1d.png new file mode 100644 index 0000000..08a71c2 Binary files /dev/null and b/data/themes/ephoto/images/sf_btu1d.png differ diff --git a/data/themes/ephoto/images/sf_hb_runner.png b/data/themes/ephoto/images/sf_hb_runner.png new file mode 100644 index 0000000..9a529fa Binary files /dev/null and b/data/themes/ephoto/images/sf_hb_runner.png differ diff --git a/data/themes/ephoto/images/sf_vb_runner.png b/data/themes/ephoto/images/sf_vb_runner.png new file mode 100644 index 0000000..748db42 Binary files /dev/null and b/data/themes/ephoto/images/sf_vb_runner.png differ diff --git a/data/themes/ephoto/images/shadow.png b/data/themes/ephoto/images/shadow.png new file mode 100644 index 0000000..029d2c7 Binary files /dev/null and b/data/themes/ephoto/images/shadow.png differ diff --git a/data/themes/ephoto/images/vseparator.png b/data/themes/ephoto/images/vseparator.png new file mode 100644 index 0000000..2790f74 Binary files /dev/null and b/data/themes/ephoto/images/vseparator.png differ diff --git a/data/themes/ephoto/main.edc b/data/themes/ephoto/main.edc new file mode 100644 index 0000000..ef3b844 --- /dev/null +++ b/data/themes/ephoto/main.edc @@ -0,0 +1,69 @@ +#include "images/images.edc" + +fonts +{ + font, "fonts/DejaVuSerif.ttf" "ewl/default"; + font, "fonts/DejaVuSerif-Bold.ttf" "ewl/default/bold"; + font, "fonts/DejaVuSerif-Oblique.ttf" "ewl/default/italic"; + font, "fonts/DejaVuSerif-BoldOblique.ttf" "ewl/default/bold-italic"; + font, "fonts/DejaVuSansMono.ttf" "ewl/monospace"; + font, "fonts/DejaVuSansMono-Bold.ttf" "ewl/monospace/bold"; + font, "fonts/DejaVuSansMono-Oblique.ttf" "ewl/monospace/italic"; + font, "fonts/DejaVuSansMono-BoldOblique.ttf" "ewl/monospace/bold-italic"; +} + + +collections +{ +#include "bits/button.edc" +#include "bits/combo.edc" +#include "bits/entry.edc" +#include "bits/label.edc" +#include "bits/scrollbar.edc" +#include "bits/scrollpane.edc" +#include "bits/seeker.edc" +#include "bits/select.edc" +#include "bits/separator.edc" +#include "bits/shadow.edc" +#include "bits/spacer.edc" +#include "bits/tree.edc" +#include "bits/window.edc" +} + +data +{ + item: "/button/group" "/ephoto/button"; + item: "/combo/group" "/ephoto/combo"; + item: "/combo/button/group" "/ephoto/combo/button"; + item: "/combo/cell/group" "/ephoto/combo/contents"; + item: "/combo/popup/group" "/ephoto/combo/popup"; + item: "/combo/popup/vbox/cell/group" "/ephoto/select/highlight"; + item: "/entry/group" "/ephoto/entry"; + item: "/entry/cursor/group" "/ephoto/entry/cursor"; + item: "/freebox/auto/padding" 16; + item: "/hscrollbar/decrement/group" "/ephoto/hscrollbar/decrement"; + item: "/hscrollbar/increment/group" "/ephoto/hscrollbar/increment"; + item: "/hscrollbar/hseeker/group" "/ephoto/hrunner"; + item: "/hscrollbar/hseeker/hbutton/group" "/ephoto/hscrollbar"; + item: "/hseeker/group" "/ephoto/hseeker"; + item: "/hseeker/hbutton/group" "/ephoto/hseeker/button"; + item: "/hseparator/group" "/ephoto/hseparator"; + item: "/icon/group" "/ephoto/select"; + item: "/image_thumbnail/group" "/ephoto/select"; + item: "/label/group" "/ephoto/label"; + item: "/label/textpart" "/ephoto/label/text"; + item: "/row/group" "/ephoto/row"; + item: "/scrollpane/group" "/ephoto/scrollpane"; + item: "/shadow/group" "/ephoto/shadow"; + item: "/spacer/group" "/ephoto/spacer"; + item: "/text/color/a" 255; + item: "/text/font" "ewl/default"; + item: "/text/font_size" 10; + item: "/text/style" "none"; + item: "/vscrollbar/decrement/group" "/ephoto/vscrollbar/decrement"; + item: "/vscrollbar/increment/group" "/ephoto/vscrollbar/increment"; + item: "/vseeker/group" "/ephoto/vrunner"; + item: "/vseeker/vbutton/group" "/ephoto/vscrollbar"; + item: "/vseparator/group" "/ephoto/vseparator"; + item: "/window/group" "/ephoto/window"; +} diff --git a/ephoto.spec.in b/ephoto.spec.in new file mode 100644 index 0000000..415f2c3 --- /dev/null +++ b/ephoto.spec.in @@ -0,0 +1,44 @@ +Summary: ephoto +Name: @PACKAGE@ +Version: @VERSION@ +Release: 0.%(date '+%Y%m%d') +License: BSD +Group: Applications/Multimedia +URL: http://www.ecoding.org +Source: %{name}-%{version}.tar.gz +Packager: %{?_packager:%{_packager}}%{!?_packager:Stephen Houston } +Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:Ecoding Project (http://www.ecoding.org/)} +Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}} +#BuildSuggests: xorg-x11-devel +BuildRequires: evas-devel ecore-devel ewl-devel epsilon-devel emotion-devel sqlite3 +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +ephoto + +%prep +%setup -q + +%build +%{configure} --prefix=%{_prefix} +%{__make} %{?_smp_mflags} %{?mflags} + +%install +%{__make} %{?mflags_install} DESTDIR=$RPM_BUILD_ROOT install + +%clean +test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT + +%post +/sbin/ldconfig + +%postun +/sbin/ldconfig + +%files +%defattr(-, root, root) +%doc AUTHORS ChangeLog COPYING COPYING.icons README +%{_bindir}/* +%{_datadir}/* + +%changelog diff --git a/m4/ac_expand_dir.m4 b/m4/ac_expand_dir.m4 new file mode 100644 index 0000000..b5599a0 --- /dev/null +++ b/m4/ac_expand_dir.m4 @@ -0,0 +1,14 @@ +dnl AC_EXPAND_DIR(VARNAME, DIR) +dnl expands occurrences of ${prefix} and ${exec_prefix} in the given DIR, +dnl and assigns the resulting string to VARNAME +dnl example: AC_DEFINE_DIR(DATADIR, "$datadir") +dnl by Alexandre Oliva +AC_DEFUN([AC_EXPAND_DIR], [ + $1=$2 + $1=`( + test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" + eval echo \""[$]$1"\" + )` +]) + diff --git a/m4/ac_path_generic.m4 b/m4/ac_path_generic.m4 new file mode 100644 index 0000000..b7a2c13 --- /dev/null +++ b/m4/ac_path_generic.m4 @@ -0,0 +1,138 @@ +dnl @synopsis AC_PATH_GENERIC(LIBRARY [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl +dnl Runs a LIBRARY-config script and defines LIBRARY_CFLAGS and LIBRARY_LIBS +dnl +dnl The script must support `--cflags' and `--libs' args. +dnl If MINIMUM-VERSION is specified, the script must also support the +dnl `--version' arg. +dnl If the `--with-library-[exec-]prefix' arguments to ./configure are given, +dnl it must also support `--prefix' and `--exec-prefix'. +dnl (In other words, it must be like gtk-config.) +dnl +dnl For example: +dnl +dnl AC_PATH_GENERIC(Foo, 1.0.0) +dnl +dnl would run `foo-config --version' and check that it is at least 1.0.0 +dnl +dnl If so, the following would then be defined: +dnl +dnl FOO_CFLAGS to `foo-config --cflags` +dnl FOO_LIBS to `foo-config --libs` +dnl +dnl At present there is no support for additional "MODULES" (see AM_PATH_GTK) +dnl (shamelessly stolen from gtk.m4 and then hacked around a fair amount) +dnl +dnl @author Angus Lees + +AC_DEFUN([AC_PATH_GENERIC], +[dnl +dnl we're going to need uppercase, lowercase and user-friendly versions of the +dnl string `LIBRARY' +pushdef([UP], translit([$1], [a-z], [A-Z]))dnl +pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl + +dnl +dnl Get the cflags and libraries from the LIBRARY-config script +dnl +AC_ARG_WITH(DOWN-prefix, + [ --with-]DOWN[-prefix=PFX Prefix where $1 is installed (optional)], + DOWN[]_config_prefix="$withval", DOWN[]_config_prefix="") +AC_ARG_WITH(DOWN-exec-prefix, + [ --with-]DOWN[-exec-prefix=PFX Exec prefix where $1 is installed (optional)], + DOWN[]_config_exec_prefix="$withval", DOWN[]_config_exec_prefix="") + + if test x$DOWN[]_config_exec_prefix != x ; then + DOWN[]_config_args="$DOWN[]_config_args --exec-prefix=$DOWN[]_config_exec_prefix" + if test x${UP[]_CONFIG+set} != xset ; then + UP[]_CONFIG=$DOWN[]_config_exec_prefix/bin/DOWN-config + fi + fi + if test x$DOWN[]_config_prefix != x ; then + DOWN[]_config_args="$DOWN[]_config_args --prefix=$DOWN[]_config_prefix" + if test x${UP[]_CONFIG+set} != xset ; then + UP[]_CONFIG=$DOWN[]_config_prefix/bin/DOWN-config + fi + fi + + AC_PATH_PROG(UP[]_CONFIG, DOWN-config, no) + ifelse([$2], , + AC_MSG_CHECKING(for $1), + AC_MSG_CHECKING(for $1 - version >= $2) + ) + no_[]DOWN="" + if test "$UP[]_CONFIG" = "no" ; then + no_[]DOWN=yes + else + UP[]_CFLAGS="`$UP[]_CONFIG $DOWN[]_config_args --cflags`" + UP[]_LIBS="`$UP[]_CONFIG $DOWN[]_config_args --libs`" + ifelse([$2], , ,[ + DOWN[]_config_major_version=`$UP[]_CONFIG $DOWN[]_config_args \ + --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\1/'` + DOWN[]_config_minor_version=`$UP[]_CONFIG $DOWN[]_config_args \ + --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\2/'` + DOWN[]_config_micro_version=`$UP[]_CONFIG $DOWN[]_config_args \ + --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\3/'` + DOWN[]_wanted_major_version="regexp($2, [\<\([0-9]*\)], [\1])" + DOWN[]_wanted_minor_version="regexp($2, [\<\([0-9]*\)\.\([0-9]*\)], [\2])" + DOWN[]_wanted_micro_version="regexp($2, [\<\([0-9]*\).\([0-9]*\).\([0-9]*\)], [\3])" + + # Compare wanted version to what config script returned. + # If I knew what library was being run, i'd probably also compile + # a test program at this point (which also extracted and tested + # the version in some library-specific way) + if test "$DOWN[]_config_major_version" -lt \ + "$DOWN[]_wanted_major_version" \ + -o \( "$DOWN[]_config_major_version" -eq \ + "$DOWN[]_wanted_major_version" \ + -a "$DOWN[]_config_minor_version" -lt \ + "$DOWN[]_wanted_minor_version" \) \ + -o \( "$DOWN[]_config_major_version" -eq \ + "$DOWN[]_wanted_major_version" \ + -a "$DOWN[]_config_minor_version" -eq \ + "$DOWN[]_wanted_minor_version" \ + -a "$DOWN[]_config_micro_version" -lt \ + "$DOWN[]_wanted_micro_version" \) ; then + # older version found + no_[]DOWN=yes + echo -n "*** An old version of $1 " + echo -n "($DOWN[]_config_major_version" + echo -n ".$DOWN[]_config_minor_version" + echo ".$DOWN[]_config_micro_version) was found." + echo -n "*** You need a version of $1 newer than " + echo -n "$DOWN[]_wanted_major_version" + echo -n ".$DOWN[]_wanted_minor_version" + echo ".$DOWN[]_wanted_micro_version." + echo "***" + echo "*** If you have already installed a sufficiently new version, this error" + echo "*** probably means that the wrong copy of the DOWN-config shell script is" + echo "*** being found. The easiest way to fix this is to remove the old version" + echo "*** of $1, but you can also set the UP[]_CONFIG environment to point to the" + echo "*** correct copy of DOWN-config. (In this case, you will have to" + echo "*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf" + echo "*** so that the correct libraries are found at run-time)" + fi + ]) + fi + if test "x$no_[]DOWN" = x ; then + AC_MSG_RESULT(yes) + ifelse([$3], , :, [$3]) + else + AC_MSG_RESULT(no) + if test "$UP[]_CONFIG" = "no" ; then + echo "*** The DOWN-config script installed by $1 could not be found" + echo "*** If $1 was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the UP[]_CONFIG environment variable to the" + echo "*** full path to DOWN-config." + fi + UP[]_CFLAGS="" + UP[]_LIBS="" + ifelse([$4], , :, [$4]) + fi + AC_SUBST(UP[]_CFLAGS) + AC_SUBST(UP[]_LIBS) + + popdef([UP]) + popdef([DOWN]) +]) + diff --git a/m4/codeset.m4 b/m4/codeset.m4 new file mode 100644 index 0000000..59535eb --- /dev/null +++ b/m4/codeset.m4 @@ -0,0 +1,23 @@ +# codeset.m4 serial AM1 (gettext-0.10.40) +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +AC_DEFUN([AM_LANGINFO_CODESET], +[ + AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, + [AC_TRY_LINK([#include ], + [char* cs = nl_langinfo(CODESET);], + am_cv_langinfo_codeset=yes, + am_cv_langinfo_codeset=no) + ]) + if test $am_cv_langinfo_codeset = yes; then + AC_DEFINE(HAVE_LANGINFO_CODESET, 1, + [Define if you have and nl_langinfo(CODESET).]) + fi +]) diff --git a/m4/gettext.m4 b/m4/gettext.m4 new file mode 100644 index 0000000..16070b4 --- /dev/null +++ b/m4/gettext.m4 @@ -0,0 +1,415 @@ +# gettext.m4 serial 20 (gettext-0.12) +dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +dnl Macro to add for using GNU gettext. + +dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). +dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The +dnl default (if it is not specified or empty) is 'no-libtool'. +dnl INTLSYMBOL should be 'external' for packages with no intl directory, +dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. +dnl If INTLSYMBOL is 'use-libtool', then a libtool library +dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, +dnl depending on --{enable,disable}-{shared,static} and on the presence of +dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library +dnl $(top_builddir)/intl/libintl.a will be created. +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext +dnl implementations (in libc or libintl) without the ngettext() function +dnl will be ignored. If NEEDSYMBOL is specified and is +dnl 'need-formatstring-macros', then GNU gettext implementations that don't +dnl support the ISO C 99 formatstring macros will be ignored. +dnl INTLDIR is used to find the intl libraries. If empty, +dnl the value `$(top_builddir)/intl/' is used. +dnl +dnl The result of the configuration is one of three cases: +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled +dnl and used. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 2) GNU gettext has been found in the system's C library. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 3) No internationalization, always use English msgid. +dnl Catalog format: none +dnl Catalog extension: none +dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. +dnl The use of .gmo is historical (it was needed to avoid overwriting the +dnl GNU format catalogs when building on a platform with an X/Open gettext), +dnl but we keep it in order not to force irrelevant filename changes on the +dnl maintainers. +dnl +AC_DEFUN([AM_GNU_GETTEXT], +[ + dnl Argument checking. + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , + [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT +])])])])]) + ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , + [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT +])])])]) + define(gt_included_intl, ifelse([$1], [external], [no], [yes])) + define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) + + AC_REQUIRE([AM_PO_SUBDIRS])dnl + ifelse(gt_included_intl, yes, [ + AC_REQUIRE([AM_INTL_SUBDIR])dnl + ]) + + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Sometimes libintl requires libiconv, so first search for libiconv. + dnl Ideally we would do this search only after the + dnl if test "$USE_NLS" = "yes"; then + dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT + dnl the configure script would need to contain the same shell code + dnl again, outside any 'if'. There are two solutions: + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not + dnl documented, we avoid it. + ifelse(gt_included_intl, yes, , [ + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + ]) + + dnl Set USE_NLS. + AM_NLS + + ifelse(gt_included_intl, yes, [ + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + ]) + LIBINTL= + LTLIBINTL= + POSUB= + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + ifelse(gt_included_intl, yes, [ + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH(included-gettext, + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + ]) + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If GNU gettext is available we use this. Else we have + dnl to fall back to GNU NLS library. + + dnl Add a version number to the cache macros. + define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) + define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) + define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) + + AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, + [AC_TRY_LINK([#include +]ifelse([$2], [need-formatstring-macros], +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +], [])[extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings;], + [bindtextdomain ("", ""); +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], + gt_cv_func_gnugettext_libc=yes, + gt_cv_func_gnugettext_libc=no)]) + + if test "$gt_cv_func_gnugettext_libc" != "yes"; then + dnl Sometimes libintl requires libiconv, so first search for libiconv. + ifelse(gt_included_intl, yes, , [ + AM_ICONV_LINK + ]) + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL + dnl even if libiconv doesn't exist. + AC_LIB_LINKFLAGS_BODY([intl]) + AC_CACHE_CHECK([for GNU gettext in libintl], + gt_cv_func_gnugettext_libintl, + [gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + dnl Now see whether libintl exists and does not depend on libiconv. + AC_TRY_LINK([#include +]ifelse([$2], [need-formatstring-macros], +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +], [])[extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias ();], + [bindtextdomain ("", ""); +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], + gt_cv_func_gnugettext_libintl=yes, + gt_cv_func_gnugettext_libintl=no) + dnl Now see whether libintl exists and depends on libiconv. + if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +]ifelse([$2], [need-formatstring-macros], +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +], [])[extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias ();], + [bindtextdomain ("", ""); +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], + [LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + gt_cv_func_gnugettext_libintl=yes + ]) + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS"]) + fi + + dnl If an already present or preinstalled GNU gettext() is found, + dnl use it. But if this macro is used in GNU gettext, and GNU + dnl gettext is already preinstalled in libintl, we update this + dnl libintl. (Cf. the install rule in intl/Makefile.in.) + if test "$gt_cv_func_gnugettext_libc" = "yes" \ + || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + dnl Reset the values set by searching for libintl. + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + ifelse(gt_included_intl, yes, [ + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + dnl GNU gettext is not found in the C library. + dnl Fall back on included GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions used to generate GNU NLS library. + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions to use GNU gettext tools. + CATOBJEXT=.gmo + fi + ]) + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + AC_DEFINE(ENABLE_NLS, 1, + [Define to 1 if translation of program messages to the user's native language + is requested.]) + else + USE_NLS=no + fi + fi + + AC_MSG_CHECKING([whether to use NLS]) + AC_MSG_RESULT([$USE_NLS]) + if test "$USE_NLS" = "yes"; then + AC_MSG_CHECKING([where the gettext function comes from]) + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if test "$gt_cv_func_gnugettext_libintl" = "yes"; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + AC_MSG_RESULT([$gt_source]) + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if test "$gt_cv_func_gnugettext_libintl" = "yes"; then + AC_MSG_CHECKING([how to link with libintl]) + AC_MSG_RESULT([$LIBINTL]) + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) + fi + + dnl For backward compatibility. Some packages may be using this. + AC_DEFINE(HAVE_GETTEXT, 1, + [Define if the GNU gettext() function is already present or preinstalled.]) + AC_DEFINE(HAVE_DCGETTEXT, 1, + [Define if the GNU dcgettext() function is already present or preinstalled.]) + fi + + dnl We need to process the po/ directory. + POSUB=po + fi + + ifelse(gt_included_intl, yes, [ + dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL + dnl to 'yes' because some of the testsuite requires it. + if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then + BUILD_INCLUDED_LIBINTL=yes + fi + + dnl Make all variables we use known to autoconf. + AC_SUBST(BUILD_INCLUDED_LIBINTL) + AC_SUBST(USE_INCLUDED_LIBINTL) + AC_SUBST(CATOBJEXT) + + dnl For backward compatibility. Some configure.ins may be using this. + nls_cv_header_intl= + nls_cv_header_libgt= + + dnl For backward compatibility. Some Makefiles may be using this. + DATADIRNAME=share + AC_SUBST(DATADIRNAME) + + dnl For backward compatibility. Some Makefiles may be using this. + INSTOBJEXT=.mo + AC_SUBST(INSTOBJEXT) + + dnl For backward compatibility. Some Makefiles may be using this. + GENCAT=gencat + AC_SUBST(GENCAT) + + dnl For backward compatibility. Some Makefiles may be using this. + if test "$USE_INCLUDED_LIBINTL" = yes; then + INTLOBJS="\$(GETTOBJS)" + fi + AC_SUBST(INTLOBJS) + + dnl Enable libtool support if the surrounding package wishes it. + INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix + AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) + ]) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLLIBS="$LIBINTL" + AC_SUBST(INTLLIBS) + + dnl Make all documented variables known to autoconf. + AC_SUBST(LIBINTL) + AC_SUBST(LTLIBINTL) + AC_SUBST(POSUB) +]) + + +dnl Checks for all prerequisites of the intl subdirectory, +dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, +dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. +AC_DEFUN([AM_INTL_SUBDIR], +[ + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AM_MKINSTALLDIRS])dnl + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + AC_REQUIRE([AC_PROG_RANLIB])dnl + AC_REQUIRE([AC_ISC_POSIX])dnl + AC_REQUIRE([AC_HEADER_STDC])dnl + AC_REQUIRE([AC_C_CONST])dnl + AC_REQUIRE([AC_C_INLINE])dnl + AC_REQUIRE([AC_TYPE_OFF_T])dnl + AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([AC_FUNC_ALLOCA])dnl + AC_REQUIRE([AC_FUNC_MMAP])dnl + AC_REQUIRE([jm_GLIBC21])dnl + AC_REQUIRE([gt_INTDIV0])dnl + AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl + AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl + AC_REQUIRE([gt_INTTYPES_PRI])dnl + + AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ +stdlib.h string.h unistd.h sys/param.h]) + AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ +geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ +strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \ +__fsetlocking]) + + AM_ICONV + AM_LANGINFO_CODESET + if test $ac_cv_header_locale_h = yes; then + AM_LC_MESSAGES + fi + + dnl intl/plural.c is generated from intl/plural.y. It requires bison, + dnl because plural.y uses bison specific features. It requires at least + dnl bison-1.26 because earlier versions generate a plural.c that doesn't + dnl compile. + dnl bison is only needed for the maintainer (who touches plural.y). But in + dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put + dnl the rule in general Makefile. Now, some people carelessly touch the + dnl files or have a broken "make" program, hence the plural.c rule will + dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not + dnl present or too old. + AC_CHECK_PROGS([INTLBISON], [bison]) + if test -z "$INTLBISON"; then + ac_verc_fail=yes + else + dnl Found it, now check the version. + AC_MSG_CHECKING([version of bison]) +changequote(<<,>>)dnl + ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) +changequote([,])dnl + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac + AC_MSG_RESULT([$ac_prog_version]) + fi + if test $ac_verc_fail = yes; then + INTLBISON=: + fi +]) + + +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) diff --git a/m4/glibc21.m4 b/m4/glibc21.m4 new file mode 100644 index 0000000..9c9f3db --- /dev/null +++ b/m4/glibc21.m4 @@ -0,0 +1,32 @@ +# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40) +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +# Test for the GNU C Library, version 2.1 or newer. +# From Bruno Haible. + +AC_DEFUN([jm_GLIBC21], + [ + AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, + ac_cv_gnu_library_2_1, + [AC_EGREP_CPP([Lucky GNU user], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif + ], + ac_cv_gnu_library_2_1=yes, + ac_cv_gnu_library_2_1=no) + ] + ) + AC_SUBST(GLIBC21) + GLIBC21="$ac_cv_gnu_library_2_1" + ] +) diff --git a/m4/iconv.m4 b/m4/iconv.m4 new file mode 100644 index 0000000..c5f3579 --- /dev/null +++ b/m4/iconv.m4 @@ -0,0 +1,103 @@ +# iconv.m4 serial AM4 (gettext-0.11.3) +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], +[ + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + + dnl Add $INCICONV to CPPFLAGS before performing the following checks, + dnl because if the user has installed libiconv and not disabled its use + dnl via --without-libiconv-prefix, he wants to use it. The first + dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. + am_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) + + AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_func_iconv=yes) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_lib_iconv=yes + am_cv_func_iconv=yes) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST(LIBICONV) + AC_SUBST(LTLIBICONV) +]) + +AC_DEFUN([AM_ICONV], +[ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL(am_cv_proto_iconv, [ + AC_TRY_COMPILE([ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif +], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([$]{ac_t:- + }[$]am_cv_proto_iconv) + AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, + [Define as const if the declaration of iconv() needs const.]) + fi +]) diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4 new file mode 100644 index 0000000..55dddcf --- /dev/null +++ b/m4/intdiv0.m4 @@ -0,0 +1,72 @@ +# intdiv0.m4 serial 1 (gettext-0.11.3) +dnl Copyright (C) 2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +AC_DEFUN([gt_INTDIV0], +[ + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + + AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], + gt_cv_int_divbyzero_sigfpe, + [ + AC_TRY_RUN([ +#include +#include + +static void +#ifdef __cplusplus +sigfpe_handler (int sig) +#else +sigfpe_handler (sig) int sig; +#endif +{ + /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ + exit (sig != SIGFPE); +} + +int x = 1; +int y = 0; +int z; +int nan; + +int main () +{ + signal (SIGFPE, sigfpe_handler); +/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ +#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) + signal (SIGTRAP, sigfpe_handler); +#endif +/* Linux/SPARC yields signal SIGILL. */ +#if defined (__sparc__) && defined (__linux__) + signal (SIGILL, sigfpe_handler); +#endif + + z = x / y; + nan = y / y; + exit (1); +} +], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, + [ + # Guess based on the CPU. + case "$host_cpu" in + alpha* | i[34567]86 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; + esac + ]) + ]) + case "$gt_cv_int_divbyzero_sigfpe" in + *yes) value=1;; + *) value=0;; + esac + AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, + [Define if integer division by zero raises signal SIGFPE.]) +]) diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4 new file mode 100644 index 0000000..fd007c3 --- /dev/null +++ b/m4/inttypes-pri.m4 @@ -0,0 +1,32 @@ +# inttypes-pri.m4 serial 1 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +# Define PRI_MACROS_BROKEN if exists and defines the PRI* +# macros to non-string values. This is the case on AIX 4.3.3. + +AC_DEFUN([gt_INTTYPES_PRI], +[ + AC_REQUIRE([gt_HEADER_INTTYPES_H]) + if test $gt_cv_header_inttypes_h = yes; then + AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], + gt_cv_inttypes_pri_broken, + [ + AC_TRY_COMPILE([#include +#ifdef PRId32 +char *p = PRId32; +#endif +], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) + ]) + fi + if test "$gt_cv_inttypes_pri_broken" = yes; then + AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, + [Define if exists and defines unusable PRI* macros.]) + fi +]) diff --git a/m4/inttypes.m4 b/m4/inttypes.m4 new file mode 100644 index 0000000..ab370ff --- /dev/null +++ b/m4/inttypes.m4 @@ -0,0 +1,27 @@ +# inttypes.m4 serial 1 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +# Define HAVE_INTTYPES_H if exists and doesn't clash with +# . + +AC_DEFUN([gt_HEADER_INTTYPES_H], +[ + AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, + [ + AC_TRY_COMPILE( + [#include +#include ], + [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) + ]) + if test $gt_cv_header_inttypes_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, + [Define if exists and doesn't clash with .]) + fi +]) diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4 new file mode 100644 index 0000000..f342eba --- /dev/null +++ b/m4/inttypes_h.m4 @@ -0,0 +1,28 @@ +# inttypes_h.m4 serial 5 (gettext-0.12) +dnl Copyright (C) 1997-2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + +AC_DEFUN([jm_AC_HEADER_INTTYPES_H], +[ + AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, + [AC_TRY_COMPILE( + [#include +#include ], + [uintmax_t i = (uintmax_t) -1;], + jm_ac_cv_header_inttypes_h=yes, + jm_ac_cv_header_inttypes_h=no)]) + if test $jm_ac_cv_header_inttypes_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, + [Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi +]) diff --git a/m4/isc-posix.m4 b/m4/isc-posix.m4 new file mode 100644 index 0000000..1319dd1 --- /dev/null +++ b/m4/isc-posix.m4 @@ -0,0 +1,26 @@ +# isc-posix.m4 serial 2 (gettext-0.11.2) +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. + +# This test replaces the one in autoconf. +# Currently this macro should have the same name as the autoconf macro +# because gettext's gettext.m4 (distributed in the automake package) +# still uses it. Otherwise, the use in gettext.m4 makes autoheader +# give these diagnostics: +# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX +# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX + +undefine([AC_ISC_POSIX]) + +AC_DEFUN([AC_ISC_POSIX], + [ + dnl This test replaces the obsolescent AC_ISC_POSIX kludge. + AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) + ] +) diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4 new file mode 100644 index 0000000..ffd4008 --- /dev/null +++ b/m4/lcmessage.m4 @@ -0,0 +1,32 @@ +# lcmessage.m4 serial 3 (gettext-0.11.3) +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995. + +# Check whether LC_MESSAGES is available in . + +AC_DEFUN([AM_LC_MESSAGES], +[ + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, + [AC_TRY_LINK([#include ], [return LC_MESSAGES], + am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) + if test $am_cv_val_LC_MESSAGES = yes; then + AC_DEFINE(HAVE_LC_MESSAGES, 1, + [Define if your file defines LC_MESSAGES.]) + fi +]) diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4 new file mode 100644 index 0000000..11d0ce7 --- /dev/null +++ b/m4/lib-ld.m4 @@ -0,0 +1,110 @@ +# lib-ld.m4 serial 2 (gettext-0.12) +dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl Subroutines of libtool.m4, +dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision +dnl with libtool.m4. + +dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. +AC_DEFUN([AC_LIB_PROG_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, +[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + acl_cv_prog_gnu_ld=yes +else + acl_cv_prog_gnu_ld=no +fi]) +with_gnu_ld=$acl_cv_prog_gnu_ld +]) + +dnl From libtool-1.4. Sets the variable LD. +AC_DEFUN([AC_LIB_PROG_LD], +[AC_ARG_WITH(gnu-ld, +[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], +test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by GCC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]* | [A-Za-z]:[\\/]*)] + [re_direlt='/[^/][^/]*/\.\./'] + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(acl_cv_path_LD, +[if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$acl_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT($LD) +else + AC_MSG_RESULT(no) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +AC_LIB_PROG_LD_GNU +]) diff --git a/m4/lib-link.m4 b/m4/lib-link.m4 new file mode 100644 index 0000000..eeb200d --- /dev/null +++ b/m4/lib-link.m4 @@ -0,0 +1,551 @@ +# lib-link.m4 serial 4 (gettext-0.12) +dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and +dnl augments the CPPFLAGS variable. +AC_DEFUN([AC_LIB_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + ac_cv_lib[]Name[]_libs="$LIB[]NAME" + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" + ac_cv_lib[]Name[]_cppflags="$INC[]NAME" + ]) + LIB[]NAME="$ac_cv_lib[]Name[]_libs" + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" + INC[]NAME="$ac_cv_lib[]Name[]_cppflags" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the + dnl results of this search when this library appears as a dependency. + HAVE_LIB[]NAME=yes + undefine([Name]) + undefine([NAME]) +]) + +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) +dnl searches for libname and the libraries corresponding to explicit and +dnl implicit dependencies, together with the specified include files and +dnl the ability to compile and link the specified testcode. If found, it +dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and +dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, + dnl because if the user has installed lib[]Name and not disabled its use + dnl via --without-lib[]Name-prefix, he wants to use it. + ac_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ + ac_save_LIBS="$LIBS" + LIBS="$LIBS $LIB[]NAME" + AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) + LIBS="$ac_save_LIBS" + ]) + if test "$ac_cv_lib[]Name" = yes; then + HAVE_LIB[]NAME=yes + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) + AC_MSG_CHECKING([how to link with lib[]$1]) + AC_MSG_RESULT([$LIB[]NAME]) + else + HAVE_LIB[]NAME=no + dnl If $LIB[]NAME didn't lead to a usable library, we don't need + dnl $INC[]NAME either. + CPPFLAGS="$ac_save_CPPFLAGS" + LIB[]NAME= + LTLIB[]NAME= + fi + AC_SUBST([HAVE_LIB]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + undefine([Name]) + undefine([NAME]) +]) + +dnl Determine the platform dependent parameters needed to use rpath: +dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, +dnl hardcode_direct, hardcode_minus_L. +AC_DEFUN([AC_LIB_RPATH], +[ + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + libext="$acl_cv_libext" + shlibext="$acl_cv_shlibext" + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + hardcode_direct="$acl_cv_hardcode_direct" + hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE(rpath, + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib$1-prefix], +[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib + --without-lib$1-prefix don't search for lib$1 in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi +]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + if test $use_additional = yes; then + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then + found_dir="$additional_libdir" + found_so="$additional_libdir/lib$name.$shlibext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then + found_dir="$dir" + found_so="$dir/lib$name.$shlibext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */lib | */lib/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 new file mode 100644 index 0000000..c719bc8 --- /dev/null +++ b/m4/lib-prefix.m4 @@ -0,0 +1,155 @@ +# lib-prefix.m4 serial 2 (gettext-0.12) +dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and +dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't +dnl require excessive bracketing. +ifdef([AC_HELP_STRING], +[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], +[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) + +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed +dnl to access previously installed libraries. The basic assumption is that +dnl a user will want packages to use other packages he previously installed +dnl with the same --prefix option. +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate +dnl libraries, but is otherwise very convenient. +AC_DEFUN([AC_LIB_PREFIX], +[ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib-prefix], +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi +]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi +]) + +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, +dnl acl_final_exec_prefix, containing the values to which $prefix and +dnl $exec_prefix will expand at the end of the configure script. +AC_DEFUN([AC_LIB_PREPARE_PREFIX], +[ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the +dnl variables prefix and exec_prefix bound to the values they will have +dnl at the end of the configure script. +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], +[ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" +]) diff --git a/m4/nls.m4 b/m4/nls.m4 new file mode 100644 index 0000000..36bc493 --- /dev/null +++ b/m4/nls.m4 @@ -0,0 +1,49 @@ +# nls.m4 serial 1 (gettext-0.12) +dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_DEFUN([AM_NLS], +[ + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE(nls, + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT($USE_NLS) + AC_SUBST(USE_NLS) +]) + +AC_DEFUN([AM_MKINSTALLDIRS], +[ + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly + dnl find the mkinstalldirs script in another subdir but $(top_srcdir). + dnl Try to locate it. + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + case "$ac_aux_dir" in + /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; + *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; + esac + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + AC_SUBST(MKINSTALLDIRS) +]) diff --git a/m4/po.m4 b/m4/po.m4 new file mode 100644 index 0000000..861e3de --- /dev/null +++ b/m4/po.m4 @@ -0,0 +1,197 @@ +# po.m4 serial 1 (gettext-0.12) +dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +dnl Checks for all prerequisites of the po subdirectory. +AC_DEFUN([AM_PO_SUBDIRS], +[ + AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AM_MKINSTALLDIRS])dnl + AC_REQUIRE([AM_NLS])dnl + + dnl Perform the following tests also if --disable-nls has been given, + dnl because they are needed for "make dist" to work. + + dnl Search for GNU msgfmt in the PATH. + dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. + dnl The second test excludes FreeBSD msgfmt. + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + + dnl Search for GNU xgettext 0.12 or newer in the PATH. + dnl The first test excludes Solaris xgettext and early GNU xgettext versions. + dnl The second test excludes FreeBSD xgettext. + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + + dnl Search for GNU msgmerge 0.11 or newer in the PATH. + AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, + [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) + + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. + dnl Test whether we really found GNU msgfmt. + if test "$GMSGFMT" != ":"; then + dnl If it is no GNU msgfmt we define it as : so that the + dnl Makefiles still can work. + if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && + (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` + AC_MSG_RESULT( + [found $GMSGFMT program is not GNU msgfmt; ignore it]) + GMSGFMT=":" + fi + fi + + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. + dnl Test whether we really found GNU xgettext. + if test "$XGETTEXT" != ":"; then + dnl If it is no GNU xgettext we define it as : so that the + dnl Makefiles still can work. + if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && + (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + AC_MSG_RESULT( + [found xgettext program is not GNU xgettext; ignore it]) + XGETTEXT=":" + fi + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + fi + + AC_OUTPUT_COMMANDS([ + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + GMOFILES= + UPDATEPOFILES= + DUMMYPOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done], + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it + # from automake. + eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + ]) +]) diff --git a/m4/progtest.m4 b/m4/progtest.m4 new file mode 100644 index 0000000..8fe527c --- /dev/null +++ b/m4/progtest.m4 @@ -0,0 +1,91 @@ +# progtest.m4 serial 3 (gettext-0.12) +dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1996. + +# Search path for a program which passes the given test. + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN([AM_PATH_PROG_WITH_TEST], +[ +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL(ac_cv_path_$1, +[case "[$]$1" in + [[\\/]]* | ?:[[\\/]]*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in ifelse([$5], , $PATH, [$5]); do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4 new file mode 100644 index 0000000..32ba7ae --- /dev/null +++ b/m4/stdint_h.m4 @@ -0,0 +1,28 @@ +# stdint_h.m4 serial 3 (gettext-0.12) +dnl Copyright (C) 1997-2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +# Define HAVE_STDINT_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + +AC_DEFUN([jm_AC_HEADER_STDINT_H], +[ + AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h, + [AC_TRY_COMPILE( + [#include +#include ], + [uintmax_t i = (uintmax_t) -1;], + jm_ac_cv_header_stdint_h=yes, + jm_ac_cv_header_stdint_h=no)]) + if test $jm_ac_cv_header_stdint_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, + [Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi +]) diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4 new file mode 100644 index 0000000..b5f28d4 --- /dev/null +++ b/m4/uintmax_t.m4 @@ -0,0 +1,32 @@ +# uintmax_t.m4 serial 7 (gettext-0.12) +dnl Copyright (C) 1997-2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +AC_PREREQ(2.13) + +# Define uintmax_t to 'unsigned long' or 'unsigned long long' +# if it is not already defined in or . + +AC_DEFUN([jm_AC_TYPE_UINTMAX_T], +[ + AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([jm_AC_HEADER_STDINT_H]) + if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then + AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) + test $ac_cv_type_unsigned_long_long = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, + [Define to unsigned long or unsigned long long + if and don't define.]) + else + AC_DEFINE(HAVE_UINTMAX_T, 1, + [Define if you have the 'uintmax_t' type in or .]) + fi +]) diff --git a/m4/ulonglong.m4 b/m4/ulonglong.m4 new file mode 100644 index 0000000..c375e47 --- /dev/null +++ b/m4/ulonglong.m4 @@ -0,0 +1,23 @@ +# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40) +dnl Copyright (C) 1999-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], +[ + AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, + [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], + [unsigned long long ullmax = (unsigned long long) -1; + return ull << i | ull >> i | ullmax / ull | ullmax % ull;], + ac_cv_type_unsigned_long_long=yes, + ac_cv_type_unsigned_long_long=no)]) + if test $ac_cv_type_unsigned_long_long = yes; then + AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, + [Define if you have the unsigned long long type.]) + fi +]) diff --git a/po/Makefile.am b/po/Makefile.am new file mode 100644 index 0000000..bb64bad --- /dev/null +++ b/po/Makefile.am @@ -0,0 +1,28 @@ +MAINTAINERCLEANFILES = Makefile.in $(PACKAGE).pot + +MSGFMT = msgfmt + +localedir = $(datadir)/locale +locale_DATA = $(addsuffix .mo,$(ALL_LINGUAS)) + +EXTRA_DIST = $(PACKAGE).pot $(addsuffix .po,$(ALL_LINGUAS)) + +%.mo : %.po + $(MSGFMT) -f -o $@ $< + +install-localeDATA: +uninstall-localeDATA: +install-data-local: + for L in $(ALL_LINGUAS); do \ + $(mkinstalldirs) $(DESTDIR)$(localedir)/$$L/LC_MESSAGES; \ + $(INSTALL_DATA) \ + $$L.mo $(DESTDIR)$(localedir)/$$L/LC_MESSAGES/$(PACKAGE).mo; \ + done + +uninstall: + for L in $(ALL_LINGUAS); do \ + rm -f $(DESTDIR)$(localedir)/$$L/LC_MESSAGES/$(PACKAGE).mo; \ + done + +clean-local: + rm -f *.mo diff --git a/po/Makefile.in.in b/po/Makefile.in.in new file mode 100644 index 0000000..27b721a --- /dev/null +++ b/po/Makefile.in.in @@ -0,0 +1,353 @@ +# Makefile for PO directory in any package using GNU gettext. +# Copyright (C) 1995-1997, 2000-2003 by Ulrich Drepper +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU General Public +# License but which still want to provide support for the GNU gettext +# functionality. +# Please note that the actual code of GNU gettext is covered by the GNU +# General Public License and is *not* in the public domain. + +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +SHELL = /bin/sh +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datadir = @datadir@ +localedir = $(datadir)/locale +gettextsrcdir = $(datadir)/gettext/po + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) + +GMSGFMT = @GMSGFMT@ +MSGFMT = @MSGFMT@ +XGETTEXT = @XGETTEXT@ +MSGMERGE = msgmerge +MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGINIT = msginit +MSGCONV = msgconv +MSGFILTER = msgfilter + +POFILES = @POFILES@ +GMOFILES = @GMOFILES@ +UPDATEPOFILES = @UPDATEPOFILES@ +DUMMYPOFILES = @DUMMYPOFILES@ +DISTFILES.common = Makefile.in.in remove-potcdate.sin \ +$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) +DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \ +$(POFILES) $(GMOFILES) \ +$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) + +POTFILES = \ + +CATALOGS = @CATALOGS@ + +# Makevars gets inserted here. (Don't remove this line!) + +.SUFFIXES: +.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update + +.po.mo: + @echo "$(MSGFMT) -c -o $@ $<"; \ + $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ + +.po.gmo: + @lang=`echo $* | sed -e 's,.*/,,'`; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ + cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + +.sin.sed: + sed -e '/^#/d' $< > t-$@ + mv t-$@ $@ + + +all: all-@USE_NLS@ + +all-yes: stamp-po +all-no: + +# stamp-po is a timestamp denoting the last time at which the CATALOGS have +# been loosely updated. Its purpose is that when a developer or translator +# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, +# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent +# invocations of "make" will do nothing. This timestamp would not be necessary +# if updating the $(CATALOGS) would always touch them; however, the rule for +# $(POFILES) has been designed to not touch files that don't need to be +# changed. +stamp-po: $(srcdir)/$(DOMAIN).pot + test -z "$(CATALOGS)" || $(MAKE) $(CATALOGS) + @echo "touch stamp-po" + @echo timestamp > stamp-poT + @mv stamp-poT stamp-po + +# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', +# otherwise packages like GCC can not be built if only parts of the source +# have been downloaded. + +# This target rebuilds $(DOMAIN).pot; it is an expensive operation. +# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. +$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ + --files-from=$(srcdir)/POTFILES.in \ + --copyright-holder='$(COPYRIGHT_HOLDER)' \ + --msgid-bugs-address='$(MSGID_BUGS_ADDRESS)' + test ! -f $(DOMAIN).po || { \ + if test -f $(srcdir)/$(DOMAIN).pot; then \ + sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ + sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ + if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ + else \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + else \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + } + +# This rule has no dependencies: we don't need to update $(DOMAIN).pot at +# every "make" invocation, only create it when it is missing. +# Only "make $(DOMAIN).pot-update" or "make dist" will force an update. +$(srcdir)/$(DOMAIN).pot: + $(MAKE) $(DOMAIN).pot-update + +# This target rebuilds a PO file if $(DOMAIN).pot has changed. +# Note that a PO file is not touched if it doesn't need to be changed. +$(POFILES): $(srcdir)/$(DOMAIN).pot + @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot + + +install: install-exec install-data +install-exec: +install-data: install-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + for file in $(DISTFILES.common) Makevars.template; do \ + $(INSTALL_DATA) $(srcdir)/$$file \ + $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + for file in Makevars; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi +install-data-no: all +install-data-yes: all + $(mkinstalldirs) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkinstalldirs) $(DESTDIR)$$dir; \ + if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ + $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ + echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ + fi; \ + done; \ + done + +install-strip: install + +installdirs: installdirs-exec installdirs-data +installdirs-exec: +installdirs-data: installdirs-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + else \ + : ; \ + fi +installdirs-data-no: +installdirs-data-yes: + $(mkinstalldirs) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkinstalldirs) $(DESTDIR)$$dir; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + fi; \ + done; \ + done + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: uninstall-exec uninstall-data +uninstall-exec: +uninstall-data: uninstall-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + for file in $(DISTFILES.common) Makevars.template; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi +uninstall-data-no: +uninstall-data-yes: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + done; \ + done + +check: all + +info dvi ps pdf html tags TAGS ctags CTAGS ID: + +mostlyclean: + rm -f remove-potcdate.sed + rm -f stamp-poT + rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES *.mo + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f stamp-po $(GMOFILES) + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: + $(MAKE) update-po + @$(MAKE) dist2 +# This is a separate target because 'update-po' must be executed before. +dist2: $(DISTFILES) + dists="$(DISTFILES)"; \ + if test "$(PACKAGE)" = "gettext-tools"; then \ + dists="$$dists Makevars.template"; \ + fi; \ + if test -f $(srcdir)/ChangeLog; then \ + dists="$$dists ChangeLog"; \ + fi; \ + for i in 0 1 2 3 4 5 6 7 8 9; do \ + if test -f $(srcdir)/ChangeLog.$$i; then \ + dists="$$dists ChangeLog.$$i"; \ + fi; \ + done; \ + if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ + for file in $$dists; do \ + if test -f $$file; then \ + cp -p $$file $(distdir); \ + else \ + cp -p $(srcdir)/$$file $(distdir); \ + fi; \ + done + +update-po: Makefile + $(MAKE) $(DOMAIN).pot-update + test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) + $(MAKE) update-gmo + +# General rule for updating PO files. + +.nop.po-update: + @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ + if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + cd $(srcdir); \ + if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "msgmerge for $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + +$(DUMMYPOFILES): + +update-gmo: Makefile $(GMOFILES) + @: + +Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@ + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ + $(SHELL) ./config.status + +force: + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/po/Makevars.template b/po/Makevars.template new file mode 100644 index 0000000..32692ab --- /dev/null +++ b/po/Makevars.template @@ -0,0 +1,41 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = Free Software Foundation, Inc. + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = diff --git a/po/Rules-quot b/po/Rules-quot new file mode 100644 index 0000000..5f46d23 --- /dev/null +++ b/po/Rules-quot @@ -0,0 +1,42 @@ +# Special Makefile rules for English message catalogs with quotation marks. + +DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot + +.SUFFIXES: .insert-header .po-update-en + +en@quot.po-update: en@quot.po-update-en +en@boldquot.po-update: en@boldquot.po-update-en + +.insert-header.po-update-en: + @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ + if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + ll=`echo $$lang | sed -e 's/@.*//'`; \ + LC_ALL=C; export LC_ALL; \ + cd $(srcdir); \ + if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "creation of $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + +en@quot.insert-header: insert-header.sin + sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header + +en@boldquot.insert-header: insert-header.sin + sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header + +mostlyclean: mostlyclean-quot +mostlyclean-quot: + rm -f *.insert-header diff --git a/po/boldquot.sed b/po/boldquot.sed new file mode 100644 index 0000000..4b937aa --- /dev/null +++ b/po/boldquot.sed @@ -0,0 +1,10 @@ +s/"\([^"]*\)"/“\1”/g +s/`\([^`']*\)'/‘\1’/g +s/ '\([^`']*\)' / ‘\1’ /g +s/ '\([^`']*\)'$/ ‘\1’/g +s/^'\([^`']*\)' /‘\1’ /g +s/“”/""/g +s/“/“/g +s/”/”/g +s/‘/‘/g +s/’/’/g diff --git a/po/de.mo b/po/de.mo new file mode 100644 index 0000000..3575e84 Binary files /dev/null and b/po/de.mo differ diff --git a/po/de.po b/po/de.po new file mode 100644 index 0000000..183b540 --- /dev/null +++ b/po/de.po @@ -0,0 +1,195 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-10-03 02:26+0200\n" +"PO-Revision-Date: 2006-10-16 15:27+0100\n" +"Last-Translator: Peter Wehrfritz \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/ephoto_slideshow.c:115 +msgid "Ephoto Slideshow" +msgstr "Ephoto Diavorführung" + +#: src/ephoto_slideshow.c:329 +msgid "Slideshow Configuration" +msgstr "Diavorführung Konfiguration" + +#: src/ephoto_slideshow.c:348 +msgid "Window Size" +msgstr "Fenstergröße" + +#: src/ephoto_slideshow.c:361 +msgid "Fullscreen" +msgstr "Vollbild" + +#: src/ephoto_slideshow.c:369 +msgid "Custom" +msgstr "Benutzerdefiniert" + +#: src/ephoto_slideshow.c:384 +msgid "Width" +msgstr "Weite" + +#: src/ephoto_slideshow.c:398 +msgid "Height" +msgstr "Höhe" + +#: src/ephoto_slideshow.c:412 +msgid "Order" +msgstr "Reihenfolge" + +#: src/ephoto_slideshow.c:419 +msgid "Loop Slideshow" +msgstr "" + +#: src/ephoto_slideshow.c:426 +msgid "Random Order" +msgstr "Zufallsfolge" + +#: src/ephoto_slideshow.c:439 +msgid "Image Size" +msgstr "Bildgröße" + +#: src/ephoto_slideshow.c:446 +msgid "Zoom Images to Fill Window" +msgstr "Bild in Fenster einpassen" + +#: src/ephoto_slideshow.c:453 +msgid "Keep Aspect" +msgstr "Behalte Proportionen" + +#: src/ephoto_slideshow.c:460 +msgid "Transitions" +msgstr "Übergänge" + +#: src/ephoto_slideshow.c:478 +msgid "Show File Name On Change" +msgstr "Zeige Dateinamen beim Wechsel" + +#: src/ephoto_slideshow.c:493 +msgid "save" +msgstr "Speichern" + +#: src/ephoto_slideshow.c:503 +msgid "cancel" +msgstr "Abrechen" + +#: src/ephoto.c:50 +#: src/ephoto_viewer.c:253 +msgid "Menu|File" +msgstr "Datei" + +#: src/ephoto.c:58 +#: src/ephoto_viewer.c:271 +msgid "Menu|File|Exit" +msgstr "Beenden" + +#: src/ephoto.c:66 +msgid "Menu|Albums" +msgstr "Alben" + +#: src/ephoto.c:74 +msgid "Menu|Albums|Add Album" +msgstr "Diavorführung" + +#: src/ephoto.c:83 +msgid "Menu|Albums|Remove Album" +msgstr "Album entfernen" + +#: src/ephoto.c:90 +msgid "Menu|Viewer" +msgstr "Bildbetrachter" + +#: src/ephoto.c:98 +msgid "Menu|Viewer|Image Viewer" +msgstr "Bildbetrachter" + +#: src/ephoto.c:106 +msgid "Menu|Slideshow" +msgstr "Diavorführung" + +#: src/ephoto.c:115 +msgid "Menu|Slideshow|Configure Slideshow" +msgstr "Diavorführung Konfigurieren" + +#: src/ephoto.c:126 +msgid "Menu|Slideshow|Start Slideshow" +msgstr "Diavorführung starten" + +#: src/ephoto.c:167 +msgid " Location:" +msgstr " Ort:" + +#: src/ephoto.c:214 +msgid "Albums" +msgstr "Alben" + +#: src/ephoto_viewer.c:235 +msgid "Ephoto Image Viewer" +msgstr "Ephoto Bildbetrachter" + +#: src/ephoto_viewer.c:261 +msgid "Menu|File|Save Image" +msgstr "Bild speichern" + +#: src/ephoto_viewer.c:279 +msgid "Menu|Actions" +msgstr "Ansicht" + +#: src/ephoto_viewer.c:287 +msgid "Menu|Actions|Zoom In" +msgstr "Vergrößern" + +#: src/ephoto_viewer.c:297 +msgid "Menu|Actions|Zoom Out" +msgstr "Verkleinern" + +#: src/ephoto_viewer.c:307 +msgid "Menu|Actions|Zoom To Fit" +msgstr "ins Fenster einpassen" + +#: src/ephoto_viewer.c:317 +msgid "Menu|Actions|Zoom 1:1" +msgstr "Originalgröße" + +#: src/ephoto_viewer.c:328 +msgid "Menu|Actions|Flip Horizontally" +msgstr "Horizontal spiegeln" + +#: src/ephoto_viewer.c:338 +msgid "Menu|Actions|Flip Vertically" +msgstr "Vertikal spiegeln" + +#: src/ephoto_viewer.c:348 +msgid "Menu|Actions|Rotate Left" +msgstr "90° drehen (links)" + +#: src/ephoto_viewer.c:358 +msgid "Menu|Actions|Rotate Right" +msgstr "90° drehen (rechts)" + +#: src/ephoto_viewer.c:400 +msgid "In" +msgstr "" + +#: src/ephoto_viewer.c:410 +msgid "Out" +msgstr "" + +#: src/ephoto_viewer.c:440 +msgid "Left" +msgstr "links" + +#: src/ephoto_viewer.c:450 +msgid "Right" +msgstr "rechts" + diff --git a/po/en@boldquot.header b/po/en@boldquot.header new file mode 100644 index 0000000..fedb6a0 --- /dev/null +++ b/po/en@boldquot.header @@ -0,0 +1,25 @@ +# All this catalog "translates" are quotation characters. +# The msgids must be ASCII and therefore cannot contain real quotation +# characters, only substitutes like grave accent (0x60), apostrophe (0x27) +# and double quote (0x22). These substitutes look strange; see +# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# +# This catalog translates grave accent (0x60) and apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019). +# It also translates pairs of apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019) +# and pairs of quotation mark (0x22) to +# left double quotation mark (U+201C) and right double quotation mark (U+201D). +# +# When output to an UTF-8 terminal, the quotation characters appear perfectly. +# When output to an ISO-8859-1 terminal, the single quotation marks are +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to +# grave/acute accent (by libiconv), and the double quotation marks are +# transliterated to 0x22. +# When output to an ASCII terminal, the single quotation marks are +# transliterated to apostrophes, and the double quotation marks are +# transliterated to 0x22. +# +# This catalog furthermore displays the text between the quotation marks in +# bold face, assuming the VT100/XTerm escape sequences. +# diff --git a/po/en@quot.header b/po/en@quot.header new file mode 100644 index 0000000..a9647fc --- /dev/null +++ b/po/en@quot.header @@ -0,0 +1,22 @@ +# All this catalog "translates" are quotation characters. +# The msgids must be ASCII and therefore cannot contain real quotation +# characters, only substitutes like grave accent (0x60), apostrophe (0x27) +# and double quote (0x22). These substitutes look strange; see +# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# +# This catalog translates grave accent (0x60) and apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019). +# It also translates pairs of apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019) +# and pairs of quotation mark (0x22) to +# left double quotation mark (U+201C) and right double quotation mark (U+201D). +# +# When output to an UTF-8 terminal, the quotation characters appear perfectly. +# When output to an ISO-8859-1 terminal, the single quotation marks are +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to +# grave/acute accent (by libiconv), and the double quotation marks are +# transliterated to 0x22. +# When output to an ASCII terminal, the single quotation marks are +# transliterated to apostrophes, and the double quotation marks are +# transliterated to 0x22. +# diff --git a/po/ephoto.pot b/po/ephoto.pot new file mode 100644 index 0000000..0bc0157 --- /dev/null +++ b/po/ephoto.pot @@ -0,0 +1,36 @@ +# SOME DESCRIPTIVE TITLE. +# This file is put in the public domain. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2007-02-12 16:23-0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/bin/ephoto_utils.c:43 +#, c-format +msgid "%'.0f Bytes" +msgstr "" + +#: src/bin/ephoto_utils.c:47 +#, c-format +msgid "%'.0f KB" +msgstr "" + +#: src/bin/ephoto_utils.c:51 +#, c-format +msgid "%'.0f MB" +msgstr "" + +#: src/bin/ephoto_utils.c:55 +#, c-format +msgid "%'.1f GB" +msgstr "" diff --git a/po/fr.mo b/po/fr.mo new file mode 100644 index 0000000..48fb3bc Binary files /dev/null and b/po/fr.mo differ diff --git a/po/fr.po b/po/fr.po new file mode 100644 index 0000000..84872c9 --- /dev/null +++ b/po/fr.po @@ -0,0 +1,204 @@ +# This file is put in the public domain. +# This file is distributed under the same license as the ephoto package. +# DUNNEWIND Maxence , 2006 +# +# +msgid "" +msgstr "" +"Project-Id-Version: Ephoto 0.0.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-11-20 22:18+0100\n" +"PO-Revision-Date: 2006-11-20 22:18+0100\n" +"Last-Translator: DUNNEWIND Maxence \n" +"Language-Team: French \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/ephoto.c:52 src/ephoto_viewer.c:253 +msgid "Menu|File" +msgstr "Fichier" + +#: src/ephoto.c:60 src/ephoto_viewer.c:271 +msgid "Menu|File|Exit" +msgstr "Quitter" + +#: src/ephoto.c:68 +msgid "Menu|Albums" +msgstr "Albums" + +#: src/ephoto.c:76 +msgid "Menu|Albums|Add Album" +msgstr "Ajouter un album" + +#: src/ephoto.c:86 +msgid "Menu|Albums|Remove Album" +msgstr "Supprimer un album" + +#: src/ephoto.c:93 +msgid "Menu|Viewer" +msgstr "Visionneur" + +#: src/ephoto.c:101 +msgid "Menu|Viewer|Image Viewer" +msgstr "Visionner les images" + +#: src/ephoto.c:109 +msgid "Menu|Slideshow" +msgstr "Défilement" + +#: src/ephoto.c:118 +msgid "Menu|Slideshow|Configure Slideshow" +msgstr "Configurer le défilement" + +#: src/ephoto.c:129 +msgid "Menu|Slideshow|Start Slideshow" +msgstr "Démarrer le défilement" + +#: src/ephoto.c:170 +msgid " Location:" +msgstr " Dossier:" + +#: src/ephoto.c:216 +msgid "Albums" +msgstr "Albums" + +#: src/ephoto_callbacks.c:218 +msgid "Add an Album" +msgstr "Ajouter un album" + +#: src/ephoto_callbacks.c:231 +msgid "Enter the new album name:" +msgstr "Entrer me nom du nouvel album:" + +#: src/ephoto_callbacks.c:243 +msgid "Enter the new album description:" +msgstr "Entrer la description du nouvel album:" + +#: src/ephoto_callbacks.c:263 src/ephoto_slideshow.c:493 +msgid "save" +msgstr "Enregistrer" + +#: src/ephoto_callbacks.c:272 src/ephoto_slideshow.c:503 +msgid "cancel" +msgstr "annuler" + +#: src/ephoto_slideshow.c:115 +msgid "Ephoto Slideshow" +msgstr "Défilement Ephoto" + +#: src/ephoto_slideshow.c:329 +msgid "Slideshow Configuration" +msgstr "Configuration du défilement" + +#: src/ephoto_slideshow.c:348 +msgid "Window Size" +msgstr "Taille de la fenêtre" + +#: src/ephoto_slideshow.c:361 +msgid "Fullscreen" +msgstr "Plein écran" + +#: src/ephoto_slideshow.c:369 +msgid "Custom" +msgstr "Personnalisé" + +#: src/ephoto_slideshow.c:384 +msgid "Width" +msgstr "Largeur" + +#: src/ephoto_slideshow.c:398 +msgid "Height" +msgstr "Hauteur" + +#: src/ephoto_slideshow.c:412 +msgid "Order" +msgstr "Organisation" + +#: src/ephoto_slideshow.c:419 +msgid "Loop Slideshow" +msgstr "Défiler en boucle" + +#: src/ephoto_slideshow.c:426 +msgid "Random Order" +msgstr "Ordre aléatoire " + +#: src/ephoto_slideshow.c:439 +msgid "Image Size" +msgstr "Taille de l'image" + +#: src/ephoto_slideshow.c:446 +msgid "Zoom Images to Fill Window" +msgstr "Retailler les images à la taille de la fenêtre" + +#: src/ephoto_slideshow.c:453 +msgid "Keep Aspect" +msgstr "Conserver les proportions" + +#: src/ephoto_slideshow.c:460 +msgid "Transitions" +msgstr "Transitions" + +#: src/ephoto_slideshow.c:478 +msgid "Show File Name On Change" +msgstr "Afficher le nom du fichier lors du changement" + +#: src/ephoto_viewer.c:235 +msgid "Ephoto Image Viewer" +msgstr "Visualiseur d'image Ephoto" + +#: src/ephoto_viewer.c:261 +msgid "Menu|File|Save Image" +msgstr "Sauvegarder l'image" + +#: src/ephoto_viewer.c:279 +msgid "Menu|Actions" +msgstr "Actions" + +#: src/ephoto_viewer.c:287 +msgid "Menu|Actions|Zoom In" +msgstr "Zoomer" + +#: src/ephoto_viewer.c:297 +msgid "Menu|Actions|Zoom Out" +msgstr "Dézoomer" + +#: src/ephoto_viewer.c:307 +msgid "Menu|Actions|Zoom To Fit" +msgstr "Remplir la fenêtre" + +#: src/ephoto_viewer.c:317 +msgid "Menu|Actions|Zoom 1:1" +msgstr "Taille normale" + +#: src/ephoto_viewer.c:328 +msgid "Menu|Actions|Flip Horizontally" +msgstr "Renverser horizontalement" + +#: src/ephoto_viewer.c:338 +msgid "Menu|Actions|Flip Vertically" +msgstr "Renverser verticalement" + +#: src/ephoto_viewer.c:348 +msgid "Menu|Actions|Rotate Left" +msgstr "Pivoter vers la gauche" + +#: src/ephoto_viewer.c:358 +msgid "Menu|Actions|Rotate Right" +msgstr "Pivoter vers la droite" + +#: src/ephoto_viewer.c:400 +msgid "In" +msgstr "Zoom +" + +#: src/ephoto_viewer.c:410 +msgid "Out" +msgstr "Zoom -" + +#: src/ephoto_viewer.c:440 +msgid "Left" +msgstr "Gauche" + +#: src/ephoto_viewer.c:450 +msgid "Right" +msgstr "Droite" diff --git a/po/insert-header.sin b/po/insert-header.sin new file mode 100644 index 0000000..b26de01 --- /dev/null +++ b/po/insert-header.sin @@ -0,0 +1,23 @@ +# Sed script that inserts the file called HEADER before the header entry. +# +# At each occurrence of a line starting with "msgid ", we execute the following +# commands. At the first occurrence, insert the file. At the following +# occurrences, do nothing. The distinction between the first and the following +# occurrences is achieved by looking at the hold space. +/^msgid /{ +x +# Test if the hold space is empty. +s/m/m/ +ta +# Yes it was empty. First occurrence. Read the file. +r HEADER +# Output the file's contents by reading the next line. But don't lose the +# current line while doing this. +g +N +bb +:a +# The hold space was nonempty. Following occurrences. Do nothing. +x +:b +} diff --git a/po/it.mo b/po/it.mo new file mode 100644 index 0000000..1375524 Binary files /dev/null and b/po/it.mo differ diff --git a/po/it.po b/po/it.po new file mode 100644 index 0000000..aa723ec --- /dev/null +++ b/po/it.po @@ -0,0 +1,203 @@ +# Italian translation for Ephoto. +# This file is put in the public domain. +# Massimo Maiurana , 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: Ephoto\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-10-30 22:31+0100\n" +"PO-Revision-Date: 2006-11-01 12:06+0100\n" +"Last-Translator: Massimo Maiurana \n" +"Language-Team: none\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/ephoto_callbacks.c:218 +msgid "Add an Album" +msgstr "Aggiungi album" + +#: src/ephoto_callbacks.c:231 +msgid "Enter the new album name:" +msgstr "Nome del nuovo album:" + +#: src/ephoto_callbacks.c:243 +msgid "Enter the new album description:" +msgstr "Descrizione del nuovo album:" + +#: src/ephoto_callbacks.c:263 src/ephoto_slideshow.c:493 +msgid "save" +msgstr "salva" + +#: src/ephoto_callbacks.c:272 src/ephoto_slideshow.c:503 +msgid "cancel" +msgstr "annulla" + +#: src/ephoto.c:52 src/ephoto_viewer.c:253 +msgid "Menu|File" +msgstr "File" + +#: src/ephoto.c:60 src/ephoto_viewer.c:271 +msgid "Menu|File|Exit" +msgstr "Esci" + +#: src/ephoto.c:68 +msgid "Menu|Albums" +msgstr "Album" + +#: src/ephoto.c:76 +msgid "Menu|Albums|Add Album" +msgstr "Aggiungi album" + +#: src/ephoto.c:86 +msgid "Menu|Albums|Remove Album" +msgstr "Elimina album" + +#: src/ephoto.c:93 +msgid "Menu|Viewer" +msgstr "Visualizzatore" + +#: src/ephoto.c:101 +msgid "Menu|Viewer|Image Viewer" +msgstr "Visualizzatore immagini" + +#: src/ephoto.c:109 +msgid "Menu|Slideshow" +msgstr "Presentazione" + +#: src/ephoto.c:118 +msgid "Menu|Slideshow|Configure Slideshow" +msgstr "Configura presentazione" + +#: src/ephoto.c:129 +msgid "Menu|Slideshow|Start Slideshow" +msgstr "Avvia presentazione" + +#: src/ephoto.c:170 +msgid " Location:" +msgstr " Posizione:" + +#: src/ephoto.c:216 +msgid "Albums" +msgstr "Album" + +#: src/ephoto_slideshow.c:115 +msgid "Ephoto Slideshow" +msgstr "Presentazione Ephoto" + +#: src/ephoto_slideshow.c:329 +msgid "Slideshow Configuration" +msgstr "Configurazione presentazione" + +#: src/ephoto_slideshow.c:348 +msgid "Window Size" +msgstr "Dimensione finestra" + +#: src/ephoto_slideshow.c:361 +msgid "Fullscreen" +msgstr "Schermo intero" + +#: src/ephoto_slideshow.c:369 +msgid "Custom" +msgstr "Personalizzata" + +#: src/ephoto_slideshow.c:384 +msgid "Width" +msgstr "Larghezza" + +#: src/ephoto_slideshow.c:398 +msgid "Height" +msgstr "Altezza" + +#: src/ephoto_slideshow.c:412 +msgid "Order" +msgstr "Ordinamento" + +#: src/ephoto_slideshow.c:419 +msgid "Loop Slideshow" +msgstr "Cicla presentazione" + +#: src/ephoto_slideshow.c:426 +msgid "Random Order" +msgstr "Ordinamento casuale" + +#: src/ephoto_slideshow.c:439 +msgid "Image Size" +msgstr "Dimensione immagine" + +#: src/ephoto_slideshow.c:446 +msgid "Zoom Images to Fill Window" +msgstr "Ingradisci per riempire la finestra" + +#: src/ephoto_slideshow.c:453 +msgid "Keep Aspect" +msgstr "Mantieni aspetto" + +#: src/ephoto_slideshow.c:460 +msgid "Transitions" +msgstr "Transizioni" + +#: src/ephoto_slideshow.c:478 +msgid "Show File Name On Change" +msgstr "Mostra nome file al cambio" + +#: src/ephoto_viewer.c:235 +msgid "Ephoto Image Viewer" +msgstr "Visualizzatore immagini Ephoto" + +#: src/ephoto_viewer.c:261 +msgid "Menu|File|Save Image" +msgstr "Salva immagine" + +#: src/ephoto_viewer.c:279 +msgid "Menu|Actions" +msgstr "Azioni" + +#: src/ephoto_viewer.c:287 +msgid "Menu|Actions|Zoom In" +msgstr "Diminuisci zoom" + +#: src/ephoto_viewer.c:297 +msgid "Menu|Actions|Zoom Out" +msgstr "Aumenta zoom" + +#: src/ephoto_viewer.c:307 +msgid "Menu|Actions|Zoom To Fit" +msgstr "Adatta alla finestra" + +#: src/ephoto_viewer.c:317 +msgid "Menu|Actions|Zoom 1:1" +msgstr "Zoom 1:1" + +#: src/ephoto_viewer.c:328 +msgid "Menu|Actions|Flip Horizontally" +msgstr "Scorri orizzontalmente" + +#: src/ephoto_viewer.c:338 +msgid "Menu|Actions|Flip Vertically" +msgstr "Scorri verticalmente" + +#: src/ephoto_viewer.c:348 +msgid "Menu|Actions|Rotate Left" +msgstr "Ruota a sinistra" + +#: src/ephoto_viewer.c:358 +msgid "Menu|Actions|Rotate Right" +msgstr "Ruota a destra" + +#: src/ephoto_viewer.c:400 +msgid "In" +msgstr "Diminuisci" + +#: src/ephoto_viewer.c:410 +msgid "Out" +msgstr "Aumenta" + +#: src/ephoto_viewer.c:440 +msgid "Left" +msgstr "Sinistra" + +#: src/ephoto_viewer.c:450 +msgid "Right" +msgstr "Destra" diff --git a/po/quot.sed b/po/quot.sed new file mode 100644 index 0000000..0122c46 --- /dev/null +++ b/po/quot.sed @@ -0,0 +1,6 @@ +s/"\([^"]*\)"/“\1”/g +s/`\([^`']*\)'/‘\1’/g +s/ '\([^`']*\)' / ‘\1’ /g +s/ '\([^`']*\)'$/ ‘\1’/g +s/^'\([^`']*\)' /‘\1’ /g +s/“”/""/g diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin new file mode 100644 index 0000000..2436c49 --- /dev/null +++ b/po/remove-potcdate.sin @@ -0,0 +1,19 @@ +# Sed script that remove the POT-Creation-Date line in the header entry +# from a POT file. +# +# The distinction between the first and the following occurrences of the +# pattern is achieved by looking at the hold space. +/^"POT-Creation-Date: .*"$/{ +x +# Test if the hold space is empty. +s/P/P/ +ta +# Yes it was empty. First occurrence. Remove the line. +g +d +bb +:a +# The hold space was nonempty. Following occurrences. Do nothing. +x +:b +} diff --git a/po/sv.mo b/po/sv.mo new file mode 100644 index 0000000..ae1e5ba Binary files /dev/null and b/po/sv.mo differ diff --git a/po/sv.po b/po/sv.po new file mode 100644 index 0000000..0090a76 --- /dev/null +++ b/po/sv.po @@ -0,0 +1,141 @@ +# Swedish translations for ephoto package. +# Copyright (C) 2006 THE ephoto'S COPYRIGHT HOLDER +# This file is distributed under the same license as the ephoto package. +# , 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: ephoto 2.15.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-10-03 02:26+0200\n" +"PO-Revision-Date: 2006-10-03 02:28+0200\n" +"Last-Translator: \n" +"Language-Team: Swedish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ephoto.c:163 +msgid " Location:" +msgstr "Adress" + +#: ephoto.c:72 +msgid "Add Album" +msgstr "Lägg till Album" + +#: ephoto.c:64 ephoto.c:210 +msgid "Albums" +msgstr "Album" + +#: ephoto.c:112 +msgid "Configure Slideshow" +msgstr "Konfigurera Bildspel" + +#: ephoto.c:56 +msgid "Exit" +msgstr "Avsluta" + +#: ephoto.c:48 +msgid "File" +msgstr "Arkiv" + +#: ephoto.c:96 +msgid "Image Viewer" +msgstr "Bild Visare" + +#: ephoto.c:81 +msgid "Remove Album" +msgstr "Ta bort Album" + +#: ephoto.c:104 +msgid "Slideshow" +msgstr "Bildspel" + +#: ephoto.c:122 +msgid "Start Slideshow" +msgstr "Starta Bildspel" + +#: ephoto.c:88 +msgid "Viewer" +msgstr "Visare" + +#: ephoto_viewer.c:96 +msgid "Ephoto Image Viewer" +msgstr "Ephoto Bild Visare" + +#: ephoto_viewer.c:143 +msgid "In" +msgstr "In" + +#: ephoto_viewer.c:173 +msgid "Left" +msgstr "Vänster" + +#: ephoto_viewer.c:153 +msgid "Out" +msgstr "Ut" + +#: ephoto_viewer.c:182 +msgid "Right" +msgstr "Höger" + +#: ephoto_slideshow.c:369 +msgid "Custom" +msgstr "Annan" + +#: ephoto_slideshow.c:115 +msgid "Ephoto Slideshow" +msgstr "Ephoto Bildspel" + +#: ephoto_slideshow.c:361 +msgid "Fullscreen" +msgstr "Helskärm" + +#: ephoto_slideshow.c:398 +msgid "Height" +msgstr "Höjd" + +#: ephoto_slideshow.c:439 +msgid "Image Size" +msgstr "Bildstorlek" + +#: ephoto_slideshow.c:453 +msgid "Keep Aspect" +msgstr "Behåll Aspekt" + +#: ephoto_slideshow.c:419 +msgid "Loop Slideshow" +msgstr "Upprepa Bildspel" + +#: ephoto_slideshow.c:412 +msgid "Order" +msgstr "Följd" + +#: ephoto_slideshow.c:426 +msgid "Random Order" +msgstr "Slumpmässig Följd" + +#: ephoto_slideshow.c:478 +msgid "Show File Name On Change" +msgstr "Visa filnamn efter byte" + +#: ephoto_slideshow.c:329 +msgid "Slideshow Configuration" +msgstr "Konfigurera Bildspel" + +#: ephoto_slideshow.c:460 +msgid "Transitions" +msgstr "Transitioner" + +#: ephoto_slideshow.c:384 +msgid "Width" +msgstr "Bredd" + +#: ephoto_slideshow.c:348 +msgid "Window Size" +msgstr "Fönsterstorlet" + +#: ephoto_slideshow.c:446 +msgid "Zoom Images to Fill Window" +msgstr "Fyll fönstret" diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..4970988 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,4 @@ +## Process this file with automake to produce Makefile.in + +SUBDIRS = bin + diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am new file mode 100644 index 0000000..3ade6b9 --- /dev/null +++ b/src/bin/Makefile.am @@ -0,0 +1,23 @@ +## Process this file with automake to produce Makefile.in + +bin_PROGRAMS = ephoto + +ephoto_SOURCES = ephoto.c \ + ephoto_browsing.c \ + ephoto_database.c \ + ephoto_edit_view.c \ + ephoto_exif.c \ + ephoto_gui.c \ + ephoto_imaging.c \ + ephoto_list_view.c \ + ephoto_main.c \ + ephoto_nls.c \ + ephoto_normal_view.c \ + ephoto_utils.c + +ephoto_CFLAGS = @ewl_cflags@ + +ephoto_LDADD = @ewl_libs@ -lsqlite3 -lexif + +EXTRA_DIST = \ + ephoto.h diff --git a/src/bin/config.h.in b/src/bin/config.h.in new file mode 100644 index 0000000..aa82bd3 --- /dev/null +++ b/src/bin/config.h.in @@ -0,0 +1,101 @@ +/* src/config.h.in. Generated from configure.in by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#undef ENABLE_NLS + +/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +#undef HAVE_CFLOCALECOPYCURRENT + +/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +#undef HAVE_CFPREFERENCESCOPYAPPVALUE + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#undef HAVE_DCGETTEXT + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#undef HAVE_GETTEXT + +/* Define if you have the iconv() function. */ +#undef HAVE_ICONV + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SQLITE3_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Name of package */ +#undef PACKAGE + +/* Installation directory for user executables */ +#undef PACKAGE_BIN_DIR + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Shared Data Directory */ +#undef PACKAGE_DATA_DIR + +/* Installation directory for libraries */ +#undef PACKAGE_LIB_DIR + +/* Locale-specific data directory */ +#undef PACKAGE_LOCALE_DIR + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Source code directory */ +#undef PACKAGE_SOURCE_DIR + +/* 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 + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Define if using the dmalloc debugging malloc package */ +#undef WITH_DMALLOC + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const diff --git a/src/bin/ephoto.c b/src/bin/ephoto.c new file mode 100644 index 0000000..d1253fc --- /dev/null +++ b/src/bin/ephoto.c @@ -0,0 +1,276 @@ +#include "ephoto.h" + +int main(int argc, char **argv) +{ + char *album, *name, *description, *path, input[2]; + int i; + Ecore_List *albums, *images; + sqlite3 *db; + + /*Check to make sure EWL is accessible*/ + if (!ewl_init(&argc, argv)) + { + printf("Ewl is not usable, please check your installation!\n"); + return 1; + } + + for(i = 0; i < argc; i++) + { + if(!strcmp(argv[i], "--help") || !strcmp(argv[i], "-h")) + { + printf("Ephoto Version %s Help Page\n", VERSION); + printf("Long Commands: \n" + " --help - This Screen\n" + " --add-album %%s %%s - Adds Album\n" + " arg1 = name of album\n" + " arg2 = description of album\n" + " --add-image %%s %%s %%s - Adds Image\n" + " arg1 = name of album to add image to\n" + " arg2 = descriptive name for image\n" + " arg3 = path to the image\n" + " --add-image-dir %%s %%s - Adds All Images From Directory\n" + " arg1 = name of album to add images to\n" + " arg2 = directory to get images from\n" + " --list-albums - List Albums\n" + " --list-images %%s - List Images in Album\n" + " arg1 = name of album to list images from\n" + " --remove-album %%s - Removes Album\n" + " arg1 = name of album\n" + " --remove-image %%s %%s - Removes Image\n" + " arg1 = name of album to remove image from\n" + " arg2 = path of the image to be removed\n"); + printf("Short Commands: \n" + " -h - This Screen\n" + " -a %%s %%s - Adds Album\n" + " -i %%s %%s %%s - Adds Image\n" + " -id %%s %%s - Adds all Images From Directory\n" + " -la - List Albums\n" + " -li %%s - List Images in Album\n" + " -ra %%s - Removes Album\n" + " -ri %%s %%s - Removes Image\n"); + return 0; + } + if(!strcmp(argv[i], "--add-album") || !strcmp(argv[i], "-a")) + { + i++; + if(argv[i]) name = argv[i]; + else + { + printf("Please specify a name for the album\n"); + return 1; + } + + i++; + if(argv[i]) description = argv[i]; + else + { + printf("Please specify a description for the album\n"); + return 1; + } + + printf("Are you sure you want to create an album with " + "the name %s and the description %s? ", + name, description); + scanf("%c", &input); + if(!strncasecmp(input, "y", 1)) + { + db = ephoto_db_init(); + ephoto_db_add_album(db, name, description); + ephoto_db_close(db); + printf("Album was created\n"); + } + else printf("Album was not created\n"); + + return 0; + } + if(!strcmp(argv[i], "--add-image") || !strcmp(argv[i], "-i")) + { + i++; + if(argv[i]) album = argv[i]; + else + { + printf("Please specify the album you wish to add to\n"); + return 1; + } + + i++; + if(argv[i]) name = argv[i]; + else + { + printf("Please specify a descriptive name for the image\n"); + return 1; + } + + i++; + if(argv[i] && ecore_file_exists(argv[i])) path = argv[i]; + else + { + printf("Please specify a valid path to the image\n"); + return 1; + } + + printf("Are you sure you want to add an image " + "to album %s with a name %s and path %s? ", + album, name, path); + scanf("%c", &input); + if(!strncasecmp(input, "y", 1)) + { + db = ephoto_db_init(); + ephoto_db_add_image(db, album, name, path); + ephoto_db_close(db); + printf("Image was added\n"); + } + else printf("Image was not added\n"); + + return 0; + } + if(!strcmp(argv[i], "--add-image-dir") || !strcmp(argv[i], "-id")) + { + i++; + if(argv[i]) album = argv[i]; + else + { + printf("Please specify the album you wish to add to\n"); + return 1; + } + + i++; + if(argv[i] && ecore_file_is_dir(argv[i])) path = argv[i]; + else + { + printf("Please specify a valid path to the image directory\n"); + return 1; + } + + printf("Are you sure you want to add images " + "from the directory %s to the album %s? ", + path, album); + scanf("%c", &input); + if(!strncasecmp(input, "y", 1)) + { + db = ephoto_db_init(); + images = ecore_list_new(); + images = get_images(path); + while (!ecore_list_is_empty(images)) + { + name = ecore_list_remove_first(images); + ephoto_db_add_image(db, album, basename(name), name); + } + ephoto_db_close(db); + ecore_list_destroy(images); + printf("Images were added\n"); + } + else printf("Images were not added\n"); + + return 0; + } + if(!strcmp(argv[i], "--list-albums") || !strcmp(argv[i], "-la")) + { + db = ephoto_db_init(); + albums = ecore_list_new(); + albums = ephoto_db_list_albums(db); + ephoto_db_close(db); + while(!ecore_list_is_empty(albums)) + { + album = ecore_list_remove_first(albums); + printf("%s\n", album); + } + ecore_list_destroy(albums); + + return 0; + } + if(!strcmp(argv[i], "--list-images") || !strcmp(argv[i], "-li")) + { + i++; + if(argv[i]) album = argv[i]; + else + { + printf("Please specify the album to list images from\n"); + return 1; + } + + db = ephoto_db_init(); + images = ephoto_db_list_images(db, album); + ephoto_db_close(db); + while(!ecore_list_is_empty(images)) + { + path = ecore_list_remove_first(images); + printf("%s\n", path); + } + return 0; + } + if(!strcmp(argv[i], "--remove-album") || !strcmp(argv[i], "-ra")) + { + i++; + if(argv[i]) name = argv[i]; + else + { + printf("Please specify the name of the album\n"); + return 1; + } + + printf("Are you sure you want to remove the album %s? ", + name); + scanf("%c", &input); + if(!strncasecmp(input, "y", 1)) + { + db = ephoto_db_init(); + ephoto_db_delete_album(db, name); + ephoto_db_close(db); + printf("Album was removed\n"); + } + else printf("Album was not removed\n"); + + return 0; + } + if(!strcmp(argv[i], "--remove-image") || !strcmp(argv[i], "-ri")) + { + i++; + if(argv[i]) album = argv[i]; + else + { + printf("Please specify the name of the album " + "the image belongs to.\n"); + return 1; + } + + i++; + if(argv[i]) path = argv[i]; + else + { + printf("Please specify the path of the image\n"); + return 1; + } + + printf("Are you sure you want to remove the image %s " + "from the album %s? ", + path, album); + scanf("%c", &input); + if(!strncasecmp(input, "y", 1)) + { + db = ephoto_db_init(); + ephoto_db_delete_image(db, album, path); + ephoto_db_close(db); + printf("Image was removed\n"); + } + else printf("Image was not removed\n"); + + return 0; + } + } + + /* NLS */ +#ifdef ENABLE_NLS + setlocale(LC_MESSAGES, ""); + bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR); + bind_textdomain_codeset(PACKAGE, "UTF-8"); + textdomain(PACKAGE); +#endif + /*Use our own custom theme*/ + ewl_theme_theme_set(PACKAGE_DATA_DIR "/themes/ephoto.edj"); + + /*Start the GUI*/ + create_main_gui(); + + return 0; +} diff --git a/src/bin/ephoto.h b/src/bin/ephoto.h new file mode 100644 index 0000000..c461eeb --- /dev/null +++ b/src/bin/ephoto.h @@ -0,0 +1,106 @@ +#ifndef _EPHOTO_H_ +#define _EPHOTO_H_ + +#include "config.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* Ephoto Main gui callbacks */ +void create_main_gui(void); + +/* Ephoto Browsing */ +Ecore_List *get_directories(char *directory); +Ecore_List *get_images(char *directory); + +/* Ephoto Exif */ +Ecore_Hash *get_exif_data(char *file); +void display_exif_dialog(Ewl_Widget *w, void *event, void *data); + +/* Ephoto Databasing */ +sqlite3 *ephoto_db_init(void); +void ephoto_db_add_album(sqlite3 *db, char *name, char *description); +void ephoto_db_delete_album(sqlite3 *db, char *name); +Ecore_List *ephoto_db_list_albums(sqlite3 *db); +void ephoto_db_add_image(sqlite3 *db, char *album, char *name, char *path); +void ephoto_db_delete_image(sqlite3 *db, char *album, char *path); +Ecore_List *ephoto_db_list_images(sqlite3 *db, char *album); +void ephoto_db_close(sqlite3 *db); + +/* Ephoto Gui */ +Ewl_Widget *add_button(Ewl_Widget *c, char *txt, char *img, void *cb, void *data); +Ewl_Widget *add_image(Ewl_Widget *c, char *img, int thumbnail, void *cb, void *data); +Ewl_Widget *add_label(Ewl_Widget *c, char *lbl, int blue); +Ewl_Widget *add_shadow(Ewl_Widget *c); + +/* Ephoto Imaging */ +unsigned int *flip_horizontal(Ewl_Widget *image); +unsigned int *flip_vertical(Ewl_Widget *image); +unsigned int *rotate_left(Ewl_Widget *image); +unsigned int *rotate_right(Ewl_Widget *image); +void update_image(Ewl_Widget *image, int w, int h, unsigned int *data); + +/* Ephoto List View */ +Ewl_Widget *add_ltree(Ewl_Widget *c); + +/* Ephoto Normal View */ +void set_info(Ewl_Widget *w, void *event, void *data); + +/* Ephoto Utilities*/ +char *image_pixels_string_get(const char *file); +void image_pixels_int_get(const char *file, int *width, int *height); +char *file_size_get(int size); + +/* Ephoto Views */ +void show_normal_view(Ewl_Widget *w, void *event, void *data); +void show_edit_view(Ewl_Widget *w, void *event, void *data); +void show_list_view(Ewl_Widget *w, void *event, void *data); + +/* Ephoto Global Variables */ +extern Ewl_Widget *atree; +extern Ewl_Widget *tbar; +extern Ewl_Widget *vcombo; +extern Ewl_Widget *view_box; +extern Ewl_Widget *fbox_vbox; +extern Ewl_Widget *edit_vbox; +extern Ewl_Widget *list_vbox; +extern Ewl_Widget *fbox; +extern Ewl_Widget *eimage; +extern Ewl_Widget *ltree; +extern Ewl_Widget *ilabel; +extern Ewl_Widget *currenta; +extern Ewl_Widget *currentf; +extern Ewl_Widget *currenti; +extern Ecore_List *images; + +/* NLS */ +#ifdef ENABLE_NLS +# include +# include +# define _(str) gettext(str) +# define gettext_noop(str) str +# define N_(str) gettext_noop(str) +#else +# define _(str) (str) +# define gettext_noop(str) str +# define N_(str) gettext_noop(str) +# define gettext(str) ((char*) (str)) +#endif + +/* NLS callbacks */ +char *sgettext(const char *msgid); +#define S_(str) sgettext(str) + +#endif diff --git a/src/bin/ephoto_browsing.c b/src/bin/ephoto_browsing.c new file mode 100644 index 0000000..5056b39 --- /dev/null +++ b/src/bin/ephoto_browsing.c @@ -0,0 +1,100 @@ +#include "ephoto.h" + +/*Populate a List of Sub Directories Inside of Directory.*/ +Ecore_List *get_directories(char *directory) +{ + Ecore_List *ls, *files; + char *file; + char path[PATH_MAX]; + + if (ecore_file_is_dir(directory)) + { + ls = ecore_list_new(); + files = ecore_list_new(); + ecore_list_set_free_cb(files, free); + if (strcmp(directory, "/")) + { + ecore_list_append(files, strdup("..")); + } + ls = ecore_file_ls(directory); + while (!ecore_list_is_empty(ls)) + { + file = ecore_list_remove_first(ls); + if (strncmp(file, ".", 1)) + { + if (strcmp(directory, "/")) + { + snprintf(path, PATH_MAX, "%s/%s", + directory, file); + } + else + { + snprintf(path, PATH_MAX, "%s%s", + directory, file); + } + } + if (ecore_file_is_dir(path)) + { + ecore_list_append(files, strdup(path)); + } + } + } + else + { + files = NULL; + } + ecore_list_goto_first(files); + return files; +} + +/*Populate a List of Images Inside of Directory*/ +Ecore_List *get_images(char *directory) +{ + Ecore_List *ls, *files; + char *file; + char path[PATH_MAX]; + + if (ecore_file_is_dir(directory)) + { + ls = ecore_list_new(); + files = ecore_list_new(); + ecore_list_set_free_cb(files, free); + + ls = ecore_file_ls(directory); + while (!ecore_list_is_empty(ls)) + { + file = ecore_list_remove_first(ls); + if (strncmp(file, ".", 1)) + { + if (strcmp(directory, "/")) + { + snprintf(path, PATH_MAX, "%s/%s", + directory, file); + } + else + { + snprintf(path, PATH_MAX, "%s%s", + directory, file); + } + if (fnmatch("*.[Jj][Pp][Ee][Gg]", path, 0) == 0) + { + ecore_list_append(files, strdup(path)); + } + else if (fnmatch("*.[Jj][Pp][Gg]", path, 0) == 0) + { + ecore_list_append(files, strdup(path)); + } + else if (fnmatch("*.[Pp][Nn][Gg]", path, 0) == 0) + { + ecore_list_append(files, strdup(path)); + } + } + } + } + else + { + files = NULL; + } + ecore_list_goto_first(files); + return files; +} diff --git a/src/bin/ephoto_database.c b/src/bin/ephoto_database.c new file mode 100644 index 0000000..b2aeb59 --- /dev/null +++ b/src/bin/ephoto_database.c @@ -0,0 +1,245 @@ +#include "ephoto.h" + +/*Ephoto databasing callbacks*/ +static int get_album_id(void *notused, int argc, char **argv, char **col); +static int get_image_id(void *notused, int argc, char **argv, char **col); +static int list_albums(void *notused, int argc, char **argv, char **col); +static int list_images(void *notused, int argc, char **argv, char **col); +static int list_image_ids(void *notused, int argc, char **argv, char **col); + +/*Ephoto databasing global variables*/ +static int image_id, album_id; + +/*Ephoto databasing ecore global variables*/ +static Ecore_List *albums, *images_list, *image_ids; + +/*Open the sqlite3 database. Create the database if it does not already exits.*/ +sqlite3 *ephoto_db_init(void) +{ + char path[PATH_MAX]; + char path2[PATH_MAX]; + sqlite3 *db; + + snprintf(path, PATH_MAX, "%s/.ephoto/.ephoto_database", getenv("HOME")); + snprintf(path2, PATH_MAX, "%s/.ephoto", getenv("HOME")); + + if (!ecore_file_exists(path)) + { + if (!ecore_file_exists(path2)) + { + ecore_file_mkdir(path2); + } + sqlite3_open(path, &db); + sqlite3_exec(db, "CREATE TABLE 'albums'( " + "id INTEGER PRIMARY KEY AUTOINCREMENT, " + "name VARCHAR( 255 ) NOT NULL, " + "description VARCHAR( 255 ) NULL);", 0, 0, 0); + sqlite3_exec(db, "CREATE TABLE images( " + "id INTEGER PRIMARY KEY AUTOINCREMENT, " + "name VARCHAR( 255 ) NULL, " + "path VARCHAR( 255 ) NOT NULL);", 0, 0, 0); + sqlite3_exec(db, "CREATE TABLE album_images( " + "image_id INTEGER NOT NULL, " + "album_id INTEGER NOT NULL);", 0, 0, 0); + ephoto_db_add_album(db, "Complete Library", "Contains every tagged image!"); + } + else + { + sqlite3_open(path, &db); + } + return db; +} + +/*Get the id of an image in the images table*/ +static int get_image_id(void *notused, int argc, char **argv, char **col) +{ + int i; + + notused = 0; + i = 0; + + image_id = atoi(argv[i] ? argv[i] : "NULL"); + + return 0; +} + +/*Get the id of an album in the albums table*/ +static int get_album_id(void *notused, int argc, char **argv, char **col) +{ + int i; + + notused = 0; + i = 0; + + album_id = atoi(argv[i] ? argv[i] : "NULL"); + + return 0; +} + +/*Add a new album to the album table*/ +void ephoto_db_add_album(sqlite3 *db, char *name, char *description) +{ + char command[PATH_MAX]; + + snprintf(command, PATH_MAX, "INSERT or IGNORE INTO albums(name, description) " + "VALUES('%s', '%s');", name, description); + sqlite3_exec(db, command, 0, 0, 0); + + return; +} + +/*Deleate an album from the album table*/ +void ephoto_db_delete_album(sqlite3 *db, char *name) +{ + char command[PATH_MAX]; + + snprintf(command, PATH_MAX, "DELETE FROM albums WHERE name = '%s';", name); + sqlite3_exec(db, command, 0, 0, 0); + snprintf(command, PATH_MAX, "SELECT id FROM albums WHERE name = '%s';", name); + sqlite3_exec(db, command, get_album_id, 0, 0); + snprintf(command, PATH_MAX, "DELETE FROM album_images WHERE album_id = '%s';", album_id); + sqlite3_exec(db, command, 0, 0, 0); + + return; +} + +/*Add a new image to a particular album*/ +void ephoto_db_add_image(sqlite3 *db, char *album, char *name, char *path) +{ + char command[PATH_MAX]; + + snprintf(command, PATH_MAX, "INSERT or IGNORE INTO images(name, path) " + "VALUES('%s', '%s');", name, path); + sqlite3_exec(db, command, 0, 0, 0); + snprintf(command, PATH_MAX, "SELECT id FROM images WHERE path = '%s';", path); + sqlite3_exec(db, command, get_image_id, 0, 0); + snprintf(command, PATH_MAX, "SELECT id FROM albums WHERE name = '%s';", album); + sqlite3_exec(db, command, get_album_id, 0, 0); + snprintf(command, PATH_MAX, "INSERT or IGNORE into album_images(image_id, album_id) " + "VALUES('%d', '%d');", image_id, album_id); + sqlite3_exec(db, command, 0, 0, 0); + + /*This is to make sure the complete library has all images*/ + snprintf(command, PATH_MAX, "SELECT id FROM albums WHERE name = 'Complete Library';"); + sqlite3_exec(db, command, get_album_id, 0, 0); + snprintf(command, PATH_MAX, "INSERT into album_images(image_id, album_id) " + "VALUES('%d', '%d');", image_id, album_id); + sqlite3_exec(db, command, 0, 0, 0); + + return; +} + +/*Delete an image from a particular album*/ +void ephoto_db_delete_image(sqlite3 *db, char *album, char *path) +{ + char command[PATH_MAX]; + + snprintf(command, PATH_MAX, "SELECT id FROM albums WHERE name = '%s';", album); + sqlite3_exec(db, command, get_album_id, 0, 0); + snprintf(command, PATH_MAX, "SELECT id FROM images WHERE path = '%s';", path); + sqlite3_exec(db, command, get_image_id, 0, 0); + snprintf(command, PATH_MAX, "DELETE FROM album_images WHERE " + "image_id = '%d' AND album_id = '%d';", image_id, album_id); + sqlite3_exec(db, command, 0, 0, 0); + return; +} + +/*Populate a list the albums in the albums table*/ +static int list_albums(void *notused, int argc, char **argv, char **col) +{ + int i; + + notused = 0; + + for(i = 0; i < argc; i++) + { + ecore_list_append(albums, strdup(argv[i] ? argv[i] : "NULL")); + } + + return 0; +} + +/*Return a list of albums in the albums table*/ +Ecore_List *ephoto_db_list_albums(sqlite3 *db) +{ + if(albums) + { + ecore_list_destroy(albums); + } + albums = ecore_list_new(); + sqlite3_exec(db, "SELECT name FROM albums;", list_albums, 0, 0); + + return albums; +} + +/*Populate a list of images belonging to a certain album*/ +static int list_images(void *notused, int argc, char **argv, char **col) +{ + int i; + + notused = 0; + + for(i = 0; i < argc; i++) + { + ecore_list_append(images_list, strdup(argv[i] ? argv[i] : "NULL")); + } + + return 0; +} + +/*Populate a list of the id's of images belonging to a certain album*/ +static int list_image_ids(void *notused, int argc, char **argv, char **col) +{ + char command[PATH_MAX]; + int i; + + notused = 0; + + for(i = 0; i < argc; i++) + { + ecore_list_append(image_ids, strdup(argv[i] ? argv[i] : "NULL")); + } + + return 0; +} + +/*Return a list of images belonging to a certain album*/ +Ecore_List *ephoto_db_list_images(sqlite3 *db, char *album) +{ + char command[PATH_MAX]; + char *id; + + if(images_list) + { + ecore_list_destroy(images_list); + } + if(image_ids) + { + ecore_list_destroy(image_ids); + } + images_list = ecore_list_new(); + image_ids = ecore_list_new(); + + snprintf(command, PATH_MAX, "SELECT id FROM albums WHERE name = '%s';", album); + sqlite3_exec(db, command, get_album_id, 0, 0); + snprintf(command, PATH_MAX, "SELECT image_id FROM album_images WHERE album_id = '%d';", album_id); + sqlite3_exec(db, command, list_image_ids, 0, 0); + + while(!ecore_list_is_empty(image_ids)) + { + id = ecore_list_remove_first(image_ids); + snprintf(command, PATH_MAX, "SELECT path FROM images WHERE id" + " = '%s'", id); + sqlite3_exec(db, command, list_images, 0, 0); + } + + return images_list; +} + +/*Close the sqlite3 database*/ +void ephoto_db_close(sqlite3 *db) +{ + sqlite3_close(db); + return; +} + diff --git a/src/bin/ephoto_edit_view.c b/src/bin/ephoto_edit_view.c new file mode 100644 index 0000000..8cb64b8 --- /dev/null +++ b/src/bin/ephoto_edit_view.c @@ -0,0 +1,78 @@ +#include "ephoto.h" + +/*Ephoto Image Manipulation*/ +static void flip_image_horizontal(Ewl_Widget *w, void *event, void *data); +static void flip_image_vertical(Ewl_Widget *w, void *event, void *data); +static void rotate_image_left(Ewl_Widget *w, void *event, void *data); +static void rotate_image_right(Ewl_Widget *w, void *event, void *data); + +/*Show the edit view*/ +void show_edit_view(Ewl_Widget *w, void *event, void *data) +{ + ewl_notebook_visible_page_set(EWL_NOTEBOOK(view_box), edit_vbox); + ewl_widget_hide(atree); + ewl_widget_hide(tbar); + ewl_widget_hide(ilabel); + ewl_widget_reparent(eimage); +} + +/*Flip the image 180 degrees horizontally*/ +static void flip_image_horizontal(Ewl_Widget *w, void *event, void *data) +{ + unsigned int *image_data; + int nw, nh; + + evas_object_image_size_get(EWL_IMAGE(eimage)->image, &nw, &nh); + image_data = flip_horizontal(eimage); + update_image(eimage, nw, nh, image_data); + ewl_widget_configure(eimage); + ewl_widget_configure(eimage->parent); + + return; +} + +/*Flip the image 180 degrees vertically*/ +static void flip_image_vertical(Ewl_Widget *w, void *event, void *data) +{ + unsigned int *image_data; + int nw, nh; + + evas_object_image_size_get(EWL_IMAGE(eimage)->image, &nw, &nh); + image_data = flip_vertical(eimage); + update_image(eimage, nw, nh, image_data); + ewl_widget_configure(eimage); + ewl_widget_configure(eimage->parent); + + return; +} + +/*Rotate the image 90 degrees to the left*/ +static void rotate_image_left(Ewl_Widget *w, void *event, void *data) +{ + unsigned int *image_data; + int nw, nh; + + evas_object_image_size_get(EWL_IMAGE(eimage)->image, &nh, &nw); + image_data = rotate_left(eimage); + update_image(eimage, nw, nh, image_data); + ewl_widget_configure(eimage); + ewl_widget_configure(eimage->parent); + + return; +} + +/*Rotate the image 90 degrees to the right*/ +static void rotate_image_right(Ewl_Widget *w, void *event, void *data) +{ + unsigned int *image_data; + int nw, nh; + + evas_object_image_size_get(EWL_IMAGE(eimage)->image, &nh, &nw); + image_data = rotate_right(eimage); + update_image(eimage, nw, nh, image_data); + ewl_widget_configure(eimage); + ewl_widget_configure(eimage->parent); + + return; +} + diff --git a/src/bin/ephoto_exif.c b/src/bin/ephoto_exif.c new file mode 100644 index 0000000..8a329c6 --- /dev/null +++ b/src/bin/ephoto_exif.c @@ -0,0 +1,183 @@ +#include "ephoto.h" + +static char *get_image(void); +static void close_dialog(Ewl_Widget *w, void *event, void *data); +static void add_exif_to_container(Ewl_Widget *w, void *event, void *data); + +/*Get the Exif Data for an image and return it in a hash*/ +Ecore_Hash *get_exif_data(char *file) +{ + const char **args, *ifd_name, *title; + char value[1024]; + unsigned int i, tag; + Ecore_Hash *exif_info; + ExifEntry *entry; + ExifData *data; + ExifLoader *loader; + + args = calloc(1, sizeof(const char *)); + args[0] = file; + + exif_info = ecore_hash_new(ecore_str_hash, ecore_str_compare); + ecore_hash_set_free_key(exif_info, free); + ecore_hash_set_free_value(exif_info, free); + + loader = exif_loader_new(); + exif_loader_write_file(loader, *args); + + data = exif_loader_get_data(loader); + if (!data) + { + exif_loader_unref(loader); + return NULL; + } + exif_loader_unref(loader); + + for(tag = 0; tag < 0xffff; tag++) + { + title = exif_tag_get_title(tag); + for (i = 0; i < EXIF_IFD_COUNT; i++) + { + entry = exif_content_get_entry(data->ifd[i], tag); + if (entry) + { + exif_entry_ref(entry); + exif_entry_get_value(entry, value, sizeof(value)); + ecore_hash_set(exif_info, strdup(title), strdup(value)); + exif_entry_unref(entry); + } + } + } + exif_data_unref(data); + + return exif_info; +} + +/*Get the current image*/ +static char *get_image(void) +{ + char *img; + + if (ewl_widget_onscreen_is(fbox_vbox)) + { + img = (char *)ewl_widget_name_get(currentf); + } + else if (ewl_widget_onscreen_is(list_vbox)) + { + img = (char *)ewl_widget_name_get(currenti); + } + else if (ewl_widget_onscreen_is(edit_vbox)) + { + img = (char *)ewl_image_file_path_get(EWL_IMAGE(eimage)); + } + + return img; +} + +/*Close a dialog*/ +static void close_dialog(Ewl_Widget *w, void *event, void *data) +{ + Ecore_List *destroy; + Ewl_Widget *win; + + win = data; + destroy = ewl_widget_data_get(win, "list"); + ecore_list_destroy(destroy); + ewl_widget_destroy(win); + + return; +} + +/*Add all the exif information to the container w*/ +static void add_exif_to_container(Ewl_Widget *w, void *event, void *data) +{ + char *img, *key, *value, text[PATH_MAX]; + Ecore_Hash *exif_info; + Ecore_List *keys, *values; + Ewl_Widget *win; + + win = data; + + values = ecore_list_new(); + ecore_list_set_free_cb(values, free); + + img = get_image(); + exif_info = get_exif_data(img); + + if(ecore_hash_count(exif_info) == 0) + { + ecore_list_append(values, strdup("No Exif Data Exists")); + } + else + { + keys = ecore_hash_keys(exif_info); + while (!ecore_list_is_empty(keys)) + { + key = ecore_list_remove_first(keys); + value = ecore_hash_get(exif_info, key); + + snprintf(text, PATH_MAX, "%s: %s", key, value); + ecore_list_append(values, strdup(text)); + } + } + ewl_mvc_data_set(EWL_MVC(w), values); + ewl_widget_data_set(win, "list", values); + ecore_hash_destroy(exif_info); + + return; +} + +/*Display a dialog which will display exif data*/ +void display_exif_dialog(Ewl_Widget *w, void *event, void *data) +{ + char *img; + Ecore_Hash *exif_info; + Ewl_Widget *win, *vbox, *image, *sp, *list, *label; + Ewl_Model *model; + Ewl_View *view; + + img = get_image(); + + win = ewl_window_new(); + ewl_window_title_set(EWL_WINDOW(win), "Ephoto Exif Info"); + ewl_window_name_set(EWL_WINDOW(win), "Ephoto Exif Info"); + ewl_window_dialog_set(EWL_WINDOW(win), 1); + ewl_object_size_request(EWL_OBJECT(win), 310, 460); + ewl_callback_append(win, EWL_CALLBACK_DELETE_WINDOW, close_dialog, win); + ewl_widget_show(win); + + vbox = ewl_vbox_new(); + ewl_object_fill_policy_set(EWL_OBJECT(vbox), EWL_FLAG_FILL_ALL); + ewl_container_child_append(EWL_CONTAINER(win), vbox); + ewl_widget_show(vbox); + + label = add_label(vbox, "Preview", 0); + + image = add_image(vbox, img, 1, NULL, NULL); + ewl_image_constrain_set(EWL_IMAGE(image), 120); + ewl_object_alignment_set(EWL_OBJECT(image), EWL_FLAG_ALIGN_CENTER); + ewl_object_fill_policy_set(EWL_OBJECT(image), EWL_FLAG_FILL_SHRINK); + + label = add_label(vbox, "Image Information", 0); + + sp = ewl_scrollpane_new(); + ewl_object_fill_policy_set(EWL_OBJECT(sp), EWL_FLAG_FILL_ALL); + ewl_container_child_append(EWL_CONTAINER(vbox), sp); + ewl_widget_show(sp); + + model = ewl_model_ecore_list_get(); + view = ewl_label_view_get(); + + list = ewl_list_new(); + ewl_mvc_model_set(EWL_MVC(list), model); + ewl_mvc_view_set(EWL_MVC(list), view); + ewl_object_fill_policy_set(EWL_OBJECT(list), EWL_FLAG_FILL_ALL); + ewl_container_child_append(EWL_CONTAINER(sp), list); + ewl_callback_append(list, EWL_CALLBACK_SHOW, add_exif_to_container, win); + ewl_widget_show(list); + + add_button(vbox, "Close", PACKAGE_DATA_DIR "/images/dialog-close.png", close_dialog, win); + + return; +} + diff --git a/src/bin/ephoto_gui.c b/src/bin/ephoto_gui.c new file mode 100644 index 0000000..8869ca9 --- /dev/null +++ b/src/bin/ephoto_gui.c @@ -0,0 +1,107 @@ +#include "ephoto.h" + +/*Create and Add a Button to the Container c*/ +Ewl_Widget *add_button(Ewl_Widget *c, char *txt, char *img, void *cb, void *data) +{ + Ewl_Widget *button; + + button = ewl_button_new(); + if (img) + { + ewl_button_image_set(EWL_BUTTON(button), img, NULL); + } + if (txt) + { + ewl_button_label_set(EWL_BUTTON(button), _(txt)); + } + ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_CENTER); + ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_SHRINK); + ewl_container_child_append(EWL_CONTAINER(c), button); + if (cb) + { + ewl_callback_append(button, EWL_CALLBACK_CLICKED, cb, data); + } + ewl_widget_show(button); + + return button; +} + +/*Create and Add an Image to the Container c*/ +Ewl_Widget *add_image(Ewl_Widget *c, char *img, int thumbnail, void *cb, void *data) +{ + Ewl_Widget *image; + int w, h; + + if(!thumbnail) + { + image = ewl_image_new(); + if (img) + { + ewl_image_file_path_set(EWL_IMAGE(image), img); + } + } + else + { + image_pixels_int_get(img, &w, &h); + + image = ewl_image_thumbnail_new(); + if (w > 75 || h > 75) + { + if(image) + { + ewl_image_file_path_set(EWL_IMAGE(image), PACKAGE_DATA_DIR "/images/image.png"); + ewl_image_thumbnail_request(EWL_IMAGE_THUMBNAIL(image), img); + } + } + else + { + if(image) + { + ewl_image_file_path_set(EWL_IMAGE(image), img); + } + } + ewl_image_constrain_set(EWL_IMAGE(image), 60); + } + ewl_image_proportional_set(EWL_IMAGE(image), TRUE); + ewl_object_alignment_set(EWL_OBJECT(image), EWL_FLAG_ALIGN_LEFT); + ewl_container_child_append(EWL_CONTAINER(c), image); + if (cb) + { + ewl_callback_append(image, EWL_CALLBACK_CLICKED, cb, data); + } + ewl_widget_show(image); + + return image; +} + +/*Add a label to the container c, with the text lbl, and whether you want it blue*/ +Ewl_Widget *add_label(Ewl_Widget *c, char *lbl, int blue) +{ + Ewl_Widget *label; + + label = ewl_label_new(); + ewl_label_text_set(EWL_LABEL(label), lbl); + ewl_object_alignment_set(EWL_OBJECT(label), EWL_FLAG_ALIGN_CENTER); + ewl_object_fill_policy_set(EWL_OBJECT(label), EWL_FLAG_FILL_HFILL); + ewl_container_child_append(EWL_CONTAINER(c), label); + if(blue) + { + ewl_widget_state_set(label, "blue", EWL_STATE_PERSISTENT); + } + ewl_widget_show(label); + + return label; +} + +/*Add a shadow to the container c*/ +Ewl_Widget *add_shadow(Ewl_Widget *c) +{ + Ewl_Widget *shadow; + + shadow = ewl_shadow_new(); + ewl_container_child_append(EWL_CONTAINER(c), shadow); + ewl_widget_show(shadow); + + return shadow; +} + diff --git a/src/bin/ephoto_imaging.c b/src/bin/ephoto_imaging.c new file mode 100644 index 0000000..997af83 --- /dev/null +++ b/src/bin/ephoto_imaging.c @@ -0,0 +1,138 @@ +#include "ephoto.h" + +unsigned int *flip_horizontal(Ewl_Widget *image) +{ + unsigned int *im_data, *im_data_new; + int index, ind, i, j, ni, nj, ew, eh; + + im_data = evas_object_image_data_get(EWL_IMAGE(image)->image, FALSE); + evas_object_image_size_get(EWL_IMAGE(image)->image, &ew, &eh); + + index = 0; + + im_data_new = malloc(sizeof(unsigned int) * ew * eh); + + for (i = 0; i < eh; i ++) + { + for (j = 0; j < ew; j++) + { + ni = i; + nj = ew - j - 1; + + ind = ni * ew + nj; + + im_data_new[index] = im_data[ind]; + + index++; + } + } + return im_data_new; +} + +unsigned int *flip_vertical(Ewl_Widget *image) +{ + unsigned int *im_data, *im_data_new; + int index, ind, i, j, ni, nj, ew, eh; + + im_data = evas_object_image_data_get(EWL_IMAGE(image)->image, FALSE); + evas_object_image_size_get(EWL_IMAGE(image)->image, &ew, &eh); + + index = 0; + + im_data_new = malloc(sizeof(unsigned int) * ew * eh); + + for (i = 0; i < eh; i++) + { + for (j = 0; j < ew; j++) + { + ni = eh - i - 1; + nj = j; + + ind = ni * ew + nj; + + im_data_new[index] = im_data[ind]; + + index++; + } + } + return im_data_new; +} + +unsigned int *rotate_left(Ewl_Widget *image) +{ + unsigned int *im_data, *im_data_new; + int index, ind, i, j, ni, nj, ew, eh, nw, nh; + + im_data = evas_object_image_data_get(EWL_IMAGE(image)->image, FALSE); + evas_object_image_size_get(EWL_IMAGE(image)->image, &ew, &eh); + + index = 0; + + im_data_new = malloc(sizeof(unsigned int) * ew * eh); + + nw = eh; + nh = ew; + + for (i = 0; i < nh; i++) + { + for (j = 0; j < nw; j++) + { + ni = j; + nj = nh - i - 1; + + ind = ni * nh + nj; + + im_data_new[index] = im_data[ind]; + + index++; + } + } + return im_data_new; +} + +unsigned int *rotate_right(Ewl_Widget *image) +{ + unsigned int *im_data, *im_data_new; + int index, ind, i, j, ni, nj, ew, eh, nw, nh; + + im_data = evas_object_image_data_get(EWL_IMAGE(image)->image, FALSE); + evas_object_image_size_get(EWL_IMAGE(image)->image, &ew, &eh); + + index = 0; + + im_data_new = malloc(sizeof(unsigned int) * ew * eh); + + nw = eh; + nh = ew; + + for (i = 0; i < nh; i++) + { + for (j = 0; j < nw; j++) + { + ni = nw - j - 1; + nj = i; + + ind = ni * nh + nj; + + im_data_new[index] = im_data[ind]; + + index++; + } + } + return im_data_new; +} + +void update_image(Ewl_Widget *image, int w, int h, unsigned int *data) +{ + if (w && h && !data) + { + ewl_image_size_set(EWL_IMAGE(image), w, h); + ewl_widget_configure(image); + } + if (w && h && data) + { + evas_object_image_size_set(EWL_IMAGE(image)->image, w, h); + evas_object_image_data_set(EWL_IMAGE(image)->image, data); + evas_object_image_data_update_add(EWL_IMAGE(image)->image, 0, 0, w, h); + } +} diff --git a/src/bin/ephoto_list_view.c b/src/bin/ephoto_list_view.c new file mode 100644 index 0000000..216edd7 --- /dev/null +++ b/src/bin/ephoto_list_view.c @@ -0,0 +1,140 @@ +#include "ephoto.h" + +static Ewl_Widget *list_view_new(void); +static void list_view_assign(Ewl_Widget *w, void *data); +static Ewl_Widget *list_header_fetch(void *data, int column); +static void *list_data_fetch(void *data, unsigned int row, unsigned int column); +static int list_data_count(void *data); + +/*Show the list view*/ +void show_list_view(Ewl_Widget *w, void *event, void *data) +{ + ewl_notebook_visible_page_set(EWL_NOTEBOOK(view_box), list_vbox); + ewl_mvc_dirty_set(EWL_MVC(ltree), 1); + ewl_widget_hide(ilabel); + ewl_widget_show(atree); + ewl_widget_show(tbar); +} + +/*Create and Add a Tree to the Container c*/ +Ewl_Widget *add_ltree(Ewl_Widget *c) +{ + Ewl_Widget *tree; + Ewl_Model *model; + Ewl_View *view; + + model = ewl_model_new(); + ewl_model_fetch_set(model, list_data_fetch); + ewl_model_count_set(model, list_data_count); + + tree = ewl_tree2_new(); + ewl_tree2_headers_visible_set(EWL_TREE2(tree), 0); + ewl_mvc_model_set(EWL_MVC(tree), model); + ewl_object_fill_policy_set(EWL_OBJECT(tree), EWL_FLAG_FILL_ALL); + ewl_container_child_append(EWL_CONTAINER(c), tree); + ewl_widget_show(tree); + + view = ewl_view_new(); + ewl_view_constructor_set(view, list_view_new); + ewl_view_assign_set(view, list_view_assign); + ewl_view_header_fetch_set(view, list_header_fetch); + ewl_tree2_column_append(EWL_TREE2(tree), view, FALSE); + + return tree; +} + + +/* The view of the images */ +static Ewl_Widget *list_view_new(void) +{ + Ewl_Widget *icon; + + icon = ewl_icon_new(); + ewl_icon_type_set(EWL_ICON(icon), EWL_ICON_TYPE_LONG); + ewl_box_orientation_set(EWL_BOX(icon), EWL_ORIENTATION_HORIZONTAL); + ewl_object_alignment_set(EWL_OBJECT(icon), EWL_FLAG_ALIGN_LEFT); + ewl_object_fill_policy_set(EWL_OBJECT(icon), EWL_FLAG_FILL_ALL); + ewl_callback_append(icon, EWL_CALLBACK_CLICKED, set_info, NULL); + ewl_widget_show(icon); + + return icon; +} + +/*The row that is added to the tree*/ +static void list_view_assign(Ewl_Widget *w, void *data) +{ + char *image; + char info[PATH_MAX]; + int size; + int width, height; + Ewl_Widget *text; + + image = data; + image_pixels_int_get(image, &width, &height); + if(width > 75 || height > 75) + { + ewl_icon_thumbnailing_set(EWL_ICON(w), 1); + } + else + { + ewl_icon_thumbnailing_set(EWL_ICON(w), 0); + } + ewl_icon_image_set(EWL_ICON(w), image, NULL); + ewl_icon_constrain_set(EWL_ICON(w), 67); + ewl_widget_name_set(w, image); + + size = ecore_file_size(image); + + snprintf(info, PATH_MAX, "Name: %s\n" + "Pixels: %s\n" + "Size: %s\n", + basename(image), + image_pixels_string_get(image), + file_size_get(size)); + + text = ewl_text_new(); + ewl_text_text_set(EWL_TEXT(text), info); + ewl_object_alignment_set(EWL_OBJECT(text), EWL_FLAG_ALIGN_CENTER); + ewl_widget_show(text); + ewl_icon_extended_data_set(EWL_ICON(w), text); + + return; +} + +/* The header for the tree */ +static Ewl_Widget *list_header_fetch(void *data, int column) +{ + Ewl_Widget *label; + + label = ewl_label_new(); + ewl_label_text_set(EWL_LABEL(label), "Images"); + ewl_widget_show(label); + + return label; +} + +/* The images that will be displayed*/ +static void *list_data_fetch(void *data, unsigned int row, unsigned int column) +{ + char *image; + void *val = NULL; + + image = ecore_list_goto_index(images, row); + if (image) + { + val = image; + } + + return val; +} + +/* The number of images the view is displaying */ +static int list_data_count(void *data) +{ + int val; + + val = ecore_list_nodes(images); + + return val; +} + diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c new file mode 100644 index 0000000..247af39 --- /dev/null +++ b/src/bin/ephoto_main.c @@ -0,0 +1,460 @@ +#include "ephoto.h" + +/*Ephoto Databasing Global Variables*/ +static sqlite3 *db; + +/*Ephoto Ecore Global Variables*/ +static Ecore_List *albums; + +/*Ephoto Layout Global Variable*/ +static char **views; + +/*Ewl Callbacks*/ +static void combo_changed(Ewl_Widget *w, void *event, void *data); +static void destroy(Ewl_Widget *w, void *event, void *data); +static void populate(Ewl_Widget *w, void *event, void *data); +static void window_fullscreen(Ewl_Widget *w, void *event, void *data); + +/*Ephoto Create Callbacks*/ +static Ewl_Widget *add_atree(Ewl_Widget *c); +static Ewl_Widget *add_vcombo(Ewl_Widget *c); + +/*Ephoto MVC Callbacks*/ +static Ewl_Widget *album_view_new(void); +static void album_view_assign(Ewl_Widget *w, void *data); +static Ewl_Widget *album_header_fetch(void *data, int column); +static void *album_data_fetch(void *data, unsigned int row, unsigned int column); +static int album_data_count(void *data); +static Ewl_Widget *views_header_fetch(void *data, int column); +static void *views_data_fetch(void *data, unsigned int row, unsigned int column); +static int views_data_count(void *data); + +/*Ephoto Global Variables*/ +Ewl_Widget *atree, *tbar, *vcombo, *view_box, *fbox_vbox, *edit_vbox, *list_vbox; +Ewl_Widget *fbox, *eimage, *ltree, *ilabel, *currenta, *currentf, *currenti; +Ecore_List *images; + + +/*Destroy the Main Window*/ +static void destroy(Ewl_Widget *w, void *event, void *data) +{ + Ewl_Widget *window; + + window = data; + ephoto_db_close(db); + ewl_widget_destroy(window); + ewl_main_quit(); + return; +} + +static void window_fullscreen(Ewl_Widget *w, void *event, void *data) +{ + int fullscreen; + Ewl_Widget *window; + + window = data; + fullscreen = ewl_window_fullscreen_get(EWL_WINDOW(window)); + if(!fullscreen) + { + ewl_window_fullscreen_set(EWL_WINDOW(window), 1); + } + else + { + ewl_window_fullscreen_set(EWL_WINDOW(window), 0); + } + return; +} + +/*Create the Main Ephoto Window*/ +void create_main_gui(void) +{ + Ecore_List *images; + + Ewl_Widget *win, *vbox, *spacer, *text, *entry, *hbox; + Ewl_Widget *rvbox, *sp, *hsep, *toolbar, *vsep, *image; + Ewl_Widget *shbox, *seeker; + + win = ewl_window_new(); + ewl_window_title_set(EWL_WINDOW(win), "Ephoto!"); + ewl_window_name_set(EWL_WINDOW(win), "Ephoto!"); + ewl_object_size_request(EWL_OBJECT(win), 777, 542); + ewl_callback_append(win, EWL_CALLBACK_DELETE_WINDOW, destroy, win); + ewl_widget_show(win); + + vbox = ewl_vbox_new(); + ewl_box_spacing_set(EWL_BOX(vbox), 5); + ewl_object_fill_policy_set(EWL_OBJECT(vbox), EWL_FLAG_FILL_ALL); + ewl_container_child_append(EWL_CONTAINER(win), vbox); + ewl_widget_show(vbox); + + tbar = ewl_hbox_new(); + ewl_object_fill_policy_set(EWL_OBJECT(tbar), EWL_FLAG_FILL_SHRINK); + ewl_object_alignment_set(EWL_OBJECT(tbar), EWL_FLAG_ALIGN_RIGHT); + ewl_container_child_append(EWL_CONTAINER(vbox), tbar); + ewl_widget_show(tbar); + + vcombo = add_vcombo(tbar); + + spacer = ewl_spacer_new(); + ewl_object_minimum_w_set(EWL_OBJECT(spacer), 100); + ewl_object_maximum_w_set(EWL_OBJECT(spacer), 100); + ewl_container_child_append(EWL_CONTAINER(tbar), spacer); + ewl_widget_show(spacer); + + entry = ewl_entry_new(); + ewl_object_minimum_size_set(EWL_OBJECT(entry), 157, 22); + ewl_object_maximum_size_set(EWL_OBJECT(entry), 157, 22); + ewl_container_child_append(EWL_CONTAINER(tbar), entry); + ewl_widget_show(entry); + + add_button(tbar, "Find", NULL, NULL, NULL); + + hbox = ewl_hbox_new(); + ewl_box_spacing_set(EWL_BOX(hbox), 2); + ewl_object_fill_policy_set(EWL_OBJECT(hbox), EWL_FLAG_FILL_ALL); + ewl_container_child_append(EWL_CONTAINER(vbox), hbox); + ewl_widget_show(hbox); + + atree = add_atree(hbox); + ewl_object_maximum_w_set(EWL_OBJECT(atree), 172); + + rvbox = ewl_vbox_new(); + ewl_box_spacing_set(EWL_BOX(rvbox), 1); + ewl_object_fill_policy_set(EWL_OBJECT(rvbox), EWL_FLAG_FILL_ALL); + ewl_container_child_append(EWL_CONTAINER(hbox), rvbox); + ewl_widget_show(rvbox); + + view_box = ewl_notebook_new(); + ewl_notebook_tabbar_visible_set(EWL_NOTEBOOK(view_box), 0); + ewl_object_fill_policy_set(EWL_OBJECT(view_box), EWL_FLAG_FILL_ALL); + ewl_container_child_append(EWL_CONTAINER(rvbox), view_box); + ewl_widget_show(view_box); + + fbox_vbox = ewl_vbox_new(); + ewl_object_fill_policy_set(EWL_OBJECT(fbox_vbox), EWL_FLAG_FILL_ALL); + ewl_container_child_append(EWL_CONTAINER(view_box), fbox_vbox); + ewl_widget_show(fbox_vbox); + ewl_notebook_page_tab_text_set(EWL_NOTEBOOK(view_box), fbox_vbox, "Normal"); + + sp = ewl_scrollpane_new(); + ewl_object_fill_policy_set(EWL_OBJECT(sp), EWL_FLAG_FILL_ALL); + ewl_container_child_append(EWL_CONTAINER(fbox_vbox), sp); + ewl_widget_show(sp); + + fbox = ewl_hfreebox_new(); + ewl_object_fill_policy_set(EWL_OBJECT(fbox), EWL_FLAG_FILL_ALL); + ewl_container_child_append(EWL_CONTAINER(sp), fbox); + ewl_widget_show(fbox); + + edit_vbox = ewl_vbox_new(); + ewl_object_fill_policy_set(EWL_OBJECT(edit_vbox), EWL_FLAG_FILL_ALL); + ewl_container_child_append(EWL_CONTAINER(view_box), edit_vbox); + ewl_widget_show(edit_vbox); + ewl_notebook_page_tab_text_set(EWL_NOTEBOOK(view_box), edit_vbox, "Edit"); + + eimage = add_image(edit_vbox, NULL, 0, NULL, NULL); + + list_vbox = ewl_vbox_new(); + ewl_object_fill_policy_set(EWL_OBJECT(list_vbox), EWL_FLAG_FILL_ALL); + ewl_container_child_append(EWL_CONTAINER(view_box), list_vbox); + ewl_widget_show(list_vbox); + ewl_notebook_page_tab_text_set(EWL_NOTEBOOK(view_box), list_vbox, "List"); + + ltree = add_ltree(list_vbox); + + ilabel = add_label(rvbox, "Image Information", 1); + + /*shbox = ewl_hbox_new(); + ewl_object_alignment_set(EWL_OBJECT(shbox), EWL_FLAG_ALIGN_RIGHT); + ewl_object_fill_policy_set(EWL_OBJECT(shbox), EWL_FLAG_FILL_SHRINK); + ewl_container_child_append(EWL_CONTAINER(vbox), shbox); + ewl_widget_show(shbox); + + seeker = ewl_hseeker_new(); + ewl_object_maximum_w_set(EWL_OBJECT(seeker), 150); + ewl_object_alignment_set(EWL_OBJECT(seeker), EWL_FLAG_ALIGN_RIGHT); + ewl_container_child_append(EWL_CONTAINER(shbox), seeker); + ewl_widget_show(seeker);*/ + + hsep = ewl_hseparator_new(); + ewl_container_child_append(EWL_CONTAINER(vbox), hsep); + ewl_widget_show(hsep); + + toolbar = ewl_toolbar_new(); + ewl_box_spacing_set(EWL_BOX(toolbar), 5); + ewl_object_minimum_h_set(EWL_OBJECT(toolbar), 30); + ewl_object_alignment_set(EWL_OBJECT(toolbar), EWL_FLAG_ALIGN_CENTER); + ewl_object_fill_policy_set(EWL_OBJECT(toolbar), EWL_FLAG_FILL_SHRINK); + ewl_container_child_append(EWL_CONTAINER(vbox), toolbar); + ewl_widget_show(toolbar); + + image = add_image(toolbar, PACKAGE_DATA_DIR "/images/normal_view.png", 0, show_normal_view, NULL); + ewl_image_constrain_set(EWL_IMAGE(image), 30); + + image = add_image(toolbar, PACKAGE_DATA_DIR "/images/edit_view.png", 0, show_edit_view, NULL); + ewl_image_constrain_set(EWL_IMAGE(image), 30); + + image = add_image(toolbar, PACKAGE_DATA_DIR "/images/list_view.png", 0, show_list_view, NULL); + ewl_image_constrain_set(EWL_IMAGE(image), 30); + + vsep = ewl_vseparator_new(); + ewl_container_child_append(EWL_CONTAINER(toolbar), vsep); + ewl_widget_show(vsep); + + image = add_image(toolbar, PACKAGE_DATA_DIR "/images/get_exif.png", 0, display_exif_dialog, NULL); + ewl_image_constrain_set(EWL_IMAGE(image), 30); + + vsep = ewl_vseparator_new(); + ewl_container_child_append(EWL_CONTAINER(toolbar), vsep); + ewl_widget_show(vsep); + + image = add_image(toolbar, PACKAGE_DATA_DIR "/images/stock_fullscreen.png", 0, window_fullscreen, win); + ewl_image_constrain_set(EWL_IMAGE(image), 30); + + image = add_image(toolbar, PACKAGE_DATA_DIR "/images/x-office-presentation.png", 0, NULL, NULL); + ewl_image_constrain_set(EWL_IMAGE(image), 30); + + albums = ecore_list_new(); + db = ephoto_db_init(); + albums = ephoto_db_list_albums(db); + + ewl_mvc_data_set(EWL_MVC(atree), albums); + + populate(NULL, NULL, "Complete Library"); + + ewl_main(); + + return; +} + +/*Update the Image List*/ +static void populate(Ewl_Widget *w, void *event, void *data) +{ + char *album, *imagef; + Ewl_Widget *shadow, *thumb; + + if (w) + { + album = (char *)ewl_widget_name_get(w); + if (currenta) + { + ewl_widget_state_set(currenta, "unselected", EWL_STATE_PERSISTENT); + ewl_widget_state_set(EWL_ICON(currenta)->label, "default", EWL_STATE_PERSISTENT); + } + currenta = w; + ewl_widget_state_set(currenta, "selected", EWL_STATE_PERSISTENT); + ewl_widget_state_set(EWL_ICON(currenta)->label, "blue", EWL_STATE_PERSISTENT); + } + else + { + album = data; + } + + if (images) + { + ecore_list_destroy(images); + } + + images = ecore_list_new(); + images = ephoto_db_list_images(db, album); + + ecore_list_goto_first(images); + ewl_container_reset(EWL_CONTAINER(fbox)); + while (ecore_list_current(images)) + { + imagef = ecore_list_current(images); + + thumb = add_image(fbox, imagef, 1, set_info, NULL); + ewl_object_alignment_set(EWL_OBJECT(thumb), EWL_FLAG_ALIGN_CENTER); + ewl_widget_name_set(thumb, imagef); + + ecore_list_next(images); + } + + ecore_list_goto_first(images); + + ewl_mvc_data_set(EWL_MVC(ltree), images); + ewl_mvc_dirty_set(EWL_MVC(ltree), 1); + + ewl_image_file_set(EWL_IMAGE(eimage), ecore_list_current(images), NULL); + + return; +} + +/*Create the view combo*/ +static Ewl_Widget *add_vcombo(Ewl_Widget *c) +{ + Ewl_Widget *combo; + Ewl_Model *model; + Ewl_View *view; + + views = calloc(3, sizeof(char *)); + views[0] = strdup("Normal"); + views[1] = strdup("Edit"); + views[2] = strdup("List"); + + model = ewl_model_new(); + ewl_model_fetch_set(model, views_data_fetch); + ewl_model_count_set(model, views_data_count); + + view = ewl_view_new(); + ewl_view_constructor_set(view, ewl_label_new); + ewl_view_assign_set(view, EWL_VIEW_ASSIGN(ewl_label_text_set)); + ewl_view_header_fetch_set(view, views_header_fetch); + + combo = ewl_combo_new(); + ewl_mvc_model_set(EWL_MVC(combo), model); + ewl_mvc_view_set(EWL_MVC(combo), view); + ewl_mvc_data_set(EWL_MVC(combo), views); + ewl_object_fill_policy_set(EWL_OBJECT(combo), EWL_FLAG_FILL_SHRINK); + ewl_container_child_append(EWL_CONTAINER(c), combo); + ewl_callback_append(combo, EWL_CALLBACK_VALUE_CHANGED, combo_changed, NULL); + ewl_widget_show(combo); + + return combo; +} + +/*Create a header for the view combo*/ +static Ewl_Widget *views_header_fetch(void *data, int col) +{ + Ewl_Widget *header; + + header = ewl_label_new(); + ewl_label_text_set(EWL_LABEL(header), "Select a View"); + ewl_widget_show(header); + + return header; +} + +/*Get the data for the view combo*/ +static void *views_data_fetch(void *data, unsigned int row, unsigned int col) +{ + if (row < 3) return views[row]; + else return NULL; +} + +/*Show the number of items in the view*/ +static int views_data_count(void *data) +{ + return 3; +} + +/*Switch between views when the combo changes*/ +static void combo_changed(Ewl_Widget *w, void *event, void *data) +{ + Ewl_Selection_Idx *idx; + + idx = ewl_mvc_selected_get(EWL_MVC(w)); + + if (!strcmp(views[idx->row], "Normal")) + { + show_normal_view(NULL, NULL, NULL); + } + else if (!strcmp(views[idx->row], "Edit")) + { + show_edit_view(NULL, NULL, NULL); + } + else if (!strcmp(views[idx->row], "List")) + { + show_list_view(NULL, NULL, NULL); + } + + return; +} + +/*Create and Add a Tree to the Container c*/ +static Ewl_Widget *add_atree(Ewl_Widget *c) +{ + Ewl_Widget *tree; + Ewl_Model *model; + Ewl_View *view; + + model = ewl_model_new(); + ewl_model_fetch_set(model, album_data_fetch); + ewl_model_count_set(model, album_data_count); + + tree = ewl_tree2_new(); + ewl_tree2_headers_visible_set(EWL_TREE2(tree), 0); + ewl_mvc_model_set(EWL_MVC(tree), model); + ewl_mvc_selection_mode_set(EWL_MVC(tree), EWL_SELECTION_MODE_SINGLE); + ewl_object_fill_policy_set(EWL_OBJECT(tree), EWL_FLAG_FILL_ALL); + ewl_container_child_append(EWL_CONTAINER(c), tree); + ewl_widget_show(tree); + + view = ewl_view_new(); + ewl_view_constructor_set(view, album_view_new); + ewl_view_assign_set(view, album_view_assign); + ewl_view_header_fetch_set(view, album_header_fetch); + ewl_tree2_column_append(EWL_TREE2(tree), view, FALSE); + + return tree; +} + + +/* The view of the users albums */ +static Ewl_Widget *album_view_new(void) +{ + Ewl_Widget *icon; + + icon = ewl_icon_new(); + ewl_icon_thumbnailing_set(EWL_ICON(icon), FALSE); + ewl_box_orientation_set(EWL_BOX(icon), EWL_ORIENTATION_HORIZONTAL); + ewl_object_alignment_set(EWL_OBJECT(icon), EWL_FLAG_ALIGN_LEFT); + ewl_object_fill_policy_set(EWL_OBJECT(icon), EWL_FLAG_FILL_ALL); + ewl_widget_show(icon); + + return icon; +} + +/*The row that is added to the tree*/ +static void album_view_assign(Ewl_Widget *w, void *data) +{ + char *album; + + album = data; + ewl_icon_image_set(EWL_ICON(w), PACKAGE_DATA_DIR "/images/image.png", NULL); + ewl_icon_label_set(EWL_ICON(w), album); + ewl_icon_constrain_set(EWL_ICON(w), 25); + ewl_widget_name_set(w, album); + ewl_callback_append(w, EWL_CALLBACK_CLICKED, populate, NULL); + + return; +} + +/* The header for the tree */ +static Ewl_Widget *album_header_fetch(void *data, int column) +{ + Ewl_Widget *label; + + label = ewl_label_new(); + ewl_label_text_set(EWL_LABEL(label), "Browser"); + ewl_widget_show(label); + + return label; +} + +/* The albums that will be displayed*/ +static void *album_data_fetch(void *data, unsigned int row, unsigned int column) +{ + char *album; + void *val = NULL; + + album = ecore_list_goto_index(albums, row); + if (album) + { + val = album; + } + + return val; +} + +/* The number of albums the view is displaying */ +static int album_data_count(void *data) +{ + int val; + + val = ecore_list_nodes(albums); + + return val; +} + diff --git a/src/bin/ephoto_nls.c b/src/bin/ephoto_nls.c new file mode 100644 index 0000000..16844e7 --- /dev/null +++ b/src/bin/ephoto_nls.c @@ -0,0 +1,15 @@ +#include "ephoto.h" +#include + +/*NLS Translator*/ +char *sgettext(const char *msgid) +{ + char *msgval = gettext(msgid); + + if (msgval == msgid) + { + msgval = strrchr(msgid, '|') + 1; + } + + return msgval; +} diff --git a/src/bin/ephoto_normal_view.c b/src/bin/ephoto_normal_view.c new file mode 100644 index 0000000..97b9f58 --- /dev/null +++ b/src/bin/ephoto_normal_view.c @@ -0,0 +1,45 @@ +#include "ephoto.h" + +/*Show the normal view*/ +void show_normal_view(Ewl_Widget *w, void *event, void *data) +{ + ewl_notebook_visible_page_set(EWL_NOTEBOOK(view_box), fbox_vbox); + ewl_widget_show(atree); + ewl_widget_show(tbar); + ewl_widget_show(ilabel); + ewl_widget_configure(fbox); +} + +/*Set the info that is in the info label on normal view*/ +void set_info(Ewl_Widget *w, void *event, void *data) +{ + char *path, *pixels, *size; + char info[PATH_MAX]; + time_t modtime; + + if (ewl_widget_type_is(w, EWL_IMAGE_TYPE)) + { + if (currentf) ewl_widget_state_set(currentf, "unselected", EWL_STATE_PERSISTENT); + currentf = w; + ewl_widget_state_set(currentf, "selected", EWL_STATE_PERSISTENT); + } + else + { + if (currenti) + { + ewl_widget_state_set(currenti, "unselected", EWL_STATE_PERSISTENT); + } + currenti = w; + ewl_widget_state_set(currenti, "selected", EWL_STATE_PERSISTENT); + } + path = (char *)ewl_widget_name_get(w); + pixels = image_pixels_string_get(path); + size = file_size_get(ecore_file_size(path)); + modtime = ecore_file_mod_time(path); + snprintf(info, PATH_MAX, "%s - %s - %s", basename(path), pixels, size); + + ewl_label_text_set(EWL_LABEL(ilabel), info); + ewl_widget_reparent(ilabel); + + return; +} diff --git a/src/bin/ephoto_utils.c b/src/bin/ephoto_utils.c new file mode 100644 index 0000000..1c79c5a --- /dev/null +++ b/src/bin/ephoto_utils.c @@ -0,0 +1,60 @@ +#include "ephoto.h" + +/*Get the pixels and return them in a string*/ +char *image_pixels_string_get(const char *file) +{ + char pixels[PATH_MAX]; + int w, h; + Evas_Imaging_Image *image; + + image = evas_imaging_image_load(file, NULL); + evas_imaging_image_size_get(image, &w, &h); + evas_imaging_image_free(image); + + snprintf(pixels, PATH_MAX, "%d x %d", w, h); + + return strdup(pixels); +} + +/*Get the pixels and return them in integers*/ +void image_pixels_int_get(const char *file, int *width, int *height) +{ + char pixels[PATH_MAX]; + int w, h; + Evas_Imaging_Image *image; + + image = evas_imaging_image_load(file, NULL); + evas_imaging_image_size_get(image, &w, &h); + evas_imaging_image_free(image); + + *width = w; + *height = h; + + return; +} + +/*Get the size of a file*/ +char *file_size_get(int size) +{ + double dsize; + char fsize[256]; + + dsize = (double)size; + if (dsize < 1024.0) snprintf(fsize, sizeof(fsize), _("%'.0f Bytes"), dsize); + else + { + dsize /= 1024.0; + if (dsize < 1024) snprintf(fsize, sizeof(fsize), _("%'.0f KB"), dsize); + else + { + dsize /= 1024.0; + if (dsize < 1024) snprintf(fsize, sizeof(fsize), _("%'.0f MB"), dsize); + else + { + dsize /= 1024.0; + snprintf(fsize, sizeof(fsize), _("%'.1f GB"), dsize); + } + } + } + return strdup(fsize); +}