libexif-gtk-0.4.0/000775 000000 000000 00000000000 12115730414 013676 5ustar00rootroot000000 000000 libexif-gtk-0.4.0/AUTHORS000664 000000 000000 00000000000 12115730414 014734 0ustar00rootroot000000 000000 libexif-gtk-0.4.0/COPYING000664 000000 000000 00000063502 12115730414 014737 0ustar00rootroot000000 000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! libexif-gtk-0.4.0/ChangeLog000664 000000 000000 00000013166 12115730414 015457 0ustar00rootroot000000 000000 2013-03-06 Dan Fandrich * Released ver. 0.4.0 2013-03-01 Dan Fandrich * libexif-gtk/gtk-exif-browser.c: Thumbnail save dialog now actually saves 2013-02-28 Dan Fandrich * po/pl.po: Updated Polish translation by Jakub Bogusz * po/ru.po: Updated Russian strings from libexif & elsewhere 2013-02-27 Dan Fandrich * tests/.cvsignore: ignore more stuff * Makefile.am: Add both gtk pkgconfig templates to the tarball * Added some more strings to translate that were missing * fixed crash when viewing an enumerated tag with an unsupported value * fixed problem with handling the Flash tag in big-endian images 2013-02-25 Dan Fandrich * po/es.po: Updated Spanish translation by Fabián Mandelbaum * po/pl.po: Updated Polish translation by Jakub Bogusz 2013-02-23 Dan Fandrich * Removed use of broken-by-design exif_tag_get_name(). This fixes display of GPSLatitude and GPSLatitudeRef tag names. Patch by Stanislav Brabec (bug #2014281) * Changed a few fuzzy translations and removed the fuzzyiness 2012-06-14 Dan Fandrich * encoding of source files set to utf8 (somehow this was missed in the last change) 2012-05-08 Valere Monseur * libexif-gtk made compatible for both gtk2 (min version: 2.4) and gtk3 * added --with-gtk3 option in configure.ac (default is gtk2) * encoding of ru translation file set to utf8 * fixed bugs linked to gtk_notebook_remove_page action * fixed internationalisation bugs in gtk-options.c & configure.ac 2011-12-08 Dan Fandrich * Cleanups in internationalization, whitespace & comments. Patch by Valere Monseur * po/fr.po: Updated French translation by Valère Monseur * Converted ChangeLog into UTF-8 2009-09-24 Dan Fandrich * po/POTFILES.in: added additional files that need translation 2009-09-24 Lutz Mueller * libexif-gtk/gtk-exif-entry-user-comment.c: Complete information about copyright. Fixes #1673969. 2009-09-23 Dan Fandrich * Added the text of the LGPL V2.1 in COPYING so there isn't any confusion as to the licensing terms of the project. GNU autotools adds a GPL COPYING file by default if this doesn't exist, which is wrong. 2005-08-15 Lutz Mueller Patch by Jakub Bogusz : * po/pl.po: New 2005-03-24 Hans Ulrich Niedermann * autogen.sh, configure.in, */Makefile.am, ...: Updated build system. - doesn't require gettextize any more (using autopoint now) - uses all the built-in magic from autoreconf 2004-10-18 Lutz Mueller * configure.in: We are now working on 0.3.6. 2004-10-18 Lutz Mueller * libexif-gtk/gtk-exif-entry-generic.c: * libexif-gtk/gtk-exif-content-list.c: * configure.in: Make libexif-gtk work with versions < 0.6.12. We are now working on 0.3.5. 2004-10-17 Lutz Mueller * configure.in: We have been working on 0.3.4 all the time. 2004-10-17 Lutz Mueller * libexif-gtk/gtk-exif-entry-version.c and others: Adapt to new gtk API 2004-10-17 Lutz Mueller First part of a patch to get libexif-gtk to compile again against current gtk. For now, libexif-gtk does not compile at all. * gtk-extensions/gtk-option-menu-option.[c,h]: Removed. * libexif-gtk/gtk-exif-browser.c: Redirect EXPOSURE_PROGRAM to the generic entry. * libexif-gtk/gtk-exif-tag-menu.[c,h]: Removed. * libexif-gtk/gtk-exif-entry-exposure.[c,h]: Removed. Now covered by the generic entry. * configure.in: CURRENT = 5. 2003-08-01 Lutz Mueller * libexif-gtk/gtk-exif-browser.c: Implement removal of entries. 2003-08-01 Lutz Mueller * libexif-gtk/gtk-exif-entry-resolution.c: An entry must have a parent before initialization. 2002-12-11 Lutz Müller * libexif-gtk/gtk-exif-content-list.c: Split the endless list of tags. * libexif-gtk/gtk-exif-entry-user-comment.[c,h]: New. * configure.in: Require libexif >= 0.5.9 2002-12-11 Lutz Müller * libexif-gtk/gtk-exif-content-list.c: Fix popup. 2002-09-15 Lutz Müller * configure.in: * po/es.po: Spanish translation by Fabian Mandelbaum 2002-07-25 Lutz Müller * configure.in: Version 0.3.2. Require libexif-0.5.4 or higher. * libexif-gtk/gtk-exif-browser.c: Adapt to new API. 2002-07-23 Lutz Müller * configure.in: Version 0.3.1 2002-07-23 Lutz Müller Finish gtk+-2.0 port. 2002-07-22 Lutz Müller Start of gtk+-2.0 port. 2002-06-14 Lutz Müller * configure.in: Correct -version-info. 2002-04-30 Lutz Müller Patch by Arnaud Rouanet : * libexif-gtk/gtk-exif-entry-version.c: Support version 2.2. 2002-04-04 Hans Ulrich Niedermann * Makefile.am: dded .tar.bz2 packaging to "make dist" 2002-02-13 Lutz Müller * configure.in: Version 0.3.0 2002-02-13 Lutz Müller * libexif-gtk: Bring in sync with libexif. 2002-02-06 Lutz Müller Add support for previews. libexif-gtk-0.4.0/Makefile.am000664 000000 000000 00000000557 12115730414 015741 0ustar00rootroot000000 000000 SUBDIRS = m4m po gtk-extensions libexif-gtk tests pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libexif-@LIBEXIF_GTK_EXTENSION@.pc EXTRA_DIST = libexif-gtk.pc.in libexif-gtk3.pc.in noinst_DATA = libexif-@LIBEXIF_GTK_EXTENSION@-uninstalled.pc EXTRA_DIST += libexif-gtk-uninstalled.pc.in libexif-gtk3-uninstalled.pc.in ACLOCAL_AMFLAGS = -I auto-m4 -I m4m libexif-gtk-0.4.0/NEWS000664 000000 000000 00000001445 12115730414 014401 0ustar00rootroot000000 000000 New in 0.4.0: * New translations: de, pl * Updated translations: es, fr, ru * Bug fixes: #1643242: added libexif-gtk-uninstalled.pc file * Proper setting of gettext parameters * libexif-gtk made compatible for both gtk2 (min version: 2.4) and gtk3 * added --with-gtk3 option in configure.ac (default is gtk2) * encoding of source files set to utf-8 * encoding of ru translation file set to utf-8 * fixed internationalisation bugs in gtk-options.c & configure.ac * fixed bugs linked to gtk_notebook_remove_page action * Bug fixes: #2014281: fix display of GPSLatitude and GPSLatitudeRef names * fixed crash when viewing an enumerated tag with an unsupported value * fixed problem with handling the Flash tag in big-endian images * fixed thumbnail save function to actually save libexif-gtk-0.4.0/README000664 000000 000000 00000002261 12115730414 014557 0ustar00rootroot000000 000000 libexif-gtk =========== WHAT IT IS ========== libexif-gtk is a library of widgets to help display EXIF tags in GTK programs. REQUIREMENTS ============ libexif-gtk is written in C and requires libexif and gtk+. GNU gettext is used for language translation, if available. BUILDING ======== Building from the source tar ball usually involves the commands: ./configure make sudo make install When building from source out of CVS, please run "autoreconf -i" first. NOTE TO PACKAGERS ================= The default is to build the gtk2 version of the library (minimum gtk2 version: 2.4). The configure option --with-gtk3 allows building with the gtk3 version of the library. Both versions can be installed on a system at the same time. NOTE TO DEVELOPERS ================== To link to the gtk2 version of libexif-gtk, use the 'libexif-gtk' pkgconfig information. To link your application to the gtk3 version of this library, use the 'libexif-gtk3' pkgconfig information. A simple example program using the libexif-gtk widgets is available in tests/test-libexif-gtk.c LINKS ===== libexif-gtk is a part of the libexif project at http://libexif.sourceforge.net/ libexif-gtk-0.4.0/auto-m4/000775 000000 000000 00000000000 12115730414 015164 5ustar00rootroot000000 000000 libexif-gtk-0.4.0/autogen.sh000775 000000 000000 00000001017 12115730414 015676 0ustar00rootroot000000 000000 #!/bin/sh # recreate autotools files autoreconf --install --force # check minimum required versions #if which gtkdoc-depscan &> /dev/null; then # echo "Minimum required versions:" # gtkdoc-depscan --book=glib --book=gdk-pixbuf --book=gdk \ # --book=gtk gtk-extensions/* | cut -d ' ' -f 2 | sort | uniq #fi # #if which gtkdoc-depscan &> /dev/null; then # echo "Minimum required versions:" # gtkdoc-depscan --book=glib --book=gdk-pixbuf --book=gdk \ # --book=gtk libexif-gtk/* | cut -d ' ' -f 2 | sort | uniq #fi libexif-gtk-0.4.0/configure.ac000664 000000 000000 00000010060 12115730414 016161 0ustar00rootroot000000 000000 AC_PREREQ(2.59) AC_INIT([EXIF GTK widget library],[0.4.0],[libexif-devel@lists.sourceforge.net],[libexif-gtk]) AC_CONFIG_SRCDIR([libexif-gtk/gtk-exif-browser.c]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([auto-m4]) AM_INIT_AUTOMAKE([-Wall gnu 1.9 dist-bzip2 check-news]) if test ! -d "$srcdir/m4m"; then AC_MSG_ERROR([ You are missing the m4m/ directory in your top $PACKAGE_TARNAME source directory. You are probably using an ill-maintained CVS tree. Running cd $srcdir cvs co m4m and re-running autogen.sh might help. ]) fi GP_CHECK_SHELL_ENVIRONMENT GP_CONFIG_MSG([Build]) GP_CONFIG_MSG([Source code location],[${srcdir}]) AC_PROG_CC AM_PROG_CC_STDC AM_PROG_CC_C_O AC_HEADER_STDC GP_PKG_CONFIG()dnl dnl --------------------------------------------------------------------------- dnl Versioning (libexif-gtk-AGE.CURRENT.REVISION): dnl - AGE (Micro): Increment if any interfaces have been added; set to 0 dnl if any interfaces have been removed. Removal has dnl precedence over adding, so set to 0 if both happened. dnl - REVISION (Minor): Increment any time the source changes; set to dnl 0 if you incremented CURRENT. dnl - CURRENT (Major): Increment if the interface has additions, changes, dnl removals. dnl --------------------------------------------------------------------------- LIBEXIF_GTK_AGE=0 LIBEXIF_GTK_REVISION=1 LIBEXIF_GTK_CURRENT=5 AC_SUBST(LIBEXIF_GTK_AGE) AC_SUBST(LIBEXIF_GTK_REVISION) AC_SUBST(LIBEXIF_GTK_CURRENT) LIBEXIF_GTK_VERSION_INFO=`expr $LIBEXIF_GTK_CURRENT + $LIBEXIF_GTK_REVISION`:$LIBEXIF_GTK_AGE:$LIBEXIF_GTK_REVISION AC_SUBST(LIBEXIF_GTK_VERSION_INFO) AM_PROG_LIBTOOL GP_CONFIG_MSG([Compiler],[${CC}]) dnl GP_CONFIG_MSG([Features]) # --------------------------------------------------------------------------- # i18n support # --------------------------------------------------------------------------- ALL_LINGUAS="de es fr pl ru" AM_PO_SUBDIRS GP_GETTEXT_HACK([${PACKAGE}-${LIBEXIF_GTK_CURRENT}], [Lutz Müller and others]) AM_GNU_GETTEXT_VERSION([0.14.1]) AM_GNU_GETTEXT([external]) AM_ICONV() GP_GETTEXT_FLAGS() # --------------------------------------------------------------------------- # conditional libraries # --------------------------------------------------------------------------- AC_ARG_WITH([gtk3], [AS_HELP_STRING([--with-gtk3],[build with gtk3 (default is gtk2)])], [LIBEXIF_GTK_EXTENSION=gtk3], [LIBEXIF_GTK_EXTENSION=gtk]) if test "x$LIBEXIF_GTK_EXTENSION" == "xgtk3" ; then GP_CHECK_LIBRARY([GTK], [gtk+-3.0])dnl else GP_CHECK_LIBRARY([GTK], [gtk+-2.0], [>= 2.4])dnl fi AC_SUBST([LIBEXIF_GTK_EXTENSION])dnl # --------------------------------------------------------------------------- # libraries needed # --------------------------------------------------------------------------- GP_CHECK_LIBRARY([LIBEXIF], [libexif])dnl # --------------------------------------------------------------------------- # compiler/Linker options and warnings # --------------------------------------------------------------------------- AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)" AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_builddir)" AM_LDFLAGS="$LDFLAGS" if test "x$GCC" = "xyes"; then AM_CFLAGS="$AM_CFLAGS -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith" AM_CXXFLAGS="$AM_CXXFLAGS -ansi -pedantic-error" AM_CPPFLAGS="$AM_CPPFLAGS -g -Wall -Wmissing-declarations -Wmissing-prototypes" AM_LDFLAGS="$AM_LDFLAGS -g -Wall" fi AC_SUBST([AM_CPPFLAGS])dnl AC_SUBST([AM_LDFLAGS])dnl AC_SUBST([AM_CFLAGS])dnl AC_SUBST([AM_LDFLAGS])dnl # --------------------------------------------------------------------------- # Output files # --------------------------------------------------------------------------- AC_CONFIG_FILES([ po/Makefile.in Makefile libexif-gtk/Makefile libexif-$LIBEXIF_GTK_EXTENSION.pc libexif-$LIBEXIF_GTK_EXTENSION-uninstalled.pc gtk-extensions/Makefile tests/Makefile m4m/Makefile ]) AC_OUTPUT()dnl GP_CONFIG_OUTPUT()dnl libexif-gtk-0.4.0/gtk-extensions/000775 000000 000000 00000000000 12115730414 016660 5ustar00rootroot000000 000000 libexif-gtk-0.4.0/gtk-extensions/Makefile.am000664 000000 000000 00000000434 12115730414 020715 0ustar00rootroot000000 000000 noinst_LTLIBRARIES = libgtk-extensions.la libgtk_extensions_la_SOURCES = \ gtk-menu-option.c gtk-menu-option.h \ gtk-options.c gtk-options.h libgtk_extensions_la_CFLAGS = \ $(AM_CFLAGS) $(CFLAGS) \ -I$(top_srcdir) \ $(GTK_CFLAGS) libgtk_extensions_la_LIBADD = $(GTK_LIBS) libexif-gtk-0.4.0/gtk-extensions/gtk-menu-option.c000664 000000 000000 00000015336 12115730414 022071 0ustar00rootroot000000 000000 /* gtk-menu-option.c * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include "gtk-menu-option.h" #include #include #ifdef ENABLE_NLS # include # undef _ # define _(String) dgettext (GETTEXT_PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define N_(String) (String) #endif struct _GtkMenuOptionPrivate { guint current; GArray *array; GPtrArray *items; }; #define PARENT_TYPE GTK_TYPE_MENU static GtkMenuClass *parent_class; enum { OPTION_SELECTED, OPTION_SET, LAST_SIGNAL }; static guint signals[LAST_SIGNAL] = {0}; static void #if GTK_CHECK_VERSION(3,0,0) gtk_menu_option_destroy (GtkWidget *widget) #else gtk_menu_option_destroy (GtkObject *object) #endif { #if GTK_CHECK_VERSION(3,0,0) GtkMenuOption *menu = GTK_MENU_OPTION (widget); #else GtkMenuOption *menu = GTK_MENU_OPTION (object); #endif if (menu->priv->array) { g_array_free (menu->priv->array, TRUE); menu->priv->array = NULL; } if (menu->priv->items) { g_ptr_array_free (menu->priv->items, TRUE); menu->priv->items = NULL; } #if GTK_CHECK_VERSION(3,0,0) GTK_WIDGET_CLASS (parent_class)->destroy (widget); #else GTK_OBJECT_CLASS (parent_class)->destroy (object); #endif } static void gtk_menu_option_finalize (GObject *object) { GtkMenuOption *menu = GTK_MENU_OPTION (object); g_free (menu->priv); G_OBJECT_CLASS (parent_class)->finalize (object); } static void gtk_menu_option_class_init (gpointer g_class, gpointer class_data) { #if GTK_CHECK_VERSION(3,0,0) GtkWidgetClass *widget_class; GObjectClass *gobject_class; widget_class = GTK_WIDGET_CLASS (g_class); widget_class->destroy = gtk_menu_option_destroy; #else GtkObjectClass *object_class; GObjectClass *gobject_class; object_class = GTK_OBJECT_CLASS (g_class); object_class->destroy = gtk_menu_option_destroy; #endif gobject_class = G_OBJECT_CLASS (g_class); gobject_class->finalize = gtk_menu_option_finalize; signals[OPTION_SELECTED] = g_signal_new ("option_selected", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkMenuOptionClass, option_selected), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); signals[OPTION_SET] = g_signal_new ("option_set", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkMenuOptionClass, option_set), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); parent_class = g_type_class_peek_parent (g_class); } static void gtk_menu_option_init (GTypeInstance *instance, gpointer g_class) { GtkMenuOption *menu = GTK_MENU_OPTION (instance); menu->priv = g_new0 (GtkMenuOptionPrivate, 1); menu->priv->array = g_array_new (FALSE, TRUE, sizeof (guint)); menu->priv->items = g_ptr_array_new (); } GType gtk_menu_option_get_type (void) { static GType t = 0; GTypeInfo ti; if (!t) { memset (&ti, 0, sizeof (GTypeInfo)); ti.class_size = sizeof (GtkMenuOptionClass); ti.class_init = gtk_menu_option_class_init; ti.instance_size = sizeof (GtkMenuOption); ti.instance_init = gtk_menu_option_init; t = g_type_register_static (PARENT_TYPE, "GtkMenuOption", &ti, 0); } return (t); } static void on_item_activate (GtkMenuItem *item, GtkMenuOption *menu) { menu->priv->current = GPOINTER_TO_INT ( g_object_get_data (G_OBJECT (item), "option")); g_signal_emit (G_OBJECT (menu), signals[OPTION_SELECTED], 0, menu->priv->current); } GtkWidget * gtk_menu_option_new (GtkOptions *list) { GtkMenuOption *menu; g_return_val_if_fail (list != NULL, NULL); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); menu = g_object_new (GTK_TYPE_MENU_OPTION, NULL); gtk_menu_option_construct (menu, list); return (GTK_WIDGET (menu)); } void gtk_menu_option_construct (GtkMenuOption *menu, GtkOptions *list) { GtkWidget *item; guint i; g_return_if_fail (GTK_IS_MENU_OPTION (menu)); g_return_if_fail (list != NULL); /* Sort the list */ gtk_options_sort (list); for (i = 0; list[i].name; i++) { item = gtk_menu_item_new_with_label (list[i].name); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); g_object_set_data (G_OBJECT (item), "option", GINT_TO_POINTER ((gint) list[i].option)); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (on_item_activate), menu); g_array_append_val (menu->priv->array, list[i].option); g_ptr_array_add (menu->priv->items, item); } } void gtk_menu_option_set_sensitive (GtkMenuOption *menu, guint option, gboolean sensitive) { guint i; g_return_if_fail (GTK_IS_MENU_OPTION (menu)); i = gtk_menu_option_get_index (menu, option); gtk_widget_set_sensitive (GTK_WIDGET (menu->priv->items->pdata[i]), sensitive); } void gtk_menu_option_set_sensitive_all (GtkMenuOption *menu, gboolean sensitive) { guint i; g_return_if_fail (GTK_IS_MENU_OPTION (menu)); for (i = 0; i < menu->priv->items->len; i++) gtk_widget_set_sensitive ( GTK_WIDGET (menu->priv->items->pdata[i]), sensitive); } guint gtk_menu_option_get (GtkMenuOption *menu) { g_return_val_if_fail (GTK_IS_MENU_OPTION (menu), 0); return (menu->priv->current); } void gtk_menu_option_set (GtkMenuOption *menu, guint option) { g_return_if_fail (GTK_IS_MENU_OPTION (menu)); menu->priv->current = option; g_signal_emit (G_OBJECT (menu), signals[OPTION_SET], 0, option); } guint gtk_menu_option_get_index (GtkMenuOption *menu, guint option) { guint i; g_return_val_if_fail (GTK_IS_MENU_OPTION (menu), 0); for (i = 0; i < menu->priv->array->len; i++) if (g_array_index (menu->priv->array, guint, i) == option) break; if (i == menu->priv->array->len) { g_warning ("Option %i not found!", option); return (0); } return (i); } libexif-gtk-0.4.0/gtk-extensions/gtk-menu-option.h000664 000000 000000 00000004510 12115730414 022066 0ustar00rootroot000000 000000 /* gtk-menu-int.h * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_MENU_OPTION_H__ #define __GTK_MENU_OPTION_H__ #include #include #define GTK_TYPE_MENU_OPTION (gtk_menu_option_get_type()) #define GTK_MENU_OPTION(o) (G_TYPE_CHECK_INSTANCE_CAST((o),GTK_TYPE_MENU_OPTION,GtkMenuOption)) #define GTK_MENU_OPTION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k),GTK_TYPE_MENU_OPTION,GtkMenuOptionClass)) #define GTK_IS_MENU_OPTION(o) (G_TYPE_CHECK_INSTANCE_TYPE((o),GTK_TYPE_MENU_OPTION)) typedef struct _GtkMenuOption GtkMenuOption; typedef struct _GtkMenuOptionPrivate GtkMenuOptionPrivate; typedef struct _GtkMenuOptionClass GtkMenuOptionClass; struct _GtkMenuOption { GtkMenu parent; GtkMenuOptionPrivate *priv; }; struct _GtkMenuOptionClass { GtkMenuClass parent_class; /* Signals */ void (* option_selected) (GtkMenuOption *menu, guint option); void (* option_set) (GtkMenuOption *menu, guint option); }; GType gtk_menu_option_get_type (void); GtkWidget *gtk_menu_option_new (GtkOptions *list); void gtk_menu_option_construct (GtkMenuOption *menu, GtkOptions *list); void gtk_menu_option_set (GtkMenuOption *menu, guint option); guint gtk_menu_option_get (GtkMenuOption *menu); void gtk_menu_option_set_sensitive_all (GtkMenuOption *menu, gboolean sensitive); void gtk_menu_option_set_sensitive (GtkMenuOption *menu, guint option, gboolean sensitive); guint gtk_menu_option_get_index (GtkMenuOption *menu, guint option); #endif /* __GTK_MENU_OPTION_H__ */ libexif-gtk-0.4.0/gtk-extensions/gtk-options.c000664 000000 000000 00000005442 12115730414 021307 0ustar00rootroot000000 000000 /* gtk-options.c * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include "gtk-options.h" #include #include #ifdef ENABLE_NLS # include # undef _ # define _(String) dgettext (GETTEXT_PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define N_(String) (String) #endif void gtk_options_sort (GtkOptions *options) { GtkOptions entry; guint i = 0; while (options[i+1].name) { if (strcmp (options[i].name, options[i + 1].name) > 0) { entry = options[i]; options[i] = options[i + 1]; options[i + 1] = entry; if (i) i--; } else i++; } } GtkTreeModel * gtk_tree_model_new_from_options (GtkOptions *options) { GtkListStore *ls; guint i; GtkTreeIter iter; bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); ls = gtk_list_store_new (GTK_OPTIONS_N_COLUMNS, G_TYPE_INT, G_TYPE_STRING); for (i = 0; options[i].name; i++) { gtk_list_store_append (ls, &iter); gtk_list_store_set (ls, &iter, GTK_OPTIONS_OPTION_COLUMN, options[i].option, GTK_OPTIONS_NAME_COLUMN, _(options[i].name), -1); } return GTK_TREE_MODEL (ls); } gboolean gtk_tree_model_get_iter_from_option (GtkTreeModel *tm, guint option, GtkTreeIter *iter) { GValue v = {0,}; g_return_val_if_fail (GTK_IS_TREE_MODEL (tm), FALSE); g_return_val_if_fail (iter != NULL, FALSE); /* Search the option in the list store. */ if (!gtk_tree_model_get_iter_first (tm, iter)) return FALSE; do { gtk_tree_model_get_value (tm, iter, GTK_OPTIONS_OPTION_COLUMN, &v); if (option == g_value_get_int (&v)) break; g_value_unset (&v); } while (gtk_tree_model_iter_next (tm, iter)); return (option == g_value_get_int (&v)); } libexif-gtk-0.4.0/gtk-extensions/gtk-options.h000664 000000 000000 00000002471 12115730414 021313 0ustar00rootroot000000 000000 /* gtk-options.h * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_OPTIONS_H__ #define __GTK_OPTIONS_H__ #include typedef struct _GtkOptions GtkOptions; struct _GtkOptions { guint option; const gchar *name; }; void gtk_options_sort (GtkOptions *); enum { GTK_OPTIONS_OPTION_COLUMN, GTK_OPTIONS_NAME_COLUMN, GTK_OPTIONS_N_COLUMNS }; GtkTreeModel *gtk_tree_model_new_from_options (GtkOptions *); gboolean gtk_tree_model_get_iter_from_option (GtkTreeModel *, guint, GtkTreeIter *); #endif /* __GTK_OPTIONS_H__ */ libexif-gtk-0.4.0/libexif-gtk-uninstalled.pc.in000664 000000 000000 00000000253 12115730414 021354 0ustar00rootroot000000 000000 Name: libexif-gtk Description: gtk2-widgets for libexif Requires: libexif Version: @VERSION@ Libs: ${pcfiledir}/libexif-gtk/libexif-gtk.la Cflags: -I${pcfiledir}/@srcdir@ libexif-gtk-0.4.0/libexif-gtk.pc.in000664 000000 000000 00000000462 12115730414 017036 0ustar00rootroot000000 000000 prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ datarootdir=@datarootdir@ datadir=@datadir@ localedir=@localedir@ Name: libexif-gtk Description: gtk2-widgets for libexif Requires: libexif Version: @VERSION@ Libs: -L${libdir} -lexif -lexif-gtk -lm Cflags: -I${includedir} libexif-gtk-0.4.0/libexif-gtk/000775 000000 000000 00000000000 12115730414 016103 5ustar00rootroot000000 000000 libexif-gtk-0.4.0/libexif-gtk/Makefile.am000664 000000 000000 00000002657 12115730414 020151 0ustar00rootroot000000 000000 lib_LTLIBRARIES = libexif-@LIBEXIF_GTK_EXTENSION@.la libexif_gtkincludedir = $(includedir)/libexif-gtk libexif_gtkinclude_HEADERS = \ gtk-exif-browser.h \ gtk-exif-content-list.h \ gtk-exif-entry.h \ gtk-exif-entry-ascii.h \ gtk-exif-entry-copyright.h \ gtk-exif-entry-date.h \ gtk-exif-entry-generic.h \ gtk-exif-entry-flash.h \ gtk-exif-entry-number.h \ gtk-exif-entry-option.h \ gtk-exif-entry-rational.h \ gtk-exif-entry-resolution.h \ gtk-exif-entry-user-comment.h \ gtk-exif-entry-version.h libexif_@LIBEXIF_GTK_EXTENSION@_la_SOURCES = \ gtk-exif-browser.c \ gtk-exif-content-list.c \ gtk-exif-entry.c \ gtk-exif-entry-ascii.c \ gtk-exif-entry-copyright.c \ gtk-exif-entry-date.c \ gtk-exif-entry-generic.c \ gtk-exif-entry-flash.c \ gtk-exif-entry-number.c \ gtk-exif-entry-option.c \ gtk-exif-entry-rational.c \ gtk-exif-entry-resolution.c \ gtk-exif-entry-user-comment.c \ gtk-exif-entry-version.c \ gtk-exif-util.h libexif_@LIBEXIF_GTK_EXTENSION@_la_CFLAGS = \ $(AM_CPPFLAGS) $(CPPFLAGS) \ -I$(top_srcdir) \ -I$(top_srcdir)/gtk-extensions \ $(LIBEXIF_CFLAGS) \ $(GTK_CFLAGS) \ -DG_LOG_DOMAIN=\"libexif\" libexif_@LIBEXIF_GTK_EXTENSION@_la_LDFLAGS = -version-info @LIBEXIF_GTK_VERSION_INFO@ libexif_@LIBEXIF_GTK_EXTENSION@_la_LIBADD = \ $(AM_LDFLAGS) $(LDFLAGS) \ $(top_builddir)/gtk-extensions/libgtk-extensions.la \ $(LIBEXIF_LIBS) \ $(GTK_LIBS) libexif-gtk-0.4.0/libexif-gtk/gtk-exif-browser.c000664 000000 000000 00000041433 12115730414 021453 0ustar00rootroot000000 000000 /* gtk-exif-browser.c * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include "gtk-exif-browser.h" #include "gtk-exif-content-list.h" #include "gtk-exif-entry-ascii.h" #include "gtk-exif-entry-copyright.h" #include "gtk-exif-entry-date.h" #include "gtk-exif-entry-flash.h" #include "gtk-exif-entry-generic.h" #include "gtk-exif-entry-number.h" #include "gtk-exif-entry-option.h" #include "gtk-exif-entry-rational.h" #include "gtk-exif-entry-resolution.h" #include "gtk-exif-entry-user-comment.h" #include "gtk-exif-entry-version.h" #include "gtk-exif-util.h" #include #include #include #include #ifdef ENABLE_NLS # include # undef _ # define _(String) dgettext (GETTEXT_PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define N_(String) (String) #endif static void gtk_exif_browser_show_entry (GtkExifBrowser *, ExifEntry *); struct _GtkExifBrowserPrivate { ExifData *data; #if !GTK_CHECK_VERSION(2,12,0) GtkTooltips *tooltips; #endif GtkWidget *empty, *current, *info; GtkContainer *thumb_box; GtkWidget *thumb; GtkNotebook *notebook; }; #define PARENT_TYPE gtk_hpaned_get_type() static GtkHPanedClass *parent_class; static void #if GTK_CHECK_VERSION(3,0,0) gtk_exif_browser_destroy (GtkWidget *widget) #else gtk_exif_browser_destroy (GtkObject *object) #endif { #if GTK_CHECK_VERSION(3,0,0) GtkExifBrowser *browser = GTK_EXIF_BROWSER (widget); #else GtkExifBrowser *browser = GTK_EXIF_BROWSER (object); #endif if (browser->priv->data) { exif_data_unref (browser->priv->data); browser->priv->data = NULL; } if (browser->priv->empty) { g_object_unref (browser->priv->empty); browser->priv->empty = NULL; } #if !GTK_CHECK_VERSION(2,12,0) if (browser->priv->tooltips) { g_object_unref (G_OBJECT (browser->priv->tooltips)); browser->priv->tooltips = NULL; } #endif #if GTK_CHECK_VERSION(3,0,0) GTK_WIDGET_CLASS (parent_class)->destroy (widget); #else GTK_OBJECT_CLASS (parent_class)->destroy (object); #endif } GTK_EXIF_FINALIZE (browser, Browser) static void gtk_exif_browser_class_init (gpointer g_class, gpointer class_data) { #if GTK_CHECK_VERSION(3,0,0) GtkWidgetClass *widget_class; GObjectClass *gobject_class; widget_class = GTK_WIDGET_CLASS (g_class); widget_class->destroy = gtk_exif_browser_destroy; #else GtkObjectClass *object_class; GObjectClass *gobject_class; object_class = GTK_OBJECT_CLASS (g_class); object_class->destroy = gtk_exif_browser_destroy; #endif gobject_class = G_OBJECT_CLASS (g_class); gobject_class->finalize = gtk_exif_browser_finalize; parent_class = g_type_class_peek_parent (g_class); } static void gtk_exif_browser_init (GTypeInstance *instance, gpointer g_class) { GtkExifBrowser *browser = GTK_EXIF_BROWSER (instance); browser->priv = g_new0 (GtkExifBrowserPrivate, 1); #if !GTK_CHECK_VERSION(2,12,0) browser->priv->tooltips = gtk_tooltips_new (); g_object_ref (G_OBJECT (browser->priv->tooltips)); g_object_ref_sink (GTK_OBJECT (browser->priv->tooltips)); #endif /* Placeholder */ browser->priv->empty = gtk_label_new (_("Nothing selected.")); gtk_widget_show (browser->priv->empty); g_object_ref (G_OBJECT (browser->priv->empty)); } GTK_EXIF_CLASS (browser, Browser, "Browser") static GtkExifContentList * gtk_exif_browser_get_content_list (GtkExifBrowser *b, ExifEntry *entry) { guint n, i; GtkWidget *swin, *viewport; GtkExifContentList *list = NULL; g_return_val_if_fail (GTK_EXIF_IS_BROWSER (b), NULL); g_return_val_if_fail (entry != NULL, NULL); n = gtk_notebook_get_n_pages (b->priv->notebook); for (i = 0; i < n; i++) { swin = gtk_notebook_get_nth_page (b->priv->notebook, i); if (!GTK_IS_SCROLLED_WINDOW (swin)) continue; viewport = gtk_bin_get_child (GTK_BIN (swin)); list = GTK_EXIF_CONTENT_LIST (gtk_bin_get_child (GTK_BIN (viewport))); if (list->content == entry->parent) break; } return (i == n) ? NULL : list; } static void gtk_exif_browser_set_widget (GtkExifBrowser *browser, GtkWidget *w) { if (browser->priv->current) gtk_container_remove (GTK_CONTAINER (browser->priv->info), browser->priv->current); if (!w) return; gtk_box_pack_start (GTK_BOX (browser->priv->info), w, TRUE, FALSE, 0); browser->priv->current = w; } static void on_entry_changed (GtkExifEntry *entry, ExifEntry *e, GtkExifBrowser *b) { GtkExifContentList *list; g_return_if_fail (GTK_EXIF_IS_BROWSER (b)); list = gtk_exif_browser_get_content_list (b, e); if (!list) return; gtk_exif_content_list_update_entry (list, e); } static void on_entry_added (GtkExifEntry *entry, ExifEntry *e, GtkExifBrowser *b) { GtkExifContentList *list; list = gtk_exif_browser_get_content_list (b, e); if (!list) return; gtk_exif_content_list_add_entry (list, e); gtk_exif_browser_show_entry (b, e); } static void on_entry_removed (GtkExifEntry *entry, ExifEntry *e, GtkExifBrowser *b) { GtkExifContentList *list; list = gtk_exif_browser_get_content_list (b, e); if (!list) return; switch (e->tag) { case EXIF_TAG_RESOLUTION_UNIT: case EXIF_TAG_X_RESOLUTION: case EXIF_TAG_Y_RESOLUTION: /* Do nothing. */ break; default: gtk_exif_browser_set_widget (b, b->priv->empty); break; } gtk_exif_content_list_remove_entry (list, e); } static void on_entry_selected (GtkExifContentList *list, ExifEntry *entry, GtkExifBrowser *browser) { gtk_exif_browser_show_entry (browser, entry); } static void gtk_exif_browser_show_entry (GtkExifBrowser *browser, ExifEntry *entry) { GtkWidget *w; if (!entry) { gtk_exif_browser_set_widget (browser, browser->priv->empty); return; } switch (entry->tag) { case EXIF_TAG_EXIF_VERSION: case EXIF_TAG_FLASH_PIX_VERSION: w = gtk_exif_entry_version_new (entry); break; case EXIF_TAG_USER_COMMENT: w = gtk_exif_entry_user_comment_new (entry); break; case EXIF_TAG_COPYRIGHT: w = gtk_exif_entry_copyright_new (entry); break; case EXIF_TAG_FLASH: w = gtk_exif_entry_flash_new (entry); break; case EXIF_TAG_EXPOSURE_PROGRAM: case EXIF_TAG_SENSING_METHOD: case EXIF_TAG_ORIENTATION: case EXIF_TAG_METERING_MODE: case EXIF_TAG_YCBCR_POSITIONING: case EXIF_TAG_COMPRESSION: case EXIF_TAG_LIGHT_SOURCE: w = gtk_exif_entry_option_new (entry); break; case EXIF_TAG_RESOLUTION_UNIT: case EXIF_TAG_X_RESOLUTION: case EXIF_TAG_Y_RESOLUTION: w = gtk_exif_entry_resolution_new (entry->parent, FALSE); break; case EXIF_TAG_FOCAL_PLANE_X_RESOLUTION: case EXIF_TAG_FOCAL_PLANE_Y_RESOLUTION: case EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT: w = gtk_exif_entry_resolution_new (entry->parent, TRUE); break; case EXIF_TAG_MAKE: case EXIF_TAG_MODEL: case EXIF_TAG_IMAGE_DESCRIPTION: case EXIF_TAG_SOFTWARE: case EXIF_TAG_ARTIST: w = gtk_exif_entry_ascii_new (entry); break; case EXIF_TAG_DATE_TIME: case EXIF_TAG_DATE_TIME_ORIGINAL: case EXIF_TAG_DATE_TIME_DIGITIZED: w = gtk_exif_entry_date_new (entry); break; default: switch (entry->format) { case EXIF_FORMAT_RATIONAL: case EXIF_FORMAT_SRATIONAL: w = gtk_exif_entry_rational_new (entry); break; case EXIF_FORMAT_BYTE: case EXIF_FORMAT_SHORT: case EXIF_FORMAT_LONG: case EXIF_FORMAT_SLONG: w = gtk_exif_entry_number_new (entry); break; default: w = gtk_exif_entry_generic_new (entry); break; } break; } gtk_widget_show (w); gtk_exif_browser_set_widget (browser, w); g_signal_connect (G_OBJECT (w), "entry_added", G_CALLBACK (on_entry_added), browser); g_signal_connect (G_OBJECT (w), "entry_removed", G_CALLBACK (on_entry_removed), browser); g_signal_connect (G_OBJECT (w), "entry_changed", G_CALLBACK (on_entry_changed), browser); } static void gtk_exif_browser_add_content (GtkExifBrowser *browser, const gchar *name, ExifContent *content) { GtkWidget *swin, *label, *et; label = gtk_label_new (name); gtk_widget_show (label); swin = gtk_scrolled_window_new (NULL, NULL); gtk_container_set_border_width (GTK_CONTAINER (swin), 5); gtk_widget_show (swin); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_notebook_append_page (browser->priv->notebook, swin, label); /* List */ et = gtk_exif_content_list_new (); gtk_widget_show (et); gtk_exif_content_list_set_content (GTK_EXIF_CONTENT_LIST (et), content); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (swin), et); g_signal_connect (G_OBJECT (et), "entry_selected", G_CALLBACK (on_entry_selected), browser); } GtkWidget * gtk_exif_browser_new (void) { GtkWidget *vbox, *notebook; GtkExifBrowser *browser; bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); browser = g_object_new (GTK_EXIF_TYPE_BROWSER, NULL); gtk_widget_set_sensitive (GTK_WIDGET (browser), FALSE); vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox); gtk_paned_pack1 (GTK_PANED (browser), vbox, TRUE, TRUE); /* Notebook */ notebook = gtk_notebook_new (); gtk_widget_show (notebook); gtk_box_pack_start (GTK_BOX (vbox), notebook, TRUE, TRUE, 0); browser->priv->notebook = GTK_NOTEBOOK (notebook); /* Info */ browser->priv->info = gtk_vbox_new (FALSE, 0); gtk_widget_show (browser->priv->info); gtk_paned_pack2 (GTK_PANED (browser), browser->priv->info, TRUE, FALSE); /* Set placeholder */ gtk_exif_browser_set_widget (browser, browser->priv->empty); return (GTK_WIDGET (browser)); } static void gtk_exif_browser_show_thumbnail (GtkExifBrowser *b) { gchar *tip; g_return_if_fail (GTK_EXIF_IS_BROWSER (b)); if (b->priv->thumb) { gtk_container_remove (b->priv->thumb_box, b->priv->thumb); b->priv->thumb = NULL; } if (!b->priv->data->data) { b->priv->thumb = gtk_label_new (_("No thumbnail available.")); } else { GdkPixbufLoader *loader; GtkWidget *image; loader = gdk_pixbuf_loader_new (); if (!gdk_pixbuf_loader_write (loader, b->priv->data->data, b->priv->data->size, NULL)) { b->priv->thumb = gtk_label_new (_("Corrupt thumbnail " "image.")); } else { gdk_pixbuf_loader_close (loader, NULL); image = gtk_image_new_from_pixbuf ( gdk_pixbuf_loader_get_pixbuf (loader)); gtk_widget_show (image); b->priv->thumb = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW (b->priv->thumb), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_add_with_viewport ( GTK_SCROLLED_WINDOW (b->priv->thumb), image); } g_object_unref (G_OBJECT (loader)); tip = g_strdup_printf (_("Size: %i bytes."), b->priv->data->size); #if !GTK_CHECK_VERSION(2,12,0) gtk_tooltips_set_tip (b->priv->tooltips, b->priv->thumb, tip, NULL); #else gtk_widget_set_tooltip_text (b->priv->thumb, tip); #endif g_free (tip); } gtk_widget_show (b->priv->thumb); gtk_box_pack_start (GTK_BOX (b->priv->thumb_box), b->priv->thumb, TRUE, TRUE, 0); } static void on_load_ok_clicked (GtkWidget *fchoser, GtkExifBrowser *b) { gchar *filename; FILE *f; unsigned int size, read; g_return_if_fail (GTK_EXIF_IS_BROWSER (b)); filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (fchoser)); f = fopen (filename, "rb"); if (!f) { g_warning ("Can not open file '%s'.", filename); return; } g_free(filename); fseek (f, 0, SEEK_END); size = ftell (f); rewind (f); if (b->priv->data->data) { g_free (b->priv->data->data); b->priv->data->data = NULL; b->priv->data->size = 0; } if (size) { b->priv->data->data = g_new0 (char, size); if (!b->priv->data->data) { g_warning ("Could not allocate %i bytes!", size); fclose (f); return; } b->priv->data->size = size; read = fread (b->priv->data->data, 1, size, f); if ((read != size) || ferror (f)) { g_warning ("Could not read %i bytes!", size); fclose (f); return; } } fclose (f); gtk_exif_browser_show_thumbnail (b); } static void on_load_clicked (GtkButton *button, GtkExifBrowser *b) { GtkWidget *fchoser; GtkWidget *fchoser_parent; fchoser_parent = gtk_widget_get_ancestor (GTK_WIDGET (b), GTK_TYPE_WINDOW); fchoser = gtk_file_chooser_dialog_new (_("Load..."), GTK_WINDOW(fchoser_parent), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); if (gtk_dialog_run (GTK_DIALOG (fchoser)) == GTK_RESPONSE_ACCEPT) on_load_ok_clicked (fchoser, b); gtk_widget_destroy (fchoser); } static void on_save_ok_clicked (GtkWidget *fchoser, GtkExifBrowser *b) { gchar *filename; FILE *f; g_return_if_fail (GTK_EXIF_IS_BROWSER (b)); filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (fchoser)); f = fopen (filename, "wb"); if (!f) { g_warning ("Could not open '%s'.", filename); return; } g_free(filename); fwrite (b->priv->data->data, 1, b->priv->data->size, f); fclose (f); } static void on_save_clicked (GtkButton *button, GtkExifBrowser *b) { GtkWidget *fchoser; GtkWidget *fchoser_parent; fchoser_parent = gtk_widget_get_ancestor (GTK_WIDGET (b), GTK_TYPE_WINDOW); fchoser = gtk_file_chooser_dialog_new (_("Save As..."), GTK_WINDOW(fchoser_parent), GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); if (gtk_dialog_run (GTK_DIALOG (fchoser)) == GTK_RESPONSE_ACCEPT) on_save_ok_clicked (fchoser, b); gtk_widget_destroy (fchoser); } static void on_delete_clicked (GtkButton *button, GtkExifBrowser *b) { g_return_if_fail (GTK_EXIF_IS_BROWSER (b)); if (b->priv->data->data) { g_free (b->priv->data->data); b->priv->data->data = NULL; } b->priv->data->size = 0; gtk_exif_browser_show_thumbnail (b); } void gtk_exif_browser_set_data (GtkExifBrowser *b, ExifData *data) { GtkWidget *label, *vbox, *bbox, *button, *hbox; gint n; guint i; g_return_if_fail (GTK_EXIF_IS_BROWSER (b)); g_return_if_fail (data != NULL); if (b->priv->data) exif_data_unref (b->priv->data); b->priv->data = data; exif_data_ref (data); /* sequence of tabs removal is important to avoid segfault */ gtk_notebook_set_current_page (b->priv->notebook, -1); n = gtk_notebook_get_n_pages (b->priv->notebook); for (i = 0; i < n; i++) gtk_notebook_remove_page (b->priv->notebook, 0); /* thumbnail has disappeared with the removal of the related page */ b->priv->thumb_box = NULL; b->priv->thumb = NULL; for (i = 0; i < EXIF_IFD_COUNT; i++) gtk_exif_browser_add_content (b, exif_ifd_get_name (i), data->ifd[i]); /* Create the thumbnail page */ vbox = gtk_vbox_new (FALSE, 5); gtk_widget_show (vbox); label = gtk_label_new (_("Thumbnail")); gtk_widget_show (label); gtk_notebook_append_page (b->priv->notebook, vbox, label); /* Thumbnail */ hbox = gtk_hbox_new (FALSE, 5); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); b->priv->thumb_box = GTK_CONTAINER (hbox); /* Buttons */ bbox = gtk_hbutton_box_new (); gtk_widget_show (bbox); gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD); gtk_container_set_border_width (GTK_CONTAINER (bbox), 5); gtk_box_set_spacing (GTK_BOX (bbox), 5); gtk_box_pack_end (GTK_BOX (vbox), bbox, FALSE, FALSE, 0); button = gtk_button_new_with_label (_("Load")); gtk_widget_show (button); gtk_container_add (GTK_CONTAINER (bbox), button); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (on_load_clicked), b); button = gtk_button_new_with_label (_("Save")); gtk_widget_show (button); gtk_container_add (GTK_CONTAINER (bbox), button); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (on_save_clicked), b); button = gtk_button_new_with_label (_("Delete")); gtk_widget_show (button); gtk_container_add (GTK_CONTAINER (bbox), button); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (on_delete_clicked), b); /* Show the current thumbnail */ gtk_exif_browser_show_thumbnail (b); gtk_widget_set_sensitive (GTK_WIDGET (b), TRUE); } libexif-gtk-0.4.0/libexif-gtk/gtk-exif-browser.h000664 000000 000000 00000003463 12115730414 021461 0ustar00rootroot000000 000000 /* gtk-exif-browser.h * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_EXIF_BROWSER_H__ #define __GTK_EXIF_BROWSER_H__ #include #include #define GTK_EXIF_TYPE_BROWSER (gtk_exif_browser_get_type()) #define GTK_EXIF_BROWSER(o) (G_TYPE_CHECK_INSTANCE_CAST((o),GTK_EXIF_TYPE_BROWSER,GtkExifBrowser)) #define GTK_EXIF_BROWSER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k),GTK_EXIF_TYPE_BROWSER,GtkExifBrowserClass)) #define GTK_EXIF_IS_BROWSER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o),GTK_EXIF_TYPE_BROWSER)) typedef struct _GtkExifBrowser GtkExifBrowser; typedef struct _GtkExifBrowserPrivate GtkExifBrowserPrivate; typedef struct _GtkExifBrowserClass GtkExifBrowserClass; struct _GtkExifBrowser { GtkHPaned parent; GtkExifBrowserPrivate *priv; }; struct _GtkExifBrowserClass { GtkHPanedClass parent_class; }; GType gtk_exif_browser_get_type (void); GtkWidget *gtk_exif_browser_new (void); void gtk_exif_browser_set_data (GtkExifBrowser *browser, ExifData *data); #endif /* __GTK_EXIF_BROWSER_H__ */ libexif-gtk-0.4.0/libexif-gtk/gtk-exif-content-list.c000664 000000 000000 00000033031 12115730414 022406 0ustar00rootroot000000 000000 /* gtk-exif-content-list.c * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include "gtk-exif-content-list.h" #include "gtk-exif-util.h" #include "gtk-extensions/gtk-menu-option.h" #include #include #ifdef ENABLE_NLS # include # undef _ # define _(String) dgettext (GETTEXT_PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define N_(String) (String) #endif struct _GtkExifContentListPrivate { GtkListStore *store; }; #define PARENT_TYPE GTK_TYPE_TREE_VIEW static GtkTreeViewClass *parent_class; enum { NAME_COLUMN = 0, VALUE_COLUMN, ENTRY_COLUMN, NUM_COLUMNS }; enum { ENTRY_ADDED, ENTRY_REMOVED, ENTRY_CHANGED, ENTRY_SELECTED, LAST_SIGNAL }; static guint signals[LAST_SIGNAL] = {0}; static void #if GTK_CHECK_VERSION(3,0,0) gtk_exif_content_list_destroy (GtkWidget *widget) #else gtk_exif_content_list_destroy (GtkObject *object) #endif { #if GTK_CHECK_VERSION(3,0,0) GtkExifContentList *list = GTK_EXIF_CONTENT_LIST (widget); #else GtkExifContentList *list = GTK_EXIF_CONTENT_LIST (object); #endif if (list->content) { exif_content_unref (list->content); list->content = NULL; } #if GTK_CHECK_VERSION(3,0,0) GTK_WIDGET_CLASS (parent_class)->destroy (widget); #else GTK_OBJECT_CLASS (parent_class)->destroy (object); #endif } GTK_EXIF_FINALIZE (content_list, ContentList) static void gtk_exif_content_list_class_init (gpointer g_class, gpointer class_data) { #if GTK_CHECK_VERSION(3,0,0) GtkWidgetClass *widget_class; GObjectClass *gobject_class; widget_class = GTK_WIDGET_CLASS (g_class); widget_class->destroy = gtk_exif_content_list_destroy; #else GtkObjectClass *object_class; GObjectClass *gobject_class; object_class = GTK_OBJECT_CLASS (g_class); object_class->destroy = gtk_exif_content_list_destroy; #endif gobject_class = G_OBJECT_CLASS (g_class); gobject_class->finalize = gtk_exif_content_list_finalize; signals[ENTRY_SELECTED] = g_signal_new ("entry_selected", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkExifContentListClass, entry_selected), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); signals[ENTRY_ADDED] = g_signal_new ("entry_added", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GtkExifContentListClass, entry_added), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); signals[ENTRY_CHANGED] = g_signal_new ("entry_changed", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GtkExifContentListClass, entry_changed), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); signals[ENTRY_REMOVED] = g_signal_new ("entry_removed", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GtkExifContentListClass, entry_removed), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); parent_class = g_type_class_peek_parent (g_class); } static gboolean selection_func (GtkTreeSelection *sel, GtkTreeModel *model, GtkTreePath *path, gboolean path_cur_selected, gpointer data) { GtkExifContentList *list = GTK_EXIF_CONTENT_LIST (data); GValue value = {0}; GtkTreeIter iter; if (path_cur_selected) return (TRUE); gtk_tree_model_get_iter (model, &iter, path); gtk_tree_model_get_value (model, &iter, ENTRY_COLUMN, &value); g_signal_emit (G_OBJECT (list), signals[ENTRY_SELECTED], 0, g_value_peek_pointer (&value)); g_value_unset (&value); return (TRUE); } static void gtk_exif_content_list_init (GTypeInstance *instance, gpointer g_class) { GtkExifContentList *list = GTK_EXIF_CONTENT_LIST (instance); GtkCellRenderer *renderer; GtkTreeViewColumn *col; GtkTreeSelection *sel; /* Column for tags */ renderer = gtk_cell_renderer_text_new (); col = gtk_tree_view_column_new_with_attributes (_("Tag"), renderer, "text", NAME_COLUMN, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (list), col); /* Column for values */ renderer = gtk_cell_renderer_text_new (); col = gtk_tree_view_column_new_with_attributes (_("Value"), renderer, "text", VALUE_COLUMN, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (list), col); /* Catch selections */ sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (list)); gtk_tree_selection_set_select_function (sel, selection_func, list, NULL); list->priv = g_new0 (GtkExifContentListPrivate, 1); list->priv->store = gtk_list_store_new (NUM_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER); gtk_tree_view_set_model (GTK_TREE_VIEW (list), GTK_TREE_MODEL (list->priv->store)); } GTK_EXIF_CLASS (content_list, ContentList, "ContentList") static void on_hide (GtkWidget *widget, GtkMenu *menu) { g_object_unref (G_OBJECT (menu)); } static void remove_foreach_func (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { GValue value = {0}; ExifEntry *entry; GtkExifContentList *list = GTK_EXIF_CONTENT_LIST (data); gtk_tree_model_get_value (model, iter, ENTRY_COLUMN, &value); g_assert (G_VALUE_HOLDS (&value, G_TYPE_POINTER)); entry = g_value_peek_pointer (&value); exif_entry_ref (entry); g_value_unset (&value); gtk_list_store_remove (list->priv->store, iter); g_signal_emit (G_OBJECT (list), signals[ENTRY_REMOVED], 0, entry); exif_entry_unref (entry); } static void on_remove_activate (GtkMenuItem *item, GtkExifContentList *list) { gtk_tree_selection_selected_foreach ( gtk_tree_view_get_selection (GTK_TREE_VIEW (list)), remove_foreach_func, NULL); } static void on_tag_selected (GtkMenuOption *menu, guint option, GtkExifContentList *list) { ExifEntry *entry; ExifTag tag = option; entry = exif_entry_new (); exif_content_add_entry (list->content, entry); exif_entry_initialize (entry, tag); gtk_exif_content_list_add_entry (list, entry); exif_entry_unref (entry); } #define LIST_SIZE 1024 static gint on_button_press_event (GtkWidget *widget, GdkEventButton *event, GtkExifContentList *list) { GtkWidget *menu, *item, *smenu, *ssmenu; GtkOptions tags[LIST_SIZE]; guint t, n, i, j; const gchar *name; gchar *s; g_return_val_if_fail (GTK_EXIF_IS_CONTENT_LIST (list), FALSE); switch (event->button) { case 3: /* Create the popup menu */ menu = gtk_menu_new (); g_object_ref (menu); g_object_ref_sink (G_OBJECT (menu)); /* Add */ item = gtk_menu_item_new_with_label (_("Add")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); smenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), smenu); /* Create a sorted list of tags. */ /* UGLY: libexif does not provide API for "all known tags". */ /* FIXME: List should offer only tags legal in current IFD */ t = n = 0; memset (tags, 0, sizeof (GtkOptions) * LIST_SIZE); while ((t < 0xffff) && (n < LIST_SIZE - 2)) { name = exif_tag_get_name (t); if (name) { tags[n].option = t; tags[n].name = name; n++; } t++; } /* These two tags are the only two known non-unique IFD-specific tags. */ name = exif_tag_get_name_in_ifd (EXIF_TAG_GPS_LATITUDE_REF, EXIF_IFD_GPS); tags[n].option = EXIF_TAG_GPS_LATITUDE_REF; tags[n].name = name; n++; name = exif_tag_get_name_in_ifd (EXIF_TAG_GPS_LATITUDE, EXIF_IFD_GPS); tags[n].option = EXIF_TAG_GPS_LATITUDE; tags[n].name = name; n++; gtk_options_sort (tags); g_assert (n > 1); /* Split the list into 3 parts. */ for (i = n / 3; tags[i].name && tags[i + 1].name; i++) if (*tags[i].name != *tags[i + 1].name) break; i++; memmove (tags + i + 1, tags + i, n - i); memset (tags + i, 0, sizeof (GtkOptions)); for (j = MAX (i, 2 * n / 3) + 1; tags[j].name && tags[j + 1].name; j++) if (*tags[j].name != *tags[j + 1].name) break; j++; memmove (tags + j + 1, tags + j, n - j); memset (tags + j, 0, sizeof (GtkOptions)); /* Create the first part of the list */ s = g_strdup_printf ("%c - %c", *tags[0].name, *tags[i - 1].name); item = gtk_menu_item_new_with_label (s); g_free (s); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (smenu), item); ssmenu = gtk_menu_option_new (tags); gtk_widget_show (ssmenu); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), ssmenu); g_signal_connect (G_OBJECT (ssmenu), "option_selected", G_CALLBACK (on_tag_selected), list); /* Create the second part of the list */ s = g_strdup_printf ("%c - %c", *tags[i + 1].name, *tags[j - 1].name); item = gtk_menu_item_new_with_label (s); g_free (s); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (smenu), item); ssmenu = gtk_menu_option_new (tags + i + 1); gtk_widget_show (ssmenu); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), ssmenu); g_signal_connect (G_OBJECT (ssmenu), "option_selected", G_CALLBACK (on_tag_selected), list); /* Create the third part of the list */ s = g_strdup_printf ("%c - %c", *tags[j + 1].name, *tags[n - 1].name); item = gtk_menu_item_new_with_label (s); g_free (s); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (smenu), item); ssmenu = gtk_menu_option_new (tags + j + 1); gtk_widget_show (ssmenu); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), ssmenu); g_signal_connect (G_OBJECT (ssmenu), "option_selected", G_CALLBACK (on_tag_selected), list); /* Remove */ item = gtk_menu_item_new_with_label (_("Remove")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (on_remove_activate), list); /* Popup */ gtk_widget_show (menu); gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, event->button, event->time); g_signal_connect (G_OBJECT (menu), "hide", G_CALLBACK (on_hide), menu); return (TRUE); default: return (FALSE); } } GtkWidget * gtk_exif_content_list_new (void) { GtkExifContentList *list; bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); list = g_object_new (GTK_EXIF_TYPE_CONTENT_LIST, NULL); g_signal_connect (G_OBJECT (list), "button_press_event", G_CALLBACK (on_button_press_event), list); return (GTK_WIDGET (list)); } static gboolean gtk_exif_content_list_get_iter (GtkExifContentList *list, ExifEntry *e, GtkTreeIter *iter) { GtkTreeModel *model; GValue value = {0}; g_return_val_if_fail (GTK_EXIF_IS_CONTENT_LIST (list), FALSE); g_return_val_if_fail (e != NULL, FALSE); g_return_val_if_fail (iter != NULL, FALSE); model = GTK_TREE_MODEL (list->priv->store); if (!gtk_tree_model_get_iter_first (model, iter)) return FALSE; gtk_tree_model_get_value (model, iter, ENTRY_COLUMN, &value); if (g_value_peek_pointer (&value) == e) { g_value_unset (&value); return TRUE; } g_value_unset (&value); while (gtk_tree_model_iter_next (model, iter)) { gtk_tree_model_get_value (model, iter, ENTRY_COLUMN, &value); if (g_value_peek_pointer (&value) == e) { g_value_unset (&value); return TRUE; } g_value_unset (&value); } return FALSE; } void gtk_exif_content_list_update_entry (GtkExifContentList *list, ExifEntry *e) { GtkTreeIter iter; gchar s[1024]; g_return_if_fail (GTK_EXIF_IS_CONTENT_LIST (list)); g_return_if_fail (e != NULL); if (!gtk_exif_content_list_get_iter (list, e, &iter)) return; gtk_list_store_set (list->priv->store, &iter, VALUE_COLUMN, exif_entry_get_value (e, s, sizeof (s)), -1); } void gtk_exif_content_list_remove_entry (GtkExifContentList *list, ExifEntry *entry) { GtkTreeIter iter; g_return_if_fail (GTK_EXIF_IS_CONTENT_LIST (list)); g_return_if_fail (entry != NULL); if (!gtk_exif_content_list_get_iter (list, entry, &iter)) return; gtk_list_store_remove (list->priv->store, &iter); } void gtk_exif_content_list_add_entry (GtkExifContentList *list, ExifEntry *e) { GtkTreeIter iter; gchar s[1024]; g_return_if_fail (GTK_EXIF_IS_CONTENT_LIST (list)); gtk_list_store_append (list->priv->store, &iter); gtk_list_store_set (GTK_LIST_STORE (list->priv->store), &iter, NAME_COLUMN, exif_tag_get_name_in_ifd (e->tag, exif_content_get_ifd(e->parent)), VALUE_COLUMN, exif_entry_get_value (e, s, sizeof (s)), ENTRY_COLUMN, e, -1); g_signal_emit (list, signals[ENTRY_ADDED], 0, e); } void gtk_exif_content_list_set_content (GtkExifContentList *list, ExifContent *content) { guint i; g_return_if_fail (GTK_EXIF_IS_CONTENT_LIST (list)); g_return_if_fail (content != NULL); if (list->content) exif_content_unref (list->content); list->content = content; exif_content_ref (content); gtk_list_store_clear (list->priv->store); for (i = 0; i < content->count; i++) gtk_exif_content_list_add_entry (list, content->entries[i]); } libexif-gtk-0.4.0/libexif-gtk/gtk-exif-content-list.h000664 000000 000000 00000005020 12115730414 022410 0ustar00rootroot000000 000000 /* gtk-exif-content-list.h * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_EXIF_CONTENT_LIST_H__ #define __GTK_EXIF_CONTENT_LIST_H__ #include #include #define GTK_EXIF_TYPE_CONTENT_LIST (gtk_exif_content_list_get_type()) #define GTK_EXIF_CONTENT_LIST(o) (G_TYPE_CHECK_INSTANCE_CAST((o),GTK_EXIF_TYPE_CONTENT_LIST,GtkExifContentList)) #define GTK_EXIF_CONTENT_LIST_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k),GTK_EXIF_TYPE_CONTENT_LIST,GtkExifContentListClass)) #define GTK_EXIF_IS_CONTENT_LIST(o) (G_TYPE_CHECK_INSTANCE_TYPE((o),GTK_EXIF_TYPE_CONTENT_LIST)) typedef struct _GtkExifContentList GtkExifContentList; typedef struct _GtkExifContentListPrivate GtkExifContentListPrivate; typedef struct _GtkExifContentListClass GtkExifContentListClass; struct _GtkExifContentList { GtkTreeView parent; ExifContent *content; GtkExifContentListPrivate *priv; }; struct _GtkExifContentListClass { GtkTreeViewClass parent_class; /* Signals */ void (* entry_selected) (GtkExifContentList *list, ExifEntry *); void (* entry_added) (GtkExifContentList *list, ExifEntry *); void (* entry_changed) (GtkExifContentList *list, ExifEntry *); void (* entry_removed) (GtkExifContentList *list, ExifEntry *); }; GType gtk_exif_content_list_get_type (void); GtkWidget *gtk_exif_content_list_new (void); void gtk_exif_content_list_add_entry (GtkExifContentList *, ExifEntry *entry); void gtk_exif_content_list_update_entry (GtkExifContentList *, ExifEntry *); void gtk_exif_content_list_remove_entry (GtkExifContentList *, ExifEntry *); void gtk_exif_content_list_set_content (GtkExifContentList *, ExifContent *); #endif /* __GTK_EXIF_CONTENT_LIST_H__ */ libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-ascii.c000664 000000 000000 00000007325 12115730414 022221 0ustar00rootroot000000 000000 /* gtk-exif-entry-ascii.c * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include "gtk-exif-entry-ascii.h" #include "gtk-exif-util.h" #include #include struct _GtkExifEntryAsciiPrivate { ExifEntry *entry; GtkEntry *gtk_entry; }; #define PARENT_TYPE GTK_EXIF_TYPE_ENTRY static GtkExifEntryClass *parent_class; static void #if GTK_CHECK_VERSION(3,0,0) gtk_exif_entry_ascii_destroy (GtkWidget *widget) #else gtk_exif_entry_ascii_destroy (GtkObject *object) #endif { #if GTK_CHECK_VERSION(3,0,0) GtkExifEntryAscii *entry = GTK_EXIF_ENTRY_ASCII (widget); #else GtkExifEntryAscii *entry = GTK_EXIF_ENTRY_ASCII (object); #endif if (entry->priv->entry) { exif_entry_unref (entry->priv->entry); entry->priv->entry = NULL; } #if GTK_CHECK_VERSION(3,0,0) GTK_WIDGET_CLASS (parent_class)->destroy (widget); #else GTK_OBJECT_CLASS (parent_class)->destroy (object); #endif } GTK_EXIF_FINALIZE (entry_ascii, EntryAscii) static void gtk_exif_entry_ascii_class_init (gpointer g_class, gpointer class_data) { #if GTK_CHECK_VERSION(3,0,0) GtkWidgetClass *widget_class; GObjectClass *gobject_class; widget_class = GTK_WIDGET_CLASS (g_class); widget_class->destroy = gtk_exif_entry_ascii_destroy; #else GtkObjectClass *object_class; GObjectClass *gobject_class; object_class = GTK_OBJECT_CLASS (g_class); object_class->destroy = gtk_exif_entry_ascii_destroy; #endif gobject_class = G_OBJECT_CLASS (g_class); gobject_class->finalize = gtk_exif_entry_ascii_finalize; parent_class = g_type_class_peek_parent (g_class); } static void gtk_exif_entry_ascii_init (GTypeInstance *instance, gpointer g_class) { GtkExifEntryAscii *entry = GTK_EXIF_ENTRY_ASCII (instance); entry->priv = g_new0 (GtkExifEntryAsciiPrivate, 1); } GTK_EXIF_CLASS (entry_ascii, EntryAscii, "EntryAscii") static void on_text_changed (GtkEditable *editable, GtkExifEntryAscii *entry) { gchar *txt; txt = gtk_editable_get_chars (editable, 0, -1); g_free (entry->priv->entry->data); entry->priv->entry->data = txt; entry->priv->entry->size = strlen (txt) + 1; entry->priv->entry->components = entry->priv->entry->size; gtk_exif_entry_changed (GTK_EXIF_ENTRY (entry), entry->priv->entry); } GtkWidget * gtk_exif_entry_ascii_new (ExifEntry *e) { GtkExifEntryAscii *entry; GtkWidget *widget; g_return_val_if_fail (e != NULL, NULL); g_return_val_if_fail (e->format == EXIF_FORMAT_ASCII, NULL); entry = g_object_new (GTK_EXIF_TYPE_ENTRY_ASCII, NULL); entry->priv->entry = e; exif_entry_ref (e); gtk_exif_entry_construct (GTK_EXIF_ENTRY (entry), exif_tag_get_title_in_ifd (e->tag, exif_content_get_ifd(e->parent)), exif_tag_get_description_in_ifd (e->tag, exif_content_get_ifd(e->parent))); widget = gtk_entry_new (); gtk_widget_show (widget); gtk_box_pack_start (GTK_BOX (entry), widget, TRUE, FALSE, 0); gtk_entry_set_text (GTK_ENTRY (widget), e->data); g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (on_text_changed), entry); return (GTK_WIDGET (entry)); } libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-ascii.h000664 000000 000000 00000003475 12115730414 022230 0ustar00rootroot000000 000000 /* gtk-exif-entry-ascii.h * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_EXIF_ENTRY_ASCII_H__ #define __GTK_EXIF_ENTRY_ASCII_H__ #include #define GTK_EXIF_TYPE_ENTRY_ASCII (gtk_exif_entry_ascii_get_type()) #define GTK_EXIF_ENTRY_ASCII(o) (G_TYPE_CHECK_INSTANCE_CAST((o),GTK_EXIF_TYPE_ENTRY_ASCII,GtkExifEntryAscii)) #define GTK_EXIF_ENTRY_ASCII_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k),GTK_EXIF_TYPE_ENTRY_ASCII,GtkExifEntryAsciiClass)) #define GTK_EXIF_IS_ENTRY_ASCII(o) (G_TYPE_CHECK_INSTANCE_TYPE((o),GTK_EXIF_TYPE_ENTRY_ASCII)) typedef struct _GtkExifEntryAscii GtkExifEntryAscii; typedef struct _GtkExifEntryAsciiPrivate GtkExifEntryAsciiPrivate; typedef struct _GtkExifEntryAsciiClass GtkExifEntryAsciiClass; struct _GtkExifEntryAscii { GtkExifEntry parent; GtkExifEntryAsciiPrivate *priv; }; struct _GtkExifEntryAsciiClass { GtkExifEntryClass parent_class; }; GType gtk_exif_entry_ascii_get_type (void); GtkWidget *gtk_exif_entry_ascii_new (ExifEntry *entry); #endif /* __GTK_EXIF_ENTRY_ASCII_H__ */ libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-copyright.c000664 000000 000000 00000014146 12115730414 023140 0ustar00rootroot000000 000000 /* gtk-exif-entry-copyright.c * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include "gtk-exif-entry-copyright.h" #include "gtk-exif-util.h" #include #include #ifdef ENABLE_NLS # include # undef _ # define _(String) dgettext (GETTEXT_PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define N_(String) (String) #endif struct _GtkExifEntryCopyrightPrivate { ExifEntry *entry; GtkEntry *photographer, *editor; }; #define PARENT_TYPE GTK_EXIF_TYPE_ENTRY static GtkExifEntryClass *parent_class; static void #if GTK_CHECK_VERSION(3,0,0) gtk_exif_entry_copyright_destroy (GtkWidget *widget) #else gtk_exif_entry_copyright_destroy (GtkObject *object) #endif { #if GTK_CHECK_VERSION(3,0,0) GtkExifEntryCopyright *entry = GTK_EXIF_ENTRY_COPYRIGHT (widget); #else GtkExifEntryCopyright *entry = GTK_EXIF_ENTRY_COPYRIGHT (object); #endif if (entry->priv->entry) { exif_entry_unref (entry->priv->entry); entry->priv->entry = NULL; } #if GTK_CHECK_VERSION(3,0,0) GTK_WIDGET_CLASS (parent_class)->destroy (widget); #else GTK_OBJECT_CLASS (parent_class)->destroy (object); #endif } GTK_EXIF_FINALIZE (entry_copyright, EntryCopyright) static void gtk_exif_entry_copyright_class_init (gpointer g_class, gpointer class_data) { #if GTK_CHECK_VERSION(3,0,0) GtkWidgetClass *widget_class; GObjectClass *gobject_class; widget_class = GTK_WIDGET_CLASS (g_class); widget_class->destroy = gtk_exif_entry_copyright_destroy; #else GtkObjectClass *object_class; GObjectClass *gobject_class; object_class = GTK_OBJECT_CLASS (g_class); object_class->destroy = gtk_exif_entry_copyright_destroy; #endif gobject_class = G_OBJECT_CLASS (g_class); gobject_class->finalize = gtk_exif_entry_copyright_finalize; parent_class = g_type_class_peek_parent (g_class); } static void gtk_exif_entry_copyright_init (GTypeInstance *instance, gpointer g_class) { GtkExifEntryCopyright *entry = GTK_EXIF_ENTRY_COPYRIGHT (instance); entry->priv = g_new0 (GtkExifEntryCopyrightPrivate, 1); } GTK_EXIF_CLASS (entry_copyright, EntryCopyright, "EntryCopyright") static void on_text_changed (GtkEditable *editable, GtkExifEntryCopyright *entry) { gchar *photographer, *editor; if (entry->priv->entry->data) { g_free (entry->priv->entry->data); entry->priv->entry->data = NULL; entry->priv->entry->size = 0; } photographer = gtk_editable_get_chars ( GTK_EDITABLE (entry->priv->photographer), 0, -1); editor = gtk_editable_get_chars ( GTK_EDITABLE (entry->priv->editor), 0, -1); entry->priv->entry->data = g_strdup_printf ("%s %s", photographer, editor); entry->priv->entry->data[strlen (photographer)] = '\0'; entry->priv->entry->size = strlen (photographer) + 1 + strlen (editor) + 1; entry->priv->entry->components = entry->priv->entry->size; g_free (photographer); g_free (editor); gtk_exif_entry_changed (GTK_EXIF_ENTRY (entry), entry->priv->entry); } GtkWidget * gtk_exif_entry_copyright_new (ExifEntry *e) { GtkExifEntryCopyright *entry; GtkWidget *widget, *label, *table; g_return_val_if_fail (e != NULL, NULL); g_return_val_if_fail (e->format == EXIF_FORMAT_ASCII, NULL); g_return_val_if_fail (e->tag == EXIF_TAG_COPYRIGHT, NULL); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); entry = g_object_new (GTK_EXIF_TYPE_ENTRY_COPYRIGHT, NULL); entry->priv->entry = e; exif_entry_ref (e); gtk_exif_entry_construct (GTK_EXIF_ENTRY (entry), exif_tag_get_title_in_ifd (e->tag, exif_content_get_ifd(e->parent)), exif_tag_get_description_in_ifd (e->tag, exif_content_get_ifd(e->parent))); table = gtk_table_new (2, 2, FALSE); gtk_widget_show (table); gtk_table_set_col_spacings (GTK_TABLE (table), 5); gtk_table_set_row_spacings (GTK_TABLE (table), 5); gtk_box_pack_start (GTK_BOX (entry), table, TRUE, FALSE, 0); label = gtk_label_new (_("Photographer:")); gtk_widget_show (label); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); label = gtk_label_new (_("Editor:")); gtk_widget_show (label); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); widget = gtk_entry_new (); gtk_widget_show (widget); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, 0, 0, 0); gtk_entry_set_text (GTK_ENTRY (widget), e->data); g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (on_text_changed), entry); entry->priv->photographer = GTK_ENTRY (widget); widget = gtk_entry_new (); gtk_widget_show (widget); gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, 0, 0, 0); gtk_entry_set_text (GTK_ENTRY (widget), e->data + strlen (e->data) + 1); g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (on_text_changed), entry); entry->priv->editor = GTK_ENTRY (widget); return (GTK_WIDGET (entry)); } libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-copyright.h000664 000000 000000 00000003642 12115730414 023144 0ustar00rootroot000000 000000 /* gtk-exif-entry-copyright.h * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_EXIF_ENTRY_COPYRIGHT_H__ #define __GTK_EXIF_ENTRY_COPYRIGHT_H__ #include #define GTK_EXIF_TYPE_ENTRY_COPYRIGHT (gtk_exif_entry_copyright_get_type()) #define GTK_EXIF_ENTRY_COPYRIGHT(o) (G_TYPE_CHECK_INSTANCE_CAST((o),GTK_EXIF_TYPE_ENTRY_COPYRIGHT,GtkExifEntryCopyright)) #define GTK_EXIF_ENTRY_COPYRIGHT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k),GTK_EXIF_TYPE_ENTRY_COPYRIGHT,GtkExifEntryCopyrightClass)) #define GTK_EXIF_IS_ENTRY_COPYRIGHT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o),GTK_EXIF_TYPE_ENTRY_COPYRIGHT)) typedef struct _GtkExifEntryCopyright GtkExifEntryCopyright; typedef struct _GtkExifEntryCopyrightPrivate GtkExifEntryCopyrightPrivate; typedef struct _GtkExifEntryCopyrightClass GtkExifEntryCopyrightClass; struct _GtkExifEntryCopyright { GtkExifEntry parent; GtkExifEntryCopyrightPrivate *priv; }; struct _GtkExifEntryCopyrightClass { GtkExifEntryClass parent_class; }; GType gtk_exif_entry_copyright_get_type (void); GtkWidget *gtk_exif_entry_copyright_new (ExifEntry *entry); #endif /* __GTK_EXIF_ENTRY_COPYRIGHT_H__ */ libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-date.c000664 000000 000000 00000017505 12115730414 022047 0ustar00rootroot000000 000000 /* gtk-exif-entry-date.c * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include "gtk-exif-entry-date.h" #include "gtk-exif-util.h" #include #include #include #include #ifdef ENABLE_NLS # include # undef _ # define _(String) dgettext (GETTEXT_PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define N_(String) (String) #endif struct _GtkExifEntryDatePrivate { ExifEntry *entry; GtkCalendar *cal; GtkAdjustment *a_hour, *a_min, *a_sec; }; #define PARENT_TYPE GTK_EXIF_TYPE_ENTRY static GtkExifEntryClass *parent_class; static void #if GTK_CHECK_VERSION(3,0,0) gtk_exif_entry_date_destroy (GtkWidget *widget) #else gtk_exif_entry_date_destroy (GtkObject *object) #endif { #if GTK_CHECK_VERSION(3,0,0) GtkExifEntryDate *entry = GTK_EXIF_ENTRY_DATE (widget); #else GtkExifEntryDate *entry = GTK_EXIF_ENTRY_DATE (object); #endif if (entry->priv->entry) { exif_entry_unref (entry->priv->entry); entry->priv->entry = NULL; } #if GTK_CHECK_VERSION(3,0,0) GTK_WIDGET_CLASS (parent_class)->destroy (widget); #else GTK_OBJECT_CLASS (parent_class)->destroy (object); #endif } GTK_EXIF_FINALIZE (entry_date, EntryDate) static void gtk_exif_entry_date_class_init (gpointer g_class, gpointer class_data) { #if GTK_CHECK_VERSION(3,0,0) GtkWidgetClass *widget_class; GObjectClass *gobject_class; widget_class = GTK_WIDGET_CLASS (g_class); widget_class->destroy = gtk_exif_entry_date_destroy; #else GtkObjectClass *object_class; GObjectClass *gobject_class; object_class = GTK_OBJECT_CLASS (g_class); object_class->destroy = gtk_exif_entry_date_destroy; #endif gobject_class = G_OBJECT_CLASS (g_class); gobject_class->finalize = gtk_exif_entry_date_finalize; parent_class = g_type_class_peek_parent (g_class); } static void gtk_exif_entry_date_init (GTypeInstance *instance, gpointer g_class) { GtkExifEntryDate *entry = GTK_EXIF_ENTRY_DATE (instance); entry->priv = g_new0 (GtkExifEntryDatePrivate, 1); } GTK_EXIF_CLASS (entry_date, EntryDate, "EntryDate") static void gtk_exif_entry_date_load (GtkExifEntryDate *entry) { GtkExifEntryDatePrivate *p; gchar *data; g_return_if_fail (GTK_EXIF_IS_ENTRY_DATE (entry)); p = entry->priv; g_signal_handlers_block_matched (G_OBJECT (p->cal), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, entry); g_signal_handlers_block_matched (G_OBJECT (p->a_hour), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, entry); g_signal_handlers_block_matched (G_OBJECT (p->a_min), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, entry); g_signal_handlers_block_matched (G_OBJECT (p->a_sec), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, entry); data = g_strdup (entry->priv->entry->data); data[4] = data[7] = data[10] = data[13] = data[16] = '\0'; gtk_calendar_select_month (p->cal, atoi (data + 5) - 1, atoi (data)); gtk_calendar_select_day (entry->priv->cal, atoi (data + 8)); gtk_adjustment_set_value (entry->priv->a_hour, atoi (data + 11)); gtk_adjustment_set_value (entry->priv->a_min, atoi (data + 14)); gtk_adjustment_set_value (entry->priv->a_sec, atoi (data + 17)); g_free (data); g_signal_handlers_unblock_matched (G_OBJECT (p->cal), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, entry); g_signal_handlers_unblock_matched (G_OBJECT (p->a_hour), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, entry); g_signal_handlers_unblock_matched (G_OBJECT (p->a_min), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, entry); g_signal_handlers_unblock_matched (G_OBJECT (p->a_sec), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, entry); } static void gtk_exif_entry_date_save (GtkExifEntryDate *entry) { guint year, month, day; g_return_if_fail (GTK_EXIF_IS_ENTRY_DATE (entry)); gtk_calendar_get_date (entry->priv->cal, &year, &month, &day); sprintf (entry->priv->entry->data, "%04i:%02i:%02i %02i:%02i:%02i", (gint) year, (gint) month + 1, (gint) day, (gint) gtk_adjustment_get_value(entry->priv->a_hour), (gint) gtk_adjustment_get_value(entry->priv->a_min), (gint) gtk_adjustment_get_value(entry->priv->a_sec)); gtk_exif_entry_changed (GTK_EXIF_ENTRY (entry), entry->priv->entry); } static void on_day_selected (GtkCalendar *calendar, GtkExifEntryDate *entry) { gtk_exif_entry_date_save (entry); } static void on_time_changed (GtkAdjustment *adjustment, GtkExifEntryDate *entry) { gtk_exif_entry_date_save (entry); } GtkWidget * gtk_exif_entry_date_new (ExifEntry *e) { GtkExifEntryDate *entry; GtkWidget *c, *hbox, *label, *spin; #if GTK_CHECK_VERSION(3,0,0) GtkAdjustment *a; #else GtkObject *a; #endif g_return_val_if_fail (e != NULL, NULL); g_return_val_if_fail ((e->tag == EXIF_TAG_DATE_TIME) || (e->tag == EXIF_TAG_DATE_TIME_ORIGINAL) || (e->tag == EXIF_TAG_DATE_TIME_DIGITIZED), NULL); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); entry = g_object_new (GTK_EXIF_TYPE_ENTRY_DATE, NULL); entry->priv->entry = e; exif_entry_ref (e); gtk_exif_entry_construct (GTK_EXIF_ENTRY (entry), exif_tag_get_title_in_ifd (e->tag, exif_content_get_ifd(e->parent)), exif_tag_get_description_in_ifd (e->tag, exif_content_get_ifd(e->parent))); c = gtk_calendar_new (); gtk_widget_show (c); gtk_box_pack_start (GTK_BOX (entry), c, TRUE, FALSE, 0); entry->priv->cal = GTK_CALENDAR (c); g_signal_connect (G_OBJECT (c), "day_selected", G_CALLBACK (on_day_selected), entry); hbox = gtk_hbox_new (FALSE, 5); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (entry), hbox, TRUE, FALSE, 0); label = gtk_label_new (_("Time:")); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); a = gtk_adjustment_new (0, 0, 23, 1, 1, 0); spin = gtk_spin_button_new (GTK_ADJUSTMENT (a), 0, 0); gtk_widget_show (spin); gtk_box_pack_start (GTK_BOX (hbox), spin, FALSE, FALSE, 0); entry->priv->a_hour = GTK_ADJUSTMENT (a); g_signal_connect (a, "value_changed", G_CALLBACK (on_time_changed), entry); label = gtk_label_new (":"); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); a = gtk_adjustment_new (0, 0, 59, 1, 1, 0); spin = gtk_spin_button_new (GTK_ADJUSTMENT (a), 0, 0); gtk_widget_show (spin); gtk_box_pack_start (GTK_BOX (hbox), spin, FALSE, FALSE, 0); entry->priv->a_min = GTK_ADJUSTMENT (a); g_signal_connect (a, "value_changed", G_CALLBACK (on_time_changed), entry); label = gtk_label_new (":"); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); a = gtk_adjustment_new (0, 0, 59, 1, 1, 0); spin = gtk_spin_button_new (GTK_ADJUSTMENT (a), 0, 0); gtk_widget_show (spin); gtk_box_pack_start (GTK_BOX (hbox), spin, FALSE, FALSE, 0); entry->priv->a_sec = GTK_ADJUSTMENT (a); g_signal_connect (a, "value_changed", G_CALLBACK (on_time_changed), entry); gtk_exif_entry_date_load (entry); return (GTK_WIDGET (entry)); } libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-date.h000664 000000 000000 00000003444 12115730414 022051 0ustar00rootroot000000 000000 /* gtk-exif-entry-date.h * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_EXIF_ENTRY_DATE_H__ #define __GTK_EXIF_ENTRY_DATE_H__ #include #define GTK_EXIF_TYPE_ENTRY_DATE (gtk_exif_entry_date_get_type()) #define GTK_EXIF_ENTRY_DATE(o) (G_TYPE_CHECK_INSTANCE_CAST((o),GTK_EXIF_TYPE_ENTRY_DATE,GtkExifEntryDate)) #define GTK_EXIF_ENTRY_DATE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k),GTK_EXIF_TYPE_ENTRY_DATE,GtkExifEntryDateClass)) #define GTK_EXIF_IS_ENTRY_DATE(o) (G_TYPE_CHECK_INSTANCE_TYPE((o),GTK_EXIF_TYPE_ENTRY_DATE)) typedef struct _GtkExifEntryDate GtkExifEntryDate; typedef struct _GtkExifEntryDatePrivate GtkExifEntryDatePrivate; typedef struct _GtkExifEntryDateClass GtkExifEntryDateClass; struct _GtkExifEntryDate { GtkExifEntry parent; GtkExifEntryDatePrivate *priv; }; struct _GtkExifEntryDateClass { GtkExifEntryClass parent_class; }; GType gtk_exif_entry_date_get_type (void); GtkWidget *gtk_exif_entry_date_new (ExifEntry *entry); #endif /* __GTK_EXIF_ENTRY_DATE_H__ */ libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-flash.c000664 000000 000000 00000015264 12115730414 022227 0ustar00rootroot000000 000000 /* gtk-exif-entry-flash.c * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include "gtk-exif-entry-flash.h" #include "gtk-exif-util.h" #include #include #ifdef ENABLE_NLS # include # undef _ # define _(String) dgettext (GETTEXT_PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define N_(String) (String) #endif struct _GtkExifEntryFlashPrivate { ExifEntry *entry; GtkToggleButton *c; GtkToggleButton *r1, *r2, *r3; }; #define PARENT_TYPE GTK_EXIF_TYPE_ENTRY static GtkExifEntryClass *parent_class; static void #if GTK_CHECK_VERSION(3,0,0) gtk_exif_entry_flash_destroy (GtkWidget *widget) #else gtk_exif_entry_flash_destroy (GtkObject *object) #endif { #if GTK_CHECK_VERSION(3,0,0) GtkExifEntryFlash *entry = GTK_EXIF_ENTRY_FLASH (widget); #else GtkExifEntryFlash *entry = GTK_EXIF_ENTRY_FLASH (object); #endif if (entry->priv->entry) { exif_entry_unref (entry->priv->entry); entry->priv->entry = NULL; } #if GTK_CHECK_VERSION(3,0,0) GTK_WIDGET_CLASS (parent_class)->destroy (widget); #else GTK_OBJECT_CLASS (parent_class)->destroy (object); #endif } GTK_EXIF_FINALIZE (entry_flash, EntryFlash) static void gtk_exif_entry_flash_class_init (gpointer g_class, gpointer class_data) { #if GTK_CHECK_VERSION(3,0,0) GtkWidgetClass *widget_class; GObjectClass *gobject_class; widget_class = GTK_WIDGET_CLASS (g_class); widget_class->destroy = gtk_exif_entry_flash_destroy; #else GtkObjectClass *object_class; GObjectClass *gobject_class; object_class = GTK_OBJECT_CLASS (g_class); object_class->destroy = gtk_exif_entry_flash_destroy; #endif gobject_class = G_OBJECT_CLASS (g_class); gobject_class->finalize = gtk_exif_entry_flash_finalize; parent_class = g_type_class_peek_parent (g_class); } static void gtk_exif_entry_flash_init (GTypeInstance *instance, gpointer g_class) { GtkExifEntryFlash *entry = GTK_EXIF_ENTRY_FLASH (instance); entry->priv = g_new0 (GtkExifEntryFlashPrivate, 1); } GTK_EXIF_CLASS (entry_flash, EntryFlash, "EntryFlash") static void on_value_changed (GtkToggleButton *toggle, GtkExifEntryFlash *entry) { unsigned char *d; ExifByteOrder o; ExifShort v; g_return_if_fail (GTK_EXIF_IS_ENTRY_FLASH (entry)); d = entry->priv->entry->data; o = exif_data_get_byte_order (entry->priv->entry->parent->parent); v = exif_get_short(d,o); v &= 0xfe; if (gtk_toggle_button_get_active (entry->priv->c)) v |= 0x01; v &= 0xf9; if (gtk_toggle_button_get_active (entry->priv->r2)) v |= 0x04; else if (gtk_toggle_button_get_active (entry->priv->r3)) v |= 0x06; exif_set_short(d, o, v); g_signal_emit_by_name (G_OBJECT (entry), "entry_changed", entry->priv->entry); } GtkWidget * gtk_exif_entry_flash_new (ExifEntry *e) { GtkExifEntryFlash *entry; GtkWidget *check, *frame, *vbox, *radio; GSList *group; ExifByteOrder o; g_return_val_if_fail (e != NULL, NULL); g_return_val_if_fail (e->tag == EXIF_TAG_FLASH, NULL); g_return_val_if_fail (e->format == EXIF_FORMAT_SHORT, NULL); entry = g_object_new (GTK_EXIF_TYPE_ENTRY_FLASH, NULL); entry->priv->entry = e; exif_entry_ref (e); o = exif_data_get_byte_order (e->parent->parent); gtk_exif_entry_construct (GTK_EXIF_ENTRY (entry), exif_tag_get_title_in_ifd (e->tag, exif_content_get_ifd(e->parent)), exif_tag_get_description_in_ifd (e->tag, exif_content_get_ifd(e->parent))); check = gtk_check_button_new_with_label (_("Flash fired")); gtk_widget_show (check); gtk_box_pack_start (GTK_BOX (entry), check, FALSE, FALSE, 0); if (exif_get_short(e->data, o) & (1 << 0)) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), TRUE); g_signal_connect (G_OBJECT (check), "toggled", G_CALLBACK (on_value_changed), entry); entry->priv->c = GTK_TOGGLE_BUTTON (check); frame = gtk_frame_new (_("Return light")); gtk_widget_show (frame); gtk_box_pack_start (GTK_BOX (entry), frame, FALSE, FALSE, 0); vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox); gtk_container_add (GTK_CONTAINER (frame), vbox); /* No strobe return detection function */ radio = gtk_radio_button_new_with_label (NULL, _("No strobe return " "detection function")); gtk_widget_show (radio); gtk_box_pack_start (GTK_BOX (vbox), radio, FALSE, FALSE, 0); if (!(exif_get_short(e->data, o) & (1 << 1)) && !(exif_get_short(e->data, o) & (1 << 2))) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), TRUE); g_signal_connect (G_OBJECT (radio), "toggled", G_CALLBACK (on_value_changed), entry); entry->priv->r1 = GTK_TOGGLE_BUTTON (radio); /* Stobe return light not detected */ group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio)); radio = gtk_radio_button_new_with_label (group, _("Strobe return light not detected")); gtk_widget_show (radio); gtk_box_pack_start (GTK_BOX (vbox), radio, FALSE, FALSE, 0); if (!(exif_get_short(e->data, o) & (1 << 1)) && (exif_get_short(e->data, o) & (1 << 2))) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), TRUE); g_signal_connect (G_OBJECT (radio), "toggled", G_CALLBACK (on_value_changed), entry); entry->priv->r2 = GTK_TOGGLE_BUTTON (radio); /* Strobe return light detected */ group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio)); radio = gtk_radio_button_new_with_label (group, _("Strobe return light detected")); gtk_widget_show (radio); gtk_box_pack_start (GTK_BOX (vbox), radio, FALSE, FALSE, 0); if ((exif_get_short(e->data, o) & (1 << 1)) && (exif_get_short(e->data, o) & (1 << 2))) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), TRUE); g_signal_connect (G_OBJECT (radio), "toggled", G_CALLBACK (on_value_changed), entry); entry->priv->r3 = GTK_TOGGLE_BUTTON (radio); return (GTK_WIDGET (entry)); } libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-flash.h000664 000000 000000 00000003476 12115730414 022236 0ustar00rootroot000000 000000 /* gtk-exif-entry-flash.h * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_EXIF_ENTRY_FLASH_H__ #define __GTK_EXIF_ENTRY_FLASH_H__ #include #define GTK_EXIF_TYPE_ENTRY_FLASH (gtk_exif_entry_flash_get_type()) #define GTK_EXIF_ENTRY_FLASH(o) (G_TYPE_CHECK_INSTANCE_CAST((o),GTK_EXIF_TYPE_ENTRY_FLASH,GtkExifEntryFlash)) #define GTK_EXIF_ENTRY_FLASH_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k),GTK_EXIF_TYPE_ENTRY_FLASH,GtkExifEntryFlashClass)) #define GTK_EXIF_IS_ENTRY_FLASH(o) (G_TYPE_CHECK_INSTANCE_TYPE((o),GTK_EXIF_TYPE_ENTRY_FLASH)) typedef struct _GtkExifEntryFlash GtkExifEntryFlash; typedef struct _GtkExifEntryFlashPrivate GtkExifEntryFlashPrivate; typedef struct _GtkExifEntryFlashClass GtkExifEntryFlashClass; struct _GtkExifEntryFlash { GtkExifEntry parent; GtkExifEntryFlashPrivate *priv; }; struct _GtkExifEntryFlashClass { GtkExifEntryClass parent_class; }; GType gtk_exif_entry_flash_get_type (void); GtkWidget *gtk_exif_entry_flash_new (ExifEntry *entry); #endif /* __GTK_EXIF_ENTRY_FLASH_H__ */ libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-generic.c000664 000000 000000 00000012205 12115730414 022536 0ustar00rootroot000000 000000 /* gtk-exif-entry-generic.c * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include "gtk-exif-entry-generic.h" #include "gtk-exif-util.h" #include #include #ifdef ENABLE_NLS # include # undef _ # define _(String) dgettext (GETTEXT_PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define N_(String) (String) #endif struct _GtkExifEntryGenericPrivate { ExifEntry *entry; GtkToggleButton *c; GtkToggleButton *r1, *r2, *r3; }; #define PARENT_TYPE GTK_EXIF_TYPE_ENTRY static GtkExifEntryClass *parent_class; static void #if GTK_CHECK_VERSION(3,0,0) gtk_exif_entry_generic_destroy (GtkWidget *widget) #else gtk_exif_entry_generic_destroy (GtkObject *object) #endif { #if GTK_CHECK_VERSION(3,0,0) GtkExifEntryGeneric *entry = GTK_EXIF_ENTRY_GENERIC (widget); #else GtkExifEntryGeneric *entry = GTK_EXIF_ENTRY_GENERIC (object); #endif if (entry->priv->entry) { exif_entry_unref (entry->priv->entry); entry->priv->entry = NULL; } #if GTK_CHECK_VERSION(3,0,0) GTK_WIDGET_CLASS (parent_class)->destroy (widget); #else GTK_OBJECT_CLASS (parent_class)->destroy (object); #endif } GTK_EXIF_FINALIZE (entry_generic, EntryGeneric) static void gtk_exif_entry_generic_class_init (gpointer g_class, gpointer class_data) { #if GTK_CHECK_VERSION(3,0,0) GtkWidgetClass *widget_class; GObjectClass *gobject_class; widget_class = GTK_WIDGET_CLASS (g_class); widget_class->destroy = gtk_exif_entry_generic_destroy; #else GtkObjectClass *object_class; GObjectClass *gobject_class; object_class = GTK_OBJECT_CLASS (g_class); object_class->destroy = gtk_exif_entry_generic_destroy; #endif gobject_class = G_OBJECT_CLASS (g_class); gobject_class->finalize = gtk_exif_entry_generic_finalize; parent_class = g_type_class_peek_parent (g_class); } static void gtk_exif_entry_generic_init (GTypeInstance *instance, gpointer g_class) { GtkExifEntryGeneric *entry = GTK_EXIF_ENTRY_GENERIC (instance); entry->priv = g_new0 (GtkExifEntryGenericPrivate, 1); } GTK_EXIF_CLASS (entry_generic, EntryGeneric, "EntryGeneric") GtkWidget * gtk_exif_entry_generic_new (ExifEntry *e) { GtkExifEntryGeneric *entry; GtkWidget *table, *label; gchar *txt, s[1024]; g_return_val_if_fail (e != NULL, NULL); entry = g_object_new (GTK_EXIF_TYPE_ENTRY_GENERIC, NULL); entry->priv->entry = e; exif_entry_ref (e); gtk_exif_entry_construct (GTK_EXIF_ENTRY (entry), exif_tag_get_title_in_ifd (e->tag, exif_content_get_ifd(e->parent)), exif_tag_get_description_in_ifd (e->tag, exif_content_get_ifd(e->parent))); table = gtk_table_new (2, 4, FALSE); gtk_widget_show (table); gtk_box_pack_start (GTK_BOX (entry), table, TRUE, TRUE, 0); gtk_table_set_col_spacings (GTK_TABLE (table), 5); gtk_table_set_row_spacings (GTK_TABLE (table), 5); label = gtk_label_new (_("Format:")); gtk_widget_show (label); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, 0, 0, 0, 0); txt = g_strdup_printf ("%i ('%s')", e->format, exif_format_get_name (e->format)); label = gtk_label_new (txt); g_free (txt); gtk_widget_show (label); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, 0, 0, 0, 0); label = gtk_label_new (_("Components:")); gtk_widget_show (label); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, 0, 0, 0, 0); txt = g_strdup_printf ("%i", (int) e->components); label = gtk_label_new (txt); g_free (txt); gtk_widget_show (label); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 1, 2, 0, 0, 0, 0); label = gtk_label_new (_("Size:")); gtk_widget_show (label); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, 0, 0, 0, 0); txt = g_strdup_printf ("%i", e->size); label = gtk_label_new (txt); g_free (txt); gtk_widget_show (label); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 2, 3, 0, 0, 0, 0); label = gtk_label_new (_("Value:")); gtk_widget_show (label); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, 0, 0, 0, 0); label = gtk_label_new (exif_entry_get_value (e, s, sizeof (s))); gtk_widget_show (label); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 3, 4, 0, 0, 0, 0); return (GTK_WIDGET (entry)); } libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-generic.h000664 000000 000000 00000003561 12115730414 022550 0ustar00rootroot000000 000000 /* gtk-exif-entry-generic.h * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_EXIF_ENTRY_GENERIC_H__ #define __GTK_EXIF_ENTRY_GENERIC_H__ #include #define GTK_EXIF_TYPE_ENTRY_GENERIC (gtk_exif_entry_generic_get_type()) #define GTK_EXIF_ENTRY_GENERIC(o) (G_TYPE_CHECK_INSTANCE_CAST((o),GTK_EXIF_TYPE_ENTRY_GENERIC,GtkExifEntryGeneric)) #define GTK_EXIF_ENTRY_GENERIC_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k),GTK_EXIF_TYPE_ENTRY_GENERIC,GtkExifEntryGenericClass)) #define GTK_EXIF_IS_ENTRY_GENERIC(o) (G_TYPE_CHECK_INSTANCE_TYPE((o),GTK_EXIF_TYPE_ENTRY_GENERIC)) typedef struct _GtkExifEntryGeneric GtkExifEntryGeneric; typedef struct _GtkExifEntryGenericPrivate GtkExifEntryGenericPrivate; typedef struct _GtkExifEntryGenericClass GtkExifEntryGenericClass; struct _GtkExifEntryGeneric { GtkExifEntry parent; GtkExifEntryGenericPrivate *priv; }; struct _GtkExifEntryGenericClass { GtkExifEntryClass parent_class; }; GType gtk_exif_entry_generic_get_type (void); GtkWidget *gtk_exif_entry_generic_new (ExifEntry *entry); #endif /* __GTK_EXIF_ENTRY_GENERIC_H__ */ libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-number.c000664 000000 000000 00000016561 12115730414 022423 0ustar00rootroot000000 000000 /* gtk-exif-entry-number.c * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include "gtk-exif-entry-number.h" #include "gtk-exif-util.h" #include #include #include #ifdef ENABLE_NLS # include # undef _ # define _(String) dgettext (GETTEXT_PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define N_(String) (String) #endif struct _GtkExifEntryNumberPrivate { ExifEntry *entry; GPtrArray *a; }; #define PARENT_TYPE GTK_EXIF_TYPE_ENTRY static GtkExifEntryClass *parent_class; static void #if GTK_CHECK_VERSION(3,0,0) gtk_exif_entry_number_destroy (GtkWidget *widget) #else gtk_exif_entry_number_destroy (GtkObject *object) #endif { #if GTK_CHECK_VERSION(3,0,0) GtkExifEntryNumber *entry = GTK_EXIF_ENTRY_NUMBER (widget); #else GtkExifEntryNumber *entry = GTK_EXIF_ENTRY_NUMBER (object); #endif if (entry->priv->entry) { exif_entry_unref (entry->priv->entry); entry->priv->entry = NULL; } if (entry->priv->a) { g_ptr_array_free (entry->priv->a, TRUE); entry->priv->a = NULL; } #if GTK_CHECK_VERSION(3,0,0) GTK_WIDGET_CLASS (parent_class)->destroy (widget); #else GTK_OBJECT_CLASS (parent_class)->destroy (object); #endif } GTK_EXIF_FINALIZE (entry_number, EntryNumber) static void gtk_exif_entry_number_class_init (gpointer g_class, gpointer class_data) { #if GTK_CHECK_VERSION(3,0,0) GtkWidgetClass *widget_class; GObjectClass *gobject_class; widget_class = GTK_WIDGET_CLASS (g_class); widget_class->destroy = gtk_exif_entry_number_destroy; #else GtkObjectClass *object_class; GObjectClass *gobject_class; object_class = GTK_OBJECT_CLASS (g_class); object_class->destroy = gtk_exif_entry_number_destroy; #endif gobject_class = G_OBJECT_CLASS (g_class); gobject_class->finalize = gtk_exif_entry_number_finalize; parent_class = g_type_class_peek_parent (g_class); } static void gtk_exif_entry_number_init (GTypeInstance *instance, gpointer g_class) { GtkExifEntryNumber *entry = GTK_EXIF_ENTRY_NUMBER (instance); entry->priv = g_new0 (GtkExifEntryNumberPrivate, 1); entry->priv->a = g_ptr_array_new (); } GTK_EXIF_CLASS (entry_number, EntryNumber, "EntryNumber") static void gtk_exif_entry_number_load (GtkExifEntryNumber *entry) { ExifByte v_byte; ExifShort v_short; ExifLong v_long; ExifSLong v_slong; GtkAdjustment *a; ExifEntry *e; guint i; ExifByteOrder o; g_return_if_fail (GTK_EXIF_IS_ENTRY_NUMBER (entry)); o = exif_data_get_byte_order (entry->priv->entry->parent->parent); e = entry->priv->entry; for (i = 0; i < e->components; i++) { a = entry->priv->a->pdata[i]; g_signal_handlers_block_matched (G_OBJECT (a), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, entry); switch (e->format) { case EXIF_FORMAT_BYTE: v_byte = e->data[i]; gtk_adjustment_set_value (a, v_byte); break; case EXIF_FORMAT_SHORT: v_short = exif_get_short (e->data + 2 * i, o); gtk_adjustment_set_value (a, v_short); break; case EXIF_FORMAT_LONG: v_long = exif_get_long (e->data + 4 * i, o); gtk_adjustment_set_value (a, v_long); break; case EXIF_FORMAT_SLONG: v_slong = exif_get_slong (e->data + 4 * i, o); gtk_adjustment_set_value (a, v_slong); break; default: g_warning ("Invalid format!"); break; } g_signal_handlers_unblock_matched (G_OBJECT (a), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, entry); } } static void gtk_exif_entry_number_save (GtkExifEntryNumber *entry) { ExifEntry *e; GtkAdjustment *a; guint i; ExifByteOrder o; g_return_if_fail (GTK_EXIF_IS_ENTRY_NUMBER (entry)); o = exif_data_get_byte_order (entry->priv->entry->parent->parent); e = entry->priv->entry; for (i = 0; i < e->components; i++) { a = entry->priv->a->pdata[i]; switch (e->format) { case EXIF_FORMAT_BYTE: e->data[i] = gtk_adjustment_get_value (a); break; case EXIF_FORMAT_SHORT: exif_set_short (e->data + 2 * i, o, gtk_adjustment_get_value (a)); break; case EXIF_FORMAT_LONG: exif_set_long (e->data + 4 * i, o, gtk_adjustment_get_value (a)); break; case EXIF_FORMAT_SLONG: exif_set_slong (e->data + 4 * i, o, gtk_adjustment_get_value (a)); break; default: g_warning ("Invalid format!"); return; } } g_signal_emit_by_name (G_OBJECT (entry), "entry_changed", e); } static void on_adjustment_value_changed (GtkAdjustment *adj, GtkExifEntryNumber *entry) { gtk_exif_entry_number_save (entry); } GtkWidget * gtk_exif_entry_number_new (ExifEntry *e) { GtkExifEntryNumber *entry; GtkWidget *table, *label, *spin; #if GTK_CHECK_VERSION(3,0,0) GtkAdjustment *a; #else GtkObject *a; #endif gchar *txt; guint i; g_return_val_if_fail (e != NULL, NULL); g_return_val_if_fail ((e->format == EXIF_FORMAT_BYTE) || (e->format == EXIF_FORMAT_SHORT) || (e->format == EXIF_FORMAT_LONG) || (e->format == EXIF_FORMAT_SLONG), NULL); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); entry = g_object_new (GTK_EXIF_TYPE_ENTRY_NUMBER, NULL); entry->priv->entry = e; exif_entry_ref (e); gtk_exif_entry_construct (GTK_EXIF_ENTRY (entry), exif_tag_get_title_in_ifd (e->tag, exif_content_get_ifd(e->parent)), exif_tag_get_description_in_ifd (e->tag, exif_content_get_ifd(e->parent))); table = gtk_table_new (2, 1, FALSE); gtk_widget_show (table); gtk_box_pack_start (GTK_BOX (entry), table, TRUE, TRUE, 0); gtk_table_set_col_spacings (GTK_TABLE (table), 5); gtk_table_set_row_spacings (GTK_TABLE (table), 5); g_ptr_array_set_size (entry->priv->a, e->components); for (i = 0; i < e->components; i++) { if (e->components > 1) txt = g_strdup_printf (_("Value %i:"), i + 1); else txt = g_strdup (_("Value:")); label = gtk_label_new (txt); g_free (txt); gtk_widget_show (label); gtk_table_attach (GTK_TABLE (table), label, 0, 1, i, i + 1, GTK_FILL, 0, 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); a = gtk_adjustment_new (0, 0, 0xffff, 1, 0xff, 0); spin = gtk_spin_button_new (GTK_ADJUSTMENT (a), 0, 0); gtk_widget_show (spin); gtk_table_attach (GTK_TABLE (table), spin, 1, 2, i, i + 1, GTK_FILL | GTK_EXPAND, 0, 0, 0); entry->priv->a->pdata[i] = a; g_signal_connect (a, "value_changed", G_CALLBACK (on_adjustment_value_changed), entry); } gtk_exif_entry_number_load (entry); return (GTK_WIDGET (entry)); } libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-number.h000664 000000 000000 00000003527 12115730414 022426 0ustar00rootroot000000 000000 /* gtk-exif-entry-number.h * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_EXIF_ENTRY_NUMBER_H__ #define __GTK_EXIF_ENTRY_NUMBER_H__ #include #define GTK_EXIF_TYPE_ENTRY_NUMBER (gtk_exif_entry_number_get_type()) #define GTK_EXIF_ENTRY_NUMBER(o) (G_TYPE_CHECK_INSTANCE_CAST((o),GTK_EXIF_TYPE_ENTRY_NUMBER,GtkExifEntryNumber)) #define GTK_EXIF_ENTRY_NUMBER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k),GTK_EXIF_TYPE_ENTRY_NUMBER,GtkExifEntryNumberClass)) #define GTK_EXIF_IS_ENTRY_NUMBER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o),GTK_EXIF_TYPE_ENTRY_NUMBER)) typedef struct _GtkExifEntryNumber GtkExifEntryNumber; typedef struct _GtkExifEntryNumberPrivate GtkExifEntryNumberPrivate; typedef struct _GtkExifEntryNumberClass GtkExifEntryNumberClass; struct _GtkExifEntryNumber { GtkExifEntry parent; GtkExifEntryNumberPrivate *priv; }; struct _GtkExifEntryNumberClass { GtkExifEntryClass parent_class; }; GType gtk_exif_entry_number_get_type (void); GtkWidget *gtk_exif_entry_number_new (ExifEntry *entry); #endif /* __GTK_EXIF_ENTRY_NUMBER_H__ */ libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-option.c000664 000000 000000 00000022253 12115730414 022436 0ustar00rootroot000000 000000 /* gtk-exif-entry-option.c * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include "gtk-exif-entry-option.h" #include "gtk-exif-util.h" #include "gtk-extensions/gtk-options.h" #include #include #include #ifdef ENABLE_NLS # include # undef _ # define _(String) dgettext (GETTEXT_PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define N_(String) (String) #endif struct _GtkExifEntryOptionPrivate { ExifEntry *entry; GtkComboBox *menu; }; #define PARENT_TYPE GTK_EXIF_TYPE_ENTRY static GtkExifEntryClass *parent_class; static void #if GTK_CHECK_VERSION(3,0,0) gtk_exif_entry_option_destroy (GtkWidget *widget) #else gtk_exif_entry_option_destroy (GtkObject *object) #endif { #if GTK_CHECK_VERSION(3,0,0) GtkExifEntryOption *entry = GTK_EXIF_ENTRY_OPTION (widget); #else GtkExifEntryOption *entry = GTK_EXIF_ENTRY_OPTION (object); #endif if (entry->priv->entry) { exif_entry_unref (entry->priv->entry); entry->priv->entry = NULL; } #if GTK_CHECK_VERSION(3,0,0) GTK_WIDGET_CLASS (parent_class)->destroy (widget); #else GTK_OBJECT_CLASS (parent_class)->destroy (object); #endif } GTK_EXIF_FINALIZE (entry_option, EntryOption) static void gtk_exif_entry_option_class_init (gpointer g_class, gpointer class_data) { #if GTK_CHECK_VERSION(3,0,0) GtkWidgetClass *widget_class; GObjectClass *gobject_class; widget_class = GTK_WIDGET_CLASS (g_class); widget_class->destroy = gtk_exif_entry_option_destroy; #else GtkObjectClass *object_class; GObjectClass *gobject_class; object_class = GTK_OBJECT_CLASS (g_class); object_class->destroy = gtk_exif_entry_option_destroy; #endif gobject_class = G_OBJECT_CLASS (g_class); gobject_class->finalize = gtk_exif_entry_option_finalize; parent_class = g_type_class_peek_parent (g_class); } static void gtk_exif_entry_option_init (GTypeInstance *instance, gpointer g_class) { GtkExifEntryOption *entry = GTK_EXIF_ENTRY_OPTION (instance); entry->priv = g_new0 (GtkExifEntryOptionPrivate, 1); } GTK_EXIF_CLASS (entry_option, EntryOption, "EntryOption") static void gtk_exif_entry_option_load (GtkExifEntryOption *entry) { ExifShort value; ExifByteOrder o; GtkTreeIter iter; GtkTreeModel *tm; g_return_if_fail (GTK_EXIF_IS_ENTRY_OPTION (entry)); o = exif_data_get_byte_order (entry->priv->entry->parent->parent); value = exif_get_short (entry->priv->entry->data, o); tm = gtk_combo_box_get_model (entry->priv->menu); if (gtk_tree_model_get_iter_from_option (tm, value, &iter)) gtk_combo_box_set_active_iter (entry->priv->menu, &iter); } static void on_changed (GtkComboBox *cb, GtkExifEntryOption *e) { GValue v = {0,}; ExifByteOrder o; GtkTreeModel *tm = gtk_combo_box_get_model (cb); GtkTreeIter iter; gtk_combo_box_get_active_iter (cb, &iter); gtk_tree_model_get_value (tm, &iter, GTK_OPTIONS_OPTION_COLUMN, &v); o = exif_data_get_byte_order (e->priv->entry->parent->parent); exif_set_short (e->priv->entry->data, o, g_value_get_int (&v)); gtk_exif_entry_changed (GTK_EXIF_ENTRY (e), e->priv->entry); } static GtkOptions options_sensing_method[] = { { 1, N_("Not defined")}, { 2, N_("One-chip color area sensor")}, { 3, N_("Two-chip color area sensor")}, { 4, N_("Three-chip color area sensor")}, { 5, N_("Color sequential area sensor")}, { 7, N_("Trilinear sensor")}, { 8, N_("Color sequential linear sensor")}, { 0, NULL} }; static GtkOptions options_compression[] = { {1, N_("Uncompressed")}, {6, N_("JPEG compression")}, {0, NULL} }; static GtkOptions options_metering_mode[] = { { 0, N_("Unknown")}, { 1, N_("Average")}, { 2, N_("Center-Weighted Average")}, { 3, N_("Spot")}, { 4, N_("Multi Spot")}, { 5, N_("Pattern")}, { 6, N_("Partial")}, {255, N_("Other")}, { 0, NULL} }; static GtkOptions options_light_source[] = { { 0, N_("Unknown")}, { 1, N_("Daylight")}, { 2, N_("Fluorescent")}, { 3, N_("Tungsten")}, { 4, N_("Flash")}, { 9, N_("Fine weather")}, { 10, N_("Cloudy weather")}, { 11, N_("Shade")}, { 12, N_("Daylight fluorescent")}, { 13, N_("Day white fluorescent")}, { 14, N_("Cool white fluorescent")}, { 15, N_("White fluorescent")}, { 17, N_("Standard light A")}, { 18, N_("Standard light B")}, { 19, N_("Standard light C")}, { 20, N_("D55")}, { 21, N_("D65")}, { 22, N_("D75")}, { 24, N_("ISO studio tungsten")}, {255, N_("Other")}, { 0, NULL} }; static GtkOptions options_orientation[] = { {1, N_("top - left")}, {2, N_("top - right")}, {3, N_("bottom - right")}, {4, N_("bottom - left")}, {5, N_("left - top")}, {6, N_("right - top")}, {7, N_("right - bottom")}, {8, N_("left - bottom")}, {0, NULL} }; static GtkOptions options_ycbcr_positioning[] = { { 1, N_("centered")}, { 2, N_("co-sited")}, { 0, NULL} }; static GtkOptions options_exposure_program[] = { {0, N_("Not defined")}, {1, N_("Manual")}, {2, N_("Normal program")}, {3, N_("Aperture priority")}, {4, N_("Shutter priority")}, {5, N_("Creative program (biased toward depth of field)")}, {6, N_("Action program (biased toward fast shutter speed)")}, {7, N_("Portrait mode (for closeup photos with the " "background out of focus)")}, {8, N_("Landscape mode (for landscape photos with the " "background in focus)")}, {0, NULL} }; GtkWidget * gtk_exif_entry_option_new (ExifEntry *e) { GtkExifEntryOption *entry; GtkWidget *hbox, *label, *menu; GtkOptions *options; const gchar *title; GtkCellRenderer *cell; g_return_val_if_fail (e != NULL, NULL); g_return_val_if_fail (e->format == EXIF_FORMAT_SHORT, NULL); g_return_val_if_fail ((e->tag == EXIF_TAG_SENSING_METHOD) || (e->tag == EXIF_TAG_METERING_MODE) || (e->tag == EXIF_TAG_LIGHT_SOURCE) || (e->tag == EXIF_TAG_ORIENTATION) || (e->tag == EXIF_TAG_YCBCR_POSITIONING) || (e->tag == EXIF_TAG_EXPOSURE_PROGRAM) || (e->tag == EXIF_TAG_COMPRESSION), NULL); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); switch (e->tag) { case EXIF_TAG_SENSING_METHOD: title = N_("Sensing method:"); options = options_sensing_method; break; case EXIF_TAG_ORIENTATION: title = N_("0-th row - 0-th column:"); options = options_orientation; break; case EXIF_TAG_LIGHT_SOURCE: title = N_("Light source:"); options = options_light_source; break; case EXIF_TAG_METERING_MODE: title = N_("Metering mode:"); options = options_metering_mode; break; case EXIF_TAG_COMPRESSION: title = N_("Compression scheme:"); options = options_compression; break; case EXIF_TAG_YCBCR_POSITIONING: title = N_("YCbCr Positioning:"); options = options_ycbcr_positioning; break; case EXIF_TAG_EXPOSURE_PROGRAM: title = N_("Exposure Program:"); options = options_exposure_program; break; default: return (NULL); } entry = g_object_new (GTK_EXIF_TYPE_ENTRY_OPTION, NULL); entry->priv->entry = e; exif_entry_ref (e); gtk_exif_entry_construct (GTK_EXIF_ENTRY (entry), exif_tag_get_title_in_ifd (e->tag, exif_content_get_ifd(e->parent)), exif_tag_get_description_in_ifd (e->tag, exif_content_get_ifd(e->parent))); hbox = gtk_hbox_new (FALSE, 5); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (entry), hbox, TRUE, FALSE, 0); label = gtk_label_new (_(title)); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); menu = gtk_combo_box_new_with_model ( gtk_tree_model_new_from_options (options)); gtk_widget_show (menu); gtk_box_pack_start (GTK_BOX (hbox), menu, FALSE, FALSE, 0); entry->priv->menu = GTK_COMBO_BOX (menu); cell = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (menu), cell, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (menu), cell, "text", GTK_OPTIONS_NAME_COLUMN, NULL); g_signal_connect (G_OBJECT (menu), "changed", G_CALLBACK (on_changed), entry); gtk_exif_entry_option_load (entry); return (GTK_WIDGET (entry)); } libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-option.h000664 000000 000000 00000003526 12115730414 022445 0ustar00rootroot000000 000000 /* gtk-exif-entry-option.h * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_EXIF_ENTRY_OPTION_H__ #define __GTK_EXIF_ENTRY_OPTION_H__ #include #define GTK_EXIF_TYPE_ENTRY_OPTION (gtk_exif_entry_option_get_type()) #define GTK_EXIF_ENTRY_OPTION(o) (G_TYPE_CHECK_INSTANCE_CAST((o),GTK_EXIF_TYPE_ENTRY_OPTION,GtkExifEntryOption)) #define GTK_EXIF_ENTRY_OPTION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k),GTK_EXIF_TYPE_ENTRY_OPTION,GtkExifEntryOptionClass)) #define GTK_EXIF_IS_ENTRY_OPTION(o) (G_TYPE_CHECK_INSTANCE_TYPE((o),GTK_EXIF_TYPE_ENTRY_OPTION)) typedef struct _GtkExifEntryOption GtkExifEntryOption; typedef struct _GtkExifEntryOptionPrivate GtkExifEntryOptionPrivate; typedef struct _GtkExifEntryOptionClass GtkExifEntryOptionClass; struct _GtkExifEntryOption { GtkExifEntry parent; GtkExifEntryOptionPrivate *priv; }; struct _GtkExifEntryOptionClass { GtkExifEntryClass parent_class; }; GType gtk_exif_entry_option_get_type (void); GtkWidget *gtk_exif_entry_option_new (ExifEntry *entry); #endif /* __GTK_EXIF_ENTRY_OPTION_H__ */ libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-rational.c000664 000000 000000 00000020276 12115730414 022742 0ustar00rootroot000000 000000 /* gtk-exif-entry-rational.c * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include "gtk-exif-entry-rational.h" #include "gtk-exif-util.h" #include #include #include #ifdef ENABLE_NLS # include # undef _ # define _(String) dgettext (GETTEXT_PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define N_(String) (String) #endif struct _GtkExifEntryRationalPrivate { ExifEntry *entry; GPtrArray *ap, *aq; }; #define PARENT_TYPE GTK_EXIF_TYPE_ENTRY static GtkExifEntryClass *parent_class; static void #if GTK_CHECK_VERSION(3,0,0) gtk_exif_entry_rational_destroy (GtkWidget *widget) #else gtk_exif_entry_rational_destroy (GtkObject *object) #endif { #if GTK_CHECK_VERSION(3,0,0) GtkExifEntryRational *entry = GTK_EXIF_ENTRY_RATIONAL (widget); #else GtkExifEntryRational *entry = GTK_EXIF_ENTRY_RATIONAL (object); #endif if (entry->priv->entry) { exif_entry_unref (entry->priv->entry); entry->priv->entry = NULL; } if (entry->priv->ap) { g_ptr_array_free (entry->priv->ap, TRUE); entry->priv->ap = NULL; } if (entry->priv->aq) { g_ptr_array_free (entry->priv->aq, TRUE); entry->priv->aq = NULL; } #if GTK_CHECK_VERSION(3,0,0) GTK_WIDGET_CLASS (parent_class)->destroy (widget); #else GTK_OBJECT_CLASS (parent_class)->destroy (object); #endif } GTK_EXIF_FINALIZE (entry_rational, EntryRational) static void gtk_exif_entry_rational_class_init (gpointer g_class, gpointer class_data) { #if GTK_CHECK_VERSION(3,0,0) GtkWidgetClass *widget_class; GObjectClass *gobject_class; widget_class = GTK_WIDGET_CLASS (g_class); widget_class->destroy = gtk_exif_entry_rational_destroy; #else GtkObjectClass *object_class; GObjectClass *gobject_class; object_class = GTK_OBJECT_CLASS (g_class); object_class->destroy = gtk_exif_entry_rational_destroy; #endif gobject_class = G_OBJECT_CLASS (g_class); gobject_class->finalize = gtk_exif_entry_rational_finalize; parent_class = g_type_class_peek_parent (g_class); } static void gtk_exif_entry_rational_init (GTypeInstance *instance, gpointer g_class) { GtkExifEntryRational *entry = GTK_EXIF_ENTRY_RATIONAL (instance); entry->priv = g_new0 (GtkExifEntryRationalPrivate, 1); entry->priv->ap = g_ptr_array_new (); entry->priv->aq = g_ptr_array_new (); } GTK_EXIF_CLASS (entry_rational, EntryRational, "EntryRational") static void gtk_exif_entry_rational_load (GtkExifEntryRational *entry) { ExifRational r; ExifSRational sr; GtkAdjustment *ap, *aq; ExifEntry *e; guint i; ExifByteOrder o; g_return_if_fail (GTK_EXIF_IS_ENTRY_RATIONAL (entry)); o = exif_data_get_byte_order (entry->priv->entry->parent->parent); e = entry->priv->entry; for (i = 0; i < e->components; i++) { ap = entry->priv->ap->pdata[i]; aq = entry->priv->aq->pdata[i]; g_signal_handlers_block_matched (G_OBJECT (ap), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, entry); g_signal_handlers_block_matched (G_OBJECT (aq), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, entry); switch (e->format) { case EXIF_FORMAT_RATIONAL: r = exif_get_rational (e->data + 8 * i, o); gtk_adjustment_set_value (ap, r.numerator); gtk_adjustment_set_value (aq, r.denominator); break; case EXIF_FORMAT_SRATIONAL: sr = exif_get_srational (e->data + 8 * i, o); gtk_adjustment_set_value (ap, sr.numerator); gtk_adjustment_set_value (aq, sr.denominator); break; default: g_warning ("Invalid format!"); break; } g_signal_handlers_unblock_matched (G_OBJECT (ap), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, entry); g_signal_handlers_unblock_matched (G_OBJECT (aq), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, entry); } } static void gtk_exif_entry_rational_save (GtkExifEntryRational *entry) { ExifRational r; ExifSRational sr; ExifEntry *e; GtkAdjustment *ap, *aq; guint i; ExifByteOrder o; g_return_if_fail (GTK_EXIF_IS_ENTRY_RATIONAL (entry)); o = exif_data_get_byte_order (entry->priv->entry->parent->parent); e = entry->priv->entry; for (i = 0; i < e->components; i++) { ap = entry->priv->ap->pdata[i]; aq = entry->priv->aq->pdata[i]; switch (e->format) { case EXIF_FORMAT_RATIONAL: r.numerator = gtk_adjustment_get_value (ap); r.denominator = gtk_adjustment_get_value (aq); exif_set_rational (e->data + 8 * i, o, r); break; case EXIF_FORMAT_SRATIONAL: sr.numerator = gtk_adjustment_get_value (ap); sr.denominator = gtk_adjustment_get_value (aq); exif_set_srational (e->data + 8 * i, o, sr); break; default: g_warning ("Invalid format!"); return; } } g_signal_emit_by_name (G_OBJECT (entry), "entry_changed", e); } static void on_adjustment_value_changed (GtkAdjustment *adj, GtkExifEntryRational *entry) { gtk_exif_entry_rational_save (entry); } GtkWidget * gtk_exif_entry_rational_new (ExifEntry *e) { GtkExifEntryRational *entry; GtkWidget *table, *label, *spin; #if GTK_CHECK_VERSION(3,0,0) GtkAdjustment *a; #else GtkObject *a; #endif gchar *txt; guint i; g_return_val_if_fail (e != NULL, NULL); g_return_val_if_fail ((e->format == EXIF_FORMAT_RATIONAL) || (e->format == EXIF_FORMAT_SRATIONAL), NULL); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); entry = g_object_new (GTK_EXIF_TYPE_ENTRY_RATIONAL, NULL); entry->priv->entry = e; exif_entry_ref (e); gtk_exif_entry_construct (GTK_EXIF_ENTRY (entry), exif_tag_get_title_in_ifd (e->tag, exif_content_get_ifd(e->parent)), exif_tag_get_description_in_ifd (e->tag, exif_content_get_ifd(e->parent))); table = gtk_table_new (4, 1, FALSE); gtk_widget_show (table); gtk_box_pack_start (GTK_BOX (entry), table, TRUE, TRUE, 0); gtk_table_set_col_spacings (GTK_TABLE (table), 5); gtk_table_set_row_spacings (GTK_TABLE (table), 5); g_ptr_array_set_size (entry->priv->ap, e->components); g_ptr_array_set_size (entry->priv->aq, e->components); for (i = 0; i < e->components; i++) { if (e->components > 1) txt = g_strdup_printf (_("Value %i:"), i + 1); else txt = g_strdup (_("Value:")); label = gtk_label_new (txt); g_free (txt); gtk_widget_show (label); gtk_table_attach (GTK_TABLE (table), label, 0, 1, i, i + 1, GTK_FILL, 0, 0, 0); gtk_misc_set_alignment (GTK_MISC (label), 0, 0); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); a = gtk_adjustment_new (0, 0, 0xffff, 1, 0xff, 0); spin = gtk_spin_button_new (GTK_ADJUSTMENT (a), 0, 0); gtk_widget_show (spin); gtk_table_attach (GTK_TABLE (table), spin, 1, 2, i, i + 1, GTK_FILL | GTK_EXPAND, 0, 0, 0); entry->priv->ap->pdata[i] = a; g_signal_connect (a, "value_changed", G_CALLBACK (on_adjustment_value_changed), entry); label = gtk_label_new ("/"); gtk_widget_show (label); gtk_table_attach (GTK_TABLE (table), label, 2, 3, i, i + 1, 0, 0, 0, 0); a = gtk_adjustment_new (0, 0, 0xffff, 1, 0xff, 0); spin = gtk_spin_button_new (GTK_ADJUSTMENT (a), 0, 0); gtk_widget_show (spin); gtk_table_attach (GTK_TABLE (table), spin, 3, 4, i, i + 1, GTK_FILL | GTK_EXPAND, 0, 0, 0); entry->priv->aq->pdata[i] = a; g_signal_connect (a, "value_changed", G_CALLBACK (on_adjustment_value_changed), entry); } gtk_exif_entry_rational_load (entry); return (GTK_WIDGET (entry)); } libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-rational.h000664 000000 000000 00000003610 12115730414 022740 0ustar00rootroot000000 000000 /* gtk-exif-entry-rational.h * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_EXIF_ENTRY_RATIONAL_H__ #define __GTK_EXIF_ENTRY_RATIONAL_H__ #include #define GTK_EXIF_TYPE_ENTRY_RATIONAL (gtk_exif_entry_rational_get_type()) #define GTK_EXIF_ENTRY_RATIONAL(o) (G_TYPE_CHECK_INSTANCE_CAST((o),GTK_EXIF_TYPE_ENTRY_RATIONAL,GtkExifEntryRational)) #define GTK_EXIF_ENTRY_RATIONAL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k),GTK_EXIF_TYPE_ENTRY_RATIONAL,GtkExifEntryRationalClass)) #define GTK_EXIF_IS_ENTRY_RATIONAL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o),GTK_EXIF_TYPE_ENTRY_RATIONAL)) typedef struct _GtkExifEntryRational GtkExifEntryRational; typedef struct _GtkExifEntryRationalPrivate GtkExifEntryRationalPrivate; typedef struct _GtkExifEntryRationalClass GtkExifEntryRationalClass; struct _GtkExifEntryRational { GtkExifEntry parent; GtkExifEntryRationalPrivate *priv; }; struct _GtkExifEntryRationalClass { GtkExifEntryClass parent_class; }; GType gtk_exif_entry_rational_get_type (void); GtkWidget *gtk_exif_entry_rational_new (ExifEntry *entry); #endif /* __GTK_EXIF_ENTRY_RATIONAL_H__ */ libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-resolution.c000664 000000 000000 00000040234 12115730414 023330 0ustar00rootroot000000 000000 /* gtk-exif-entry-resolution.c * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include "gtk-exif-entry-resolution.h" #include "gtk-exif-util.h" #include #include #include #ifdef ENABLE_NLS # include # undef _ # define _(String) dgettext (GETTEXT_PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define N_(String) (String) #endif typedef struct _ResolutionObjects ResolutionObjects; struct _ResolutionObjects { GtkToggleButton *check; GtkWidget *sp, *sq; GtkAdjustment *ap, *aq; }; typedef struct _ResolutionUnitObjects ResolutionUnitObjects; struct _ResolutionUnitObjects { GtkToggleButton *check; GtkComboBox *menu; }; struct _GtkExifEntryResolutionPrivate { ExifContent *content; GtkToggleButton *check; ResolutionObjects ox, oy; ResolutionUnitObjects u; ExifTag tag_x, tag_y, tag_u; }; #define PARENT_TYPE GTK_EXIF_TYPE_ENTRY static GtkExifEntryClass *parent_class; static void #if GTK_CHECK_VERSION(3,0,0) gtk_exif_entry_resolution_destroy (GtkWidget *widget) #else gtk_exif_entry_resolution_destroy (GtkObject *object) #endif { #if GTK_CHECK_VERSION(3,0,0) GtkExifEntryResolution *entry = GTK_EXIF_ENTRY_RESOLUTION (widget); #else GtkExifEntryResolution *entry = GTK_EXIF_ENTRY_RESOLUTION (object); #endif if (entry->priv->content) { exif_content_unref (entry->priv->content); entry->priv->content = NULL; } #if GTK_CHECK_VERSION(3,0,0) GTK_WIDGET_CLASS (parent_class)->destroy (widget); #else GTK_OBJECT_CLASS (parent_class)->destroy (object); #endif } GTK_EXIF_FINALIZE (entry_resolution, EntryResolution) static void gtk_exif_entry_resolution_class_init (gpointer g_class, gpointer class_data) { #if GTK_CHECK_VERSION(3,0,0) GtkWidgetClass *widget_class; GObjectClass *gobject_class; widget_class = GTK_WIDGET_CLASS (g_class); widget_class->destroy = gtk_exif_entry_resolution_destroy; #else GtkObjectClass *object_class; GObjectClass *gobject_class; object_class = GTK_OBJECT_CLASS (g_class); object_class->destroy = gtk_exif_entry_resolution_destroy; #endif gobject_class = G_OBJECT_CLASS (g_class); gobject_class->finalize = gtk_exif_entry_resolution_finalize; parent_class = g_type_class_peek_parent (g_class); } static void gtk_exif_entry_resolution_init (GTypeInstance *instance, gpointer g_class) { GtkExifEntryResolution *entry = GTK_EXIF_ENTRY_RESOLUTION (instance); entry->priv = g_new0 (GtkExifEntryResolutionPrivate, 1); } GTK_EXIF_CLASS (entry_resolution, EntryResolution, "EntryResolution") enum { UNIT_CENTIMETER = 3, UNIT_INCH = 2 }; enum { UNIT_COLUMN, NAME_COLUMN, N_COLUMNS }; static void on_unit_changed (GtkComboBox *cb, GtkExifEntryResolution *entry) { GtkTreeModel *tm = gtk_combo_box_get_model (cb); GtkTreeIter iter; GValue v = {0,}; ExifByteOrder o; ExifEntry *e; gtk_combo_box_get_active_iter (cb, &iter); gtk_tree_model_get_value (tm, &iter, UNIT_COLUMN, &v); e = exif_content_get_entry (entry->priv->content, entry->priv->tag_u); g_return_if_fail (e); o = exif_data_get_byte_order (e->parent->parent); exif_set_short (e->data, o, g_value_get_int (&v)); gtk_exif_entry_changed (GTK_EXIF_ENTRY (entry), e); } static void on_w_value_changed (GtkAdjustment *a, GtkExifEntryResolution *entry) { ExifEntry *e; ExifRational r; ExifSRational sr; ExifByteOrder o; e = exif_content_get_entry (entry->priv->content, entry->priv->tag_x); g_return_if_fail (e != NULL); o = exif_data_get_byte_order (e->parent->parent); switch (e->format) { case EXIF_FORMAT_RATIONAL: r.numerator = gtk_adjustment_get_value (entry->priv->ox.ap); r.denominator = gtk_adjustment_get_value (entry->priv->ox.aq); exif_set_rational (e->data, o, r); break; case EXIF_FORMAT_SRATIONAL: sr.numerator = gtk_adjustment_get_value (entry->priv->ox.ap); sr.denominator = gtk_adjustment_get_value (entry->priv->ox.aq); exif_set_srational (e->data, o, sr); break; default: g_warning ("Invalid format!"); return; } gtk_exif_entry_changed (GTK_EXIF_ENTRY (entry), e); } static void on_h_value_changed (GtkAdjustment *a, GtkExifEntryResolution *entry) { ExifEntry *e; ExifRational r; ExifSRational sr; ExifByteOrder o; e = exif_content_get_entry (entry->priv->content, entry->priv->tag_y); g_return_if_fail (e != NULL); o = exif_data_get_byte_order (e->parent->parent); switch (e->format) { case EXIF_FORMAT_RATIONAL: r.numerator = gtk_adjustment_get_value (entry->priv->oy.ap); r.denominator = gtk_adjustment_get_value (entry->priv->oy.aq); exif_set_rational (e->data, o, r); break; case EXIF_FORMAT_SRATIONAL: sr.numerator = gtk_adjustment_get_value (entry->priv->oy.ap); sr.denominator = gtk_adjustment_get_value (entry->priv->oy.aq); exif_set_srational (e->data, o, sr); break; default: g_warning ("Invalid format!"); return; } gtk_exif_entry_changed (GTK_EXIF_ENTRY (entry), e); } static void gtk_exif_entry_resolution_load_unit (GtkExifEntryResolution *entry, ExifEntry *e) { ExifByteOrder o; GtkTreeModel *tm; GValue v = {0,}; GtkTreeIter iter; o = exif_data_get_byte_order (e->parent->parent); switch (e->format) { case EXIF_FORMAT_SHORT: tm = gtk_combo_box_get_model (entry->priv->u.menu); gtk_tree_model_get_iter_first (tm, &iter); do { gtk_tree_model_get_value (tm, &iter, UNIT_COLUMN, &v); if (g_value_get_int (&v) == exif_get_short (e->data, o)) break; g_value_unset (&v); } while (gtk_tree_model_iter_next (tm, &iter)); gtk_combo_box_set_active_iter (entry->priv->u.menu, &iter); break; default: g_warning ("Invalid format!"); } } static void gtk_exif_entry_resolution_load (GtkExifEntryResolution *entry, ExifEntry *e) { ExifRational r; ExifSRational sr; ResolutionObjects o; ExifByteOrder order; g_return_if_fail (GTK_EXIF_IS_ENTRY_RESOLUTION (entry)); g_return_if_fail (e != NULL); switch (e->tag) { case EXIF_TAG_X_RESOLUTION: case EXIF_TAG_FOCAL_PLANE_X_RESOLUTION: o = entry->priv->ox; break; case EXIF_TAG_Y_RESOLUTION: case EXIF_TAG_FOCAL_PLANE_Y_RESOLUTION: o = entry->priv->oy; break; default: g_warning ("Invalid tag!"); return; } g_signal_handlers_block_matched (G_OBJECT (o.ap), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, entry); g_signal_handlers_block_matched (G_OBJECT (o.aq), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, entry); order = exif_data_get_byte_order (e->parent->parent); switch (e->format) { case EXIF_FORMAT_RATIONAL: r = exif_get_rational (e->data, order); gtk_adjustment_set_value (o.ap, r.numerator); gtk_adjustment_set_value (o.aq, r.denominator); break; case EXIF_FORMAT_SRATIONAL: sr = exif_get_srational (e->data, order); gtk_adjustment_set_value (o.ap, sr.numerator); gtk_adjustment_set_value (o.aq, sr.denominator); break; default: g_warning ("Invalid format!"); break; } g_signal_handlers_unblock_matched (G_OBJECT (o.ap), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, entry); g_signal_handlers_unblock_matched (G_OBJECT (o.aq), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, entry); } static void on_cw_toggled (GtkToggleButton *toggle, GtkExifEntryResolution *entry) { ExifEntry *e; e = exif_content_get_entry (entry->priv->content, entry->priv->tag_x); gtk_widget_set_sensitive (entry->priv->ox.sp, gtk_toggle_button_get_active (toggle)); gtk_widget_set_sensitive (entry->priv->ox.sq, gtk_toggle_button_get_active (toggle)); if (gtk_toggle_button_get_active (toggle) && !e) { e = exif_entry_new (); exif_content_add_entry (entry->priv->content, e); exif_entry_initialize (e, entry->priv->tag_x); gtk_exif_entry_resolution_load (entry, e); exif_entry_unref (e); gtk_exif_entry_added (GTK_EXIF_ENTRY (entry), e); } else if (!gtk_toggle_button_get_active (toggle) && e) { g_object_ref (entry); gtk_exif_entry_removed (GTK_EXIF_ENTRY (entry), e); exif_content_remove_entry (entry->priv->content, e); g_object_unref (entry); } } static void on_ch_toggled (GtkToggleButton *toggle, GtkExifEntryResolution *entry) { ExifEntry *e; e = exif_content_get_entry (entry->priv->content, entry->priv->tag_y); gtk_widget_set_sensitive (entry->priv->oy.sp, gtk_toggle_button_get_active (toggle)); gtk_widget_set_sensitive (entry->priv->oy.sq, gtk_toggle_button_get_active (toggle)); if (gtk_toggle_button_get_active (toggle) && !e) { e = exif_entry_new (); exif_content_add_entry (entry->priv->content, e); exif_entry_initialize (e, entry->priv->tag_y); gtk_exif_entry_resolution_load (entry, e); exif_entry_unref (e); gtk_exif_entry_added (GTK_EXIF_ENTRY (entry), e); } else if (!gtk_toggle_button_get_active (toggle) && e) { g_object_ref (entry); gtk_exif_entry_removed (GTK_EXIF_ENTRY (entry), e); exif_content_remove_entry (entry->priv->content, e); g_object_unref (entry); } } static void on_unit_toggled (GtkToggleButton *toggle, GtkExifEntryResolution *entry) { ExifEntry *e; e = exif_content_get_entry (entry->priv->content, entry->priv->tag_u); gtk_widget_set_sensitive (GTK_WIDGET (entry->priv->u.menu), gtk_toggle_button_get_active (toggle)); if (gtk_toggle_button_get_active (toggle) && !e) { e = exif_entry_new (); exif_content_add_entry (entry->priv->content, e); exif_entry_initialize (e, entry->priv->tag_u); gtk_exif_entry_resolution_load_unit (entry, e); exif_entry_unref (e); gtk_exif_entry_added (GTK_EXIF_ENTRY (entry), e); } else if (!gtk_toggle_button_get_active (toggle) && e) { g_object_ref (entry); gtk_exif_entry_removed (GTK_EXIF_ENTRY (entry), e); exif_content_remove_entry (entry->priv->content, e); g_object_unref (entry); } } GtkWidget * gtk_exif_entry_resolution_new (ExifContent *content, gboolean focal_plane) { GtkExifEntryResolution *entry; GtkWidget *hbox, *sp, *sq, *label, *o, *c; #if GTK_CHECK_VERSION(3,0,0) GtkAdjustment *ap, *aq; #else GtkObject *ap, *aq; #endif ExifEntry *e; GtkTreeIter iter; GtkTreeModel *tm; GtkCellRenderer *cell; g_return_val_if_fail (content != NULL, NULL); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); entry = g_object_new (GTK_EXIF_TYPE_ENTRY_RESOLUTION, NULL); entry->priv->content = content; exif_content_ref (content); if (focal_plane) { gtk_exif_entry_construct (GTK_EXIF_ENTRY (entry), _("Focal Plane Resolution"), _("The number of pixels on the camera focal plane.")); entry->priv->tag_x = EXIF_TAG_FOCAL_PLANE_X_RESOLUTION; entry->priv->tag_y = EXIF_TAG_FOCAL_PLANE_Y_RESOLUTION; entry->priv->tag_u = EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT; } else { gtk_exif_entry_construct (GTK_EXIF_ENTRY (entry), _("Resolution"), _("The number of pixels per unit.")); entry->priv->tag_x = EXIF_TAG_X_RESOLUTION; entry->priv->tag_y = EXIF_TAG_Y_RESOLUTION; entry->priv->tag_u = EXIF_TAG_RESOLUTION_UNIT; } /* Width */ e = exif_content_get_entry (content, entry->priv->tag_x); hbox = gtk_hbox_new (FALSE, 5); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (entry), hbox, TRUE, FALSE, 0); c = gtk_check_button_new_with_label (_("Image width direction:")); gtk_widget_show (c); gtk_box_pack_start (GTK_BOX (hbox), c, FALSE, FALSE, 0); entry->priv->ox.check = GTK_TOGGLE_BUTTON (c); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (c), (e != NULL)); g_signal_connect (G_OBJECT (c), "toggled", G_CALLBACK (on_cw_toggled), entry); ap = gtk_adjustment_new (0, 0, 0xffffffff, 1, 0xffff, 0); entry->priv->ox.ap = GTK_ADJUSTMENT (ap); sp = gtk_spin_button_new (GTK_ADJUSTMENT (ap), 0, 0); gtk_widget_show (sp); gtk_box_pack_start (GTK_BOX (hbox), sp, TRUE, TRUE, 0); gtk_widget_set_sensitive (sp, (e != NULL)); entry->priv->ox.sp = sp; g_signal_connect (ap, "value_changed", G_CALLBACK (on_w_value_changed), entry); label = gtk_label_new ("/"); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); aq = gtk_adjustment_new (0, 0, 0xffffffff, 1, 0xffff, 0); entry->priv->ox.aq = GTK_ADJUSTMENT (aq); sq = gtk_spin_button_new (GTK_ADJUSTMENT (aq), 0, 0); gtk_widget_show (sq); gtk_box_pack_start (GTK_BOX (hbox), sq, TRUE, TRUE, 0); gtk_widget_set_sensitive (sq, (e != NULL)); entry->priv->ox.sq = sq; g_signal_connect (aq, "value_changed", G_CALLBACK (on_w_value_changed), entry); if (e) gtk_exif_entry_resolution_load (entry, e); /* Height */ e = exif_content_get_entry (content, entry->priv->tag_y); hbox = gtk_hbox_new (FALSE, 5); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (entry), hbox, TRUE, FALSE, 0); c = gtk_check_button_new_with_label (_("Image height direction:")); gtk_widget_show (c); gtk_box_pack_start (GTK_BOX (hbox), c, FALSE, FALSE, 0); entry->priv->oy.check = GTK_TOGGLE_BUTTON (c); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (c), (e != NULL)); g_signal_connect (G_OBJECT (c), "toggled", G_CALLBACK (on_ch_toggled), entry); ap = gtk_adjustment_new (0, 0, 0xffffffff, 1, 0xffff, 0); entry->priv->oy.ap = GTK_ADJUSTMENT (ap); sp = gtk_spin_button_new (GTK_ADJUSTMENT (ap), 0, 0); gtk_widget_show (sp); gtk_box_pack_start (GTK_BOX (hbox), sp, TRUE, TRUE, 0); entry->priv->oy.sp = sp; gtk_widget_set_sensitive (sp, (e != NULL)); g_signal_connect (ap, "value_changed", G_CALLBACK (on_h_value_changed), entry); label = gtk_label_new ("/"); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); aq = gtk_adjustment_new (0, 0, 0xffffffff, 1, 0xffff, 0); entry->priv->oy.aq = GTK_ADJUSTMENT (aq); sq = gtk_spin_button_new (GTK_ADJUSTMENT (aq), 0, 0); gtk_widget_show (sq); gtk_box_pack_start (GTK_BOX (hbox), sq, TRUE, TRUE, 0); entry->priv->oy.sq = sq; gtk_widget_set_sensitive (sq, (e != NULL)); g_signal_connect (aq, "value_changed", G_CALLBACK (on_h_value_changed), entry); if (e) gtk_exif_entry_resolution_load (entry, e); /* Unit */ e = exif_content_get_entry (content, entry->priv->tag_u); hbox = gtk_hbox_new (FALSE, 5); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (entry), hbox, TRUE, FALSE, 0); c = gtk_check_button_new_with_label (_("Unit:")); gtk_widget_show (c); gtk_box_pack_start (GTK_BOX (hbox), c, FALSE, FALSE, 0); entry->priv->check = GTK_TOGGLE_BUTTON (c); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (c), (e != NULL)); g_signal_connect (G_OBJECT (c), "toggled", G_CALLBACK (on_unit_toggled), entry); tm = GTK_TREE_MODEL (gtk_list_store_new (N_COLUMNS, G_TYPE_INT, G_TYPE_STRING)); gtk_list_store_append (GTK_LIST_STORE (tm), &iter); gtk_list_store_set (GTK_LIST_STORE (tm), &iter, UNIT_COLUMN, UNIT_CENTIMETER, NAME_COLUMN, _("Centimeter"), -1); gtk_list_store_append (GTK_LIST_STORE (tm), &iter); gtk_list_store_set (GTK_LIST_STORE (tm), &iter, UNIT_COLUMN, UNIT_INCH, NAME_COLUMN, _("Inch"), -1); o = gtk_combo_box_new_with_model (tm); gtk_widget_show (o); gtk_box_pack_start (GTK_BOX (hbox), o, TRUE, TRUE, 0); cell = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (o), cell, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (o), cell, "text", NAME_COLUMN, NULL); g_signal_connect (G_OBJECT (o), "changed", G_CALLBACK (on_unit_changed), entry); entry->priv->u.menu = GTK_COMBO_BOX (o); if (e) gtk_exif_entry_resolution_load_unit (entry, e); return (GTK_WIDGET (entry)); } libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-resolution.h000664 000000 000000 00000003744 12115730414 023342 0ustar00rootroot000000 000000 /* gtk-exif-entry-resolution.h * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_EXIF_ENTRY_RESOLUTION_H__ #define __GTK_EXIF_ENTRY_RESOLUTION_H__ #include #define GTK_EXIF_TYPE_ENTRY_RESOLUTION (gtk_exif_entry_resolution_get_type()) #define GTK_EXIF_ENTRY_RESOLUTION(o) (G_TYPE_CHECK_INSTANCE_CAST((o),GTK_EXIF_TYPE_ENTRY_RESOLUTION,GtkExifEntryResolution)) #define GTK_EXIF_ENTRY_RESOLUTION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k),GTK_EXIF_TYPE_ENTRY_RESOLUTION,GtkExifEntryResolutionClass)) #define GTK_EXIF_IS_ENTRY_RESOLUTION(o) (G_TYPE_CHECK_INSTANCE_TYPE((o),GTK_EXIF_TYPE_ENTRY_RESOLUTION)) typedef struct _GtkExifEntryResolution GtkExifEntryResolution; typedef struct _GtkExifEntryResolutionPrivate GtkExifEntryResolutionPrivate; typedef struct _GtkExifEntryResolutionClass GtkExifEntryResolutionClass; struct _GtkExifEntryResolution { GtkExifEntry parent; GtkExifEntryResolutionPrivate *priv; }; struct _GtkExifEntryResolutionClass { GtkExifEntryClass parent_class; }; GType gtk_exif_entry_resolution_get_type (void); GtkWidget *gtk_exif_entry_resolution_new (ExifContent *content, gboolean focal_plane); #endif /* __GTK_EXIF_ENTRY_RESOLUTION_H__ */ libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-user-comment.c000664 000000 000000 00000020161 12115730414 023540 0ustar00rootroot000000 000000 /* gtk-exif-entry-user-comment. * * Copyright © 2002 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include "gtk-exif-entry-user-comment.h" #include "gtk-exif-util.h" #include "gtk-extensions/gtk-options.h" #include #include #include #ifdef ENABLE_NLS # include # undef _ # define _(String) dgettext (GETTEXT_PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define N_(String) (String) #endif struct _GtkExifEntryUserCommentPrivate { ExifEntry *entry; GtkComboBox *menu; GtkEntry *entry_widget; }; #define PARENT_TYPE GTK_EXIF_TYPE_ENTRY static GtkExifEntryClass *parent_class; static void #if GTK_CHECK_VERSION(3,0,0) gtk_exif_entry_user_comment_destroy (GtkWidget *widget) #else gtk_exif_entry_user_comment_destroy (GtkObject *object) #endif { #if GTK_CHECK_VERSION(3,0,0) GtkExifEntryUserComment *entry = GTK_EXIF_ENTRY_USER_COMMENT (widget); #else GtkExifEntryUserComment *entry = GTK_EXIF_ENTRY_USER_COMMENT (object); #endif if (entry->priv->entry) { exif_entry_unref (entry->priv->entry); entry->priv->entry = NULL; } #if GTK_CHECK_VERSION(3,0,0) GTK_WIDGET_CLASS (parent_class)->destroy (widget); #else GTK_OBJECT_CLASS (parent_class)->destroy (object); #endif } GTK_EXIF_FINALIZE (entry_user_comment, EntryUserComment) static void gtk_exif_entry_user_comment_class_init (gpointer g_class, gpointer class_data) { #if GTK_CHECK_VERSION(3,0,0) GtkWidgetClass *widget_class; GObjectClass *gobject_class; widget_class = GTK_WIDGET_CLASS (g_class); widget_class->destroy = gtk_exif_entry_user_comment_destroy; #else GtkObjectClass *object_class; GObjectClass *gobject_class; object_class = GTK_OBJECT_CLASS (g_class); object_class->destroy = gtk_exif_entry_user_comment_destroy; #endif gobject_class = G_OBJECT_CLASS (g_class); gobject_class->finalize = gtk_exif_entry_user_comment_finalize; parent_class = g_type_class_peek_parent (g_class); } static void gtk_exif_entry_user_comment_init (GTypeInstance *instance, gpointer g_class) { GtkExifEntryUserComment *entry = GTK_EXIF_ENTRY_USER_COMMENT (instance); entry->priv = g_new0 (GtkExifEntryUserCommentPrivate, 1); } GTK_EXIF_CLASS (entry_user_comment, EntryUserComment, "EntryUserComment") typedef enum _CharacterCode CharacterCode; enum _CharacterCode { CHARACTER_CODE_ASCII, CHARACTER_CODE_JIS, CHARACTER_CODE_UNICODE, CHARACTER_CODE_UNDEFINED }; static struct { CharacterCode code; const guchar *data; } character_codes[] = { {CHARACTER_CODE_ASCII , "ASCII\0\0\0" }, {CHARACTER_CODE_JIS , "JIS\0\0\0\0\0" }, {CHARACTER_CODE_UNICODE , "UNICODE\0" }, {CHARACTER_CODE_UNDEFINED, "\0\0\0\0\0\0\0\0"}, {0, NULL} }; static void gtk_exif_entry_user_comment_load (GtkExifEntryUserComment *entry) { guint i; gchar *s; GtkTreeIter iter; GtkTreeModel *tm; g_return_if_fail (GTK_EXIF_IS_ENTRY_USER_COMMENT (entry)); tm = gtk_combo_box_get_model (entry->priv->menu); if (entry->priv->entry->size < 8) return; for (i = 0; character_codes[i].data && memcmp (character_codes[i].data, entry->priv->entry->data, 8); i++); if (!memcmp (character_codes[i].data, entry->priv->entry->data, 8)) { gtk_tree_model_get_iter_from_option (tm, character_codes[i].code, &iter); gtk_combo_box_set_active_iter (entry->priv->menu, &iter); } if (entry->priv->entry->size < 9) return; s = g_new0 (gchar, entry->priv->entry->size - 8 + 1); if (!s) return; memcpy (s, entry->priv->entry->data + 8, entry->priv->entry->size - 8); gtk_entry_set_text (entry->priv->entry_widget, s); g_free (s); } static void gtk_exif_entry_user_comment_save (GtkExifEntryUserComment *entry) { guint i; char *d; unsigned int s; const gchar *t; GtkTreeIter iter; GtkTreeModel *tm; GValue v = {0,}; tm = gtk_combo_box_get_model (entry->priv->menu); gtk_combo_box_get_active_iter (entry->priv->menu, &iter); gtk_tree_model_get_value (tm, &iter, GTK_OPTIONS_OPTION_COLUMN, &v); for (i = 0; character_codes[i].data && (g_value_get_int (&v) != character_codes[i].code); i++); if (g_value_get_int (&v) == character_codes[i].code) { /* * Make sure we have enough data left to save * the character code. */ if (entry->priv->entry->size < 8) { s = sizeof (char) * 8; d = realloc (entry->priv->entry->data, s); if (!d) return; entry->priv->entry->data = d; entry->priv->entry->size = s; } memcpy (entry->priv->entry->data, character_codes[i].data, 8); } /* Save the actual comment. */ t = gtk_entry_get_text (entry->priv->entry_widget); if (!t) return; if (entry->priv->entry->size < strlen (t) + 8) { s = sizeof (char) * (strlen (t) + 8); d = realloc (entry->priv->entry->data, s); if (!d) return; entry->priv->entry->data = d; entry->priv->entry->size = s; } memcpy (entry->priv->entry->data + 8, t, strlen (t)); gtk_exif_entry_changed (GTK_EXIF_ENTRY (entry), entry->priv->entry); } static void on_character_code_changed (GtkComboBox *cb, GtkExifEntryUserComment *entry) { gtk_exif_entry_user_comment_save (entry); } static GtkOptions character_codes_list[] = { {CHARACTER_CODE_ASCII , N_("ASCII" )}, {CHARACTER_CODE_JIS , N_("JIS" )}, {CHARACTER_CODE_UNICODE , N_("Unicode" )}, {CHARACTER_CODE_UNDEFINED, N_("Undefined")}, {0, NULL} }; static void on_changed (GtkEntry *w, GtkExifEntryUserComment *entry) { gtk_exif_entry_user_comment_save (entry); } GtkWidget * gtk_exif_entry_user_comment_new (ExifEntry *e) { GtkExifEntryUserComment *entry; GtkWidget *hbox, *w; GtkCellRenderer *cell; g_return_val_if_fail (e != NULL, NULL); g_return_val_if_fail (e->format == EXIF_FORMAT_UNDEFINED, NULL); g_return_val_if_fail (e->tag == EXIF_TAG_USER_COMMENT, NULL); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); entry = g_object_new (GTK_EXIF_TYPE_ENTRY_USER_COMMENT, NULL); entry->priv->entry = e; exif_entry_ref (e); gtk_exif_entry_construct (GTK_EXIF_ENTRY (entry), exif_tag_get_title_in_ifd (e->tag, exif_content_get_ifd(e->parent)), exif_tag_get_description_in_ifd (e->tag, exif_content_get_ifd(e->parent))); hbox = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (entry), hbox, FALSE, FALSE, 5); w = gtk_label_new (_("Character Code:")); gtk_widget_show (w); gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0); w = gtk_combo_box_new_with_model ( gtk_tree_model_new_from_options (character_codes_list)); gtk_widget_show (w); gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0); entry->priv->menu = GTK_COMBO_BOX (w); cell = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (w), cell, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (w), cell, "text", GTK_OPTIONS_NAME_COLUMN, NULL); g_signal_connect (G_OBJECT (w), "changed", G_CALLBACK (on_character_code_changed), entry); w = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (entry), w, FALSE, FALSE, 5); gtk_widget_show (w); g_signal_connect (w, "changed", G_CALLBACK (on_changed), entry); entry->priv->entry_widget = GTK_ENTRY (w); gtk_exif_entry_user_comment_load (entry); return (GTK_WIDGET (entry)); } libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-user-comment.h000664 000000 000000 00000003743 12115730414 023554 0ustar00rootroot000000 000000 /* gtk-exif-entry-user-comment.h * * UserComment © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_EXIF_ENTRY_USER_COMMENT_H__ #define __GTK_EXIF_ENTRY_USER_COMMENT_H__ #include #define GTK_EXIF_TYPE_ENTRY_USER_COMMENT (gtk_exif_entry_user_comment_get_type()) #define GTK_EXIF_ENTRY_USER_COMMENT(o) (G_TYPE_CHECK_INSTANCE_CAST((o),GTK_EXIF_TYPE_ENTRY_USER_COMMENT,GtkExifEntryUserComment)) #define GTK_EXIF_ENTRY_USER_COMMENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k),GTK_EXIF_TYPE_ENTRY_USER_COMMENT,GtkExifEntryUserCommentClass)) #define GTK_EXIF_IS_ENTRY_USER_COMMENT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o),GTK_EXIF_TYPE_ENTRY_USER_COMMENT)) typedef struct _GtkExifEntryUserComment GtkExifEntryUserComment; typedef struct _GtkExifEntryUserCommentPrivate GtkExifEntryUserCommentPrivate; typedef struct _GtkExifEntryUserCommentClass GtkExifEntryUserCommentClass; struct _GtkExifEntryUserComment { GtkExifEntry parent; GtkExifEntryUserCommentPrivate *priv; }; struct _GtkExifEntryUserCommentClass { GtkExifEntryClass parent_class; }; GType gtk_exif_entry_user_comment_get_type (void); GtkWidget *gtk_exif_entry_user_comment_new (ExifEntry *entry); #endif /* __GTK_EXIF_ENTRY_USER_COMMENT_H__ */ libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-version.c000664 000000 000000 00000020367 12115730414 022617 0ustar00rootroot000000 000000 /* gtk-exif-entry-version.c * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include "gtk-exif-entry-version.h" #include "gtk-exif-util.h" #include #include #ifdef ENABLE_NLS # include # undef _ # define _(String) dgettext (GETTEXT_PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define N_(String) (String) #endif #include "gtk-extensions/gtk-options.h" #include struct _GtkExifEntryVersionPrivate { ExifEntry *entry; GtkComboBox *menu; }; #define PARENT_TYPE GTK_EXIF_TYPE_ENTRY static GtkExifEntryClass *parent_class; static void #if GTK_CHECK_VERSION(3,0,0) gtk_exif_entry_version_destroy (GtkWidget *widget) #else gtk_exif_entry_version_destroy (GtkObject *object) #endif { #if GTK_CHECK_VERSION(3,0,0) GtkExifEntryVersion *entry = GTK_EXIF_ENTRY_VERSION (widget); #else GtkExifEntryVersion *entry = GTK_EXIF_ENTRY_VERSION (object); #endif if (entry->priv->entry) { exif_entry_unref (entry->priv->entry); entry->priv->entry = NULL; } #if GTK_CHECK_VERSION(3,0,0) GTK_WIDGET_CLASS (parent_class)->destroy (widget); #else GTK_OBJECT_CLASS (parent_class)->destroy (object); #endif } GTK_EXIF_FINALIZE (entry_version, EntryVersion) static void gtk_exif_entry_version_class_init (gpointer g_class, gpointer class_data) { #if GTK_CHECK_VERSION(3,0,0) GtkWidgetClass *widget_class; GObjectClass *gobject_class; widget_class = GTK_WIDGET_CLASS (g_class); widget_class->destroy = gtk_exif_entry_version_destroy; #else GtkObjectClass *object_class; GObjectClass *gobject_class; object_class = GTK_OBJECT_CLASS (g_class); object_class->destroy = gtk_exif_entry_version_destroy; #endif gobject_class = G_OBJECT_CLASS (g_class); gobject_class->finalize = gtk_exif_entry_version_finalize; parent_class = g_type_class_peek_parent (g_class); } static void gtk_exif_entry_version_init (GTypeInstance *instance, gpointer g_class) { GtkExifEntryVersion *entry = GTK_EXIF_ENTRY_VERSION (instance); entry->priv = g_new0 (GtkExifEntryVersionPrivate, 1); } GTK_EXIF_CLASS (entry_version, EntryVersion, "EntryVersion") typedef enum _ExifVersion ExifVersion; enum _ExifVersion { EXIF_VERSION_2_0, EXIF_VERSION_2_1, EXIF_VERSION_2_2, EXIF_VERSION_2_21, EXIF_VERSION_2_3 }; typedef enum _FlashPixVersion FlashPixVersion; enum _FlashPixVersion { FLASH_PIX_VERSION_1, FLASH_PIX_VERSION_1_01 }; static GtkOptions exif_list[] = { {EXIF_VERSION_2_0 , N_("Exif Format Version 2.0")}, {EXIF_VERSION_2_1 , N_("Exif Format Version 2.1")}, {EXIF_VERSION_2_2 , N_("Exif Format Version 2.2")}, {EXIF_VERSION_2_21, N_("Exif Format Version 2.21")}, {EXIF_VERSION_2_3, N_("Exif Format Version 2.3")}, {0, NULL} }; static GtkOptions flash_pix_list[] = { {FLASH_PIX_VERSION_1, N_("FlashPix Format Version 1.0")}, {FLASH_PIX_VERSION_1_01, N_("FlashPix Format Version 1.01")}, {0, NULL} }; static struct { ExifVersion version; const guchar *data; } exif_versions[] = { {EXIF_VERSION_2_0 , "0200"}, {EXIF_VERSION_2_1 , "0210"}, {EXIF_VERSION_2_2 , "0220"}, {EXIF_VERSION_2_21, "0221"}, {EXIF_VERSION_2_3, "0230"}, {0, NULL} }; static struct { FlashPixVersion version; const guchar *data; } flash_pix_versions[] = { {FLASH_PIX_VERSION_1, "0100"}, {FLASH_PIX_VERSION_1_01, "0101"}, {0, NULL} }; static void gtk_exif_entry_version_load (GtkExifEntryVersion *entry) { guint i; gboolean found = FALSE; GtkTreeIter iter; GtkTreeModel *tm; g_return_if_fail (GTK_EXIF_IS_ENTRY_VERSION (entry)); tm = gtk_combo_box_get_model (entry->priv->menu); switch (entry->priv->entry->tag) { case EXIF_TAG_EXIF_VERSION: for (i = 0; exif_versions[i].data; i++) { if (!memcmp (exif_versions[i].data, entry->priv->entry->data, 4)) { if (!gtk_tree_model_get_iter_from_option (tm, exif_versions[i].version, &iter)) return; found = TRUE; break; } } break; case EXIF_TAG_FLASH_PIX_VERSION: for (i = 0; flash_pix_versions[i].data; i++) { if (!memcmp (flash_pix_versions[i].data, entry->priv->entry->data, 4)) { if (!gtk_tree_model_get_iter_from_option (tm, flash_pix_versions[i].version, &iter)) return; found = TRUE; break; } } break; default: return; } if (found) gtk_combo_box_set_active_iter (entry->priv->menu, &iter); } static void gtk_exif_entry_version_save (GtkExifEntryVersion *entry) { guint i; GtkTreeIter iter; GtkTreeModel *tm; GValue v = {0,}; tm = gtk_combo_box_get_model (entry->priv->menu); gtk_combo_box_get_active_iter (entry->priv->menu, &iter); gtk_tree_model_get_value (tm, &iter, GTK_OPTIONS_OPTION_COLUMN, &v); switch (entry->priv->entry->tag) { case EXIF_TAG_EXIF_VERSION: for (i = 0; exif_versions[i].data; i++) if (g_value_get_int (&v) == exif_versions[i].version) { memcpy (entry->priv->entry->data, exif_versions[i].data, 4); break; } break; case EXIF_TAG_FLASH_PIX_VERSION: for (i = 0; flash_pix_versions[i].data; i++) if (g_value_get_int (&v) == flash_pix_versions[i].version) { memcpy (entry->priv->entry->data, flash_pix_versions[i].data, 4); break; } break; default: break; } gtk_exif_entry_changed (GTK_EXIF_ENTRY (entry), entry->priv->entry); } static void on_changed (GtkComboBox *cb, GtkExifEntryVersion *entry) { gtk_exif_entry_version_save (entry); } GtkWidget * gtk_exif_entry_version_new (ExifEntry *e) { GtkExifEntryVersion *entry; GtkWidget *hbox, *label, *options; GtkTreeModel *tm = NULL; GtkCellRenderer *cell; g_return_val_if_fail (e != NULL, NULL); g_return_val_if_fail ((e->tag == EXIF_TAG_EXIF_VERSION) || (e->tag == EXIF_TAG_FLASH_PIX_VERSION), NULL); g_return_val_if_fail (e->format == EXIF_FORMAT_UNDEFINED, NULL); g_return_val_if_fail (e->components == 4, NULL); g_return_val_if_fail (e->data != NULL, NULL); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); entry = g_object_new (GTK_EXIF_TYPE_ENTRY_VERSION, NULL); entry->priv->entry = e; exif_entry_ref (e); gtk_exif_entry_construct (GTK_EXIF_ENTRY (entry), exif_tag_get_title_in_ifd (e->tag, exif_content_get_ifd(e->parent)), exif_tag_get_description_in_ifd (e->tag, exif_content_get_ifd(e->parent))); hbox = gtk_hbox_new (FALSE, 5); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (entry), hbox, TRUE, FALSE, 0); label = gtk_label_new (_("Version:")); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); switch (e->tag) { case EXIF_TAG_EXIF_VERSION: tm = gtk_tree_model_new_from_options (exif_list); break; case EXIF_TAG_FLASH_PIX_VERSION: default: tm = gtk_tree_model_new_from_options (flash_pix_list); break; } options = gtk_combo_box_new_with_model (tm); gtk_widget_show (options); gtk_box_pack_start (GTK_BOX (hbox), options, FALSE, FALSE, 0); entry->priv->menu = GTK_COMBO_BOX (options); cell = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (options), cell, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (options), cell, "text", GTK_OPTIONS_NAME_COLUMN, NULL); g_signal_connect (G_OBJECT (options), "changed", G_CALLBACK (on_changed), entry); gtk_exif_entry_version_load (entry); return (GTK_WIDGET (entry)); } libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry-version.h000664 000000 000000 00000003563 12115730414 022623 0ustar00rootroot000000 000000 /* gtk-exif-entry-version.h * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_EXIF_ENTRY_VERSION_H__ #define __GTK_EXIF_ENTRY_VERSION_H__ #include #define GTK_EXIF_TYPE_ENTRY_VERSION (gtk_exif_entry_version_get_type()) #define GTK_EXIF_ENTRY_VERSION(o) (G_TYPE_CHECK_INSTANCE_CAST((o),GTK_EXIF_TYPE_ENTRY_VERSION,GtkExifEntryVersion)) #define GTK_EXIF_ENTRY_VERSION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k),GTK_EXIF_TYPE_ENTRY_VERSION,GtkExifEntryVersionClass)) #define GTK_EXIF_IS_ENTRY_VERSION(o) (G_TYPE_CHECK_INSTANCE_TYPE((o),GTK_EXIF_TYPE_ENTRY_VERSION)) typedef struct _GtkExifEntryVersion GtkExifEntryVersion; typedef struct _GtkExifEntryVersionPrivate GtkExifEntryVersionPrivate; typedef struct _GtkExifEntryVersionClass GtkExifEntryVersionClass; struct _GtkExifEntryVersion { GtkExifEntry parent; GtkExifEntryVersionPrivate *priv; }; struct _GtkExifEntryVersionClass { GtkExifEntryClass parent_class; }; GType gtk_exif_entry_version_get_type (void); GtkWidget *gtk_exif_entry_version_new (ExifEntry *entry); #endif /* __GTK_EXIF_ENTRY_VERSION_H__ */ libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry.c000664 000000 000000 00000012221 12115730414 021122 0ustar00rootroot000000 000000 /* gtk-exif-entry.c * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include "gtk-exif-entry.h" #include "gtk-exif-util.h" #include #include struct _GtkExifEntryPrivate { }; #define PARENT_TYPE GTK_TYPE_VBOX static GtkVBoxClass *parent_class; enum { ENTRY_ADDED, ENTRY_REMOVED, ENTRY_CHANGED, LAST_SIGNAL }; static guint signals[LAST_SIGNAL] = {0}; static void #if GTK_CHECK_VERSION(3,0,0) gtk_exif_entry_destroy (GtkWidget *widget) #else gtk_exif_entry_destroy (GtkObject *object) #endif { #if GTK_CHECK_VERSION(3,0,0) GtkExifEntry *entry = GTK_EXIF_ENTRY (widget); #else GtkExifEntry *entry = GTK_EXIF_ENTRY (object); #endif /* Nothing to free here */ (void)entry; #if GTK_CHECK_VERSION(3,0,0) GTK_WIDGET_CLASS (parent_class)->destroy (widget); #else GTK_OBJECT_CLASS (parent_class)->destroy (object); #endif } GTK_EXIF_FINALIZE (entry, Entry) static void gtk_exif_entry_class_init (gpointer g_class, gpointer class_data) { #if GTK_CHECK_VERSION(3,0,0) GtkWidgetClass *widget_class; GObjectClass *gobject_class; widget_class = GTK_WIDGET_CLASS (g_class); widget_class->destroy = gtk_exif_entry_destroy; #else GtkObjectClass *object_class; GObjectClass *gobject_class; object_class = GTK_OBJECT_CLASS (g_class); object_class->destroy = gtk_exif_entry_destroy; #endif gobject_class = G_OBJECT_CLASS (g_class); gobject_class->finalize = gtk_exif_entry_finalize; signals[ENTRY_ADDED] = g_signal_new ("entry_added", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkExifEntryClass, entry_added), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); signals[ENTRY_REMOVED] = g_signal_new ("entry_removed", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GtkExifEntryClass, entry_removed), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); signals[ENTRY_CHANGED] = g_signal_new ("entry_changed", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GtkExifEntryClass, entry_changed), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); parent_class = g_type_class_peek_parent (g_class); } static void gtk_exif_entry_init (GTypeInstance *instance, gpointer g_class) { GtkExifEntry *entry = GTK_EXIF_ENTRY (instance); entry->priv = g_new0 (GtkExifEntryPrivate, 1); } GTK_EXIF_CLASS (entry, Entry, "Entry") void gtk_exif_entry_construct (GtkExifEntry *entry, const gchar *name, const gchar *description) { GtkWidget *label, *separator; g_return_if_fail (GTK_EXIF_IS_ENTRY (entry)); g_return_if_fail (name != NULL); g_return_if_fail (description != NULL); gtk_box_set_spacing (GTK_BOX (entry), 5); gtk_box_set_homogeneous (GTK_BOX (entry), FALSE); gtk_container_set_border_width (GTK_CONTAINER (entry), 5); label = gtk_label_new (name); gtk_widget_show (label); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_label_set_line_wrap (GTK_LABEL (label), FALSE); gtk_box_pack_start (GTK_BOX (entry), label, TRUE, FALSE, 0); separator = gtk_hseparator_new (); gtk_widget_show (separator); gtk_box_pack_start (GTK_BOX (entry), separator, TRUE, FALSE, 0); #if 0 swin = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (swin); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_box_pack_start (GTK_BOX (entry), swin, TRUE, TRUE, 0); #endif label = gtk_label_new (description); gtk_widget_show (label); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_misc_set_alignment (GTK_MISC (label), 0, 0); #if 0 gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (swin), label); gtk_viewport_set_shadow_type ( GTK_VIEWPORT (GTK_BIN (swin)->child), GTK_SHADOW_NONE); #endif gtk_box_pack_start (GTK_BOX (entry), label, TRUE, FALSE, 0); } void gtk_exif_entry_changed (GtkExifEntry *entry, ExifEntry *e) { g_return_if_fail (GTK_EXIF_IS_ENTRY (entry)); g_signal_emit (G_OBJECT (entry), signals[ENTRY_CHANGED], 0, e); } void gtk_exif_entry_added (GtkExifEntry *entry, ExifEntry *e) { g_return_if_fail (GTK_EXIF_IS_ENTRY (entry)); g_signal_emit (G_OBJECT (entry), signals[ENTRY_ADDED], 0, e); } void gtk_exif_entry_removed (GtkExifEntry *entry, ExifEntry *e) { g_return_if_fail (GTK_EXIF_IS_ENTRY (entry)); g_signal_emit (G_OBJECT (entry), signals[ENTRY_REMOVED], 0, e); } libexif-gtk-0.4.0/libexif-gtk/gtk-exif-entry.h000664 000000 000000 00000004166 12115730414 021140 0ustar00rootroot000000 000000 /* gtk-exif-entry.h * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_EXIF_ENTRY_H__ #define __GTK_EXIF_ENTRY_H__ #include #include #define GTK_EXIF_TYPE_ENTRY (gtk_exif_entry_get_type()) #define GTK_EXIF_ENTRY(o) (G_TYPE_CHECK_INSTANCE_CAST((o),GTK_EXIF_TYPE_ENTRY,GtkExifEntry)) #define GTK_EXIF_ENTRY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k),GTK_EXIF_TYPE_ENTRY,GtkExifEntryClass)) #define GTK_EXIF_IS_ENTRY(o) (G_TYPE_CHECK_INSTANCE_TYPE((o),GTK_EXIF_TYPE_ENTRY)) typedef struct _GtkExifEntry GtkExifEntry; typedef struct _GtkExifEntryPrivate GtkExifEntryPrivate; typedef struct _GtkExifEntryClass GtkExifEntryClass; struct _GtkExifEntry { GtkVBox parent; GtkExifEntryPrivate *priv; }; struct _GtkExifEntryClass { GtkVBoxClass parent_class; /* Signals */ void (* entry_changed) (GtkExifEntry *entry, ExifEntry *e); void (* entry_removed) (GtkExifEntry *entry, ExifEntry *e); void (* entry_added) (GtkExifEntry *entry, ExifEntry *e); }; GType gtk_exif_entry_get_type (void); void gtk_exif_entry_construct (GtkExifEntry *, const gchar *name, const gchar *description); /* Signals */ void gtk_exif_entry_changed (GtkExifEntry *, ExifEntry *); void gtk_exif_entry_added (GtkExifEntry *, ExifEntry *); void gtk_exif_entry_removed (GtkExifEntry *, ExifEntry *); #endif /* __GTK_EXIF_ENTRY_H__ */ libexif-gtk-0.4.0/libexif-gtk/gtk-exif-tree-item.c000664 000000 000000 00000007007 12115730414 021662 0ustar00rootroot000000 000000 /* gtk-exif-tree-item.c * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include "gtk-exif-tree-item.h" #include #include #include #include #include "gtk-exif-util.h" struct _GtkExifTreeItemPrivate { }; #define PARENT_TYPE GTK_TYPE_TREE_ITEM static GtkTreeItemClass *parent_class; static void gtk_exif_tree_item_destroy (GtkObject *object) { GtkExifTreeItem *item = GTK_EXIF_TREE_ITEM (object); if (item->entry) { exif_entry_unref (item->entry); item->entry = NULL; } GTK_OBJECT_CLASS (parent_class)->destroy (object); } GTK_EXIF_FINALIZE (tree_item, TreeItem) static void gtk_exif_tree_item_class_init (gpointer g_class, gpointer class_data) { GtkObjectClass *object_class; object_class = GTK_OBJECT_CLASS (klass); object_class->destroy = gtk_exif_tree_item_destroy; object_class->finalize = gtk_exif_tree_item_finalize; parent_class = g_type_class_peek_parent (g_class); } static void gtk_exif_tree_item_init (GtkExifTreeItem *item) { item->priv = g_new0 (GtkExifTreeItemPrivate, 1); } GTK_EXIF_CLASS (tree_item, TreeItem, "TreeItem") static void fill_tree (GtkTree *tree, ExifContent *content) { GtkWidget *item; guint i; ExifEntry *entry; for (i = 0; i < content->count; i++) { entry = content->entries[i]; item = gtk_exif_tree_item_new (); gtk_widget_show (item); gtk_tree_append (tree, item); gtk_exif_tree_item_set_entry (GTK_EXIF_TREE_ITEM (item), entry); } } GtkWidget * gtk_exif_tree_item_new (void) { GtkExifTreeItem *item; item = gtk_type_new (GTK_EXIF_TYPE_TREE_ITEM); return (GTK_WIDGET (item)); } static void on_select_child (GtkTree *tree, GtkWidget *item) { GtkExifTreeItem *eitem = GTK_EXIF_TREE_ITEM (item); gtk_signal_emit_by_name (GTK_OBJECT (tree->root_tree), "entry_selected", eitem->entry); } void gtk_exif_tree_item_set_entry (GtkExifTreeItem *item, ExifEntry *entry) { GtkWidget *tree, *label; g_return_if_fail (GTK_EXIF_IS_TREE_ITEM (item)); g_return_if_fail (entry != NULL); /* Keep a reference to this entry */ if (item->entry) exif_entry_unref (item->entry); item->entry = entry; exif_entry_ref (entry); label = gtk_label_new ( exif_tag_get_name_in_ifd (entry->tag, exif_content_get_ifd(entry->parent)); gtk_widget_show (label); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label), 0, 0); gtk_container_add (GTK_CONTAINER (item), label); if (entry->content->count) { tree = gtk_tree_new (); gtk_widget_show (tree); gtk_tree_item_set_subtree (GTK_TREE_ITEM (item), tree); fill_tree (GTK_TREE (tree), entry->content); /* Bug in GtkTree? */ gtk_signal_connect (GTK_OBJECT (tree), "select_child", GTK_SIGNAL_FUNC (on_select_child), NULL); } } libexif-gtk-0.4.0/libexif-gtk/gtk-exif-tree-item.h000664 000000 000000 00000003554 12115730414 021672 0ustar00rootroot000000 000000 /* gtk-exif-tree-item.h * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_EXIF_TREE_ITEM_H__ #define __GTK_EXIF_TREE_ITEM_H__ #include #include #define GTK_EXIF_TYPE_TREE_ITEM (gtk_exif_tree_item_get_type()) #define GTK_EXIF_TREE_ITEM(o) (GTK_CHECK_CAST((o),GTK_EXIF_TYPE_TREE_ITEM,GtkExifTreeItem)) #define GTK_EXIF_TREE_ITEM_CLASS(k) (GTK_CHECK_CLASS_CAST((k),GTK_EXIF_TYPE_TREE_ITEM,GtkExifTreeItemClass)) #define GTK_EXIF_IS_TREE_ITEM(o) (GTK_CHECK_TYPE((o),GTK_EXIF_TYPE_TREE_ITEM)) typedef struct _GtkExifTreeItem GtkExifTreeItem; typedef struct _GtkExifTreeItemPrivate GtkExifTreeItemPrivate; typedef struct _GtkExifTreeItemClass GtkExifTreeItemClass; struct _GtkExifTreeItem { GtkTreeItem parent; ExifEntry *entry; GtkExifTreeItemPrivate *priv; }; struct _GtkExifTreeItemClass { GtkTreeItemClass parent_class; }; GtkType gtk_exif_tree_item_get_type (void); GtkWidget *gtk_exif_tree_item_new (void); void gtk_exif_tree_item_set_entry (GtkExifTreeItem *item, ExifEntry *entry); #endif /* __GTK_EXIF_TREE_ITEM_H__ */ libexif-gtk-0.4.0/libexif-gtk/gtk-exif-tree.c000664 000000 000000 00000006215 12115730414 020726 0ustar00rootroot000000 000000 /* gtk-exif-tree.c * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include "gtk-exif-tree.h" #include #include "gtk-exif-tree-item.h" #include "gtk-exif-util.h" struct _GtkExifTreePrivate { ExifData *data; }; #define PARENT_TYPE GTK_TYPE_TREE static GtkTreeClass *parent_class; enum { ENTRY_SELECTED, LAST_SIGNAL }; static guint signals[LAST_SIGNAL] = {0}; static void gtk_exif_tree_destroy (GtkObject *object) { GtkExifTree *tree = GTK_EXIF_TREE (object); if (tree->priv->data) { exif_data_unref (tree->priv->data); tree->priv->data = NULL; } GTK_OBJECT_CLASS (parent_class)->destroy (object); } GTK_EXIF_FINALIZE (tree, Tree) static void gtk_exif_tree_class_init (gpointer g_class, gpointer class_data) { GtkObjectClass *object_class; object_class = GTK_OBJECT_CLASS (klass); object_class->destroy = gtk_exif_tree_destroy; object_class->finalize = gtk_exif_tree_finalize; signals[ENTRY_SELECTED] = gtk_signal_new ("entry_selected", GTK_RUN_LAST, object_class->type, GTK_SIGNAL_OFFSET (GtkExifTreeClass, entry_selected), gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, GTK_TYPE_POINTER); gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); parent_class = g_type_class_peek_parent (g_class); } static void gtk_exif_tree_init (GtkExifTree *tree) { tree->priv = g_new0 (GtkExifTreePrivate, 1); } GTK_EXIF_CLASS (tree, Tree, "Tree") static void on_select_child (GtkTree *tree, GtkWidget *item, GtkExifTree *etree) { GtkExifTreeItem *eitem = GTK_EXIF_TREE_ITEM (item); gtk_signal_emit (GTK_OBJECT (etree), signals[ENTRY_SELECTED], eitem->entry); } GtkWidget * gtk_exif_tree_new (void) { GtkExifTree *tree; tree = gtk_type_new (GTK_EXIF_TYPE_TREE); gtk_signal_connect (GTK_OBJECT (tree), "select_child", GTK_SIGNAL_FUNC (on_select_child), tree); return (GTK_WIDGET (tree)); } void gtk_exif_tree_set_data (GtkExifTree *tree, ExifData *data) { guint i; GtkWidget *item; g_return_if_fail (data != NULL); if (tree->priv->data) exif_data_unref (tree->priv->data); tree->priv->data = data; exif_data_ref (data); gtk_tree_remove_items (GTK_TREE (tree), GTK_TREE (tree)->children); for (i = 0; i < data->content->count; i++) { item = gtk_exif_tree_item_new (); gtk_widget_show (item); gtk_tree_append (GTK_TREE (tree), item); gtk_exif_tree_item_set_entry ( GTK_EXIF_TREE_ITEM (item), data->content->entries[i]); } } libexif-gtk-0.4.0/libexif-gtk/gtk-exif-tree.h000664 000000 000000 00000003433 12115730414 020732 0ustar00rootroot000000 000000 /* gtk-exif-tree.h * * Copyright © 2001 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_EXIF_TREE_H__ #define __GTK_EXIF_TREE_H__ #include #include #define GTK_EXIF_TYPE_TREE (gtk_exif_tree_get_type()) #define GTK_EXIF_TREE(o) (GTK_CHECK_CAST((o),GTK_EXIF_TYPE_TREE,GtkExifTree)) #define GTK_EXIF_TREE_CLASS(k) (GTK_CHECK_CLASS_CAST((k),GTK_EXIF_TYPE_TREE,GtkExifTreeClass)) #define GTK_EXIF_IS_TREE(o) (GTK_CHECK_TYPE((o),GTK_EXIF_TYPE_TREE)) typedef struct _GtkExifTree GtkExifTree; typedef struct _GtkExifTreePrivate GtkExifTreePrivate; typedef struct _GtkExifTreeClass GtkExifTreeClass; struct _GtkExifTree { GtkTree parent; GtkExifTreePrivate *priv; }; struct _GtkExifTreeClass { GtkTreeClass parent_class; /* Signals */ void (* entry_selected) (GtkExifTree *tree, ExifEntry *entry); }; GtkType gtk_exif_tree_get_type (void); GtkWidget *gtk_exif_tree_new (void); void gtk_exif_tree_set_data (GtkExifTree *tree, ExifData *data); #endif /* __GTK_EXIF_TREE_H__ */ libexif-gtk-0.4.0/libexif-gtk/gtk-exif-util.h000664 000000 000000 00000003343 12115730414 020750 0ustar00rootroot000000 000000 /* gtk-exif-util.h: * * Copyright © 2002 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_EXIF_UTIL_H__ #define __GTK_EXIF_UTIL_H__ #define GTK_EXIF_CLASS(n,N,s) \ \ GType \ gtk_exif_##n##_get_type (void) \ { \ static GType t = 0; \ GTypeInfo ti; \ \ if (!t) { \ memset (&ti, 0, sizeof (GTypeInfo)); \ ti.class_size = sizeof (GtkExif##N##Class); \ ti.class_init = gtk_exif_##n##_class_init; \ ti.instance_size = sizeof (GtkExif##N); \ ti.instance_init = gtk_exif_##n##_init; \ t = g_type_register_static (PARENT_TYPE, "GtkExif" s, \ &ti, 0); \ } \ \ return (t); \ } #define GTK_EXIF_FINALIZE(n,N) \ \ static void \ gtk_exif_##n##_finalize (GObject *object) \ { \ GtkExif##N *o = (GtkExif##N *) object; \ \ g_free (o->priv); \ \ G_OBJECT_CLASS (parent_class)->finalize (object); \ } #endif /* __GTK_EXIF_UTIL_H__ */ libexif-gtk-0.4.0/libexif-gtk3-uninstalled.pc.in000664 000000 000000 00000000255 12115730414 021441 0ustar00rootroot000000 000000 Name: libexif-gtk3 Description: gtk3-widgets for libexif Requires: libexif Version: @VERSION@ Libs: ${pcfiledir}/libexif-gtk/libexif-gtk3.la Cflags: -I${pcfiledir}/@srcdir@ libexif-gtk-0.4.0/libexif-gtk3.pc.in000664 000000 000000 00000000464 12115730414 017123 0ustar00rootroot000000 000000 prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ datarootdir=@datarootdir@ datadir=@datadir@ localedir=@localedir@ Name: libexif-gtk3 Description: gtk3-widgets for libexif Requires: libexif Version: @VERSION@ Libs: -L${libdir} -lexif -lexif-gtk3 -lm Cflags: -I${includedir} libexif-gtk-0.4.0/m4m/000775 000000 000000 00000000000 12115730414 014373 5ustar00rootroot000000 000000 libexif-gtk-0.4.0/m4m/Makefile.am000664 000000 000000 00000000324 12115730414 016426 0ustar00rootroot000000 000000 EXTRA_DIST = gp-byteorder.m4 gp-check-library.m4 gp-check-popt.m4 gp-check-shell-environment.m4 gp-config-msg.m4 gp-documentation.m4 gp-gettext-hack.m4 gp-packaging.m4 gp-pkg-config.m4 gp-references.m4 stdint.m4 libexif-gtk-0.4.0/m4m/gp-byteorder.m4000664 000000 000000 00000026121 12115730414 017242 0ustar00rootroot000000 000000 dnl AC_NEED_BYTEORDER_H ( HEADER-TO-GENERATE ) dnl Copyright 2001-2002 by Dan Fandrich dnl This file may be copied and used freely without restrictions. No warranty dnl is expressed or implied. dnl dnl Create a header file that guarantees that byte swapping macros of the dnl ntohl variety as well as the extended types included in OpenBSD and dnl NetBSD such as le32toh are defined. If possible, the standard ntohl dnl are overloaded as they are optimized for the given platform, but when dnl this is not possible (e.g. on a big-endian machine) they are defined dnl in this file. dnl Look for a symbol in a header file dnl AC_HAVE_SYMBOL ( IDENTIFIER, HEADER-FILE, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND ) AC_DEFUN([AC_HAVE_SYMBOL], [ AC_MSG_CHECKING(for $1 in $2) AC_EGREP_CPP([symbol is present|\<$1\>],[ #include <$2> #ifdef $1 symbol is present #endif ], [AC_MSG_RESULT(yes) $3 ], [AC_MSG_RESULT(no) $4 ])]) dnl Create a header file that defines extended byte swapping macros AC_DEFUN([AC_NEED_BYTEORDER_H], [ changequote(, )dnl ac_dir=`echo $1|sed 's%/[^/][^/]*$%%'` changequote([, ])dnl if test "$ac_dir" != "$1" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" fi # We're only interested in the target CPU, but it's not always set effective_target="$target" if test "x$effective_target" = xNONE -o "x$effective_target" = x ; then effective_target="$host" fi AC_SUBST(effective_target) cat > "$1" << EOF /* This file is generated automatically by configure */ /* It is valid only for the system type ${effective_target} */ #ifndef __BYTEORDER_H #define __BYTEORDER_H EOF dnl First, do an endian check AC_C_BIGENDIAN dnl Look for NetBSD-style extended byte swapping macros AC_HAVE_SYMBOL(le32toh,machine/endian.h, [HAVE_LE32TOH=1 cat >> "$1" << EOF /* extended byte swapping macros are already available */ #include EOF], [ dnl Look for standard byte swapping macros AC_HAVE_SYMBOL(ntohl,arpa/inet.h, [cat >> "$1" << EOF /* ntohl and relatives live here */ #include EOF], [AC_HAVE_SYMBOL(ntohl,netinet/in.h, [cat >> "$1" << EOF /* ntohl and relatives live here */ #include EOF],true)]) ]) dnl Look for generic byte swapping macros dnl OpenBSD AC_HAVE_SYMBOL(swap32,machine/endian.h, [cat >> "$1" << EOF /* swap32 and swap16 are defined in machine/endian.h */ EOF], [ dnl Linux GLIBC AC_HAVE_SYMBOL(bswap_32,byteswap.h, [cat >> "$1" << EOF /* Define generic byte swapping functions */ #include #define swap16(x) bswap_16(x) #define swap32(x) bswap_32(x) #define swap64(x) bswap_64(x) EOF], [ dnl NetBSD AC_HAVE_SYMBOL(bswap32,machine/endian.h, dnl We're already including machine/endian.h if this test succeeds [cat >> "$1" << EOF /* Define generic byte swapping functions */ EOF if test "$HAVE_LE32TOH" != "1"; then echo '#include '>> "$1" fi cat >> "$1" << EOF #define swap16(x) bswap16(x) #define swap32(x) bswap32(x) #define swap64(x) bswap64(x) EOF], [ dnl FreeBSD AC_HAVE_SYMBOL(__byte_swap_long,sys/types.h, [cat >> "$1" << EOF /* Define generic byte swapping functions */ #include #define swap16(x) __byte_swap_word(x) #define swap32(x) __byte_swap_long(x) /* No optimized 64 bit byte swapping macro is available */ #define swap64(x) ((uint64_t)(((uint64_t)(x) << 56) & 0xff00000000000000ULL | \\ ((uint64_t)(x) << 40) & 0x00ff000000000000ULL | \\ ((uint64_t)(x) << 24) & 0x0000ff0000000000ULL | \\ ((uint64_t)(x) << 8) & 0x000000ff00000000ULL | \\ ((x) >> 8) & 0x00000000ff000000ULL | \\ ((x) >> 24) & 0x0000000000ff0000ULL | \\ ((x) >> 40) & 0x000000000000ff00ULL | \\ ((x) >> 56) & 0x00000000000000ffULL)) EOF], [ dnl OS X AC_HAVE_SYMBOL(NXSwapLong,machine/byte_order.h, [cat >> "$1" << EOF /* Define generic byte swapping functions */ #include #define swap16(x) NXSwapShort(x) #define swap32(x) NXSwapLong(x) #define swap64(x) NXSwapLongLong(x) EOF], [ if test $ac_cv_c_bigendian = yes; then cat >> "$1" << EOF /* No other byte swapping functions are available on this big-endian system */ #define swap16(x) ((uint16_t)(((x) << 8) | ((uint16_t)(x) >> 8))) #define swap32(x) ((uint32_t)(((uint32_t)(x) << 24) & 0xff000000UL | \\ ((uint32_t)(x) << 8) & 0x00ff0000UL | \\ ((x) >> 8) & 0x0000ff00UL | \\ ((x) >> 24) & 0x000000ffUL)) #define swap64(x) ((uint64_t)(((uint64_t)(x) << 56) & 0xff00000000000000ULL | \\ ((uint64_t)(x) << 40) & 0x00ff000000000000ULL | \\ ((uint64_t)(x) << 24) & 0x0000ff0000000000ULL | \\ ((uint64_t)(x) << 8) & 0x000000ff00000000ULL | \\ ((x) >> 8) & 0x00000000ff000000ULL | \\ ((x) >> 24) & 0x0000000000ff0000ULL | \\ ((x) >> 40) & 0x000000000000ff00ULL | \\ ((x) >> 56) & 0x00000000000000ffULL)) EOF else cat >> "$1" << EOF /* Use these as generic byteswapping macros on this little endian system */ #define swap16(x) ntohs(x) #define swap32(x) ntohl(x) /* No optimized 64 bit byte swapping macro is available */ #define swap64(x) ((uint64_t)(((uint64_t)(x) << 56) & 0xff00000000000000ULL | \\ ((uint64_t)(x) << 40) & 0x00ff000000000000ULL | \\ ((uint64_t)(x) << 24) & 0x0000ff0000000000ULL | \\ ((uint64_t)(x) << 8) & 0x000000ff00000000ULL | \\ ((x) >> 8) & 0x00000000ff000000ULL | \\ ((x) >> 24) & 0x0000000000ff0000ULL | \\ ((x) >> 40) & 0x000000000000ff00ULL | \\ ((x) >> 56) & 0x00000000000000ffULL)) EOF fi ]) ]) ]) ]) ]) [ if test "$HAVE_LE32TOH" != "1"; then cat >> "$1" << EOF /* The byte swapping macros have the form: */ /* EENN[a]toh or htoEENN[a] where EE is be (big endian) or */ /* le (little-endian), NN is 16 or 32 (number of bits) and a, */ /* if present, indicates that the endian side is a pointer to an */ /* array of uint8_t bytes instead of an integer of the specified length. */ /* h refers to the host's ordering method. */ /* So, to convert a 32-bit integer stored in a buffer in little-endian */ /* format into a uint32_t usable on this machine, you could use: */ /* uint32_t value = le32atoh(&buf[3]); */ /* To put that value back into the buffer, you could use: */ /* htole32a(&buf[3], value); */ /* Define aliases for the standard byte swapping macros */ /* Arguments to these macros must be properly aligned on natural word */ /* boundaries in order to work properly on all architectures */ #define htobe16(x) htons(x) #define htobe32(x) htonl(x) #define be16toh(x) ntohs(x) #define be32toh(x) ntohl(x) #define HTOBE16(x) (x) = htobe16(x) #define HTOBE32(x) (x) = htobe32(x) #define BE32TOH(x) (x) = be32toh(x) #define BE16TOH(x) (x) = be16toh(x) EOF if test $ac_cv_c_bigendian = yes; then cat >> "$1" << EOF /* Define our own extended byte swapping macros for big-endian machines */ #define htole16(x) swap16(x) #define htole32(x) swap32(x) #define le16toh(x) swap16(x) #define le32toh(x) swap32(x) #define htobe64(x) (x) #define be64toh(x) (x) #define HTOLE16(x) (x) = htole16(x) #define HTOLE32(x) (x) = htole32(x) #define LE16TOH(x) (x) = le16toh(x) #define LE32TOH(x) (x) = le32toh(x) #define HTOBE64(x) (void) (x) #define BE64TOH(x) (void) (x) EOF else cat >> "$1" << EOF /* On little endian machines, these macros are null */ #define htole16(x) (x) #define htole32(x) (x) #define htole64(x) (x) #define le16toh(x) (x) #define le32toh(x) (x) #define le64toh(x) (x) #define HTOLE16(x) (void) (x) #define HTOLE32(x) (void) (x) #define HTOLE64(x) (void) (x) #define LE16TOH(x) (void) (x) #define LE32TOH(x) (void) (x) #define LE64TOH(x) (void) (x) /* These don't have standard aliases */ #define htobe64(x) swap64(x) #define be64toh(x) swap64(x) #define HTOBE64(x) (x) = htobe64(x) #define BE64TOH(x) (x) = be64toh(x) EOF fi fi cat >> "$1" << EOF /* Define the C99 standard length-specific integer types */ #include <_stdint.h> EOF case "${effective_target}" in i[3456]86-*) cat >> "$1" << EOF /* Here are some macros to create integers from a byte array */ /* These are used to get and put integers from/into a uint8_t array */ /* with a specific endianness. This is the most portable way to generate */ /* and read messages to a network or serial device. Each member of a */ /* packet structure must be handled separately. */ /* The i386 and compatibles can handle unaligned memory access, */ /* so use the optimized macros above to do this job */ #define be16atoh(x) be16toh(*(uint16_t*)(x)) #define be32atoh(x) be32toh(*(uint32_t*)(x)) #define be64atoh(x) be64toh(*(uint64_t*)(x)) #define le16atoh(x) le16toh(*(uint16_t*)(x)) #define le32atoh(x) le32toh(*(uint32_t*)(x)) #define le64atoh(x) le64toh(*(uint64_t*)(x)) #define htobe16a(a,x) *(uint16_t*)(a) = htobe16(x) #define htobe32a(a,x) *(uint32_t*)(a) = htobe32(x) #define htobe64a(a,x) *(uint64_t*)(a) = htobe64(x) #define htole16a(a,x) *(uint16_t*)(a) = htole16(x) #define htole32a(a,x) *(uint32_t*)(a) = htole32(x) #define htole64a(a,x) *(uint64_t*)(a) = htole64(x) EOF ;; *) cat >> "$1" << EOF /* Here are some macros to create integers from a byte array */ /* These are used to get and put integers from/into a uint8_t array */ /* with a specific endianness. This is the most portable way to generate */ /* and read messages to a network or serial device. Each member of a */ /* packet structure must be handled separately. */ /* Non-optimized but portable macros */ #define be16atoh(x) ((uint16_t)(((x)[0]<<8)|(x)[1])) #define be32atoh(x) ((uint32_t)(((x)[0]<<24)|((x)[1]<<16)|((x)[2]<<8)|(x)[3])) #define be64atoh(x) ((uint64_t)(((x)[0]<<56)|((x)[1]<<48)|((x)[2]<<40)| \\ ((x)[3]<<32)|((x)[4]<<24)|((x)[5]<<16)|((x)[6]<<8)|(x)[7])) #define le16atoh(x) ((uint16_t)(((x)[1]<<8)|(x)[0])) #define le32atoh(x) ((uint32_t)(((x)[3]<<24)|((x)[2]<<16)|((x)[1]<<8)|(x)[0])) #define le64atoh(x) ((uint64_t)(((x)[7]<<56)|((x)[6]<<48)|((x)[5]<<40)| \\ ((x)[4]<<32)|((x)[3]<<24)|((x)[2]<<16)|((x)[1]<<8)|(x)[0])) #define htobe16a(a,x) (a)[0]=(uint8_t)((x)>>8), (a)[1]=(uint8_t)(x) #define htobe32a(a,x) (a)[0]=(uint8_t)((x)>>24), (a)[1]=(uint8_t)((x)>>16), \\ (a)[2]=(uint8_t)((x)>>8), (a)[3]=(uint8_t)(x) #define htobe64a(a,x) (a)[0]=(uint8_t)((x)>>56), (a)[1]=(uint8_t)((x)>>48), \\ (a)[2]=(uint8_t)((x)>>40), (a)[3]=(uint8_t)((x)>>32), \\ (a)[4]=(uint8_t)((x)>>24), (a)[5]=(uint8_t)((x)>>16), \\ (a)[6]=(uint8_t)((x)>>8), (a)[7]=(uint8_t)(x) #define htole16a(a,x) (a)[1]=(uint8_t)((x)>>8), (a)[0]=(uint8_t)(x) #define htole32a(a,x) (a)[3]=(uint8_t)((x)>>24), (a)[2]=(uint8_t)((x)>>16), \\ (a)[1]=(uint8_t)((x)>>8), (a)[0]=(uint8_t)(x) #define htole64a(a,x) (a)[7]=(uint8_t)((x)>>56), (a)[6]=(uint8_t)((x)>>48), \\ (a)[5]=(uint8_t)((x)>>40), (a)[4]=(uint8_t)((x)>>32), \\ (a)[3]=(uint8_t)((x)>>24), (a)[2]=(uint8_t)((x)>>16), \\ (a)[1]=(uint8_t)((x)>>8), (a)[0]=(uint8_t)(x) EOF ;; esac ] cat >> "$1" << EOF #endif /*__BYTEORDER_H*/ EOF]) libexif-gtk-0.4.0/m4m/gp-check-library.m4000664 000000 000000 00000030423 12115730414 017762 0ustar00rootroot000000 000000 dnl @synopsis GP_CHECK_LIBRARY([VARNAMEPART],[libname],[VERSION-REQUIREMENT], dnl [headername],[functionname], dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], dnl [OPTIONAL-REQUIRED-ETC],[WHERE-TO-GET-IT]) dnl dnl Checks for the presence of a certain library. dnl dnl Parameters: dnl dnl VARNAMEPART partial variable name for variable definitions dnl libname name of library dnl VERSION-REQUIREMENT check for the version using pkg-config. dnl default: [] dnl headername name of header file dnl default: [] dnl functionname name of function name in library dnl default: [] dnl ACTION-IF-FOUND shell action to execute if found dnl default: [] dnl ACTION-IF-NOT-FOUND shell action to execute if not found dnl default: [] dnl OPTIONAL-REQUIRED-ETC one of "mandatory", "default-on", "default-off" dnl "disable-explicitly" dnl default: [mandatory] dnl WHERE-TO-GET-IT place where to find the library, e.g. a URL dnl default: [] dnl dnl What the ACTION-IFs can do: dnl dnl * change the variable have_[$1] to "yes" or "no" and thus change dnl the outcome of the test dnl * execute additional checks to define more specific variables, e.g. dnl for different API versions dnl dnl What the OPTIONAL-REQUIRED-ETC options mean: dnl dnl mandatory Absolute requirement, cannot be disabled. dnl default-on If found, it is used. If not found, it is not used. dnl default-off In case of --with-libfoo, detect it. Without dnl --with-libfoo, do not look for and use it. dnl disable-explicitly Required by default, but can be disabled by dnl explicitly giving --without-libfoo. dnl dnl These results have happened after calling GP_CHECK_LIBRARY: dnl dnl AM_CONDITIONAL([HAVE_VARPREFIX],[ if found ]) dnl AM_SUBST([have_VARPREFIX], [ "yes" if found, "no" if not found ]) dnl AM_SUBST([VARPREFIX_CFLAGS],[ -I, -D and stuff ]) dnl AM_SUBST([VARPREFIX_LIBS], [ /path/to/libname.la -L/path -lfoo ]) dnl dnl Parameters to ./configure which influence the GP_CHECK_LIBRARY results: dnl dnl * VARNAMEPART_LIBS=/foobar/arm-palmos/lib/libname.la dnl VARNAMEPART_CFLAGS=-I/foobar/include dnl * --without-libfoo dnl * --with-libfoo=/usr/local dnl * --with-libfoo-include-dir=/foobar/include dnl * --with-libfoo-lib=/foobar/arm-palmos/lib dnl * --with-libfoo=autodetect dnl dnl Examples: dnl GP_CHECK_LIBRARY([LIBEXIF], [libexif])dnl dnl GP_CHECK_LIBRARY([LIBEXIF], [libexif-gtk], [>= 0.3.3])dnl dnl note the space! ^ dnl dnl Possible enhancements: dnl dnl * Derive VAR_PREFIX directly from libname dnl This will change the calling conventions, so be aware of that. dnl * Give names of a header file and function name and to a test dnl compilation. dnl AC_DEFUN([_GP_CHECK_LIBRARY_SOEXT],[dnl AC_MSG_CHECKING([for dynamic library extension]) soext="" case "$host" in *linux*) soext=".so" ;; *sunos*) soext=".so" ;; *solaris*) soext=".so" ;; *bsd*) soext=".so" ;; *darwin*) soext=".dylib" ;; *w32*) soext=".dll" ;; esac if test "x$soext" = "x"; then soext=".so" AC_MSG_RESULT([${soext}]) AC_MSG_WARN([ Host system "${host}" not recognized, defaulting to "${soext}". ]) else AC_MSG_RESULT([${soext}]) fi ])dnl dnl AC_DEFUN([_GP_CHECK_LIBRARY],[ # ---------------------------------------------------------------------- # [GP_CHECK_LIBRARY]([$1],[$2],[$3], # [$4],[$5], # [...],[...],[$8]) m4_ifval([$9],[dnl # $9 ])dnl # ---------------------------------------------------------------------- dnl AC_REQUIRE([GP_CONFIG_MSG])dnl AC_REQUIRE([GP_PKG_CONFIG])dnl AC_REQUIRE([_GP_CHECK_LIBRARY_SOEXT])dnl dnl Use _CFLAGS and _LIBS given to configure. dnl This makes it possible to set these vars in a configure script dnl and AC_CONFIG_SUBDIRS this configure. AC_ARG_VAR([$1][_CFLAGS], [CFLAGS for compiling with ][$2])dnl AC_ARG_VAR([$1][_LIBS], [LIBS to add for linking against ][$2])dnl dnl AC_MSG_CHECKING([for ][$2][ to use]) userdef_[$1]=no have_[$1]=no if test "x${[$1][_LIBS]}" = "x" && test "x${[$1][_CFLAGS]}" = "x"; then dnl define --with/--without argument m4_if([$8], [default-off], [m4_pushdef([gp_lib_arg],[--without-][$2])dnl try_[$1]=no ], [m4_pushdef([gp_lib_arg],[--with-][$2])dnl try_[$1]=auto ])dnl AC_ARG_WITH([$2],[AS_HELP_STRING([gp_lib_arg][=PREFIX],[where to find ][$2][, "no" or "auto"])],[try_][$1][="$withval"]) if test "x${[try_][$1]}" = "xauto"; then [try_][$1]=autodetect; fi AC_MSG_RESULT([${try_][$1][}]) m4_popdef([gp_lib_arg])dnl if test "x${[try_][$1]}" = "xautodetect"; then dnl OK, we have to autodetect. dnl We start autodetection with the cleanest known method: pkg-config if test "x${[have_][$1]}" = "xno"; then dnl we need that line break after the PKG_CHECK_MODULES m4_ifval([$3], [PKG_CHECK_MODULES([$1],[$2][ $3],[have_][$1][=yes],[:])], [PKG_CHECK_MODULES([$1],[$2], [have_][$1][=yes],[:])] ) fi dnl If pkg-config didn't find anything, try the libfoo-config program dnl certain known libraries ship with. if test "x${[have_][$1]}" = "xno"; then AC_MSG_WARN([The `$2' library could not be found using pkg-config. No version checks will be performed if it is found using any other method.]) AC_MSG_CHECKING([$2][ config program]) m4_pushdef([gp_lib_config],[m4_if([$2],[libusb],[libusb-config], [$2],[libgphoto2],[gphoto2-config], [$2],[libgphoto2_port],[gphoto2-port-config], [none])])dnl AC_MSG_RESULT([gp_lib_config]) AC_PATH_PROG([$1][_CONFIG_PROG],[gp_lib_config]) if test -n "${[$1][_CONFIG_PROG]}" && test "${[$1][_CONFIG_PROG]}" != "none"; then AC_MSG_CHECKING([for ][$2][ parameters from ][gp_lib_config]) [$1]_LIBS="$(${[$1][_CONFIG_PROG]} --libs || echo "*error*")" [$1]_CFLAGSS="$(${[$1][_CONFIG_PROG]} --cflags || echo "*error*")" if test "x${[$1]_LIBS}" = "*error*" || test "x${[$1]_CFLAGS}" = "*error*"; then AC_MSG_RESULT([error]) else have_[$1]=yes AC_MSG_RESULT([ok]) fi fi m4_popdef([gp_lib_config])dnl fi dnl Neither pkg-config, nor the libfoo-config program have found anything. dnl So let's just probe the system. if test "x${[have_][$1]}" = "xno"; then ifs="$IFS" IFS=":" # FIXME: for W32 and OS/2 we may need ";" here for _libdir_ in \ ${LD_LIBRARY_PATH} \ "${libdir}" \ "${prefix}/lib64" "${prefix}/lib" \ /usr/lib64 /usr/lib \ /usr/local/lib64 /usr/local/lib \ /opt/lib64 /opt/lib do IFS="$ifs" for _soext_ in .la ${soext} .a; do if test -f "${_libdir_}/[$2]${_soext_}" then if test "x${_soext_}" = "x.la" || test "x${_soext_}" = "x.a"; then [$1]_LIBS="${_libdir_}/[$2]${_soext_}" else [$1]_LIBS="-L${_libdir_} -l$(echo "$2" | sed 's/^lib//')" fi break fi done if test "x${[$1][_LIBS]}" != "x"; then break fi done IFS="$ifs" if test "x${[$1][_LIBS]}" != "x"; then have_[$1]=yes fi fi elif test "x${[try_][$1]}" = "xno"; then : else [$1][_LIBS]="-L${[try_][$1]}/lib -l$(echo "$2" | sed 's/^lib//')" [$1][_CFLAGS]="-I${[try_][$1]}/include" fi elif test "x${[$1][_LIBS]}" != "x" && test "x${[$1][_CFLAGS]}" != "x"; then AC_MSG_RESULT([user-defined]) userdef_[$1]=yes have_[$1]=yes else AC_MSG_RESULT([broken call]) AC_MSG_ERROR([ * Fatal: * When calling configure for ${PACKAGE_TARNAME} * ${PACKAGE_NAME} * either set both [$1][_LIBS] *and* [$1][_CFLAGS] * or neither. ]) fi dnl dnl ACTION-IF-FOUND dnl m4_ifval([$6],[dnl if test "x${[have_][$1]}" = "xyes"; then # ACTION-IF-FOUND $6 fi ])dnl dnl dnl ACTION-IF-NOT-FOUND dnl m4_ifval([$7],[dnl if test "x${[have_][$1]}" = "xno"; then # ACTION-IF-NOT-FOUND $7 fi ])dnl dnl dnl Run our own test compilation dnl m4_ifval([$4],[dnl if test "x${[have_][$1]}" = "xyes"; then dnl AC_MSG_CHECKING([whether ][$2][ test compile succeeds]) dnl AC_MSG_RESULT([${[have_][$1]}]) CPPFLAGS_save="$CPPFLAGS" CPPFLAGS="${[$1]_CFLAGS}" AC_CHECK_HEADER([$4],[have_][$1][=yes],[have_][$1][=no]) CPPFLAGS="$CPPFLAGS_save" fi ])dnl dnl dnl Run our own test link dnl Does not work for libraries which be built after configure time, dnl so we deactivate it for them (userdef_). dnl m4_ifval([$5],[dnl if test "x${[userdef_][$1]}" = "xno" && test "x${[have_][$1]}" = "xyes"; then AC_MSG_CHECKING([for function ][$5][ in ][$2]) LIBS_save="$LIBS" LIBS="${[$1]_LIBS}" AC_TRY_LINK_FUNC([$5],[],[have_][$1][=no]) LIBS="$LIBS_save" AC_MSG_RESULT([${[have_][$1]}]) fi ])dnl dnl dnl Abort configure script if mandatory, but not found dnl m4_if([$8],[mandatory],[ if test "x${[have_][$1]}" = "xno"; then AC_MSG_ERROR([ PKG_CONFIG_PATH=${PKG_CONFIG_PATH} [$1][_LIBS]=${[$1][_LIBS]} [$1][_CFLAGS]=${[$1][_CFLAGS]} * Fatal: ${PACKAGE_NAME} requires $2 to build. * * Possible solutions: * - set PKG_CONFIG_PATH to adequate value * - call configure with [$1][_LIBS]=.. and [$1][_CFLAGS]=.. * - call configure with one of the --with-$2 parameters ]m4_ifval([$9],[dnl * - get $2 and install it ],[dnl * - get $2 and install it: $9])) fi ])dnl dnl dnl Abort configure script if not found and not explicitly disabled dnl m4_if([$8],[disable-explicitly],[ if test "x${[try_][$1]}" != "xno" && test "x${[have_][$1]}" = "xno"; then AC_MSG_ERROR([ PKG_CONFIG_PATH=${PKG_CONFIG_PATH} [$1][_LIBS]=${[$1][_LIBS]} [$1][_CFLAGS]=${[$1][_CFLAGS]} * Fatal: ${PACKAGE_NAME} by default requires $2 to build. * You must explicitly disable $2 to build ${PACKAGE_TARNAME} without it. * * Possible solutions: * - call configure with --with-$2=no or --without-$2 * - set PKG_CONFIG_PATH to adequate value * - call configure with [$1][_LIBS]=.. and [$1][_CFLAGS]=.. * - call configure with one of the --with-$2 parameters ]m4_ifval([$9],[dnl * - get $2 and install it ],[dnl * - get $2 and install it: $9])) fi ])dnl AM_CONDITIONAL([HAVE_][$1], [test "x$have_[$1]" = "xyes"]) if test "x$have_[$1]" = "xyes"; then AC_DEFINE([HAVE_][$1], 1, [whether we compile with ][$2][ support]) GP_CONFIG_MSG([$2],[yes])dnl AC_MSG_CHECKING([$2][ library flags]) AC_MSG_RESULT([${[$1][_LIBS]}]) AC_MSG_CHECKING([$2][ cpp flags]) AC_MSG_RESULT([${[$1][_CFLAGS]}]) else GP_CONFIG_MSG([$2],[no])dnl fi dnl AC_SUBST is done implicitly by AC_ARG_VAR above. dnl AC_SUBST([$1][_LIBS]) dnl AC_SUBST([$1][_CFLAGS]) ])dnl dnl dnl #################################################################### dnl AC_DEFUN([_GP_CHECK_LIBRARY_SYNTAX_ERROR],[dnl m4_errprint(__file__:__line__:[ Error: *** Calling $0 macro with old syntax *** Aborting. ])dnl m4_exit(1)dnl ])dnl dnl dnl #################################################################### dnl AC_DEFUN([GP_CHECK_LIBRARY],[dnl m4_if([$4], [mandatory], [_GP_CHECK_LIBRARY_SYNTAX_ERROR($0)], [$4], [default-enabled], [_GP_CHECK_LIBRARY_SYNTAX_ERROR($0)], [$4], [default-disabled], [_GP_CHECK_LIBRARY_SYNTAX_ERROR($0)])dnl m4_if([$8], [], [dnl _GP_CHECK_LIBRARY([$1],[$2],[$3],[$4],[$5],[$6],[$7],[mandatory],[$9])], [$8], [default-on], [dnl _GP_CHECK_LIBRARY([$1],[$2],[$3],[$4],[$5],[$6],[$7],[$8],[$9])], [$8], [disable-explicitly], [dnl _GP_CHECK_LIBRARY([$1],[$2],[$3],[$4],[$5],[$6],[$7],[$8],[$9])], [$8], [default-off], [dnl _GP_CHECK_LIBRARY([$1],[$2],[$3],[$4],[$5],[$6],[$7],[$8],[$9])], [$8], [mandatory], [dnl _GP_CHECK_LIBRARY([$1],[$2],[$3],[$4],[$5],[$6],[$7],[$8],[$9])], [m4_errprint(__file__:__line__:[ Error: Illegal argument 6 to $0: `$6' It must be one of "default-on", "default-off", "mandatory". ])m4_exit(1)])dnl ])dnl dnl m4_pattern_disallow([GP_CHECK_LIBRARY]) m4_pattern_disallow([_GP_CHECK_LIBRARY]) m4_pattern_disallow([_GP_CHECK_LIBRARY_SYNTAX_ERROR]) m4_pattern_disallow([_GP_CHECK_LIBRARY_SOEXT]) dnl dnl #################################################################### dnl dnl Please do not remove this: dnl filetype: 6e60b4f0-acb2-4cd5-8258-42014f92bd2c dnl I use this to find all the different instances of this file which dnl are supposed to be synchronized. dnl dnl Local Variables: dnl mode: autoconf dnl End: libexif-gtk-0.4.0/m4m/gp-check-popt.m4000664 000000 000000 00000011270 12115730414 017277 0ustar00rootroot000000 000000 dnl @synopsis GP_CHECK_POPT(FLAG) dnl dnl Check whether libpopt is available. dnl FLAG must be one of dnl "mandatory" dnl "default-enabled" dnl "default-disabled" dnl AC_DEFUN([GP_CHECK_POPT],[ # # [GP_CHECK_POPT] # AC_REQUIRE([GP_CONFIG_MSG])dnl m4_if([$1],[mandatory], [_GP_CHECK_POPT([mandatory])], [$1],[default-enabled], [_GP_CHECK_POPT([disable])], [$1],[default-disabled], [_GP_CHECK_POPT([enable])], [m4_errprint(__file__:__line__:[ Error: Illegal argument to $0: `$1' Valid values are: mandatory, default-enabled, default-disabled ])m4_exit(1)])dnl ])dnl dnl AC_DEFUN([_GP_CHECK_POPT],[ m4_if([$1],[mandatory],[ try_popt=yes require_popt=yes ],[ try_popt=auto require_popt=no AC_ARG_ENABLE([popt], [AS_HELP_STRING([--$1-popt],[Do not use popt])], [ if test "x$withval" = no \ || test "x$withval" = off \ || test "x$withval" = false; then try_popt=no require_popt=no elif test "x$withval" = yes \ || test "x$withval" = on \ || test "x$withval" = true then try_popt=yes require_popt=yes fi ])dnl ])dnl AC_MSG_CHECKING([whether popt is required]) AC_MSG_RESULT([${require_popt}]) if test "$require_popt" != yes; then AC_MSG_CHECKING([whether popt is requested]) AC_MSG_RESULT([${try_popt}]) fi dnl Implicit AC_SUBST AC_ARG_VAR([POPT_CFLAGS],[CPPFLAGS to compile with libpopt])dnl AC_ARG_VAR([POPT_LIBS],[LDFLAGS to link with libpopt])dnl have_popt=no if test "x$POPT_CFLAGS" = "x" && test "x$POPT_LIBS" = "x"; then # try to find options to compile popt.h CPPFLAGS_save="$CPPFLAGS" popth_found=no for popt_prefix in "" /usr /usr/local do if test -n "${popt_prefix}"; then : elif test -d "${popt_prefix}/include"; then CPPFLAGS="-I${popt_prefix}/include ${CPPFLAGS}" else continue fi ac_cv_header_popt_h="" unset ac_cv_header_popt_h AC_CHECK_HEADER([popt.h], [popth_found=yes]) if test "$popth_found" = yes; then break; fi done CPPFLAGS="$CPPFLAGS_save" if test "$popth_found" = "yes"; then if test "$popt_prefix" = ""; then POPT_CFLAGS="" else POPT_CFLAGS="-I${popt_prefix}/include" fi else AC_MSG_ERROR([ * Cannot autodetect popt.h * * Set POPT_CFLAGS and POPT_LIBS correctly. ]) fi # try to find options to link against popt LDFLAGS_save="$LDFLAGS" popt_links=no for popt_prefix in /usr "" /usr/local; do # We could have "/usr" and "lib64" at the beginning of the # lists. Then the first tested location would # incidentally be the right one on 64bit systems, and # thus work around a bug in libtool on 32bit systems: # # 32bit libtool doesn't know about 64bit systems, and so the # compilation will fail when linking a 32bit library from # /usr/lib to a 64bit binary. # # This hack has been confirmed to workwith a # 32bit Debian Sarge and 64bit Fedora Core 3 system. for ldir in lib64 "" lib; do popt_libdir="${popt_prefix}/${ldir}" if test "${popt_libdir}" = "/"; then popt_libdir="" elif test -d "${popt_libdir}"; then LDFLAGS="-L${popt_libdir} ${LDFLAGS}" else continue fi # Avoid caching of results ac_cv_lib_popt_poptStuffArgs="" unset ac_cv_lib_popt_poptStuffArgs AC_CHECK_LIB([popt], [poptStuffArgs], [popt_links=yes]) if test "$popt_links" = yes; then break; fi done if test "$popt_links" = yes; then break; fi done LDFLAGS="$LDFLAGS_save" if test "$popt_links" = "yes"; then if test "$popt_libdir" = ""; then POPT_LIBS="-lpopt" else POPT_LIBS="-L${popt_libdir} -lpopt" fi else AC_MSG_ERROR([ * Cannot autodetect library directory containing popt * * Set POPT_CFLAGS and POPT_LIBS correctly. ]) fi have_popt=yes elif test "x$POPT_CFLAGS" != "x" && test "x$POPT_LIBS" != "x"; then # just use the user specivied option popt_msg="yes (user specified)" have_popt=yes else AC_MSG_ERROR([ * Fatal: Either set both POPT_CFLAGS and POPT_LIBS or neither. ]) fi AC_MSG_CHECKING([if popt is functional]) if test "$require_popt$have_popt" = "yesno"; then AC_MSG_RESULT([no, but required]) AC_MSG_ERROR([ * popt library not found * Fatal: ${PACKAGE_NAME} (${PACKAGE_TARNAME}) requires popt * Please install it and/or set POPT_CFLAGS and POPT_LIBS. ]) fi AC_MSG_RESULT([${have_popt}]) GP_CONFIG_MSG([use popt library], [${have_popt}]) if test "$have_popt" = "yes"; then AC_DEFINE([HAVE_POPT],[1],[whether the popt library is available]) GP_CONFIG_MSG([popt libs],[${POPT_LIBS}]) GP_CONFIG_MSG([popt cppflags],[${POPT_CFLAGS}]) fi AM_CONDITIONAL([HAVE_POPT],[test "$have_popt" = "yes"]) ])dnl dnl dnl Please do not remove this: dnl filetype: 7595380e-eff3-49e5-90ab-e40f1d544639 dnl I use this to find all the different instances of this file which dnl are supposed to be synchronized. dnl dnl Local Variables: dnl mode: autoconf dnl End: libexif-gtk-0.4.0/m4m/gp-check-shell-environment.m4000664 000000 000000 00000002204 12115730414 021763 0ustar00rootroot000000 000000 dnl @synopsis GP_CHECK_SHELL_ENVIRONMENT([SHOW-LOCALE-VARS]) dnl dnl Check that the shell environment is sane. dnl dnl If SHOW-LOCALE-VARS is set to [true], print all LC_* and LANG* dnl variables at configure time. (WARNING: This is not portable!) dnl dnl AC_DEFUN([GP_CHECK_SHELL_ENVIRONMENT], [ # make sure "cd" doesn't print anything on stdout if test x"${CDPATH+set}" = xset then CDPATH=: export CDPATH fi # make sure $() command substitution works AC_MSG_CHECKING([for POSIX sh \$() command substitution]) if test "x$(pwd)" = "x`pwd`" && test "y$(echo "foobar")" = "y`echo foobar`" # '''' then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) uname=`uname 2>&1` # '' uname_a=`uname -a 2>&1` # '' AC_MSG_ERROR([ * POSIX sh \$() command substition does not work with this shell. * * You are running a very rare species of shell. Please report this * sighting to <${PACKAGE_BUGREPORT}>: * SHELL=${SHELL} * uname=${uname} * uname-a=${uname_a} * Please also include your OS and version. * * Run this configure script using a better (i.e. POSIX compliant) shell. ]) fi dnl m4_if([$1],[true],[dnl printenv | grep -E '^(LC_|LANG)' ])dnl dnl ])dnl dnl libexif-gtk-0.4.0/m4m/gp-config-msg.m4000664 000000 000000 00000005234 12115730414 017276 0ustar00rootroot000000 000000 dnl dnl GP_CONFIG_INIT dnl use default LHS width (called implicitly if not called explicitly) dnl GP_CONFIG_INIT([WIDTH-OF-LHS]) dnl explicitly set the LHS width to the given value dnl dnl GP_CONFIG_MSG dnl empty output line dnl GP_CONFIG_MSG([LHS],[RHS]) dnl formatted output line "LHS: RHS" dnl dnl GP_CONFIG_OUTPUT dnl print all the output messages we collected in the mean time dnl dnl Simple way to print a configuration summary at the end of ./configure. dnl dnl Example usage: dnl dnl GP_CONFIG_INIT dnl GP_CONFIG_MSG([Source code location],[${srcdir}]) dnl GP_CONFIG_MSG([Compiler],[${CC}]) dnl GP_CONFIG_MSG dnl GP_CONFIG_MSG([Feature foo],[${foo}]) dnl GP_CONFIG_MSG([Location of bar],[${bar}]) dnl [...] dnl AC_OUTPUT dnl GP_CONFIG_OUTPUT dnl dnl AC_DEFUN([GP_CONFIG_INIT], [dnl AC_REQUIRE([GP_CHECK_SHELL_ENVIRONMENT]) dnl the empty string must contain at least as many spaces as the substr length dnl FIXME: let m4 determine that length dnl (collect left parts in array and choose largest length) m4_if([$1],[],[gp_config_len="30"],[gp_config_len="$1"]) gp_config_empty="" gp_config_len3="$(expr "$gp_config_len" - 3)" n="$gp_config_len" while test "$n" -gt 0; do gp_config_empty="${gp_config_empty} " n="$(expr "$n" - 1)" done gp_config_msg=" Configuration (${PACKAGE_TARNAME} ${PACKAGE_VERSION}): " ])dnl dnl dnl AC_DEFUN([GP_CONFIG_MSG], [AC_REQUIRE([GP_CONFIG_INIT])dnl m4_if([$1],[],[ gp_config_msg="${gp_config_msg} " ],[$2],[],[ gp_config_msg="${gp_config_msg} [$1] " ],[ gp_config_msg_len="$(expr "[$1]" : '.*')" if test "$gp_config_msg_len" -ge "$gp_config_len"; then gp_config_msg_lhs="$(expr "[$1]" : "\(.\{0,${gp_config_len3}\}\)")..:" else gp_config_msg_lhs="$(expr "[$1]:${gp_config_empty}" : "\(.\{0,${gp_config_len}\}\)")" fi gp_config_msg="${gp_config_msg} ${gp_config_msg_lhs} [$2] " ])])dnl dnl AC_DEFUN([GP_CONFIG_MSG_SUBDIRS],[dnl # Message about configured subprojects if test "x$subdirs" != "x"; then GP_CONFIG_MSG()dnl _subdirs="" for sd in $subdirs; do ssd="$(basename "$sd")" if test "x$_subdirs" = "x"; then _subdirs="$ssd"; else _subdirs="$_subdirs $ssd" fi done GP_CONFIG_MSG([Subprojects],[${_subdirs}])dnl fi ])dnl dnl AC_DEFUN([GP_CONFIG_OUTPUT], [AC_REQUIRE([GP_CONFIG_INIT])dnl AC_REQUIRE([GP_CONFIG_MSG])dnl AC_REQUIRE([GP_CONFIG_MSG_SUBDIRS])dnl echo "${gp_config_msg} You may run \"make\" and \"make install\" now." ])dnl dnl dnl Please do not remove this: dnl filetype: de774af3-dc3b-4b1d-b6f2-4aca35d3da16 dnl I use this to find all the different instances of this file which dnl are supposed to be synchronized. dnl dnl Local Variables: dnl mode: autoconf dnl End: libexif-gtk-0.4.0/m4m/gp-documentation.m4000664 000000 000000 00000010445 12115730414 020116 0ustar00rootroot000000 000000 dnl dnl check where to install documentation dnl dnl determines documentation "root directory", i.e. the directory dnl where all documentation will be placed in dnl AC_DEFUN([GP_DOC_GENERAL],[dnl AC_MSG_CHECKING([whether to build any docs]) AC_ARG_ENABLE([docs], [dnl AS_HELP_STRING([--disable-docs], [whether to create any documentation])], [dnl case "$enableval" in yes|true|on) gp_build_docs="yes" ;; *) gp_build_docs="no" ;; esac ],[dnl gp_build_docs="yes" ])dnl AC_MSG_RESULT([${gp_build_docs}]) AM_CONDITIONAL([BUILD_DOCS], [test "x${gp_build_docs}" = "xyes"]) ])dnl AC_DEFUN([GP_CHECK_DOC_DIR], [ AC_REQUIRE([GP_DOC_GENERAL])dnl AC_BEFORE([$0], [GP_BUILD_GTK_DOCS])dnl AC_BEFORE([$0], [GP_CHECK_DOXYGEN])dnl AC_ARG_WITH([doc-dir], [AS_HELP_STRING([--with-doc-dir=PATH], [Where to install docs [default=autodetect]])]) # check for the main ("root") documentation directory AC_MSG_CHECKING([main docdir]) if test "x${with_doc_dir}" != "x" then # docdir is given as parameter docdir="${with_doc_dir}" AC_MSG_RESULT([${docdir} (from parameter)]) else # otherwise invent a docdir hopefully compatible with system policy if test -d "/usr/share/doc" then maindocdir='${prefix}/share/doc' AC_MSG_RESULT([${maindocdir} (FHS style)]) elif test -d "/usr/doc" then maindocdir='${prefix}/doc' AC_MSG_RESULT([${maindocdir} (old style)]) else maindocdir='${datadir}/doc' AC_MSG_RESULT([${maindocdir} (default value)]) fi AC_MSG_CHECKING([package docdir]) # check whether to include package version into documentation path # FIXME: doesn't work properly. if ls -d /usr/{share/,}doc/make-[0-9]* > /dev/null 2>&1 then docdir="${maindocdir}/${PACKAGE}-${VERSION}" AC_MSG_RESULT([${docdir} (redhat style)]) else docdir="${maindocdir}/${PACKAGE}" AC_MSG_RESULT([${docdir} (default style)]) fi fi AC_SUBST([docdir]) ])dnl dnl dnl check whether to build docs and where to: dnl dnl * determine presence of prerequisites (only gtk-doc for now) dnl * determine destination directory for HTML files dnl AC_DEFUN([GP_BUILD_GTK_DOCS], [ # docdir has to be determined in advance AC_REQUIRE([GP_CHECK_DOC_DIR]) # --------------------------------------------------------------------------- # gtk-doc: We use gtk-doc for building our documentation. However, we # require the user to explicitely request the build. # --------------------------------------------------------------------------- try_gtkdoc=false gtkdoc_msg="no (not requested)" have_gtkdoc=false AC_ARG_ENABLE([docs], [AS_HELP_STRING([--enable-docs], [Use gtk-doc to build documentation [default=no]])],[ if test x$enableval = xyes; then try_gtkdoc=true fi ]) if $try_gtkdoc; then AC_PATH_PROG([GTKDOC],[gtkdoc-mkdb]) if test -n "${GTKDOC}"; then have_gtkdoc=true gtkdoc_msg="yes" else gtkdoc_msg="no (http://www.gtk.org/rdp/download.html)" fi fi AM_CONDITIONAL([ENABLE_GTK_DOC], [$have_gtkdoc]) GP_CONFIG_MSG([build API docs with gtk-doc],[$gtkdoc_msg]) # --------------------------------------------------------------------------- # Give the user the possibility to install html documentation in a # user-defined location. # --------------------------------------------------------------------------- AC_ARG_WITH([html-dir], [AS_HELP_STRING([--with-html-dir=PATH], [Where to install html docs [default=autodetect]])]) AC_MSG_CHECKING([for html dir]) if test "x${with_html_dir}" = "x" ; then htmldir="${docdir}/html" AC_MSG_RESULT([${htmldir} (default)]) else htmldir="${with_html_dir}" AC_MSG_RESULT([${htmldir} (from parameter)]) fi AC_SUBST([htmldir]) apidocdir="${htmldir}/api" AC_SUBST([apidocdir}]) ])dnl dnl doxygen related stuff dnl look for tools dnl define substitutions for Doxyfile.in AC_DEFUN([GP_CHECK_DOXYGEN],[dnl AC_REQUIRE([GP_CHECK_DOC_DIR])dnl AC_PATH_PROG([DOT], [dot], [false]) AC_PATH_PROG([DOXYGEN], [doxygen], [false]) AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$DOXYGEN" != "xfalse"]) AM_CONDITIONAL([HAVE_DOT], [test "x$DOT" != "xfalse"]) if test "x$DOT" != "xfalse"; then AC_SUBST([HAVE_DOT],[YES]) else AC_SUBST([HAVE_DOT],[NO]) fi AC_SUBST([HTML_APIDOC_DIR], ["${PACKAGE_TARNAME}-api.html"]) AC_SUBST([DOXYGEN_OUTPUT_DIR], [doxygen-output]) AC_SUBST([HTML_APIDOC_INTERNALS_DIR], ["${PACKAGE_TARNAME}-internals.html"]) ])dnl libexif-gtk-0.4.0/m4m/gp-gettext-hack.m4000664 000000 000000 00000005223 12115730414 017633 0ustar00rootroot000000 000000 dnl dnl GP_GETTEXT_HACK dnl dnl gettext hack, originally designed for libexif, libgphoto2, and Co. dnl This creates a po/Makevars file with adequate values if the dnl po/Makevars.template is present. dnl dnl Example usage: dnl GP_GETTEXT_HACK([${PACKAGE_TARNAME}-${LIBFOO_CURRENT}], dnl [Copyright Holder], dnl [foo-translation@example.org]) dnl ALL_LINGUAS="de es fr" dnl AM_GNU_GETTEXT_VERSION([0.14.1]) dnl AM_GNU_GETTEXT([external]) dnl AM_PO_SUBDIRS() dnl AM_ICONV() dnl GP_GETTEXT_FLAGS dnl dnl You can leave out the GP_GETTEXT_HACK parameters if you want to, dnl GP_GETTEXT_HACK will try fall back to sensible values in that case: dnl AC_DEFUN([GP_GETTEXT_HACK], [ AC_BEFORE([$0], [AM_GNU_GETTEXT])dnl AC_BEFORE([$0], [AM_GNU_GETTEXT_VERSION])dnl m4_if([$1],[],[GETTEXT_PACKAGE="${PACKAGE_TARNAME}"],[GETTEXT_PACKAGE="$1"]) # The gettext domain we're using AM_CPPFLAGS="$AM_CPPFLAGS -DGETTEXT_PACKAGE=\\\"${GETTEXT_PACKAGE}\\\"" AC_SUBST([GETTEXT_PACKAGE]) sed_cmds="s|^DOMAIN.*|DOMAIN = ${GETTEXT_PACKAGE}|" m4_if([$2],[],[],[sed_cmds="${sed_cmds};s|^COPYRIGHT_HOLDER.*|COPYRIGHT_HOLDER = $2|"]) m4_ifval([$3],[ sed_mb="$3" ],[ if test -n "$PACKAGE_BUGREPORT"; then sed_mb="${PACKAGE_BUGREPORT}" else AC_MSG_ERROR([ *** Your configure.{ac,in} is wrong. *** Either define PACKAGE_BUGREPORT (by using the 4-parameter AC INIT syntax) *** or give [GP_GETTEXT_HACK] the third parameter. *** ]) fi ]) sed_cmds="${sed_cmds};s|^MSGID_BUGS_ADDRESS.*|MSGID_BUGS_ADDRESS = ${sed_mb}|" # Not so sure whether this hack is all *that* evil... AC_MSG_CHECKING([for po/Makevars requiring hack]) if test -f "${srcdir}/po/Makevars.template"; then sed "$sed_cmds" < "${srcdir}/po/Makevars.template" > "${srcdir}/po/Makevars" AC_MSG_RESULT([yes, done.]) else AC_MSG_RESULT([no]) fi ]) AC_DEFUN([GP_GETTEXT_FLAGS], [ AC_REQUIRE([AM_GNU_GETTEXT]) AC_REQUIRE([GP_CONFIG_INIT]) if test "x${BUILD_INCLUDED_LIBINTL}" = "xyes"; then AM_CFLAGS="${AM_CFLAGS} -I\$(top_srcdir)/intl" fi GP_CONFIG_MSG([Use translations],[${USE_NLS}]) if test "x$USE_NLS" = "xyes" && test "${BUILD_INCLUDED_LIBINTL}"; then GP_CONFIG_MSG([Use included libintl],[${BUILD_INCLUDED_LIBINTL}]) fi dnl We cannot use AC_DEFINE_UNQUOTED() for these definitions, as dnl we require make to do insert the proper $(datadir) value AC_SUBST([localedir], ['$(datadir)/locale']) AM_CPPFLAGS="$AM_CPPFLAGS -DLOCALEDIR=\\\"${localedir}\\\"" ]) dnl Please do not remove this: dnl filetype: 71ff3941-a5ae-4677-a369-d7cb01f92c81 dnl I use this to find all the different instances of this file which dnl are supposed to be synchronized. dnl Local Variables: dnl mode: autoconf dnl End: libexif-gtk-0.4.0/m4m/gp-packaging.m4000664 000000 000000 00000004236 12115730414 017172 0ustar00rootroot000000 000000 AC_DEFUN([GPKG_CHECK_RPM], [ AC_ARG_WITH([rpmbuild], [AS_HELP_STRING([--with-rpmbuild=PATH], [Program to use for building RPMs])]) if test -x "${with_rpmbuild}" then RPMBUILD="${with_rpmbuild}" AC_MSG_CHECKING([for rpmbuild or rpm]) AC_MSG_RESULT([${RPMBUILD} (from parameter)]) else AC_MSG_RESULT([using autodetection]) AC_CHECK_PROGS(RPMBUILD, [rpmbuild rpm], false) AC_MSG_CHECKING([for rpmbuild or rpm]) AC_MSG_RESULT([${RPMBUILD} (autodetected)]) fi AC_SUBST([RPMBUILD]) AM_CONDITIONAL([ENABLE_RPM], [test "$RPMBUILD" != "false"]) # whether libusb-devel is installed or not defines whether the RPM # packages we're going to build will depend on libusb and libusb-devel # RPM packages or not. AM_CONDITIONAL([RPM_LIBUSB_DEVEL], [rpm -q libusb-devel > /dev/null 2>&1]) ]) AC_DEFUN([GPKG_CHECK_LINUX], [ # effective_target has to be determined in advance AC_REQUIRE([AC_NEED_BYTEORDER_H]) is_linux=false case "$effective_target" in *linux*) is_linux=true ;; esac AM_CONDITIONAL([HAVE_LINUX], ["$is_linux"]) # required for docdir # FIXME: Implicit dependency # AC_REQUIRE(GP_CHECK_DOC_DIR) AC_ARG_WITH([hotplug-doc-dir], [AS_HELP_STRING([--with-hotplug-doc-dir=PATH], [Where to install hotplug scripts as docs [default=autodetect]])]) AC_MSG_CHECKING([for hotplug doc dir]) if test "x${with_hotplug_doc_dir}" != "x" then # given as parameter hotplugdocdir="${with_hotplug_doc_dir}" AC_MSG_RESULT([${hotplugdocdir} (from parameter)]) else # start at docdir hotplugdocdir="${docdir}/linux-hotplug" AC_MSG_RESULT([${hotplugdocdir} (default)]) fi AC_SUBST([hotplugdocdir]) AC_ARG_WITH([hotplug-usermap-dir], [AS_HELP_STRING([--with-hotplug-usermap-dir=PATH], [Where to install hotplug scripts as docs [default=autodetect]])]) AC_MSG_CHECKING([for hotplug usermap dir]) if test "x${with_hotplug_usermap_dir}" != "x" then # given as parameter hotplugusermapdir="${with_hotplug_usermap_dir}" AC_MSG_RESULT([${hotplugusermapdir} (from parameter)]) else # start at docdir hotplugusermapdir="${docdir}/linux-hotplug" AC_MSG_RESULT([${hotplugusermapdir} (default)]) fi AC_SUBST([hotplugusermapdir]) ]) libexif-gtk-0.4.0/m4m/gp-pkg-config.m4000664 000000 000000 00000002204 12115730414 017263 0ustar00rootroot000000 000000 dnl @synopsis GP_PKG_CONFIG dnl dnl If you want to set the PKG_CONFIG_PATH, best do so before dnl calling GP_PKG_CONFIG AC_DEFUN([GP_PKG_CONFIG],[ # # [GP_PKG_CONFIG] # AC_ARG_VAR([PKG_CONFIG],[pkg-config package config utility]) export PKG_CONFIG AC_ARG_VAR([PKG_CONFIG_PATH],[directory where pkg-config looks for *.pc files]) export PKG_CONFIG_PATH AC_MSG_CHECKING([PKG_CONFIG_PATH]) if test "x${PKG_CONFIG_PATH}" = "x"; then AC_MSG_RESULT([empty]) else AC_MSG_RESULT([${PKG_CONFIG_PATH}]) fi dnl AC_REQUIRE([PKG_CHECK_MODULES]) AC_PATH_PROG([PKG_CONFIG],[pkg-config],[false]) if test "$PKG_CONFIG" = "false"; then AC_MSG_ERROR([ *** Build requires pkg-config *** *** Possible solutions: *** - set PKG_CONFIG to where your pkg-config is located *** - set PATH to include the directory where pkg-config is installed *** - get it from http://freedesktop.org/software/pkgconfig/ and install it ]) fi ])dnl dnl Please do not remove this: dnl filetype: d87b877b-80ec-447c-b042-21ec4a27c6f0 dnl I use this to find all the different instances of this file which dnl are supposed to be synchronized. dnl Local Variables: dnl mode: autoconf dnl End: libexif-gtk-0.4.0/m4m/gp-references.m4000664 000000 000000 00000002136 12115730414 017364 0ustar00rootroot000000 000000 dnl dnl Define external references dnl dnl Define once, use many times. dnl No more URLs and Mail addresses in translated strings and stuff. dnl AC_DEFUN([GP_REF],[ AC_SUBST([$1],["$2"]) AC_DEFINE_UNQUOTED([$1],["$2"],[$3]) ]) AC_DEFUN([GP_REFERENCES], [ GP_REF( [URL_GPHOTO_HOME], [http://www.gphoto.org/], [gphoto project home page])dnl GP_REF( [URL_GPHOTO_PROJECT], [http://sourceforge.net/projects/gphoto], [gphoto sourceforge project page]) GP_REF( [URL_DIGICAM_LIST], [http://www.teaser.fr/~hfiguiere/linux/digicam.html], [camera list with support status]) GP_REF( [URL_JPHOTO_HOME], [http://jphoto.sourceforge.net/], [jphoto home page]) GP_REF( [URL_USB_MASSSTORAGE], [http://www.linux-usb.org/USB-guide/x498.html], [information about using USB mass storage]) GP_REF( [MAIL_GPHOTO_DEVEL], [], [gphoto development mailing list]) GP_REF( [MAIL_GPHOTO_USER], [], [gphoto user mailing list]) GP_REF( [MAIL_GPHOTO_TRANSLATION], [], [gphoto translation mailing list]) ]) libexif-gtk-0.4.0/m4m/stdint.m4000664 000000 000000 00000057061 12115730414 016153 0ustar00rootroot000000 000000 dnl AC_NEED_STDINT_H ( HEADER-TO-GENERATE ) dnl Copyright 2001-2002 by Dan Fandrich dnl This file may be copied and used freely without restrictions. No warranty dnl is expressed or implied. dnl dnl Look for a header file that defines size-specific integer types like the dnl ones recommended to be in stdint.h in the C99 standard (e.g. uint32_t). dnl This is a dumbed-down version of the macro of the same name in the file dnl ac_need_stdint_h.m4 which is part of the ac-archive, available at dnl (also, another macro dnl AC_CREATE_STDINT_H by the same author). This version is not as smart, dnl but works on older autoconf versions and has a different license. dnl AX_CHECK_DEFINED_TYPE ( TYPE, FILE, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND ) dnl This is similar to _AC_CHECK_TYPE_NEW (a.k.a. new syntax version of dnl AC_CHECK_TYPE) in autoconf 2.50 but works on older versions AC_DEFUN([AX_CHECK_DEFINED_TYPE], [AC_MSG_CHECKING([for $1 in $2]) AC_EGREP_CPP(changequote(<<,>>)dnl <<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl changequote([,]), [#include <$2>], ac_cv_type_$1=yes, ac_cv_type_$1=no)dnl AC_MSG_RESULT($ac_cv_type_$1) if test $ac_cv_type_$1 = yes; then $3 else $4 fi ]) dnl Look for a header file that defines size-specific integer types AC_DEFUN([AX_NEED_STDINT_H], [ changequote(, )dnl ac_dir=`echo "$1"|sed 's%/[^/][^/]*$%%'` changequote([, ])dnl if test "$ac_dir" != "$1" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" fi AX_CHECK_DEFINED_TYPE(uint8_t, stdint.h, [ cat > "$1" < EOF], [AX_CHECK_DEFINED_TYPE(uint8_t, inttypes.h, [cat > "$1" < EOF], [AX_CHECK_DEFINED_TYPE(uint8_t, sys/types.h, [cat > "$1" < EOF], [AX_CHECK_DEFINED_TYPE(u_int8_t, sys/types.h, [cat > "$1" < typedef u_int8_t uint8_t; typedef u_int16_t uint16_t; typedef u_int32_t uint32_t; EOF AX_CHECK_DEFINED_TYPE(u_int64_t, sys/types.h, [cat >> "$1" <> "$1" <]) AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) m4_ifvaln([$1],[$1]) break done AC_MSG_CHECKING([for stdint uintptr_t]) ]) ]) AC_DEFUN([AX_CHECK_HEADER_STDINT_O],[ AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[ ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h) AC_MSG_RESULT([(..)]) for i in m4_ifval([$1],[$1],[inttypes.h sys/inttypes.h stdint.h]) ; do unset ac_cv_type_uint32_t unset ac_cv_type_uint64_t AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],continue,[#include <$i>]) AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) m4_ifvaln([$1],[$1]) break break; done AC_MSG_CHECKING([for stdint uint32_t]) ]) ]) AC_DEFUN([AX_CHECK_HEADER_STDINT_U],[ AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[ ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h) AC_MSG_RESULT([(..)]) for i in m4_ifval([$1],[$1],[sys/types.h inttypes.h sys/inttypes.h]) ; do unset ac_cv_type_u_int32_t unset ac_cv_type_u_int64_t AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],continue,[#include <$i>]) AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>]) m4_ifvaln([$1],[$1]) break break; done AC_MSG_CHECKING([for stdint u_int32_t]) ]) ]) AC_DEFUN([AX_CREATE_STDINT_H], [# ------ AX CREATE STDINT H ------------------------------------- AC_MSG_CHECKING([for stdint types]) ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)` # try to shortcircuit - if the default include path of the compiler # can find a "stdint.h" header then we assume that all compilers can. AC_CACHE_VAL([ac_cv_header_stdint_t],[ old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS="" old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="" old_CFLAGS="$CFLAGS" ; CFLAGS="" AC_TRY_COMPILE([#include ],[int_least32_t v = 0;], [ac_cv_stdint_result="(assuming C99 compatible system)" ac_cv_header_stdint_t="stdint.h"; ], [ac_cv_header_stdint_t=""]) CXXFLAGS="$old_CXXFLAGS" CPPFLAGS="$old_CPPFLAGS" CFLAGS="$old_CFLAGS" ]) v="... $ac_cv_header_stdint_h" if test "$ac_stdint_h" = "stdint.h" ; then AC_MSG_RESULT([(are you sure you want them in ./stdint.h?)]) elif test "$ac_stdint_h" = "inttypes.h" ; then AC_MSG_RESULT([(are you sure you want them in ./inttypes.h?)]) elif test "_$ac_cv_header_stdint_t" = "_" ; then AC_MSG_RESULT([(putting them into $ac_stdint_h)$v]) else ac_cv_header_stdint="$ac_cv_header_stdint_t" AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)]) fi if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit.. dnl .....intro message done, now do a few system checks..... dnl btw, all old CHECK_TYPE macros do automatically "DEFINE" a type, dnl therefore we use the autoconf implementation detail CHECK_TYPE_NEW dnl instead that is triggered with 3 or more arguments (see types.m4) inttype_headers=`echo $2 | sed -e 's/,/ /g'` ac_cv_stdint_result="(no helpful system typedefs seen)" AX_CHECK_HEADER_STDINT_X(dnl stdint.h inttypes.h sys/inttypes.h $inttype_headers, ac_cv_stdint_result="(seen uintptr_t$and64 in $i)") if test "_$ac_cv_header_stdint_x" = "_" ; then AX_CHECK_HEADER_STDINT_O(dnl, inttypes.h sys/inttypes.h stdint.h $inttype_headers, ac_cv_stdint_result="(seen uint32_t$and64 in $i)") fi if test "_$ac_cv_header_stdint_x" = "_" ; then if test "_$ac_cv_header_stdint_o" = "_" ; then AX_CHECK_HEADER_STDINT_U(dnl, sys/types.h inttypes.h sys/inttypes.h $inttype_headers, ac_cv_stdint_result="(seen u_int32_t$and64 in $i)") fi fi dnl if there was no good C99 header file, do some typedef checks... if test "_$ac_cv_header_stdint_x" = "_" ; then AC_MSG_CHECKING([for stdint datatype model]) AC_MSG_RESULT([(..)]) AX_CHECK_DATA_MODEL fi if test "_$ac_cv_header_stdint_x" != "_" ; then ac_cv_header_stdint="$ac_cv_header_stdint_x" elif test "_$ac_cv_header_stdint_o" != "_" ; then ac_cv_header_stdint="$ac_cv_header_stdint_o" elif test "_$ac_cv_header_stdint_u" != "_" ; then ac_cv_header_stdint="$ac_cv_header_stdint_u" else ac_cv_header_stdint="stddef.h" fi AC_MSG_CHECKING([for extra inttypes in chosen header]) AC_MSG_RESULT([($ac_cv_header_stdint)]) dnl see if int_least and int_fast types are present in _this_ header. unset ac_cv_type_int_least32_t unset ac_cv_type_int_fast32_t AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>]) AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>]) AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>]) fi # shortcircut to system "stdint.h" # ------------------ PREPARE VARIABLES ------------------------------ if test "$GCC" = "yes" ; then ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1` else ac_cv_stdint_message="using $CC" fi AC_MSG_RESULT([make use of $ac_cv_header_stdint in $ac_stdint_h dnl $ac_cv_stdint_result]) dnl ----------------------------------------------------------------- # ----------------- DONE inttypes.h checks START header ------------- AC_CONFIG_COMMANDS([$ac_stdint_h],[ AC_MSG_NOTICE(creating $ac_stdint_h : $_ac_stdint_h) ac_stdint=$tmp/_stdint.h echo "#ifndef" $_ac_stdint_h >$ac_stdint echo "#define" $_ac_stdint_h "1" >>$ac_stdint echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint if test "_$ac_cv_header_stdint_t" != "_" ; then echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint echo "#include " >>$ac_stdint echo "#endif" >>$ac_stdint echo "#endif" >>$ac_stdint else cat >>$ac_stdint < #else #include /* .................... configured part ............................ */ STDINT_EOF echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint if test "_$ac_cv_header_stdint_x" != "_" ; then ac_header="$ac_cv_header_stdint_x" echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint else echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint fi echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint if test "_$ac_cv_header_stdint_o" != "_" ; then ac_header="$ac_cv_header_stdint_o" echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint else echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint fi echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint if test "_$ac_cv_header_stdint_u" != "_" ; then ac_header="$ac_cv_header_stdint_u" echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint else echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint fi echo "" >>$ac_stdint if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then echo "#include <$ac_header>" >>$ac_stdint echo "" >>$ac_stdint fi fi echo "/* which 64bit typedef has been found */" >>$ac_stdint if test "$ac_cv_type_uint64_t" = "yes" ; then echo "#define _STDINT_HAVE_UINT64_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint fi if test "$ac_cv_type_u_int64_t" = "yes" ; then echo "#define _STDINT_HAVE_U_INT64_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint fi echo "" >>$ac_stdint echo "/* which type model has been detected */" >>$ac_stdint if test "_$ac_cv_char_data_model" != "_" ; then echo "#define _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint echo "#define _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint else echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint fi echo "" >>$ac_stdint echo "/* whether int_least types were detected */" >>$ac_stdint if test "$ac_cv_type_int_least32_t" = "yes"; then echo "#define _STDINT_HAVE_INT_LEAST32_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint fi echo "/* whether int_fast types were detected */" >>$ac_stdint if test "$ac_cv_type_int_fast32_t" = "yes"; then echo "#define _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint fi echo "/* whether intmax_t type was detected */" >>$ac_stdint if test "$ac_cv_type_intmax_t" = "yes"; then echo "#define _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint fi echo "" >>$ac_stdint cat >>$ac_stdint <= 199901L #define _HAVE_UINT64_T #define _HAVE_LONGLONG_UINT64_T typedef long long int64_t; typedef unsigned long long uint64_t; #elif !defined __STRICT_ANSI__ #if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__ #define _HAVE_UINT64_T typedef __int64 int64_t; typedef unsigned __int64 uint64_t; #elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__ /* note: all ELF-systems seem to have loff-support which needs 64-bit */ #if !defined _NO_LONGLONG #define _HAVE_UINT64_T #define _HAVE_LONGLONG_UINT64_T typedef long long int64_t; typedef unsigned long long uint64_t; #endif #elif defined __alpha || (defined __mips && defined _ABIN32) #if !defined _NO_LONGLONG typedef long int64_t; typedef unsigned long uint64_t; #endif /* compiler/cpu type to define int64_t */ #endif #endif #endif #if defined _STDINT_HAVE_U_INT_TYPES /* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */ typedef u_int8_t uint8_t; typedef u_int16_t uint16_t; typedef u_int32_t uint32_t; /* glibc compatibility */ #ifndef __int8_t_defined #define __int8_t_defined #endif #endif #ifdef _STDINT_NEED_INT_MODEL_T /* we must guess all the basic types. Apart from byte-adressable system, */ /* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */ /* (btw, those nibble-addressable systems are way off, or so we assume) */ dnl /* have a look at "64bit and data size neutrality" at */ dnl /* http://unix.org/version2/whatsnew/login_64bit.html */ dnl /* (the shorthand "ILP" types always have a "P" part) */ #if defined _STDINT_BYTE_MODEL #if _STDINT_LONG_MODEL+0 == 242 /* 2:4:2 = IP16 = a normal 16-bit system */ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned long uint32_t; #ifndef __int8_t_defined #define __int8_t_defined typedef char int8_t; typedef short int16_t; typedef long int32_t; #endif #elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444 /* 2:4:4 = LP32 = a 32-bit system derived from a 16-bit */ /* 4:4:4 = ILP32 = a normal 32-bit system */ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #ifndef __int8_t_defined #define __int8_t_defined typedef char int8_t; typedef short int16_t; typedef int int32_t; #endif #elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488 /* 4:8:4 = IP32 = a 32-bit system prepared for 64-bit */ /* 4:8:8 = LP64 = a normal 64-bit system */ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #ifndef __int8_t_defined #define __int8_t_defined typedef char int8_t; typedef short int16_t; typedef int int32_t; #endif /* this system has a "long" of 64bit */ #ifndef _HAVE_UINT64_T #define _HAVE_UINT64_T typedef unsigned long uint64_t; typedef long int64_t; #endif #elif _STDINT_LONG_MODEL+0 == 448 /* LLP64 a 64-bit system derived from a 32-bit system */ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #ifndef __int8_t_defined #define __int8_t_defined typedef char int8_t; typedef short int16_t; typedef int int32_t; #endif /* assuming the system has a "long long" */ #ifndef _HAVE_UINT64_T #define _HAVE_UINT64_T #define _HAVE_LONGLONG_UINT64_T typedef unsigned long long uint64_t; typedef long long int64_t; #endif #else #define _STDINT_NO_INT32_T #endif #else #define _STDINT_NO_INT8_T #define _STDINT_NO_INT32_T #endif #endif /* * quote from SunOS-5.8 sys/inttypes.h: * Use at your own risk. As of February 1996, the committee is squarely * behind the fixed sized types; the "least" and "fast" types are still being * discussed. The probability that the "fast" types may be removed before * the standard is finalized is high enough that they are not currently * implemented. */ #if defined _STDINT_NEED_INT_LEAST_T typedef int8_t int_least8_t; typedef int16_t int_least16_t; typedef int32_t int_least32_t; #ifdef _HAVE_UINT64_T typedef int64_t int_least64_t; #endif typedef uint8_t uint_least8_t; typedef uint16_t uint_least16_t; typedef uint32_t uint_least32_t; #ifdef _HAVE_UINT64_T typedef uint64_t uint_least64_t; #endif /* least types */ #endif #if defined _STDINT_NEED_INT_FAST_T typedef int8_t int_fast8_t; typedef int int_fast16_t; typedef int32_t int_fast32_t; #ifdef _HAVE_UINT64_T typedef int64_t int_fast64_t; #endif typedef uint8_t uint_fast8_t; typedef unsigned uint_fast16_t; typedef uint32_t uint_fast32_t; #ifdef _HAVE_UINT64_T typedef uint64_t uint_fast64_t; #endif /* fast types */ #endif #ifdef _STDINT_NEED_INTMAX_T #ifdef _HAVE_UINT64_T typedef int64_t intmax_t; typedef uint64_t uintmax_t; #else typedef long intmax_t; typedef unsigned long uintmax_t; #endif #endif #ifdef _STDINT_NEED_INTPTR_T #ifndef __intptr_t_defined #define __intptr_t_defined /* we encourage using "long" to store pointer values, never use "int" ! */ #if _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484 typedef unsinged int uintptr_t; typedef int intptr_t; #elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444 typedef unsigned long uintptr_t; typedef long intptr_t; #elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T typedef uint64_t uintptr_t; typedef int64_t intptr_t; #else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */ typedef unsigned long uintptr_t; typedef long intptr_t; #endif #endif #endif /* The ISO C99 standard specifies that in C++ implementations these should only be defined if explicitly requested. */ #if !defined __cplusplus || defined __STDC_CONSTANT_MACROS #ifndef UINT32_C /* Signed. */ # define INT8_C(c) c # define INT16_C(c) c # define INT32_C(c) c # ifdef _HAVE_LONGLONG_UINT64_T # define INT64_C(c) c ## L # else # define INT64_C(c) c ## LL # endif /* Unsigned. */ # define UINT8_C(c) c ## U # define UINT16_C(c) c ## U # define UINT32_C(c) c ## U # ifdef _HAVE_LONGLONG_UINT64_T # define UINT64_C(c) c ## UL # else # define UINT64_C(c) c ## ULL # endif /* Maximal type. */ # ifdef _HAVE_LONGLONG_UINT64_T # define INTMAX_C(c) c ## L # define UINTMAX_C(c) c ## UL # else # define INTMAX_C(c) c ## LL # define UINTMAX_C(c) c ## ULL # endif /* literalnumbers */ #endif #endif /* These limits are merily those of a two complement byte-oriented system */ /* Minimum of signed integral types. */ # define INT8_MIN (-128) # define INT16_MIN (-32767-1) # define INT32_MIN (-2147483647-1) # define INT64_MIN (-__INT64_C(9223372036854775807)-1) /* Maximum of signed integral types. */ # define INT8_MAX (127) # define INT16_MAX (32767) # define INT32_MAX (2147483647) # define INT64_MAX (__INT64_C(9223372036854775807)) /* Maximum of unsigned integral types. */ # define UINT8_MAX (255) # define UINT16_MAX (65535) # define UINT32_MAX (4294967295U) # define UINT64_MAX (__UINT64_C(18446744073709551615)) /* Minimum of signed integral types having a minimum size. */ # define INT_LEAST8_MIN INT8_MIN # define INT_LEAST16_MIN INT16_MIN # define INT_LEAST32_MIN INT32_MIN # define INT_LEAST64_MIN INT64_MIN /* Maximum of signed integral types having a minimum size. */ # define INT_LEAST8_MAX INT8_MAX # define INT_LEAST16_MAX INT16_MAX # define INT_LEAST32_MAX INT32_MAX # define INT_LEAST64_MAX INT64_MAX /* Maximum of unsigned integral types having a minimum size. */ # define UINT_LEAST8_MAX UINT8_MAX # define UINT_LEAST16_MAX UINT16_MAX # define UINT_LEAST32_MAX UINT32_MAX # define UINT_LEAST64_MAX UINT64_MAX /* shortcircuit*/ #endif /* once */ #endif #endif STDINT_EOF fi if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then AC_MSG_NOTICE([$ac_stdint_h is unchanged]) else ac_dir=`AS_DIRNAME(["$ac_stdint_h"])` AS_MKDIR_P(["$ac_dir"]) rm -f $ac_stdint_h mv $ac_stdint $ac_stdint_h fi ],[# variables for create stdint.h replacement PACKAGE="$PACKAGE" VERSION="$VERSION" ac_stdint_h="$ac_stdint_h" _ac_stdint_h=AS_TR_CPP(_$PACKAGE-$ac_stdint_h) ac_cv_stdint_message="$ac_cv_stdint_message" ac_cv_header_stdint_t="$ac_cv_header_stdint_t" ac_cv_header_stdint_x="$ac_cv_header_stdint_x" ac_cv_header_stdint_o="$ac_cv_header_stdint_o" ac_cv_header_stdint_u="$ac_cv_header_stdint_u" ac_cv_type_uint64_t="$ac_cv_type_uint64_t" ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t" ac_cv_char_data_model="$ac_cv_char_data_model" ac_cv_long_data_model="$ac_cv_long_data_model" ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t" ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t" ac_cv_type_intmax_t="$ac_cv_type_intmax_t" ]) ]) libexif-gtk-0.4.0/po/000775 000000 000000 00000000000 12115730414 014314 5ustar00rootroot000000 000000 libexif-gtk-0.4.0/po/ChangeLog000664 000000 000000 00000000141 12115730414 016062 0ustar00rootroot000000 000000 2002-07-23 gettextize * Makefile.in.in: Upgrade to gettext-0.10.40. libexif-gtk-0.4.0/po/POTFILES.in000664 000000 000000 00000000767 12115730414 016103 0ustar00rootroot000000 000000 gtk-extensions/gtk-options.c gtk-extensions/gtk-menu-option.c libexif-gtk/gtk-exif-browser.c libexif-gtk/gtk-exif-content-list.c libexif-gtk/gtk-exif-entry-copyright.c libexif-gtk/gtk-exif-entry-date.c libexif-gtk/gtk-exif-entry-flash.c libexif-gtk/gtk-exif-entry-generic.c libexif-gtk/gtk-exif-entry-number.c libexif-gtk/gtk-exif-entry-option.c libexif-gtk/gtk-exif-entry-rational.c libexif-gtk/gtk-exif-entry-resolution.c libexif-gtk/gtk-exif-entry-user-comment.c libexif-gtk/gtk-exif-entry-version.c libexif-gtk-0.4.0/po/de.po000664 001750 001750 00000026323 13252174676 015243 0ustar00hughhugh000000 000000 # German Translation for libexif-gtk. # Copyright: # This file is distributed under the same license as the libexif-gtk package. # # Lutz Mueller , 2002. # Marcus Meissner , 2004, 2005, 2006, 2007, 2008, 2009, 2010. # Dan Fandrich , 2012. # msgid "" msgstr "" "Project-Id-Version: libexif-gtk 0.3.6\n" "Report-Msgid-Bugs-To: libexif-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2013-02-28 00:23+0100\n" "PO-Revision-Date: 2012-05-15 23:20+0200\n" "Last-Translator: Dan Fandrich \n" "Language-Team: \n" "Language: de\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 ? 0 : 1;\n" #: libexif-gtk/gtk-exif-browser.c:157 msgid "Nothing selected." msgstr "Nichts ausgewählt." #: libexif-gtk/gtk-exif-browser.c:408 msgid "No thumbnail available." msgstr "Kein Vorschaubild verfügbar." #: libexif-gtk/gtk-exif-browser.c:416 msgid "Corrupt thumbnail image." msgstr "Ungültig Vorschaubild." #: libexif-gtk/gtk-exif-browser.c:431 #, c-format msgid "Size: %i bytes." msgstr "Größe: %i Bytes." #: libexif-gtk/gtk-exif-browser.c:495 msgid "Load..." msgstr "Laden..." #: libexif-gtk/gtk-exif-browser.c:534 msgid "Save As..." msgstr "Speichern unter..." #: libexif-gtk/gtk-exif-browser.c:592 msgid "Thumbnail" msgstr "Vorschaubild" #: libexif-gtk/gtk-exif-browser.c:609 msgid "Load" msgstr "Laden" #: libexif-gtk/gtk-exif-browser.c:614 msgid "Save" msgstr "Speichern" #: libexif-gtk/gtk-exif-browser.c:619 msgid "Delete" msgstr "Löschen" #: libexif-gtk/gtk-exif-content-list.c:178 msgid "Tag" msgstr "Tag" #: libexif-gtk/gtk-exif-content-list.c:184 msgid "Value" msgstr "Wert" #: libexif-gtk/gtk-exif-content-list.c:272 msgid "Add" msgstr "Hinzufügen" #: libexif-gtk/gtk-exif-content-list.c:359 msgid "Remove" msgstr "Entfernen" #: libexif-gtk/gtk-exif-entry-copyright.c:167 msgid "Photographer:" msgstr "Photograph:" #: libexif-gtk/gtk-exif-entry-copyright.c:173 msgid "Editor:" msgstr "Editor:" #: libexif-gtk/gtk-exif-entry-date.c:222 msgid "Time:" msgstr "Zeit:" #: libexif-gtk/gtk-exif-entry-flash.c:163 msgid "Flash fired" msgstr "Blitz löste aus" #: libexif-gtk/gtk-exif-entry-flash.c:172 msgid "Return light" msgstr "Reflektion" #: libexif-gtk/gtk-exif-entry-flash.c:180 msgid "No strobe return detection function" msgstr "Keine Blitzreflektion-Funktion" #: libexif-gtk/gtk-exif-entry-flash.c:193 msgid "Strobe return light not detected" msgstr "Blitzreflektion nicht erkannt" #: libexif-gtk/gtk-exif-entry-flash.c:205 msgid "Strobe return light detected" msgstr "Blitzreflektion erkannt" #: libexif-gtk/gtk-exif-entry-generic.c:139 msgid "Format:" msgstr "Format:" #: libexif-gtk/gtk-exif-entry-generic.c:149 msgid "Components:" msgstr "Komponenten:" #: libexif-gtk/gtk-exif-entry-generic.c:158 msgid "Size:" msgstr "Größe:" #: libexif-gtk/gtk-exif-entry-generic.c:167 #: libexif-gtk/gtk-exif-entry-number.c:250 #: libexif-gtk/gtk-exif-entry-rational.c:253 msgid "Value:" msgstr "Wert:" #: libexif-gtk/gtk-exif-entry-number.c:248 #: libexif-gtk/gtk-exif-entry-rational.c:251 #, c-format msgid "Value %i:" msgstr "Wert %i:" #: libexif-gtk/gtk-exif-entry-option.c:151 #: libexif-gtk/gtk-exif-entry-option.c:222 msgid "Not defined" msgstr "Undefiniert" #: libexif-gtk/gtk-exif-entry-option.c:152 msgid "One-chip color area sensor" msgstr "Einzel Chip Farbsensor" #: libexif-gtk/gtk-exif-entry-option.c:153 msgid "Two-chip color area sensor" msgstr "Zwei Chip Farbsensor" #: libexif-gtk/gtk-exif-entry-option.c:154 msgid "Three-chip color area sensor" msgstr "Drei Chip Sensor" #: libexif-gtk/gtk-exif-entry-option.c:155 msgid "Color sequential area sensor" msgstr "Farbraum sequentiell Sensor" #: libexif-gtk/gtk-exif-entry-option.c:156 msgid "Trilinear sensor" msgstr "Trilinearer Sensor" #: libexif-gtk/gtk-exif-entry-option.c:157 msgid "Color sequential linear sensor" msgstr "Farbraum linear sequentieller Sensor" #: libexif-gtk/gtk-exif-entry-option.c:162 msgid "Uncompressed" msgstr "Unkomprimiert" #: libexif-gtk/gtk-exif-entry-option.c:163 msgid "JPEG compression" msgstr "JPEG Kompression" #: libexif-gtk/gtk-exif-entry-option.c:168 #: libexif-gtk/gtk-exif-entry-option.c:180 msgid "Unknown" msgstr "Unbekannt" #: libexif-gtk/gtk-exif-entry-option.c:169 msgid "Average" msgstr "Durchschnitt" #: libexif-gtk/gtk-exif-entry-option.c:170 msgid "Center-Weighted Average" msgstr "Mittelpunkt gewichteter Durchschnitt" #: libexif-gtk/gtk-exif-entry-option.c:171 msgid "Spot" msgstr "Punkt" #: libexif-gtk/gtk-exif-entry-option.c:172 msgid "Multi Spot" msgstr "Mehr-Punkt" #: libexif-gtk/gtk-exif-entry-option.c:173 msgid "Pattern" msgstr "Raster" #: libexif-gtk/gtk-exif-entry-option.c:174 msgid "Partial" msgstr "Partiell" #: libexif-gtk/gtk-exif-entry-option.c:175 #: libexif-gtk/gtk-exif-entry-option.c:199 msgid "Other" msgstr "Andere" #: libexif-gtk/gtk-exif-entry-option.c:181 msgid "Daylight" msgstr "Tageslicht" #: libexif-gtk/gtk-exif-entry-option.c:182 msgid "Fluorescent" msgstr "Leuchstoffröhre" #: libexif-gtk/gtk-exif-entry-option.c:183 msgid "Tungsten" msgstr "Wolframlicht" #: libexif-gtk/gtk-exif-entry-option.c:184 msgid "Flash" msgstr "Blitz" #: libexif-gtk/gtk-exif-entry-option.c:185 msgid "Fine weather" msgstr "Gutes Wetter" #: libexif-gtk/gtk-exif-entry-option.c:186 msgid "Cloudy weather" msgstr "Bewölkung" #: libexif-gtk/gtk-exif-entry-option.c:187 msgid "Shade" msgstr "Schatten" #: libexif-gtk/gtk-exif-entry-option.c:188 msgid "Daylight fluorescent" msgstr "Tageslicht-Leuchtstoffröhre" #: libexif-gtk/gtk-exif-entry-option.c:189 msgid "Day white fluorescent" msgstr "Weiße Tageslicht-Leuchtstoffröhren" #: libexif-gtk/gtk-exif-entry-option.c:190 msgid "Cool white fluorescent" msgstr "Kaltweiße Leuchtstoffröhren" #: libexif-gtk/gtk-exif-entry-option.c:191 msgid "White fluorescent" msgstr "Weiße Leuchtstoffröhren" #: libexif-gtk/gtk-exif-entry-option.c:192 msgid "Standard light A" msgstr "Standard Licht A" #: libexif-gtk/gtk-exif-entry-option.c:193 msgid "Standard light B" msgstr "Standard Licht B" #: libexif-gtk/gtk-exif-entry-option.c:194 msgid "Standard light C" msgstr "Standard Licht C" #: libexif-gtk/gtk-exif-entry-option.c:195 msgid "D55" msgstr "D55" #: libexif-gtk/gtk-exif-entry-option.c:196 msgid "D65" msgstr "D65" #: libexif-gtk/gtk-exif-entry-option.c:197 msgid "D75" msgstr "D75" #: libexif-gtk/gtk-exif-entry-option.c:198 msgid "ISO studio tungsten" msgstr "ISO Studio-Glühlampenlicht" #: libexif-gtk/gtk-exif-entry-option.c:204 msgid "top - left" msgstr "oben - links" #: libexif-gtk/gtk-exif-entry-option.c:205 msgid "top - right" msgstr "oben - rechts" #: libexif-gtk/gtk-exif-entry-option.c:206 msgid "bottom - right" msgstr "unten - rechts" #: libexif-gtk/gtk-exif-entry-option.c:207 msgid "bottom - left" msgstr "unten - links" #: libexif-gtk/gtk-exif-entry-option.c:208 msgid "left - top" msgstr "links - oben" #: libexif-gtk/gtk-exif-entry-option.c:209 msgid "right - top" msgstr "rechts - oben" #: libexif-gtk/gtk-exif-entry-option.c:210 msgid "right - bottom" msgstr "rechts - unten" #: libexif-gtk/gtk-exif-entry-option.c:211 msgid "left - bottom" msgstr "links - unten" #: libexif-gtk/gtk-exif-entry-option.c:216 msgid "centered" msgstr "zentriert" #: libexif-gtk/gtk-exif-entry-option.c:217 msgid "co-sited" msgstr "co-sited" #: libexif-gtk/gtk-exif-entry-option.c:223 msgid "Manual" msgstr "Manuell" #: libexif-gtk/gtk-exif-entry-option.c:224 msgid "Normal program" msgstr "Normalprogramm" #: libexif-gtk/gtk-exif-entry-option.c:225 msgid "Aperture priority" msgstr "Optimiert nach Blende" #: libexif-gtk/gtk-exif-entry-option.c:226 msgid "Shutter priority" msgstr "Optimiert nach Belichtungszeit" #: libexif-gtk/gtk-exif-entry-option.c:227 msgid "Creative program (biased toward depth of field)" msgstr "Kreatives Programm (bevorzugt Schärfentiefe)" #: libexif-gtk/gtk-exif-entry-option.c:228 msgid "Action program (biased toward fast shutter speed)" msgstr "Aktion Programm (bevorzugt kurze Belichtungszeit)" #: libexif-gtk/gtk-exif-entry-option.c:229 msgid "Portrait mode (for closeup photos with the background out of focus)" msgstr "Portrait Modus (für Nahaufnahmen mit unscharfem Hintergrund)" #: libexif-gtk/gtk-exif-entry-option.c:231 msgid "Landscape mode (for landscape photos with the background in focus)" msgstr "Landschafts Modus (für Landschaftsaufnahmen mit scharfem Hintergrund)" #: libexif-gtk/gtk-exif-entry-option.c:260 msgid "Sensing method:" msgstr "Bildsensor:" #: libexif-gtk/gtk-exif-entry-option.c:264 msgid "0-th row - 0-th column:" msgstr "0-te Zeile - 0-te Spalte:" #: libexif-gtk/gtk-exif-entry-option.c:268 msgid "Light source:" msgstr "Lichtquelle:" #: libexif-gtk/gtk-exif-entry-option.c:272 msgid "Metering mode:" msgstr "Messmodus:" #: libexif-gtk/gtk-exif-entry-option.c:276 msgid "Compression scheme:" msgstr "Kompressionsschema:" #: libexif-gtk/gtk-exif-entry-option.c:280 msgid "YCbCr Positioning:" msgstr "YCbCr Positionierung:" #: libexif-gtk/gtk-exif-entry-option.c:284 msgid "Exposure Program:" msgstr "Belichtungsprogramm:" #: libexif-gtk/gtk-exif-entry-resolution.c:404 msgid "Focal Plane Resolution" msgstr "Fokusebene Auflösung" #: libexif-gtk/gtk-exif-entry-resolution.c:405 msgid "The number of pixels on the camera focal plane." msgstr "Anzahl an Pixel in der Fokusebene." #: libexif-gtk/gtk-exif-entry-resolution.c:411 msgid "Resolution" msgstr "Auflösung" #: libexif-gtk/gtk-exif-entry-resolution.c:412 msgid "The number of pixels per unit." msgstr "Anzahl an Pixel pro Einheit." #: libexif-gtk/gtk-exif-entry-resolution.c:423 msgid "Image width direction:" msgstr "Bildbreite Richtung:" #: libexif-gtk/gtk-exif-entry-resolution.c:459 msgid "Image height direction:" msgstr "Bildhöhe Richtung:" #: libexif-gtk/gtk-exif-entry-resolution.c:495 msgid "Unit:" msgstr "Maßeinheit:" #: libexif-gtk/gtk-exif-entry-resolution.c:507 msgid "Centimeter" msgstr "Zentimeter" #: libexif-gtk/gtk-exif-entry-resolution.c:511 msgid "Inch" msgstr "Zoll" #: libexif-gtk/gtk-exif-entry-user-comment.c:224 msgid "ASCII" msgstr "ASCII" #: libexif-gtk/gtk-exif-entry-user-comment.c:225 msgid "JIS" msgstr "JIS" #: libexif-gtk/gtk-exif-entry-user-comment.c:226 msgid "Unicode" msgstr "Unicode" #: libexif-gtk/gtk-exif-entry-user-comment.c:227 msgid "Undefined" msgstr "Undefiniert" #: libexif-gtk/gtk-exif-entry-user-comment.c:261 msgid "Character Code:" msgstr "Character Code:" #: libexif-gtk/gtk-exif-entry-version.c:136 msgid "Exif Format Version 2.0" msgstr "Exif Format Version 2.0" #: libexif-gtk/gtk-exif-entry-version.c:137 msgid "Exif Format Version 2.1" msgstr "Exif Format Version 2.1" #: libexif-gtk/gtk-exif-entry-version.c:138 msgid "Exif Format Version 2.2" msgstr "Exif Format Version 2.2" #: libexif-gtk/gtk-exif-entry-version.c:139 msgid "Exif Format Version 2.21" msgstr "Exif Format Version 2.21" #: libexif-gtk/gtk-exif-entry-version.c:140 msgid "Exif Format Version 2.3" msgstr "Exif Format Version 2.3" #: libexif-gtk/gtk-exif-entry-version.c:145 msgid "FlashPix Format Version 1.0" msgstr "FlashPix Format Version 1.0" #: libexif-gtk/gtk-exif-entry-version.c:146 msgid "FlashPix Format Version 1.01" msgstr "FlashPix Format Version 1.01" #: libexif-gtk/gtk-exif-entry-version.c:284 msgid "Version:" msgstr "Version:" libexif-gtk-0.4.0/po/es.po000664 001750 001750 00000026354 13252174722 015256 0ustar00hughhugh000000 000000 # libexif-gtk Spanish Translation. # Copyright © 2002 Free Software Foundation, Inc. # Fabian Mandelbaum , 2002. # msgid "" msgstr "" "Project-Id-Version: libexif-gtk 0.3.6cvs3\n" "Report-Msgid-Bugs-To: libexif-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2013-02-28 00:23+0100\n" "PO-Revision-Date: 2013-02-27 18:01-0300\n" "Last-Translator: Fabián Mandelbaum \n" "Language-Team: Spanish \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.5.5\n" #: libexif-gtk/gtk-exif-browser.c:157 msgid "Nothing selected." msgstr "Nada seleccionado." #: libexif-gtk/gtk-exif-browser.c:408 msgid "No thumbnail available." msgstr "Sin diapositiva disponible." #: libexif-gtk/gtk-exif-browser.c:416 msgid "Corrupt thumbnail image." msgstr "Diapositiva corrupta." #: libexif-gtk/gtk-exif-browser.c:431 #, c-format msgid "Size: %i bytes." msgstr "Tamaño: %i bytes." #: libexif-gtk/gtk-exif-browser.c:495 msgid "Load..." msgstr "Cargar…" #: libexif-gtk/gtk-exif-browser.c:534 msgid "Save As..." msgstr "Guardar como…" #: libexif-gtk/gtk-exif-browser.c:592 msgid "Thumbnail" msgstr "Diapositiva" #: libexif-gtk/gtk-exif-browser.c:609 msgid "Load" msgstr "Cargar" #: libexif-gtk/gtk-exif-browser.c:614 msgid "Save" msgstr "Guardar" #: libexif-gtk/gtk-exif-browser.c:619 msgid "Delete" msgstr "Borrar" #: libexif-gtk/gtk-exif-content-list.c:178 msgid "Tag" msgstr "Etiqueta" #: libexif-gtk/gtk-exif-content-list.c:184 msgid "Value" msgstr "Valor" #: libexif-gtk/gtk-exif-content-list.c:272 msgid "Add" msgstr "Añadir" #: libexif-gtk/gtk-exif-content-list.c:359 msgid "Remove" msgstr "Quitar" #: libexif-gtk/gtk-exif-entry-copyright.c:167 msgid "Photographer:" msgstr "Fotógrafo:" #: libexif-gtk/gtk-exif-entry-copyright.c:173 msgid "Editor:" msgstr "Editor:" #: libexif-gtk/gtk-exif-entry-date.c:222 msgid "Time:" msgstr "Fecha:" #: libexif-gtk/gtk-exif-entry-flash.c:163 msgid "Flash fired" msgstr "Flash disparado" #: libexif-gtk/gtk-exif-entry-flash.c:172 msgid "Return light" msgstr "Luz de retorno" #: libexif-gtk/gtk-exif-entry-flash.c:180 msgid "No strobe return detection function" msgstr "Sin función de detección de retorno estrosboscópico" #: libexif-gtk/gtk-exif-entry-flash.c:193 msgid "Strobe return light not detected" msgstr "Luz de retorno estrosboscópica no detectada" #: libexif-gtk/gtk-exif-entry-flash.c:205 msgid "Strobe return light detected" msgstr "Luz de retorno estrosboscópica detectada" #: libexif-gtk/gtk-exif-entry-generic.c:139 msgid "Format:" msgstr "Formato:" #: libexif-gtk/gtk-exif-entry-generic.c:149 msgid "Components:" msgstr "Componentes:" #: libexif-gtk/gtk-exif-entry-generic.c:158 msgid "Size:" msgstr "Tamaño:" #: libexif-gtk/gtk-exif-entry-generic.c:167 #: libexif-gtk/gtk-exif-entry-number.c:250 #: libexif-gtk/gtk-exif-entry-rational.c:253 msgid "Value:" msgstr "Valor:" #: libexif-gtk/gtk-exif-entry-number.c:248 #: libexif-gtk/gtk-exif-entry-rational.c:251 #, c-format msgid "Value %i:" msgstr "Valor %i:" #: libexif-gtk/gtk-exif-entry-option.c:151 #: libexif-gtk/gtk-exif-entry-option.c:222 msgid "Not defined" msgstr "No definido" #: libexif-gtk/gtk-exif-entry-option.c:152 msgid "One-chip color area sensor" msgstr "Sensor de área de color de un chip" #: libexif-gtk/gtk-exif-entry-option.c:153 msgid "Two-chip color area sensor" msgstr "Sensor de área de color de dos chips" #: libexif-gtk/gtk-exif-entry-option.c:154 msgid "Three-chip color area sensor" msgstr "Sensor de área de color de tres chips" #: libexif-gtk/gtk-exif-entry-option.c:155 msgid "Color sequential area sensor" msgstr "Sensor de área de color secuencial" #: libexif-gtk/gtk-exif-entry-option.c:156 msgid "Trilinear sensor" msgstr "Sensor tri-lineal" #: libexif-gtk/gtk-exif-entry-option.c:157 msgid "Color sequential linear sensor" msgstr "Sensor lineal secuencial de color" #: libexif-gtk/gtk-exif-entry-option.c:162 msgid "Uncompressed" msgstr "Descomprimido" #: libexif-gtk/gtk-exif-entry-option.c:163 msgid "JPEG compression" msgstr "compresión JPEG" #: libexif-gtk/gtk-exif-entry-option.c:168 #: libexif-gtk/gtk-exif-entry-option.c:180 msgid "Unknown" msgstr "Desconocido" #: libexif-gtk/gtk-exif-entry-option.c:169 msgid "Average" msgstr "Promedio" #: libexif-gtk/gtk-exif-entry-option.c:170 msgid "Center-Weighted Average" msgstr "Promedio Ponderado en el Centro" #: libexif-gtk/gtk-exif-entry-option.c:171 msgid "Spot" msgstr "Localizado" #: libexif-gtk/gtk-exif-entry-option.c:172 msgid "Multi Spot" msgstr "Multi Lugar" #: libexif-gtk/gtk-exif-entry-option.c:173 msgid "Pattern" msgstr "Patrón" #: libexif-gtk/gtk-exif-entry-option.c:174 msgid "Partial" msgstr "Parcial" #: libexif-gtk/gtk-exif-entry-option.c:175 #: libexif-gtk/gtk-exif-entry-option.c:199 msgid "Other" msgstr "Otro" #: libexif-gtk/gtk-exif-entry-option.c:181 msgid "Daylight" msgstr "Luz de día" #: libexif-gtk/gtk-exif-entry-option.c:182 msgid "Fluorescent" msgstr "Fluorescente" #: libexif-gtk/gtk-exif-entry-option.c:183 msgid "Tungsten" msgstr "Tungsteno" #: libexif-gtk/gtk-exif-entry-option.c:184 msgid "Flash" msgstr "Flash" #: libexif-gtk/gtk-exif-entry-option.c:185 msgid "Fine weather" msgstr "Tiempo bueno" #: libexif-gtk/gtk-exif-entry-option.c:186 msgid "Cloudy weather" msgstr "Tiempo nublado" #: libexif-gtk/gtk-exif-entry-option.c:187 msgid "Shade" msgstr "Sombra" #: libexif-gtk/gtk-exif-entry-option.c:188 msgid "Daylight fluorescent" msgstr "Luz de día fluorescente" #: libexif-gtk/gtk-exif-entry-option.c:189 msgid "Day white fluorescent" msgstr "Día blanco fluorescente" #: libexif-gtk/gtk-exif-entry-option.c:190 msgid "Cool white fluorescent" msgstr "Blanco frío fluorescente" #: libexif-gtk/gtk-exif-entry-option.c:191 msgid "White fluorescent" msgstr "Blanco fluorescente" #: libexif-gtk/gtk-exif-entry-option.c:192 msgid "Standard light A" msgstr "Luz estándar A" #: libexif-gtk/gtk-exif-entry-option.c:193 msgid "Standard light B" msgstr "Luz estándar B" #: libexif-gtk/gtk-exif-entry-option.c:194 msgid "Standard light C" msgstr "Luz estándar C" #: libexif-gtk/gtk-exif-entry-option.c:195 msgid "D55" msgstr "D55" #: libexif-gtk/gtk-exif-entry-option.c:196 msgid "D65" msgstr "D65" #: libexif-gtk/gtk-exif-entry-option.c:197 msgid "D75" msgstr "D75" #: libexif-gtk/gtk-exif-entry-option.c:198 msgid "ISO studio tungsten" msgstr "Tungsteno de estudio ISO" #: libexif-gtk/gtk-exif-entry-option.c:204 msgid "top - left" msgstr "arriba - izquierda" #: libexif-gtk/gtk-exif-entry-option.c:205 msgid "top - right" msgstr "arriba - derecha" #: libexif-gtk/gtk-exif-entry-option.c:206 msgid "bottom - right" msgstr "abajo - derecha" #: libexif-gtk/gtk-exif-entry-option.c:207 msgid "bottom - left" msgstr "abajo - izquierda" #: libexif-gtk/gtk-exif-entry-option.c:208 msgid "left - top" msgstr "izquierda - arriba" #: libexif-gtk/gtk-exif-entry-option.c:209 msgid "right - top" msgstr "derecha - arriba" #: libexif-gtk/gtk-exif-entry-option.c:210 msgid "right - bottom" msgstr "derecha - abajo" #: libexif-gtk/gtk-exif-entry-option.c:211 msgid "left - bottom" msgstr "izquierda - abajo" #: libexif-gtk/gtk-exif-entry-option.c:216 msgid "centered" msgstr "centrado" #: libexif-gtk/gtk-exif-entry-option.c:217 msgid "co-sited" msgstr "co-situado" #: libexif-gtk/gtk-exif-entry-option.c:223 msgid "Manual" msgstr "Manual" #: libexif-gtk/gtk-exif-entry-option.c:224 msgid "Normal program" msgstr "Programa normal" #: libexif-gtk/gtk-exif-entry-option.c:225 msgid "Aperture priority" msgstr "Prioridad de apertura" #: libexif-gtk/gtk-exif-entry-option.c:226 msgid "Shutter priority" msgstr "Prioridad del obturador" #: libexif-gtk/gtk-exif-entry-option.c:227 msgid "Creative program (biased toward depth of field)" msgstr "Programa creativo (orientado a la profundidad del campo)" #: libexif-gtk/gtk-exif-entry-option.c:228 msgid "Action program (biased toward fast shutter speed)" msgstr "Programa de acción (orientado a una obturación rápida)" #: libexif-gtk/gtk-exif-entry-option.c:229 msgid "Portrait mode (for closeup photos with the background out of focus)" msgstr "Modo retrato (para fotos de cerca con el fondo fuera de foco)" #: libexif-gtk/gtk-exif-entry-option.c:231 msgid "Landscape mode (for landscape photos with the background in focus)" msgstr "Modo paisaje (para fotos de paisaje con el fondo en foco)" #: libexif-gtk/gtk-exif-entry-option.c:260 msgid "Sensing method:" msgstr "Método de sensado:" #: libexif-gtk/gtk-exif-entry-option.c:264 msgid "0-th row - 0-th column:" msgstr "fila 0 - columna 0:" #: libexif-gtk/gtk-exif-entry-option.c:268 msgid "Light source:" msgstr "Fuente de luz:" #: libexif-gtk/gtk-exif-entry-option.c:272 msgid "Metering mode:" msgstr "Módo de medición:" #: libexif-gtk/gtk-exif-entry-option.c:276 msgid "Compression scheme:" msgstr "Esquema de compresión:" #: libexif-gtk/gtk-exif-entry-option.c:280 msgid "YCbCr Positioning:" msgstr "Posicionamiento YCbCr:" #: libexif-gtk/gtk-exif-entry-option.c:284 msgid "Exposure Program:" msgstr "Programa de exposición:" #: libexif-gtk/gtk-exif-entry-resolution.c:404 msgid "Focal Plane Resolution" msgstr "Resolución del plano focal" #: libexif-gtk/gtk-exif-entry-resolution.c:405 msgid "The number of pixels on the camera focal plane." msgstr "La cantidad de pixeles en el plano focal de la cámara." #: libexif-gtk/gtk-exif-entry-resolution.c:411 msgid "Resolution" msgstr "Resolución" #: libexif-gtk/gtk-exif-entry-resolution.c:412 msgid "The number of pixels per unit." msgstr "La cantidad de pixeles por unidad." #: libexif-gtk/gtk-exif-entry-resolution.c:423 msgid "Image width direction:" msgstr "Dirección del ancho de la imagen:" #: libexif-gtk/gtk-exif-entry-resolution.c:459 msgid "Image height direction:" msgstr "Dirección del alto de la imagen:" #: libexif-gtk/gtk-exif-entry-resolution.c:495 msgid "Unit:" msgstr "Unidad:" #: libexif-gtk/gtk-exif-entry-resolution.c:507 msgid "Centimeter" msgstr "Centímetro" #: libexif-gtk/gtk-exif-entry-resolution.c:511 msgid "Inch" msgstr "Pulgada" #: libexif-gtk/gtk-exif-entry-user-comment.c:224 msgid "ASCII" msgstr "ASCII" #: libexif-gtk/gtk-exif-entry-user-comment.c:225 msgid "JIS" msgstr "JIS" #: libexif-gtk/gtk-exif-entry-user-comment.c:226 msgid "Unicode" msgstr "Unicode" #: libexif-gtk/gtk-exif-entry-user-comment.c:227 msgid "Undefined" msgstr "Indefinido" #: libexif-gtk/gtk-exif-entry-user-comment.c:261 msgid "Character Code:" msgstr "Código de caracteres:" #: libexif-gtk/gtk-exif-entry-version.c:136 msgid "Exif Format Version 2.0" msgstr "Formato EXIF versión 2.0" #: libexif-gtk/gtk-exif-entry-version.c:137 msgid "Exif Format Version 2.1" msgstr "Formato EXIF versión 2.1" #: libexif-gtk/gtk-exif-entry-version.c:138 msgid "Exif Format Version 2.2" msgstr "Formato EXIF versión 2.2" #: libexif-gtk/gtk-exif-entry-version.c:139 msgid "Exif Format Version 2.21" msgstr "Formato EXIF versión 2.21" #: libexif-gtk/gtk-exif-entry-version.c:140 msgid "Exif Format Version 2.3" msgstr "Formato EXIF versión 2.3" #: libexif-gtk/gtk-exif-entry-version.c:145 msgid "FlashPix Format Version 1.0" msgstr "Formato FlashPix versión 1.0" #: libexif-gtk/gtk-exif-entry-version.c:146 msgid "FlashPix Format Version 1.01" msgstr "Formato FlashPix versión 1.01" #: libexif-gtk/gtk-exif-entry-version.c:284 msgid "Version:" msgstr "Versión:" libexif-gtk-0.4.0/po/fr.po000664 001750 001750 00000026407 13252174760 015257 0ustar00hughhugh000000 000000 # LIBEXIF-GTK PO FILE # Copyright © 2003 Free Software Foundation, Inc. # This file is distributed under the same license as the LIBEXIF-GTK package. # Arnaud Launay , 2003. # msgid "" msgstr "" "Project-Id-Version: libexif-gtk 0.3.3\n" "Report-Msgid-Bugs-To: libexif-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2013-02-28 00:23+0100\n" "PO-Revision-Date: 2012-05-17 01:20+0200\n" "Last-Translator: Valère Monseur \n" "Language-Team: \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libexif-gtk/gtk-exif-browser.c:157 msgid "Nothing selected." msgstr "Rien n'est sélectionné." #: libexif-gtk/gtk-exif-browser.c:408 msgid "No thumbnail available." msgstr "Pas de vignette disponible." #: libexif-gtk/gtk-exif-browser.c:416 msgid "Corrupt thumbnail image." msgstr "Vignette corrompue." #: libexif-gtk/gtk-exif-browser.c:431 #, c-format msgid "Size: %i bytes." msgstr "Taille: %i octets." #: libexif-gtk/gtk-exif-browser.c:495 msgid "Load..." msgstr "Charger..." #: libexif-gtk/gtk-exif-browser.c:534 msgid "Save As..." msgstr "Enregistrer sous..." #: libexif-gtk/gtk-exif-browser.c:592 msgid "Thumbnail" msgstr "Vignette" #: libexif-gtk/gtk-exif-browser.c:609 msgid "Load" msgstr "Charger" #: libexif-gtk/gtk-exif-browser.c:614 msgid "Save" msgstr "Enregistrer" #: libexif-gtk/gtk-exif-browser.c:619 msgid "Delete" msgstr "Supprimer" #: libexif-gtk/gtk-exif-content-list.c:178 msgid "Tag" msgstr "Champ" #: libexif-gtk/gtk-exif-content-list.c:184 msgid "Value" msgstr "Valeur" #: libexif-gtk/gtk-exif-content-list.c:272 msgid "Add" msgstr "Ajouter" #: libexif-gtk/gtk-exif-content-list.c:359 msgid "Remove" msgstr "Supprimer" #: libexif-gtk/gtk-exif-entry-copyright.c:167 msgid "Photographer:" msgstr "Photographe:" #: libexif-gtk/gtk-exif-entry-copyright.c:173 msgid "Editor:" msgstr "Editeur:" #: libexif-gtk/gtk-exif-entry-date.c:222 msgid "Time:" msgstr "Heure:" #: libexif-gtk/gtk-exif-entry-flash.c:163 msgid "Flash fired" msgstr "Le flash s'est déclenché" #: libexif-gtk/gtk-exif-entry-flash.c:172 msgid "Return light" msgstr "Lumière de retour" #: libexif-gtk/gtk-exif-entry-flash.c:180 msgid "No strobe return detection function" msgstr "Aucune fonction de détection de retour de flash" #: libexif-gtk/gtk-exif-entry-flash.c:193 msgid "Strobe return light not detected" msgstr "Lumière de retour de flash non détectée" #: libexif-gtk/gtk-exif-entry-flash.c:205 msgid "Strobe return light detected" msgstr "Lumière de retour de flash détectée" #: libexif-gtk/gtk-exif-entry-generic.c:139 msgid "Format:" msgstr "Format:" #: libexif-gtk/gtk-exif-entry-generic.c:149 msgid "Components:" msgstr "Composants:" #: libexif-gtk/gtk-exif-entry-generic.c:158 msgid "Size:" msgstr "Taille:" #: libexif-gtk/gtk-exif-entry-generic.c:167 #: libexif-gtk/gtk-exif-entry-number.c:250 #: libexif-gtk/gtk-exif-entry-rational.c:253 msgid "Value:" msgstr "Valeur:" #: libexif-gtk/gtk-exif-entry-number.c:248 #: libexif-gtk/gtk-exif-entry-rational.c:251 #, c-format msgid "Value %i:" msgstr "Valeur %i:" #: libexif-gtk/gtk-exif-entry-option.c:151 #: libexif-gtk/gtk-exif-entry-option.c:222 msgid "Not defined" msgstr "Non défini" #: libexif-gtk/gtk-exif-entry-option.c:152 msgid "One-chip color area sensor" msgstr "Capteur de couleur à une puce" #: libexif-gtk/gtk-exif-entry-option.c:153 msgid "Two-chip color area sensor" msgstr "Capteur de couleur à deux puces" #: libexif-gtk/gtk-exif-entry-option.c:154 msgid "Three-chip color area sensor" msgstr "Capteur de couleur à trois puces" #: libexif-gtk/gtk-exif-entry-option.c:155 msgid "Color sequential area sensor" msgstr "Capteur séquentiel de couleur" #: libexif-gtk/gtk-exif-entry-option.c:156 msgid "Trilinear sensor" msgstr "Capteur trilinéaire" #: libexif-gtk/gtk-exif-entry-option.c:157 msgid "Color sequential linear sensor" msgstr "Capteur linéaire séquentiel de couleur" #: libexif-gtk/gtk-exif-entry-option.c:162 msgid "Uncompressed" msgstr "Non compressé" #: libexif-gtk/gtk-exif-entry-option.c:163 msgid "JPEG compression" msgstr "Compression JPEG" #: libexif-gtk/gtk-exif-entry-option.c:168 #: libexif-gtk/gtk-exif-entry-option.c:180 msgid "Unknown" msgstr "Inconnu" #: libexif-gtk/gtk-exif-entry-option.c:169 msgid "Average" msgstr "Moyenne" #: libexif-gtk/gtk-exif-entry-option.c:170 msgid "Center-Weighted Average" msgstr "Pondéré au centre" #: libexif-gtk/gtk-exif-entry-option.c:171 msgid "Spot" msgstr "Spot" #: libexif-gtk/gtk-exif-entry-option.c:172 msgid "Multi Spot" msgstr "Multi spot" #: libexif-gtk/gtk-exif-entry-option.c:173 msgid "Pattern" msgstr "Multiple" #: libexif-gtk/gtk-exif-entry-option.c:174 msgid "Partial" msgstr "Partiel" #: libexif-gtk/gtk-exif-entry-option.c:175 #: libexif-gtk/gtk-exif-entry-option.c:199 msgid "Other" msgstr "Autre" #: libexif-gtk/gtk-exif-entry-option.c:181 msgid "Daylight" msgstr "Lumière du jour" #: libexif-gtk/gtk-exif-entry-option.c:182 msgid "Fluorescent" msgstr "Fluorescent" #: libexif-gtk/gtk-exif-entry-option.c:183 msgid "Tungsten" msgstr "Tungstène" #: libexif-gtk/gtk-exif-entry-option.c:184 msgid "Flash" msgstr "Flash" #: libexif-gtk/gtk-exif-entry-option.c:185 msgid "Fine weather" msgstr "Temps clair" #: libexif-gtk/gtk-exif-entry-option.c:186 msgid "Cloudy weather" msgstr "Temps couvert" #: libexif-gtk/gtk-exif-entry-option.c:187 msgid "Shade" msgstr "Ombragé" #: libexif-gtk/gtk-exif-entry-option.c:188 msgid "Daylight fluorescent" msgstr "Lumière du jour fluorescent" #: libexif-gtk/gtk-exif-entry-option.c:189 msgid "Day white fluorescent" msgstr "Lumière du jour fluorescent" #: libexif-gtk/gtk-exif-entry-option.c:190 msgid "Cool white fluorescent" msgstr "Blanc froid fluorescent" #: libexif-gtk/gtk-exif-entry-option.c:191 msgid "White fluorescent" msgstr "Lumière fluorescente" #: libexif-gtk/gtk-exif-entry-option.c:192 msgid "Standard light A" msgstr "Lampe standard A" #: libexif-gtk/gtk-exif-entry-option.c:193 msgid "Standard light B" msgstr "Lampe standard B" #: libexif-gtk/gtk-exif-entry-option.c:194 msgid "Standard light C" msgstr "Lampe standard C" #: libexif-gtk/gtk-exif-entry-option.c:195 msgid "D55" msgstr "D55" #: libexif-gtk/gtk-exif-entry-option.c:196 msgid "D65" msgstr "D65" #: libexif-gtk/gtk-exif-entry-option.c:197 msgid "D75" msgstr "D75" #: libexif-gtk/gtk-exif-entry-option.c:198 msgid "ISO studio tungsten" msgstr "Tungstène de studio ISO" #: libexif-gtk/gtk-exif-entry-option.c:204 msgid "top - left" msgstr "haut - gauche" #: libexif-gtk/gtk-exif-entry-option.c:205 msgid "top - right" msgstr "haut - droite" #: libexif-gtk/gtk-exif-entry-option.c:206 msgid "bottom - right" msgstr "bas - droite" #: libexif-gtk/gtk-exif-entry-option.c:207 msgid "bottom - left" msgstr "bas - gauche" #: libexif-gtk/gtk-exif-entry-option.c:208 msgid "left - top" msgstr "gauche - haut" #: libexif-gtk/gtk-exif-entry-option.c:209 msgid "right - top" msgstr "droite - haut" #: libexif-gtk/gtk-exif-entry-option.c:210 msgid "right - bottom" msgstr "droite - bas" #: libexif-gtk/gtk-exif-entry-option.c:211 msgid "left - bottom" msgstr "gauche - bas" #: libexif-gtk/gtk-exif-entry-option.c:216 msgid "centered" msgstr "centré" #: libexif-gtk/gtk-exif-entry-option.c:217 msgid "co-sited" msgstr "coimplanté" #: libexif-gtk/gtk-exif-entry-option.c:223 msgid "Manual" msgstr "Manuel" #: libexif-gtk/gtk-exif-entry-option.c:224 msgid "Normal program" msgstr "Programme normal" #: libexif-gtk/gtk-exif-entry-option.c:225 msgid "Aperture priority" msgstr "Priorité à l'ouverture" #: libexif-gtk/gtk-exif-entry-option.c:226 msgid "Shutter priority" msgstr "Priorité à la vitesse" #: libexif-gtk/gtk-exif-entry-option.c:227 msgid "Creative program (biased toward depth of field)" msgstr "Programme créatif (grande profondeur de champ)" #: libexif-gtk/gtk-exif-entry-option.c:228 msgid "Action program (biased toward fast shutter speed)" msgstr "Programme action (vitesse d'obturation élevée)" #: libexif-gtk/gtk-exif-entry-option.c:229 msgid "Portrait mode (for closeup photos with the background out of focus)" msgstr "Mode portrait (photos en gros plan avec arrière-plan flou)" #: libexif-gtk/gtk-exif-entry-option.c:231 msgid "Landscape mode (for landscape photos with the background in focus)" msgstr "Mode paysage (paysages avec arrière-plan net)" #: libexif-gtk/gtk-exif-entry-option.c:260 msgid "Sensing method:" msgstr "Méthode de détection:" #: libexif-gtk/gtk-exif-entry-option.c:264 msgid "0-th row - 0-th column:" msgstr "0-ième ligne - 0-ième colonne:" #: libexif-gtk/gtk-exif-entry-option.c:268 msgid "Light source:" msgstr "Source de lumière:" #: libexif-gtk/gtk-exif-entry-option.c:272 msgid "Metering mode:" msgstr "Mode de mesure:" #: libexif-gtk/gtk-exif-entry-option.c:276 msgid "Compression scheme:" msgstr "Schéma de compression:" #: libexif-gtk/gtk-exif-entry-option.c:280 msgid "YCbCr Positioning:" msgstr "Positionnement YCbCr:" #: libexif-gtk/gtk-exif-entry-option.c:284 msgid "Exposure Program:" msgstr "Programme d'exposition:" #: libexif-gtk/gtk-exif-entry-resolution.c:404 msgid "Focal Plane Resolution" msgstr "Résolution du plan focal" #: libexif-gtk/gtk-exif-entry-resolution.c:405 msgid "The number of pixels on the camera focal plane." msgstr "Nombre de pixels du plan focal de l'appareil." #: libexif-gtk/gtk-exif-entry-resolution.c:411 msgid "Resolution" msgstr "Résolution" #: libexif-gtk/gtk-exif-entry-resolution.c:412 msgid "The number of pixels per unit." msgstr "Nombre de pixels par unité." #: libexif-gtk/gtk-exif-entry-resolution.c:423 msgid "Image width direction:" msgstr "Largeur de l'image:" #: libexif-gtk/gtk-exif-entry-resolution.c:459 msgid "Image height direction:" msgstr "Hauteur de l'image:" #: libexif-gtk/gtk-exif-entry-resolution.c:495 msgid "Unit:" msgstr "Unité:" #: libexif-gtk/gtk-exif-entry-resolution.c:507 msgid "Centimeter" msgstr "Centimètre" #: libexif-gtk/gtk-exif-entry-resolution.c:511 msgid "Inch" msgstr "Pouce" #: libexif-gtk/gtk-exif-entry-user-comment.c:224 msgid "ASCII" msgstr "ASCII" #: libexif-gtk/gtk-exif-entry-user-comment.c:225 msgid "JIS" msgstr "JIS" #: libexif-gtk/gtk-exif-entry-user-comment.c:226 msgid "Unicode" msgstr "Unicode" #: libexif-gtk/gtk-exif-entry-user-comment.c:227 msgid "Undefined" msgstr "Non défini" #: libexif-gtk/gtk-exif-entry-user-comment.c:261 msgid "Character Code:" msgstr "Code de charactère:" #: libexif-gtk/gtk-exif-entry-version.c:136 msgid "Exif Format Version 2.0" msgstr "Version 2.0 du format EXIF" #: libexif-gtk/gtk-exif-entry-version.c:137 msgid "Exif Format Version 2.1" msgstr "Version 2.1 du format EXIF" #: libexif-gtk/gtk-exif-entry-version.c:138 msgid "Exif Format Version 2.2" msgstr "Version 2.2 du format EXIF" #: libexif-gtk/gtk-exif-entry-version.c:139 msgid "Exif Format Version 2.21" msgstr "Version 2.21 du format EXIF" #: libexif-gtk/gtk-exif-entry-version.c:140 msgid "Exif Format Version 2.3" msgstr "Version 2.3 du format EXIF" #: libexif-gtk/gtk-exif-entry-version.c:145 msgid "FlashPix Format Version 1.0" msgstr "Version 1.0 du format FlashPix" #: libexif-gtk/gtk-exif-entry-version.c:146 msgid "FlashPix Format Version 1.01" msgstr "Version 1.01 du format FlashPix" #: libexif-gtk/gtk-exif-entry-version.c:284 msgid "Version:" msgstr "Version:" #~ msgid "Could not parse thumbnail data." #~ msgstr "Impossible de parcourir les données de la vignette." libexif-gtk-0.4.0/po/pl.po000664 001750 001750 00000026534 13252175004 015254 0ustar00hughhugh000000 000000 # Polish translation for libexif-gtk. # This file is distributed under the same license as the libexif-gtk package. # Jakub Bogusz , 2005-2013. # msgid "" msgstr "" "Project-Id-Version: libexif-gtk 0.3.6\n" "Report-Msgid-Bugs-To: libexif-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2013-02-28 00:23+0100\n" "PO-Revision-Date: 2013-02-28 16:00+0100\n" "Last-Translator: Jakub Bogusz \n" "Language-Team: Polish \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" #: libexif-gtk/gtk-exif-browser.c:157 msgid "Nothing selected." msgstr "Nic nie wybrano" #: libexif-gtk/gtk-exif-browser.c:408 msgid "No thumbnail available." msgstr "Miniaturka niedostępna." #: libexif-gtk/gtk-exif-browser.c:416 msgid "Corrupt thumbnail image." msgstr "Uszkodzona miniaturka." #: libexif-gtk/gtk-exif-browser.c:431 #, c-format msgid "Size: %i bytes." msgstr "Rozmiar: %i bajtów." #: libexif-gtk/gtk-exif-browser.c:495 msgid "Load..." msgstr "Wczytaj..." #: libexif-gtk/gtk-exif-browser.c:534 msgid "Save As..." msgstr "Zapisz jako..." #: libexif-gtk/gtk-exif-browser.c:592 msgid "Thumbnail" msgstr "Miniaturka" #: libexif-gtk/gtk-exif-browser.c:609 msgid "Load" msgstr "Wczytaj" #: libexif-gtk/gtk-exif-browser.c:614 msgid "Save" msgstr "Zapisz" #: libexif-gtk/gtk-exif-browser.c:619 msgid "Delete" msgstr "Usuń" #: libexif-gtk/gtk-exif-content-list.c:178 msgid "Tag" msgstr "Znacznik" #: libexif-gtk/gtk-exif-content-list.c:184 msgid "Value" msgstr "Wartość" #: libexif-gtk/gtk-exif-content-list.c:272 msgid "Add" msgstr "Dodaj" #: libexif-gtk/gtk-exif-content-list.c:359 msgid "Remove" msgstr "Usuń" #: libexif-gtk/gtk-exif-entry-copyright.c:167 msgid "Photographer:" msgstr "Fotograf:" #: libexif-gtk/gtk-exif-entry-copyright.c:173 msgid "Editor:" msgstr "Wydawca:" #: libexif-gtk/gtk-exif-entry-date.c:222 msgid "Time:" msgstr "Czas:" #: libexif-gtk/gtk-exif-entry-flash.c:163 msgid "Flash fired" msgstr "Flesz się uruchomił" #: libexif-gtk/gtk-exif-entry-flash.c:172 msgid "Return light" msgstr "Światło zwrotne" #: libexif-gtk/gtk-exif-entry-flash.c:180 msgid "No strobe return detection function" msgstr "Brak funkcji wykrywania światła odbitego" #: libexif-gtk/gtk-exif-entry-flash.c:193 msgid "Strobe return light not detected" msgstr "Odbity błysk światła nie został wykryty" #: libexif-gtk/gtk-exif-entry-flash.c:205 msgid "Strobe return light detected" msgstr "Odbity błysk światła wykryty" #: libexif-gtk/gtk-exif-entry-generic.c:139 msgid "Format:" msgstr "Format:" #: libexif-gtk/gtk-exif-entry-generic.c:149 msgid "Components:" msgstr "Składowe:" #: libexif-gtk/gtk-exif-entry-generic.c:158 msgid "Size:" msgstr "Rozmiar:" #: libexif-gtk/gtk-exif-entry-generic.c:167 #: libexif-gtk/gtk-exif-entry-number.c:250 #: libexif-gtk/gtk-exif-entry-rational.c:253 msgid "Value:" msgstr "Wartość:" #: libexif-gtk/gtk-exif-entry-number.c:248 #: libexif-gtk/gtk-exif-entry-rational.c:251 #, c-format msgid "Value %i:" msgstr "Wartość %i:" #: libexif-gtk/gtk-exif-entry-option.c:151 #: libexif-gtk/gtk-exif-entry-option.c:222 msgid "Not defined" msgstr "Nieokreślony" #: libexif-gtk/gtk-exif-entry-option.c:152 msgid "One-chip color area sensor" msgstr "Jednoukładowy czujnik obszaru koloru" #: libexif-gtk/gtk-exif-entry-option.c:153 msgid "Two-chip color area sensor" msgstr "Dwuukładowy czujnik obszaru koloru" #: libexif-gtk/gtk-exif-entry-option.c:154 msgid "Three-chip color area sensor" msgstr "Trzyukładowy czujnik obszaru koloru" #: libexif-gtk/gtk-exif-entry-option.c:155 msgid "Color sequential area sensor" msgstr "Czujnik sekwencyjny obszaru koloru" #: libexif-gtk/gtk-exif-entry-option.c:156 msgid "Trilinear sensor" msgstr "Czujnik trzyliniowy" #: libexif-gtk/gtk-exif-entry-option.c:157 msgid "Color sequential linear sensor" msgstr "Czujnik sekwencyjny liniowy koloru" #: libexif-gtk/gtk-exif-entry-option.c:162 msgid "Uncompressed" msgstr "Bez kompresji" #: libexif-gtk/gtk-exif-entry-option.c:163 msgid "JPEG compression" msgstr "Kompresja JPEG" #: libexif-gtk/gtk-exif-entry-option.c:168 #: libexif-gtk/gtk-exif-entry-option.c:180 msgid "Unknown" msgstr "Brak informacji" #: libexif-gtk/gtk-exif-entry-option.c:169 msgid "Average" msgstr "Średnia" #: libexif-gtk/gtk-exif-entry-option.c:170 msgid "Center-Weighted Average" msgstr "Średnia centralnie ważona" #: libexif-gtk/gtk-exif-entry-option.c:171 msgid "Spot" msgstr "Punktowy" #: libexif-gtk/gtk-exif-entry-option.c:172 msgid "Multi Spot" msgstr "Wielopunktowy" #: libexif-gtk/gtk-exif-entry-option.c:173 msgid "Pattern" msgstr "Wzorzec" #: libexif-gtk/gtk-exif-entry-option.c:174 msgid "Partial" msgstr "Częściowy" #: libexif-gtk/gtk-exif-entry-option.c:175 #: libexif-gtk/gtk-exif-entry-option.c:199 msgid "Other" msgstr "Inny" #: libexif-gtk/gtk-exif-entry-option.c:181 msgid "Daylight" msgstr "Światło dzienne" #: libexif-gtk/gtk-exif-entry-option.c:182 msgid "Fluorescent" msgstr "Fluorescencja" #: libexif-gtk/gtk-exif-entry-option.c:183 msgid "Tungsten" msgstr "Wolfram" #: libexif-gtk/gtk-exif-entry-option.c:184 msgid "Flash" msgstr "Flesz" #: libexif-gtk/gtk-exif-entry-option.c:185 msgid "Fine weather" msgstr "Dobra pogoda" #: libexif-gtk/gtk-exif-entry-option.c:186 msgid "Cloudy weather" msgstr "Pochmurna pogoda" #: libexif-gtk/gtk-exif-entry-option.c:187 msgid "Shade" msgstr "Cień" #: libexif-gtk/gtk-exif-entry-option.c:188 msgid "Daylight fluorescent" msgstr "Fluorescencyjne światło dzienne" #: libexif-gtk/gtk-exif-entry-option.c:189 msgid "Day white fluorescent" msgstr "Białe fluorescencyjne światło dzienne" #: libexif-gtk/gtk-exif-entry-option.c:190 msgid "Cool white fluorescent" msgstr "Zimne białe światło fluorescencyjne" #: libexif-gtk/gtk-exif-entry-option.c:191 msgid "White fluorescent" msgstr "Białe światło fluorescencyjne" #: libexif-gtk/gtk-exif-entry-option.c:192 msgid "Standard light A" msgstr "Światło standardowe A" #: libexif-gtk/gtk-exif-entry-option.c:193 msgid "Standard light B" msgstr "Światło standardowe B" #: libexif-gtk/gtk-exif-entry-option.c:194 msgid "Standard light C" msgstr "Światło standardowe C" #: libexif-gtk/gtk-exif-entry-option.c:195 msgid "D55" msgstr "D55" #: libexif-gtk/gtk-exif-entry-option.c:196 msgid "D65" msgstr "D65" #: libexif-gtk/gtk-exif-entry-option.c:197 msgid "D75" msgstr "D75" #: libexif-gtk/gtk-exif-entry-option.c:198 msgid "ISO studio tungsten" msgstr "Wolframowe oświetlenie studyjne ISO" #: libexif-gtk/gtk-exif-entry-option.c:204 msgid "top - left" msgstr "lewy górny róg" #: libexif-gtk/gtk-exif-entry-option.c:205 msgid "top - right" msgstr "prawy górny róg" #: libexif-gtk/gtk-exif-entry-option.c:206 msgid "bottom - right" msgstr "prawy dolny róg" #: libexif-gtk/gtk-exif-entry-option.c:207 msgid "bottom - left" msgstr "Lewy dolny róg" #: libexif-gtk/gtk-exif-entry-option.c:208 msgid "left - top" msgstr "lewo - góra" #: libexif-gtk/gtk-exif-entry-option.c:209 msgid "right - top" msgstr "prawo - góra" #: libexif-gtk/gtk-exif-entry-option.c:210 msgid "right - bottom" msgstr "prawo - dół" #: libexif-gtk/gtk-exif-entry-option.c:211 msgid "left - bottom" msgstr "lewo - dół" #: libexif-gtk/gtk-exif-entry-option.c:216 msgid "centered" msgstr "wyśrodkowane" #: libexif-gtk/gtk-exif-entry-option.c:217 msgid "co-sited" msgstr "położone razem" #: libexif-gtk/gtk-exif-entry-option.c:223 msgid "Manual" msgstr "Ręczny" #: libexif-gtk/gtk-exif-entry-option.c:224 msgid "Normal program" msgstr "Program zwykły" #: libexif-gtk/gtk-exif-entry-option.c:225 msgid "Aperture priority" msgstr "Priorytet przysłony" #: libexif-gtk/gtk-exif-entry-option.c:226 msgid "Shutter priority" msgstr "Priorytet migawki" #: libexif-gtk/gtk-exif-entry-option.c:227 msgid "Creative program (biased toward depth of field)" msgstr "Program twórczy (nakierowany na głębię obrazu)" #: libexif-gtk/gtk-exif-entry-option.c:228 msgid "Action program (biased toward fast shutter speed)" msgstr "Program akcji (nakierowany na szybkość migawki)" #: libexif-gtk/gtk-exif-entry-option.c:229 msgid "Portrait mode (for closeup photos with the background out of focus)" msgstr "Tryb portretowy (do zbliżeń z tłem poza ogniskiem)" #: libexif-gtk/gtk-exif-entry-option.c:231 msgid "Landscape mode (for landscape photos with the background in focus)" msgstr "Tryb pejzażowy (do krajobrazów z tłem w ognisku)" #: libexif-gtk/gtk-exif-entry-option.c:260 msgid "Sensing method:" msgstr "Metoda pomiaru:" #: libexif-gtk/gtk-exif-entry-option.c:264 msgid "0-th row - 0-th column:" msgstr "wiersz 0. - kolumna 0.:" #: libexif-gtk/gtk-exif-entry-option.c:268 msgid "Light source:" msgstr "Źródło światła" #: libexif-gtk/gtk-exif-entry-option.c:272 msgid "Metering mode:" msgstr "Tryb pomiaru:" #: libexif-gtk/gtk-exif-entry-option.c:276 msgid "Compression scheme:" msgstr "Schemat kompresji:" #: libexif-gtk/gtk-exif-entry-option.c:280 msgid "YCbCr Positioning:" msgstr "Pozycja YCbCr:" #: libexif-gtk/gtk-exif-entry-option.c:284 msgid "Exposure Program:" msgstr "Program ekspozycji:" #: libexif-gtk/gtk-exif-entry-resolution.c:404 msgid "Focal Plane Resolution" msgstr "Rozdzielczość płaszczyzny odwzorowania" #: libexif-gtk/gtk-exif-entry-resolution.c:405 msgid "The number of pixels on the camera focal plane." msgstr "Liczba pikseli na płaszczyźnie odwzorowania aparatu." #: libexif-gtk/gtk-exif-entry-resolution.c:411 msgid "Resolution" msgstr "Rozdzielczość" #: libexif-gtk/gtk-exif-entry-resolution.c:412 msgid "The number of pixels per unit." msgstr "Liczba pikseli na jednostkę." #: libexif-gtk/gtk-exif-entry-resolution.c:423 msgid "Image width direction:" msgstr "Kierunek szerokości obrazu:" #: libexif-gtk/gtk-exif-entry-resolution.c:459 msgid "Image height direction:" msgstr "Kierunek wysokości obrazu:" #: libexif-gtk/gtk-exif-entry-resolution.c:495 msgid "Unit:" msgstr "Jednostka:" #: libexif-gtk/gtk-exif-entry-resolution.c:507 msgid "Centimeter" msgstr "Centymetr" #: libexif-gtk/gtk-exif-entry-resolution.c:511 msgid "Inch" msgstr "Cal" #: libexif-gtk/gtk-exif-entry-user-comment.c:224 msgid "ASCII" msgstr "ASCII" #: libexif-gtk/gtk-exif-entry-user-comment.c:225 msgid "JIS" msgstr "JIS" #: libexif-gtk/gtk-exif-entry-user-comment.c:226 msgid "Unicode" msgstr "Unicode" #: libexif-gtk/gtk-exif-entry-user-comment.c:227 msgid "Undefined" msgstr "Nieokreślony" #: libexif-gtk/gtk-exif-entry-user-comment.c:261 msgid "Character Code:" msgstr "Kod znaku:" #: libexif-gtk/gtk-exif-entry-version.c:136 msgid "Exif Format Version 2.0" msgstr "Format Exif wersja 2.0" #: libexif-gtk/gtk-exif-entry-version.c:137 msgid "Exif Format Version 2.1" msgstr "Format Exif wersja 2.1" #: libexif-gtk/gtk-exif-entry-version.c:138 msgid "Exif Format Version 2.2" msgstr "Format Exif wersja 2.2" #: libexif-gtk/gtk-exif-entry-version.c:139 msgid "Exif Format Version 2.21" msgstr "Format Exif wersja 2.21" #: libexif-gtk/gtk-exif-entry-version.c:140 msgid "Exif Format Version 2.3" msgstr "Format Exif wersja 2.3" #: libexif-gtk/gtk-exif-entry-version.c:145 msgid "FlashPix Format Version 1.0" msgstr "Format FlashPix wersja 1.0" #: libexif-gtk/gtk-exif-entry-version.c:146 msgid "FlashPix Format Version 1.01" msgstr "Format FlashPix wersja 1.01" #: libexif-gtk/gtk-exif-entry-version.c:284 msgid "Version:" msgstr "Wersja:" libexif-gtk-0.4.0/po/ru.po000664 000000 000000 00000027045 12115730414 015312 0ustar00rootroot000000 000000 # Russian Translation # Copyright © 2003 Free Software Foundation, Inc. # This file is distributed under the same license as the libexif-gtk package. # Вячеслав Диконов (Vyachelav Dikonov) , 2003. # Alexandre Prokoudine , 2006. # msgid "" msgstr "" "Project-Id-Version: libexif-gtk 0.3.6cvs3\n" "Report-Msgid-Bugs-To: libexif-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2013-02-23 20:11+0100\n" "PO-Revision-Date: 2013-02-28 22:00+0100\n" "Last-Translator: Вячеслав Диконов \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: libexif-gtk/gtk-exif-browser.c:157 msgid "Nothing selected." msgstr "" #: libexif-gtk/gtk-exif-browser.c:408 msgid "No thumbnail available." msgstr "Нет миниатюрного изображения." #: libexif-gtk/gtk-exif-browser.c:416 #, fuzzy msgid "Corrupt thumbnail image." msgstr "Нет миниатюрного изображения." #: libexif-gtk/gtk-exif-browser.c:431 #, c-format msgid "Size: %i bytes." msgstr "Размер: %i байт." #: libexif-gtk/gtk-exif-browser.c:495 msgid "Load..." msgstr "Загрузить..." #: libexif-gtk/gtk-exif-browser.c:534 msgid "Save As..." msgstr "Сохранить как..." #: libexif-gtk/gtk-exif-browser.c:592 msgid "Thumbnail" msgstr "Эскиз" #: libexif-gtk/gtk-exif-browser.c:609 msgid "Load" msgstr "Загрузить" #: libexif-gtk/gtk-exif-browser.c:614 msgid "Save" msgstr "Сохранить" #: libexif-gtk/gtk-exif-browser.c:619 msgid "Delete" msgstr "Удалить" #: libexif-gtk/gtk-exif-content-list.c:178 msgid "Tag" msgstr "" #: libexif-gtk/gtk-exif-content-list.c:184 msgid "Value" msgstr "Значение" #: libexif-gtk/gtk-exif-content-list.c:272 msgid "Add" msgstr "Добавить" #: libexif-gtk/gtk-exif-content-list.c:359 msgid "Remove" msgstr "" #: libexif-gtk/gtk-exif-entry-copyright.c:167 msgid "Photographer:" msgstr "" #: libexif-gtk/gtk-exif-entry-copyright.c:173 msgid "Editor:" msgstr "" #: libexif-gtk/gtk-exif-entry-date.c:222 msgid "Time:" msgstr "" #: libexif-gtk/gtk-exif-entry-flash.c:163 msgid "Flash fired" msgstr "Вспышка сработала" #: libexif-gtk/gtk-exif-entry-flash.c:172 msgid "Return light" msgstr "" #: libexif-gtk/gtk-exif-entry-flash.c:180 msgid "No strobe return detection function" msgstr "" #: libexif-gtk/gtk-exif-entry-flash.c:193 msgid "Strobe return light not detected" msgstr "" #: libexif-gtk/gtk-exif-entry-flash.c:205 msgid "Strobe return light detected" msgstr "" #: libexif-gtk/gtk-exif-entry-generic.c:139 #, fuzzy msgid "Format:" msgstr "Формат:" #: libexif-gtk/gtk-exif-entry-generic.c:149 msgid "Components:" msgstr "" #: libexif-gtk/gtk-exif-entry-generic.c:158 msgid "Size:" msgstr "" #: libexif-gtk/gtk-exif-entry-generic.c:167 #: libexif-gtk/gtk-exif-entry-number.c:250 #: libexif-gtk/gtk-exif-entry-rational.c:253 msgid "Value:" msgstr "" #: libexif-gtk/gtk-exif-entry-number.c:248 #: libexif-gtk/gtk-exif-entry-rational.c:251 #, c-format msgid "Value %i:" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:151 #: libexif-gtk/gtk-exif-entry-option.c:222 msgid "Not defined" msgstr "Не определено" #: libexif-gtk/gtk-exif-entry-option.c:152 msgid "One-chip color area sensor" msgstr "Одночиповый датчик цветовой области" #: libexif-gtk/gtk-exif-entry-option.c:153 msgid "Two-chip color area sensor" msgstr "Двухчиповый датчик цветовой области" #: libexif-gtk/gtk-exif-entry-option.c:154 msgid "Three-chip color area sensor" msgstr "Трехчиповый датчик цветовой области" #: libexif-gtk/gtk-exif-entry-option.c:155 msgid "Color sequential area sensor" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:156 msgid "Trilinear sensor" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:157 msgid "Color sequential linear sensor" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:162 msgid "Uncompressed" msgstr "Несжатый" #: libexif-gtk/gtk-exif-entry-option.c:163 msgid "JPEG compression" msgstr "Сжатие JPEG" #: libexif-gtk/gtk-exif-entry-option.c:168 #: libexif-gtk/gtk-exif-entry-option.c:180 msgid "Unknown" msgstr "Неизвестно" #: libexif-gtk/gtk-exif-entry-option.c:169 msgid "Average" msgstr "Средний" #: libexif-gtk/gtk-exif-entry-option.c:170 msgid "Center-Weighted Average" msgstr "Центрально-взвешенный средний" #: libexif-gtk/gtk-exif-entry-option.c:171 msgid "Spot" msgstr "Точечный замер" #: libexif-gtk/gtk-exif-entry-option.c:172 msgid "Multi Spot" msgstr "По многим точкам" #: libexif-gtk/gtk-exif-entry-option.c:173 msgid "Pattern" msgstr "Шаблон" #: libexif-gtk/gtk-exif-entry-option.c:174 msgid "Partial" msgstr "Частичный замер" #: libexif-gtk/gtk-exif-entry-option.c:175 #: libexif-gtk/gtk-exif-entry-option.c:199 msgid "Other" msgstr "Другое" #: libexif-gtk/gtk-exif-entry-option.c:181 msgid "Daylight" msgstr "Дневной свет" #: libexif-gtk/gtk-exif-entry-option.c:182 msgid "Fluorescent" msgstr "Флуоресцентная лампа" #: libexif-gtk/gtk-exif-entry-option.c:183 msgid "Tungsten" msgstr "Лампа накаливания" #: libexif-gtk/gtk-exif-entry-option.c:184 msgid "Flash" msgstr "Вспышка" #: libexif-gtk/gtk-exif-entry-option.c:185 msgid "Fine weather" msgstr "Ясная погода" #: libexif-gtk/gtk-exif-entry-option.c:186 msgid "Cloudy weather" msgstr "Облачность" #: libexif-gtk/gtk-exif-entry-option.c:187 msgid "Shade" msgstr "Тень" #: libexif-gtk/gtk-exif-entry-option.c:188 msgid "Daylight fluorescent" msgstr "Флуоресцентная лампа дневного света" #: libexif-gtk/gtk-exif-entry-option.c:189 msgid "Day white fluorescent" msgstr "Белая лампа дневного света" #: libexif-gtk/gtk-exif-entry-option.c:190 #, fuzzy msgid "Cool white fluorescent" msgstr "Флуоресцентная лампа" #: libexif-gtk/gtk-exif-entry-option.c:191 msgid "White fluorescent" msgstr "Белая газоразрядная лампа" #: libexif-gtk/gtk-exif-entry-option.c:192 msgid "Standard light A" msgstr "Стандартный свет A" #: libexif-gtk/gtk-exif-entry-option.c:193 msgid "Standard light B" msgstr "Стандартный свет B" #: libexif-gtk/gtk-exif-entry-option.c:194 msgid "Standard light C" msgstr "Стандартный свет C" #: libexif-gtk/gtk-exif-entry-option.c:195 msgid "D55" msgstr "D55" #: libexif-gtk/gtk-exif-entry-option.c:196 msgid "D65" msgstr "D65" #: libexif-gtk/gtk-exif-entry-option.c:197 msgid "D75" msgstr "D75" #: libexif-gtk/gtk-exif-entry-option.c:198 msgid "ISO studio tungsten" msgstr "Студийное вольфрамовое освещение ISO" #: libexif-gtk/gtk-exif-entry-option.c:204 msgid "top - left" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:205 msgid "top - right" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:206 msgid "bottom - right" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:207 msgid "bottom - left" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:208 msgid "left - top" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:209 msgid "right - top" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:210 msgid "right - bottom" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:211 msgid "left - bottom" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:216 msgid "centered" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:217 msgid "co-sited" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:223 msgid "Manual" msgstr "Ручная" #: libexif-gtk/gtk-exif-entry-option.c:224 msgid "Normal program" msgstr "Нормальная программа" #: libexif-gtk/gtk-exif-entry-option.c:225 msgid "Aperture priority" msgstr "Приоритет диафрагмы" #: libexif-gtk/gtk-exif-entry-option.c:226 msgid "Shutter priority" msgstr "Приоритет выдержки" #: libexif-gtk/gtk-exif-entry-option.c:227 msgid "Creative program (biased toward depth of field)" msgstr "Творческая программа (с приоритетом глубины резкости)" #: libexif-gtk/gtk-exif-entry-option.c:228 msgid "Action program (biased toward fast shutter speed)" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:229 msgid "Portrait mode (for closeup photos with the background out of focus)" msgstr "" "Портретный режим (съёмка с близкого расстояния с передним планом вне фокуса)" #: libexif-gtk/gtk-exif-entry-option.c:231 msgid "Landscape mode (for landscape photos with the background in focus)" msgstr "Альбомный режим (для альбомных фото с передним планом в фокусе)" #: libexif-gtk/gtk-exif-entry-option.c:260 msgid "Sensing method:" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:264 msgid "0-th row - 0-th column:" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:268 msgid "Light source:" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:272 msgid "Metering mode:" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:276 msgid "Compression scheme:" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:280 msgid "YCbCr Positioning:" msgstr "" #: libexif-gtk/gtk-exif-entry-option.c:284 msgid "Exposure Program:" msgstr "" #: libexif-gtk/gtk-exif-entry-resolution.c:404 msgid "Focal Plane Resolution" msgstr "" #: libexif-gtk/gtk-exif-entry-resolution.c:405 msgid "The number of pixels on the camera focal plane." msgstr "" #: libexif-gtk/gtk-exif-entry-resolution.c:411 #, fuzzy msgid "Resolution" msgstr "Разрешение" #: libexif-gtk/gtk-exif-entry-resolution.c:412 msgid "The number of pixels per unit." msgstr "" #: libexif-gtk/gtk-exif-entry-resolution.c:423 msgid "Image width direction:" msgstr "" #: libexif-gtk/gtk-exif-entry-resolution.c:459 msgid "Image height direction:" msgstr "" #: libexif-gtk/gtk-exif-entry-resolution.c:495 msgid "Unit:" msgstr "Подразделение:" #: libexif-gtk/gtk-exif-entry-resolution.c:507 msgid "Centimeter" msgstr "Сантиметр" #: libexif-gtk/gtk-exif-entry-resolution.c:511 msgid "Inch" msgstr "Дюйм" #: libexif-gtk/gtk-exif-entry-user-comment.c:224 msgid "ASCII" msgstr "ASCII" #: libexif-gtk/gtk-exif-entry-user-comment.c:225 #, fuzzy msgid "JIS" msgstr "JIS" #: libexif-gtk/gtk-exif-entry-user-comment.c:226 msgid "Unicode" msgstr "Юникод (Unicode)" #: libexif-gtk/gtk-exif-entry-user-comment.c:227 msgid "Undefined" msgstr "Не определено" #: libexif-gtk/gtk-exif-entry-user-comment.c:261 msgid "Character Code:" msgstr "" #: libexif-gtk/gtk-exif-entry-version.c:136 msgid "Exif Format Version 2.0" msgstr "" #: libexif-gtk/gtk-exif-entry-version.c:137 msgid "Exif Format Version 2.1" msgstr "" #: libexif-gtk/gtk-exif-entry-version.c:138 msgid "Exif Format Version 2.2" msgstr "" #: libexif-gtk/gtk-exif-entry-version.c:139 msgid "Exif Format Version 2.21" msgstr "" #: libexif-gtk/gtk-exif-entry-version.c:140 msgid "Exif Format Version 2.3" msgstr "" #: libexif-gtk/gtk-exif-entry-version.c:145 #, fuzzy msgid "FlashPix Format Version 1.0" msgstr "FlashPix версии 1.0" #: libexif-gtk/gtk-exif-entry-version.c:146 #, fuzzy msgid "FlashPix Format Version 1.01" msgstr "FlashPix версии 1.01" #: libexif-gtk/gtk-exif-entry-version.c:284 #, fuzzy msgid "Version:" msgstr "Версия:" libexif-gtk-0.4.0/tests/000775 000000 000000 00000000000 12115730414 015040 5ustar00rootroot000000 000000 libexif-gtk-0.4.0/tests/Makefile.am000664 000000 000000 00000000507 12115730414 017076 0ustar00rootroot000000 000000 noinst_PROGRAMS = test-libexif-gtk test_libexif_gtk_CFLAGS = \ $(AM_CFLAGS) $(CFLAGS) \ -I$(top_srcdir) \ $(LIBEXIF_CFLAGS) \ $(GTK_CFLAGS) test_libexif_gtk_LDADD = \ $(AM_LDFLAGS) $(LDFLAGS) \ $(top_builddir)/libexif-gtk/libexif-@LIBEXIF_GTK_EXTENSION@.la \ $(LIBEXIF_LIBS) \ $(GTK_LIBS) \ $(INTLLIBS) libexif-gtk-0.4.0/tests/test-libexif-gtk.c000664 000000 000000 00000003066 12115730414 020373 0ustar00rootroot000000 000000 /* test-libexif-gtk.c * * Copyright © 2002 Lutz Müller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "config.h" #include #include int main (int argc, char **argv) { GtkWidget *w, *b; ExifData *ed; if (argc != 2) g_error ("You need to supply exactly one file to load."); g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL); gtk_init (&argc, &argv); w = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_show (w); b = gtk_exif_browser_new (); ed = exif_data_new_from_file (argv[1]); if (!ed) g_error ("Could not load EXIF data from '%s'.", argv[1]); gtk_exif_browser_set_data (GTK_EXIF_BROWSER (b), ed); gtk_widget_show (b); gtk_container_add (GTK_CONTAINER (w), b); g_signal_connect (G_OBJECT (w), "delete_event", G_CALLBACK (gtk_main_quit), NULL); gtk_main (); return (0); }