1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-05 02:39:23 +02:00

Merge branch 'master' into basket

This commit is contained in:
Nikolay Pultsin 2011-05-13 18:36:00 +01:00
commit 1addc4d87f
44 changed files with 341 additions and 238 deletions

View file

@ -1,3 +1,7 @@
===== 1.0.12 (May ??, 2011) =====
* Image view settings
* Html in book description
===== 1.0.11 (May 07, 2011) =====
* Book description from OPDS full entry
* Fixed LitRes 'my books' entry loading

View file

@ -544,6 +544,15 @@
<node name="summaryOff" value="Navigace klávesami prochází pouze hypertextové odkazy"/>
</node>
</node>
<node name="images" value="Images" toBeTranslated="true">
<node name="summary" value="Image displaying options" toBeTranslated="true"/>
<node name="backgroundColor" value="Background color for image view" toBeTranslated="true"/>
<node name="tappingAction" value="Long tapping action" toBeTranslated="true">
<node name="doNothing" value="Long tapping does nothing" toBeTranslated="true"/>
<node name="selectImage" value="Long tapping selects the image" toBeTranslated="true"/>
<node name="openImageView" value="Long tapping opens image view" toBeTranslated="true"/>
</node>
</node>
<node name="cancelMenu" value="Nabídka Zrušit">
<node name="summary" value="Seznam akcí tlačítka Zpět"/>
<node name="previousBook" value="Předchozí kniha">

View file

@ -531,6 +531,15 @@
<node name="summaryOff" value="Key navigation visits hyperlinks only" toBeTranslated="true"/>
</node>
</node>
<node name="images" value="Images" toBeTranslated="true">
<node name="summary" value="Image displaying options" toBeTranslated="true"/>
<node name="backgroundColor" value="Background color for image view" toBeTranslated="true"/>
<node name="tappingAction" value="Long tapping action" toBeTranslated="true">
<node name="doNothing" value="Long tapping does nothing" toBeTranslated="true"/>
<node name="selectImage" value="Long tapping selects the image" toBeTranslated="true"/>
<node name="openImageView" value="Long tapping opens image view" toBeTranslated="true"/>
</node>
</node>
<node name="cancelMenu" value="Cancel menu" toBeTranslated="true">
<node name="summary" value="Back button action list" toBeTranslated="true"/>
<node name="previousBook" value="Previous book" toBeTranslated="true">

View file

@ -543,6 +543,15 @@
<node name="summaryOff" value="Key navigation visits hyperlinks only"/>
</node>
</node>
<node name="images" value="Images">
<node name="summary" value="Image displaying options"/>
<node name="backgroundColor" value="Background color for image view"/>
<node name="tappingAction" value="Long tapping action">
<node name="doNothing" value="Long tapping does nothing"/>
<node name="selectImage" value="Long tapping selects the image"/>
<node name="openImageView" value="Long tapping opens image view"/>
</node>
</node>
<node name="cancelMenu" value="Cancel menu">
<node name="summary" value="Back button action list"/>
<node name="previousBook" value="Previous book">

View file

@ -533,6 +533,15 @@
<node name="summaryOff" value="La navigation par touches visite les liens hypertexts uniquement"/>
</node>
</node>
<node name="images" value="Images" toBeTranslated="true">
<node name="summary" value="Image displaying options" toBeTranslated="true"/>
<node name="backgroundColor" value="Background color for image view" toBeTranslated="true"/>
<node name="tappingAction" value="Long tapping action" toBeTranslated="true">
<node name="doNothing" value="Long tapping does nothing" toBeTranslated="true"/>
<node name="selectImage" value="Long tapping selects the image" toBeTranslated="true"/>
<node name="openImageView" value="Long tapping opens image view" toBeTranslated="true"/>
</node>
</node>
<node name="cancelMenu" value="Bouton retour">
<node name="summary" value="Liste des actions du bouton retour"/>
<node name="previousBook" value="Livre précédent">

View file

@ -530,6 +530,15 @@
<node name="summaryOff" value="A tecla de navegación percorre só as ligazóns"/>
</node>
</node>
<node name="images" value="Images" toBeTranslated="true">
<node name="summary" value="Image displaying options" toBeTranslated="true"/>
<node name="backgroundColor" value="Background color for image view" toBeTranslated="true"/>
<node name="tappingAction" value="Long tapping action" toBeTranslated="true">
<node name="doNothing" value="Long tapping does nothing" toBeTranslated="true"/>
<node name="selectImage" value="Long tapping selects the image" toBeTranslated="true"/>
<node name="openImageView" value="Long tapping opens image view" toBeTranslated="true"/>
</node>
</node>
<node name="cancelMenu" value="Cancel menu" toBeTranslated="true">
<node name="summary" value="Back button action list" toBeTranslated="true"/>
<node name="previousBook" value="Previous book" toBeTranslated="true">

View file

@ -530,6 +530,15 @@
<node name="summaryOff" value="A gombnyomásos navigáció linkről linkre ugrik"/>
</node>
</node>
<node name="images" value="Images" toBeTranslated="true">
<node name="summary" value="Image displaying options" toBeTranslated="true"/>
<node name="backgroundColor" value="Background color for image view" toBeTranslated="true"/>
<node name="tappingAction" value="Long tapping action" toBeTranslated="true">
<node name="doNothing" value="Long tapping does nothing" toBeTranslated="true"/>
<node name="selectImage" value="Long tapping selects the image" toBeTranslated="true"/>
<node name="openImageView" value="Long tapping opens image view" toBeTranslated="true"/>
</node>
</node>
<node name="cancelMenu" value="Cancel menu" toBeTranslated="true">
<node name="summary" value="Back button action list" toBeTranslated="true"/>
<node name="previousBook" value="Previous book" toBeTranslated="true">

View file

@ -530,6 +530,15 @@
<node name="summaryOff" value="Key navigation visits hyperlinks only" toBeTranslated="true"/>
</node>
</node>
<node name="images" value="Images" toBeTranslated="true">
<node name="summary" value="Image displaying options" toBeTranslated="true"/>
<node name="backgroundColor" value="Background color for image view" toBeTranslated="true"/>
<node name="tappingAction" value="Long tapping action" toBeTranslated="true">
<node name="doNothing" value="Long tapping does nothing" toBeTranslated="true"/>
<node name="selectImage" value="Long tapping selects the image" toBeTranslated="true"/>
<node name="openImageView" value="Long tapping opens image view" toBeTranslated="true"/>
</node>
</node>
<node name="cancelMenu" value="Cancel menu" toBeTranslated="true">
<node name="summary" value="Back button action list" toBeTranslated="true"/>
<node name="previousBook" value="Previous book" toBeTranslated="true">

View file

@ -530,6 +530,15 @@
<node name="summaryOff" value="Key navigation visits hyperlinks only" toBeTranslated="true"/>
</node>
</node>
<node name="images" value="Images" toBeTranslated="true">
<node name="summary" value="Image displaying options" toBeTranslated="true"/>
<node name="backgroundColor" value="Background color for image view" toBeTranslated="true"/>
<node name="tappingAction" value="Long tapping action" toBeTranslated="true">
<node name="doNothing" value="Long tapping does nothing" toBeTranslated="true"/>
<node name="selectImage" value="Long tapping selects the image" toBeTranslated="true"/>
<node name="openImageView" value="Long tapping opens image view" toBeTranslated="true"/>
</node>
</node>
<node name="cancelMenu" value="Cancel menu" toBeTranslated="true">
<node name="summary" value="Back button action list" toBeTranslated="true"/>
<node name="previousBook" value="Previous book" toBeTranslated="true">

