gnome-commander r1953 - in trunk: . data doc/C po src src/tags
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r1953 - in trunk: . data doc/C po src src/tags
- Date: Fri, 8 Aug 2008 23:37:02 +0000 (UTC)
Author: epiotr
Date: Fri Aug 8 23:37:02 2008
New Revision: 1953
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1953&view=rev
Log:
Support for PDF metatags
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/README.in
trunk/TODO
trunk/configure.in
trunk/data/gnome-commander.spec.in
trunk/doc/C/gnome-commander.xml
trunk/po/POTFILES.in
trunk/src/Makefile.am
trunk/src/gnome-cmd-advrename-dialog.cc
trunk/src/gnome-cmd-advrename-lexer.ll
trunk/src/gnome-cmd-file-props-dialog.cc
trunk/src/tags/Makefile.am
trunk/src/tags/gnome-cmd-tags.cc
trunk/src/tags/gnome-cmd-tags.h
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Fri Aug 8 23:37:02 2008
@@ -6,6 +6,7 @@
* Fixed problem #536446 (file name not focused for in-place renaming)
New features:
+ * Support for PDF metatags in advanced file rename templates
* New or updated docs: de, en
* New or updated translations: ar
* New key bindings:
Modified: trunk/README.in
==============================================================================
--- trunk/README.in (original)
+++ trunk/README.in Fri Aug 8 23:37:02 2008
@@ -89,6 +89,9 @@
* libgsf >= @LIBGSF_REQ@
Optional - for OLE and ODF support.
+ * poppler >= @POPPLER_REQ@
+ Optional - for PDF support.
+
Simple install procedure:
Modified: trunk/TODO
==============================================================================
--- trunk/TODO (original)
+++ trunk/TODO Fri Aug 8 23:37:02 2008
@@ -55,7 +55,7 @@
* The advrename dialog should have a feature to convert between upper/lowercase
* Addressing components of a regexp in the replacement text (\0, \1, ..., \9)
-* Support for file meta tags (icc, *ml, pdf, video, ...)
+* Support for file meta tags (icc, *ml, video, ...)
// Internal viewer
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Fri Aug 8 23:37:02 2008
@@ -52,6 +52,7 @@
EXIV2_REQ=0.14
TAGLIB_REQ=1.4
LIBGSF_REQ=1.12.0
+POPPLER_REQ=0.6
AC_SUBST(GLIB_REQ)
AC_SUBST(GTK_REQ)
@@ -61,6 +62,7 @@
AC_SUBST(EXIV2_REQ)
AC_SUBST(TAGLIB_REQ)
AC_SUBST(LIBGSF_REQ)
+AC_SUBST(POPPLER_REQ)
dnl Check for glib
AC_MSG_CHECKING(if glib >= ${GLIB_REQ} exists)
@@ -229,7 +231,18 @@
PKG_CHECK_MODULES(GSF, libgsf-1 >= $LIBGSF_REQ, have_gsf=yes, have_gsf=no)
fi
if test "x$have_gsf" = "xyes"; then
- AC_DEFINE(HAVE_GSF, 1, [Define to 1 if you have libgsf support])
+ AC_DEFINE(HAVE_GSF, 1, [Define to 1 if you have libgsf (OLE and ODF) support])
+fi
+
+
+dnl Check for poppler support
+AC_ARG_WITH(poppler, [ --without-poppler disable PDF support])
+have_pdf=no
+if test x$with_poppler != xno; then
+ PKG_CHECK_MODULES(POPPLER, poppler >= $POPPLER_REQ, have_pdf=yes, have_pdf=no)
+fi
+if test "x$have_pdf" = "xyes"; then
+ AC_DEFINE(HAVE_PDF, 1, [Define to 1 if you have PDF support])
fi
@@ -414,6 +427,7 @@
echo " FLAC support : ${have_taglib}"
echo " OLE2 support : ${have_gsf}"
echo " ODF support : ${have_gsf}"
+echo " PDF support : ${have_pdf}"
echo ""
echo ""
echo "The following libraries will be used:"
Modified: trunk/data/gnome-commander.spec.in
==============================================================================
--- trunk/data/gnome-commander.spec.in (original)
+++ trunk/data/gnome-commander.spec.in Fri Aug 8 23:37:02 2008
@@ -18,6 +18,7 @@
%define exiv2_ver @EXIV2_REQ@
%define taglib_ver @TAGLIB_REQ@
%define libgsf_ver @LIBGSF_REQ@
+%define poppler_ver @POPPLER_REQ@
Name: @PACKAGE@
Version: @VERSION@
@@ -58,10 +59,11 @@
BuildRequires: python-devel >= %{python_ver}
BuildRequires: exiv2-devel >= %{exiv2_ver}
-Requires: taglib-devel >= %{taglib_ver}
+BuildRequires: taglib-devel >= %{taglib_ver}
%if 0%{?fedora} >= 6
BuildRequires: libgsf-devel >= %{libgsf_ver}
%endif
+BuildRequires: poppler-devel >= %{poppler_ver}
Requires: python >= %{python_ver}
Requires: gnome-python2-gnomevfs
@@ -70,10 +72,11 @@
%if 0%{?fedora} >= 6
Requires: libgsf >= %{libgsf_ver}
%endif
+Requires: poppler >= %{poppler_ver}
%description
GNOME Commander is a nice and fast file manager for the GNOME desktop.
-In addition to performing the basic filemanager functions the program is
+In addition to performing the basic file manager functions the program is
also an FTP-client and it can browse SMB-networks.
%description -l cs
@@ -153,6 +156,9 @@
%{_datadir}/pixmaps/%{name}/
%changelog
+* Thu 7 Aug 2008 Piotr Eljasiak <epiotr use pl>
+- added poppler dependencies
+
* Fri Jul 11 2008 Piotr Eljasiak <epiotr use pl>
- added build deps
Modified: trunk/doc/C/gnome-commander.xml
==============================================================================
--- trunk/doc/C/gnome-commander.xml (original)
+++ trunk/doc/C/gnome-commander.xml Fri Aug 8 23:37:02 2008
@@ -227,7 +227,7 @@
<para>Fast file viewer for text and images</para>
</listitem>
<listitem>
- <para>Meta data support for Exif, IPTC, ID3, Vorbis, FLAC, APE, OLE2 and ODF tags</para>
+ <para>Meta data support for Exif, IPTC, ID3, Vorbis, FLAC, APE, OLE2, ODF and PDF tags</para>
</listitem>
<listitem>
<para>Tools for advanced batch renaming of files, searching, quick file name searching in current dir,
@@ -5936,7 +5936,7 @@
<para>
<itemizedlist>
<listitem>
- <para>...</para>
+ <para>Support for PDF metatags in advanced file rename templates</para>
</listitem>
<listitem>
<para>New or updated docs: de, en</para>
Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in (original)
+++ trunk/po/POTFILES.in Fri Aug 8 23:37:02 2008
@@ -70,6 +70,7 @@
src/tags/gnome-cmd-tags.cc
src/tags/gnome-cmd-tags-doc.cc
src/tags/gnome-cmd-tags-exiv2.cc
+src/tags/gnome-cmd-tags-poppler.cc
src/tags/gnome-cmd-tags-taglib.cc
src/utils.cc
src/utils.h
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Fri Aug 8 23:37:02 2008
@@ -98,6 +98,7 @@
$(TAGLIB_LIBS) \
$(CHM_LIBS) \
$(GSF_LIBS) \
+ $(POPPLER_LIBS) \
$(PYTHON_LIBS) \
$(PYTHON_EXTRA_LIBS) \
$(top_builddir)/libgcmd/libgcmd.la \
Modified: trunk/src/gnome-cmd-advrename-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-advrename-dialog.cc (original)
+++ trunk/src/gnome-cmd-advrename-dialog.cc Fri Aug 8 23:37:02 2008
@@ -273,6 +273,12 @@
TAG_ID3_WWWCOPYRIGHT, TAG_ID3_WWWPAYMENT, TAG_ID3_WWWPUBLISHER,
TAG_ID3_WWWRADIOPAGE, TAG_ID3_WWWUSER,
+ TAG_VORBIS_CONTACT, TAG_VORBIS_DESCRIPTION,
+ TAG_VORBIS_LICENSE, TAG_VORBIS_LOCATION,
+ TAG_VORBIS_MAXBITRATE, TAG_VORBIS_MINBITRATE,
+ TAG_VORBIS_NOMINALBITRATE, TAG_VORBIS_ORGANIZATION,
+ TAG_VORBIS_VENDOR, TAG_VORBIS_VERSION,
+
TAG_EXIF_COPYRIGHT, TAG_EXIF_DATETIME,
TAG_EXIF_EXPOSUREBIASVALUE, TAG_EXIF_EXPOSUREMODE, TAG_EXIF_EXPOSUREPROGRAM,
TAG_EXIF_FLASH, TAG_EXIF_FLASHENERGY,
@@ -354,11 +360,18 @@
TAG_IPTC_SUPPLCATEGORY, TAG_IPTC_TIMECREATED, TAG_IPTC_TIMESENT, TAG_IPTC_UNO,
TAG_IPTC_URGENCY, TAG_IPTC_WRITEREDITOR,
- TAG_VORBIS_CONTACT, TAG_VORBIS_DESCRIPTION,
- TAG_VORBIS_LICENSE, TAG_VORBIS_LOCATION,
- TAG_VORBIS_MAXBITRATE, TAG_VORBIS_MINBITRATE,
- TAG_VORBIS_NOMINALBITRATE, TAG_VORBIS_ORGANIZATION,
- TAG_VORBIS_VENDOR, TAG_VORBIS_VERSION
+ TAG_PDF_PAGESIZE, TAG_PDF_PAGEWIDTH, TAG_PDF_PAGEHEIGHT,
+ TAG_PDF_VERSION, TAG_PDF_PRODUCER,
+ TAG_PDF_EMBEDDEDFILES,
+ TAG_PDF_OPTIMIZED,
+ TAG_PDF_PRINTING,
+ TAG_PDF_HIRESPRINTING,
+ TAG_PDF_COPYING,
+ TAG_PDF_MODIFYING,
+ TAG_PDF_DOCASSEMBLY,
+ TAG_PDF_COMMENTING,
+ TAG_PDF_FORMFILLING,
+ TAG_PDF_ACCESSIBILITYSUPPORT
};
GtkItemFactoryEntry *items[] = {dir_items,
Modified: trunk/src/gnome-cmd-advrename-lexer.ll
==============================================================================
--- trunk/src/gnome-cmd-advrename-lexer.ll (original)
+++ trunk/src/gnome-cmd-advrename-lexer.ll Fri Aug 8 23:37:02 2008
@@ -111,10 +111,11 @@
id3 [iI][dD]3
image [iI][mM][aA][gG][eE]
iptc [iI][pP][tT][cC]
+pdf [pP][dD][fF]
rpm [rR][pP][mM]
vorbis [vV][oO][rR][bB][iI][sS]
-tag_name {ape}|{audio}|{doc}|{exif}|{file}|{flac}|{id3}|{image}|{iptc}|{vorbis}
+tag_name {ape}|{audio}|{doc}|{exif}|{file}|{flac}|{id3}|{image}|{iptc}|{pdf}|{vorbis}
%%
Modified: trunk/src/gnome-cmd-file-props-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-file-props-dialog.cc (original)
+++ trunk/src/gnome-cmd-file-props-dialog.cc Fri Aug 8 23:37:02 2008
@@ -462,6 +462,8 @@
{
add_tag (dialog, table, y, *data->finfo->metadata, TAG_FILE_DESCRIPTION);
add_tag (dialog, table, y, *data->finfo->metadata, TAG_FILE_PUBLISHER);
+ add_tag (dialog, table, y, *data->finfo->metadata, TAG_DOC_TITLE);
+ add_tag (dialog, table, y, *data->finfo->metadata, TAG_DOC_PAGECOUNT);
add_width_height_tag (dialog, table, y, *data->finfo->metadata);
add_tag (dialog, table, y, *data->finfo->metadata, TAG_AUDIO_ALBUMARTIST);
add_tag (dialog, table, y, *data->finfo->metadata, TAG_AUDIO_TITLE);
Modified: trunk/src/tags/Makefile.am
==============================================================================
--- trunk/src/tags/Makefile.am (original)
+++ trunk/src/tags/Makefile.am Fri Aug 8 23:37:02 2008
@@ -12,11 +12,13 @@
$(TAGLIB_CFLAGS) \
$(CHM_CFLAGS) \
$(GSF_CFLAGS) \
+ $(POPPLER_CFLAGS) \
-DPLUGIN_DIR=\""$(libdir)/$(PACKAGE)/plugins"\"
libgcmd_tags_a_SOURCES = \
gnome-cmd-tags.h gnome-cmd-tags.cc \
- gnome-cmd-tags-file.h gnome-cmd-tags-file.cc \
- gnome-cmd-tags-taglib.h gnome-cmd-tags-taglib.cc \
gnome-cmd-tags-doc.h gnome-cmd-tags-doc.cc \
- gnome-cmd-tags-exiv2.h gnome-cmd-tags-exiv2.cc
+ gnome-cmd-tags-exiv2.h gnome-cmd-tags-exiv2.cc \
+ gnome-cmd-tags-file.h gnome-cmd-tags-file.cc \
+ gnome-cmd-tags-poppler.h gnome-cmd-tags-poppler.cc \
+ gnome-cmd-tags-taglib.h gnome-cmd-tags-taglib.cc
Modified: trunk/src/tags/gnome-cmd-tags.cc
==============================================================================
--- trunk/src/tags/gnome-cmd-tags.cc (original)
+++ trunk/src/tags/gnome-cmd-tags.cc Fri Aug 8 23:37:02 2008
@@ -30,6 +30,7 @@
#include "gnome-cmd-tags-exiv2.h"
#include "gnome-cmd-tags-taglib.h"
#include "gnome-cmd-tags-doc.h"
+#include "gnome-cmd-tags-poppler.h"
#include "utils.h"
#include "dict.h"
@@ -70,6 +71,10 @@
static char no_support_for_libgsf_tags_string[] = N_("<OLE2 and ODF tags not supported>");
#endif
+#ifndef HAVE_PDF
+static char no_support_for_poppler_tags_string[] = N_("<PDF tags not supported>");
+#endif
+
void GnomeCmdFileMetadata::addf(const GnomeCmdTag tag, const gchar *fmt, ...)
{
@@ -504,6 +509,21 @@
{TAG_IPTC_UNO, {"IPTC.UNO", TAG_IPTC, N_("Unique Name of Object"), N_("An eternal, globally unique identification for the object, independent of provider and for any media form.")}},
{TAG_IPTC_URGENCY, {"IPTC.Urgency", TAG_IPTC, N_("Urgency"), N_("Specifies the editorial urgency of content and not necessarily the envelope handling priority. '1' is most urgent, '5' normal, and '8' least urgent.")}},
{TAG_IPTC_WRITEREDITOR, {"IPTC.WriterEditor", TAG_IPTC, N_("Writer/Editor"), N_("The name of the person involved in the writing, editing or correcting the object or caption/abstract (multiple values allowed)")}},
+ {TAG_PDF_PAGESIZE, {"PDF.PageSize", TAG_PDF, N_("Page Size"), N_("Page size format.")}},
+ {TAG_PDF_PAGEWIDTH, {"PDF.PageWidth", TAG_PDF, N_("Page Width"), N_("Page width in mm.")}},
+ {TAG_PDF_PAGEHEIGHT, {"PDF.PageHeight", TAG_PDF, N_("Page Height"), N_("Page height in mm.")}},
+ {TAG_PDF_VERSION, {"PDF.Version", TAG_PDF, N_("PDF Version"), N_("The PDF version of the document.")}},
+ {TAG_PDF_PRODUCER, {"PDF.Producer", TAG_PDF, N_("Producer"), N_("The application that converted the document to PDF.")}},
+ {TAG_PDF_EMBEDDEDFILES, {"PDF.EmbeddedFiles", TAG_PDF, N_("Embedded Files"), N_("Number of embedded files in the document.")}},
+ {TAG_PDF_OPTIMIZED, {"PDF.Optimized", TAG_PDF, N_("Fast Web View"), N_("Set to \"1\" if optimized for network access.")}},
+ {TAG_PDF_PRINTING, {"PDF.Printing", TAG_PDF, N_("Printing"), N_("Set to \"1\" if printing is allowed.")}},
+ {TAG_PDF_HIRESPRINTING, {"PDF.HiResPrinting", TAG_PDF, N_("Printing in High Resolution"), N_("Set to \"1\" if high resolution printing is allowed.")}},
+ {TAG_PDF_COPYING, {"PDF.Copying", TAG_PDF, N_("Copying"), N_("Set to \"1\" if copying the contents is allowed.")}},
+ {TAG_PDF_MODIFYING, {"PDF.Modifying", TAG_PDF, N_("Modifying"), N_("Set to \"1\" if modifying the contents is allowed.")}},
+ {TAG_PDF_DOCASSEMBLY, {"PDF.DocAssembly", TAG_PDF, N_("Document Assembly"), N_("Set to \"1\" if inserting, rotating, or deleting pages and creating navigation elements is allowed.")}},
+ {TAG_PDF_COMMENTING, {"PDF.Commenting", TAG_PDF, N_("Commenting"), N_("Set to \"1\" if adding or modifying text annotations is allowed.")}},
+ {TAG_PDF_FORMFILLING, {"PDF.FormFilling", TAG_PDF, N_("Form Filling"), N_("Set to \"1\" if filling of form fields is allowed.")}},
+ {TAG_PDF_ACCESSIBILITYSUPPORT, {"PDF.AccessibilitySupport", TAG_PDF, N_("Accessibility Support"), N_("Set to \"1\" if accessibility support (eg. screen readers) is enabled.")}},
{TAG_VORBIS_CONTACT, {"Vorbis.Contact", TAG_VORBIS, N_("Contact"), N_("Contact information for the creators or distributors of the track.")}},
{TAG_VORBIS_DESCRIPTION, {"Vorbis.Description", TAG_VORBIS, N_("Description"), N_("A textual description of the data.")}},
{TAG_VORBIS_LICENSE, {"Vorbis.License", TAG_VORBIS, N_("License"), N_("License information.")}},
@@ -521,6 +541,7 @@
gcmd_tags_exiv2_init();
gcmd_tags_taglib_init();
gcmd_tags_libgsf_init();
+ gcmd_tags_poppler_init();
}
@@ -529,6 +550,7 @@
gcmd_tags_exiv2_shutdown();
gcmd_tags_taglib_shutdown();
gcmd_tags_libgsf_shutdown();
+ gcmd_tags_poppler_shutdown();
}
@@ -540,6 +562,7 @@
gcmd_tags_exiv2_load_metadata(finfo);
gcmd_tags_taglib_load_metadata(finfo);
gcmd_tags_libgsf_load_metadata(finfo);
+ gcmd_tags_poppler_load_metadata(finfo);
return finfo->metadata;
}
@@ -597,6 +620,10 @@
t.name = "IPTC.";
break;
+ case TAG_PDF:
+ t.name = "PDF.";
+ break;
+
case TAG_RPM:
t.name = "RPM.";
break;
@@ -673,6 +700,9 @@
case TAG_IPTC:
return "IPTC";
+ case TAG_PDF:
+ return "PDF";
+
case TAG_RPM:
return "RPM";
@@ -724,6 +754,11 @@
return _(no_support_for_libgsf_tags_string);
#endif
gcmd_tags_libgsf_load_metadata(finfo);
+ case TAG_PDF :
+#ifndef HAVE_PDF
+ return _(no_support_for_poppler_tags_string);
+#endif
+ gcmd_tags_poppler_load_metadata(finfo);
ret_val = finfo->metadata->operator [] (tag).c_str();
break;
Modified: trunk/src/tags/gnome-cmd-tags.h
==============================================================================
--- trunk/src/tags/gnome-cmd-tags.h (original)
+++ trunk/src/tags/gnome-cmd-tags.h Fri Aug 8 23:37:02 2008
@@ -40,9 +40,10 @@
TAG_FLAC = 1 << 11,
TAG_ID3 = 1 << 12,
TAG_VORBIS = 1 << 13,
- TAG_RPM = 1 << 14,
+ TAG_PDF = 1 << 14,
+ TAG_RPM = 1 << 15,
TAG_AUDIO = TAG_APE | TAG_FLAC | TAG_ID3 | TAG_VORBIS,
- TAG_DOC = TAG_CHM+1,
+ TAG_DOC = TAG_CHM | TAG_PDF,
TAG_IMAGE = TAG_EXIF | TAG_IPTC | TAG_ICC
} GnomeCmdTagClass;
@@ -450,6 +451,21 @@
TAG_IPTC_UNO, // eternal, globally unique identification for the object, independent of provider and for any media form
TAG_IPTC_URGENCY, // specifies the editorial urgency of content and not necessarily the envelope handling priority
TAG_IPTC_WRITEREDITOR, // name of the person involved in the writing, editing or correcting the object or caption/abstract
+ TAG_PDF_PAGESIZE, // page size format
+ TAG_PDF_PAGEWIDTH, // page width in mm
+ TAG_PDF_PAGEHEIGHT, // page height in mm
+ TAG_PDF_VERSION, // the PDF version of the document
+ TAG_PDF_PRODUCER, // the application that converted the document to PDF
+ TAG_PDF_EMBEDDEDFILES, // number of embedded files in the document
+ TAG_PDF_OPTIMIZED, // set to "1" if optimized for network access
+ TAG_PDF_PRINTING, // set to "1" if printing is allowed
+ TAG_PDF_HIRESPRINTING, // set to "1" if high resolution printing is allowed
+ TAG_PDF_COPYING, // set to "1" if copying the contents is allowed
+ TAG_PDF_MODIFYING, // set to "1" if modifying the contents is allowed
+ TAG_PDF_DOCASSEMBLY, // set to "1" if inserting, rotating, or deleting pages and creating navigation elements is allowed
+ TAG_PDF_COMMENTING, // set to "1" if adding or modifying text annotations is allowed
+ TAG_PDF_FORMFILLING, // set to "1" if filling of form fields is allowed
+ TAG_PDF_ACCESSIBILITYSUPPORT, // set to "1" if accessibility support (eg. screen readers) is enabled
TAG_VORBIS_CONTACT, // contact information for the creators or distributors of the track
TAG_VORBIS_DESCRIPTION, // a textual description of the data
TAG_VORBIS_LICENSE, // license information
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]