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

updated TODOs; better ColorDict integration

This commit is contained in:
Nikolay Pultsin 2010-12-23 18:56:41 +00:00
parent 41a5751a14
commit 2845087bd0
25 changed files with 136 additions and 88 deletions

View file

@ -1 +1,2 @@
* (?) Показывать названия шрифтов соответсвующими шрифтами After 0.99:
* Показывать названия шрифтов соответсвующими шрифтами

View file

@ -1,3 +1,5 @@
0.99:
* 'Reload' button action * 'Reload' button action
DONE apply changes from edit activity when info activity is visible again DONE apply changes from edit activity when info activity is visible again
* apply changes from edit activity when library activity is visible again * apply changes from edit activity when library activity is visible again

View file

@ -1,3 +1,3 @@
After 0.99:
* цвет в preference view * цвет в preference view
* preview текста в настройках цветов (и не только) * preview текста в настройках цветов (и не только)

View file

@ -1,7 +1,9 @@
0.99: 0.99:
* Run 'install ColorDict' dialog DONE Run 'install ColorDict' dialog
* Synchronize resources DONE Synchronize resources
* Other dictionary (? if there is no way to download dictionary files for ColorDict)
After 0.99: After 0.99:
* More convenient mode changing * More convenient mode changing
* Installation from the site if AM is not available
* Integration with other dictionaries * Integration with other dictionaries

View file

@ -1,26 +1,13 @@
0.99:
* Reload book info from file
* returning from footnotes
* prevent from sleep if battery is in charging mode
* Open the help file if the current book is deleted from library
After 0.99:
* Partial loading from database * Partial loading from database
* Database updating in backgorund * Database updating in backgorund
* Watch filesystem after loading * Watch filesystem after loading
DONE Covers loading in background
DONE Wait messages
DONE Favorites
DONE Show text if the favorites list is empty
DONE Search
* Show wait message during search * Show wait message during search
DONE File manager
DONE Activity caption
DONE Book deleting
DONE Show book info activity instead of immediate opening/menu
DONE Main menu
DONE Context menu
* Reload book info from file
* Reload book info for all the files * Reload book info for all the files
DONE Highlight current book
DONE Bug: search with no results clears search results subtree; should not
* garbage in Boris Akunin, Сказки для идиотов * garbage in Boris Akunin, Сказки для идиотов
DONE duplicate tags in the same book
DONE Bug: b1.zip (paths in zips?)
DONE Bug: b1.zip, archive inside archive
* Open the help file if the current book is deleted from library
* returning from footnotes
* prevent from sleep if battery is in charging mode

View file

@ -1,7 +1,6 @@
LITRES:
0.99: 0.99:
DONE Тестирование наличия функций без запуска тестовой Actvity
* Авторегистрация * Авторегистрация
* Пополнение счета через sms * Пополнение счета через sms
* Автопокупка * Автопокупка
@ -15,6 +14,7 @@ LITRES:
* что делать, если оттуда нельзя поставить, потому что запрещена установка из "Unknown sources"? * что делать, если оттуда нельзя поставить, потому что запрещена установка из "Unknown sources"?
* как дать возможность ставить из других магазинов? * как дать возможность ставить из других магазинов?
* plugin для TTS * plugin для TTS
* заполнить все поля для плагина в маркете
After 0.99: After 0.99:
* 'My Basket' item * 'My Basket' item

View file

@ -204,6 +204,10 @@
<node name="updatePlugin"> <node name="updatePlugin">
<node name="title" value="Update plugin" toBeTranslated="true" /> <node name="title" value="Update plugin" toBeTranslated="true" />
</node> </node>
<node name="installDictionary">
<node name="title" value="Install dictionary" toBeTranslated="true" />
<node name="message" value="Would you like to install %s?" toBeTranslated="true" />
</node>
<node name="BookInfo"> <node name="BookInfo">
<node name="fileName" value="Název souboru"/> <node name="fileName" value="Název souboru"/>
<node name="title" value="Název"/> <node name="title" value="Název"/>
@ -555,10 +559,12 @@
</node> </node>
</node> </node>
<node name="errorMessage"> <node name="errorMessage">
<node name="cannotRunAndroidMarket" value="Cannot access Android Market. Please, install %s manually" toBeTranslated="true"/>
<node name="textNotFound" value="V knize není bohužel žádný vhodný text"/> <node name="textNotFound" value="V knize není bohužel žádný vhodný text"/>
<node name="bookNotFound" value="V knihovně nejsou bohužel žádné vhodné knihy"/> <node name="bookNotFound" value="V knihovně nejsou bohužel žádné vhodné knihy"/>
<node name="bookmarkNotFound" value="Nejsou bohužel žádné vhodné záložky"/> <node name="bookmarkNotFound" value="Nejsou bohužel žádné vhodné záložky"/>
<node name="cannotOpenBook" value="Tuto knihu právě teď nelze bohužel otevřít"/> <node name="cannotOpenBook" value="Tuto knihu právě teď nelze bohužel otevřít"/>
<node name="dictionaryIsNotInstalled" value="Dictionary is not installed, sorry" toBeTranslated="true"/>
<node name="permissionDenied" value="Oprávnění bylo bohužel odmítnuto"/> <node name="permissionDenied" value="Oprávnění bylo bohužel odmítnuto"/>
<node name="noFavorites" value="Seznam oblíbených je bohužel prázdný"/> <node name="noFavorites" value="Seznam oblíbených je bohužel prázdný"/>
</node> </node>