View file

@ -529,6 +529,15 @@
<node name="summaryOff" value="При перемещении с помощью кнопок помечать только гиперссылки"/>
</node>
</node>
<node name="images" value="Картинки">
<node name="summary" value="Настройки отображения картинок"/>
<node name="backgroundColor" value="Цвет фона при полноэкранном просмотре"/>
<node name="tappingAction" value="Действие при долгом нажатии на экран">
<node name="doNothing" value="Не делать ничего"/>
<node name="selectImage" value="Выделять картинку"/>
<node name="openImageView" value="Запускать полноэкранный просмотр"/>
</node>
</node>
<node name="cancelMenu" value="Меню выхода из программы">
<node name="summary" value="Список действий при нажатии на кнопку 'Назад'"/>
<node name="previousBook" value="Предыдущая книга">

View file

@ -530,6 +530,15 @@
<node name="summaryOff" value="ตัวเลือกคำเลือกได้เฉพาะลิ้งค์ข้อความ"/>
</node>
</node>
<node name="images" value="Images" toBeTranslated="true">
<node name="summary" value="Image displaying options" toBeTranslated="true"/>
<node name="backgroundColor" value="Background color for image view" toBeTranslated="true"/>
<node name="tappingAction" value="Long tapping action" toBeTranslated="true">
<node name="doNothing" value="Long tapping does nothing" toBeTranslated="true"/>
<node name="selectImage" value="Long tapping selects the image" toBeTranslated="true"/>
<node name="openImageView" value="Long tapping opens image view" toBeTranslated="true"/>
</node>
</node>
<node name="cancelMenu" value="Cancel menu" toBeTranslated="true">
<node name="summary" value="Back button action list" toBeTranslated="true"/>
<node name="previousBook" value="Previous book" toBeTranslated="true">

View file

@ -530,6 +530,15 @@
<node name="summaryOff" value="Key navigation visits hyperlinks only" toBeTranslated="true"/>
</node>
</node>
<node name="images" value="Images" toBeTranslated="true">
<node name="summary" value="Image displaying options" toBeTranslated="true"/>
<node name="backgroundColor" value="Background color for image view" toBeTranslated="true"/>
<node name="tappingAction" value="Long tapping action" toBeTranslated="true">
<node name="doNothing" value="Long tapping does nothing" toBeTranslated="true"/>
<node name="selectImage" value="Long tapping selects the image" toBeTranslated="true"/>
<node name="openImageView" value="Long tapping opens image view" toBeTranslated="true"/>
</node>
</node>
<node name="cancelMenu" value="Cancel menu" toBeTranslated="true">
<node name="summary" value="Back button action list" toBeTranslated="true"/>
<node name="previousBook" value="Previous book" toBeTranslated="true">

View file

@ -530,6 +530,15 @@
<node name="summaryOff" value="Phím điều hướng chỉ tác động lên siêu liên kết"/>
</node>
</node>
<node name="images" value="Images" toBeTranslated="true">
<node name="summary" value="Image displaying options" toBeTranslated="true"/>
<node name="backgroundColor" value="Background color for image view" toBeTranslated="true"/>
<node name="tappingAction" value="Long tapping action" toBeTranslated="true">
<node name="doNothing" value="Long tapping does nothing" toBeTranslated="true"/>
<node name="selectImage" value="Long tapping selects the image" toBeTranslated="true"/>
<node name="openImageView" value="Long tapping opens image view" toBeTranslated="true"/>
</node>
</node>
<node name="cancelMenu" value="Cancel menu" toBeTranslated="true">
<node name="summary" value="Back button action list" toBeTranslated="true"/>
<node name="previousBook" value="Previous book" toBeTranslated="true">

View file

@ -530,6 +530,15 @@
<node name="summaryOff" value="导航键仅访问超链接词句"/>
</node>
</node>
<node name="images" value="Images" toBeTranslated="true">
<node name="summary" value="Image displaying options" toBeTranslated="true"/>
<node name="backgroundColor" value="Background color for image view" toBeTranslated="true"/>
<node name="tappingAction" value="Long tapping action" toBeTranslated="true">
<node name="doNothing" value="Long tapping does nothing" toBeTranslated="true"/>
<node name="selectImage" value="Long tapping selects the image" toBeTranslated="true"/>
<node name="openImageView" value="Long tapping opens image view" toBeTranslated="true"/>
</node>
</node>
<node name="cancelMenu" value="Cancel menu" toBeTranslated="true">
<node name="summary" value="Back button action list" toBeTranslated="true"/>
<node name="previousBook" value="Previous book" toBeTranslated="true">

View file

@ -24,14 +24,6 @@
<node name="invalidURL" value="Neplatná URL" />
<node name="hostCantBeReached" value="Hostitel %s&#10;nemůže být dosažen" />
<node name="connectionRefused" value="Spojení bylo odmítnuto:&#10;%s" />
<node name="sslError" value="Chyba SSL subsystému" />
<node name="sslConnectErrorMessage" value="Problém s metodou handshake SSL/TLS:&#10;%s" />
<node name="sslBadKey" value="Špatný SSL certifikát od:&#10;%s" />
<node name="sslPeerUnverified" value="Nelze ověřit identitu partnerského zařízení pro:&#10;%s" />
<node name="sslProtocolError" value="Chyba v operaci SSL protokolu" />
<node name="sslBadCertificateFileMessage" value="Nelze přečíst soubor SSL CA certifikátu:&#10;%s" />
<node name="sslCertificateExpired" value="SSL certifikát vypršel:&#10;%s" />
<node name="sslCertificateNotYetValid" value="SSL certifikát již není platný:&#10;%s" />
</node>
</node>
<node name="color">

View file

@ -25,14 +25,6 @@
<node name="invalidURL" value="Die URL ist ungültig." />
<node name="hostCantBeReached" value="Der Server %s&#10; kann nicht erreicht werden." />
<node name="connectionRefused" value="Die Verbindung zu&#10;%s&#10;wurde verweigert." />
<node name="sslError" value="Fehler im SSL Subsystem." />
<node name="sslConnectErrorMessage" value="Es ist ein SSL/TLS Handshake-Problem mit&#10;%s&#10;aufgetreten." />
<node name="sslBadKey" value="Das SSL Zertifikat von&#10;%s&#10;ist ungültig." />
<node name="sslPeerUnverified" value="Die Identität der Gegenstelle&#10;%s&#10; kann nicht überprüft werden." />
<node name="sslProtocolError" value="Fehler im SSL Protokoll." />
<node name="sslBadCertificateFileMessage" value="Die SSL-CA-Zertifikat-Datei:&#10;%s kann nicht gelesen werden." />
<node name="sslCertificateExpired" value="Das SSL-Zertifikat ist abgelaufen:&#10;%s" />
<node name="sslCertificateNotYetValid" value="Das SSL-Zertifikat ist noch nicht gültig:&#10;%s" />
</node>
</node>
<node name="color">

View file

@ -23,14 +23,6 @@
<node name="invalidURL" value="Invalid URL" />
<node name="hostCantBeReached" value="Host %s&#10;cannot be reached" />
<node name="connectionRefused" value="Connection was refused by&#10;%s" />
<node name="sslError" value="SSL subsystem error" />
<node name="sslConnectErrorMessage" value="SSL/TLS handshake problem occurred:&#10;%s" />
<node name="sslBadKey" value="Bad SSL certificate from:&#10;%s" />
<node name="sslPeerUnverified" value="Unable to verify peer's identity for:&#10;%s" />
<node name="sslProtocolError" value="Error in the operation of the SSL protocol" />
<node name="sslBadCertificateFileMessage" value="Couldn&apos;t read the SSL CA certificate file:&#10;%s" />
<node name="sslCertificateExpired" value="SSL certificate has expired:&#10;%s" />
<node name="sslCertificateNotYetValid" value="SSL certificate is not yet valid:&#10;%s" />
</node>
</node>
<node name="color">

