Skip to content

Commit

Permalink
Merge pull request #66 from humdingerb/attr
Browse files Browse the repository at this point in the history
Final update to attribute names...
  • Loading branch information
waddlesplash committed Feb 1, 2016
2 parents ef465a7 + 8016f3d commit 90e5044
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions bepdf/beos/BepdfApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,15 +695,15 @@ static struct {
const char *pdf_name;
int32 type_code;
} gAttrInfo[] = {
{"PDF:subject", "Subject", "Subject", B_STRING_TYPE},
{"PDF:title", "Title", "Title", B_STRING_TYPE},
{"PDF:creator", "Creator", "Creator", B_STRING_TYPE},
{"PDF:author", "Author", "Author", B_STRING_TYPE},
{"PDF:keywords", "Keywords", "Keywords", B_STRING_TYPE},
{"META:subject", "Subject", "Subject", B_STRING_TYPE},
{"META:title", "Title", "Title", B_STRING_TYPE},
{"META:creator", "Creator", "Creator", B_STRING_TYPE},
{"META:author", "Author", "Author", B_STRING_TYPE},
{"META:keyw", "Keywords", "Keywords", B_STRING_TYPE},
{"PDF:producer", "Producer", "Producer", B_STRING_TYPE},
{"PDF:created", "Created", "CreationDate", B_TIME_TYPE},
{"PDF:modified", "Modified", "ModDate", B_TIME_TYPE},
{"PDF:pages", "Pages", NULL, B_INT32_TYPE},
{"META:pages", "Pages", NULL, B_INT32_TYPE},
{"PDF:version", "Version", NULL, B_DOUBLE_TYPE},
{"PDF:linearized", "Linearized", NULL, B_BOOL_TYPE},
{NULL, NULL, NULL, 0}
Expand Down Expand Up @@ -734,7 +734,7 @@ BepdfApplication::UpdateFileAttributes(PDFDoc *doc, entry_ref *ref) {
}

int32 pages = (int32)doc->getNumPages();
UpdateAttr(node, "PDF:pages", B_INT32_TYPE, 0, &pages, sizeof(int32));
UpdateAttr(node, "META:pages", B_INT32_TYPE, 0, &pages, sizeof(int32));
bool b = doc->isLinearized();
UpdateAttr(node, "PDF:linearized", B_BOOL_TYPE, 0, &b, sizeof(b));
double d = doc->getPDFVersion();
Expand Down
2 changes: 1 addition & 1 deletion bepdf/beos/utils/EntryMenuItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ EntryMenuItem::EntryMenuItem(entry_ref* ref, const char* label, BMessage* messag
BNode node(ref);
BString title;
if (node.InitCheck() == B_OK) {
if (node.ReadAttrString("PDF:title", &title) == B_OK && title.Length() > 0) {
if (node.ReadAttrString("META:title", &title) == B_OK && title.Length() > 0) {
title << " (" << label << ")";
SetLabel(title.String());
}
Expand Down

0 comments on commit 90e5044

Please sign in to comment.