View file

@ -205,6 +205,10 @@
<node name="updatePlugin"> <node name="updatePlugin">
<node name="title" value="Update plugin" toBeTranslated="true" /> <node name="title" value="Update plugin" toBeTranslated="true" />
</node> </node>
<node name="installDictionary">
<node name="title" value="Install dictionary" toBeTranslated="true" />
<node name="message" value="Would you like to install %s?" toBeTranslated="true" />
</node>
<node name="BookInfo"> <node name="BookInfo">
<node name="fileName" value="Dateiname"/> <node name="fileName" value="Dateiname"/>
<node name="title" value="Titel"/> <node name="title" value="Titel"/>
@ -556,10 +560,12 @@
</node> </node>
</node> </node>
<node name="errorMessage"> <node name="errorMessage">
<node name="cannotRunAndroidMarket" value="Cannot access Android Market. Please, install %s manually" toBeTranslated="true"/>
<node name="textNotFound" value="Es wurde kein passender Text im Buch gefunden."/> <node name="textNotFound" value="Es wurde kein passender Text im Buch gefunden."/>
<node name="bookNotFound" value="Es wurden keine passenden Bücher in der Bibliothek gefunden."/> <node name="bookNotFound" value="Es wurden keine passenden Bücher in der Bibliothek gefunden."/>
<node name="bookmarkNotFound" value="Es wurden kein passenden Lesezeichen gefunden."/> <node name="bookmarkNotFound" value="Es wurden kein passenden Lesezeichen gefunden."/>
<node name="cannotOpenBook" value="Das Buch kann zurzeit nicht geöffnet werden."/> <node name="cannotOpenBook" value="Das Buch kann zurzeit nicht geöffnet werden."/>
<node name="dictionaryIsNotInstalled" value="Dictionary is not installed, sorry" toBeTranslated="true"/>
<node name="permissionDenied" value="Permission denied, sorry" toBeTranslated="true"/> <node name="permissionDenied" value="Permission denied, sorry" toBeTranslated="true"/>
<node name="noFavorites" value="Your favorites list is empty, sorry" toBeTranslated="true"/> <node name="noFavorites" value="Your favorites list is empty, sorry" toBeTranslated="true"/>
</node> </node>

View file

@ -203,6 +203,10 @@
<node name="updatePlugin"> <node name="updatePlugin">
<node name="title" value="Update plugin"/> <node name="title" value="Update plugin"/>
</node> </node>
<node name="installDictionary">
<node name="title" value="Install dictionary"/>
<node name="message" value="Would you like to install %s?"/>
</node>
<node name="BookInfo"> <node name="BookInfo">
<node name="fileName" value="File name"/> <node name="fileName" value="File name"/>
<node name="title" value="Title"/> <node name="title" value="Title"/>
@ -554,11 +558,12 @@
</node> </node>
</node> </node>
<node name="errorMessage"> <node name="errorMessage">
<node name="cannotRunAndroidMarket" value="Cannot access Android Market. Please, install %s manually"/>
<node name="textNotFound" value="There is no suitable text in the book, sorry"/> <node name="textNotFound" value="There is no suitable text in the book, sorry"/>
<node name="bookNotFound" value="There are no suitable books in the library, sorry"/> <node name="bookNotFound" value="There are no suitable books in the library, sorry"/>
<node name="bookmarkNotFound" value="There are no suitable bookmarks, sorry"/> <node name="bookmarkNotFound" value="There are no suitable bookmarks, sorry"/>
<node name="cannotOpenBook" value="Cannot open this book at the moment, sorry"/> <node name="cannotOpenBook" value="Cannot open this book at the moment, sorry"/>
<node name="dictNotInstalled" value="Supported dictionary is not installed, sorry"/> <node name="dictionaryIsNotInstalled" value="Dictionary is not installed, sorry"/>
<node name="permissionDenied" value="Permission denied, sorry"/> <node name="permissionDenied" value="Permission denied, sorry"/>
<node name="noFavorites" value="Your favorites list is empty, sorry"/> <node name="noFavorites" value="Your favorites list is empty, sorry"/>
</node> </node>

View file