View file

@ -24,14 +24,6 @@
<node name="invalidURL" value="URL invalide" />
<node name="hostCantBeReached" value="L'hôte %s&#10;ne peut être joint" />
<node name="connectionRefused" value="La connexion a été refusée par&#10;%s" />
<node name="sslError" value="Erreur du sous-système SSL" />
<node name="sslConnectErrorMessage" value="Problème de connexion SSL/TLS :&#10;%s" />
<node name="sslBadKey" value="Mauvais certificat SSL de:&#10;%s" />
<node name="sslPeerUnverified" value="Incapable de vérifier l'identité de:&#10;%s" />
<node name="sslProtocolError" value="Erreur dans l'opération du protocole SSL" />
<node name="sslBadCertificateFileMessage" value="Impossible de lire le fichier des certificats de CA :&#10;%s" />
<node name="sslCertificateExpired" value="Le certificat SSL est expiré:&#10;%s" />
<node name="sslCertificateNotYetValid" value="Le certificat SSL n'est plus valide:&#10;%s" />
</node>
</node>
<node name="color">

View file

@ -23,14 +23,6 @@
<node name="invalidURL" value="URL incorrecto" />
<node name="hostCantBeReached" value="O equipo %s&#10;non pode ser acadado" />
<node name="connectionRefused" value="A conexión foi rexeitada por&#10;%s" />
<node name="sslError" value="Produciuse un erro no subsistema SSL" />
<node name="sslConnectErrorMessage" value="Houbo un problema coa negociación SSL/TLS:&#10;%s" />
<node name="sslBadKey" value="Certificado SSL incorrecto para:&#10;%s" />
<node name="sslPeerUnverified" value="Non é posíbel verificar a identidade de pares para:&#10;%s" />
<node name="sslProtocolError" value="Produciuse un erro na operación do protocolo SSL" />
<node name="sslBadCertificateFileMessage" value="Non foi posíbel ler ficheiro do certificado SSL da EA:&#10;%s" />
<node name="sslCertificateExpired" value="O certificado SSL:&#10;%s&#10;caducou:" />
<node name="sslCertificateNotYetValid" value="O certificado SSL:&#10;%s&#10;aínda non é válido" />
</node>
</node>
<node name="color">

View file

@ -24,14 +24,6 @@
<node name="invalidURL" value="Érvénytelen URL" />
<node name="hostCantBeReached" value="%s&#10;kiszolgáló nem elérhető" />
<node name="connectionRefused" value="%s&#10;bontotta a kapcsolatot" />
<node name="sslError" value="SSL alrendszer hiba" />
<node name="sslConnectErrorMessage" value="SSL/TLS kapcsolódási hiba:&#10;%s" />
<node name="sslBadKey" value="Hibás SSL tanúsítvány:&#10;%s" />
<node name="sslPeerUnverified" value="Azonosítás sikertelen:&#10;%s" />
<node name="sslProtocolError" value="Hiba az SSL protokoll működésében" />
<node name="sslBadCertificateFileMessage" value="SSL CA tanúsítvény beolvasása sikertelen:&#10;%s" />
<node name="sslCertificateExpired" value="Az SSL tanúsítvány lejárt:&#10;%s" />
<node name="sslCertificateNotYetValid" value="Az SSL tanúsítvány még nem érvényes:&#10;%s" />
</node>
</node>
<node name="color">

View file

@ -24,14 +24,6 @@
<node name="invalidURL" value="URL non valido" />
<node name="hostCantBeReached" value="L' host %s&#10;non può essere raggiunto" />
<node name="connectionRefused" value="La connessiione è stata rifiutata da&#10;%s" />
<node name="sslError" value="Errore sottosistema SSL" />
<node name="sslConnectErrorMessage" value="Si è verificato un problema con l' handshake SSL/TLS:&#10;%s" />
<node name="sslBadKey" value="Certificato SSL difettoso da:&#10;%s" />
<node name="sslPeerUnverified" value="Impossibile verificare l'identità dei peer per:&#10;%s" />
<node name="sslProtocolError" value="Errore nel funzionamento del protocollo SSL" />
<node name="sslBadCertificateFileMessage" value="Impossibile leggere il file che contiene il certificato SSL CA:&#10;%s" />
<node name="sslCertificateExpired" value="Il certificato SSL è scaduto:&#10;%s" />
<node name="sslCertificateNotYetValid" value="Il certificato SSL non è ancora valido:&#10;%s" />
</node>
</node>
<node name="color">

View file

@ -24,14 +24,6 @@
<node name="invalidURL" value="Ongeldige URL" />
<node name="hostCantBeReached" value="Host %s is onbereikbaar" />
<node name="connectionRefused" value="Verbinding was geweigerd door&#10;%s" />
<node name="sslError" value="SSL subsysteem fout" />
<node name="sslConnectErrorMessage" value="SSL/TLS handshake probleem opgetreden:&#10;%s" />
<node name="sslBadKey" value="Fout SSL certificaat van:&#10;%s" />
<node name="sslPeerUnverified" value="Identiteit van %s niet geverifieerd" />
<node name="sslProtocolError" value="Fout bij gebruikt van het SSL protocol" />
<node name="sslBadCertificateFileMessage" value="Kan het SSL CA certificaat bestand niet lezen:&#10;%s" />
<node name="sslCertificateExpired" value="SSL certificaat is verlopen:&#10;%s" />
<node name="sslCertificateNotYetValid" value="SSL certificaat is nog niet geldig:&#10;%s" />
</node>
</node>
<node name="color">

View file

@ -23,14 +23,6 @@
<node name="invalidURL" value="Неправильный URL" />
<node name="hostCantBeReached" value="Сайт %s недоступен" />
<node name="connectionRefused" value="Соединение закрыто сайтом&#10;%s" />
<node name="sslError" value="Ошибка подсистемы SSL" />
<node name="sslConnectErrorMessage" value="Проблема установления SSL/TLS соединения:&#10;%s" />
<node name="sslBadKey" value="Плохой SSL сертификат получен от:&#10;%s" />
<node name="sslPeerUnverified" value="Невозможно проверить подлинность сайта:&#10;%s" />
<node name="sslProtocolError" value="Ошибка в работе протокола SSL" />
<node name="sslBadCertificateFileMessage" value="Не могу прочитать файл сертификата SSL CA:&#10;%s" />
<node name="sslCertificateExpired" value="Истек срок действия сертификата SSL:&#10;%s" />
<node name="sslCertificateNotYetValid" value="Срок действия сертификата SSL еще не наступил:&#10;%s" />
</node>
</node>
<node name="color">

View file

