From: Akos Polster Date: Mon, 20 Dec 2010 12:22:18 +0000 (+0100) Subject: Improve identification if bookmark's chapter. Add some AppAward X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;ds=sidebyside;h=b855b46f739479ca0d6dd15b73a4c56a8d8a2d2c;p=dorian Improve identification if bookmark's chapter. Add some AppAward paperwork. --- diff --git a/doc/AppAward-MetadataTemplate.xlsx b/doc/AppAward-MetadataTemplate.xlsx index 75fca70..e9689a9 100644 Binary files a/doc/AppAward-MetadataTemplate.xlsx and b/doc/AppAward-MetadataTemplate.xlsx differ diff --git a/doc/dorian-256.png b/doc/dorian-256.png new file mode 100644 index 0000000..57c2fc4 Binary files /dev/null and b/doc/dorian-256.png differ diff --git a/model/book.cpp b/model/book.cpp index 874ff2b..d209816 100644 --- a/model/book.cpp +++ b/model/book.cpp @@ -435,18 +435,17 @@ int Book::chapterFromPart(int index) for (int i = 0; i < chapters.size(); i++) { QString id = chapters[i]; QString href = content[id].href; - QString baseRef(href); - QUrl url(QString("file://") + href); - if (url.hasFragment()) { - QString fragment = url.fragment(); - baseRef.chop(fragment.length() + 1); + int hashPos = href.indexOf("#"); + if (hashPos != -1) { + href = href.left(hashPos); } - if (baseRef == partHref) { + if (href == partHref) { ret = i; // Don't break, keep looking } } + qDebug() << "Part" << index << partId << partHref << ":" << ret; return ret; } diff --git a/model/ncxhandler.h b/model/ncxhandler.h index 6121992..05a66e1 100644 --- a/model/ncxhandler.h +++ b/model/ncxhandler.h @@ -29,6 +29,8 @@ public: contentItem.size = 0; book.content[id] = contentItem; book.chapters.append(id); + qDebug() << "TreeItem::addToBook" << id << contentItem.href + << contentItem.name; foreach (TreeItem *child, children) { child->addToBook(book); } diff --git a/pkg/changelog b/pkg/changelog index 452c95d..cba3923 100644 --- a/pkg/changelog +++ b/pkg/changelog @@ -3,6 +3,7 @@ dorian (0.4.4-1) unstable; urgency=low * Have an overlap between current/next page * Add tool bars to list windows on Symbian * Fix author name in libary and book info + * Improve identification of bookmark's chapter -- Akos Polster Sun, 5 Dec 2010 02:00:00 +0100