1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-06 03:50:19 +02:00

"show footnote toast" option

This commit is contained in:
Nikolay Pultsin 2015-04-21 23:42:43 +01:00
parent eff5fb1915
commit b16273812e
9 changed files with 49 additions and 10 deletions

View file

@ -156,10 +156,13 @@ void BookReader::addHyperlinkControl(FBTextKind kind, const std::string &label)
std::string type;
switch (myHyperlinkKind) {
case INTERNAL_HYPERLINK:
case FOOTNOTE:
myHyperlinkType = HYPERLINK_INTERNAL;
type = "internal";
break;
case FOOTNOTE:
myHyperlinkType = HYPERLINK_FOOTNOTE;
type = "footnote";
break;
case EXTERNAL_HYPERLINK:
myHyperlinkType = HYPERLINK_EXTERNAL;
type = "external";

View file

@ -23,8 +23,9 @@
enum FBHyperlinkType {
HYPERLINK_NONE = 0,
HYPERLINK_INTERNAL = 1,
HYPERLINK_EXTERNAL = 2,
//HYPERLINK_BOOK = 3,
HYPERLINK_FOOTNOTE = 2,
HYPERLINK_EXTERNAL = 3,
//HYPERLINK_BOOK = 4,
};
#endif /* __FBHYPERLINKTYPE_H__ */

View file

@ -189,7 +189,7 @@ void FB2BookReader::startElementHandler(int tag, const char **xmlattributes) {
if (ref[0] == '#') {
const char *type = attributeValue(xmlattributes, "type");
static const std::string NOTE = "note";
if ((type != 0) && (NOTE == type)) {
if (type != 0 && NOTE == type) {
myHyperlinkType = FOOTNOTE;
} else {
myHyperlinkType = INTERNAL_HYPERLINK;