@ -24,14 +24,6 @@
<node name="invalidURL" value="URL ไมถูกต้องุ"/>
<node name="hostCantBeReached" value="โฮสต์ %s&#10;ไม่สามารถเข้าถึงได้"/>
<node name="connectionRefused" value="การเชื่อมต่อถูกปฏิเสธโดย&#10;%s"/>
<node name="sslError" value="เกิดข้อผิดพลาดเกี่ยวกับ SSL "/>
<node name="sslConnectErrorMessage" value="เกิดข้อผิดพลาดในการเชื่อมต่อระหว่าง SSL/TLS:&#10;%s"/>
<node name="sslBadKey" value="ใบรับรอง SSL ไม่ถูกต้องจาก:&#10;%s"/>
<node name="sslPeerUnverified" value="ไม่สามารถยืนยันตัวตนได้สำหรับ: %s"/>
<node name="sslProtocolError" value="พบข้อผิดพลาดในการดำเนินการของ โปรโตคอล SSL"/>
<node name="sslBadCertificateFileMessage" value="ไม่สามารถอ่านไฟล์ใบรับรอง SSL ของ CA:&#10;%s"/>
<node name="sslCertificateExpired" value="ใบรับรอง SSL หมดอายุ:&#10;%s"/>
<node name="sslCertificateNotYetValid" value="ใบรับรอง SSL ไม่ถูกต้อง:&#10;%s"/>
</node>
</node>
<node name="color">

View file

@ -24,14 +24,6 @@
<node name="invalidURL" value="Неправильний URL" />
<node name="hostCantBeReached" value="Сайт %s недоступний" />
<node name="connectionRefused" value="З’єднання закрите сайтом&#10;%s" />
<node name="sslError" value="Помилка підсистеми SSL" />
<node name="sslConnectErrorMessage" value="Проблема встановлення SSL/TLS з’єднання:&#10;%s" />
<node name="sslBadKey" value="Поганий SSL сертифікат отримано від:&#10;%s" />
<node name="sslPeerUnverified" value="Неможливо перевірити справжність сайту:&#10;%s" />
<node name="sslProtocolError" value="Помилка в роботі протоколу SSL" />
<node name="sslBadCertificateFileMessage" value="Не можу прочитати файл сертифікату SSL CA:&#10;%s" />
<node name="sslCertificateExpired" value="Закінчився термін дії сертифіката SSL:&#10;%s" />
<node name="sslCertificateNotYetValid" value="Термін дії сертифіката SSL ще не настав:&#10;%s" />
</node>
</node>
<node name="color">

View file

@ -24,14 +24,6 @@
<node name="invalidURL" value="Địa chỉ sai" />
<node name="hostCantBeReached" value="Máy chủ %s&#10;không thể truy cập" />
<node name="connectionRefused" value="Kết nối bị từ chối bởi&#10;%s" />
<node name="sslError" value="Lỗi hệ con SSL" />
<node name="sslConnectErrorMessage" value="Xuất hiện lỗi SSL/TLS handshake :&#10;%s" />
<node name="sslBadKey" value="Chứng chỉ SSL xấu từ:&#10;%s" />
<node name="sslPeerUnverified" value="Không thể kiểm tra nhân dạng ngang hàng cho:&#10;%s" />
<node name="sslProtocolError" value="Lỗi trong họa động của giao thức SSL" />
<node name="sslBadCertificateFileMessage" value="Không thể đọc tập tin chứng chỉ SSL CA:&#10;%s" />
<node name="sslCertificateExpired" value="Chứng chỉ SSL đã quá hạn:&#10;%s" />
<node name="sslCertificateNotYetValid" value="Chứng chỉ SSL không còn đúng:&#10;%s" />
</node>
</node>
<node name="color">

View file

@ -24,14 +24,6 @@
<node name="invalidURL" value="无效网址" />
<node name="hostCantBeReached" value="网站无法访问 %s" />
<node name="connectionRefused" value="连接被拒绝&#10;%s" />
<node name="sslError" value="SSL系统错误." />
<node name="sslConnectErrorMessage" value="SSL/TLS 连接出现问题:&#10;%s" />
<node name="sslBadKey" value="来自:&#10;%s错误的SSL验证消息." />
<node name="sslPeerUnverified" value="无法验证所用ID:&#10;%s" />
<node name="sslProtocolError" value="执行SSL协议时发生错误." />
<node name="sslBadCertificateFileMessage" value="无法读取 SSL CA 证书文件:&#10;%s" />
<node name="sslCertificateExpired" value="SSL证书已经过期:&#10;%s" />
<node name="sslCertificateNotYetValid" value="SSL证书无效:&#10;%s" />
</node>
</node>
<node name="color">

View file

@ -27,7 +27,6 @@ import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.util.DisplayMetrics;
import android.view.View;
@ -45,6 +44,7 @@ import org.geometerplus.zlibrary.ui.android.image.ZLAndroidImageData;
import org.geometerplus.zlibrary.ui.android.image.ZLAndroidImageManager;
import org.geometerplus.fbreader.library.*;
import org.geometerplus.fbreader.network.HtmlUtil;
import org.geometerplus.android.fbreader.preferences.EditBookInfoActivity;
@ -254,7 +254,7 @@ public class BookInfoActivity extends Activity {
bodyView.setVisibility(View.GONE);
} else {
titleView.setText(myResource.getResource("annotation").getValue());
bodyView.setText(Html.fromHtml(annotation));
bodyView.setText(HtmlUtil.getHtmlText(annotation));
bodyView.setMovementMethod(new LinkMovementMethod());
}
}

View file