@ -207,6 +207,10 @@
<node name="updatePlugin"> <node name="updatePlugin">
<node name="title" value="Update plugin" toBeTranslated="true" /> <node name="title" value="Update plugin" toBeTranslated="true" />
</node> </node>
<node name="installDictionary">
<node name="title" value="Install dictionary" toBeTranslated="true" />
<node name="message" value="Would you like to install %s?" toBeTranslated="true" />
</node>
<node name="BookInfo"> <node name="BookInfo">
<node name="fileName" value="Nom du fichier"/> <node name="fileName" value="Nom du fichier"/>
<node name="title" value="Titre"/> <node name="title" value="Titre"/>
@ -564,10 +568,12 @@
</node> </node>
</node> </node>
<node name="errorMessage"> <node name="errorMessage">
<node name="cannotRunAndroidMarket" value="Cannot access Android Market. Please, install %s manually" toBeTranslated="true"/>
<node name="textNotFound" value="Aucune occurence dans le livre"/> <node name="textNotFound" value="Aucune occurence dans le livre"/>
<node name="bookNotFound" value="Aucun livre correspondant dans la bibliothèque"/> <node name="bookNotFound" value="Aucun livre correspondant dans la bibliothèque"/>
<node name="bookmarkNotFound" value="Aucun marque-page correspondant"/> <node name="bookmarkNotFound" value="Aucun marque-page correspondant"/>
<node name="cannotOpenBook" value="Impossible d'ouvrir le livre"/> <node name="cannotOpenBook" value="Impossible d'ouvrir le livre"/>
<node name="dictionaryIsNotInstalled" value="Dictionary is not installed, sorry" toBeTranslated="true"/>
<node name="permissionDenied" value="Permission denied, sorry" toBeTranslated="true"/> <node name="permissionDenied" value="Permission denied, sorry" toBeTranslated="true"/>
<node name="noFavorites" value="Your favorites list is empty, sorry" toBeTranslated="true"/> <node name="noFavorites" value="Your favorites list is empty, sorry" toBeTranslated="true"/>
</node> </node>

View file

@ -204,6 +204,10 @@
<node name="updatePlugin"> <node name="updatePlugin">
<node name="title" value="Update plugin" toBeTranslated="true" /> <node name="title" value="Update plugin" toBeTranslated="true" />
</node> </node>
<node name="installDictionary">
<node name="title" value="Install dictionary" toBeTranslated="true" />
<node name="message" value="Would you like to install %s?" toBeTranslated="true" />
</node>
<node name="BookInfo"> <node name="BookInfo">
<node name="fileName" value="Fájlnév"/> <node name="fileName" value="Fájlnév"/>
<node name="title" value="Cím"/> <node name="title" value="Cím"/>
@ -555,10 +559,12 @@
</node> </node>
</node> </node>
<node name="errorMessage"> <node name="errorMessage">
<node name="cannotRunAndroidMarket" value="Cannot access Android Market. Please, install %s manually" toBeTranslated="true"/>
<node name="textNotFound" value="A keresett szöveg sajnos nem található a könyvben"/> <node name="textNotFound" value="A keresett szöveg sajnos nem található a könyvben"/>
<node name="bookNotFound" value="A keresett könyv sajnos nem található meg a könyvtárban"/> <node name="bookNotFound" value="A keresett könyv sajnos nem található meg a könyvtárban"/>
<node name="bookmarkNotFound" value="Sajnos nem találhatóak könyvjelzők"/> <node name="bookmarkNotFound" value="Sajnos nem találhatóak könyvjelzők"/>
<node name="cannotOpenBook" value="A könyv sajnos jelenleg nem nyitható meg"/> <node name="cannotOpenBook" value="A könyv sajnos jelenleg nem nyitható meg"/>
<node name="dictionaryIsNotInstalled" value="Dictionary is not installed, sorry" toBeTranslated="true"/>
<node name="permissionDenied" value="Permission denied, sorry" toBeTranslated="true"/> <node name="permissionDenied" value="Permission denied, sorry" toBeTranslated="true"/>
<node name="noFavorites" value="Your favorites list is empty, sorry" toBeTranslated="true"/> <node name="noFavorites" value="Your favorites list is empty, sorry" toBeTranslated="true"/>
</node> </node>

View file

@ -204,6 +204,10 @@
<node name="updatePlugin"> <node name="updatePlugin">
<node name="title" value="Update plugin" toBeTranslated="true" /> <node name="title" value="Update plugin" toBeTranslated="true" />
</node> </node>
<node name="installDictionary">
<node name="title" value="Install dictionary" toBeTranslated="true" />
<node name="message" value="Would you like to install %s?" toBeTranslated="true" />
</node>
<node name="BookInfo"> <node name="BookInfo">
<node name="fileName" value="Nome file"/> <node name="fileName" value="Nome file"/>
<node name="title" value="Titolo"/> <node name="title" value="Titolo"/>
@ -555,10 +559,12 @@
</node> </node>
</node> </node>
<node name="errorMessage"> <node name="errorMessage">
<node name="cannotRunAndroidMarket" value="Cannot access Android Market. Please, install %s manually" toBeTranslated="true"/>
<node name="textNotFound" value="Spiacente, non c'è un testo adatto all'interno del libro"/> <node name="textNotFound" value="Spiacente, non c'è un testo adatto all'interno del libro"/>
<node name="bookNotFound" value="Spiacente, non ci sono libri adatti nella libreria"/> <node name="bookNotFound" value="Spiacente, non ci sono libri adatti nella libreria"/>
<node name="bookmarkNotFound" value="Spiacente, non ci sono segnalibri adatti"/> <node name="bookmarkNotFound" value="Spiacente, non ci sono segnalibri adatti"/>
<node name="cannotOpenBook" value="Spiacente, non è possibile aprire il libro in questo momento"/> <node name="cannotOpenBook" value="Spiacente, non è possibile aprire il libro in questo momento"/>
<node name="dictionaryIsNotInstalled" value="Dictionary is not installed, sorry" toBeTranslated="true"/>
<node name="permissionDenied" value="Permission denied, sorry" toBeTranslated="true"/> <node name="permissionDenied" value="Permission denied, sorry" toBeTranslated="true"/>
<node name="noFavorites" value="Your favorites list is empty, sorry" toBeTranslated="true"/> <node name="noFavorites" value="Your favorites list is empty, sorry" toBeTranslated="true"/>
</node> </node>

View file

@ -203,6 +203,10 @@
<node name="updatePlugin"> <node name="updatePlugin">
<node name="title" value="Новая версия"/> <node name="title" value="Новая версия"/>
</node> </node>
<node name="installDictionary">
<node name="title" value="Установка словаря"/>
<node name="message" value="Установить %s?"/>
</node>
<node name="BookInfo"> <node name="BookInfo">
<node name="fileName" value="Файл"/> <node name="fileName" value="Файл"/>
<node name="title" value="Название"/> <node name="title" value="Название"/>
@ -554,11 +558,12 @@
</node> </node>
</node> </node>
<node name="errorMessage"> <node name="errorMessage">
<node name="cannotRunAndroidMarket" value="Не удается запустить Android Market. Попробуйте установить %s вручную"/>
<node name="textNotFound" value="В этой книге нет такого текста"/> <node name="textNotFound" value="В этой книге нет такого текста"/>
<node name="bookNotFound" value="Нет подходящих книг"/> <node name="bookNotFound" value="Нет подходящих книг"/>
<node name="bookmarkNotFound" value="Нет подходящих закладок"/> <node name="bookmarkNotFound" value="Нет подходящих закладок"/>
<node name="cannotOpenBook" value="Не удается открыть книгу"/> <node name="cannotOpenBook" value="Не удается открыть книгу"/>
<node name="dictNotInstalled" value="Не установлен поддерживаемый словарь"/> <node name="dictionaryIsNotInstalled" value="Не удалось запустить словарь"/>
<node name="permissionDenied" value="Нет доступа к файлам" /> <node name="permissionDenied" value="Нет доступа к файлам" />
<node name="noFavorites" value="Вы пока не добавили ни одной книги в «Избранное»"/> <node name="noFavorites" value="Вы пока не добавили ни одной книги в «Избранное»"/>
</node> </node>

View file

@ -204,6 +204,10 @@
<node name="updatePlugin"> <node name="updatePlugin">
<node name="title" value="Update plugin" toBeTranslated="true" /> <node name="title" value="Update plugin" toBeTranslated="true" />
</node> </node>
<node name="installDictionary">
<node name="title" value="Install dictionary" toBeTranslated="true" />
<node name="message" value="Would you like to install %s?" toBeTranslated="true" />
</node>
<node name="BookInfo"> <node name="BookInfo">
<node name="fileName" value="Файл"/> <node name="fileName" value="Файл"/>
<node name="title" value="Назва"/> <node name="title" value="Назва"/>
@ -555,10 +559,12 @@
</node> </node>
</node> </node>
<node name="errorMessage"> <node name="errorMessage">
<node name="cannotRunAndroidMarket" value="Cannot access Android Market. Please, install %s manually" toBeTranslated="true"/>
<node name="textNotFound" value="У цій книзі нема такого тексту"/> <node name="textNotFound" value="У цій книзі нема такого тексту"/>
<node name="bookNotFound" value="Немає відповідних книг"/> <node name="bookNotFound" value="Немає відповідних книг"/>
<node name="bookmarkNotFound" value="Нема відповідних закладок"/> <node name="bookmarkNotFound" value="Нема відповідних закладок"/>
<node name="cannotOpenBook" value="Невдається відкрити книгу"/> <node name="cannotOpenBook" value="Невдається відкрити книгу"/>
<node name="dictionaryIsNotInstalled" value="Dictionary is not installed, sorry" toBeTranslated="true"/>
<node name="permissionDenied" value="Permission denied, sorry" toBeTranslated="true"/> <node name="permissionDenied" value="Permission denied, sorry" toBeTranslated="true"/>
<node name="noFavorites" value="Your favorites list is empty, sorry" toBeTranslated="true"/> <node name="noFavorites" value="Your favorites list is empty, sorry" toBeTranslated="true"/>
</node> </node>