@ -51,7 +51,7 @@ class ProcessHyperlinkAction extends FBAction {
}
public void run() {
final ZLTextElementRegion region = Reader.getTextView().getSelectedRegion();
final ZLTextRegion region = Reader.getTextView().getSelectedRegion();
if (region instanceof ZLTextHyperlinkRegion) {
Reader.getTextView().hideSelectedRegionBorder();
Reader.getViewWidget().repaint();
@ -78,6 +78,10 @@ class ProcessHyperlinkAction extends FBAction {
final Intent intent = new Intent();
intent.setClass(myBaseActivity, ImageViewActivity.class);
intent.setData(Uri.parse(uriString));
intent.putExtra(
ImageViewActivity.BACKGROUND_COLOR_KEY,
Reader.ImageViewBackgroundOption.getValue().getIntValue()
);
myBaseActivity.startActivity(intent);
} catch (Exception e) {
e.printStackTrace();

View file

@ -20,6 +20,7 @@
package org.geometerplus.android.fbreader.image;
import android.app.Activity;
import android.content.Intent;
import android.graphics.*;
import android.net.Uri;
import android.os.Bundle;
@ -28,12 +29,17 @@ import android.view.*;
import org.geometerplus.zlibrary.core.filesystem.ZLFile;
import org.geometerplus.zlibrary.core.image.*;
import org.geometerplus.zlibrary.core.util.MimeType;
import org.geometerplus.zlibrary.core.util.ZLColor;
import org.geometerplus.zlibrary.ui.android.library.ZLAndroidApplication;
import org.geometerplus.zlibrary.ui.android.image.ZLAndroidImageData;
import org.geometerplus.zlibrary.ui.android.util.ZLAndroidColorUtil;
public class ImageViewActivity extends Activity {
Bitmap myBitmap;
public static final String BACKGROUND_COLOR_KEY = "bgColor";
private Bitmap myBitmap;
private ZLColor myBgColor;
@Override
protected void onCreate(Bundle icicle) {
@ -53,7 +59,13 @@ public class ImageViewActivity extends Activity {
setContentView(new ImageView());
final Uri uri = getIntent().getData();
final Intent intent = getIntent();
myBgColor = new ZLColor(
intent.getIntExtra(BACKGROUND_COLOR_KEY, new ZLColor(127, 127, 127).getIntValue())
);
final Uri uri = intent.getData();
if (ZLFileImage.SCHEME.equals(uri.getScheme())) {
try {
final String[] data = uri.getPath().split("\000");
@ -96,7 +108,7 @@ public class ImageViewActivity extends Activity {
@Override
protected void onDraw(final Canvas canvas) {
myPaint.setColor(Color.rgb(128, 128, 128));
myPaint.setColor(ZLAndroidColorUtil.rgb(myBgColor));
final int w = getWidth();
final int h = getHeight();
canvas.drawRect(0, 0, w, h, myPaint);

View file

@ -382,6 +382,10 @@ public class PreferenceActivity extends ZLPreferenceActivity {
));
dictionaryScreen.addOption(fbReader.DictionaryTappingActionOption, "tappingAction");
final Screen imagesScreen = createPreferenceScreen("images");
imagesScreen.addOption(fbReader.ImageTappingActionOption, "tappingAction");
imagesScreen.addOption(fbReader.ImageViewBackgroundOption, "backgroundColor");
final Screen cancelMenuScreen = createPreferenceScreen("cancelMenu");
cancelMenuScreen.addOption(fbReader.ShowPreviousBookInCancelMenuOption, "previousBook");
cancelMenuScreen.addOption(fbReader.ShowPositionsInCancelMenuOption, "positions");

View file

@ -26,6 +26,7 @@ import org.geometerplus.zlibrary.core.filesystem.*;
import org.geometerplus.zlibrary.core.application.*;
import org.geometerplus.zlibrary.core.dialogs.ZLDialogManager;
import org.geometerplus.zlibrary.core.options.*;
import org.geometerplus.zlibrary.core.util.ZLColor;
import org.geometerplus.zlibrary.text.hyphenation.ZLTextHyphenator;
import org.geometerplus.zlibrary.text.view.ZLTextWordCursor;
@ -55,6 +56,14 @@ public final class FBReaderApp extends ZLApplication {
public final ZLEnumOption<DictionaryTappingAction> DictionaryTappingActionOption =
new ZLEnumOption<DictionaryTappingAction>("Options", "DictionaryTappingAction", DictionaryTappingAction.selectWord);
public final ZLColorOption ImageViewBackgroundOption =
new ZLColorOption("Colors", "ImageViewBackground", new ZLColor(127, 127, 127));
public static enum ImageTappingAction {
doNothing, selectImage, openImageView
}
public final ZLEnumOption<ImageTappingAction> ImageTappingActionOption =
new ZLEnumOption<ImageTappingAction>("Options", "ImageTappingAction", ImageTappingAction.openImageView);
public final ZLIntegerRangeOption LeftMarginOption =
new ZLIntegerRangeOption("Options", "LeftMargin", 0, 30, 4);
public final ZLIntegerRangeOption RightMarginOption =

View file

@ -75,7 +75,7 @@ public final class FBView extends ZLTextView {
return true;
}
final ZLTextElementRegion region = findRegion(x, y, 10, ZLTextElementRegion.HyperlinkFilter);
final ZLTextRegion region = findRegion(x, y, 10, ZLTextRegion.HyperlinkFilter);
if (region != null) {
selectRegion(region);
myReader.getViewWidget().reset();
@ -191,15 +191,25 @@ public final class FBView extends ZLTextView {
return true;
}
if (myReader.DictionaryTappingActionOption.getValue() !=
FBReaderApp.DictionaryTappingAction.doNothing) {
final ZLTextElementRegion region = findRegion(x, y, 10, ZLTextElementRegion.AnyRegionFilter);
if (region != null) {
selectRegion(region);
myReader.getViewWidget().reset();
myReader.getViewWidget().repaint();
return true;
}
final ZLTextRegion region = findRegion(x, y, 10, ZLTextRegion.AnyRegionFilter);
boolean doSelectRegion = false;
if (region instanceof ZLTextWordRegion) {
doSelectRegion =
myReader.DictionaryTappingActionOption.getValue() !=
FBReaderApp.DictionaryTappingAction.doNothing;
} else if (region instanceof ZLTextImageRegion) {
doSelectRegion =
myReader.ImageTappingActionOption.getValue() !=
FBReaderApp.ImageTappingAction.doNothing;
} else if (region instanceof ZLTextHyperlinkRegion) {
doSelectRegion = true;
}
if (doSelectRegion) {
selectRegion(region);
myReader.getViewWidget().reset();
myReader.getViewWidget().repaint();
return true;
}
return false;
@ -210,13 +220,17 @@ public final class FBView extends ZLTextView {
return true;
}
if (myReader.DictionaryTappingActionOption.getValue() !=
FBReaderApp.DictionaryTappingAction.doNothing) {
final ZLTextElementRegion region = findRegion(x, y, 10, ZLTextElementRegion.AnyRegionFilter);
if (region != null) {
selectRegion(region);
myReader.getViewWidget().reset();
myReader.getViewWidget().repaint();
final ZLTextRegion selectedRegion = getSelectedRegion();
if (selectedRegion instanceof ZLTextHyperlinkRegion ||
selectedRegion instanceof ZLTextWordRegion) {
if (myReader.DictionaryTappingActionOption.getValue() !=
FBReaderApp.DictionaryTappingAction.doNothing) {
final ZLTextRegion region = findRegion(x, y, 10, ZLTextRegion.AnyRegionFilter);
if (region instanceof ZLTextHyperlinkRegion || region instanceof ZLTextWordRegion) {
selectRegion(region);
myReader.getViewWidget().reset();
myReader.getViewWidget().repaint();
}
}
}
return true;
@ -227,8 +241,19 @@ public final class FBView extends ZLTextView {
return true;
}
if (myReader.DictionaryTappingActionOption.getValue() ==
FBReaderApp.DictionaryTappingAction.openDictionary) {
boolean doRunAction = false;
final ZLTextRegion region = getSelectedRegion();
if (region instanceof ZLTextWordRegion) {
doRunAction =
myReader.DictionaryTappingActionOption.getValue() ==
FBReaderApp.DictionaryTappingAction.openDictionary;
} else if (region instanceof ZLTextImageRegion) {
doRunAction =
myReader.ImageTappingActionOption.getValue() ==
FBReaderApp.ImageTappingAction.openImageView;
}
if (doRunAction) {
myReader.doAction(ActionCode.PROCESS_HYPERLINK);
return true;
}
@ -245,10 +270,10 @@ public final class FBView extends ZLTextView {
(diffY > 0 ? Direction.down : Direction.up) :
(diffX > 0 ? Direction.leftToRight : Direction.rightToLeft);
ZLTextElementRegion region = currentRegion();
final ZLTextElementRegion.Filter filter =
ZLTextRegion region = currentRegion();
final ZLTextRegion.Filter filter =
region instanceof ZLTextWordRegion || myReader.NavigateAllWordsOption.getValue()
? ZLTextElementRegion.AnyRegionFilter : ZLTextElementRegion.ImageOrHyperlinkFilter;
? ZLTextRegion.AnyRegionFilter : ZLTextRegion.ImageOrHyperlinkFilter;
region = nextRegion(direction, filter);
if (region != null) {
selectRegion(region);

View file

@ -0,0 +1,42 @@
/*
* Copyright (C) 2010-2011 Geometer Plus <contact@geometerplus.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
package org.geometerplus.fbreader.network;
import android.text.*;
import android.text.style.URLSpan;
public abstract class HtmlUtil {
public static CharSequence getHtmlText(String text) {
final Spanned htmlText = Html.fromHtml(text);
if (htmlText.getSpans(0, htmlText.length(), URLSpan.class).length == 0) {
return htmlText;
}
final Spannable newHtmlText = Spannable.Factory.getInstance().newSpannable(htmlText);
for (URLSpan span : newHtmlText.getSpans(0, newHtmlText.length(), URLSpan.class)) {
final int start = newHtmlText.getSpanStart(span);
final int end = newHtmlText.getSpanEnd(span);
final int flags = newHtmlText.getSpanFlags(span);
final String url = NetworkLibrary.Instance().rewriteUrl(span.getURL(), true);
newHtmlText.removeSpan(span);
newHtmlText.setSpan(new URLSpan(url), start, end, flags);
}
return newHtmlText;
}
}

View file

@ -48,32 +48,32 @@ public class ATOMXMLReader extends ZLXMLReaderAdapter {
private Map<String,String> myNamespaceMap;
protected static final int START = 0;
private static final int START = 0;
protected static final int FEED = 1;
protected static final int F_ENTRY = 2;
protected static final int F_ID = 3;
protected static final int F_LINK = 4;
protected static final int F_CATEGORY = 5;
protected static final int F_TITLE = 6;
protected static final int F_UPDATED = 7;
protected static final int F_AUTHOR = 8;
protected static final int FA_NAME = 9;
protected static final int FA_URI = 10;
protected static final int FA_EMAIL = 11;
protected static final int FE_AUTHOR = 12;
protected static final int FE_ID = 13;
protected static final int FE_CATEGORY = 14;
protected static final int FE_LINK = 15;
protected static final int FE_PUBLISHED = 16;
protected static final int FE_SUMMARY = 17;
protected static final int FE_CONTENT = 18;
protected static final int FE_TITLE = 19;
protected static final int FE_UPDATED = 20;
protected static final int FEA_NAME = 21;
protected static final int FEA_URI = 22;
protected static final int FEA_EMAIL = 23;
protected static final int F_SUBTITLE = 24;
protected static final int F_ICON = 25;
private static final int F_ID = 3;
private static final int F_LINK = 4;
private static final int F_CATEGORY = 5;
private static final int F_TITLE = 6;
private static final int F_UPDATED = 7;
private static final int F_AUTHOR = 8;
private static final int F_SUBTITLE = 9;
private static final int F_ICON = 10;
private static final int FA_NAME = 11;
private static final int FA_URI = 12;
private static final int FA_EMAIL = 13;
private static final int FE_AUTHOR = 14;
private static final int FE_ID = 15;
private static final int FE_CATEGORY = 16;
protected static final int FE_LINK = 17;
private static final int FE_PUBLISHED = 18;
private static final int FE_SUMMARY = 19;
protected static final int FE_CONTENT = 20;
private static final int FE_TITLE = 21;
private static final int FE_UPDATED = 22;
private static final int FEA_NAME = 23;
private static final int FEA_URI = 24;
private static final int FEA_EMAIL = 25;
protected static final int ATOM_STATE_FIRST_UNUSED = 26;
@ -297,6 +297,7 @@ public class ATOMXMLReader extends ZLXMLReaderAdapter {
}
}
break;
case FE_CONTENT:
case FE_SUMMARY:
case FE_TITLE:
case F_TITLE:
@ -311,8 +312,7 @@ public class ATOMXMLReader extends ZLXMLReaderAdapter {
return interruptReading;
}
public boolean endElementHandler(final String ns, final String tag,
final String bufferContent) {
public boolean endElementHandler(String ns, String tag, String bufferContent) {
boolean interruptReading = false;
switch (myState) {
case START:

View file

@ -19,11 +19,11 @@
package org.geometerplus.fbreader.network.atom;
import android.text.Html;
import org.geometerplus.zlibrary.core.xml.ZLStringMap;
import org.geometerplus.fbreader.formats.xhtml.XHTMLReader;
import org.geometerplus.fbreader.network.NetworkLibrary;
import org.geometerplus.fbreader.network.HtmlUtil;
import org.geometerplus.fbreader.network.atom.ATOMConstants;
public class FormattedBuffer {
@ -87,7 +87,7 @@ public class FormattedBuffer {
switch (myType) {
case Html:
case XHtml:
return Html.fromHtml(text);
return HtmlUtil.getHtmlText(text);
default:
return text;
}

View file

@ -32,9 +32,6 @@ public class OPDSXMLReader extends ATOMXMLReader {
private DCDate myDCIssued;
private String myPriceCurrency;
//private ATOMTitle myTitle; // TODO: implement ATOMTextConstruct & ATOMTitle
//private ATOMSummary mySummary; // TODO: implement ATOMTextConstruct & ATOMSummary
public OPDSXMLReader(ATOMFeedHandler<OPDSFeedMetadata,OPDSEntry> handler, boolean readEntryNotFeed) {
super(handler, readEntryNotFeed);
}
@ -94,11 +91,8 @@ public class OPDSXMLReader extends ATOMXMLReader {
}
@Override
public boolean startElementHandler(final String ns, final String tag,
final ZLStringMap attributes, final String bufferContent) {
final int state = myState;
final boolean interruptReading = super.startElementHandler(ns, tag, attributes, bufferContent);
switch (state) {
public boolean startElementHandler(String ns, String tag, ZLStringMap attributes, String bufferContent) {
switch (myState) {
case FEED:
if (ns == XMLNamespaces.OpenSearch) {
if (tag == OPENSEARCH_TAG_TOTALRESULTS) {
@ -108,8 +102,10 @@ public class OPDSXMLReader extends ATOMXMLReader {
} else if (tag == OPENSEARCH_TAG_STARTINDEX) {
myState = OPENSEARCH_STARTINDEX;
}
return false;
} else {
return super.startElementHandler(ns, tag, attributes, bufferContent);
}
break;
case F_ENTRY:
if (ns == XMLNamespaces.DublinCoreTerms) {
if (tag == DC_TAG_LANGUAGE) {
@ -120,41 +116,45 @@ public class OPDSXMLReader extends ATOMXMLReader {
} else if (tag == DC_TAG_PUBLISHER) {
myState = FE_DC_PUBLISHER;
}
return false;
} else if (ns == XMLNamespaces.CalibreMetadata) {
if (tag == CALIBRE_TAG_SERIES) {
myState = FE_CALIBRE_SERIES;
} else if (tag == CALIBRE_TAG_SERIES_INDEX) {
myState = FE_CALIBRE_SERIES_INDEX;
}
return false;
} else {
return super.startElementHandler(ns, tag, attributes, bufferContent);
}
break;
case FE_LINK:
if (ns == XMLNamespaces.Opds && tag == TAG_PRICE) {
myPriceCurrency = attributes.getValue("currencycode");
myState = FEL_PRICE;
return false;
} if (ns == XMLNamespaces.DublinCoreTerms && tag == DC_TAG_FORMAT) {
myState = FEL_FORMAT;
return false;
} else {
return super.startElementHandler(ns, tag, attributes, bufferContent);
}
break;
case FE_CONTENT:
myFormattedBuffer.appendText(bufferContent);
myFormattedBuffer.appendStartTag(tag, attributes);
super.startElementHandler(ns, tag, attributes, bufferContent);
// FIXME: HACK: html handling must be implemeted neatly
if (tag == TAG_HACK_SPAN || attributes.getValue("class") == "price") {
myState = FEC_HACK_SPAN;
}
break;
return false;
default:
break;
return super.startElementHandler(ns, tag, attributes, bufferContent);
}
return interruptReading;
}
public boolean endElementHandler(final String ns, final String tag,
final String bufferContent) {
final boolean interruptReading = super.endElementHandler(ns, tag, bufferContent);
@Override
public boolean endElementHandler(String ns, String tag, String bufferContent) {
switch (myState) {
default:
return super.endElementHandler(ns, tag, bufferContent);
case FEL_PRICE:
if (ns == XMLNamespaces.Opds && tag == TAG_PRICE) {
if (bufferContent != null && myPriceCurrency != null) {
@ -163,7 +163,7 @@ public class OPDSXMLReader extends ATOMXMLReader {
}
myState = FE_LINK;
}
break;
return false;
case FEL_FORMAT:
if (ns == XMLNamespaces.DublinCoreTerms && tag == DC_TAG_FORMAT) {
if (bufferContent != null) {
@ -171,7 +171,7 @@ public class OPDSXMLReader extends ATOMXMLReader {
}
myState = FE_LINK;
}
break;
return false;
case FEC_HACK_SPAN:
// FIXME: HACK
myFormattedBuffer.appendText(bufferContent);
@ -181,14 +181,14 @@ public class OPDSXMLReader extends ATOMXMLReader {
getOPDSEntry().addAttribute(KEY_PRICE, bufferContent.intern());
}
myState = FE_CONTENT;
break;
return false;
case FE_DC_LANGUAGE:
if (ns == XMLNamespaces.DublinCoreTerms && tag == DC_TAG_LANGUAGE) {
// FIXME:language can be lost:buffer will be truncated, if there are extension tags inside the <dc:language> tag
getOPDSEntry().DCLanguage = bufferContent;
myState = F_ENTRY;
}
break;
return false;
case FE_DC_ISSUED:
if (ns == XMLNamespaces.DublinCoreTerms && tag == DC_TAG_ISSUED) {
// FIXME:issued can be lost:buffer will be truncated, if there are extension tags inside the <dc:issued> tag
@ -198,20 +198,20 @@ public class OPDSXMLReader extends ATOMXMLReader {
myDCIssued = null;
myState = F_ENTRY;
}
break;
return false;
case FE_DC_PUBLISHER:
if (ns == XMLNamespaces.DublinCoreTerms && tag == DC_TAG_PUBLISHER) {
// FIXME:publisher can be lost:buffer will be truncated, if there are extension tags inside the <dc:publisher> tag
getOPDSEntry().DCPublisher = bufferContent;
myState = F_ENTRY;
}
break;
return false;
case FE_CALIBRE_SERIES:
if (ns == XMLNamespaces.CalibreMetadata && tag == CALIBRE_TAG_SERIES) {
getOPDSEntry().SeriesTitle = bufferContent;
myState = F_ENTRY;
}
break;
return false;
case FE_CALIBRE_SERIES_INDEX:
if (ns == XMLNamespaces.CalibreMetadata && tag == CALIBRE_TAG_SERIES_INDEX) {
if (bufferContent != null) {
@ -222,7 +222,7 @@ public class OPDSXMLReader extends ATOMXMLReader {
}
myState = F_ENTRY;
}
break;
return false;
case OPENSEARCH_TOTALRESULTS:
if (ns == XMLNamespaces.OpenSearch && tag == OPENSEARCH_TAG_TOTALRESULTS) {
if (getOPDSFeed() != null && bufferContent != null) {
@ -233,7 +233,7 @@ public class OPDSXMLReader extends ATOMXMLReader {
}
myState = FEED;
}
break;
return false;
case OPENSEARCH_ITEMSPERPAGE:
if (ns == XMLNamespaces.OpenSearch && tag == OPENSEARCH_TAG_ITEMSPERPAGE) {
if (getOPDSFeed() != null && bufferContent != null) {
@ -244,7 +244,7 @@ public class OPDSXMLReader extends ATOMXMLReader {
}
myState = FEED;
}
break;
return false;
case OPENSEARCH_STARTINDEX:
if (ns == XMLNamespaces.OpenSearch && tag == OPENSEARCH_TAG_STARTINDEX) {
if (getOPDSFeed() != null && bufferContent != null) {
@ -255,9 +255,7 @@ public class OPDSXMLReader extends ATOMXMLReader {
}
myState = FEED;
}
break;
return false;
}
return interruptReading;
}
}

View file

@ -31,8 +31,6 @@ public class ZLNetworkException extends Exception {
public static final String ERROR_UNSUPPORTED_PROTOCOL = "unsupportedProtocol";
public static final String ERROR_INVALID_URL = "invalidURL";
public static final String ERROR_AUTHENTICATION_FAILED = "authenticationFailed";
public static final String ERROR_SSL_SUBSYSTEM = "sslError";
public static final String ERROR_SSL_PROTOCOL_ERROR = "sslProtocolError";
// Messages with one parameter:
public static final String ERROR_SOMETHING_WRONG = "somethingWrongMessage";
@ -42,12 +40,6 @@ public class ZLNetworkException extends Exception {
public static final String ERROR_RESOLVE_HOST = "couldntResolveHostMessage";
public static final String ERROR_HOST_CANNOT_BE_REACHED = "hostCantBeReached";
public static final String ERROR_CONNECTION_REFUSED = "connectionRefused";
public static final String ERROR_SSL_CONNECT = "sslConnectErrorMessage";
public static final String ERROR_SSL_BAD_KEY = "sslBadKey";
public static final String ERROR_SSL_PEER_UNVERIFIED = "sslPeerUnverified";
public static final String ERROR_SSL_BAD_FILE = "sslBadCertificateFileMessage";
public static final String ERROR_SSL_EXPIRED = "sslCertificateExpired";
public static final String ERROR_SSL_NOT_YET_VALID = "sslCertificateNotYetValid";
private static ZLResource getResource() {
return ZLResource.resource("dialog").getResource("networkError");

View file

@ -24,8 +24,8 @@ import java.util.ArrayList;
final class ZLTextElementAreaVector extends ArrayList<ZLTextElementArea> {
private static final long serialVersionUID = -7880472347947563506L;
final ArrayList<ZLTextElementRegion> ElementRegions = new ArrayList<ZLTextElementRegion>();
private ZLTextElementRegion myCurrentElementRegion;
final ArrayList<ZLTextRegion> ElementRegions = new ArrayList<ZLTextRegion>();
private ZLTextRegion myCurrentElementRegion;
@Override
public void clear() {

View file

@ -21,7 +21,7 @@ package org.geometerplus.zlibrary.text.view;
import java.util.List;
public class ZLTextHyperlinkRegion extends ZLTextElementRegion {
public class ZLTextHyperlinkRegion extends ZLTextRegion {
public final ZLTextHyperlink Hyperlink;
ZLTextHyperlinkRegion(ZLTextHyperlink hyperlink, List<ZLTextElementArea> list, int fromIndex) {

View file

@ -21,7 +21,7 @@ package org.geometerplus.zlibrary.text.view;
import java.util.List;
public class ZLTextImageRegion extends ZLTextElementRegion {
public class ZLTextImageRegion extends ZLTextRegion {
public final ZLTextImageElement ImageElement;
ZLTextImageRegion(ZLTextImageElement imageElement, List<ZLTextElementArea> list, int fromIndex) {

View file

@ -23,25 +23,25 @@ import java.util.*;
import org.geometerplus.zlibrary.core.view.ZLPaintContext;
public abstract class ZLTextElementRegion {
public abstract class ZLTextRegion {
public static interface Filter {
boolean accepts(ZLTextElementRegion region);
boolean accepts(ZLTextRegion region);
}
public static Filter AnyRegionFilter = new Filter() {
public boolean accepts(ZLTextElementRegion region) {
public boolean accepts(ZLTextRegion region) {
return true;
}
};
public static Filter HyperlinkFilter = new Filter() {
public boolean accepts(ZLTextElementRegion region) {
public boolean accepts(ZLTextRegion region) {
return region instanceof ZLTextHyperlinkRegion;
}
};
public static Filter ImageOrHyperlinkFilter = new Filter() {
public boolean accepts(ZLTextElementRegion region) {
public boolean accepts(ZLTextRegion region) {
return
region instanceof ZLTextImageRegion ||
region instanceof ZLTextHyperlinkRegion;
@ -53,7 +53,7 @@ public abstract class ZLTextElementRegion {
private int myToIndex;
private ZLTextHorizontalConvexHull myHull;
ZLTextElementRegion(List<ZLTextElementArea> list, int fromIndex) {
ZLTextRegion(List<ZLTextElementArea> list, int fromIndex) {
myList = list;
myFromIndex = fromIndex;
myToIndex = fromIndex + 1;
@ -90,27 +90,27 @@ public abstract class ZLTextElementRegion {
return convexHull().distanceTo(x, y);
}
boolean isAtRightOf(ZLTextElementRegion other) {
boolean isAtRightOf(ZLTextRegion other) {
return
other == null ||
myList.get(myFromIndex).XStart >= other.myList.get(other.myToIndex - 1).XEnd;
}
boolean isAtLeftOf(ZLTextElementRegion other) {
boolean isAtLeftOf(ZLTextRegion other) {
return other == null || other.isAtRightOf(this);
}
boolean isUnder(ZLTextElementRegion other) {
boolean isUnder(ZLTextRegion other) {
return
other == null ||
myList.get(myFromIndex).YStart >= other.myList.get(other.myToIndex - 1).YEnd;
}
boolean isOver(ZLTextElementRegion other) {
boolean isOver(ZLTextRegion other) {
return other == null || other.isUnder(this);
}
boolean isExactlyUnder(ZLTextElementRegion other) {
boolean isExactlyUnder(ZLTextRegion other) {
if (other == null) {
return true;
}
@ -129,7 +129,7 @@ public abstract class ZLTextElementRegion {
return false;
}
boolean isExactlyOver(ZLTextElementRegion other) {
boolean isExactlyOver(ZLTextRegion other) {
return other == null || other.isExactlyUnder(this);
}
}

View file

@ -304,7 +304,7 @@ public abstract class ZLTextView extends ZLTextViewBase {
++index;
}
final ZLTextElementRegion selectedElementRegion = getCurrentElementRegion(page);
final ZLTextRegion selectedElementRegion = getCurrentElementRegion(page);
if (selectedElementRegion != null && myHighlightSelectedRegion) {
selectedElementRegion.draw(context);
}
@ -1285,7 +1285,7 @@ public abstract class ZLTextView extends ZLTextViewBase {
}
*/
private ZLTextElementRegion mySelectedRegion;
private ZLTextRegion mySelectedRegion;
private boolean myHighlightSelectedRegion = true;
public void hideSelectedRegionBorder() {
@ -1293,8 +1293,8 @@ public abstract class ZLTextView extends ZLTextViewBase {
Application.getViewWidget().reset();
}
private ZLTextElementRegion getCurrentElementRegion(ZLTextPage page) {
final ArrayList<ZLTextElementRegion> elementRegions = page.TextElementMap.ElementRegions;
private ZLTextRegion getCurrentElementRegion(ZLTextPage page) {
final ArrayList<ZLTextRegion> elementRegions = page.TextElementMap.ElementRegions;
final int index = elementRegions.indexOf(mySelectedRegion);
if (index == -1) {
return null;
@ -1302,14 +1302,14 @@ public abstract class ZLTextView extends ZLTextViewBase {
return elementRegions.get(index);
}
public ZLTextElementRegion getSelectedRegion() {
public ZLTextRegion getSelectedRegion() {
return getCurrentElementRegion(myCurrentPage);
}
protected ZLTextElementRegion findRegion(int x, int y, int maxDistance, ZLTextElementRegion.Filter filter) {
ZLTextElementRegion bestRegion = null;
protected ZLTextRegion findRegion(int x, int y, int maxDistance, ZLTextRegion.Filter filter) {
ZLTextRegion bestRegion = null;
int distance = maxDistance + 1;
for (ZLTextElementRegion region : myCurrentPage.TextElementMap.ElementRegions) {
for (ZLTextRegion region : myCurrentPage.TextElementMap.ElementRegions) {
if (filter.accepts(region)) {
final int d = region.distanceTo(x, y);
if (d < distance) {
@ -1321,7 +1321,7 @@ public abstract class ZLTextView extends ZLTextViewBase {
return bestRegion;
}
protected void selectRegion(ZLTextElementRegion region) {
protected void selectRegion(ZLTextRegion region) {
if (region == null || !region.equals(mySelectedRegion)) {
myHighlightSelectedRegion = true;
}
@ -1333,11 +1333,11 @@ public abstract class ZLTextView extends ZLTextViewBase {
myHighlightSelectedRegion = true;
}
protected ZLTextElementRegion currentRegion() {
protected ZLTextRegion currentRegion() {
if (mySelectedRegion == null) {
return null;
}
final ArrayList<ZLTextElementRegion> elementRegions =
final ArrayList<ZLTextRegion> elementRegions =
myCurrentPage.TextElementMap.ElementRegions;
if (elementRegions.isEmpty()) {
return null;
@ -1346,8 +1346,8 @@ public abstract class ZLTextView extends ZLTextViewBase {
return index >= 0 ? elementRegions.get(index) : null;
}
protected ZLTextElementRegion nextRegion(Direction direction, ZLTextElementRegion.Filter filter) {
final ArrayList<ZLTextElementRegion> elementRegions =
protected ZLTextRegion nextRegion(Direction direction, ZLTextRegion.Filter filter) {
final ArrayList<ZLTextRegion> elementRegions =
myCurrentPage.TextElementMap.ElementRegions;
if (elementRegions.isEmpty()) {
return null;
@ -1380,7 +1380,7 @@ public abstract class ZLTextView extends ZLTextViewBase {
switch (direction) {
case rightToLeft:
for (; index >= 0; --index) {
final ZLTextElementRegion candidate = elementRegions.get(index);
final ZLTextRegion candidate = elementRegions.get(index);
if (filter.accepts(candidate) && candidate.isAtLeftOf(mySelectedRegion)) {
return candidate;
}
@ -1388,7 +1388,7 @@ public abstract class ZLTextView extends ZLTextViewBase {
break;
case leftToRight:
for (; index < elementRegions.size(); ++index) {
final ZLTextElementRegion candidate = elementRegions.get(index);
final ZLTextRegion candidate = elementRegions.get(index);
if (filter.accepts(candidate) && candidate.isAtRightOf(mySelectedRegion)) {
return candidate;
}
@ -1396,9 +1396,9 @@ public abstract class ZLTextView extends ZLTextViewBase {
break;
case down:
{
ZLTextElementRegion firstCandidate = null;
ZLTextRegion firstCandidate = null;
for (; index < elementRegions.size(); ++index) {
final ZLTextElementRegion candidate = elementRegions.get(index);
final ZLTextRegion candidate = elementRegions.get(index);
if (!filter.accepts(candidate)) {
continue;
}
@ -1415,9 +1415,9 @@ public abstract class ZLTextView extends ZLTextViewBase {
break;
}
case up:
ZLTextElementRegion firstCandidate = null;
ZLTextRegion firstCandidate = null;
for (; index >= 0; --index) {
final ZLTextElementRegion candidate = elementRegions.get(index);
final ZLTextRegion candidate = elementRegions.get(index);
if (!filter.accepts(candidate)) {
continue;
}

View file

@ -21,7 +21,7 @@ package org.geometerplus.zlibrary.text.view;
import java.util.List;
public class ZLTextWordRegion extends ZLTextElementRegion {
public class ZLTextWordRegion extends ZLTextRegion {
public final ZLTextWord Word;
ZLTextWordRegion(ZLTextWord word, List<ZLTextElementArea> list, int fromIndex) {