View file

@ -204,6 +204,10 @@
<node name="updatePlugin"> <node name="updatePlugin">
<node name="title" value="Update plugin" toBeTranslated="true" /> <node name="title" value="Update plugin" toBeTranslated="true" />
</node> </node>
<node name="installDictionary">
<node name="title" value="Install dictionary" toBeTranslated="true" />
<node name="message" value="Would you like to install %s?" toBeTranslated="true" />
</node>
<node name="BookInfo"> <node name="BookInfo">
<node name="fileName" value="Tên tập tin"/> <node name="fileName" value="Tên tập tin"/>
<node name="title" value="Tiêu đề"/> <node name="title" value="Tiêu đề"/>
@ -555,10 +559,12 @@
</node> </node>
</node> </node>
<node name="errorMessage"> <node name="errorMessage">
<node name="cannotRunAndroidMarket" value="Cannot access Android Market. Please, install %s manually" toBeTranslated="true"/>
<node name="textNotFound" value="Xin lỗi, không có từ thích hợp"/> <node name="textNotFound" value="Xin lỗi, không có từ thích hợp"/>
<node name="bookNotFound" value="Xin lỗi, không có quyển nào thích hợp trong thư viện"/> <node name="bookNotFound" value="Xin lỗi, không có quyển nào thích hợp trong thư viện"/>
<node name="bookmarkNotFound" value="Xin lỗi, không có đánh dấu thích hợp"/> <node name="bookmarkNotFound" value="Xin lỗi, không có đánh dấu thích hợp"/>
<node name="cannotOpenBook" value="Xin lỗi, không thể mở sách vào lúc này"/> <node name="cannotOpenBook" value="Xin lỗi, không thể mở sách vào lúc này"/>
<node name="dictionaryIsNotInstalled" value="Dictionary is not installed, sorry" toBeTranslated="true"/>
<node name="permissionDenied" value="Permission denied, sorry" toBeTranslated="true"/> <node name="permissionDenied" value="Permission denied, sorry" toBeTranslated="true"/>
<node name="noFavorites" value="Your favorites list is empty, sorry" toBeTranslated="true"/> <node name="noFavorites" value="Your favorites list is empty, sorry" toBeTranslated="true"/>
</node> </node>

View file

@ -204,8 +204,9 @@
<node name="updatePlugin"> <node name="updatePlugin">
<node name="title" value="Update plugin" toBeTranslated="true" /> <node name="title" value="Update plugin" toBeTranslated="true" />
</node> </node>
<node name="updatePlugin"> <node name="installDictionary">
<node name="title" value="Update plugin" toBeTranslated="true" /> <node name="title" value="Install dictionary" toBeTranslated="true" />
<node name="message" value="Would you like to install %s?" toBeTranslated="true" />
</node> </node>
<node name="BookInfo"> <node name="BookInfo">
<node name="fileName" value="文件" /> <node name="fileName" value="文件" />
@ -564,10 +565,12 @@
</node> </node>
</node> </node>
<node name="errorMessage"> <node name="errorMessage">
<node name="cannotRunAndroidMarket" value="Cannot access Android Market. Please, install %s manually" toBeTranslated="true"/>
<node name="textNotFound" value="对不起,本书中找不到对应内容" /> <node name="textNotFound" value="对不起,本书中找不到对应内容" />
<node name="bookNotFound" value="对不起,书库中找不到需要的书籍" /> <node name="bookNotFound" value="对不起,书库中找不到需要的书籍" />
<node name="bookmarkNotFound" value="对不起,找不到对应的书签" /> <node name="bookmarkNotFound" value="对不起,找不到对应的书签" />
<node name="cannotOpenBook" value="对不起,无法开启本书" /> <node name="cannotOpenBook" value="对不起,无法开启本书" />
<node name="dictionaryIsNotInstalled" value="Dictionary is not installed, sorry" toBeTranslated="true"/>
<node name="permissionDenied" value="对不起,没有权限"/> <node name="permissionDenied" value="对不起,没有权限"/>
<node name="noFavorites" value="对不起,你的收藏列表为空"/> <node name="noFavorites" value="对不起,你的收藏列表为空"/>
</node> </node>

View file

@ -14,16 +14,6 @@
<data android:scheme="http" android:host="data.fbreader.org" android:path="/packages/org.geometerplus.fbreader.plugin.network.litres.apk" /> <data android:scheme="http" android:host="data.fbreader.org" android:path="/packages/org.geometerplus.fbreader.plugin.network.litres.apk" />
<data android:scheme="http" android:host="data.fbreader.org" android:path="/packages/org.geometerplus.fbreader.plugin.network.litres.apk_1" /> <data android:scheme="http" android:host="data.fbreader.org" android:path="/packages/org.geometerplus.fbreader.plugin.network.litres.apk_1" />
</intent-filter> </intent-filter>
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.fbreader.action.NETWORK_LIBRARY_REGISTER_TEST" />
<data android:scheme="https" android:host="robot.litres.ru" />
</intent-filter>
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.fbreader.action.NETWORK_LIBRARY_SMS_REFILLING_TEST" />
<data android:scheme="http" android:host="data.fbreader.org" android:path="/catalogs/litres/index.php"/>
</intent-filter>
</activity> </activity>
<activity android:name=".UserRegistrationActivity" android:configChanges="orientation|keyboardHidden" android:theme="@android:style/Theme.Dialog"> <activity android:name=".UserRegistrationActivity" android:configChanges="orientation|keyboardHidden" android:theme="@android:style/Theme.Dialog">
<intent-filter> <intent-filter>
@ -32,5 +22,12 @@
<data android:scheme="https" android:host="robot.litres.ru" /> <data android:scheme="https" android:host="robot.litres.ru" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".SmsRefillingActivity" android:configChanges="orientation|keyboardHidden" android:theme="@android:style/Theme.Dialog">
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.fbreader.action.NETWORK_LIBRARY_SMS_REFILLING" />
<data android:scheme="http" android:host="data.fbreader.org" android:path="/catalogs/litres/index.php"/>
</intent-filter>
</activity>
</application> </application>
</manifest> </manifest>

View file

@ -36,6 +36,7 @@ import org.geometerplus.zlibrary.core.view.ZLView;
import org.geometerplus.zlibrary.text.view.ZLTextFixedPosition; import org.geometerplus.zlibrary.text.view.ZLTextFixedPosition;
import org.geometerplus.zlibrary.text.view.ZLTextPosition; import org.geometerplus.zlibrary.text.view.ZLTextPosition;
import org.geometerplus.zlibrary.text.view.ZLTextView; import org.geometerplus.zlibrary.text.view.ZLTextView;
import org.geometerplus.zlibrary.text.view.ZLTextViewMode;
import org.geometerplus.zlibrary.ui.android.R; import org.geometerplus.zlibrary.ui.android.R;
import org.geometerplus.zlibrary.ui.android.library.ZLAndroidActivity; import org.geometerplus.zlibrary.ui.android.library.ZLAndroidActivity;
import org.geometerplus.zlibrary.ui.android.library.ZLAndroidApplication; import org.geometerplus.zlibrary.ui.android.library.ZLAndroidApplication;
@ -135,6 +136,8 @@ public final class FBReader extends ZLAndroidActivity {
fbReader.addAction(ActionCode.SEARCH, new SearchAction(this, fbReader)); fbReader.addAction(ActionCode.SEARCH, new SearchAction(this, fbReader));
fbReader.addAction(ActionCode.PROCESS_HYPERLINK, new ProcessHyperlinkAction(this, fbReader)); fbReader.addAction(ActionCode.PROCESS_HYPERLINK, new ProcessHyperlinkAction(this, fbReader));
fbReader.addAction(ActionCode.SET_TEXT_VIEW_MODE_VISIT_HYPERLINKS, new SwitchTextViewModeAction(this, fbReader, ZLTextViewMode.MODE_VISIT_HYPERLINKS));
fbReader.addAction(ActionCode.SET_TEXT_VIEW_MODE_VISIT_ALL_WORDS, new SwitchTextViewModeAction(this, fbReader, ZLTextViewMode.MODE_VISIT_ALL_WORDS));
} }
@Override @Override

View file

@ -19,9 +19,7 @@
package org.geometerplus.android.fbreader; package org.geometerplus.android.fbreader;
import android.app.SearchManager;
import android.content.ActivityNotFoundException; import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Intent; import android.content.Intent;
import android.net.Uri; import android.net.Uri;
import android.widget.Toast; import android.widget.Toast;
@ -78,18 +76,13 @@ class ProcessHyperlinkAction extends FBAction {
if (start == end) { if (start == end) {
return; return;
} }
Intent intent = new Intent(Intent.ACTION_SEARCH); final Intent intent = DictionaryUtil.getDictionaryIntent(text.substring(start, end));
intent.setComponent(new ComponentName(
"com.socialnmobile.colordict",
"com.socialnmobile.colordict.activity.Main"
));
intent.putExtra(SearchManager.QUERY, text.substring(start, end));
try { try {
myBaseActivity.startActivity(intent); myBaseActivity.startActivity(intent);
} catch(ActivityNotFoundException e){ } catch(ActivityNotFoundException e){
Toast.makeText( Toast.makeText(
myBaseActivity, myBaseActivity,
ZLResource.resource("errorMessage").getResource("dictNotInstalled").getValue(), ZLResource.resource("errorMessage").getResource("dictionaryIsNotInstalled").getValue(),
Toast.LENGTH_LONG Toast.LENGTH_LONG
).show(); ).show();
} }

View file

@ -17,13 +17,22 @@
* 02110-1301, USA. * 02110-1301, USA.
*/ */
package org.geometerplus.fbreader.fbreader; package org.geometerplus.android.fbreader;
import org.geometerplus.zlibrary.text.view.ZLTextViewMode;
import org.geometerplus.fbreader.fbreader.FBAction;
import org.geometerplus.fbreader.fbreader.FBReaderApp;
import org.geometerplus.android.util.PackageUtil;
class SwitchTextViewModeAction extends FBAction { class SwitchTextViewModeAction extends FBAction {
private final FBReader myBaseActivity;
private final int myMode; private final int myMode;
SwitchTextViewModeAction(FBReaderApp fbreader, int mode) { SwitchTextViewModeAction(FBReader baseActivity, FBReaderApp fbreader, int mode) {
super(fbreader); super(fbreader);
myBaseActivity = baseActivity;
myMode = mode; myMode = mode;
} }
@ -34,9 +43,13 @@ class SwitchTextViewModeAction extends FBAction {
@Override @Override
public void run() { public void run() {
if (myMode == ZLTextViewMode.MODE_VISIT_ALL_WORDS) {
DictionaryUtil.installDictionaryIfNotInstalled(myBaseActivity);
}
Reader.TextViewModeOption.setValue(myMode); Reader.TextViewModeOption.setValue(myMode);
Reader.BookTextView.resetRegionPointer(); Reader.BookTextView.resetRegionPointer();
Reader.FootnoteView.resetRegionPointer(); Reader.FootnoteView.resetRegionPointer();
Reader.repaintView(); Reader.repaintView();
} }
} }

View file

@ -33,7 +33,7 @@ import org.geometerplus.zlibrary.core.util.ZLBoolean3;
import org.geometerplus.zlibrary.core.network.ZLNetworkException; import org.geometerplus.zlibrary.core.network.ZLNetworkException;
import org.geometerplus.android.util.UIUtil; import org.geometerplus.android.util.UIUtil;
import org.geometerplus.android.util.PluginUtil; import org.geometerplus.android.util.PackageUtil;
import org.geometerplus.fbreader.network.*; import org.geometerplus.fbreader.network.*;
import org.geometerplus.fbreader.network.tree.NetworkTreeFactory; import org.geometerplus.fbreader.network.tree.NetworkTreeFactory;
@ -402,11 +402,11 @@ class NetworkCatalogActions extends NetworkTreeActions {
String message = null; String message = null;
String positiveButtonKey = null; String positiveButtonKey = null;
if (!PluginUtil.isPluginInstalled(activity, plugin)) { if (!PackageUtil.isPluginInstalled(activity, plugin)) {
dialogKey = "installPlugin"; dialogKey = "installPlugin";
message = pluginData.get("androidPluginInstallMessage"); message = pluginData.get("androidPluginInstallMessage");
positiveButtonKey = "install"; positiveButtonKey = "install";
} else if (!PluginUtil.isPluginInstalled(activity, plugin, pluginVersion)) { } else if (!PackageUtil.isPluginInstalled(activity, plugin, pluginVersion)) {
dialogKey = "updatePlugin"; dialogKey = "updatePlugin";
message = pluginData.get("androidPluginUpdateMessage"); message = pluginData.get("androidPluginUpdateMessage");
positiveButtonKey = "update"; positiveButtonKey = "update";
@ -423,7 +423,7 @@ class NetworkCatalogActions extends NetworkTreeActions {
new DialogInterface.OnClickListener() { new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
PluginUtil.installPackageFromMarket(activity, plugin); PackageUtil.installFromMarket(activity, plugin);
} }
} }
) )

View file

@ -29,6 +29,8 @@ import org.geometerplus.zlibrary.core.network.ZLNetworkException;
import org.geometerplus.fbreader.network.INetworkLink; import org.geometerplus.fbreader.network.INetworkLink;
import org.geometerplus.fbreader.network.authentication.NetworkAuthenticationManager; import org.geometerplus.fbreader.network.authentication.NetworkAuthenticationManager;
import org.geometerplus.android.util.PackageUtil;
abstract class Util implements UserRegistrationConstants { abstract class Util implements UserRegistrationConstants {
private static final String REGISTRATION_ACTION = private static final String REGISTRATION_ACTION =
"android.fbreader.action.NETWORK_LIBRARY_REGISTER"; "android.fbreader.action.NETWORK_LIBRARY_REGISTER";
@ -36,15 +38,7 @@ abstract class Util implements UserRegistrationConstants {
"android.fbreader.action.NETWORK_LIBRARY_SMS_REFILLING"; "android.fbreader.action.NETWORK_LIBRARY_SMS_REFILLING";
private static boolean testService(Activity activity, String action, String url) { private static boolean testService(Activity activity, String action, String url) {
if (url == null) { return url != null && PackageUtil.canBeStarted(activity, new Intent(action, Uri.parse(url)));
return false;
}
try {
activity.startActivity(new Intent(action + "_TEST", Uri.parse(url)));
return true;
} catch (ActivityNotFoundException e) {
return false;
}
} }
static boolean isRegistrationSupported(Activity activity, INetworkLink link) { static boolean isRegistrationSupported(Activity activity, INetworkLink link) {

View file

@ -22,9 +22,10 @@ package org.geometerplus.android.util;
import android.app.Activity; import android.app.Activity;
import android.content.Intent; import android.content.Intent;
import android.content.ActivityNotFoundException; import android.content.ActivityNotFoundException;
import android.content.pm.PackageManager;
import android.net.Uri; import android.net.Uri;
public abstract class PluginUtil { public abstract class PackageUtil {
private static Uri marketUri(String pkg) { private static Uri marketUri(String pkg) {
return Uri.parse("market://details?id=" + pkg); return Uri.parse("market://details?id=" + pkg);
} }
@ -38,28 +39,24 @@ public abstract class PluginUtil {
} }
public static boolean isPluginInstalled(Activity activity, String pkg) { public static boolean isPluginInstalled(Activity activity, String pkg) {
try { return canBeStarted(
activity.startActivity(new Intent( activity,
"android.fbreader.action.TEST", homeUri(pkg) new Intent("android.fbreader.action.TEST", homeUri(pkg))
)); );
return true;
} catch (ActivityNotFoundException e) {
return false;
}
} }
public static boolean isPluginInstalled(Activity activity, String pkg, String version) { public static boolean isPluginInstalled(Activity activity, String pkg, String version) {
try { return canBeStarted(
activity.startActivity(new Intent( activity,
"android.fbreader.action.TEST", homeUri(pkg, version) new Intent("android.fbreader.action.TEST", homeUri(pkg, version))
)); );
return true;
} catch (ActivityNotFoundException e) {
return false;
}
} }
public static boolean installPackageFromMarket(Activity activity, String pkg) { public static boolean canBeStarted(Activity activity, Intent intent) {
return activity.getApplicationContext().getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY) != null;
}
public static boolean installFromMarket(Activity activity, String pkg) {
try { try {
activity.startActivity(new Intent( activity.startActivity(new Intent(
Intent.ACTION_VIEW, marketUri(pkg) Intent.ACTION_VIEW, marketUri(pkg)

View file

@ -117,4 +117,12 @@ public abstract class UIUtil {
Toast.LENGTH_SHORT Toast.LENGTH_SHORT
).show(); ).show();
} }
public static void showErrorMessage(Context context, String resourceKey, String parameter) {
Toast.makeText(
context,
ZLResource.resource("errorMessage").getResource(resourceKey).getValue().replace("%s", parameter),
Toast.LENGTH_SHORT
).show();
}
} }

View file

@ -25,7 +25,6 @@ import org.geometerplus.zlibrary.core.dialogs.ZLDialogManager;
import org.geometerplus.zlibrary.core.options.*; import org.geometerplus.zlibrary.core.options.*;
import org.geometerplus.zlibrary.text.hyphenation.ZLTextHyphenator; import org.geometerplus.zlibrary.text.hyphenation.ZLTextHyphenator;
import org.geometerplus.zlibrary.text.view.ZLTextViewMode;
import org.geometerplus.fbreader.bookmodel.BookModel; import org.geometerplus.fbreader.bookmodel.BookModel;
import org.geometerplus.fbreader.library.Library; import org.geometerplus.fbreader.library.Library;
@ -82,7 +81,7 @@ public final class FBReaderApp extends ZLApplication {
private final ZLKeyBindings myBindings = new ZLKeyBindings("Keys"); private final ZLKeyBindings myBindings = new ZLKeyBindings("Keys");
public final FBView BookTextView; public final FBView BookTextView;
final FBView FootnoteView; public final FBView FootnoteView;
public BookModel Model; public BookModel Model;
@ -99,9 +98,6 @@ public final class FBReaderApp extends ZLApplication {
addAction(ActionCode.FIND_PREVIOUS, new FindPreviousAction(this)); addAction(ActionCode.FIND_PREVIOUS, new FindPreviousAction(this));
addAction(ActionCode.CLEAR_FIND_RESULTS, new ClearFindResultsAction(this)); addAction(ActionCode.CLEAR_FIND_RESULTS, new ClearFindResultsAction(this));
addAction(ActionCode.SET_TEXT_VIEW_MODE_VISIT_HYPERLINKS, new SwitchTextViewModeAction(this, ZLTextViewMode.MODE_VISIT_HYPERLINKS));
addAction(ActionCode.SET_TEXT_VIEW_MODE_VISIT_ALL_WORDS, new SwitchTextViewModeAction(this, ZLTextViewMode.MODE_VISIT_ALL_WORDS));
addAction(ActionCode.VOLUME_KEY_SCROLL_FORWARD, new VolumeKeyScrollingAction(this, true)); addAction(ActionCode.VOLUME_KEY_SCROLL_FORWARD, new VolumeKeyScrollingAction(this, true));
addAction(ActionCode.VOLUME_KEY_SCROLL_BACKWARD, new VolumeKeyScrollingAction(this, false)); addAction(ActionCode.VOLUME_KEY_SCROLL_BACKWARD, new VolumeKeyScrollingAction(this, false));