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

new library look

removed selection dialog
zip code refactoring



git-svn-id: https://only.mawhrin.net/repos/FBReaderJ/trunk@887 6a642e6f-84f6-412e-ac94-c4a38d5a04b0
This commit is contained in:
Nikolay Pultsin 2009-02-17 11:43:19 +00:00
parent aaf6f1eccf
commit 5230a0d545
67 changed files with 1499 additions and 5199 deletions

View file

@ -5,8 +5,8 @@
<node name="preferences" value="FBReader..."/> <node name="preferences" value="FBReader..."/>
<node name="bookInfo" value="Current Book..."/> <node name="bookInfo" value="Current Book..."/>
</node> </node>
<node name="library" value="Library"> <node name="showLibrary" value="Library"/>
<node name="showLibrary" value="Open"/> <node name="library" value="Library Old">
<node name="previousBook" value="Previous Book"/> <node name="previousBook" value="Previous Book"/>
<node name="showRecent" value="Recent"/> <node name="showRecent" value="Recent"/>
<node name="addBook" value="Add Book..."/> <node name="addBook" value="Add Book..."/>
@ -315,7 +315,7 @@
<node name="waitMessage"> <node name="waitMessage">
<node name="downloadingFile" value="Downloading book %s"/> <node name="downloadingFile" value="Downloading book %s"/>
<node name="loadingBook" value="Opening book. Please, wait..."/> <node name="loadingBook" value="Opening book. Please, wait..."/>
<node name="loadingBookList" value="Openin library. Please, wait..."/> <node name="loadingBookList" value="Opening library. Please, wait..."/>
<node name="migrate" value="Upgrading to the new version. Please, wait..."/> <node name="migrate" value="Upgrading to the new version. Please, wait..."/>
</node> </node>
</node> </node>

View file

@ -1,377 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<node name="menu">
<node name="bookInfo" value="Kirjan tiedot..."/>
<node name="toc" value="Sisällysluettolo"/>
<node name="library" value="Kirjasto">
<node name="showLibrary" value="Avaa"/>
<node name="previousBook" value="Edellinen kirja"/>
<node name="showRecent" value="Viimeisin"/>
<node name="addBook" value="Lisää kirja..."/>
<node name="showHelp" value="Tietoja FBReaderista"/>
</node>
<node name="navigate" value="Navigoi">
<node name="gotoHome" value="Siirry dokumentin alkuun"/>
<node name="gotoPageNumber" value="Siirry sivulle..."/>
<node name="gotoSectionStart" value="Siirry tekstiosion alkuun"/>
<node name="gotoSectionEnd" value="Siirry tekstiosion loppuun"/>
<node name="nextTOCSection" value="Sisällysluettelon seuraavaan kohtaan"/>
<node name="previousTOCSection" value="Sisällysluettelon edelliseen kohtaan"/>
<node name="undo" value="Siirry edelliseen kohtaan"/>
<node name="redo" value="Siirry eteenpäin"/>
</node>
<node name="selection" value="Valinta">
<node name="copyToClipboard" value="Kopioi leikepöydälle"/>
<node name="openInDictionary" value="Avaa sanakirjassa"/>
<node name="clearSelection" value="Tyhjennä"/>
</node>
<node name="search" value="Etsi">
<node name="search" value="Etsi teksti..."/>
<node name="findNext" value="Etsi seuraava"/>
<node name="findPrevious" value="Etsi edellinen"/>
</node>
<node name="view" value="Näytä">
<node name="rotate" value="Kierrä näyttö"/>
<node name="toggleFullscreen" value="Koko näyttö"/>
<node name="toggleIndicator" value="Sijainninilmaisin päällä/pois"/>
</node>
<node name="preferences" value="Asetukset..."/>
<node name="quit" value="Sulje"/>
</node>
<node name="toolbar">
<node name="showLibrary" value="Näytä kirjastopuu"/>
<node name="showRecent" value="Näytä viimeisimmät kirjat"/>
<node name="addBook" value="Lisää tiedosto kirjastoon"/>
<node name="gotoHome" value="Siirry tekstin alkuun"/>
<node name="undo" value="Siirry edelliseen kohtaan"/>
<node name="redo" value="Siirry eteenpäin"/>
<node name="toc" value="Sisällysluettelo"/>
<node name="search" value="Etsi teksti"/>
<node name="findNext" value="Etsi seuraava"/>
<node name="findPrevious" value="Etsi edellinen"/>
<node name="bookInfo" value="Näytä kirjan tiedot valintaikkuna"/>
<node name="preferences" value="Näytä asetukset valintaikkuna"/>
<node name="rotate" value="Kierrä teksti"/>
<node name="showHelp" value="Tietoja FBReaderista"/>
</node>
<node name="dialog">
<node name="button">
<node name="go" value="&amp;Siirry"/>
<node name="thisOnly" value="Vain tämä"/>
<node name="withSubtags" value="Alaluokalliset"/>
</node>
<node name="OptionsDialog">
<node name="title" value="FBReader - Asetukset"/>
<node name="tab">
<node name="Library" value="Kirjasto">
<node name="bookPath" value="Kirjaston polku"/>
<node name="lookInSubdirectories" value="Hae kirjoja alihakemistoista"/>
<node name="recentListSize" value="Viimeisimmät kirjat listan koko"/>
<node name="showTags" value="Näytä luokkahierarkiat"/>
<node name="showAllBooksList" value="Näytä kaikki kirjat haara"/>
</node>
<node name="Language" value="Kieli">
<node name="autoDetect" value="Tunnista kieli ja merkistö automaattisesti"/>
<node name="defaultLanguage" value="Oletuskieli"/>
<node name="defaultEncodingSet" value="Oletusmerkistöalue"/>
<node name="defaultEncoding" value="Oletusmerkistö"/>
<node name="useWindows1252Hack" value="Käytä windows-1252 merkistöä iso-8859-1 sijaan"/>
</node>
<node name="Indicator" value="Ilmaisin">
<node name="show" value="Näytä sijainninilmaisin"/>
<node name="height" value="Ilmaisimen korkeus"/>
<node name="offset" value="Etäisyys tekstistä"/>
<node name="pageNumber" value="Näytä sijainti numeroina"/>
<node name="time" value="Näytä aika"/>
<node name="fontSize" value="Kirjasinkoko"/>
<node name="tocMarks" value="Näytä sisällysmerkit"/>
<node name="navigation" value="Salli navigointi"/>
</node>
<node name="Scrolling" value="Vieritys">
<node name="optionsFor" value="Valinnat">
<node name="large" value="Sivun vieritykselle"/>
<node name="small" value="Rivin vieritykselle"/>
<node name="mouse" value="Hiirellä vieritykselle"/>
<node name="tap" value="Kosketusnäyttö vieritykselle"/>
</node>
<node name="delay" value="Vieritysten viive, msec"/>
<node name="mode" value="Vieritystila">
<node name="noOverlapping" value="Sivu kerrallaan"/>
<node name="keepLines" value="Säilytä rivit"/>
<node name="scrollLines" value="Vieritä rivit"/>
<node name="scrollPercentage" value="Prosentuaalinen vieritys"/>
<node name="disable" value="Poista käytöstä"/>
</node>
<node name="linesToKeep" value="Rivien määrä"/>
<node name="linesToScroll" value="Rivien määrä"/>
<node name="percentToScroll" value="Vieritysprosentti"/>
<node name="fingerOnly" value="Vieritä ainoastaan kosketusnäytöstä"/>
</node>
<node name="Selection" value="Valinta">
<node name="enableSelection" value="Ota käyttöön tekstin valinta"/>
</node>
<node name="Margins" value="Reunus">
<node name="left" value="Vasenreunus"/>
<node name="right" value="Oikeareunus"/>
<node name="top" value="Yläreunus"/>
<node name="bottom" value="Alareunus"/>
</node>
<node name="Format" value="Muotoilu">
<node name="optionsFor" value="Asetukset"/>
<node name="lineSpacing" value="Riviväli">
<node name="unchanged" value="&lt;ei muutosta&gt;"/>
</node>
<node name="firstLineIndent" value="1. rivin sisennys"/>
<node name="alignment" value="Tasaus">
<node name="left" value="Vasen"/>
<node name="right" value="Oikea"/>
<node name="center" value="Keskitetty"/>
<node name="justify" value="Tasattu"/>
<node name="unchanged" value="&lt;ei muutosta&gt;"/>
</node>
<node name="spaceBefore" value="Väli ennen"/>
<node name="spaceAfter" value="Väli jälkeen"/>
<node name="leftIndent" value="Vasen sisennys"/>
<node name="rightIndent" value="Oikea sisennys"/>
</node>
<node name="Styles" value="Tyylit">
<node name="optionsFor" value="Asetukset"/>
<node name="fontFamily" value="Kirjasinperhe">
<node name="unchanged" value="&lt;ei muutosta&gt;"/>
</node>
<node name="fontSize" value="Koko"/>
<node name="fontSizeDifference" value="Koon ero"/>
<node name="bold" value="Lihavoitu"/>
<node name="italic" value="Kursivoitu"/>
<node name="allowHyphenations" value="Salli tavutus"/>
<node name="autoHyphenations" value="Automaattinen tavutus"/>
</node>
<node name="Rotation" value="Kierto">
<node name="direction" value="Kiertämistapa">
<node name="disabled" value="Pois käytöstä"/>
<node name="clockwise" value="90 astetta myötäpäivään"/>
<node name="counterclockwise" value="90 astetta vastapäivään"/>
<node name="180" value="180 astetta"/>
<node name="cycle" value="Kierrä neljä suuntaa"/>
</node>
</node>
<node name="Colors" value="Värit">
<node name="colorFor" value="Värit">
<node name="background" value="Taustalle"/>
<node name="selectionBackground" value="Valitun tekstin taustalle"/>
<node name="text" value="Normaalille tekstille"/>
<node name="internalLink" value="Sisäisen linkin tekstille"/>
<node name="externalLink" value="Ulkoisen linkin tekstille"/>
<node name="highlighted" value="Korostetulle tekstille"/>
<node name="treeLines" value="Kirjapuun viivoille"/>
<node name="indicator" value="Sijainnin ilmaisimelle"/>
</node>
</node>
<node name="Keys" value="Näpäimet">
<node name="grabSystemKeys" value="Valitse järjestelmänäppäimet"/>
<node name="separate" value="Näytön suunnasta riippuvat näppäintoiminnot"/>
<node name="orientation" value="Näytön suuntaus"/>
<node name="action">
<node name="none" value="Ei mitään"/>
<node name="showLibrary" value="Näytä kirjasto"/>
<node name="showRecent" value="Näytä viimeisimmät kirjat"/>
<node name="previousBook" value="Avaa edellinen kirja"/>
<node name="toc" value="Näytä sisällysluettelo"/>
<node name="gotoHome" value="Siirry alkuun"/>
<node name="gotoSectionStart" value="Siirry tekstiosion alkuun"/>
<node name="gotoSectionEnd" value="Siirry tekstiosion loppuun"/>
<node name="nextTOCSection" value="Sisällysluettelon seuraavaan kohtaan"/>
<node name="previousTOCSection" value="Sisällysluettelon edelliseen kohtaan"/>
<node name="largeScrollForward" value="Sivunvaihto eteenpäin"/>
<node name="largeScrollBackward" value="Sivunvaihto taaksepäin"/>
<node name="smallScrollForward" value="Rivinvaihto eteenpäin"/>
<node name="smallScrollBackward" value="Rivinvaihto taaksepäin"/>
<node name="undo" value="Peru"/>
<node name="redo" value="Palauta"/>
<node name="copyToClipboard" value="Kopioi valittu teksti leikepöydälle"/>
<node name="openInDictionary" value="Avaa valittu teksti sanakirjassa"/>
<node name="clearSelection" value="Tyjennä valinta"/>
<node name="search" value="Etsi"/>
<node name="findPrevious" value="Etsi edellinen"/>
<node name="findNext" value="Etsi seuraava"/>
<node name="increaseFont" value="Suurenna kirjasinkokoa"/>
<node name="decreaseFont" value="Pienennä kirjasinkokoa"/>
<node name="toggleIndicator" value="Sijainninilmaisin päällä/pois"/>
<node name="toggleFullscreen" value="Koko näyttö päällä/pois"/>
<node name="onFullscreen" value="Koko näyttö käyttöön"/>
<node name="rotate" value="Kierrä näyttöä"/>
<node name="preferences" value="Näytä asetukset valintaikkuna"/>
<node name="bookInfo" value="Näytä kirjantidot valintaikkuna"/>
<node name="addBook" value="Lisää kirja"/>
<node name="cancel" value="Peru"/>
<node name="quit" value="Lopeta"/>
</node>
<node name="quitOnCancel" value="Sulje sovellus peruttaessa"/>
<node name="keyDelay" value="Hyväksyttyjen näppäinpainallusten viive"/>
</node>
<node name="Config" value="Tila">
<node name="autoSave" value="Tallenna tila automaattisesti"/>
<node name="timeout" value="Tallennusvälin aika sekunneissa"/>
</node>
<node name="Dictionary" value="Sanakirja">
<node name="enableIntegration" value="Käytä sanakirjaa: %s"/>
<node name="defaultText" value="Käyttöönotettava sanakirja"/>
<node name="choice" value="Integroi seuraavan kanssa:"/>
<node name="singleClickOpen" value="Avaa yhdellä kosketuksella"/>
</node>
<node name="Web" value="Web">
<node name="enableIntegration" value="Ulkoisten linkkien avaus: %s"/>
<node name="defaultText" value="Avaa ulkoiset linkit selaimessa"/>
<node name="choice" value="Käytä selainta"/>
<node name="command" value="Suorituskomento"/>
</node>
<node name="Maemo" value="Maemo">
<node name="keyActionOnRelease" value="Toiminta näppäimen vapautuksesta painalluksen sijaan"/>
<node name="minStylusPressure" value="Styluksen minimi paine"/>
<node name="maxStylusPressure" value="Styluksen maksimi paine"/>
</node>
</node>
</node>
<node name="InfoDialog">
<node name="title" value="FBReader - Kirjan tiedot"/>
<node name="tab">
<node name="Common" value="Yleiset">
<node name="file" value="Tiedosto"/>
<node name="title" value="Nimi"/>
<node name="authorDisplayName" value="Tekijä (Näytä nimi)"/>
<node name="authorSortKey" value="Tekijä (Lajitteluavain)"/>
<node name="language" value="Kieli"/>
<node name="encodingSet" value="Merkistöalue"/>
<node name="encoding" value="Merkistö"/>
</node>
<node name="Series" value="Kirjasarja">
<node name="seriesTitle" value="Sarjan nimi"/>
<node name="bookNumber" value="Kirjan numero"/>
</node>
<node name="Tags" value="Luokka">
<node name="tags" value="Luokkalista"/>
</node>
<node name="Text" value="Teksti">
<node name="breakType" value="Katkaise kappale"/>
<node name="ignoreIndent" value="Hylkää pienempi sisennys kuin"/>
<node name="buildTOC" value="Luo sisällysluettelo"/>
<node name="emptyLines" value="Tyhjät rivit ennen uutta osaa"/>
</node>
<node name="&lt;PRE&gt;" value="&lt;ESI&gt;">
<node name="breakType" value="Katkaise kappale"/>
<node name="ignoreIndent" value="Hylkää pienempi sisennys kuin"/>
<node name="buildTOC" value="Luo sisällysluettelo"/>
<node name="emptyLines" value="Tyhjät rivit ennen uutta osaa"/>
</node>
</node>
</node>
<node name="addFileDialog">
<node name="title" value="FBReader - Lisää kirja kirjastoon"/>
</node>
<node name="textSearchDialog">
<node name="title" value="Etsi teksti"/>
<node name="text" value=""/>
<node name="ignoreCase" value="&amp;Älä huomioi kirjainkokoa"/>
<node name="wholeText" value="K&amp;oko tekstistä"/>
<node name="backward" value="&amp;Taaksepäin"/>
<node name="currentSection" value="&amp;Vain tästä osasta"/>
</node>
<node name="gotoPageDialog">
<node name="title" value="Siirry sivulle"/>
<node name="pageNumber" value="Siirry sivunumerolle"/>
</node>
<node name="editTagInfoDialog">
<node name="title" value="Muokkaa/kloonaa luokka"/>
<node name="editOrClone" value="Toiminto">
<node name="edit" value="Uudelleennimeä luokka"/>
<node name="clone" value="Kloonaa luokka"/>
</node>
<node name="name" value="Luokan nimi"/>
<node name="includeSubtags" value="Sisällytä alaluokat"/>
</node>
<node name="removeBookBox">
<node name="title" value="Poista kirja"/>
<node name="message" value="Poista &#13;&quot;%s&quot;&#13; kirjastosta?"/>
</node>
<node name="removeTagBox">
<node name="title" value="Poista luokka"/>
<node name="message" value="Poista luokka &#8220;%s&#8221;?"/>
</node>
<node name="openBookErrorBox">
<node name="title" value="Virhe"/>
<node name="message" value="Ei voitu avata:&#13;%s"/>
</node>
<node name="noHelpBox">
<node name="title" value="Virhe"/>
<node name="message" value="Ohjetiedostoa ei löytynyt"/>
</node>
<node name="tagMustBeNonEmpty">
<node name="title" value="Virhe"/>
<node name="message" value="Luoka nimi ei saa olla tyhjä merkkijono"/>
</node>
<node name="tagMustNotContainComma">
<node name="title" value="Virhe"/>
<node name="message" value="Luokan nimi ei saa sisältää &#8220;,&#8221; symbolia"/>
</node>
<node name="waitMessage">
<node name="loadingBook" value="Avataan kirjaa..."/>
<node name="loadingBookList" value="Avataan kirjalistaa..."/>
<node name="migrate" value="Päivitetään uuteen versioon. Olehyvä ja odota..."/>
</node>
</node>
<node name="style">
<node name="Base" value="Perustekstille"/>
<node name="Regular Paragraph" value="Normaalille kappaleelle"/>
<node name="Title" value="Otsikolle"/>
<node name="Section Title" value="Valinnan otsikolle"/>
<node name="Poem Title" value="Runon otsikolle"/>
<node name="Subtitle" value="Alaotsikolle"/>
<node name="Annotation" value="Huomautukselle"/>
<node name="Epigraph" value="Epigraphille"/>
<node name="Stanza" value="Säkeistölle"/>
<node name="Verse" value="Jakeelle"/>
<node name="Preformatted text" value="Esimuotoillulle tekstille"/>
<node name="Image" value="Kuvalle"/>
<node name="Cite" value="Lainaukselle"/>
<node name="Author" value="Tekijälle"/>
<node name="Date" value="Päivämäärälle"/>
<node name="Internal Hyperlink" value="Sisäiselle linkille"/>
<node name="Footnote" value="Alaviitteelle"/>
<node name="Emphasis" value="Korostukselle"/>
<node name="Strong" value="Vahvennetulle"/>
<node name="Subscript" value="Viitteelle"/>
<node name="Superscript" value="Yläviitteelle"/>
<node name="Code" value="Koodille"/>
<node name="StrikeThrough" value="Yliviivatulle"/>
<node name="Contents Table" value="Sisällysluettelolle"/>
<node name="Author in Library" value="Tekijälle kirjastossa"/>
<node name="Book in Library" value="Kirjalle kirjastossa"/>
<node name="Recent Book List" value="Viimeisimmät kirjat listalle"/>
<node name="Italic" value="Kursivoidulle"/>
<node name="Bold" value="Lihavoidulle"/>
<node name="Definition" value="Määrittelylle"/>
<node name="Definition Description" value="Määrittelyn kuvaukselle"/>
<node name="Header 1" value="Otsikolle 1"/>
<node name="Header 2" value="Otsikolle 2"/>
<node name="Header 3" value="Otsikolle 3"/>
<node name="Header 4" value="Otsikolle 4"/>
<node name="Header 5" value="Otsikolle 5"/>
<node name="Header 6" value="Otsikolle 6"/>
<node name="External Hyperlink" value="Ulkoiselle linkille"/>
</node>
<node name="external">
<node name="browser" value="Selain"/>
<node name="defaultBrowser" value="Oletusselain"/>
</node>
<node name="mobipocketPlugin">
<node name="unknown" value="Tuntematon virhe"/>
<node name="unsupportedCompressionMethod" value="Tiivistysmuodolle ei tukea"/>
<node name="encriptedFile" value="Digitaalisesti suojattu tiedosto"/>
</node>
<node name="library">
<node name="caption" value="Kirjasto"/>
<node name="allBooks" value="Kaikki kirjat"/>
<node name="booksWithoutTags" value="Kirjat ilman luokkaa"/>
<node name="noBooks" value="FBReader ei löytänyt kirjoja määritellyistä sijainneista. Määrittele polku e-kirjastoosi Asetukset valintaikkunan (&#8220;Kirjasto&#8221; välilehdellä, &#8220;Kirjaston polku&#8221; kohdassa). Vaihtoehtoisesti voit lisätä kirjoja kirjastoosi käyttämällä &#8220;Lisää kirja&#8221; nappia."/>
</node>
</resources>

View file

@ -1,378 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- French FBReader resources, by Pierre Senellart -->
<resources>
<node name="menu">
<node name="bookInfo" value="Informations sur le livre..."/>
<node name="toc" value="Table des matières"/>
<node name="library" value="Bibliothèque">
<node name="showLibrary" value="Ouvrir"/>
<node name="previousBook" value="Livre précédent"/>
<node name="showRecent" value="Récents"/>
<node name="addBook" value="Ajouter un livre..."/>
<node name="showHelp" value="À propos de FBReader"/>
</node>
<node name="navigate" value="Navigation">
<node name="gotoHome" value="Aller au début du document"/>
<node name="gotoPageNumber" value="Go to Page..." toBeTranslated="true"/>
<node name="gotoSectionStart" value="Aller au début de la section"/>
<node name="gotoSectionEnd" value="Aller à la fin de la section"/>
<node name="nextTOCSection" value="Aller à l'entrée suivante de la TDM"/>
<node name="previousTOCSection" value="Aller à l'entrée précédente de la TDM"/>
<node name="undo" value="Précédent"/>
<node name="redo" value="Suivant"/>
</node>
<node name="selection" value="Sélection">
<node name="copyToClipboard" value="Copier dans le presse-papier"/>
<node name="openInDictionary" value="Ouvrir dans le dictionnaire"/>
<node name="clearSelection" value="Effacer"/>
</node>
<node name="search" value="Recherche">
<node name="search" value="Rechercher le texte..."/>
<node name="findNext" value="Rechercher suivant"/>
<node name="findPrevious" value="Rechercher précédent"/>
</node>
<node name="view" value="Affichage">
<node name="rotate" value="Tourner l'écran"/>
<node name="toggleFullscreen" value="Plein écran"/>
<node name="toggleIndicator" value="Afficher/Masquer l'indicateur"/>
</node>
<node name="preferences" value="Préférences..."/>
<node name="quit" value="Fermer"/>
</node>
<node name="toolbar">
<node name="showLibrary" value="Afficher l'arbre de la bibliothèque"/>
<node name="showRecent" value="Afficher la liste des livres récents"/>
<node name="addBook" value="Ajouter un livre à la bibliothèque"/>
<node name="gotoHome" value="Aller au début du texte"/>
<node name="undo" value="Précédent"/>
<node name="redo" value="Suivant"/>
<node name="toc" value="Table des matières"/>
<node name="search" value="Rechercher"/>
<node name="findNext" value="Rechercher suivant"/>
<node name="findPrevious" value="Rechercher précédent"/>
<node name="bookInfo" value="Afficher les informations sur le livre"/>
<node name="preferences" value="Afficher les préférences"/>
<node name="rotate" value="Tourner l'écran"/>
<node name="showHelp" value="À propos de FBReader"/>
</node>
<node name="dialog">
<node name="button">
<node name="go" value="O&amp;k"/>
<node name="thisOnly" value="This only" toBeTranslated="true"/>
<node name="withSubtags" value="With subtags" toBeTranslated="true"/>
</node>
<node name="OptionsDialog">
<node name="title" value="FBReader - Options"/>
<node name="tab">
<node name="Library" value="Bibliothèque">
<node name="bookPath" value="Chemin des livres"/>
<node name="lookInSubdirectories" value="Chercher des livres dans les sous-répertoires"/>
<node name="recentListSize" value="Taille de la liste de livres récents"/>
<node name="showTags" value="Show Tag Hierarchies" toBeTranslated="true"/>
<node name="showAllBooksList" value="Show All Books Branch" toBeTranslated="true"/>
</node>
<node name="Language" value="Langue">
<node name="autoDetect" value="Detecter la langue et l'encodage automatiquement"/>
<node name="defaultLanguage" value="Langue par défaut "/>
<node name="defaultEncodingSet" value="Ensemble d'encodages par défaut"/>
<node name="defaultEncoding" value="Encodage par défaut"/>
<node name="useWindows1252Hack" value="Use windows-1252 instead of iso-8859-1" toBeTranslated="true"/>
</node>
<node name="Indicator" value="Indicateur">
<node name="show" value="Montrer l'indicateur de position"/>
<node name="height" value="Hauteur de l'indicateur"/>
<node name="offset" value="Décalage par rapport au texte"/>
<node name="pageNumber" value="Montrer les numéros de page"/>
<node name="time" value="Afficher l'heure"/>
<node name="fontSize" value="Taille de la police"/>
<node name="tocMarks" value="Afficher les marques de la TDM"/>
<node name="navigation" value="Autoriser la navigation"/>
</node>
<node name="Scrolling" value="Défilement">
<node name="optionsFor" value="Options pour">
<node name="large" value="Grands défilements"/>
<node name="small" value="Petits défilements"/>
<node name="mouse" value="Défilements à la souris"/>
<node name="tap" value="Tap Scrollings" toBeTranslated="true"/>
</node>
<node name="delay" value="Délai entre défilements, ms"/>
<node name="mode" value="Mode de défilement">
<node name="noOverlapping" value="Pas de recouvrement"/>
<node name="keepLines" value="Conserver des lignes"/>
<node name="scrollLines" value="Défiler des lignes"/>
<node name="scrollPercentage" value="Défiler selon un pourcentage"/>
<node name="disable" value="Désactiver"/>
</node>
<node name="linesToKeep" value="Lignes à conserver"/>
<node name="linesToScroll" value="Lignes à défiler"/>
<node name="percentToScroll" value="Pourcentage à défiler"/>
<node name="fingerOnly" value="Scroll on Finger Tap Only" toBeTranslated="true"/>
</node>
<node name="Selection" value="Sélection">
<node name="enableSelection" value="Enable Text Selection" toBeTranslated="true"/>
</node>
<node name="Margins" value="Marges">
<node name="left" value="Marge gauche"/>
<node name="right" value="Marge droite"/>
<node name="top" value="Marge haut"/>
<node name="bottom" value="Marge bas"/>
</node>
<node name="Format" value="Format">
<node name="optionsFor" value="Options pour"/>
<node name="lineSpacing" value="Interligne">
<node name="inchangé" value="&lt;inchangé&gt;"/>
</node>
<node name="firstLineIndent" value="Alinéa"/>
<node name="alignment" value="Alignement">
<node name="left" value="Gauche"/>
<node name="right" value="Droite"/>
<node name="center" value="Centré"/>
<node name="justify" value="Justifié"/>
<node name="inchangé" value="&lt;inchangé&gt;"/>
</node>
<node name="spaceBefore" value="Espace avant"/>
<node name="spaceAfter" value="Espace après"/>
<node name="leftIndent" value="Indentation gauche"/>
<node name="rightIndent" value="Indentation droite"/>
</node>
<node name="Styles" value="Styles">
<node name="optionsFor" value="Options pour"/>
<node name="fontFamily" value="Famille">
<node name="inchangée" value="&lt;unchanged&gt;"/>
</node>
<node name="fontSize" value="Taille"/>
<node name="fontSizeDifference" value="Différence de taille"/>
<node name="bold" value="Gras"/>
<node name="italic" value="Italique"/>
<node name="allowHyphenations" value="Autoriser la césure"/>
<node name="autoHyphenations" value="Césure automatique"/>
</node>
<node name="Rotation" value="Rotation">
<node name="direction" value="Type de rotation">
<node name="disabled" value="Désactivée"/>
<node name="clockwise" value="90° (sens des aiguilles)"/>
<node name="counterclockwise" value="90° (sens inverse des aiguilles)"/>
<node name="180" value="180°"/>
<node name="cycle" value="Parcourt les 4 directions"/>
</node>
</node>
<node name="Colors" value="Couleurs">
<node name="colorFor" value="Couleur pour">
<node name="background" value="Arrière-plan"/>
<node name="selectionBackground" value="Arrière-plan de la sélection"/>
<node name="text" value="Texte normal"/>
<node name="internalLink" value="Hyperlien interne"/>
<node name="externalLink" value="Hyperlien externe"/>
<node name="highlighted" value="Texte mis en valeur"/>
<node name="treeLines" value="Lignes de l'arbre"/>
<node name="indicator" value="Indicateur de position"/>
</node>
</node>
<node name="Keys" value="Touches">
<node name="grabSystemKeys" value="Capturer les touches systèmes"/>
<node name="separate" value="Les touches dépendent de l'orientation"/>
<node name="orientation" value="Orientation"/>
<node name="action">
<node name="none" value="Aucune"/>
<node name="showLibrary" value="Afficher la bibliothèque"/>
<node name="showRecent" value="Afficher les livres récents"/>
<node name="previousBook" value="Ouvrir le livre précédent"/>
<node name="toc" value="Afficher la table des matières"/>
<node name="gotoHome" value="Aller au début"/>
<node name="gotoSectionStart" value="Aller au début de la section"/>
<node name="gotoSectionEnd" value="Aller à la fin de la section"/>
<node name="nextTOCSection" value="Aller à la section précédente de la TDM"/>
<node name="previousTOCSection" value="Aller à la section suivante de la TDM"/>
<node name="largeScrollForward" value="Grand défilement vers le bas"/>
<node name="largeScrollBackward" value="Grand défilement vers le haut"/>
<node name="smallScrollForward" value="Petit défilement vers le bas"/>
<node name="smallScrollBackward" value="Petit défilement vers le haut"/>
<node name="undo" value="Annuler"/>
<node name="redo" value="Restaurer"/>
<node name="copyToClipboard" value="Copier la sélection dans le presse-papier"/>
<node name="openInDictionary" value="Ouvrir la sélection dans le dictionnaire"/>
<node name="clearSelection" value="Effacer la sélection"/>
<node name="search" value="Rechercher"/>
<node name="findPrevious" value="Rechercher précédent"/>
<node name="findNext" value="Rechercher suivant"/>
<node name="increaseFont" value="Augmenter la taille de la police"/>
<node name="decreaseFont" value="Réduire la taille de la police"/>
<node name="toggleIndicator" value="Afficher/Masquer l'indicateur"/>
<node name="toggleFullscreen" value="Activer/Désactiver le plein écran"/>
<node name="onFullscreen" value="Plein écran"/>
<node name="rotate" value="Tourner l'écran"/>
<node name="preferences" value="Afficher les options"/>
<node name="bookInfo" value="Afficher les informations sur le livre"/>
<node name="addBook" value="Ajouter un livre"/>
<node name="cancel" value="Annuler"/>
<node name="quit" value="Quitter"/>
</node>
<node name="quitOnCancel" value="Quitter l'application lors d'une annulation"/>
<node name="keyDelay" value="Délai entre appui sur les touches"/>
</node>
<node name="Config" value="Configuration">
<node name="autoSave" value="Enregistrer l'état automatiquement"/>
<node name="timeout" value="Délai entre les enregistrements en secondes"/>
</node>
<node name="Dictionary" value="Dictionnaire">
<node name="enableIntegration" value="Activer l'intégration avec %s"/>
<node name="defaultText" value="Activer l'intégration avec le dictionnaire"/>
<node name="choice" value="Intégration avec"/>
<node name="singleClickOpen" value="Ouvrir avec un simple clic"/>
</node>
<node name="Web" value="Web">
<node name="enableIntegration" value="Ouvrir les liens externes dans %s"/>
<node name="defaultText" value="Ouvrir les liens externes dans le navigateur"/>
<node name="choice" value="Utiliser le navigateur"/>
<node name="command" value="Commande à exécuter"/>
</node>
<node name="Maemo" value="Maemo">
<node name="keyActionOnRelease" value="Action on Key Release, not on Key Press" toBeTranslated="true"/>
<node name="minStylusPressure" value="Minimal Stylus Pressure" toBeTranslated="true"/>
<node name="maxStylusPressure" value="Maximal Stylus Pressure" toBeTranslated="true"/>
</node>
</node>
</node>
<node name="InfoDialog">
<node name="title" value="FBReader - Informations sur le livre"/>
<node name="tab">
<node name="Common" value="Général">
<node name="file" value="Fichier"/>
<node name="title" value="Titre"/>
<node name="authorDisplayName" value="Auteur (nom affiché)"/>
<node name="authorSortKey" value="Auteur (clef de tri)"/>
<node name="language" value="Langue"/>
<node name="encodingSet" value="Ensemble d'encodages"/>
<node name="encoding" value="Encodage"/>
</node>
<node name="Series" value="Série">
<node name="seriesTitle" value="Titre de la série"/>
<node name="bookNumber" value="Numéro du livre"/>
</node>
<node name="Tags" value="Tags" toBeTranslated="true">
<node name="tags" value="Tag List" toBeTranslated="true"/>
</node>
<node name="Text" value="Texte">
<node name="breakType" value="Fin des paragraphes"/>
<node name="ignoreIndent" value="Ignorer une indentation inférieure à"/>
<node name="buildTOC" value="Construire la table des matières"/>
<node name="emptyLines" value="Lignes vides avant une nouvelle section"/>
</node>
<node name="&lt;PRE&gt;" value="&lt;PRE&gt;">
<node name="breakType" value="Fin des paragraphes"/>
<node name="ignoreIndent" value="Ignorer une indentation inférieure à"/>
<node name="buildTOC" value="Construire la table des matières"/>
<node name="emptyLines" value="Lignes vides avant une novuelle section"/>
</node>
</node>
</node>
<node name="addFileDialog">
<node name="title" value="FBReader - Ajouter un livre à la bibliothèque"/>
</node>
<node name="textSearchDialog">
<node name="title" value="Rechercher"/>
<node name="text" value=""/>
<node name="ignoreCase" value="&amp;Ignorer la casse"/>
<node name="wholeText" value="&amp;Dans tout le texte"/>
<node name="backward" value="&amp;Vers l'arrière"/>
<node name="currentSection" value="&amp;Cette section seulement"/>
</node>
<node name="gotoPageDialog">
<node name="title" value="Go To Page" toBeTranslated="true"/>
<node name="pageNumber" value="Go to Page Number" toBeTranslated="true"/>
</node>
<node name="editTagInfoDialog">
<node name="title" value="Edit/Clone Tag" toBeTranslated="true"/>
<node name="editOrClone" value="Action" toBeTranslated="true">
<node name="edit" value="Rename Tag" toBeTranslated="true"/>
<node name="clone" value="Clone Tag" toBeTranslated="true"/>
</node>
<node name="name" value="Tag Name" toBeTranslated="true"/>
<node name="includeSubtags" value="Include Subtags" toBeTranslated="true"/>
</node>
<node name="removeBookBox">
<node name="title" value="Enlever un livre"/>
<node name="message" value="Enlever le livre &#13;&quot;%s&quot;&#13; de la bibliothèque ?"/>
</node>
<node name="removeTagBox">
<node name="title" value="Remove Tag" toBeTranslated="true"/>
<node name="message" value="Remove Tag &#8220;%s&#8221;?" toBeTranslated="true"/>
</node>
<node name="openBookErrorBox">
<node name="title" value="Erreur"/>
<node name="message" value="Impossible d'ouvrir &#13;%s"/>
</node>
<node name="noHelpBox">
<node name="title" value="Erreur"/>
<node name="message" value="Fichier d'aide non trouvé, désolé"/>
</node>
<node name="tagMustBeNonEmpty">
<node name="title" value="Erreur"/>
<node name="message" value="Tag name must be a non-empty string" toBeTranslated="true"/>
</node>
<node name="tagMustNotContainComma">
<node name="title" value="Erreur"/>
<node name="message" value="Tag name must not contain a &#8220;,&#8221; symbol" toBeTranslated="true"/>
</node>
<node name="waitMessage">
<node name="loadingBook" value="Chargement du livre. Veuillez patienter..."/>
<node name="loadingBookList" value="Chargement de la liste des livres. Veuillez patienter..."/>
<node name="migrate" value="Upgrading to the new version. Please, wait..." toBeTranslated="true"/>
</node>
</node>
<node name="style">
<node name="Base" value="Base"/>
<node name="Regular Paragraph" value="Paragraphe normal"/>
<node name="Title" value="Titre"/>
<node name="Section Title" value="Titre de section"/>
<node name="Poem Title" value="Titre de poème"/>
<node name="Subtitle" value="Sous-titre"/>
<node name="Annotation" value="Annotation"/>
<node name="Epigraph" value="Épigraphe"/>
<node name="Stanza" value="Strophe"/>
<node name="Verse" value="Vers"/>
<node name="Preformatted text" value="Texte préformatté"/>
<node name="Image" value="Image"/>
<node name="Cite" value="Citation"/>
<node name="Author" value="Auteur"/>
<node name="Date" value="Date"/>
<node name="Internal Hyperlink" value="Hyperlien interne"/>
<node name="Footnote" value="Note de bas de page"/>
<node name="Emphasis" value="Emphase"/>
<node name="Strong" value="Forte emphase"/>
<node name="Subscript" value="Indice"/>
<node name="Superscript" value="Exposant"/>
<node name="Code" value="Code"/>
<node name="StrikeThrough" value="Barré"/>
<node name="Contents Table" value="Table des matières"/>
<node name="Author in Library" value="Auteur dans la bibliothèque"/>
<node name="Book in Library" value="Livre dans la bibliothèque"/>
<node name="Recent Book List" value="Liste des livres récents"/>
<node name="Italic" value="Italique"/>
<node name="Bold" value="Gras"/>
<node name="Definition" value="Définition"/>
<node name="Definition Description" value="Contenu de la définition"/>
<node name="Header 1" value="En-tête 1"/>
<node name="Header 2" value="En-tête 2"/>
<node name="Header 3" value="En-tête 3"/>
<node name="Header 4" value="En-tête 4"/>
<node name="Header 5" value="En-tête 5"/>
<node name="Header 6" value="En-tête 6"/>
<node name="External Hyperlink" value="Hyperlien externe"/>
</node>
<node name="external">
<node name="browser" value="Navigateur"/>
<node name="defaultBrowser" value="Navigateur par défaut"/>
</node>
<node name="mobipocketPlugin">
<node name="unknown" value="Erreur inconnue"/>
<node name="unsupportedCompressionMethod" value="Méthode de compression non supportée"/>
<node name="encriptedFile" value="Fichier protégé par MTP"/>
</node>
<node name="library">
<node name="caption" value="Bibliothèque"/>
<node name="allBooks" value="All Books" toBeTranslated="true"/>
<node name="booksWithoutTags" value="Books with no Tags" toBeTranslated="true"/>
<node name="noBooks" value="FBReader found no books in the configured locations. Please specify the path to your books in the Preferences Dialog (&#8220;Library&#8221; tab, &#8220;Book Path&#8221; entry). Alternatively, you can add books to your library using &#8220;Add Book&#8221; button." toBeTranslated="true"/>
</node>
</resources>

View file

@ -1,377 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<node name="menu">
<node name="bookInfo" value="Informasi Buku..."/>
<node name="toc" value="Daftar Isi"/>
<node name="library" value="Pustaka">
<node name="showLibrary" value="Buka"/>
<node name="previousBook" value="Buku Sebelumnya"/>
<node name="showRecent" value="Buku-buku Sebelumnya"/>
<node name="addBook" value="Tambah Buku..."/>
<node name="showHelp" value="Mengenai FBReader"/>
</node>
<node name="navigate" value="Navigasi">
<node name="gotoHome" value="Ke Awal Dokumen"/>
<node name="gotoPageNumber" value="Ke Halaman..."/>
<node name="gotoSectionStart" value="Ke Bagian Awal Teks"/>
<node name="gotoSectionEnd" value="Ke Bagian Akhir Teks"/>
<node name="nextTOCSection" value="Ke Item Daftar Isi Berikutnya"/>
<node name="previousTOCSection" value="Ke Item Daftar Isi Sebelumnya"/>
<node name="undo" value="Mundur"/>
<node name="redo" value="Maju"/>
</node>
<node name="selection" value="Seleksi">
<node name="copyToClipboard" value="Salin ke Clipboard"/>
<node name="openInDictionary" value="Buka di Kamus"/>
<node name="clearSelection" value="Bersihkan"/>
</node>
<node name="search" value="Cari">
<node name="search" value="Pencarian Teks..."/>
<node name="findNext" value="Pencarian Maju"/>
<node name="findPrevious" value="Pencarian Mundur"/>
</node>
<node name="view" value="Tampilan">
<node name="rotate" value="Putar Layar"/>
<node name="toggleFullscreen" value="Layar Penuh"/>
<node name="toggleIndicator" value="Hidup/Matikan Indikator"/>
</node>
<node name="preferences" value="Pengaturan..."/>
<node name="quit" value="Keluar"/>
</node>
<node name="toolbar">
<node name="showLibrary" value="Perlihatkan Daftar Pustaka"/>
<node name="showRecent" value="Perlihatkan Daftar Buku-buku Sebelumnya"/>
<node name="addBook" value="Tambahkan Berkas ke Pustaka"/>
<node name="gotoHome" value="Ke Bagian Awal Teks"/>
<node name="undo" value="Mundur"/>
<node name="redo" value="Maju"/>
<node name="toc" value="Daftart Isi"/>
<node name="search" value="Pencarian Teks"/>
<node name="findNext" value="Pencarian Maju"/>
<node name="findPrevious" value="Pencarian Mundur"/>
<node name="bookInfo" value="Tampilkan Dialog Informasi Buku"/>
<node name="preferences" value="Tampilkan Dialog Pengaturan"/>
<node name="rotate" value="Putar Layar"/>
<node name="showHelp" value="Mengenai FBReader"/>
</node>
<node name="dialog">
<node name="button">
<node name="go" value="&amp;Mulai!"/>
<node name="thisOnly" value="This only" toBeTranslated="true"/>
<node name="withSubtags" value="With subtags" toBeTranslated="true"/>
</node>
<node name="OptionsDialog">
<node name="title" value="FBReader - Pengaturan"/>
<node name="tab">
<node name="Library" value="Pustaka">
<node name="bookPath" value="Lokasi Buku"/>
<node name="lookInSubdirectories" value="Tampilkan Buku-buku yang Ada di Sub Direktori"/>
<node name="recentListSize" value="Jumlah Daftar Buku-buku yang dibuka sebelumnya"/>
<node name="showTags" value="Show Tag Hierarchies" toBeTranslated="true"/>
<node name="showAllBooksList" value="Show All Books Branch" toBeTranslated="true"/>
</node>
<node name="Language" value="Bahasa">
<node name="autoDetect" value="Deteksi Bahasa dan Enkode secara Otomatis"/>
<node name="defaultLanguage" value="Bahasa Standar"/>
<node name="defaultEncodingSet" value="Set Enkode Standar"/>
<node name="defaultEncoding" value="Enkode Standar"/>
<node name="useWindows1252Hack" value="Gunakan windows-1252 daripada iso-8859-1"/>
</node>
<node name="Indicator" value="Indikator">
<node name="show" value="Tampilkan Indikator Posisi"/>
<node name="height" value="Tinggi Indikator"/>
<node name="offset" value="Jarak dari Teks"/>
<node name="pageNumber" value="Tampilkan Posisi sebagai Nomor"/>
<node name="time" value="Tampilkan Waktu"/>
<node name="fontSize" value="Ukuran Huruf"/>
<node name="tocMarks" value="Tampilkan Penanda Daftar Isi"/>
<node name="navigation" value="Aktifkan Navigasi"/>
</node>
<node name="Scrolling" value="Geser Layar">
<node name="optionsFor" value="Pengaturan untuk">
<node name="large" value="Pergeseran Besar"/>
<node name="small" value="Pergeseran Kecil"/>
<node name="mouse" value="Pergeseran Mouse"/>
<node name="tap" value="Pergeseran Layar Sentuh"/>
</node>
<node name="delay" value="Waktu Tunda antara Pergeseran, mdetik"/>
<node name="mode" value="Mode Pergeseran">
<node name="noOverlapping" value="Jangan Tumpang Tindih"/>
<node name="keepLines" value="Biarkan Baris"/>
<node name="scrollLines" value="Geser Baris"/>
<node name="scrollPercentage" value="Pensentase Pergeseran"/>
<node name="disable" value="Non-aktifkan"/>
</node>
<node name="linesToKeep" value="Baris yang Dibiarkan"/>
<node name="linesToScroll" value="Baris yang Digeser"/>
<node name="percentToScroll" value="Persentase yang Digeser"/>
<node name="fingerOnly" value="Geser Hanya Menggunakan Layar Sentuh"/>
</node>
<node name="Selection" value="Seleksi">
<node name="enableSelection" value="Aktifkan Seleksi Teks"/>
</node>
<node name="Margins" value="Margin">
<node name="left" value="Margin Kiri"/>
<node name="right" value="Margin Kanan"/>
<node name="top" value="Margin Atas"/>
<node name="bottom" value="Margin Bawah"/>
</node>
<node name="Format" value="Format">
<node name="optionsFor" value="Pengaturan untuk"/>
<node name="lineSpacing" value="Jarak Baris">
<node name="unchanged" value="&lt;tidak diubah&gt;"/>
</node>
<node name="firstLineIndent" value="Indentasi Baris Pertama"/>
<node name="alignment" value="Perataan Teks">
<node name="left" value="Kiri"/>
<node name="right" value="Kanan"/>
<node name="center" value="Tengah"/>
<node name="justify" value="Rata Kanan Kiri"/>
<node name="unchanged" value="&lt;tidak diubah&gt;"/>
</node>
<node name="spaceBefore" value="Jarak Sebelumnya"/>
<node name="spaceAfter" value="Jarak Setelahnya"/>
<node name="leftIndent" value="Indentasi Kiri"/>
<node name="rightIndent" value="Indentasi Kanan"/>
</node>
<node name="Styles" value="Bentuk">
<node name="optionsFor" value="Pengaturan untuk"/>
<node name="fontFamily" value="Keluarga">
<node name="unchanged" value="&lt;tidak diubah&gt;"/>
</node>
<node name="fontSize" value="Ukuran"/>
<node name="fontSizeDifference" value="Perbedaan Ukuran"/>
<node name="bold" value="Tebal"/>
<node name="italic" value="Miring"/>
<node name="allowHyphenations" value="Ijinkan Pemenggalan Kata"/>
<node name="autoHyphenations" value="Pemenggalan Kata Otomatis"/>
</node>
<node name="Rotation" value="Rotasi">
<node name="direction" value="Tipe Rotasi">
<node name="disabled" value="Non-aktifkan"/>
<node name="clockwise" value="90 Derajat Searah Jarum Jam"/>
<node name="counterclockwise" value="90 Derajat Berlawanan Jarum Jam"/>
<node name="180" value="180 Derajat"/>
<node name="cycle" value="Rotasi 4 Arah Bergantian"/>
</node>
</node>
<node name="Colors" value="Warna">
<node name="colorFor" value="Warna untuk">
<node name="background" value="Latar Belakang"/>
<node name="selectionBackground" value="Latar Belakang Seleksi"/>
<node name="text" value="Teks Biasa"/>
<node name="internalLink" value="Teks Hyperlink Internal"/>
<node name="externalLink" value="Teks Hyperlink Eksternal"/>
<node name="highlighted" value="Text Berwarna Cerah"/>
<node name="treeLines" value="Garis Diagram Pohon"/>
<node name="indicator" value="Indikator Posisi"/>
</node>
</node>
<node name="Keys" value="Tombol">
<node name="grabSystemKeys" value="Tangkap Tombol Sistem"/>
<node name="separate" value="Tombol Tergantung dari Orientasi"/>
<node name="orientation" value="Orientasi"/>
<node name="action">
<node name="none" value="Tidak Terpakai"/>
<node name="showLibrary" value="Tampilkan Pustaka"/>
<node name="showRecent" value="Tampilkan Buku-buku Sebelumnya"/>
<node name="previousBook" value="Buka Buku Sebelumnya"/>
<node name="toc" value="Tampilkan Daftar Isi"/>
<node name="gotoHome" value="Ke Awal Dokumen"/>
<node name="gotoSectionStart" value="Ke Awal Seksi"/>
<node name="gotoSectionEnd" value="Ke Akhir Seksi"/>
<node name="nextTOCSection" value="Ke Seksi Daftar Isi Berikutnya"/>
<node name="previousTOCSection" value="Ke Seksi Daftar Isi Sebelumnya"/>
<node name="largeScrollForward" value="Pergeseran Maju yang Besar"/>
<node name="largeScrollBackward" value="Pergeseran Mundur yang Besar"/>
<node name="smallScrollForward" value="Pergeseran Maju yang Kecil"/>
<node name="smallScrollBackward" value="Pergeseran Mundur yang Kecil"/>
<node name="undo" value="Mundur"/>
<node name="redo" value="Maju"/>
<node name="copyToClipboard" value="Salin Teks yang Diseleksi ke Clipboard"/>
<node name="openInDictionary" value="Buka Teks yang Diseleksi di Kamus"/>
<node name="clearSelection" value="Bersihkan Seleksi"/>
<node name="search" value="Pencarian"/>
<node name="findPrevious" value="Pencarian Mundur"/>
<node name="findNext" value="Pencarian Maju"/>
<node name="increaseFont" value="Besarkan Ukuran Huruf"/>
<node name="decreaseFont" value="Kecilkan Ukuran Huruf"/>
<node name="toggleIndicator" value="Hidup/Matikan Indikator"/>
<node name="toggleFullscreen" value="Hidup/Matikan Layar Penuh"/>
<node name="onFullscreen" value="Ubah ke Layar Penuh"/>
<node name="rotate" value="Putar Layar"/>
<node name="preferences" value="Tampilkan Dialog Pengaturan"/>
<node name="bookInfo" value="Tampilkan Dialog Informasi Buku"/>
<node name="addBook" value="Tambah Buku"/>
<node name="cancel" value="Batal"/>
<node name="quit" value="Keluar"/>
</node>
<node name="quitOnCancel" value="Keluar dari Aplikasi Ketika Pembatalan"/>
<node name="keyDelay" value="Waktu Tunda Antara Penekanan Tombol"/>
</node>
<node name="Config" value="Konfigurasi">
<node name="autoSave" value="Simpan Status Secara Otomatis"/>
<node name="timeout" value="Waktu Tunda Antara Penyimpanan, detik"/>
</node>
<node name="Dictionary" value="Kamus">
<node name="enableIntegration" value="Aktifkan Integrasi dengan %s"/>
<node name="defaultText" value="Aktifkan Integrasi dengan Kamus"/>
<node name="choice" value="Integrasikan dengan"/>
<node name="singleClickOpen" value="Buka dengan Klik Tunggal"/>
</node>
<node name="Web" value="Web">
<node name="enableIntegration" value="Buka Link Eksternal dengan %s"/>
<node name="defaultText" value="Buka Link Eksternal dengan Browser"/>
<node name="choice" value="Gunakan Browser"/>
<node name="command" value="Perintah yang Dieksekusi"/>
</node>
<node name="Maemo" value="Maemo">
<node name="keyActionOnRelease" value="Tombol Aktif saat Dilepas, bukan saat Ditekan"/>
<node name="minStylusPressure" value="Tekanan Minimal Stylus"/>
<node name="maxStylusPressure" value="Tekanan Maksimal Stylus"/>
</node>
</node>
</node>
<node name="InfoDialog">
<node name="title" value="FBReader - Informasi Buku"/>
<node name="tab">
<node name="Common" value="Umum">
<node name="file" value="Berkas"/>
<node name="title" value="Judul"/>
<node name="authorDisplayName" value="Pengarang (Tertampil)"/>
<node name="authorSortKey" value="Pengarang (Pengurut)"/>
<node name="language" value="Bahasa"/>
<node name="encodingSet" value="Set Enkode"/>
<node name="encoding" value="Enkode"/>
</node>
<node name="Series" value="Seri">
<node name="seriesTitle" value="Judul Seri"/>
<node name="bookNumber" value="Nomor Buku"/>
</node>
<node name="Tags" value="Tags" toBeTranslated="true">
<node name="tags" value="Tag List" toBeTranslated="true"/>
</node>
<node name="Text" value="Teks">
<node name="breakType" value="Penggal Paragraf pada"/>
<node name="ignoreIndent" value="Abaikan Indentasi Kurang dari"/>
<node name="buildTOC" value="Buat Daftar Isi"/>
<node name="emptyLines" value="Baris Kosong Sebelum Seksi Baru"/>
</node>
<node name="&lt;PRE&gt;" value="&lt;PRE&gt;">
<node name="breakType" value="Penggal Paragraf pada"/>
<node name="ignoreIndent" value="Abaikan Indentasi Kurang dari"/>
<node name="buildTOC" value="Buat Daftar Isi"/>
<node name="emptyLines" value="Baris Kosong Sebelum Seksi Baru"/>
</node>
</node>
</node>
<node name="addFileDialog">
<node name="title" value="FBReader - Tambahkan Buku ke Pustaka"/>
</node>
<node name="textSearchDialog">
<node name="title" value="Pencarian Text"/>
<node name="text" value=""/>
<node name="ignoreCase" value="&amp;Abaikan huruf besar/kecil"/>
<node name="wholeText" value="&amp;Dalam keseluruhan teks"/>
<node name="backward" value="&amp;Pencarian mundur"/>
<node name="currentSection" value="&amp;Hanya dalam seksi ini"/>
</node>
<node name="gotoPageDialog">
<node name="title" value="Ke Halaman"/>
<node name="pageNumber" value="Ke Nomor Halaman"/>
</node>
<node name="editTagInfoDialog">
<node name="title" value="Edit/Clone Tag" toBeTranslated="true"/>
<node name="editOrClone" value="Action" toBeTranslated="true">
<node name="edit" value="Rename Tag" toBeTranslated="true"/>
<node name="clone" value="Clone Tag" toBeTranslated="true"/>
</node>
<node name="name" value="Tag Name" toBeTranslated="true"/>
<node name="includeSubtags" value="Include Subtags" toBeTranslated="true"/>
</node>
<node name="removeBookBox">
<node name="title" value="Hapus Buku"/>
<node name="message" value="Hapus buku &#13;&quot;%s&quot;&#13; dari Pustaka?"/>
</node>
<node name="removeTagBox">
<node name="title" value="Remove Tag" toBeTranslated="true"/>
<node name="message" value="Remove Tag &#8220;%s&#8221;?" toBeTranslated="true"/>
</node>
<node name="openBookErrorBox">
<node name="title" value="Ada Kesalahan"/>
<node name="message" value="Tidak dapat membuka:&#13;%s"/>
</node>
<node name="noHelpBox">
<node name="title" value="Ada Kesalahan"/>
<node name="message" value="Berkas tidak ditemukan, maaf"/>
</node>
<node name="tagMustBeNonEmpty">
<node name="title" value="Ada Kesalahan"/>
<node name="message" value="Tag name must be a non-empty string" toBeTranslated="true"/>
</node>
<node name="tagMustNotContainComma">
<node name="title" value="Ada Kesalahan"/>
<node name="message" value="Tag name must not contain a &#8220;,&#8221; symbol" toBeTranslated="true"/>
</node>
<node name="waitMessage">
<node name="loadingBook" value="Membaca buku. Silakan tunggu..."/>
<node name="loadingBookList" value="Membaca daftar buku. Silakan tunggu..."/>
<node name="migrate" value="Upgrading to the new version. Please, wait..." toBeTranslated="true"/>
</node>
</node>
<node name="style">
<node name="Base" value="Dasar"/>
<node name="Regular Paragraph" value="Paragraf Biasa"/>
<node name="Title" value="Judul"/>
<node name="Section Title" value="Judul Seksi"/>
<node name="Poem Title" value="Judul Poem"/>
<node name="Subtitle" value="Sub Judul"/>
<node name="Annotation" value="Anotasi"/>
<node name="Epigraph" value="Epigraf"/>
<node name="Stanza" value="Stanza"/>
<node name="Verse" value="Verse"/>
<node name="Preformatted text" value="Teks Terformat"/>
<node name="Image" value="Gambar"/>
<node name="Cite" value="Cite"/>
<node name="Author" value="Pengarang"/>
<node name="Date" value="Tanggal"/>
<node name="Internal Hyperlink" value="Hyperlink Internal"/>
<node name="Footnote" value="Catatan Kaki"/>
<node name="Emphasis" value="Emphasis"/>
<node name="Strong" value="Strong"/>
<node name="Subscript" value="Subscript"/>
<node name="Superscript" value="Superscript"/>
<node name="Code" value="Kode"/>
<node name="StrikeThrough" value="Teks Tercoret"/>
<node name="Contents Table" value="Daftar Isi"/>
<node name="Author in Library" value="Pengarang dalam Pustaka"/>
<node name="Book in Library" value="Buku dalam Pustaka"/>
<node name="Recent Book List" value="Daftar Buku-buku Sebelumnya"/>
<node name="Italic" value="Miring"/>
<node name="Bold" value="Tebal"/>
<node name="Definition" value="Definisi"/>
<node name="Definition Description" value="Deskripsi Definisi"/>
<node name="Header 1" value="Header 1"/>
<node name="Header 2" value="Header 2"/>
<node name="Header 3" value="Header 3"/>
<node name="Header 4" value="Header 4"/>
<node name="Header 5" value="Header 5"/>
<node name="Header 6" value="Header 6"/>
<node name="External Hyperlink" value="Hyperlink Eksternal"/>
</node>
<node name="external">
<node name="browser" value="Browser"/>
<node name="defaultBrowser" value="Browser Standar"/>
</node>
<node name="mobipocketPlugin">
<node name="unknown" value="Ada Kesalahan"/>
<node name="unsupportedCompressionMethod" value="Metode kompresi tidak didukung"/>
<node name="encriptedFile" value="Berkas terproteksi DRM"/>
</node>
<node name="library">
<node name="caption" value="Pustaka"/>
<node name="allBooks" value="All Books" toBeTranslated="true"/>
<node name="booksWithoutTags" value="Books with no Tags" toBeTranslated="true"/>
<node name="noBooks" value="FBReader found no books in the configured locations. Please specify the path to your books in the Preferences Dialog (&#8220;Library&#8221; tab, &#8220;Book Path&#8221; entry). Alternatively, you can add books to your library using &#8220;Add Book&#8221; button." toBeTranslated="true"/>
</node>
</resources>

View file

@ -1,377 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<node name="menu">
<node name="bookInfo" value="Informazioni Libro..."/>
<node name="toc" value="Indice"/>
<node name="library" value="Biblioteca">
<node name="showLibrary" value="Apri"/>
<node name="previousBook" value="Libro Precedente"/>
<node name="showRecent" value="Recenti"/>
<node name="addBook" value="Aggiungi Libro..."/>
<node name="showHelp" value="Informazioni su FBReader"/>
</node>
<node name="navigate" value="Navigazione">
<node name="gotoHome" value="Vai all'Inizio del Documento"/>
<node name="gotoPageNumber" value="Go to Page..." toBeTranslated="true"/>
<node name="gotoSectionStart" value="Vai all'Inizio di Sezione"/>
<node name="gotoSectionEnd" value="Vai alla Fine di Sezione"/>
<node name="nextTOCSection" value="Vai al Successivo Elemento dell'Indice"/>
<node name="previousTOCSection" value="Vai al Precedente Elemento dell'Indice"/>
<node name="undo" value="Vai Indietro"/>
<node name="redo" value="Vai Avanti"/>
</node>
<node name="selection" value="Selezione">
<node name="copyToClipboard" value="Copia negli Appunti"/>
<node name="openInDictionary" value="Apri in Dizionario"/>
<node name="clearSelection" value="Deseleziona"/>
</node>
<node name="search" value="Trova">
<node name="search" value="Trova Testo..."/>
<node name="findNext" value="Trova Successivo"/>
<node name="findPrevious" value="Trova Precedente"/>
</node>
<node name="view" value="Visualizzazione">
<node name="rotate" value="Ruota Schermo"/>
<node name="toggleFullscreen" value="A Tutto Schermo"/>
<node name="toggleIndicator" value="Alterna Indicatore"/>
</node>
<node name="preferences" value="Preferenze..."/>
<node name="quit" value="Chiudi"/>
</node>
<node name="toolbar">
<node name="showLibrary" value="Mostra Albero Biblioteca"/>
<node name="showRecent" value="Mostra Elenco Libri Recenti"/>
<node name="addBook" value="Aggiungi File alla Biblioteca"/>
<node name="gotoHome" value="Vai all'Inizio del Testo"/>
<node name="undo" value="Vai Indietro"/>
<node name="redo" value="Vai Avanti"/>
<node name="toc" value="Indice"/>
<node name="search" value="Trova Testo"/>
<node name="findNext" value="Trova Successivo"/>
<node name="findPrevious" value="Trova Precedente"/>
<node name="bookInfo" value="Mostra Finestra Informazioni Libro"/>
<node name="preferences" value="Mostra Finestra Preferenze"/>
<node name="rotate" value="Ruota Testo"/>
<node name="showHelp" value="Informazioni su FBReader"/>
</node>
<node name="dialog">
<node name="button">
<node name="go" value="&amp;Vai!"/>
<node name="thisOnly" value="This only" toBeTranslated="true"/>
<node name="withSubtags" value="With subtags" toBeTranslated="true"/>
</node>
<node name="OptionsDialog">
<node name="title" value="FBReader - Opzioni"/>
<node name="tab">
<node name="Library" value="Biblioteca">
<node name="bookPath" value="Percorso Libri"/>
<node name="lookInSubdirectories" value="Cerca Libri in Sottocartelle"/>
<node name="recentListSize" value="Lunghezza Elenco Libri Recenti"/>
<node name="showTags" value="Show Tag Hierarchies" toBeTranslated="true"/>
<node name="showAllBooksList" value="Show All Books Branch" toBeTranslated="true"/>
</node>
<node name="Language" value="Lingua">
<node name="autoDetect" value="Riconosci Lingua e Codifica Automaticamente"/>
<node name="defaultLanguage" value="Lingua Predefinita"/>
<node name="defaultEncodingSet" value="Insieme Predefinito di Codifica"/>
<node name="defaultEncoding" value="Codifica Predefinita"/>
<node name="useWindows1252Hack" value="Use windows-1252 instead of iso-8859-1" toBeTranslated="true"/>
</node>
<node name="Indicator" value="Indicatore">
<node name="show" value="Mostra Indicatore di Posizione"/>
<node name="height" value="Altezza Indicatore"/>
<node name="offset" value="Distanza dal Testo"/>
<node name="pageNumber" value="Mostra Posizione come Numero"/>
<node name="time" value="Mostra Orario"/>
<node name="fontSize" value="Dimensioni Carattere"/>
<node name="tocMarks" value="Mostra Segni Indice"/>
<node name="navigation" value="Abilita Navigazione"/>
</node>
<node name="Scrolling" value="Scorrimento">
<node name="optionsFor" value="Opzioni per">
<node name="large" value="Scorrimenti Grandi"/>
<node name="small" value="Scorrimenti Piccoli"/>
<node name="mouse" value="Scorrimenti con Mouse"/>
<node name="tap" value="Tap Scrollings" toBeTranslated="true"/>
</node>
<node name="delay" value="Ritardo tra Scorrimenti, msec"/>
<node name="mode" value="Modalit&#224; Scorrimento">
<node name="noOverlapping" value="Non Sovrapporre"/>
<node name="keepLines" value="Mantieni Righe"/>
<node name="scrollLines" value="Scorri Righe"/>
<node name="scrollPercentage" value="Scorri Percentuale"/>
<node name="disable" value="Disabilita"/>
</node>
<node name="linesToKeep" value="Righe da Mantenere"/>
<node name="linesToScroll" value="Righe da Scorrere"/>
<node name="percentToScroll" value="Percentuale da Scorrere"/>
<node name="fingerOnly" value="Scroll on Finger Tap Only" toBeTranslated="true"/>
</node>
<node name="Selection" value="Selezione">
<node name="enableSelection" value="Enable Text Selection" toBeTranslated="true"/>
</node>
<node name="Margins" value="Margini">
<node name="left" value="Margine Sinistro"/>
<node name="right" value="Margine Destro"/>
<node name="top" value="Margine Superiore"/>
<node name="bottom" value="Margine Inferiore"/>
</node>
<node name="Format" value="Formato">
<node name="optionsFor" value="Opzioni per"/>
<node name="lineSpacing" value="Spaziatura Righe">
<node name="unchanged" value="&lt;invariata&gt;"/>
</node>
<node name="firstLineIndent" value="Rientro Prima Riga"/>
<node name="alignment" value="Allineamento">
<node name="left" value="Sinistra"/>
<node name="right" value="Destra"/>
<node name="center" value="Centrato"/>
<node name="justify" value="Giustificato"/>
<node name="unchanged" value="&lt;invariato&gt;"/>
</node>
<node name="spaceBefore" value="Spazio Prima"/>
<node name="spaceAfter" value="Spazio Dopo"/>
<node name="leftIndent" value="Rientro a Sinistra"/>
<node name="rightIndent" value="Rientro a Destra"/>
</node>
<node name="Styles" value="Stili">
<node name="optionsFor" value="Options for"/>
<node name="fontFamily" value="Famiglia Caratteri">
<node name="unchanged" value="&lt;invariata&gt;"/>
</node>
<node name="fontSize" value="Dimensioni"/>
<node name="fontSizeDifference" value="Differenza di Dimensioni"/>
<node name="bold" value="Grassetto"/>
<node name="italic" value="Corsivo"/>
<node name="allowHyphenations" value="Permetti Sillabazione"/>
<node name="autoHyphenations" value="Sillabazione Automatica"/>
</node>
<node name="Rotation" value="Rotazione">
<node name="direction" value="Tipo di Rotazione">
<node name="disabled" value="Disabilitata"/>
<node name="clockwise" value="Oraria 90 Gradi"/>
<node name="counterclockwise" value="Antioraria 90 Gradi"/>
<node name="180" value="180 Gradi"/>
<node name="cycle" value="Cicla Tra Tutte le 4 Direzioni"/>
</node>
</node>
<node name="Colors" value="Colori">
<node name="colorFor" value="Colore di">
<node name="background" value="Sfondo"/>
<node name="selectionBackground" value="Sfondo della Selezione"/>
<node name="text" value="Testo Normale"/>
<node name="internalLink" value="Testo Collegamento Interno"/>
<node name="externalLink" value="Testo Collegamento Esterno"/>
<node name="highlighted" value="Testo Evidenziato"/>
<node name="treeLines" value="Linee Albero"/>
<node name="indicator" value="Indicatore Posizione"/>
</node>
</node>
<node name="Keys" value="Tasti">
<node name="grabSystemKeys" value="Intercetta Tasti di Sistema"/>
<node name="separate" value="Funzione Tasti Dipendente dall'Orientamento"/>
<node name="orientation" value="Orientamento"/>
<node name="action">
<node name="none" value="Nessuno"/>
<node name="showLibrary" value="Mostra Biblioteca"/>
<node name="showRecent" value="Mostra Libri Recenti"/>
<node name="previousBook" value="Apri Libro Precedente"/>
<node name="toc" value="Mostra Indice"/>
<node name="gotoHome" value="Vai alla Pagina Principale"/>
<node name="gotoSectionStart" value="Vai all'Inizio di Sezione"/>
<node name="gotoSectionEnd" value="Vai alla Fine di Seziona"/>
<node name="nextTOCSection" value="Vai alla Sezione Successiva dell'Indice"/>
<node name="previousTOCSection" value="Vai alla Sezione Precedente dell'Indice"/>
<node name="largeScrollForward" value="Scorrimento Grande in Avanti"/>
<node name="largeScrollBackward" value="Scorrimento Grande Indietro"/>
<node name="smallScrollForward" value="Scorrimento Piccolo in Avanti"/>
<node name="smallScrollBackward" value="Scorrimento Piccolo Indietro"/>
<node name="undo" value="Annulla"/>
<node name="redo" value="Ripristina"/>
<node name="copyToClipboard" value="Copia Testo Selezionato negli Appunti"/>
<node name="openInDictionary" value="Apri Testo Selezionato in Dizionario"/>
<node name="clearSelection" value="Deseleziona"/>
<node name="search" value="Trova"/>
<node name="findPrevious" value="Trova Precedente"/>
<node name="findNext" value="Trova Successivo"/>
<node name="increaseFont" value="Ingrandisci Carattere"/>
<node name="decreaseFont" value="Riduci Carattere"/>
<node name="toggleIndicator" value="Alterna Indicatore di Posizione"/>
<node name="toggleFullscreen" value="Alterna Modalità Schermo Intero"/>
<node name="onFullscreen" value="Passa a Modalità Schermo Intero"/>
<node name="rotate" value="Ruota Schermo"/>
<node name="preferences" value="Mostra Finestra Opzioni"/>
<node name="bookInfo" value="Mostra Finestra Informazioni Libro"/>
<node name="addBook" value="Aggiungi Libro"/>
<node name="cancel" value="Annulla"/>
<node name="quit" value="Esci"/>
</node>
<node name="quitOnCancel" value="Esci dall'Applicazione su Annullamento"/>
<node name="keyDelay" value="Ritardo Tra Pressione Tasti Accettati"/>
</node>
<node name="Config" value="Configurazione">
<node name="autoSave" value="Salva Stato Automaticamente"/>
<node name="timeout" value="Intervallo tra Salvataggi, sec"/>
</node>
<node name="Dictionary" value="Dizionario">
<node name="enableIntegration" value="Abilita Integrazione con %s"/>
<node name="defaultText" value="Abilita Integrazione con Dizionario"/>
<node name="choice" value="Integra con"/>
<node name="singleClickOpen" value="Apri con Clic Singolo"/>
</node>
<node name="Web" value="Web">
<node name="enableIntegration" value="Apri Collegamenti Esterni in %s"/>
<node name="defaultText" value="Apri Collegamenti Esterni in Browser"/>
<node name="choice" value="Usa Browser"/>
<node name="command" value="Comando da Eseguire"/>
</node>
<node name="Maemo" value="Maemo">
<node name="keyActionOnRelease" value="Action on Key Release, not on Key Press" toBeTranslated="true"/>
<node name="minStylusPressure" value="Minimal Stylus Pressure" toBeTranslated="true"/>
<node name="maxStylusPressure" value="Maximal Stylus Pressure" toBeTranslated="true"/>
</node>
</node>
</node>
<node name="InfoDialog">
<node name="title" value="FBReader - Informazioni Libro"/>
<node name="tab">
<node name="Common" value="Comuni">
<node name="file" value="File"/>
<node name="title" value="Titolo"/>
<node name="authorDisplayName" value="Autore (Nome Mostrato)"/>
<node name="authorSortKey" value="Autore (Ordinamento)"/>
<node name="language" value="Lingua"/>
<node name="encodingSet" value="Insieme di Codifica"/>
<node name="encoding" value="Codifica"/>
</node>
<node name="Series" value="Serie">
<node name="seriesTitle" value="Titolo della Serie"/>
<node name="bookNumber" value="Libro Numero"/>
</node>
<node name="Tags" value="Tags" toBeTranslated="true">
<node name="tags" value="Tag List" toBeTranslated="true"/>
</node>
<node name="Text" value="Testo">
<node name="breakType" value="Interrompi Paragrafo a"/>
<node name="ignoreIndent" value="Ignora Rientri Inferiori a"/>
<node name="buildTOC" value="Crea Indice"/>
<node name="emptyLines" value="Righe Vuote Prima di Nuova Sezione"/>
</node>
<node name="&lt;PRE&gt;" value="&lt;PRE&gt;">
<node name="breakType" value="Interrompi Paragrafo a"/>
<node name="ignoreIndent" value="Ignora Rientri Inferiori a"/>
<node name="buildTOC" value="Crea Indice"/>
<node name="emptyLines" value="Righe Vuote Prima di Nuova Sezione"/>
</node>
</node>
</node>
<node name="addFileDialog">
<node name="title" value="FBReader - Aggiungi Libro alla Biblioteca"/>
</node>
<node name="textSearchDialog">
<node name="title" value="Trova Testo"/>
<node name="text" value=""/>
<node name="ignoreCase" value="&amp;Ignora maiuscole/minuscole"/>
<node name="wholeText" value="In &amp;tutto il testo"/>
<node name="backward" value="&amp;All'indietro"/>
<node name="currentSection" value="&amp;Solo questa sezione"/>
</node>
<node name="gotoPageDialog">
<node name="title" value="Go To Page" toBeTranslated="true"/>
<node name="pageNumber" value="Go to Page Number" toBeTranslated="true"/>
</node>
<node name="editTagInfoDialog">
<node name="title" value="Edit/Clone Tag" toBeTranslated="true"/>
<node name="editOrClone" value="Action" toBeTranslated="true">
<node name="edit" value="Rename Tag" toBeTranslated="true"/>
<node name="clone" value="Clone Tag" toBeTranslated="true"/>
</node>
<node name="name" value="Tag Name" toBeTranslated="true"/>
<node name="includeSubtags" value="Include Subtags" toBeTranslated="true"/>
</node>
<node name="removeBookBox">
<node name="title" value="Elimina Libro"/>
<node name="message" value="Elimina Libro &#13;&quot;%s&quot;&#13; dalla Biblioteca?"/>
</node>
<node name="removeTagBox">
<node name="title" value="Remove Tag" toBeTranslated="true"/>
<node name="message" value="Remove Tag &#8220;%s&#8221;?" toBeTranslated="true"/>
</node>
<node name="openBookErrorBox">
<node name="title" value="Errore"/>
<node name="message" value="Impossibile aprire:&#13;%s"/>
</node>
<node name="noHelpBox">
<node name="title" value="Errore"/>
<node name="message" value="Spiacente, file della Guida non trovato"/>
</node>
<node name="tagMustBeNonEmpty">
<node name="title" value="Errore"/>
<node name="message" value="Tag name must be a non-empty string" toBeTranslated="true"/>
</node>
<node name="tagMustNotContainComma">
<node name="title" value="Errore"/>
<node name="message" value="Tag name must not contain a &#8220;,&#8221; symbol" toBeTranslated="true"/>
</node>
<node name="waitMessage">
<node name="loadingBook" value="Caricamento libro. Attendere, prego..."/>
<node name="loadingBookList" value="Caricamento elenco libri. Attendere, prego..."/>
<node name="migrate" value="Upgrading to the new version. Please, wait..." toBeTranslated="true"/>
</node>
</node>
<node name="style">
<node name="Base" value="Base"/>
<node name="Regular Paragraph" value="Paragrafo Normale"/>
<node name="Title" value="Titolo"/>
<node name="Section Title" value="Title di Sezione"/>
<node name="Poem Title" value="Titolo di Poesia"/>
<node name="Subtitle" value="Sottotitolo"/>
<node name="Annotation" value="Annozione"/>
<node name="Epigraph" value="Epigrafe"/>
<node name="Stanza" value="Strofa"/>
<node name="Verse" value="Verso"/>
<node name="Preformatted text" value="Testo preformattato"/>
<node name="Image" value="Immagine"/>
<node name="Cite" value="Citazione"/>
<node name="Author" value="Autore"/>
<node name="Date" value="Data"/>
<node name="Internal Hyperlink" value="Collegamento Interno"/>
<node name="Footnote" value="Nota"/>
<node name="Emphasis" value="Enfasi"/>
<node name="Strong" value="Rafforzato"/>
<node name="Subscript" value="Pedice"/>
<node name="Superscript" value="Apice"/>
<node name="Code" value="Codice"/>
<node name="StrikeThrough" value="Barrato"/>
<node name="Contents Table" value="Tabella di Contenuti"/>
<node name="Author in Library" value="Autore in Biblioteca"/>
<node name="Book in Library" value="Libro in Biblioteca"/>
<node name="Recent Book List" value="Elenco Libri Recenti"/>
<node name="Italic" value="Corsivo"/>
<node name="Bold" value="Grassetto"/>
<node name="Definition" value="Definizione"/>
<node name="Definition Description" value="Descrizione di Definizione"/>
<node name="Header 1" value="Intestazione 1"/>
<node name="Header 2" value="Intestazione 2"/>
<node name="Header 3" value="Intestazione 3"/>
<node name="Header 4" value="Intestazione 4"/>
<node name="Header 5" value="Intestazione 5"/>
<node name="Header 6" value="Intestazione 6"/>
<node name="External Hyperlink" value="Collegamento Esterno"/>
</node>
<node name="external">
<node name="browser" value="Browser"/>
<node name="defaultBrowser" value="Browser Predefinito"/>
</node>
<node name="mobipocketPlugin">
<node name="unknown" value="Errore Sconosciuto"/>
<node name="unsupportedCompressionMethod" value="Metodo di Compressione non Supportato"/>
<node name="encriptedFile" value="File Protetto da DRM"/>
</node>
<node name="library">
<node name="caption" value="Biblioteca"/>
<node name="allBooks" value="All Books" toBeTranslated="true"/>
<node name="booksWithoutTags" value="Books with no Tags" toBeTranslated="true"/>
<node name="noBooks" value="FBReader found no books in the configured locations. Please specify the path to your books in the Preferences Dialog (&#8220;Library&#8221; tab, &#8220;Book Path&#8221; entry). Alternatively, you can add books to your library using &#8220;Add Book&#8221; button." toBeTranslated="true"/>
</node>
</resources>

View file

@ -1,377 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<node name="menu">
<node name="bookInfo" value="Bokinformation..."/>
<node name="toc" value="Innehållsförteckning"/>
<node name="library" value="Bibliotek">
<node name="showLibrary" value="Öppna"/>
<node name="previousBook" value="Föregående bok"/>
<node name="showRecent" value="Tidigare"/>
<node name="addBook" value="Lägg till bok..."/>
<node name="showHelp" value="Om FBReader"/>
</node>
<node name="navigate" value="Navigation">
<node name="gotoHome" value="Gå till början av dokumentet"/>
<node name="gotoPageNumber" value="Go to Page..." toBeTranslated="true"/>
<node name="gotoSectionStart" value="Gå till början av textavsnitt"/>
<node name="gotoSectionEnd" value="Gå till slutet av textavsnitt"/>
<node name="nextTOCSection" value="Gå till nästa post i innehållsförteckning"/>
<node name="previousTOCSection" value="Gå till föregående post i innehållsförteckning"/>
<node name="undo" value="Gå bakåt"/>
<node name="redo" value="Gå framåt"/>
</node>
<node name="selection" value="Markering">
<node name="copyToClipboard" value="Kopiera till urklipp"/>
<node name="openInDictionary" value="Öppna i ordbok"/>
<node name="clearSelection" value="Töm"/>
</node>
<node name="search" value="Sök">
<node name="search" value="Sök text..."/>
<node name="findNext" value="Sök nästa"/>
<node name="findPrevious" value="Sök föregående"/>
</node>
<node name="view" value="Visa">
<node name="rotate" value="Rotera skärm"/>
<node name="toggleFullscreen" value="Helskärm"/>
<node name="toggleIndicator" value="Växla indikator"/>
</node>
<node name="preferences" value="Inställningar..."/>
<node name="quit" value="Stäng"/>
</node>
<node name="toolbar">
<node name="showLibrary" value="Visa biblioteksträd"/>
<node name="showRecent" value="Visa tidigare bokhistorik"/>
<node name="addBook" value="Lägg till fil till bibliotek"/>
<node name="gotoHome" value="Gå till början av text"/>
<node name="undo" value="Gå bakåt"/>
<node name="redo" value="Gå framåt"/>
<node name="toc" value="Innehållsförteckning"/>
<node name="search" value="Textsökning"/>
<node name="findNext" value="Sök nästa"/>
<node name="findPrevious" value="Sök föregående"/>
<node name="bookInfo" value="Visa bokinformation"/>
<node name="preferences" value="Visa inställningar"/>
<node name="rotate" value="Rotera text"/>
<node name="showHelp" value="Om FBReader"/>
</node>
<node name="dialog">
<node name="button">
<node name="go" value="&amp;Gå!"/>
<node name="thisOnly" value="This only" toBeTranslated="true"/>
<node name="withSubtags" value="With subtags" toBeTranslated="true"/>
</node>
<node name="OptionsDialog">
<node name="title" value="FBReader - Alternativ"/>
<node name="tab">
<node name="Library" value="Bibliotek">
<node name="bookPath" value="Boksökväg"/>
<node name="lookInSubdirectories" value="Leta efter böcker i underkataloger"/>
<node name="recentListSize" value="Storlek på lista över tidigare böcker"/>
<node name="showTags" value="Show Tag Hierarchies" toBeTranslated="true"/>
<node name="showAllBooksList" value="Show All Books Branch" toBeTranslated="true"/>
</node>
<node name="Language" value="Språk">
<node name="autoDetect" value="Upptäck automatiskt språk och kodning"/>
<node name="defaultLanguage" value="Standardspråk"/>
<node name="defaultEncodingSet" value="Standardteckenuppsättning"/>
<node name="defaultEncoding" value="Standardkodning"/>
<node name="useWindows1252Hack" value="Använd windows-1252 istället för iso-8859-1"/>
</node>
<node name="Indicator" value="Indikator">
<node name="show" value="Visa positionsindikator"/>
<node name="height" value="Indikatorns höjd"/>
<node name="offset" value="Offset från text"/>
<node name="pageNumber" value="Visa position som siffror"/>
<node name="time" value="Visa tid"/>
<node name="fontSize" value="Typsnittsstorlek"/>
<node name="tocMarks" value="Visa förteckningsmarkeringar"/>
<node name="navigation" value="Aktivera navigering"/>
</node>
<node name="Scrolling" value="Rullning">
<node name="optionsFor" value="Alternativ för">
<node name="large" value="Large Scrollings" toBeTranslated="true"/>
<node name="small" value="Small Scrollings" toBeTranslated="true"/>
<node name="mouse" value="Mouse Scrollings" toBeTranslated="true"/>
<node name="tap" value="Tap Scrollings" toBeTranslated="true"/>
</node>
<node name="delay" value="Fördröjning mellan rullningar, ms"/>
<node name="mode" value="Rullningsläge">
<node name="noOverlapping" value="Ingen överlappning"/>
<node name="keepLines" value="Behåll rader"/>
<node name="scrollLines" value="Rulla rader"/>
<node name="scrollPercentage" value="Rulla procentandel"/>
<node name="disable" value="Inaktivera"/>
</node>
<node name="linesToKeep" value="Rader att behålla"/>
<node name="linesToScroll" value="Rader att rulla"/>
<node name="percentToScroll" value="Procentandel att rulla"/>
<node name="fingerOnly" value="Scroll on Finger Tap Only" toBeTranslated="true"/>
</node>
<node name="Selection" value="Markering">
<node name="enableSelection" value="Aktivera textmarkering"/>
</node>
<node name="Margins" value="Marginaler">
<node name="left" value="Vänstermarginal"/>
<node name="right" value="Högermarginal"/>
<node name="top" value="Övermarginal"/>
<node name="bottom" value="Nedermarginal"/>
</node>
<node name="Format" value="Formatering">
<node name="optionsFor" value="Alternativ för"/>
<node name="lineSpacing" value="Radmellanrum">
<node name="unchanged" value="&lt;oförändrad&gt;"/>
</node>
<node name="firstLineIndent" value="Indentera första raden"/>
<node name="alignment" value="Justering">
<node name="left" value="Vänster"/>
<node name="right" value="Höger"/>
<node name="center" value="Centrera"/>
<node name="justify" value="Justera"/>
<node name="unchanged" value="&lt;oförändrad&gt;"/>
</node>
<node name="spaceBefore" value="Blanksteg före"/>
<node name="spaceAfter" value="Blanksteg efter"/>
<node name="leftIndent" value="Vänsterindentering"/>
<node name="rightIndent" value="Högerindentering"/>
</node>
<node name="Styles" value="Stilar">
<node name="optionsFor" value="Alternativ för"/>
<node name="fontFamily" value="Familj">
<node name="unchanged" value="&lt;oförändrad&gt;"/>
</node>
<node name="fontSize" value="Storlek"/>
<node name="fontSizeDifference" value="Storleksskillnad"/>
<node name="bold" value="Fet"/>
<node name="italic" value="Kursiv"/>
<node name="allowHyphenations" value="Tillåt avstavningar"/>
<node name="autoHyphenations" value="Automatiska avstavningar"/>
</node>
<node name="Rotation" value="Rotering">
<node name="direction" value="Roteringstyp">
<node name="disabled" value="Inaktiverad"/>
<node name="clockwise" value="90 grader medsols"/>
<node name="counterclockwise" value="90 grader motsols"/>
<node name="180" value="180 grader"/>
<node name="cycle" value="Växla genom alla fyra riktningar"/>
</node>
</node>
<node name="Colors" value="Färger">
<node name="colorFor" value="Färg för">
<node name="background" value="Bakgrund"/>
<node name="selectionBackground" value="Markeringsbakgrund"/>
<node name="text" value="Vanlig text"/>
<node name="internalLink" value="Text för intern hyperlänk"/>
<node name="externalLink" value="Text för extern hyperlänk"/>
<node name="highlighted" value="Färgmarkerad text"/>
<node name="treeLines" value="Trädrader"/>
<node name="indicator" value="Positionsindikator"/>
</node>
</node>
<node name="Keys" value="Tangenter">
<node name="grabSystemKeys" value="Fånga systemtangenter"/>
<node name="separate" value="Tangentbindningar beroende av orientering"/>
<node name="orientation" value="Orientering"/>
<node name="action">
<node name="none" value="Ingen"/>
<node name="showLibrary" value="Visa bibliotek"/>
<node name="showRecent" value="Visa tidigare böcker"/>
<node name="previousBook" value="Öppna föregående bok"/>
<node name="toc" value="Visa innehållsförteckning"/>
<node name="gotoHome" value="Gå hem"/>
<node name="gotoSectionStart" value="Gå till början av avsnitt"/>
<node name="gotoSectionEnd" value="Gå till slutet av avsnitt"/>
<node name="nextTOCSection" value="Gå till nästa avsnitt i förteckning"/>
<node name="previousTOCSection" value="Gå till föregående avsnitt i förteckning"/>
<node name="largeScrollForward" value="Stor rullning framåt"/>
<node name="largeScrollBackward" value="Stor rullning bakåt"/>
<node name="smallScrollForward" value="Liten rullning framåt"/>
<node name="smallScrollBackward" value="Liten rullning bakåt"/>
<node name="undo" value="Ångra"/>
<node name="redo" value="Gör om"/>
<node name="copyToClipboard" value="Kopiera markerad text till urklipp"/>
<node name="openInDictionary" value="Öppna markerad text i ordbok"/>
<node name="clearSelection" value="Töm markering"/>
<node name="search" value="Sök"/>
<node name="findPrevious" value="Sök föregående"/>
<node name="findNext" value="Sök nästa"/>
<node name="increaseFont" value="Öka typsnittsstorlek"/>
<node name="decreaseFont" value="Minska typsnittsstorlek"/>
<node name="toggleIndicator" value="Växla positionsindikator"/>
<node name="toggleFullscreen" value="Växla helskärmsläge"/>
<node name="onFullscreen" value="Växla till helskärmsläge"/>
<node name="rotate" value="Rotera skärm"/>
<node name="preferences" value="Visa alternativdialog"/>
<node name="bookInfo" value="Visa bokinformation"/>
<node name="addBook" value="Lägg till bok"/>
<node name="cancel" value="Avbryt"/>
<node name="quit" value="Avsluta"/>
</node>
<node name="quitOnCancel" value="Avsluta programmet vid avbryt"/>
<node name="keyDelay" value="Delay Between Accepted Key Pressings" toBeTranslated="true"/>
</node>
<node name="Config" value="Konfiguration">
<node name="autoSave" value="Spara tillstånd automatiskt"/>
<node name="timeout" value="Tidsgräns mellan sparningar, sekunder"/>
</node>
<node name="Dictionary" value="Ordbok">
<node name="enableIntegration" value="Aktivera integration med %s"/>
<node name="defaultText" value="Aktivera integration med ordbok"/>
<node name="choice" value="Integrera med"/>
<node name="singleClickOpen" value="Öppna med ett klick"/>
</node>
<node name="Web" value="Webb">
<node name="enableIntegration" value="Öppna externa länkar med %s"/>
<node name="defaultText" value="Öppna externa länkar i webbläsare"/>
<node name="choice" value="Använd webbläsare"/>
<node name="command" value="Kommando att köra"/>
</node>
<node name="Maemo" value="Maemo">
<node name="keyActionOnRelease" value="Åtgärd vid tangentsläpp, inte tangenttryck"/>
<node name="minStylusPressure" value="Minimalt pentryck"/>
<node name="maxStylusPressure" value="Maximalt pentryck"/>
</node>
</node>
</node>
<node name="InfoDialog">
<node name="title" value="FBReader - Bokinformation"/>
<node name="tab">
<node name="Common" value="Allmänt">
<node name="file" value="Fil"/>
<node name="title" value="Titel"/>
<node name="authorDisplayName" value="Författare (Visningsnamn)"/>
<node name="authorSortKey" value="Författare (Sorteringsnyckel)"/>
<node name="language" value="Språk"/>
<node name="encodingSet" value="Teckenuppsättning"/>
<node name="encoding" value="Kodning"/>
</node>
<node name="Series" value="Serier">
<node name="seriesTitle" value="Serietitel"/>
<node name="bookNumber" value="Boknummer"/>
</node>
<node name="Tags" value="Tags" toBeTranslated="true">
<node name="tags" value="Tag List" toBeTranslated="true"/>
</node>
<node name="Text" value="Text">
<node name="breakType" value="Bryt stycke vid"/>
<node name="ignoreIndent" value="Ignorera indentering mindre än"/>
<node name="buildTOC" value="Bygg innehållsförteckning"/>
<node name="emptyLines" value="Tomma rader innan nytt avsnitt"/>
</node>
<node name="&lt;PRE&gt;" value="&lt;PRE&gt;">
<node name="breakType" value="Bryt stycke vid"/>
<node name="ignoreIndent" value="Ignorera indentering mindre än"/>
<node name="buildTOC" value="Bygg innehållsförteckning"/>
<node name="emptyLines" value="Tomma rader innan nytt avsnitt"/>
</node>
</node>
</node>
<node name="addFileDialog">
<node name="title" value="FBReader - Lägg till bok till biblioteket"/>
</node>
<node name="textSearchDialog">
<node name="title" value="Textsökning"/>
<node name="text" value=""/>
<node name="ignoreCase" value="&amp;Ignorera skiftläge"/>
<node name="wholeText" value="I h&amp;ela texten"/>
<node name="backward" value="&amp;Bakåt"/>
<node name="currentSection" value="Endast i &amp;detta avsnitt"/>
</node>
<node name="gotoPageDialog">
<node name="title" value="Go To Page" toBeTranslated="true"/>
<node name="pageNumber" value="Go to Page Number" toBeTranslated="true"/>
</node>
<node name="editTagInfoDialog">
<node name="title" value="Edit/Clone Tag" toBeTranslated="true"/>
<node name="editOrClone" value="Action" toBeTranslated="true">
<node name="edit" value="Rename Tag" toBeTranslated="true"/>
<node name="clone" value="Clone Tag" toBeTranslated="true"/>
</node>
<node name="name" value="Tag Name" toBeTranslated="true"/>
<node name="includeSubtags" value="Include Subtags" toBeTranslated="true"/>
</node>
<node name="removeBookBox">
<node name="title" value="Ta bort bok"/>
<node name="message" value="Ta bort boken &#13;&quot;%s&quot;&#13; från biblioteket?"/>
</node>
<node name="removeTagBox">
<node name="title" value="Remove Tag" toBeTranslated="true"/>
<node name="message" value="Remove Tag &#8220;%s&#8221;?" toBeTranslated="true"/>
</node>
<node name="openBookErrorBox">
<node name="title" value="Fel"/>
<node name="message" value="Kunde inte öppna:&#13;%s"/>
</node>
<node name="noHelpBox">
<node name="title" value="Fel"/>
<node name="message" value="Tyvärr, hjälpfilen hittades inte"/>
</node>
<node name="tagMustBeNonEmpty">
<node name="title" value="Fel"/>
<node name="message" value="Tag name must be a non-empty string" toBeTranslated="true"/>
</node>
<node name="tagMustNotContainComma">
<node name="title" value="Fel"/>
<node name="message" value="Tag name must not contain a &#8220;,&#8221; symbol" toBeTranslated="true"/>
</node>
<node name="waitMessage">
<node name="loadingBook" value="Läser in bok. Var god vänta..."/>
<node name="loadingBookList" value="Läser in boklista. Var god vänta..."/>
<node name="migrate" value="Upgrading to the new version. Please, wait..." toBeTranslated="true"/>
</node>
</node>
<node name="style">
<node name="Base" value="Bas"/>
<node name="Regular Paragraph" value="Vanligt stycke"/>
<node name="Title" value="Titel"/>
<node name="Section Title" value="Avsnittstitel"/>
<node name="Poem Title" value="Poem Title"/>
<node name="Subtitle" value="Undertext"/>
<node name="Annotation" value="Notation"/>
<node name="Epigraph" value="Epigram"/>
<node name="Stanza" value="Strof"/>
<node name="Verse" value="Vers"/>
<node name="Preformatted text" value="Förformaterad text"/>
<node name="Image" value="Bild"/>
<node name="Cite" value="Citat"/>
<node name="Author" value="Författare"/>
<node name="Date" value="Datum"/>
<node name="Internal Hyperlink" value="Intern hyperlänk"/>
<node name="Footnote" value="Fotnot"/>
<node name="Emphasis" value="Betoning"/>
<node name="Strong" value="Stark"/>
<node name="Subscript" value="Nedsänkt"/>
<node name="Superscript" value="Upphöjt"/>
<node name="Code" value="Kod"/>
<node name="StrikeThrough" value="Genomstruket"/>
<node name="Contents Table" value="Innehållstabell"/>
<node name="Author in Library" value="Författare i bibliotek"/>
<node name="Book in Library" value="Bok i bibliotek"/>
<node name="Recent Book List" value="Lista över tidigare böcker"/>
<node name="Italic" value="Kursiv"/>
<node name="Bold" value="Fet"/>
<node name="Definition" value="Definition"/>
<node name="Definition Description" value="Definitionsbeskrivning"/>
<node name="Header 1" value="Rubrik 1"/>
<node name="Header 2" value="Rubrik 2"/>
<node name="Header 3" value="Rubrik 3"/>
<node name="Header 4" value="Rubrik 4"/>
<node name="Header 5" value="Rubrik 5"/>
<node name="Header 6" value="Rubrik 6"/>
<node name="External Hyperlink" value="Extern hyperlänk"/>
</node>
<node name="external">
<node name="browser" value="Webbläsare"/>
<node name="defaultBrowser" value="Standardwebbläsare"/>
</node>
<node name="mobipocketPlugin">
<node name="unknown" value="Okänt fel"/>
<node name="unsupportedCompressionMethod" value="Komprimeringsmetoden stöds inte"/>
<node name="encriptedFile" value="DRM-skyddad fil"/>
</node>
<node name="library">
<node name="caption" value="Bibliotek"/>
<node name="allBooks" value="All Books" toBeTranslated="true"/>
<node name="booksWithoutTags" value="Books with no Tags" toBeTranslated="true"/>
<node name="noBooks" value="FBReader found no books in the configured locations. Please specify the path to your books in the Preferences Dialog (&#8220;Library&#8221; tab, &#8220;Book Path&#8221; entry). Alternatively, you can add books to your library using &#8220;Add Book&#8221; button." toBeTranslated="true"/>
</node>
</resources>

View file

@ -1,377 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<node name="menu">
<node name="bookInfo" value="Інформація про книгу..."/>
<node name="toc" value="Зміст"/>
<node name="library" value="Бібліотека">
<node name="showLibrary" value="Відкрити бібліотеку"/>
<node name="previousBook" value="Попередня книга"/>
<node name="showRecent" value="Прочитані книги"/>
<node name="addBook" value="Додати файл..."/>
<node name="showHelp" value="Про програму FBReader"/>
</node>
<node name="navigate" value="Навігація">
<node name="gotoHome" value="На початок книги"/>
<node name="gotoPageNumber" value="Go to Page..." toBeTranslated="true"/>
<node name="gotoSectionStart" value="На початок розділу"/>
<node name="gotoSectionEnd" value="В кінець розділу"/>
<node name="nextTOCSection" value="До наступної глави"/>
<node name="previousTOCSection" value="До попередньої глави"/>
<node name="undo" value="Назад"/>
<node name="redo" value="Вперед"/>
</node>
<node name="selection" value="Помітка">
<node name="copyToClipboard" value="Скопіювати до буфера"/>
<node name="openInDictionary" value="Дивитися у словнику"/>
<node name="clearSelection" value="Зняти помітку"/>
</node>
<node name="search" value="Пошук">
<node name="search" value="Шукати..."/>
<node name="findNext" value="Шукати далі"/>
<node name="findPrevious" value="Шукати раніше"/>
</node>
<node name="view" value="Зображення">
<node name="rotate" value="Повернути"/>
<node name="toggleFullscreen" value="На весь екран"/>
<node name="toggleIndicator" value="Індикатор позиції"/>
</node>
<node name="preferences" value="Налаштування..."/>
<node name="quit" value="Закрити"/>
</node>
<node name="toolbar">
<node name="showLibrary" value="Бібліотека"/>
<node name="showRecent" value="Прочитані книги"/>
<node name="addBook" value="Додати файл до бібліотеки"/>
<node name="gotoHome" value="На початок книги"/>
<node name="undo" value="Назад"/>
<node name="redo" value="Вперед"/>
<node name="toc" value="Зміст"/>
<node name="search" value="Пошук"/>
<node name="findNext" value="Знайти наступний"/>
<node name="findPrevious" value="Знайти попередній"/>
<node name="bookInfo" value="Інформацiя про книгу"/>
<node name="preferences" value="Налаштування"/>
<node name="rotate" value="Повернути текст"/>
<node name="showHelp" value="Про програму"/>
</node>
<node name="dialog">
<node name="button">
<node name="go" value="&amp;Шукати"/>
<node name="thisOnly" value="This only" toBeTranslated="true"/>
<node name="withSubtags" value="With subtags" toBeTranslated="true"/>
</node>
<node name="OptionsDialog">
<node name="title" value="FBReader - Налаштування"/>
<node name="tab">
<node name="Library" value="Бібліотека">
<node name="bookPath" value="Каталоги з книгами"/>
<node name="lookInSubdirectories" value="Шукати книги в підтеках"/>
<node name="recentListSize" value="Розмір списку прочитаних книг"/>
<node name="showTags" value="Show Tag Hierarchies" toBeTranslated="true"/>
<node name="showAllBooksList" value="Show All Books Branch" toBeTranslated="true"/>
</node>
<node name="Language" value="Мова">
<node name="autoDetect" value="Визначити мову та кодувати автоматично"/>
<node name="defaultLanguage" value="Типова мова"/>
<node name="defaultEncodingSet" value="Набiр символiв"/>
<node name="defaultEncoding" value="Типовий набiр символiв"/>
<node name="useWindows1252Hack" value="Використати windows-1252 замiсть iso-8859-1"/>
</node>
<node name="Indicator" value="Індикатор">
<node name="show" value="Показувати індикатор"/>
<node name="height" value="Висота індикатора"/>
<node name="offset" value="Відступ від тексту"/>
<node name="pageNumber" value="Показувати номери сторінок"/>
<node name="time" value="Показувати поточний час"/>
<node name="fontSize" value="Розмір шрифта"/>
<node name="tocMarks" value="Показувати помітки початку"/>
<node name="navigation" value="Реагувати на натискання"/>
</node>
<node name="Scrolling" value="Перегортання">
<node name="optionsFor" value="Налаштування перегортання">
<node name="large" value="на велику відстань"/>
<node name="small" value="на невелику відстань"/>
<node name="mouse" value="колесом мишки"/>
<node name="tap" value="Tap Scrollings" toBeTranslated="true"/>
</node>
<node name="delay" value="Затримка, мілісекунд"/>
<node name="mode" value="Перегортання">
<node name="noOverlapping" value="без перекриття"/>
<node name="keepLines" value="перекриває кілька рядків"/>
<node name="scrollLines" value="зсовує кілька рядків"/>
<node name="scrollPercentage" value="зсовує частину тексту"/>
<node name="disable" value="вимкнено"/>
</node>
<node name="linesToKeep" value="Скільки рядків перекривати"/>
<node name="linesToScroll" value="Скільки рядків зсувати"/>
<node name="percentToScroll" value="Скільки відсотків зсувати"/>
<node name="fingerOnly" value="Scroll on Finger Tap Only" toBeTranslated="true"/>
</node>
<node name="Selection" value="Помітка">
<node name="enableSelection" value="Дозволити помiчати текст"/>
</node>
<node name="Margins" value="Відступи">
<node name="left" value="Відступ зліва"/>
<node name="right" value="Відступ зправа"/>
<node name="top" value="Відступ зверху"/>
<node name="bottom" value="Відступ знизу"/>
</node>
<node name="Format" value="Форматування">
<node name="optionsFor" value="Налаштування для"/>
<node name="lineSpacing" value="Інтервал">
<node name="unchanged" value="&lt;не змінювати&gt;"/>
</node>
<node name="firstLineIndent" value="Червоний рядок"/>
<node name="alignment" value="Вирівнювання">
<node name="left" value="ліве"/>
<node name="right" value="праве"/>
<node name="center" value="по центру"/>
<node name="justify" value="по краях"/>
<node name="unchanged" value="&lt;не змінювати&gt;"/>
</node>
<node name="spaceBefore" value="Пропуск перед"/>
<node name="spaceAfter" value="Пропуск після"/>
<node name="leftIndent" value="Відступ зліва"/>
<node name="rightIndent" value="Відступ зправа"/>
</node>
<node name="Styles" value="Стилі">
<node name="optionsFor" value="Налаштування для"/>
<node name="fontFamily" value="Шрифт">
<node name="unchanged" value="&lt;не змінювати&gt;"/>
</node>
<node name="fontSize" value="Розмір"/>
<node name="fontSizeDifference" value="Розмір"/>
<node name="bold" value="Жирний"/>
<node name="italic" value="Курсив"/>
<node name="allowHyphenations" value="Переноси"/>
<node name="autoHyphenations" value="Переноси"/>
</node>
<node name="Rotation" value="Поворот">
<node name="direction" value="Як повертати">
<node name="disabled" value="Не повертати взагалі"/>
<node name="clockwise" value="На 90 градусів за годинниковою стрілкою"/>
<node name="counterclockwise" value="На 90 градусів проти годинникової стрілки"/>
<node name="180" value="На 180 градусів"/>
<node name="cycle" value="Перемикатися поміж 4 орієнтаціями"/>
</node>
</node>
<node name="Colors" value="Кольори">
<node name="colorFor" value="Колір">
<node name="background" value="фону"/>
<node name="selectionBackground" value="фону помітки"/>
<node name="text" value="звичайного тексту"/>
<node name="internalLink" value="посилання"/>
<node name="externalLink" value="зовнішнього посилання"/>
<node name="highlighted" value="підсвіченого тексту"/>
<node name="treeLines" value="ліній"/>
<node name="indicator" value="індикатора"/>
</node>
</node>
<node name="Keys" value="Клавіші">
<node name="grabSystemKeys" value="Перехоплювати системні клавиші"/>
<node name="separate" value="Свої налаштування для кожної орієнтації тексту"/>
<node name="orientation" value="Орієнтація"/>
<node name="action">
<node name="none" value="Ніяких дій"/>
<node name="showLibrary" value="Показати бібліотеку"/>
<node name="showRecent" value="Показати прочитані книги"/>
<node name="previousBook" value="Відкрити попередню книгу"/>
<node name="toc" value="Показати зміст"/>
<node name="gotoHome" value="Перейти до початку тексту"/>
<node name="gotoSectionStart" value="Перейти до початку розділу"/>
<node name="gotoSectionEnd" value="Перейти до кінця розділу"/>
<node name="nextTOCSection" value="Перейти до наступної глави"/>
<node name="previousTOCSection" value="Перейти до попередньої глави"/>
<node name="largeScrollForward" value="Прокрутити вперед (на більшу відстань)"/>
<node name="largeScrollBackward" value="Прокрутити назад (на більшу відстань)"/>
<node name="smallScrollForward" value="Прокрутити вперед (на невелику відстань)"/>
<node name="smallScrollBackward" value="Прокрутити назад (на невелику відстань)"/>
<node name="undo" value="Скасувати перехід"/>
<node name="redo" value="Повторити перехід"/>
<node name="copyToClipboard" value="Скопіювати позначений текст до буфера"/>
<node name="openInDictionary" value="Відкрити позначений текст у словнику"/>
<node name="clearSelection" value="Зняти позначку"/>
<node name="search" value="Показати діалог пошуку"/>
<node name="findPrevious" value="Шукати назад"/>
<node name="findNext" value="Шукати вперед"/>
<node name="increaseFont" value="Збільшити розмір шрифта"/>
<node name="decreaseFont" value="Зменшити розмір шрифта"/>
<node name="toggleIndicator" value="Показати/сховати індикатор"/>
<node name="toggleFullscreen" value="Ввімкнути/вимкнути повноекранний режим"/>
<node name="onFullscreen" value="Ввімкнути повноекранний режим"/>
<node name="rotate" value="Повернути текст"/>
<node name="preferences" value="Показати діалог налаштувань"/>
<node name="bookInfo" value="Показати інформацію про книгу"/>
<node name="addBook" value="Додати файл до бібліотеки"/>
<node name="cancel" value="Відмінити поточний режим"/>
<node name="quit" value="Вийти з програми"/>
</node>
<node name="quitOnCancel" value="Вийти з програми"/>
<node name="keyDelay" value="Затримка між натисканням на клавіші"/>
</node>
<node name="Config" value="Налаштування">
<node name="autoSave" value="Автоматично зберігати стан"/>
<node name="timeout" value="Час між збереженням, секунди"/>
</node>
<node name="Dictionary" value="Словники">
<node name="enableIntegration" value="Увімкнути інтеграцію з %s"/>
<node name="defaultText" value="Увімкнути інтеграцію зі словником"/>
<node name="choice" value="Використати"/>
<node name="singleClickOpen" value="Відкривати словник по натисканню на слово"/>
</node>
<node name="Web" value="Веб">
<node name="enableIntegration" value="Відкривати зовнішні посилання за допомогою %s"/>
<node name="defaultText" value="Відкривати зовнішні посилання у переглядачі"/>
<node name="choice" value="Переглядач"/>
<node name="command" value="Виконати команду"/>
</node>
<node name="Maemo" value="Maemo">
<node name="keyActionOnRelease" value="Виконувати при вiдпусканнi клавiши, нe при натисненнi"/>
<node name="minStylusPressure" value="Мiнiмальне натискування стiлусом"/>
<node name="maxStylusPressure" value="Максимальне натискування стiлусом"/>
</node>
</node>
</node>
<node name="InfoDialog">
<node name="title" value="FBReader - Інформація про книгу"/>
<node name="tab">
<node name="Common" value="Основна інформація">
<node name="file" value="Файл"/>
<node name="title" value="Назва"/>
<node name="authorDisplayName" value="Ім'я автора"/>
<node name="authorSortKey" value="Ім'я для сортування"/>
<node name="language" value="Мова"/>
<node name="encodingSet" value="Набір кодувань"/>
<node name="encoding" value="Кодування"/>
</node>
<node name="Series" value="Серія">
<node name="seriesTitle" value="Назва серії"/>
<node name="bookNumber" value="Номер книги у серії"/>
</node>
<node name="Tags" value="Tags" toBeTranslated="true">
<node name="tags" value="Tag List" toBeTranslated="true"/>
</node>
<node name="Text" value="Текст">
<node name="breakType" value="Новий параграф по"/>
<node name="ignoreIndent" value="Ігнорувати відступи менше"/>
<node name="buildTOC" value="Побудувати зміст"/>
<node name="emptyLines" value="Порожніх рядків між главами"/>
</node>
<node name="&lt;PRE&gt;" value="&lt;PRE&gt;">
<node name="breakType" value="Новий параграф по"/>
<node name="ignoreIndent" value="Ігнорувати відступи менше"/>
<node name="buildTOC" value="Побудувати зміст"/>
<node name="emptyLines" value="Порожніх рядків між главами"/>
</node>
</node>
</node>
<node name="addFileDialog">
<node name="title" value="FBReader - Додавання книги до бібліотеки"/>
</node>
<node name="textSearchDialog">
<node name="title" value="Пошук по тексту"/>
<node name="text" value=""/>
<node name="ignoreCase" value="Ігнорувати регістр букв"/>
<node name="wholeText" value="По всьому тексту"/>
<node name="backward" value="Назад"/>
<node name="currentSection" value="Тільки у цьому розділі"/>
</node>
<node name="gotoPageDialog">
<node name="title" value="Go To Page" toBeTranslated="true"/>
<node name="pageNumber" value="Go to Page Number" toBeTranslated="true"/>
</node>
<node name="editTagInfoDialog">
<node name="title" value="Edit/Clone Tag" toBeTranslated="true"/>
<node name="editOrClone" value="Action" toBeTranslated="true">
<node name="edit" value="Rename Tag" toBeTranslated="true"/>
<node name="clone" value="Clone Tag" toBeTranslated="true"/>
</node>
<node name="name" value="Tag Name" toBeTranslated="true"/>
<node name="includeSubtags" value="Include Subtags" toBeTranslated="true"/>
</node>
<node name="removeBookBox">
<node name="title" value="Видалення книги"/>
<node name="message" value="Видалити книгу &#10;&quot;%s&quot;&#10; з бібліотеки?"/>
</node>
<node name="removeTagBox">
<node name="title" value="Remove Tag" toBeTranslated="true"/>
<node name="message" value="Remove Tag &#8220;%s&#8221;?" toBeTranslated="true"/>
</node>
<node name="openBookErrorBox">
<node name="title" value="Помилка"/>
<node name="message" value="Не можу відкрити:&#10;%s"/>
</node>
<node name="noHelpBox">
<node name="title" value="Помилка"/>
<node name="message" value="Вибачте, немає файлу з інформацією"/>
</node>
<node name="tagMustBeNonEmpty">
<node name="title" value="Помилка"/>
<node name="message" value="Tag name must be a non-empty string" toBeTranslated="true"/>
</node>
<node name="tagMustNotContainComma">
<node name="title" value="Помилка"/>
<node name="message" value="Tag name must not contain a &#8220;,&#8221; symbol" toBeTranslated="true"/>
</node>
<node name="waitMessage">
<node name="loadingBook" value="Завантаження книги. Зачекайте..."/>
<node name="loadingBookList" value="Завантаження списку книг. Зачекайте..."/>
<node name="migrate" value="Upgrading to the new version. Please, wait..." toBeTranslated="true"/>
</node>
</node>
<node name="style">
<node name="Base" value="тексту типово"/>
<node name="Regular Paragraph" value="звичайного тексту"/>
<node name="Title" value="заголовку"/>
<node name="Section Title" value="назви розділу"/>
<node name="Poem Title" value="назви вірша"/>
<node name="Subtitle" value="підзаголовку"/>
<node name="Annotation" value="анотації"/>
<node name="Epigraph" value="епіграфу"/>
<node name="Stanza" value="строфи"/>
<node name="Verse" value="віршів"/>
<node name="Preformatted text" value="тексту всередині &lt;pre&gt;"/>
<node name="Image" value="малюнку"/>
<node name="Cite" value="цитати"/>
<node name="Author" value="імені автора"/>
<node name="Date" value="дати"/>
<node name="Internal Hyperlink" value="посилання"/>
<node name="Footnote" value="зноски"/>
<node name="Emphasis" value="виділення (emphasis)"/>
<node name="Strong" value="виділення (strong)"/>
<node name="Subscript" value="нижнього індексу"/>
<node name="Superscript" value="верхнього індексу"/>
<node name="Code" value="тексту програми"/>
<node name="StrikeThrough" value="закресленого тексту"/>
<node name="Contents Table" value="змісту"/>
<node name="Author in Library" value="імені автора у бібліотеці"/>
<node name="Book in Library" value="бібліотеки"/>
<node name="Recent Book List" value="списку книг"/>
<node name="Italic" value="курсиву"/>
<node name="Bold" value="жирного тексту"/>
<node name="Definition" value="визначення"/>
<node name="Definition Description" value="тексту визначення"/>
<node name="Header 1" value="тексту всередині &lt;h1&gt;"/>
<node name="Header 2" value="тексту всередині &lt;h2&gt;"/>
<node name="Header 3" value="тексту всередині &lt;h3&gt;"/>
<node name="Header 4" value="тексту всередині &lt;h4&gt;"/>
<node name="Header 5" value="тексту всередині &lt;h5&gt;"/>
<node name="Header 6" value="тексту всередині &lt;h6&gt;"/>
<node name="External Hyperlink" value="зовнішнього посилання"/>
</node>
<node name="external">
<node name="browser" value="переглядачі"/>
<node name="defaultBrowser" value="переглядачі"/>
</node>
<node name="mobipocketPlugin">
<node name="unknown" value="невідома помилка"/>
<node name="unsupportedCompressionMethod" value="метод натискання, що не підтримується"/>
<node name="encriptedFile" value="файл захищений DRM"/>
</node>
<node name="library">
<node name="caption" value="Бібліотека"/>
<node name="allBooks" value="All Books" toBeTranslated="true"/>
<node name="booksWithoutTags" value="Books with no Tags" toBeTranslated="true"/>
<node name="noBooks" value="FBReader found no books in the configured locations. Please specify the path to your books in the Preferences Dialog (&#8220;Library&#8221; tab, &#8220;Book Path&#8221; entry). Alternatively, you can add books to your library using &#8220;Add Book&#8221; button." toBeTranslated="true"/>
</node>
</resources>

View file

@ -1,61 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<node name="dialog">
<node name="button">
<node name="ok" value="&amp;Ok"/>
<node name="cancel" value="&amp;Peruuta"/>
<node name="yes" value="&amp;Kyllä"/>
<node name="no" value="&amp;Ei"/>
<node name="apply" value="&amp;Toteuta"/>
</node>
<node name="waitMessage">
<node name="savingConfig" value="Tallennetaan asetuksia..."/>
</node>
</node>
<node name="color">
<node name="red" value="Punainen"/>
<node name="green" value="Vihreä"/>
<node name="blue" value="Sininen"/>
<node name="black" value="Musta"/>
<node name="white" value="Valkoinen"/>
<node name="maroon" value="Kastanjanruskea"/>
<node name="olive" value="Oliivinvihreä"/>
<node name="navy" value="Tummansininen"/>
<node name="purple" value="Purppura"/>
<node name="teal" value="Sinivihreä"/>
<node name="silver" value="Hopea"/>
<node name="gray" value="Harmaa"/>
<node name="lime" value="Kellanvihreä"/>
<node name="yellow" value="Keltainen"/>
<node name="magenta" value="Magenta"/>
<node name="cyan" value="Syaani"/>
<node name="custom..." value="Valinnainen..."/>
</node>
<node name="language">
<node name="cs" value="Tsekki"/>
<node name="de" value="Saksa"/>
<node name="de-traditional" value="Saksa (perinteinen oikeinkirjoitus)"/>
<node name="en" value="Englanti"/>
<node name="eo" value="Esperanto"/>
<node name="es" value="Espanja"/>
<node name="fi" value="Suomi"/>
<node name="fr" value="Ranska"/>
<node name="id" value="Indonesia"/>
<node name="it" value="Italia"/>
<node name="no" value="Norja"/>
<node name="pt" value="Portugali"/>
<node name="ru" value="Venäjä"/>
<node name="sv" value="Ruotsi"/>
<node name="uk" value="Ukraina"/>
<node name="zh" value="Kiina"/>
<node name="other" value="Muu"/>
</node>
<node name="boolean3">
<node name="on" value="on"/>
<node name="off" value="off"/>
<node name="unchanged" value="ei muutoksia"/>
</node>
<node name="keyOptionView">
<node name="actionFor" value="Toiminta näppäimelle"/>
</node>
</resources>

View file

@ -1,62 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- French zlibrary resources, by Pierre Senellart -->
<resources>
<node name="dialog">
<node name="button">
<node name="ok" value="O&amp;k"/>
<node name="cancel" value="A&amp;nnuler"/>
<node name="yes" value="&amp;Oui"/>
<node name="no" value="&amp;Non"/>
<node name="apply" value="&amp;Appliquer"/>
</node>
<node name="waitMessage">
<node name="savingConfig" value="Enregistrement de la configuration..."/>
</node>
</node>
<node name="color">
<node name="red" value="Rouge"/>
<node name="green" value="Vert"/>
<node name="blue" value="Bleu"/>
<node name="black" value="Noir"/>
<node name="white" value="Blanc"/>
<node name="maroon" value="Marron"/>
<node name="olive" value="Vert olive"/>
<node name="navy" value="Bleu marine"/>
<node name="purple" value="Violet"/>
<node name="teal" value="Bleu canard"/>
<node name="silver" value="Argent"/>
<node name="gray" value="Gris"/>
<node name="lime" value="Vert clair"/>
<node name="yellow" value="Jaune"/>
<node name="magenta" value="Magenta"/>
<node name="cyan" value="Cyan"/>
<node name="custom..." value="Personnalisé..."/>
</node>
<node name="language">
<node name="cs" value="Tchèque"/>
<node name="de" value="Allemand"/>
<node name="de-traditional" value="Allemand (l'orthographie traditionelle)"/>
<node name="en" value="Anglais"/>
<node name="eo" value="Espéranto"/>
<node name="es" value="Espagnol"/>
<node name="fi" value="Finnois"/>
<node name="fr" value="Français"/>
<node name="id" value="Indonesian" toBeTranslated="true"/>
<node name="it" value="Italien"/>
<node name="no" value="Norvégien"/>
<node name="pt" value="Portugais"/>
<node name="ru" value="Russe"/>
<node name="sv" value="Suédois"/>
<node name="uk" value="Ukrainien"/>
<node name="zh" value="Chinois"/>
<node name="other" value="Autre"/>
</node>
<node name="boolean3">
<node name="on" value="activé"/>
<node name="off" value="désactivé"/>
<node name="unchanged" value="unchanged"/>
</node>
<node name="keyOptionView">
<node name="actionFor" value="Action pour la touche"/>
</node>
</resources>

View file

@ -1,61 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<node name="dialog">
<node name="button">
<node name="ok" value="&amp;OK"/>
<node name="cancel" value="&amp;Batal"/>
<node name="yes" value="&amp;Ya"/>
<node name="no" value="&amp;Tidak"/>
<node name="apply" value="&amp;Terapkan"/>
</node>
<node name="waitMessage">
<node name="savingConfig" value="Menyimpan pengaturan..."/>
</node>
</node>
<node name="color">
<node name="red" value="Merah"/>
<node name="green" value="Hijau"/>
<node name="blue" value="Biru"/>
<node name="black" value="Hitam"/>
<node name="white" value="Putih"/>
<node name="maroon" value="Merah Tua"/>
<node name="olive" value="Hijau Kekuningan"/>
<node name="navy" value="Biru Tua"/>
<node name="purple" value="Ungu"/>
<node name="teal" value="Teal"/>
<node name="silver" value="Perak"/>
<node name="gray" value="Abu-abu"/>
<node name="lime" value="Lime"/>
<node name="yellow" value="Kuning"/>
<node name="magenta" value="Merah Keunguan"/>
<node name="cyan" value="Biru Muda"/>
<node name="custom..." value="Kustom..."/>
</node>
<node name="language">
<node name="cs" value="Cekoslowakia"/>
<node name="de" value="Jerman"/>
<node name="de-traditional" value="Jerman (tradisionil)"/>
<node name="en" value="Inggris"/>
<node name="eo" value="Esperanto"/>
<node name="es" value="Spanyol"/>
<node name="fi" value="Finlandia"/>
<node name="fr" value="Perancis"/>
<node name="id" value="Indonesia"/>
<node name="it" value="Italia"/>
<node name="no" value="Norwegia"/>
<node name="pt" value="Portugis"/>
<node name="ru" value="Rusia"/>
<node name="sv" value="Swedia"/>
<node name="uk" value="Ukraina"/>
<node name="zh" value="Cina"/>
<node name="other" value="Lainnya"/>
</node>
<node name="boolean3">
<node name="on" value="Hidup"/>
<node name="off" value="Mati"/>
<node name="unchanged" value="tidak berubah"/>
</node>
<node name="keyOptionView">
<node name="actionFor" value="Aksi Tombol"/>
</node>
</resources>

View file

@ -1,61 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<node name="dialog">
<node name="button">
<node name="ok" value="&amp;Ok"/>
<node name="cancel" value="&amp;Annulla"/>
<node name="yes" value="&amp;S&igrave;"/>
<node name="no" value="&amp;No"/>
<node name="apply" value="&amp;Applica"/>
</node>
<node name="waitMessage">
<node name="savingConfig" value="Salvataggio configurazione..."/>
</node>
</node>
<node name="color">
<node name="red" value="Rosso"/>
<node name="green" value="Verde"/>
<node name="blue" value="Blu"/>
<node name="black" value="Nero"/>
<node name="white" value="Bianco"/>
<node name="maroon" value="Marrone"/>
<node name="olive" value="Oliva"/>
<node name="navy" value="Blu scuro"/>
<node name="purple" value="Viola"/>
<node name="teal" value="Verde-azzurro"/>
<node name="silver" value="Argento"/>
<node name="gray" value="Grigio"/>
<node name="lime" value="Verde-giallo"/>
<node name="yellow" value="Giallo"/>
<node name="magenta" value="Magenta"/>
<node name="cyan" value="Ciano"/>
<node name="custom..." value="Personalizzato..."/>
</node>
<node name="language">
<node name="cs" value="Ceco"/>
<node name="de" value="Tedesco"/>
<node name="de-traditional" value="Tedesco (ortografia tradizionale)"/>
<node name="en" value="Inglese"/>
<node name="eo" value="Esperanto"/>
<node name="es" value="Spagnolo"/>
<node name="fi" value="Finlandese"/>
<node name="fr" value="Francese"/>
<node name="id" value="Indonesian" toBeTranslated="true"/>
<node name="it" value="Italiano"/>
<node name="no" value="Norvegese"/>
<node name="pt" value="Portoghese"/>
<node name="ru" value="Russo"/>
<node name="sv" value="Svedese"/>
<node name="uk" value="Ucraino"/>
<node name="zh" value="Cinese"/>
<node name="other" value="Altra"/>
</node>
<node name="boolean3">
<node name="on" value="on"/>
<node name="off" value="off"/>
<node name="unchanged" value="invariato"/>
</node>
<node name="keyOptionView">
<node name="actionFor" value="Azione del Tasto"/>
</node>
</resources>

View file

@ -1,61 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<node name="dialog">
<node name="button">
<node name="ok" value="&amp;Ok"/>
<node name="cancel" value="&amp;Avbryt"/>
<node name="yes" value="&amp;Ja"/>
<node name="no" value="&amp;Nej"/>
<node name="apply" value="&amp;Verkställ"/>
</node>
<node name="waitMessage">
<node name="savingConfig" value="Sparar konfiguration..."/>
</node>
</node>
<node name="color">
<node name="red" value="Röd"/>
<node name="green" value="Grön"/>
<node name="blue" value="Blå"/>
<node name="black" value="Svart"/>
<node name="white" value="Vit"/>
<node name="maroon" value="Mörk brun"/>
<node name="olive" value="Oliv"/>
<node name="navy" value="Marin"/>
<node name="purple" value="Lila"/>
<node name="teal" value="Teal"/>
<node name="silver" value="Silver"/>
<node name="gray" value="Grå"/>
<node name="lime" value="Lime"/>
<node name="yellow" value="Gul"/>
<node name="magenta" value="Magenta"/>
<node name="cyan" value="Cyan"/>
<node name="custom..." value="Anpassad..."/>
</node>
<node name="language">
<node name="cs" value="Tjeckiska"/>
<node name="de" value="Tyska"/>
<node name="de-traditional" value="Tyska (traditionell ortografi)"/>
<node name="en" value="Engelska"/>
<node name="eo" value="Esperanto"/>
<node name="es" value="Spanska"/>
<node name="fi" value="Finska"/>
<node name="fr" value="Franska"/>
<node name="id" value="Indonesian" toBeTranslated="true"/>
<node name="it" value="Italienska"/>
<node name="no" value="Norska"/>
<node name="pt" value="Portugisiska"/>
<node name="ru" value="Ryska"/>
<node name="sv" value="Svenska"/>
<node name="uk" value="Ukrainska"/>
<node name="zh" value="Kinesiska"/>
<node name="other" value="Annat"/>
</node>
<node name="boolean3">
<node name="on" value="på"/>
<node name="off" value="av"/>
<node name="unchanged" value="oförändrat"/>
</node>
<node name="keyOptionView">
<node name="actionFor" value="Åtgärd för tangent"/>
</node>
</resources>

View file

@ -1,61 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<node name="dialog">
<node name="button">
<node name="ok" value="&amp;Гаразд"/>
<node name="cancel" value="С&amp;касувати"/>
<node name="yes" value="&amp;Так"/>
<node name="no" value="&amp;Ні"/>
<node name="apply" value="Заст&amp;осувати"/>
</node>
<node name="waitMessage">
<node name="savingConfig" value="Збереження налаштувань..."/>
</node>
</node>
<node name="color">
<node name="red" value="Червоний"/>
<node name="green" value="Зелений"/>
<node name="blue" value="Синій"/>
<node name="black" value="Чорний"/>
<node name="white" value="Білий"/>
<node name="maroon" value="Брунатний"/>
<node name="olive" value="Оливковий"/>
<node name="navy" value="Темно-синій"/>
<node name="purple" value="Фіолетовий"/>
<node name="teal" value="Темно-блакитний"/>
<node name="silver" value="Сріблястий"/>
<node name="gray" value="Сірий"/>
<node name="lime" value="Світло-зелений"/>
<node name="yellow" value="Жовтий"/>
<node name="magenta" value="Пурпурний"/>
<node name="cyan" value="Блакитний"/>
<node name="custom..." value="Налаштувати..."/>
</node>
<node name="language">
<node name="cs" value="Чеська"/>
<node name="de" value="Німецька"/>
<node name="de-traditional" value="Німецька (традiцiйна орфографiя)"/>
<node name="en" value="Англійська"/>
<node name="eo" value="Есперанто"/>
<node name="es" value="Іспанська"/>
<node name="fi" value="Фінська"/>
<node name="fr" value="Французька"/>
<node name="id" value="Indonesian" toBeTranslated="true"/>
<node name="it" value="Італійська"/>
<node name="no" value="Норвезька"/>
<node name="pt" value="Португальська"/>
<node name="ru" value="Російська"/>
<node name="sv" value="Шведська"/>
<node name="uk" value="Українська"/>
<node name="zh" value="Китайська"/>
<node name="other" value="Інша"/>
</node>
<node name="boolean3">
<node name="on" value="ввімкнути"/>
<node name="off" value="вимкнути"/>
<node name="unchanged" value="не змінювати"/>
</node>
<node name="keyOptionView">
<node name="actionFor" value="Дія для"/>
</node>
</resources>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.geometerplus.zlibrary.ui.android" android:versionCode="1" android:versionName="0.3.0"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.geometerplus.zlibrary.ui.android" android:versionCode="300" android:versionName="0.3.0">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<application android:name="org.geometerplus.zlibrary.ui.android.library.ZLAndroidApplication" android:icon="@drawable/fbreader" android:label="FBReader"> <application android:name="org.geometerplus.zlibrary.ui.android.library.ZLAndroidApplication" android:icon="@drawable/fbreader" android:label="FBReader">
<activity android:name="org.geometerplus.android.fbreader.FBReader" android:icon="@drawable/fbreader" android:label="FBReader" android:screenOrientation="sensor"> <activity android:name="org.geometerplus.android.fbreader.FBReader" android:icon="@drawable/fbreader" android:label="FBReader" android:screenOrientation="sensor">
@ -8,7 +8,9 @@
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name="org.geometerplus.android.fbreader.BookDownloader" android:theme="@android:style/Theme.Dialog"> <activity android:name="org.geometerplus.android.fbreader.LibraryTabActivity">
</activity>
<activity android:name="org.geometerplus.android.fbreader.BookDownloader" android:theme="@android:style/Theme.Dialog" android:screenOrientation="sensor">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />

View file

@ -5,6 +5,7 @@
<property name="sdk-folder" value="/Users/geometer/android-sdk-mac_x86-1.0_r1" /> <property name="sdk-folder" value="/Users/geometer/android-sdk-mac_x86-1.0_r1" />
<property name="android-tools" value="${sdk-folder}/tools" /> <property name="android-tools" value="${sdk-folder}/tools" />
<property name="project-dir" value="/Users/geometer/src/projects/FBReaderJ" /> <property name="project-dir" value="/Users/geometer/src/projects/FBReaderJ" />
<property name="platform-dir" value="${project-dir}/platform/android" />
<!-- <!--
<property name="sdk-folder" value="/home/grigory/distrib/android_sdk_linux_m3-rc20a" /> <property name="sdk-folder" value="/home/grigory/distrib/android_sdk_linux_m3-rc20a" />
@ -15,12 +16,12 @@
<!-- The intermediates directory --> <!-- The intermediates directory -->
<!-- Eclipse uses "bin" for its own output, so we do the same. --> <!-- Eclipse uses "bin" for its own output, so we do the same. -->
<property name="outdir" value="../../bin" /> <property name="outdir" value="${project-dir}/bin" />
<property name="cachedir" value="../../depcache" /> <property name="cachedir" value="${project-dir}/depcache" />
<!-- Input directories --> <!-- Input directories -->
<property name="resource-dir" value="res" /> <property name="resource-dir" value="${platform-dir}/res" />
<property name="src.path" value="../../src:src" /> <property name="src.path" value="${project-dir}/src:${platform-dir}/src" />
<!-- Output directories --> <!-- Output directories -->
<property name="outdir-classes" value="${outdir}/classes" /> <property name="outdir-classes" value="${outdir}/classes" />
@ -50,7 +51,9 @@
<target name="raw-resources"> <target name="raw-resources">
<echo>Copying raw resources...</echo> <echo>Copying raw resources...</echo>
<exec executable="${project-dir}/platform/android/create_raw_resources.py" /> <exec executable="${platform-dir}/create_raw_resources.py">
<arg value="${project-dir}" />
</exec>
</target> </target>
<!-- Generate the R.java file for this project's resources. --> <!-- Generate the R.java file for this project's resources. -->
@ -60,9 +63,9 @@
<arg value="p" /> <arg value="p" />
<arg value="-m" /> <arg value="-m" />
<arg value="-J" /> <arg value="-J" />
<arg value="src" /> <arg value="${platform-dir}/src" />
<arg value="-M" /> <arg value="-M" />
<arg value="AndroidManifest.xml" /> <arg value="${platform-dir}/AndroidManifest.xml" />
<arg value="-S" /> <arg value="-S" />
<arg value="${resource-dir}" /> <arg value="${resource-dir}" />
<arg value="-I" /> <arg value="-I" />
@ -96,7 +99,7 @@
<arg value="package" /> <arg value="package" />
<arg value="-f" /> <arg value="-f" />
<arg value="-M" /> <arg value="-M" />
<arg value="AndroidManifest.xml" /> <arg value="${platform-dir}/AndroidManifest.xml" />
<arg value="-S" /> <arg value="-S" />
<arg value="${resource-dir}" /> <arg value="${resource-dir}" />
<!-- No assets directory --> <!-- No assets directory -->
@ -125,9 +128,9 @@
<arg value="-f" /> <arg value="-f" />
<arg value="${intermediate-dex}" /> <arg value="${intermediate-dex}" />
<arg value="-rf" /> <arg value="-rf" />
<arg value="src" /> <arg value="${project-dir}/src" />
<arg value="-rf" /> <arg value="-rf" />
<arg value="../../src" /> <arg value="${platform-dir}/src" />
</exec> </exec>
</target> </target>

View file

@ -1,15 +1,14 @@
#!/usr/bin/python #!/usr/bin/python
import os; import os, sys, shutil;
import shutil;
raw_res_dir = "res/raw" project_dir = sys.argv[1]
drawable_res_dir = "res/drawable" platform_dir = project_dir + "/platform/android"
data_dir_common = "../../data" raw_res_dir = platform_dir + "/res/raw"
application_icons_dir_common = "../../icons/application" drawable_res_dir = platform_dir + "/res/drawable"
filetree_icons_dir_android = "icons/filetree" data_dir_common = project_dir + "/data"
booktree_icons_dir_common = "../../icons/booktree" application_icons_dir_common = project_dir + "/icons/application"
data_dir_android = "data" data_dir_android = platform_dir + "/data"
print os.getcwd() print os.getcwd()
@ -35,6 +34,4 @@ clean_res_dir(raw_res_dir)
clean_res_dir(drawable_res_dir) clean_res_dir(drawable_res_dir)
process_data_dir("data__", data_dir_common, raw_res_dir) process_data_dir("data__", data_dir_common, raw_res_dir)
process_data_dir("data__", data_dir_android, raw_res_dir) process_data_dir("data__", data_dir_android, raw_res_dir)
process_data_dir("filetree__", filetree_icons_dir_android, drawable_res_dir, 0)
process_data_dir("icons__booktree__", booktree_icons_dir_common, raw_res_dir)
shutil.copyfile(application_icons_dir_common + "/48x48.png", drawable_res_dir + "/fbreader.png") shutil.copyfile(application_icons_dir_common + "/48x48.png", drawable_res_dir + "/fbreader.png")

View file

@ -4,13 +4,6 @@
<item id="preferences"/> <item id="preferences"/>
<item id="bookInfo"/> <item id="bookInfo"/>
</submenu> </submenu>
<submenu id="library">
<item id="showLibrary"/>
<item id="previousBook"/>
<item id="showRecent"/>
<item id="addBook"/>
<item id="showHelp"/>
</submenu>
<submenu id="navigate"> <submenu id="navigate">
<item id="toc"/> <item id="toc"/>
<item id="gotoHome"/> <item id="gotoHome"/>
@ -21,19 +14,10 @@
<item id="undo"/> <item id="undo"/>
<item id="redo"/> <item id="redo"/>
</submenu> </submenu>
<submenu id="selection"> <item id="showLibrary"/>
<item id="copyToClipboard"/>
<item id="openInDictionary"/>
<item id="clearSelection"/>
</submenu>
<submenu id="search"> <submenu id="search">
<item id="search"/> <item id="search"/>
<item id="findPrevious"/> <item id="findPrevious"/>
<item id="findNext"/> <item id="findNext"/>
</submenu> </submenu>
<submenu id="view">
<item id="rotate"/>
<item id="toggleFullscreen"/>
<item id="toggleIndicator"/>
</submenu>
</menubar> </menubar>

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ListView
android:id="@+id/by_author"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
<ListView
android:id="@+id/by_tag"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
<ListView
android:id="@+id/recent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
<TextView
android:id="@+id/network"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</RelativeLayout>

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:paddingLeft="5dip"
android:orientation="vertical"
>
<TextView
android:id="@+id/library_list_item_top"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dip"
android:layout_alignParentTop="true"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge"
/>
<TextView
android:id="@+id/library_list_item_bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dip"
android:layout_below="@id/library_list_item_top"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceSmall"
/>
</RelativeLayout>

View file

@ -0,0 +1,71 @@
/*
* Copyright (C) 2007-2008 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.android.fbreader;
import android.widget.ListView;
import org.geometerplus.fbreader.description.Author;
import org.geometerplus.fbreader.description.BookDescription;
import org.geometerplus.fbreader.collection.BookCollection;
class AuthorItem implements LibraryListItem {
private final ListView myView;
private final Author myAuthor;
AuthorItem(ListView view, Author author) {
myView = view;
myAuthor = author;
}
public String getTopText() {
return myAuthor.getDisplayName();
}
public String getBottomText() {
StringBuilder builder = new StringBuilder();
int count = 0;
String currentSeries = null;
for (BookDescription description : BookCollection.Instance().booksByAuthor(myAuthor)) {
final String series = description.getSeriesName();
if (series.length() == 0) {
if (count++ > 0) {
builder.append(", ");
}
builder.append(description.getTitle());
currentSeries = null;
} else if (!series.equals(currentSeries)) {
if (count++ > 0) {
builder.append(", ");
}
builder.append(series);
currentSeries = series;
}
if (count == 5) {
break;
}
}
return builder.toString();
}
public void run() {
LibraryTabUtil.setBookList(myView, myAuthor, null);
myView.invalidate();
}
}

View file

@ -34,47 +34,102 @@ import android.net.Uri;
import android.content.Intent; import android.content.Intent;
import org.geometerplus.zlibrary.core.dialogs.ZLDialogManager; import org.geometerplus.zlibrary.core.dialogs.ZLDialogManager;
//import org.geometerplus.zlibrary.ui.android.dialogs.ZLAndroidDialogManager;
import org.geometerplus.zlibrary.ui.android.R; import org.geometerplus.zlibrary.ui.android.R;
public class BookDownloader extends Activity { public class BookDownloader extends Activity {
private ProgressBar myProgressBar; private static ProgressBar ourProgressBar;
private static int ourFileLength = -1;
private static int ourDownloadedPart = 0;
private static String ourFileName = "";
public void onCreate(Bundle icicle) { public void onCreate(Bundle icicle) {
super.onCreate(icicle); super.onCreate(icicle);
final Intent intent = getIntent(); //((ZLAndroidDialogManager)ZLDialogManager.getInstance()).setActivity(this);
final Uri uri = intent.getData();
if (uri == null) {
finish();
return;
}
final List<String> path = uri.getPathSegments();
final String fileName = path.get(path.size() - 1);
if (!fileName.endsWith(".fb2.zip") && !fileName.endsWith(".fb2") && !fileName.endsWith(".epub")) {
startNextMatchingActivity(intent);
finish();
return;
}
requestWindowFeature(Window.FEATURE_NO_TITLE); requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.downloader); setContentView(R.layout.downloader);
myProgressBar = (ProgressBar)findViewById(android.R.id.progress); ourProgressBar = (ProgressBar)findViewById(android.R.id.progress);
myProgressBar.setIndeterminate(true);
final TextView text = (TextView)findViewById(R.id.downloadertext); final Intent intent = getIntent();
text.setText(ZLDialogManager.getWaitMessageText("downloadingFile").replace("%s", fileName)); final Uri uri = intent.getData();
intent.setData(null); if (uri != null) {
startFileDownload(uri); intent.setData(null);
final List<String> path = uri.getPathSegments();
ourFileName = path.get(path.size() - 1);
if (!ourFileName.endsWith(".fb2.zip") &&
!ourFileName.endsWith(".fb2") &&
!ourFileName.endsWith(".epub")) {
startNextMatchingActivity(intent);
finish();
return;
}
String host = uri.getHost();
if (host.equals("www.feedbooks.com")) {
host = "feedbooks.com";
}
String dir = "/sdcard/Books/" + host;
for (int i = 0; i < path.size() - 1; ++i) {
dir += '/' + path.get(i);
}
final File dirFile = new File(dir);
dirFile.mkdirs();
if (!dirFile.isDirectory()) {
// TODO: error message
finish();
return;
}
final File fileFile = new File(dirFile, ourFileName);
if (fileFile.exists()) {
if (!fileFile.isFile()) {
// TODO: error message
finish();
return;
}
// TODO: question box: redownload?
/*
ZLDialogManager.getInstance().showQuestionBox(
"redownloadBox", "Redownload?",
"no", null,
"yes", null,
null, null
);
*/
runFBReader(fileFile);
return;
}
startFileDownload(uri.toString(), fileFile);
}
if (ourFileLength <= 0) {
ourProgressBar.setIndeterminate(true);
} else {
ourProgressBar.setIndeterminate(false);
ourProgressBar.setMax(ourFileLength);
ourProgressBar.setProgress(ourDownloadedPart);
}
final TextView textView = (TextView)findViewById(R.id.downloadertext);
textView.setText(ZLDialogManager.getWaitMessageText("downloadingFile").replace("%s", ourFileName));
} }
private void startFileDownload(final Uri uri) { private void runFBReader(final File file) {
final String uriString = uri.toString(); finish();
final List<String> path = uri.getPathSegments(); final Intent intent = new Intent(this, FBReader.class);
intent.setData(Uri.fromFile(file));
startActivity(intent);
}
private void startFileDownload(final String uriString, final File file) {
final Handler handler = new Handler() { final Handler handler = new Handler() {
public void handleMessage(Message message) { public void handleMessage(Message message) {
try { try {
finish(); runFBReader(file);
} catch (Exception e) { } catch (Exception e) {
} }
} }
@ -84,17 +139,18 @@ public class BookDownloader extends Activity {
try { try {
final URL url = new URL(uriString); final URL url = new URL(uriString);
final URLConnection connection = url.openConnection(); final URLConnection connection = url.openConnection();
final int length = connection.getContentLength(); ourFileLength = connection.getContentLength();
if (length > 0) { if (ourFileLength > 0) {
myProgressBar.setIndeterminate(false); ourProgressBar.setIndeterminate(false);
myProgressBar.setMax(length); ourProgressBar.setMax(ourFileLength);
myProgressBar.setProgress(0); ourProgressBar.setProgress(0);
ourDownloadedPart = 0;
} }
final HttpURLConnection httpConnection = (HttpURLConnection)connection; final HttpURLConnection httpConnection = (HttpURLConnection)connection;
final int response = httpConnection.getResponseCode(); final int response = httpConnection.getResponseCode();
if (response == HttpURLConnection.HTTP_OK) { if (response == HttpURLConnection.HTTP_OK) {
InputStream inStream = httpConnection.getInputStream(); InputStream inStream = httpConnection.getInputStream();
OutputStream outStream = new FileOutputStream("/sdcard/Books/xxx1.epub"); OutputStream outStream = new FileOutputStream(file);
final byte[] buffer = new byte[8192]; final byte[] buffer = new byte[8192];
int fullSize = 0; int fullSize = 0;
while (true) { while (true) {
@ -102,16 +158,20 @@ public class BookDownloader extends Activity {
if (size <= 0) { if (size <= 0) {
break; break;
} }
myProgressBar.incrementProgressBy(size); ourDownloadedPart += size;
ourProgressBar.setProgress(ourDownloadedPart);
outStream.write(buffer, 0, size); outStream.write(buffer, 0, size);
} }
inStream.close(); inStream.close();
outStream.close(); outStream.close();
} }
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
// TODO: error message; remove file, don't start FBReader
} catch (IOException e) { } catch (IOException e) {
// TODO: error message; remove file, don't start FBReader
} }
handler.sendEmptyMessage(0); handler.sendEmptyMessage(0);
ourFileLength = -1;
} }
}).start(); }).start();
} }

View file

@ -17,30 +17,30 @@
* 02110-1301, USA. * 02110-1301, USA.
*/ */
package org.geometerplus.fbreader.fbreader; package org.geometerplus.android.fbreader;
import java.util.ArrayList;
import org.geometerplus.fbreader.description.BookDescription; import org.geometerplus.fbreader.description.BookDescription;
import org.geometerplus.fbreader.fbreader.FBReader;
class OpenPreviousBookAction extends FBAction { class BookItem implements LibraryListItem {
OpenPreviousBookAction(FBReader fbreader) { private final BookDescription myBook;
super(fbreader);
BookItem(BookDescription book) {
myBook = book;
} }
public boolean isVisible() { public String getTopText() {
switch (Reader.getMode()) { return myBook.getTitle();
case FBReader.ViewMode.BOOK_TEXT: }
case FBReader.ViewMode.CONTENTS:
return Reader.RecentBooksView.lastBooks().books().size() > 1; public String getBottomText() {
default: return "";
return false;
}
} }
public void run() { public void run() {
final ArrayList books = Reader.RecentBooksView.lastBooks().books(); if (LibraryTabActivity.ourActivity != null) {
Reader.openBook((BookDescription)books.get(1)); LibraryTabActivity.ourActivity.finish();
Reader.refreshWindow(); ((FBReader)FBReader.Instance()).openBook(myBook);
}
} }
} }

View file

@ -24,7 +24,8 @@ import org.geometerplus.zlibrary.core.application.ZLApplication;
import org.geometerplus.zlibrary.ui.android.library.ZLAndroidActivity; import org.geometerplus.zlibrary.ui.android.library.ZLAndroidActivity;
public class FBReader extends ZLAndroidActivity { public class FBReader extends ZLAndroidActivity {
protected ZLApplication createApplication() { protected ZLApplication createApplication(String fileName) {
return new org.geometerplus.fbreader.fbreader.FBReader(); String[] args = (fileName != null) ? new String[] { fileName } : new String[0];
return new org.geometerplus.fbreader.fbreader.FBReader(args);
} }
} }

View file

@ -0,0 +1,109 @@
/*
* Copyright (C) 2007-2008 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.android.fbreader;
import java.util.ArrayList;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.view.LayoutInflater;
import android.view.KeyEvent;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.ListView;
import android.widget.TextView;
import org.geometerplus.zlibrary.ui.android.R;
final class LibraryListAdapter extends BaseAdapter implements AdapterView.OnItemClickListener, View.OnKeyListener {
private final Context myContext;
private final ArrayList<LibraryListItem> myItems = new ArrayList<LibraryListItem>();
private final Runnable myCancelAction;
LibraryListAdapter(Context context, Runnable cancelAction) {
myContext = context;
myCancelAction = cancelAction;
}
LibraryListAdapter(Context context) {
this(context, null);
}
void addItem(LibraryListItem item) {
myItems.add(item);
}
public int getCount() {
return myItems.size();
}
public boolean areAllItemsEnabled() {
return true;
}
public boolean isEnabled(int position) {
return true;
}
public LibraryListItem getItem(final int position) {
return myItems.get(position);
}
public long getItemId(int position) {
return position;
}
public View getView(int position, View convertView, ViewGroup parent) {
final View view = (convertView != null) ? convertView :
LayoutInflater.from(myContext).inflate(R.layout.library_list_item, parent, false);
final LibraryListItem item = getItem(position);
((TextView)view.findViewById(R.id.library_list_item_top)).setText(item.getTopText());
((TextView)view.findViewById(R.id.library_list_item_bottom)).setText(item.getBottomText());
return view;
}
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
android.util.Log.w("onItemClick", "position " + position + " id " + id);
getItem(position).run();
}
public boolean onKey(View view, int keyCode, KeyEvent keyEvent) {
switch (keyEvent.getAction()) {
case KeyEvent.ACTION_UP:
switch (keyCode) {
case KeyEvent.KEYCODE_DPAD_CENTER:
case KeyEvent.KEYCODE_ENTER:
((LibraryListItem)((ListView)view).getSelectedItem()).run();
return true;
case KeyEvent.KEYCODE_BACK:
return true;
}
break;
case KeyEvent.ACTION_DOWN:
if ((keyCode == KeyEvent.KEYCODE_BACK) && (myCancelAction != null)) {
myCancelAction.run();
return true;
}
break;
}
return false;
}
}

View file

@ -17,12 +17,10 @@
* 02110-1301, USA. * 02110-1301, USA.
*/ */
package org.geometerplus.zlibrary.core.dialogs; package org.geometerplus.android.fbreader;
public abstract class ZLTreeOpenHandler extends ZLTreeHandler { interface LibraryListItem {
public boolean isOpenHandler() { String getTopText();
return true; String getBottomText();
} void run();
protected abstract boolean accept(ZLTreeNode node);
} }

View file

@ -0,0 +1,66 @@
/*
* Copyright (C) 2007-2008 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.android.fbreader;
import android.app.TabActivity;
import android.os.Bundle;
import android.view.Window;
import android.view.LayoutInflater;
import android.widget.TabHost;
import android.widget.ListView;
import org.geometerplus.zlibrary.ui.android.R;
import org.geometerplus.fbreader.description.Author;
import org.geometerplus.fbreader.description.BookDescription;
import org.geometerplus.fbreader.collection.BookCollection;
public class LibraryTabActivity extends TabActivity {
static LibraryTabActivity ourActivity;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
requestWindowFeature(Window.FEATURE_NO_TITLE);
final TabHost host = getTabHost();
LayoutInflater.from(this).inflate(R.layout.library, host.getTabContentView(), true);
host.addTab(host.newTabSpec("By Author").setIndicator("By Author").setContent(R.id.by_author));
host.addTab(host.newTabSpec("By Tag").setIndicator("By Tag").setContent(R.id.by_tag));
host.addTab(host.newTabSpec("Recent").setIndicator("Recent").setContent(R.id.recent));
//host.addTab(host.newTabSpec("Network").setIndicator("Network").setContent(R.id.network));
LibraryTabUtil.setAuthorList((ListView)findViewById(R.id.by_author), null);
LibraryTabUtil.setTagList((ListView)findViewById(R.id.by_tag), "");
LibraryTabUtil.setRecentBooksList((ListView)findViewById(R.id.recent));
}
@Override
public void onResume() {
super.onResume();
ourActivity = this;
}
@Override
public void onPause() {
ourActivity = null;
super.onPause();
}
}

View file

@ -0,0 +1,155 @@
/*
* Copyright (C) 2007-2008 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.android.fbreader;
import android.widget.ListView;
import org.geometerplus.fbreader.description.Author;
import org.geometerplus.fbreader.description.BookDescription;
import org.geometerplus.fbreader.collection.BookCollection;
import org.geometerplus.fbreader.collection.RecentBooks;
class LibraryTabUtil {
static void setAuthorList(ListView view, Author selectedAuthor) {
final LibraryListAdapter adapter = new LibraryListAdapter(view.getContext());
int selectedIndex = -1;
int count = 0;
for (final Author author : BookCollection.Instance().authors()) {
adapter.addItem(new AuthorItem(view, author));
if (author.equals(selectedAuthor)) {
selectedIndex = count;
}
++count;
}
setAdapter(view, adapter);
if (selectedIndex >= 0) {
view.setSelection(selectedIndex);
}
}
static void setTagList(ListView view, String selectedTag) {
final LibraryListAdapter adapter = new LibraryListAdapter(view.getContext());
int selectedIndex = -1;
int count = 0;
if (!BookCollection.Instance().booksByTag(null).isEmpty()) {
adapter.addItem(new TagItem(view, null));
if (selectedTag == null) {
selectedIndex = count;
}
++count;
}
for (final String tag : BookCollection.Instance().tags()) {
adapter.addItem(new TagItem(view, tag));
if (tag.equals(selectedTag)) {
selectedIndex = count;
}
++count;
}
setAdapter(view, adapter);
if (selectedIndex >= 0) {
view.setSelection(selectedIndex);
}
}
static void setBookList(final ListView view, final Author author, String selectedSeries) {
LibraryListAdapter adapter =
new LibraryListAdapter(
view.getContext(),
new Runnable() {
public void run() {
setAuthorList(view, author);
}
}
);
SeriesItem seriesItem = null;
int selectedIndex = -1;
int count = 0;
for (BookDescription book : BookCollection.Instance().booksByAuthor(author)) {
String series = book.getSeriesName();
if (series.length() == 0) {
seriesItem = null;
adapter.addItem(new BookItem(book));
++count;
} else {
if ((seriesItem == null) || !series.equals(seriesItem.getTopText())) {
if (series.equals(selectedSeries)) {
selectedIndex = count;
}
seriesItem = new SeriesItem(view, author, series);
adapter.addItem(seriesItem);
++count;
}
seriesItem.addBook(book);
}
}
setAdapter(view, adapter);
if (selectedIndex >= 0) {
view.setSelection(selectedIndex);
}
}
static void setBookList(final ListView view, final String tag) {
LibraryListAdapter adapter =
new LibraryListAdapter(
view.getContext(),
new Runnable() {
public void run() {
setTagList(view, tag);
}
}
);
for (BookDescription book : BookCollection.Instance().booksByTag(tag)) {
adapter.addItem(new BookItem(book));
}
setAdapter(view, adapter);
}
static void setRecentBooksList(final ListView view) {
LibraryListAdapter adapter = new LibraryListAdapter(view.getContext());
for (BookDescription book : RecentBooks.Instance().books()) {
adapter.addItem(new BookItem(book));
}
setAdapter(view, adapter);
}
static void setSeriesBookList(final ListView view, final Author author, final String series) {
LibraryListAdapter adapter =
new LibraryListAdapter(
view.getContext(),
new Runnable() {
public void run() {
setBookList(view, author, series);
}
}
);
for (BookDescription book : BookCollection.Instance().booksByAuthor(author)) {
if (series.equals(book.getSeriesName())) {
adapter.addItem(new BookItem(book));
}
}
setAdapter(view, adapter);
}
private static void setAdapter(ListView view, LibraryListAdapter adapter) {
view.setAdapter(adapter);
view.setOnKeyListener(adapter);
view.setOnItemClickListener(adapter);
}
}

View file

@ -0,0 +1,59 @@
/*
* Copyright (C) 2007-2008 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.android.fbreader;
import android.widget.ListView;
import org.geometerplus.fbreader.description.Author;
import org.geometerplus.fbreader.description.BookDescription;
import org.geometerplus.fbreader.fbreader.FBReader;
class SeriesItem implements LibraryListItem {
private final ListView myView;
private final Author myAuthor;
private final String mySeries;
private String myBookList = "";
SeriesItem(ListView view, Author author, String series) {
myView = view;
myAuthor = author;
mySeries = series;
}
void addBook(BookDescription book) {
if (myBookList.length() > 0) {
myBookList += ", ";
}
myBookList += book.getTitle();
}
public String getTopText() {
return mySeries;
}
public String getBottomText() {
return myBookList;
}
public void run() {
LibraryTabUtil.setSeriesBookList(myView, myAuthor, mySeries);
myView.invalidate();
}
}

View file

@ -1,69 +0,0 @@
/*
* Copyright (C) 2007-2008 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.zlibrary.ui.android.dialogs;
import java.util.HashMap;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.widget.*;
import org.geometerplus.zlibrary.core.dialogs.ZLTreeNode;
import org.geometerplus.zlibrary.ui.android.R;
class ItemView extends LinearLayout {
static private final HashMap ourIconMap = new HashMap();
private final ZLTreeNode myNode;
ItemView(Context context, ZLTreeNode node) {
super(context);
myNode = node;
final ImageView imageView = new ImageView(context);
final String iconName = node.PixmapName;
Drawable icon = (Drawable)ourIconMap.get(iconName);
if (icon == null) {
try {
int resourceId = R.drawable.class.getField("filetree__" + iconName).getInt(null);
icon = context.getResources().getDrawable(resourceId);
} catch (NoSuchFieldException e) {
} catch (IllegalAccessException e) {
}
}
if (icon != null) {
imageView.setImageDrawable(icon);
}
imageView.setPadding(5, 16, 10, 13);
addView(imageView, new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
final TextView textView = new TextView(context);
textView.setPadding(0, 17, 0, 0);
textView.setTextSize(20);
textView.setText(node.DisplayName);
addView(textView, new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
}
ZLTreeNode getNode() {
return myNode;
}
}

View file

@ -51,8 +51,8 @@ public class ZLAndroidDialogManager extends ZLDialogManager {
activity.startActivity(intent); activity.startActivity(intent);
} }
public void runSelectionDialog(String key, ZLTreeHandler handler, Runnable actionOnAccept) { public void runActivity(Class activityClass) {
runDialog(myActivity, new ZLAndroidSelectionDialog(myActivity, getDialogTitle(key), handler, actionOnAccept)); myActivity.startActivity(new Intent(myActivity, activityClass));
} }
public void showInformationBox(String key, String message) { public void showInformationBox(String key, String message) {

View file

@ -1,134 +0,0 @@
/*
* Copyright (C) 2007-2008 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.zlibrary.ui.android.dialogs;
import android.content.Context;
import android.app.Activity;
import android.os.*;
import android.view.*;
import android.widget.*;
import org.geometerplus.zlibrary.core.dialogs.ZLSelectionDialog;
import org.geometerplus.zlibrary.core.dialogs.ZLTreeHandler;
import org.geometerplus.zlibrary.core.dialogs.ZLTreeNode;
class ZLAndroidSelectionDialog extends ZLSelectionDialog implements ZLAndroidDialogInterface {
private final String myCaption;
private boolean myReturnValue = false;
private final Runnable myActionOnAccept;
private final Context myContext;
private SelectionView mySelectionView;
protected ZLAndroidSelectionDialog(Context context, String caption, ZLTreeHandler handler, Runnable actionOnAccept) {
super(handler);
myCaption = caption;
myActionOnAccept = actionOnAccept;
myContext = context;
}
public void setActivity(DialogActivity activity) {
mySelectionView = new SelectionView(activity);
activity.setContentView(mySelectionView);
invalidateAll();
update();
}
public void endActivity() {
}
protected void runNode(ZLTreeNode node) {
if (node != null) {
myReturnValue = !node.IsFolder;
super.runNode(node);
}
}
protected void exitDialog() {
((Activity)mySelectionView.getContext()).finish();
if (myReturnValue) {
new Handler().post(myActionOnAccept);
}
}
protected void selectItem(int index) {
mySelectionView.setSelection(index);
}
protected void updateList() {
mySelectionView.setAdapter(new SelectionViewAdapter());
mySelectionView.invalidate();
}
protected void updateStateLine() {
((Activity)mySelectionView.getContext()).setTitle(myCaption + handler().stateDisplayName());
}
private class SelectionView extends ListView implements AdapterView.OnItemClickListener {
public SelectionView(Context context) {
super(context);
setFocusable(true);
setOnItemClickListener(this);
}
public boolean onKeyUp(int keyCode, KeyEvent event) {
switch (keyCode) {
case KeyEvent.KEYCODE_DPAD_CENTER:
case KeyEvent.KEYCODE_ENTER:
final ItemView view = (ItemView)getSelectedView();
if (view != null) {
runNode(view.getNode());
}
return false;
default:
return super.onKeyUp(keyCode, event);
}
}
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
runNode((ZLTreeNode)getAdapter().getItem(position));
}
}
private class SelectionViewAdapter extends BaseAdapter {
public View getView(int position, View convertView, ViewGroup parent) {
return new ItemView(parent.getContext(), (ZLTreeNode)getItem(position));
}
public boolean areAllItemsSelectable() {
return false;
}
public boolean isSelectable(int position) {
return true;
}
public int getCount() {
return handler().subnodes().size();
}
public Object getItem(int position) {
return handler().subnodes().get(position);
}
public long getItemId(int position) {
return position;
}
}
}

View file

@ -19,8 +19,10 @@
package org.geometerplus.zlibrary.ui.android.library; package org.geometerplus.zlibrary.ui.android.library;
import android.net.Uri;
import android.app.Activity; import android.app.Activity;
import android.os.Bundle; import android.os.Bundle;
import android.content.Intent;
import android.view.*; import android.view.*;
import org.geometerplus.zlibrary.core.application.ZLApplication; import org.geometerplus.zlibrary.core.application.ZLApplication;
@ -30,17 +32,25 @@ import org.geometerplus.zlibrary.ui.android.R;
import org.geometerplus.zlibrary.ui.android.application.ZLAndroidApplicationWindow; import org.geometerplus.zlibrary.ui.android.application.ZLAndroidApplicationWindow;
public abstract class ZLAndroidActivity extends Activity { public abstract class ZLAndroidActivity extends Activity {
protected abstract ZLApplication createApplication(); protected abstract ZLApplication createApplication(String fileName);
public void onCreate(Bundle icicle) { public void onCreate(Bundle icicle) {
super.onCreate(icicle); super.onCreate(icicle);
requestWindowFeature(Window.FEATURE_NO_TITLE); requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.main); setContentView(R.layout.main);
getLibrary().setActivity(this); getLibrary().setActivity(this);
final Intent intent = getIntent();
final Uri uri = intent.getData();
final String fileToOpen = (uri != null) ? uri.getPath() : null;
intent.setData(null);
if (((ZLAndroidApplication)getApplication()).myMainWindow == null) { if (((ZLAndroidApplication)getApplication()).myMainWindow == null) {
ZLApplication application = createApplication(); ZLApplication application = createApplication(fileToOpen);
((ZLAndroidApplication)getApplication()).myMainWindow = new ZLAndroidApplicationWindow(application); ((ZLAndroidApplication)getApplication()).myMainWindow = new ZLAndroidApplicationWindow(application);
application.initWindow(); application.initWindow();
} else if (fileToOpen != null) {
ZLApplication.Instance().openFile(fileToOpen);
} }
ZLApplication.Instance().refreshWindow(); ZLApplication.Instance().refreshWindow();
} }

View file

@ -3,7 +3,7 @@ package org.amse.ys.zip;
import java.io.*; import java.io.*;
public abstract class Decompressor { public abstract class Decompressor {
public Decompressor(MyBufferedReader is, LocalFileHeader header) { public Decompressor(MyBufferedInputStream is, LocalFileHeader header) {
} }
@ -14,20 +14,20 @@ public abstract class Decompressor {
} }
public static Decompressor init(MyBufferedReader is, LocalFileHeader header) public static Decompressor init(MyBufferedInputStream is, LocalFileHeader header)
throws WrongZipFormatException { throws WrongZipFormatException {
switch (header.CompressionMethod) { switch (header.CompressionMethod) {
case 0: case 0:
return new NoCompression(is, header); return new NoCompressionDecompressor(is, header);
case 8: case 8:
return new Deflating(is, header); return new DeflatingDecompressor(is, header);
default: default:
throw new WrongZipFormatException( throw new WrongZipFormatException(
"Unsupported method of compression"); "Unsupported method of compression");
} }
} }
public int available() { public int available() {
return -1; return -1;
} }
} }

View file

@ -2,7 +2,7 @@ package org.amse.ys.zip;
import java.io.*; import java.io.*;
public class Deflating extends Decompressor { public class DeflatingDecompressor extends Decompressor {
private static final int ST_HEADER = 1; private static final int ST_HEADER = 1;
private static final int ST_NO_COMPRESSION = 2; private static final int ST_NO_COMPRESSION = 2;
private static final int ST_FIXED_CODES = 3; private static final int ST_FIXED_CODES = 3;
@ -11,7 +11,7 @@ public class Deflating extends Decompressor {
// common variables // common variables
private final LocalFileHeader myHeader; private final LocalFileHeader myHeader;
private final MyBufferedReader myStream; private final MyBufferedInputStream myStream;
private int myState; private int myState;
private int myTotalLength; private int myTotalLength;
private int myBytesRead; private int myBytesRead;
@ -75,7 +75,7 @@ public class Deflating extends Decompressor {
return result; return result;
} }
public Deflating(MyBufferedReader is, LocalFileHeader header) { public DeflatingDecompressor(MyBufferedInputStream is, LocalFileHeader header) {
super(); super();
myHeader = header; myHeader = header;
myStream = is; myStream = is;
@ -89,31 +89,31 @@ public class Deflating extends Decompressor {
private static final int MAX_LEN = CircularBuffer.DICTIONARY_LENGTH / 2; private static final int MAX_LEN = CircularBuffer.DICTIONARY_LENGTH / 2;
public int read(byte b[], int off, int len) throws IOException, WrongZipFormatException { public int read(byte b[], int off, int len) throws IOException, WrongZipFormatException {
int i = 0; int i = 0;
int available = myOutputBuffer.available(); int available = myOutputBuffer.available();
while (i < len) { while (i < len) {
int toRead = Math.min(MAX_LEN, len - i); int toRead = Math.min(MAX_LEN, len - i);
while (available < toRead) { while (available < toRead) {
if (myState == ST_END_OF_FILE) { if (myState == ST_END_OF_FILE) {
break; break;
} }
if (myState == ST_HEADER) { if (myState == ST_HEADER) {
readHeader(); readHeader();
} }
available += pushNextSymbolToDictionary(); available += pushNextSymbolToDictionary();
} }
if (available == 0) { if (available == 0) {
break; break;
} }
if (toRead > available) { if (toRead > available) {
toRead = available; toRead = available;
} }
myOutputBuffer.read(b, off + i, toRead); myOutputBuffer.read(b, off + i, toRead);
i += toRead; i += toRead;
available -= toRead; available -= toRead;
} }
myCurrentPosition += i; myCurrentPosition += i;
return (i > 0) ? i : -1; return (i > 0) ? i : -1;
} }
public int read() throws IOException, WrongZipFormatException { public int read() throws IOException, WrongZipFormatException {
@ -142,17 +142,17 @@ public class Deflating extends Decompressor {
myState = ST_HEADER; myState = ST_HEADER;
} }
} }
return 1; return 1;
} else { } else {
int currentHuffmanCode = readHuffmanCode(myHuffmanCodes); int currentHuffmanCode = readHuffmanCode(myHuffmanCodes);
int length; int length;
switch (currentHuffmanCode) { switch (currentHuffmanCode) {
default: default:
myOutputBuffer.writeByte((byte)currentHuffmanCode); myOutputBuffer.writeByte((byte)currentHuffmanCode);
return 1; return 1;
case 256: case 256:
myState = myTheBlockIsFinal ? ST_END_OF_FILE : ST_HEADER; myState = myTheBlockIsFinal ? ST_END_OF_FILE : ST_HEADER;
return 0; return 0;
case 257: case 257:
case 258: case 258:
case 259: case 259:
@ -215,13 +215,13 @@ public class Deflating extends Decompressor {
throw new RuntimeException("distance code > 29 found"); throw new RuntimeException("distance code > 29 found");
} }
myOutputBuffer.repeat(length, distance); myOutputBuffer.repeat(length, distance);
return length; return length;
} }
} }
private int readHuffmanCode(int[] table) throws IOException { private int readHuffmanCode(int[] table) throws IOException {
int bitsInBuffer = myBitsInBuffer; int bitsInBuffer = myBitsInBuffer;
int buffer = myTempInt; int buffer = myTempInt;
while (bitsInBuffer <= 16) { while (bitsInBuffer <= 16) {
buffer += myStream.read() << bitsInBuffer; buffer += myStream.read() << bitsInBuffer;
@ -233,7 +233,7 @@ public class Deflating extends Decompressor {
final int len = tmp >> 16; final int len = tmp >> 16;
myTempInt = buffer >>> len; myTempInt = buffer >>> len;
myBitsInBuffer = bitsInBuffer - len; myBitsInBuffer = bitsInBuffer - len;
return tmp & 0x0FFFF; return tmp & 0x0FFFF;
} }

View file

@ -5,66 +5,66 @@ package org.amse.ys.zip;
* construcor, all fields are final. * construcor, all fields are final.
*/ */
class LocalFileHeader { public class LocalFileHeader {
/** /**
* Initilization of constants. Implements: versions, ... * Initilization of constants. Implements: versions, ...
*/ */
public static final int FILE_HEADER_SIGNATURE = 0x04034b50; static final int FILE_HEADER_SIGNATURE = 0x04034b50;
public static final int FOLDER_HEADER_SIGNATURE = 0x02014b50; static final int FOLDER_HEADER_SIGNATURE = 0x02014b50;
public static final int DATA_DESCRIPTOR_SIGNATURE = 0x504b0708; static final int DATA_DESCRIPTOR_SIGNATURE = 0x504b0708;
public final int VersionNeededToExtract; final int VersionNeededToExtract;
public final int GeneralPurposeFlag; final int GeneralPurposeFlag;
public final int CompressionMethod; final int CompressionMethod;
private int myCompressedSize; // not final! private int myCompressedSize; // not final!
private int myUncompressedSize; // not final! private int myUncompressedSize; // not final!
public final int OffsetOfLocalData; final int OffsetOfLocalData;
public final String FileName; public final String FileName;
private boolean mySizeIsKnown; private boolean mySizeIsKnown;
LocalFileHeader(int versionNeededToExtract, int generalPurposeFlag, LocalFileHeader(int versionNeededToExtract, int generalPurposeFlag,
int compressionMethod, int compressedSize, int uncompressedSize, int compressionMethod, int compressedSize, int uncompressedSize,
int offsetOfLocalData, String fileName) { int offsetOfLocalData, String fileName) {
VersionNeededToExtract = versionNeededToExtract; VersionNeededToExtract = versionNeededToExtract;
GeneralPurposeFlag = generalPurposeFlag; GeneralPurposeFlag = generalPurposeFlag;
CompressionMethod = compressionMethod; CompressionMethod = compressionMethod;
myCompressedSize = compressedSize; myCompressedSize = compressedSize;
myUncompressedSize = uncompressedSize; myUncompressedSize = uncompressedSize;
OffsetOfLocalData = offsetOfLocalData; OffsetOfLocalData = offsetOfLocalData;
FileName = fileName; FileName = fileName;
mySizeIsKnown = ((GeneralPurposeFlag & 8) == 0); mySizeIsKnown = ((GeneralPurposeFlag & 8) == 0);
} }
public boolean sizeIsKnown() { boolean sizeIsKnown() {
return mySizeIsKnown; return mySizeIsKnown;
} }
public int getCompressedSize() { int getCompressedSize() {
if (mySizeIsKnown) { if (mySizeIsKnown) {
return myCompressedSize; return myCompressedSize;
} else { } else {
throw new RuntimeException( throw new RuntimeException(
"Error in getCompressedSize: file size is not known yet"); "Error in getCompressedSize: file size is not known yet");
} }
} }
public int getUncompressedSize() { int getUncompressedSize() {
if (mySizeIsKnown) { if (mySizeIsKnown) {
return myUncompressedSize; return myUncompressedSize;
} else { } else {
throw new RuntimeException( throw new RuntimeException(
"Error in getUncompressedSize: file size is not known yet"); "Error in getUncompressedSize: file size is not known yet");
} }
} }
public void setSizes(int compressedSize, int uncompressedSize) { void setSizes(int compressedSize, int uncompressedSize) {
if (mySizeIsKnown) { if (mySizeIsKnown) {
throw new RuntimeException( throw new RuntimeException(
"Was attempt to change file sizes with use of setSizes"); "Was attempt to change file sizes with use of setSizes");
} }
myCompressedSize = compressedSize; myCompressedSize = compressedSize;
myUncompressedSize = uncompressedSize; myUncompressedSize = uncompressedSize;
mySizeIsKnown = true; mySizeIsKnown = true;
} }
} }

View file

@ -0,0 +1,117 @@
package org.amse.ys.zip;
import java.io.*;
final class MyBufferedInputStream extends InputStream {
private FileInputStream myFileInputStream;
private final String myFileName;
private final byte[] myBuffer;
int myBytesReady;
int myPositionInBuffer;
private int myCurrentPosition;
public MyBufferedInputStream(String s, int arraySize) throws IOException {
myFileName = s;
myFileInputStream = new FileInputStream(s);
myBuffer = new byte[arraySize];
myBytesReady = 0;
myPositionInBuffer = 0;
}
public MyBufferedInputStream(String s) throws IOException {
this(s, 1 << 10);
}
public int available() throws IOException {
return (myFileInputStream.available() + myBytesReady);
}
int offset() {
return myCurrentPosition;
}
public void reset() throws IOException {
setPosition(0);
}
public int read() throws IOException {
myCurrentPosition++;
if (myBytesReady == 0) {
myPositionInBuffer = 0;
myBytesReady = myFileInputStream.read(myBuffer);
if (myBytesReady == 0) {
return -1;
}
}
myBytesReady--;
return (myBuffer[myPositionInBuffer++] & 255);
}
int read2Bytes() throws IOException {
int low = read();
int high = read();
if (high < 0) {
throw new IOException("unexpected end of file at position " + offset());
}
return (high << 8) + low;
}
int read4Bytes() throws IOException {
int firstByte = read();
int secondByte = read();
int thirdByte = read();
int fourthByte = read();
if (fourthByte < 0) {
throw new IOException("unexpected end of file at position " + offset());
}
return (fourthByte << 24) + (thirdByte << 16) + (secondByte << 8) + firstByte;
}
String readString(int stringLength) throws IOException {
char[] array = new char[stringLength];
for (int i = 0; i < stringLength; i++) {
array[i] = (char)read();
}
return new String(array);
}
public void skip(int n) throws IOException {
myCurrentPosition += n;
while (n > 0) {
if (myBytesReady > n) {
myBytesReady -= n;
myPositionInBuffer += n;
n = 0;
} else {
n -= myBytesReady;
myPositionInBuffer = 0;
myBytesReady = myFileInputStream.read(myBuffer);
if (myBytesReady <= 0) {
break;
}
}
}
}
public void backSkip(int n) {
throw new RuntimeException("back skip not implemented");
}
public void setPosition(int position) throws IOException {
if (myCurrentPosition < position) {
skip(position - myCurrentPosition);
} else {
myFileInputStream.close();
myFileInputStream = new FileInputStream(myFileName);
myBytesReady = 0;
skip(position);
}
myCurrentPosition = position;
}
public void close() throws IOException {
myFileInputStream.close();
myBytesReady = 0;
}
}

View file

@ -1,86 +0,0 @@
package org.amse.ys.zip;
import java.io.*;
final class MyBufferedReader extends InputStream {
private FileInputStream myFile;
private final String myFileName;
private final byte[] myBuffer;
int myBytesReady;
int myPositionInBuffer;
private int myCurrentPosition;
public MyBufferedReader(String s, int arraySize) throws IOException {
myFileName = s;
myFile = new FileInputStream(s);
myBuffer = new byte[arraySize];
myBytesReady = 0;
myPositionInBuffer = 0;
}
public MyBufferedReader(String s) throws IOException {
this(s, 1 << 10);
}
public int available() throws IOException {
return (myFile.available() + myBytesReady);
}
public void reset() throws IOException {
setPosition(0);
}
public int read() throws IOException {
myCurrentPosition++;
if (myBytesReady == 0) {
myPositionInBuffer = 0;
myBytesReady = myFile.read(myBuffer);
if (myBytesReady == 0) {
return -1;
}
}
myBytesReady--;
return (myBuffer[myPositionInBuffer++] & 255);
}
public void skip(int n) throws IOException {
myCurrentPosition += n;
while (n > 0) {
if (myBytesReady > n) {
myBytesReady -= n;
myPositionInBuffer += n;
n = 0;
} else {
n -= myBytesReady;
myPositionInBuffer = 0;
myBytesReady = myFile.read(myBuffer);
if (myBytesReady <= 0) {
break;
}
}
}
}
public void backSkip(int n) {
throw new RuntimeException("back skip not implemented");
}
public void setPosition(int position) throws IOException {
if (myCurrentPosition < position) {
skip(position - myCurrentPosition);
} else {
myFile.close();
myFile = new FileInputStream(myFileName);
myBytesReady = 0;
skip(position);
}
myCurrentPosition = position;
}
public void close() throws IOException {
myFile.close();
myBytesReady = 0;
}
}

View file

@ -1,40 +0,0 @@
package org.amse.ys.zip;
import java.io.*;
public class NoCompression extends Decompressor {
private final LocalFileHeader myHeader;
private final MyBufferedReader myStream;
private int myCurrentPosition;
public NoCompression(MyBufferedReader is, LocalFileHeader header) {
super();
myHeader = header;
myStream = is;
}
public int read(byte b[], int off, int len) throws IOException, WrongZipFormatException {
int i = 0;
for (; i < len; ++i) {
int value = read();
if (value == -1) {
break;
}
b[off + i] = (byte)value;
}
return (i > 0) ? i : -1;
}
public int read() throws IOException, WrongZipFormatException {
if (myCurrentPosition < myHeader.getCompressedSize()) {
myCurrentPosition++;
return myStream.read();
} else {
return -1;
}
}
public int available() {
return (myHeader.getUncompressedSize() - myCurrentPosition);
}
}

View file

@ -0,0 +1,40 @@
package org.amse.ys.zip;
import java.io.*;
public class NoCompressionDecompressor extends Decompressor {
private final LocalFileHeader myHeader;
private final MyBufferedInputStream myStream;
private int myCurrentPosition;
public NoCompressionDecompressor(MyBufferedInputStream is, LocalFileHeader header) {
super();
myHeader = header;
myStream = is;
}
public int read(byte b[], int off, int len) throws IOException, WrongZipFormatException {
int i = 0;
for (; i < len; ++i) {
int value = read();
if (value == -1) {
break;
}
b[off + i] = (byte)value;
}
return (i > 0) ? i : -1;
}
public int read() throws IOException, WrongZipFormatException {
if (myCurrentPosition < myHeader.getCompressedSize()) {
myCurrentPosition++;
return myStream.read();
} else {
return -1;
}
}
public int available() {
return (myHeader.getUncompressedSize() - myCurrentPosition);
}
}

View file

@ -0,0 +1,166 @@
package org.amse.ys.zip;
import java.io.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
public class ZipFile {
private final String myFileName;
private final ArrayList<LocalFileHeader> myFileHeaders = new ArrayList<LocalFileHeader>();
private final MyBufferedInputStream myBaseStream;
private boolean myAllFilesAreRead;
public ZipFile(String fileName) throws IOException {
myFileName = fileName;
myBaseStream = new MyBufferedInputStream(myFileName);
}
public List<LocalFileHeader> headers() {
try {
readAllHeaders();
} catch (IOException e) {
} catch (WrongZipFormatException e) {
}
return Collections.unmodifiableList(myFileHeaders);
}
private boolean readFileHeader(String fileToFind) throws IOException {
int version2extract = myBaseStream.read2Bytes();
int generalFlag = myBaseStream.read2Bytes();
int compressionMethod = myBaseStream.read2Bytes();
myBaseStream.skip(8);
int compressedSize = myBaseStream.read4Bytes();
int uncompressedSize = myBaseStream.read4Bytes();
int fileNameSize = myBaseStream.read2Bytes();
int extraField = myBaseStream.read2Bytes();
final String fileName = myBaseStream.readString(fileNameSize);
myBaseStream.skip(extraField);
myFileHeaders.add(new LocalFileHeader(version2extract, generalFlag,
compressionMethod, compressedSize, uncompressedSize,
myBaseStream.offset(), fileName));
if (fileName.equals(fileToFind)) {
return true;
}
if ((generalFlag & 8) == 0) {
myBaseStream.skip(compressedSize);
} else {
System.out
.println("Warning: flag 3 is set! Trying to find header.");
findAndReadDescriptor();
}
return false;
}
private void readAllHeaders() throws IOException, WrongZipFormatException {
if (myAllFilesAreRead) {
return;
}
myAllFilesAreRead = true;
while (true) {
int header = myBaseStream.read4Bytes();
if (header != LocalFileHeader.FILE_HEADER_SIGNATURE) {
if (header == LocalFileHeader.FOLDER_HEADER_SIGNATURE) {
break; // central directory, no more files
} else {
throw new WrongZipFormatException(
"readHeaders. Wrong signature found = " + header
+ " at position " + myBaseStream.offset());
}
}
readFileHeader(null);
}
myBaseStream.reset();
}
/**
* Finds descriptor of the last header and installs sizes of files
*/
private void findAndReadDescriptor() throws IOException {
byte[] tempArray = new byte[12];
while (true) {
int signature = 0;
do {
int nextByte = myBaseStream.read();
if (nextByte < 0) {
throw new IOException(
"readFileHeaders. Unexpected end of file when looking for DataDescriptor");
}
signature = ((signature << 8) & (0x0ffffffff))
+ (byte) nextByte;
} while (signature != LocalFileHeader.DATA_DESCRIPTOR_SIGNATURE);
myBaseStream.read(tempArray);
int compressedSize =
((tempArray[7] & 0xff) << 24) +
((tempArray[6] & 0xff) << 16) +
((tempArray[5] & 0xff) << 8) +
(tempArray[4] & 0xff);
int uncompressedSize =
((tempArray[11] & 0xff) << 24) +
((tempArray[10] & 0xff) << 16) +
((tempArray[9] & 0xff) << 8) +
(tempArray[8] & 0xff);
LocalFileHeader lastHeader = myFileHeaders.get(myFileHeaders.size() - 1);
if ((myBaseStream.offset() - lastHeader.OffsetOfLocalData - 16) == compressedSize) {
lastHeader.setSizes(compressedSize, uncompressedSize);
break;
} else {
myBaseStream.backSkip(12);
continue;
}
}
}
public InputStream getInputStream(String entryName) throws IOException {
if (!myFileHeaders.isEmpty()) {
// trying to find in already ready array
int i;
final int listSize = myFileHeaders.size();
LocalFileHeader header = null;
for (i = 0; i < listSize; i++) {
header = myFileHeaders.get(i);
if (header.FileName.equals(entryName)) {
try {
return new ZipInputStream(myFileName, header);
} catch (WrongZipFormatException e) {
return null;
}
}
}
if (myAllFilesAreRead) {
return null;
}
if (header.sizeIsKnown()) {
myBaseStream.setPosition(header.OffsetOfLocalData + header.getCompressedSize());
} else {
findAndReadDescriptor();
}
}
// ready to read fileheader
do {
int signature = myBaseStream.read4Bytes();
if (signature != LocalFileHeader.FILE_HEADER_SIGNATURE) {
if (signature == LocalFileHeader.FOLDER_HEADER_SIGNATURE) {
break; // central directory, no more files
} else {
throw new IOException(
"Wrong signature " + signature
+ " found at position " + myBaseStream.offset());
}
}
} while (!readFileHeader(entryName));
LocalFileHeader header = myFileHeaders.get(myFileHeaders.size() - 1);
if (header.FileName.equals(entryName)) {
try {
return new ZipInputStream(myFileName, header);
} catch (WrongZipFormatException e) {
return null;
}
}
return null;
}
}

View file

@ -1,230 +1,29 @@
package org.amse.ys.zip; package org.amse.ys.zip;
import java.io.*; import java.io.*;
import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
public class ZipInputStream extends InputStream { public class ZipInputStream extends InputStream {
private final String myFileName; private final MyBufferedInputStream myBaseStream;
private MyBufferedReader myZipFile; // / CORRECT public to private! private final LocalFileHeader myHeader;
private ArrayList<LocalFileHeader> myFileHeaders; private final Decompressor myDecompressor;
private int myCurrentPosition;
private boolean myAllFilesAreRead; public ZipInputStream(String fileName, LocalFileHeader header) throws IOException, WrongZipFormatException {
private boolean myFileIsOpened; if (!header.sizeIsKnown()) {
private int myIndexOfFileOpened; throw new RuntimeException("Reading of files with flag 3 is not implemented yet");
private Decompressor myDecompressor;
public int getCompressionMethod(int i) {
return myFileHeaders.get(i).CompressionMethod;
}
public ZipInputStream(String fileName) throws IOException {
myFileName = fileName;
myFileHeaders = new ArrayList<LocalFileHeader>();
myZipFile = new MyBufferedReader(myFileName);
}
public int getNumberOfFiles() {
return myFileHeaders.size();
}
private int read2Bytes() throws IOException, WrongZipFormatException {
int low = myZipFile.read();
int high = myZipFile.read();
myCurrentPosition += 2;
if ((low < 0) || (high < 0)) {
throw new WrongZipFormatException(
"read2bytes. unexpected end of file at position "
+ myCurrentPosition);
} }
return ((high << 8) + low); myBaseStream = new MyBufferedInputStream(fileName);
myBaseStream.setPosition(header.OffsetOfLocalData);
myHeader = header;
myDecompressor = Decompressor.init(myBaseStream, header);
} }
private int read4Bytes() throws IOException, WrongZipFormatException {
int firstByte = myZipFile.read();
int secondByte = myZipFile.read();
int thirdByte = myZipFile.read();
int fouthByte = myZipFile.read();
myCurrentPosition += 4;
if (fouthByte < 0) {
throw new WrongZipFormatException(
"read4bytes. unexpected end of file at position "
+ myCurrentPosition);
}
int hiWord = ((fouthByte << 8) + thirdByte);
int lowWord = (secondByte << 8) + firstByte;
return ((hiWord << 16) + lowWord);
}
private String readString(int stringLength) throws IOException {
char[] array = new char[stringLength];
for (int i = 0; i < stringLength; i++) {
array[i] = (char) myZipFile.read();
}
myCurrentPosition += stringLength;
return new String(array);
}
public String getFileName(int index) {
return myFileHeaders.get(index).FileName;
}
private boolean readFileHeader(boolean breakable, String fileToFind)
throws IOException, WrongZipFormatException {
int version2extract = read2Bytes();
int generalFlag = read2Bytes();
int compressionMethod = read2Bytes();
myCurrentPosition += 8;
myZipFile.skip(8);
int compressedSize = read4Bytes();
int uncompressedSize = read4Bytes();
int fileNameSize = read2Bytes();
int extraField = read2Bytes();
String fileName = readString(fileNameSize);
myZipFile.skip(extraField);
myCurrentPosition += extraField;
myFileHeaders.add(new LocalFileHeader(version2extract, generalFlag,
compressionMethod, compressedSize, uncompressedSize,
myCurrentPosition, fileName));
if ((breakable) && (fileName.equals(fileToFind))) {
return true;
}
if ((generalFlag & 8) == 0) {
myZipFile.skip(compressedSize);
myCurrentPosition += compressedSize;
} else {
System.out
.println("Warning: flag 3 is set! Trying to find header.");
findAndReadDescriptor();
}
return false;
}
public int available() { public int available() {
return myDecompressor.available(); return myDecompressor.available();
} }
public void readHeaders() throws IOException, WrongZipFormatException {
while (true) {
int header = read4Bytes();
if (header != LocalFileHeader.FILE_HEADER_SIGNATURE) {
if (header == LocalFileHeader.FOLDER_HEADER_SIGNATURE) {
break; // central directory, no more files
} else {
throw new WrongZipFormatException(
"readHeaders. Wrong signature found = " + header
+ " at position " + myCurrentPosition);
}
}
readFileHeader(false, "");
}
myAllFilesAreRead = true;
myCurrentPosition = 0;
myZipFile.reset();
}
private int byteToLong(byte b) {
return (b & 255);
}
/**
* Finds descriptor of the last header and installs sizes of files
*/
private void findAndReadDescriptor() throws IOException,
WrongZipFormatException {
byte[] tempArray = new byte[12];
mainLoop: while (true) {
int tempHeader = 0;
do {
int nextByte = myZipFile.read();
myCurrentPosition += 1;
if (nextByte < 0) {
throw new WrongZipFormatException(
"readFileHeaders. Unexpected end of file when looking for DataDescriptor");
}
tempHeader = ((tempHeader << 8) & (0x0ffffffff))
+ (byte) nextByte;
} while (tempHeader != LocalFileHeader.DATA_DESCRIPTOR_SIGNATURE);
myZipFile.read(tempArray);
myCurrentPosition += 12;
long compressedSize = (byteToLong(tempArray[7]) << 24)
+ (byteToLong(tempArray[6]) << 16)
+ (byteToLong(tempArray[5]) << 8) + byteToLong(tempArray[4]);
long uncompressedSize = ((byteToLong(tempArray[11]) << 24)
+ (byteToLong(tempArray[10]) << 16) + (byteToLong(tempArray[9]) << 8) + byteToLong(tempArray[8]));
LocalFileHeader lastHeader = myFileHeaders
.get(myFileHeaders.size() - 1);
if ((myCurrentPosition - lastHeader.OffsetOfLocalData - 16) == compressedSize) {
lastHeader.setSizes((int) compressedSize,
(int) uncompressedSize);
break mainLoop;
} else {
myZipFile.backSkip(12);
continue mainLoop;
}
}
}
public boolean openFile(String fileToOpen) throws IOException,
WrongZipFormatException {
if (!myFileHeaders.isEmpty()) {
// trying to find in already ready array
int i = 0;
int maxI = myFileHeaders.size();
for (i = 0; i < maxI; i++) {
if (myFileHeaders.get(i).FileName.equals(fileToOpen)) {
// file is found
myFileIsOpened = true;
myIndexOfFileOpened = i;
// making nessesary shift
int offset = myFileHeaders.get(i).OffsetOfLocalData;
myZipFile.setPosition(offset);
myDecompressor = Decompressor.init(myZipFile, myFileHeaders
.get(myIndexOfFileOpened));
return true;
}
}
// there is no file like we look for in our array
if (myAllFilesAreRead) {
return false;
}
// Óñòàíàâëèâàåì óêàçàòåëü ÷òåíèÿ íà õýäåð, äàëåå - çàïóñêàåì öèêë
LocalFileHeader lastHeader = myFileHeaders.get(i);
if (lastHeader.sizeIsKnown()) {
int nextHeaderShift = lastHeader.OffsetOfLocalData
+ lastHeader.getCompressedSize();
myZipFile.setPosition(nextHeaderShift);
} else {
findAndReadDescriptor();
}
}
// ready to read fileheader
do {
int header = read4Bytes();
if (header != LocalFileHeader.FILE_HEADER_SIGNATURE) {
if (header == LocalFileHeader.FOLDER_HEADER_SIGNATURE) {
break; // central directory, no more files
} else {
throw new WrongZipFormatException(
"readHeaders. Wrong signature found = " + header
+ " at position " + myCurrentPosition);
}
}
} while (!readFileHeader(true, fileToOpen));
if (myFileHeaders.get(myFileHeaders.size() - 1).FileName
.equals(fileToOpen)) {
myFileIsOpened = true;
myIndexOfFileOpened = myFileHeaders.size() - 1;
myDecompressor = Decompressor.init(myZipFile, myFileHeaders
.get(myIndexOfFileOpened));
return true;
} else {
return false;
}
}
public int read(byte b[], int off, int len) throws IOException { public int read(byte b[], int off, int len) throws IOException {
if (b == null) { if (b == null) {
throw new NullPointerException(); throw new NullPointerException();
@ -235,47 +34,22 @@ public class ZipInputStream extends InputStream {
return 0; return 0;
} }
if (!myFileIsOpened) { try {
throw new RuntimeException("There is no file open for reading"); return myDecompressor.read(b, off, len);
}
if (!myFileHeaders.get(myIndexOfFileOpened).sizeIsKnown()) {
throw new RuntimeException("Reading of files with flag 3 is not implemented yet");
}
try {
return myDecompressor.read(b, off, len);
} catch (WrongZipFormatException e) { } catch (WrongZipFormatException e) {
throw new IOException("when reading occured exception " + e.getMessage()); throw new IOException("when reading occured exception " + e.getMessage());
} }
} }
public int read() throws IOException { public int read() throws IOException {
if (!myFileIsOpened) {
throw new RuntimeException("There is no file open for reading");
}
if (!myFileHeaders.get(myIndexOfFileOpened).sizeIsKnown()) {
throw new RuntimeException("Reading of files with flag 3 is not implemented yet");
}
try { try {
return myDecompressor.read(); return myDecompressor.read();
} catch (WrongZipFormatException e) { } catch (WrongZipFormatException e) {
throw new IOException("when reading occured exception " throw new IOException("when reading occured exception " + e.getMessage());
+ e.getMessage());
}
}
public LocalFileHeader getFileHeader(int index) {
if (index >= myFileHeaders.size()) {
return null;
} else {
return myFileHeaders.get(index);
} }
} }
public void close() throws IOException { public void close() throws IOException {
myZipFile.close(); myBaseStream.close();
myFileIsOpened = false;
myIndexOfFileOpened = -1;
myDecompressor = null;
} }
} }

View file

@ -19,47 +19,60 @@
package org.geometerplus.fbreader.collection; package org.geometerplus.fbreader.collection;
import java.io.*;
import java.util.*; import java.util.*;
import org.geometerplus.zlibrary.core.util.*; import org.geometerplus.zlibrary.core.util.*;
import org.geometerplus.zlibrary.core.filesystem.*; import org.geometerplus.zlibrary.core.filesystem.*;
import org.geometerplus.zlibrary.core.options.*;
import org.geometerplus.fbreader.description.*; import org.geometerplus.fbreader.description.*;
import org.geometerplus.fbreader.formats.PluginCollection; import org.geometerplus.fbreader.formats.PluginCollection;
public class BookCollection { public class BookCollection {
public final ZLStringOption PathOption = private static BookCollection ourInstance;
new ZLStringOption(ZLOption.CONFIG_CATEGORY, "Options", "BookPath", "/sdcard");
public final ZLBooleanOption ScanSubdirsOption =
new ZLBooleanOption(ZLOption.CONFIG_CATEGORY, "Options", "ScanSubdirs", false);
private final ArrayList myBooks = new ArrayList(); public static BookCollection Instance() {
private final ArrayList myAuthors = new ArrayList(); if (ourInstance == null) {
private final HashSet myExternalBooks = new HashSet(); ourInstance = new BookCollection();
private String myPath;
private boolean myScanSubdirs;
private boolean myDoStrongRebuild = true;
private boolean myDoWeakRebuild;
public ArrayList books() {
synchronize();
return myBooks;
}
public boolean isBookExternal(BookDescription description) {
synchronize();
return myExternalBooks.contains(description);
}
public void rebuild(boolean strong) {
if (strong) {
myDoStrongRebuild = true;
} else {
myDoWeakRebuild = true;
} }
return ourInstance;
}
// TODO: this option is platform-dependent
private final String BookDirectory = "/sdcard/Books";
private final TreeMap<Author,TreeSet<BookDescription>> myAuthorToBookMap =
new TreeMap<Author,TreeSet<BookDescription>>();
private final TreeMap<String,TreeSet<BookDescription>> myTagsToBookMap =
new TreeMap<String,TreeSet<BookDescription>>();
private final TreeSet<BookDescription> myBooksWithoutTags = new TreeSet<BookDescription>();
private boolean myDoRebuild = true;
private BookCollection() {
}
public Collection<Author> authors() {
synchronize();
return myAuthorToBookMap.keySet();
}
public Collection<String> tags() {
synchronize();
return myTagsToBookMap.keySet();
}
public Collection<BookDescription> booksByAuthor(Author author) {
synchronize();
return Collections.unmodifiableSet(myAuthorToBookMap.get(author));
}
public Collection<BookDescription> booksByTag(String tag) {
synchronize();
return Collections.unmodifiableSet((tag != null) ? myTagsToBookMap.get(tag) : myBooksWithoutTags);
}
public void rebuild() {
myDoRebuild = true;
} }
private HashSet collectBookFileNames() { private HashSet collectBookFileNames() {
@ -102,96 +115,35 @@ public class BookCollection {
return bookFileNames; return bookFileNames;
} }
public boolean synchronize() { public void synchronize() {
boolean doStrongRebuild = if (myDoRebuild) {
myDoStrongRebuild || myAuthorToBookMap.clear();
(myScanSubdirs != ScanSubdirsOption.getValue()) || myTagsToBookMap.clear();
(myPath != PathOption.getValue()); myBooksWithoutTags.clear();
if (!doStrongRebuild && !myDoWeakRebuild) {
return false;
}
myPath = PathOption.getValue();
myScanSubdirs = ScanSubdirsOption.getValue();
myDoWeakRebuild = false;
myDoStrongRebuild = false;
if (doStrongRebuild) {
myBooks.clear();
myAuthors.clear();
myExternalBooks.clear();
final HashSet fileNamesSet = collectBookFileNames(); final HashSet fileNamesSet = collectBookFileNames();
for (Iterator it = fileNamesSet.iterator(); it.hasNext(); ) { for (Iterator it = fileNamesSet.iterator(); it.hasNext(); ) {
addDescription(BookDescription.getDescription((String)it.next())); addDescription(BookDescription.getDescription((String)it.next()));
} }
myDoRebuild = false;
final ArrayList bookListFileNames = new BookList().fileNames();
final int sizeOfList = bookListFileNames.size();
for (int i = 0; i < sizeOfList; ++i) {
final String fileName = (String)bookListFileNames.get(i);
if (!fileNamesSet.contains(fileName)) {
BookDescription description = BookDescription.getDescription(fileName);
if (description != null) {
addDescription(description);
myExternalBooks.add(description);
}
}
}
} else {
final BookList bookList = new BookList();
final ArrayList bookListFileNames = bookList.fileNames();
final ArrayList fileNames = new ArrayList();
final ArrayList books = myBooks;
final int booksLen = books.size();
for (int i = 0; i < booksLen; ++i) {
final BookDescription book = (BookDescription)books.get(i);
final String bookFileName = book.FileName;
if (!myExternalBooks.contains(book) || bookListFileNames.contains(bookFileName)) {
fileNames.add(bookFileName);
}
}
myBooks.clear();
myAuthors.clear();
final int fileNamesLen = fileNames.size();
for (int i = 0; i < fileNamesLen; ++i) {
addDescription(BookDescription.getDescription((String)fileNames.get(i), false));
}
} }
Collections.sort(myBooks);
return true;
} }
private HashSet collectDirNames() { private HashSet collectDirNames() {
ArrayList nameQueue = new ArrayList(); ArrayList nameQueue = new ArrayList();
HashSet nameSet = new HashSet(); HashSet nameSet = new HashSet();
String path = myPath; nameQueue.add(BookDirectory);
int pos = path.indexOf(File.pathSeparator);
while (pos != -1) {
nameQueue.add(path.substring(0, pos));
path = path.substring(0, pos + 1);
pos = path.indexOf(File.pathSeparator);
}
if (path.length() != 0) {
nameQueue.add(path);
}
while (!nameQueue.isEmpty()) { while (!nameQueue.isEmpty()) {
String name = (String)nameQueue.get(0); String name = (String)nameQueue.get(0);
nameQueue.remove(0); nameQueue.remove(0);
if (!nameSet.contains(name)) { if (!nameSet.contains(name)) {
if (myScanSubdirs) { ZLDir dir = new ZLFile(name).getDirectory();
ZLDir dir = new ZLFile(name).getDirectory(); if (dir != null) {
if (dir != null) { ArrayList subdirs = dir.collectSubDirs();
ArrayList subdirs = dir.collectSubDirs(); for (int i = 0; i < subdirs.size(); ++i) {
for (int i = 0; i < subdirs.size(); ++i) { nameQueue.add(dir.getItemPath((String)subdirs.get(i)));
nameQueue.add(dir.getItemPath((String)subdirs.get(i)));
}
} }
} }
nameSet.add(name); nameSet.add(name);
@ -202,29 +154,28 @@ public class BookCollection {
private void addDescription(BookDescription description) { private void addDescription(BookDescription description) {
if (description != null) { if (description != null) {
myBooks.add(description); List<String> tags = description.getTags();
} if (tags.isEmpty()) {
} myBooksWithoutTags.add(description);
} else {
public ArrayList authors() { for (String tag : tags) {
synchronize(); TreeSet<BookDescription> set = myTagsToBookMap.get(tag);
if (myAuthors.isEmpty() && !myBooks.isEmpty()) { if (set == null) {
final ArrayList books = myBooks; set = new TreeSet<BookDescription>();
final ArrayList authors = myAuthors; myTagsToBookMap.put(tag, set);
final int len = books.size(); }
Author author = null; set.add(description);
for (int i = 0; i < len; ++i) {
Author newAuthor = ((BookDescription)books.get(i)).getAuthor();
if ((author == null) ||
(author.getSortKey() != newAuthor.getSortKey()) ||
(author.getDisplayName() != newAuthor.getDisplayName())) {
author = newAuthor;
authors.add(author);
} }
} }
}
return myAuthors; final Author author = description.getAuthor();
TreeSet<BookDescription> set = myAuthorToBookMap.get(author);
if (set == null) {
set = new TreeSet<BookDescription>();
myAuthorToBookMap.put(author, set);
}
set.add(description);
}
} }
private static Author _author(ArrayList books, int index) { private static Author _author(ArrayList books, int index) {
@ -232,6 +183,7 @@ public class BookCollection {
} }
public void collectSeriesNames(Author author, HashSet set) { public void collectSeriesNames(Author author, HashSet set) {
/*
synchronize(); synchronize();
final ArrayList books = myBooks; final ArrayList books = myBooks;
if (books.isEmpty()) { if (books.isEmpty()) {
@ -271,9 +223,11 @@ public class BookCollection {
break; break;
} }
} }
*/
} }
public void removeTag(String tag, boolean includeSubTags) { public void removeTag(String tag, boolean includeSubTags) {
/*
synchronize(); synchronize();
final ArrayList books = myBooks; final ArrayList books = myBooks;
final int len = books.size(); final int len = books.size();
@ -282,9 +236,11 @@ public class BookCollection {
(BookDescription)books.get(i) (BookDescription)books.get(i)
).removeTag(tag, includeSubTags); ).removeTag(tag, includeSubTags);
} }
*/
} }
public void renameTag(String from, String to, boolean includeSubTags) { public void renameTag(String from, String to, boolean includeSubTags) {
/*
final String checkedName = BookDescriptionUtil.removeWhiteSpacesFromTag(to); final String checkedName = BookDescriptionUtil.removeWhiteSpacesFromTag(to);
if ((checkedName.length() > 0) && !checkedName.equals(from)) { if ((checkedName.length() > 0) && !checkedName.equals(from)) {
synchronize(); synchronize();
@ -294,9 +250,11 @@ public class BookCollection {
new BookDescription.WritableBookDescription((BookDescription)books.get(i)).renameTag(from, checkedName, includeSubTags); new BookDescription.WritableBookDescription((BookDescription)books.get(i)).renameTag(from, checkedName, includeSubTags);
} }
} }
*/
} }
public void cloneTag(String from, String to, boolean includeSubTags) { public void cloneTag(String from, String to, boolean includeSubTags) {
/*
final String checkedName = BookDescriptionUtil.removeWhiteSpacesFromTag(to); final String checkedName = BookDescriptionUtil.removeWhiteSpacesFromTag(to);
if ((checkedName.length() > 0) && !checkedName.equals(from)) { if ((checkedName.length() > 0) && !checkedName.equals(from)) {
synchronize(); synchronize();
@ -306,9 +264,11 @@ public class BookCollection {
new BookDescription.WritableBookDescription((BookDescription)books.get(i)).cloneTag(from, checkedName, includeSubTags); new BookDescription.WritableBookDescription((BookDescription)books.get(i)).cloneTag(from, checkedName, includeSubTags);
} }
} }
*/
} }
public void addTagToAllBooks(String tag) { public void addTagToAllBooks(String tag) {
/*
final String checkedName = BookDescriptionUtil.removeWhiteSpacesFromTag(tag); final String checkedName = BookDescriptionUtil.removeWhiteSpacesFromTag(tag);
if (checkedName.length() != 0) { if (checkedName.length() != 0) {
synchronize(); synchronize();
@ -318,9 +278,11 @@ public class BookCollection {
new BookDescription.WritableBookDescription((BookDescription)books.get(i)).addTag(checkedName, false); new BookDescription.WritableBookDescription((BookDescription)books.get(i)).addTag(checkedName, false);
} }
} }
*/
} }
public void addTagToBooksWithNoTags(String tag) { public void addTagToBooksWithNoTags(String tag) {
/*
final String checkedName = BookDescriptionUtil.removeWhiteSpacesFromTag(tag); final String checkedName = BookDescriptionUtil.removeWhiteSpacesFromTag(tag);
if (checkedName.length() != 0) { if (checkedName.length() != 0) {
synchronize(); synchronize();
@ -333,9 +295,11 @@ public class BookCollection {
} }
} }
} }
*/
} }
public boolean hasBooks(String tag) { public boolean hasBooks(String tag) {
/*
synchronize(); synchronize();
final ArrayList books = myBooks; final ArrayList books = myBooks;
final int len = books.size(); final int len = books.size();
@ -348,10 +312,12 @@ public class BookCollection {
} }
} }
} }
*/
return false; return false;
} }
public boolean hasSubtags(String tag) { public boolean hasSubtags(String tag) {
/*
synchronize(); synchronize();
final String prefix = tag + '/'; final String prefix = tag + '/';
final ArrayList books = myBooks; final ArrayList books = myBooks;
@ -365,62 +331,7 @@ public class BookCollection {
} }
} }
} }
*/
return false; return false;
} }
static public class LastOpenedBooks {
public ZLIntegerRangeOption MaxListSizeOption;
static private final String GROUP = "LastOpenedBooks";
static private final String BOOK = "Book";
private final ArrayList myBooks = new ArrayList();
public LastOpenedBooks() {
MaxListSizeOption = new ZLIntegerRangeOption(ZLOption.STATE_CATEGORY, GROUP, "MaxSize", 1, 100, 10);
final int size = MaxListSizeOption.getValue();
final ZLStringOption option = new ZLStringOption(ZLOption.STATE_CATEGORY, GROUP, "", "");
for (int i = 0; i < size; ++i) {
option.changeName(BOOK + i);
String name = option.getValue();
if (name.length() != 0) {
BookDescription description = BookDescription.getDescription(name);
if (description != null) {
myBooks.add(description);
}
}
}
}
public void addBook(String fileName) {
for (int i = 0; i < myBooks.size(); i++) {
if (((BookDescription)(myBooks.get(i))).FileName.equals(fileName)) {
myBooks.remove(myBooks.get(i));
break;
}
}
BookDescription description = BookDescription.getDescription(fileName);
if (description != null) {
myBooks.add(0, description);
}
final int maxSize = MaxListSizeOption.getValue();
while (myBooks.size() > maxSize) {
myBooks.remove(myBooks.size() - 1);
}
save();
}
public ArrayList books() {
return myBooks;
}
public void save() {
final ZLStringOption option = new ZLStringOption(ZLOption.STATE_CATEGORY, GROUP, "", "");
int size = Math.min(MaxListSizeOption.getValue(), myBooks.size());
for (int i = 0; i < size; ++i) {
option.changeName(BOOK + i);
option.setValue(((BookDescription)myBooks.get(i)).FileName);
}
}
}
} }

View file

@ -1,74 +0,0 @@
/*
* Copyright (C) 2007-2008 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.collection;
import java.util.*;
import org.geometerplus.zlibrary.core.util.*;
import org.geometerplus.zlibrary.core.options.*;
public class BookList {
private final static String GROUP = "BookList";
private static final String BOOK = "Book";
private static final String SIZE = "Size";
private final ArrayList myFileNames = new ArrayList();
public BookList() {
final int len = new ZLIntegerOption(ZLOption.STATE_CATEGORY, GROUP, SIZE, 0).getValue();
final ArrayList fileNames = myFileNames;
final ZLStringOption bookOption = new ZLStringOption(ZLOption.STATE_CATEGORY, GROUP, "", "");
for (int i = 0; i < len; ++i) {
bookOption.changeName(BOOK + i);
final String name = bookOption.getValue();
if ((name.length() != 0) && !fileNames.contains(name)) {
fileNames.add(name);
}
}
}
public ArrayList fileNames() {
return new ArrayList(myFileNames);
}
public void addFileName(String fileName) {
if (!myFileNames.contains(fileName)) {
myFileNames.add(fileName);
save();
}
}
public void removeFileName(String fileName) {
myFileNames.remove(fileName);
save();
}
private void save() {
final ArrayList fileNames = myFileNames;
final int len = fileNames.size();
new ZLIntegerOption(ZLOption.STATE_CATEGORY, GROUP, SIZE, 0).setValue(len);
final ZLStringOption bookOption =
new ZLStringOption(ZLOption.STATE_CATEGORY, GROUP, "", "");
for (int i = 0; i < len; ++i) {
bookOption.changeName(BOOK + i);
bookOption.setValue((String)fileNames.get(i));
}
}
}

View file

@ -0,0 +1,90 @@
/*
* Copyright (C) 2007-2008 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.collection;
import java.util.*;
import org.geometerplus.zlibrary.core.util.*;
import org.geometerplus.zlibrary.core.options.*;
import org.geometerplus.fbreader.description.*;
import org.geometerplus.fbreader.formats.PluginCollection;
public final class RecentBooks {
private static final int LIST_SIZE = 10;
private static final String GROUP = "LastOpenedBooks";
private static final String BOOK = "Book";
private static RecentBooks ourInstance;
public static RecentBooks Instance() {
if (ourInstance == null) {
ourInstance = new RecentBooks();
}
return ourInstance;
}
private final ArrayList<String> myFileNames = new ArrayList<String>();
private RecentBooks() {
final ZLStringOption option = new ZLStringOption(ZLOption.STATE_CATEGORY, GROUP, "", "");
for (int count = 0; ; ++count) {
option.changeName(BOOK + count);
String name = option.getValue();
if (name.length() == 0) {
break;
}
myFileNames.add(name);
}
}
public void addBook(String fileName) {
myFileNames.remove(fileName);
myFileNames.add(0, fileName);
save();
}
public ArrayList<BookDescription> books() {
final ArrayList<BookDescription> bookList = new ArrayList<BookDescription>();
int count = 0;
for (String fileName : myFileNames) {
BookDescription description = BookDescription.getDescription(fileName);
if (description != null) {
bookList.add(description);
}
if (++count >= LIST_SIZE) {
break;
}
}
return bookList;
}
public void save() {
final ZLStringOption option = new ZLStringOption(ZLOption.STATE_CATEGORY, GROUP, "", "");
int count = 0;
for (String fileName : myFileNames) {
option.changeName(BOOK + count);
option.setValue(fileName);
++count;
}
option.changeName(BOOK + count);
option.setValue("");
}
}

View file

@ -41,7 +41,7 @@ public class BookDescription implements Comparable {
private String myLanguage = ""; private String myLanguage = "";
private String myEncoding = ""; private String myEncoding = "";
private final static HashMap ourDescriptions = new HashMap(); private final static HashMap ourDescriptions = new HashMap();
private final ArrayList myTags = new ArrayList(); private final ArrayList<String> myTags = new ArrayList<String>();
public static BookDescription getDescription(String fileName) { public static BookDescription getDescription(String fileName) {
return getDescription(fileName, true); return getDescription(fileName, true);
@ -150,11 +150,11 @@ public class BookDescription implements Comparable {
return myEncoding; return myEncoding;
} }
public ArrayList getTags() { public List<String> getTags() {
return myTags; return Collections.unmodifiableList(myTags);
} }
private boolean addTag(String tag, boolean check) { private boolean addTag(String tag, boolean check) {
if (check) { if (check) {
tag = BookDescriptionUtil.removeWhiteSpacesFromTag(tag); tag = BookDescriptionUtil.removeWhiteSpacesFromTag(tag);
} }
@ -171,19 +171,19 @@ public class BookDescription implements Comparable {
} }
private void saveTags(ZLStringOption tagsOption) { private void saveTags(ZLStringOption tagsOption) {
final ArrayList tags = myTags; final ArrayList<String> tags = myTags;
if (tags.isEmpty()) { if (tags.isEmpty()) {
tagsOption.setValue(""); tagsOption.setValue("");
} else { } else {
final StringBuilder tagString = new StringBuilder(); final StringBuilder tagString = new StringBuilder();
tagString.append(tags.get(0)); tagString.append(tags.get(0));
final int len = tags.size(); final int len = tags.size();
for (int i = 1; i < len; ++i) { for (int i = 1; i < len; ++i) {
tagString.append(","); tagString.append(",");
tagString.append(tags.get(i)); tagString.append(tags.get(i));
} }
tagsOption.setValue(tagString.toString()); tagsOption.setValue(tagString.toString());
} }
} }
public static class BookInfo { public static class BookInfo {
@ -280,7 +280,7 @@ public class BookDescription implements Comparable {
String strippedKey = sortKey; String strippedKey = sortKey;
strippedKey.trim(); strippedKey.trim();
if (strippedKey.length() == 0) { if (strippedKey.length() == 0) {
int index = strippedName.indexOf(' '); int index = strippedName.lastIndexOf(' ');
if (index == -1) { if (index == -1) {
strippedKey = strippedName; strippedKey = strippedName;
} else { } else {
@ -362,14 +362,14 @@ public class BookDescription implements Comparable {
} }
public void removeTag(String tag, boolean includeSubTags) { public void removeTag(String tag, boolean includeSubTags) {
final ArrayList tags = myDescription.myTags; final ArrayList<String> tags = myDescription.myTags;
if (includeSubTags) { if (includeSubTags) {
final String prefix = tag + '/'; final String prefix = tag + '/';
boolean changed = false; boolean changed = false;
final int len = tags.size(); final int len = tags.size();
ArrayList toRemove = null; ArrayList toRemove = null;
for (int i = 0; i < len; ++i) { for (int i = 0; i < len; ++i) {
String current = (String)tags.get(i); String current = tags.get(i);
if (current.equals(tag) || current.startsWith(prefix)) { if (current.equals(tag) || current.startsWith(prefix)) {
if (toRemove == null) { if (toRemove == null) {
toRemove = new ArrayList(); toRemove = new ArrayList();
@ -391,14 +391,14 @@ public class BookDescription implements Comparable {
} }
public void renameTag(String from, String to, boolean includeSubTags) { public void renameTag(String from, String to, boolean includeSubTags) {
final ArrayList tags = myDescription.myTags; final ArrayList<String> tags = myDescription.myTags;
if (includeSubTags) { if (includeSubTags) {
final String prefix = from + '/'; final String prefix = from + '/';
final HashSet tagSet = new HashSet(); final HashSet tagSet = new HashSet();
boolean changed = false; boolean changed = false;
final int len = tags.size(); final int len = tags.size();
for (int i = 0; i < len; ++i) { for (int i = 0; i < len; ++i) {
final String value = (String)tags.get(i); final String value = tags.get(i);
if (from.equals(value)) { if (from.equals(value)) {
tagSet.add(to); tagSet.add(to);
changed = true; changed = true;
@ -423,13 +423,13 @@ public class BookDescription implements Comparable {
} }
public void cloneTag(String from, String to, boolean includeSubTags) { public void cloneTag(String from, String to, boolean includeSubTags) {
final ArrayList tags = myDescription.myTags; final ArrayList<String> tags = myDescription.myTags;
if (includeSubTags) { if (includeSubTags) {
final String prefix = from + '/'; final String prefix = from + '/';
final HashSet tagSet = new HashSet(); final HashSet tagSet = new HashSet();
final int len = tags.size(); final int len = tags.size();
for (int i = 0; i < len; ++i) { for (int i = 0; i < len; ++i) {
final String value = (String)tags.get(i); final String value = tags.get(i);
if (value.equals(from)) { if (value.equals(from)) {
tagSet.add(to); tagSet.add(to);
} else if (value.startsWith(prefix)) { } else if (value.startsWith(prefix)) {

View file

@ -20,7 +20,7 @@
package org.geometerplus.fbreader.fbreader; package org.geometerplus.fbreader.fbreader;
public interface ActionCode { public interface ActionCode {
String SHOW_COLLECTION = "showLibrary"; String SHOW_LIBRARY = "showLibrary";
String SHOW_OPTIONS = "preferences"; String SHOW_OPTIONS = "preferences";
String UNDO = "undo"; String UNDO = "undo";
String REDO = "redo"; String REDO = "redo";
@ -40,13 +40,10 @@ public interface ActionCode {
String DECREASE_FONT = "decreaseFont"; String DECREASE_FONT = "decreaseFont";
String TOGGLE_FULLSCREEN = "toggleFullscreen"; String TOGGLE_FULLSCREEN = "toggleFullscreen";
String FULLSCREEN_ON = "onFullscreen"; String FULLSCREEN_ON = "onFullscreen";
String ADD_BOOK = "addBook";
String SHOW_BOOK_INFO = "bookInfo"; String SHOW_BOOK_INFO = "bookInfo";
String SHOW_HELP = "showHelp"; String SHOW_HELP = "showHelp";
String ROTATE_SCREEN = "rotate"; String ROTATE_SCREEN = "rotate";
String SHOW_LAST_BOOKS = "showRecent";
String QUIT = "quit"; String QUIT = "quit";
String OPEN_PREVIOUS_BOOK = "previousBook";
String GOTO_NEXT_TOC_SECTION = "nextTOCSection"; String GOTO_NEXT_TOC_SECTION = "nextTOCSection";
String GOTO_PREVIOUS_TOC_SECTION = "previousTOCSection"; String GOTO_PREVIOUS_TOC_SECTION = "previousTOCSection";
String COPY_SELECTED_TEXT_TO_CLIPBOARD = "copyToClipboard"; String COPY_SELECTED_TEXT_TO_CLIPBOARD = "copyToClipboard";

View file

@ -1,60 +0,0 @@
/*
* Copyright (C) 2007-2008 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.fbreader;
import org.geometerplus.fbreader.collection.*;
import org.geometerplus.fbreader.description.BookDescription;
import org.geometerplus.zlibrary.core.dialogs.ZLDialogManager;
class AddBookAction extends FBAction {
AddBookAction(FBReader fbreader) {
super(fbreader);
}
public boolean isVisible() {
return Reader.getMode() != FBReader.ViewMode.FOOTNOTE;
}
public void run() {
final FBFileHandler handler = new FBFileHandler();
Runnable actionOnAccept = new Runnable() {
public void run() {
final BookDescription description = handler.getDescription();
if (description == null) {
return;
}
final BookCollection collection = Reader.CollectionView.Collection;
final String fileName = description.FileName;
final Runnable action = new Runnable() {
public void run() {
Reader.openFile(fileName);
collection.rebuild(false);
new BookList().addFileName(fileName);
Reader.setMode(FBReader.ViewMode.BOOK_TEXT);
Reader.refreshWindow();
}
};
//new BookInfoDialog(collection, fileName, action).getDialog().run();
action.run();
}
};
ZLDialogManager.getInstance().runSelectionDialog("addFileDialog", handler, actionOnAccept);
}
}

View file

@ -47,8 +47,8 @@ public class BookInfoDialog {
private ZLSpinOptionEntry myBookNumberEntry; private ZLSpinOptionEntry myBookNumberEntry;
//private FormatInfoPage myFormatInfoPage; //private FormatInfoPage myFormatInfoPage;
public BookInfoDialog(BookCollection collection, String fileName, Runnable actionOnAccept) { public BookInfoDialog(String fileName, Runnable actionOnAccept) {
myCollection = collection; myCollection = BookCollection.Instance();
myBookInfo = new BookDescription.BookInfo(fileName); myBookInfo = new BookDescription.BookInfo(fileName);
myDialog = ZLDialogManager.getInstance().createOptionsDialog("InfoDialog", actionOnAccept, null, false); myDialog = ZLDialogManager.getInstance().createOptionsDialog("InfoDialog", actionOnAccept, null, false);
@ -121,9 +121,8 @@ public class BookInfoDialog {
if (myValues.size() == 0) { if (myValues.size() == 0) {
final String initial = initialValue(); final String initial = initialValue();
boolean addInitial = true; boolean addInitial = true;
final ArrayList authors = myCollection.authors(); for (Author author : myCollection.authors()) {
for (int i = 0; i < authors.size(); i++) { final String name = author.getDisplayName();
final String name = ((Author) authors.get(i)).getDisplayName();
if (addInitial && (name != null && name.equals(initial))) { if (addInitial && (name != null && name.equals(initial))) {
addInitial = false; addInitial = false;
} }
@ -145,9 +144,9 @@ public class BookInfoDialog {
} }
public void onValueSelected(int index) { public void onValueSelected(int index) {
final ArrayList authors = myCollection.authors(); final Collection<Author> authors = myCollection.authors();
if (index < authors.size()) { if (index < authors.size()) {
myCurrentAuthor = (Author)authors.get(index); myCurrentAuthor = new ArrayList<Author>(authors).get(index);
} }
myAuthorSortKeyEntry.resetView(); myAuthorSortKeyEntry.resetView();
mySeriesTitleEntry.resetView(); mySeriesTitleEntry.resetView();
@ -160,11 +159,9 @@ public class BookInfoDialog {
public SeriesTitleEntry() { public SeriesTitleEntry() {
super(true); super(true);
final ArrayList authors = myCollection.authors();
final String authorName = myBookInfo.AuthorDisplayNameOption.getValue(); final String authorName = myBookInfo.AuthorDisplayNameOption.getValue();
final String authorKey = myBookInfo.AuthorSortKeyOption.getValue(); final String authorKey = myBookInfo.AuthorSortKeyOption.getValue();
for (int i = 0; i < authors.size(); i++) { for (Author author : myCollection.authors()) {
final Author author = (Author) authors.get(i);
if ((authorName != null && authorName.equals(author.getDisplayName())) && if ((authorName != null && authorName.equals(author.getDisplayName())) &&
(authorKey != null && authorKey.equals(author.getSortKey()))) { (authorKey != null && authorKey.equals(author.getSortKey()))) {
myOriginalAuthor = author; myOriginalAuthor = author;

View file

@ -1,300 +0,0 @@
/*
* Copyright (C) 2007-2008 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.fbreader;
import java.util.*;
import org.geometerplus.zlibrary.core.util.*;
import org.geometerplus.zlibrary.core.library.ZLibrary;
import org.geometerplus.zlibrary.core.resources.ZLResource;
import org.geometerplus.zlibrary.core.image.*;
import org.geometerplus.zlibrary.text.model.*;
import org.geometerplus.fbreader.bookmodel.FBTextKind;
import org.geometerplus.fbreader.collection.*;
import org.geometerplus.fbreader.description.*;
class CollectionModel extends ZLTextTreeModel {
static final String RemoveBookImageId = "removeBook";
static final String BookInfoImageId = "bookInfo";
static final String AuthorInfoImageId = "authorInfo";
static final String SeriesOrderImageId = "seriesOrder";
static final String TagInfoImageId = "tagInfo";
static final String RemoveTagImageId = "removeTag";
private final BookCollection myCollection;
private final CollectionView myView;
private final ZLImageMap myImageMap = new ZLImageMap();
private final HashMap myParagraphToBook = new HashMap();
private final HashMap myParagraphToTag = new HashMap();
private final HashMap myBookToParagraph = new HashMap();
public CollectionModel(CollectionView view, BookCollection collection) {
myView = view;
myCollection = collection;
String prefix = ZLibrary.JAR_DATA_PREFIX + "icons/booktree/";
myImageMap.put(RemoveBookImageId, new ZLFileImage("image/png", prefix + "tree-remove.png"));
myImageMap.put(BookInfoImageId, new ZLFileImage("image/png", prefix + "tree-bookinfo.png"));
myImageMap.put(AuthorInfoImageId, new ZLFileImage("image/png", prefix + "tree-authorinfo.png"));
myImageMap.put(SeriesOrderImageId, new ZLFileImage("image/png", prefix + "tree-order.png"));
myImageMap.put(TagInfoImageId, new ZLFileImage("image/png", prefix + "tree-taginfo.png"));
myImageMap.put(RemoveTagImageId, new ZLFileImage("image/png", prefix + "tree-removetag.png"));
}
BookDescription getBookByParagraphIndex(int index) {
if ((index < 0) || ((int)getParagraphsNumber() <= index)) {
return null;
}
return (BookDescription)myParagraphToBook.get(getParagraph(index));
}
String getTagByParagraphIndex(int index) {
if ((index < 0) || ((int)getParagraphsNumber() <= index)) {
return null;
}
return (String)myParagraphToTag.get(getParagraph(index));
}
ArrayList paragraphIndicesByBook(BookDescription book) {
return (ArrayList)myBookToParagraph.get(book);
}
private void build() {
if (myCollection.books().isEmpty()) {
createParagraph(null);
insertText(FBTextKind.REGULAR, ZLResource.resource("library").getResource("noBooks").getValue());
} else {
if (myView.ShowTagsOption.getValue()) {
buildWithTags();
} else {
buildWithoutTags();
}
}
}
private void buildWithTags() {
final ZLResource resource = ZLResource.resource("library");
final ArrayList books = myCollection.books();
if (myView.ShowAllBooksTagOption.getValue()) {
final ZLTextTreeParagraph allBooksParagraph = createParagraph(null);
insertText(FBTextKind.LIBRARY_AUTHOR_ENTRY, resource.getResource("allBooks").getValue());
insertImage(TagInfoImageId);
myParagraphToTag.put(allBooksParagraph, CollectionView.SpecialTagAllBooks);
addBooks(books, allBooksParagraph);
}
final TreeMap tagMap = new TreeMap();
final ArrayList booksWithoutTags = new ArrayList();
final int len = books.size();
for (int i = 0; i < len; ++i) {
final BookDescription description = (BookDescription)books.get(i);
final ArrayList bookTags = description.getTags();
if (bookTags.isEmpty()) {
booksWithoutTags.add(description);
} else {
final int bookTagsLen = bookTags.size();
for (int j = 0; j < bookTagsLen; ++j) {
Object tg = bookTags.get(j);
ArrayList list = (ArrayList)tagMap.get(tg);
if (list == null) {
list = new ArrayList();
tagMap.put(tg, list);
}
list.add(description);
}
}
}
if (!booksWithoutTags.isEmpty()) {
final ZLTextTreeParagraph booksWithoutTagsParagraph = createParagraph(null);
insertText(FBTextKind.LIBRARY_AUTHOR_ENTRY, resource.getResource("booksWithoutTags").getValue());
insertImage(TagInfoImageId);
myParagraphToTag.put(booksWithoutTagsParagraph, CollectionView.SpecialTagNoTagsBooks);
addBooks(booksWithoutTags, booksWithoutTagsParagraph);
}
final ArrayList tagStack = new ArrayList();
final HashMap paragraphToTagMap = new HashMap();
ZLTextTreeParagraph tagParagraph = null;
for (Iterator it = tagMap.entrySet().iterator(); it.hasNext(); ) {
final Map.Entry entry = (Map.Entry)it.next();
final String fullTagName = (String)entry.getKey();
boolean useExistingTagStack = true;
for (int index = 0, depth = 0; index != -1; ++depth) {
final int newIndex = fullTagName.indexOf('/', index);
String subTag;
if (newIndex != -1) {
subTag = fullTagName.substring(index, newIndex);
index = newIndex + 1;
} else {
subTag = fullTagName.substring(index);
index = -1;
}
if (useExistingTagStack) {
if (tagStack.size() == depth) {
useExistingTagStack = false;
} else if (!subTag.equals(tagStack.get(depth))) {
for (int i = tagStack.size() - depth; i > 0; --i) {
final String tg = (String)paragraphToTagMap.get(tagParagraph);
if (tg != null) {
final ArrayList list = (ArrayList)tagMap.get(tg);
if (list != null) {
addBooks(list, tagParagraph);
}
}
tagParagraph = tagParagraph.getParent();
}
for (int i = tagStack.size() - 1; i >= depth; --i) {
tagStack.remove(i);
}
useExistingTagStack = false;
}
}
if (!useExistingTagStack) {
tagStack.add(subTag);
tagParagraph = createParagraph(tagParagraph);
myParagraphToTag.put(tagParagraph, (newIndex != -1) ? fullTagName.substring(0, newIndex) : fullTagName);
insertText(FBTextKind.LIBRARY_AUTHOR_ENTRY, subTag);
insertImage(TagInfoImageId);
insertImage(RemoveTagImageId);
}
}
paragraphToTagMap.put(tagParagraph, fullTagName);
}
while (tagParagraph != null) {
final String tg = (String)paragraphToTagMap.get(tagParagraph);
if (tg != null) {
addBooks((ArrayList)tagMap.get(tg), tagParagraph);
}
tagParagraph = tagParagraph.getParent();
}
}
private void buildWithoutTags() {
addBooks(myCollection.books(), null);
}
private void addBooks(ArrayList books, ZLTextTreeParagraph root) {
Author author = null;
ZLTextTreeParagraph authorParagraph = null;
String currentSeriesName = null;
ZLTextTreeParagraph seriesParagraph = null;
final int len = books.size();
for (int i = 0; i < len; ++i) {
BookDescription description = (BookDescription)books.get(i);
final Author newAuthor = description.getAuthor();
if (!newAuthor.equals(author)) {
author = newAuthor;
authorParagraph = createParagraph(root);
insertText(FBTextKind.LIBRARY_AUTHOR_ENTRY, author.getDisplayName());
//insertImage(AuthorInfoImageId);
currentSeriesName = null;
seriesParagraph = null;
}
final String seriesName = description.getSeriesName();
if (seriesName.length() == 0) {
currentSeriesName = null;
seriesParagraph = null;
} else if (!seriesName.equals(currentSeriesName)) {
currentSeriesName = seriesName;
seriesParagraph = createParagraph(authorParagraph);
insertText(FBTextKind.LIBRARY_BOOK_ENTRY, seriesName);
//insertImage(SeriesOrderImageId);
}
ZLTextTreeParagraph bookParagraph = createParagraph(
(seriesParagraph == null) ? authorParagraph : seriesParagraph
);
insertText(FBTextKind.LIBRARY_BOOK_ENTRY, description.getTitle());
insertImage(BookInfoImageId);
if (myCollection.isBookExternal(description)) {
insertImage(RemoveBookImageId);
}
myParagraphToBook.put(bookParagraph, description);
ArrayList numbers = (ArrayList)myBookToParagraph.get(description);
if (numbers == null) {
numbers = new ArrayList();
myBookToParagraph.put(description, numbers);
}
numbers.add(getParagraphsNumber() - 1);
}
}
public void update() {
myParagraphToBook.clear();
myParagraphToTag.clear();
myBookToParagraph.clear();
super.clear();
build();
}
private void insertText(byte kind, String text) {
addControl(kind, true);
addText(text.toCharArray());
}
private void insertImage(String id) {
addFixedHSpace((short)1);
addImage(id, myImageMap, (short)0);
}
void removeBook(BookDescription book) {
final ArrayList indices = (ArrayList)paragraphIndicesByBook(book);
if (indices == null) {
return;
}
myBookToParagraph.remove(book);
final int len = indices.size();
for (int i = len - 1; i >= 0; --i) {
int index = ((Integer)indices.get(i)).intValue();
ZLTextTreeParagraph paragraph = getTreeParagraph(index);
int count = 1;
for (ZLTextTreeParagraph parent = paragraph.getParent(); (parent != null) && (parent.childNumber() == 1); parent = parent.getParent()) {
++count;
}
if (count > index) {
count = index;
}
for (Iterator it = myBookToParagraph.entrySet().iterator(); it.hasNext(); ) {
final Map.Entry entry = (Map.Entry)it.next();
final ArrayList list = (ArrayList)entry.getValue();
final int listLen = list.size();
for (int j = 0; j < listLen; ++j) {
final int v = ((Integer)list.get(j)).intValue();
if (v >= index) {
list.set(i, v - count);
}
}
}
for (; count > 0; --count) {
removeParagraph(index--);
}
}
}
}

View file

@ -1,478 +0,0 @@
/*
* Copyright (C) 2007-2008 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.fbreader;
import java.util.*;
import org.geometerplus.zlibrary.core.options.*;
import org.geometerplus.zlibrary.core.resources.ZLResource;
import org.geometerplus.zlibrary.core.dialogs.*;
import org.geometerplus.zlibrary.core.view.ZLPaintContext;
import org.geometerplus.zlibrary.core.application.ZLApplication;
import org.geometerplus.zlibrary.text.model.*;
import org.geometerplus.zlibrary.text.view.ZLTextView;
import org.geometerplus.zlibrary.text.view.impl.*;
import org.geometerplus.fbreader.collection.*;
import org.geometerplus.fbreader.description.*;
public class CollectionView extends FBView {
final static String SpecialTagAllBooks = ",AllBooks,";
final static String SpecialTagNoTagsBooks = ",NoTags,";
public final ZLBooleanOption ShowTagsOption =
new ZLBooleanOption(ZLOption.LOOK_AND_FEEL_CATEGORY, "Library", "ShowTags", true);
public final ZLBooleanOption ShowAllBooksTagOption =
new ZLBooleanOption(ZLOption.LOOK_AND_FEEL_CATEGORY, "Library", "ShowAllBooksTag", true);
public final BookCollection Collection = new BookCollection();
private boolean myTreeStateIsFrozen;
private boolean myUpdateModel;
private boolean myShowTags;
private boolean myShowAllBooksList;
public CollectionView(ZLPaintContext context) {
super(context);
myUpdateModel = true;
setModel(new CollectionModel(this, Collection));
myShowTags = ShowTagsOption.getValue();
myShowAllBooksList = ShowAllBooksTagOption.getValue();
}
public String getCaption() {
return ZLResource.resource("library").getResource("caption").getValue();
}
public boolean onStylusRelease(int x, int y) {
if (super.onStylusRelease(x, y)) {
return false;
}
ZLTextElementArea imageArea = getElementByCoordinates(x, y);
if ((imageArea != null) && (imageArea.Element instanceof ZLTextImageElement)) {
ZLTextWordCursor cursor = new ZLTextWordCursor(StartCursor);
cursor.moveToParagraph(imageArea.ParagraphIndex);
cursor.moveTo(imageArea.TextElementIndex, 0);
final ZLTextElement element = cursor.getElement();
if (!(element instanceof ZLTextImageElement)) {
return false;
}
final ZLTextImageElement imageElement = (ZLTextImageElement)element;
final String imageId = imageElement.Id;
if (imageId == CollectionModel.BookInfoImageId) {
editBookInfo(imageArea.ParagraphIndex);
return true;
} else if (imageId == CollectionModel.RemoveBookImageId) {
removeBook(imageArea.ParagraphIndex);
return true;
} else if (imageId == CollectionModel.RemoveTagImageId) {
removeTag(imageArea.ParagraphIndex);
return true;
} else if (imageId == CollectionModel.TagInfoImageId) {
editTagInfo(imageArea.ParagraphIndex);
return true;
}
return false;
}
int index = getParagraphIndexByCoordinate(y);
if (index == -1) {
return false;
}
final BookDescription book = getCollectionModel().getBookByParagraphIndex(index);
if (book != null) {
final FBReader fbreader = (FBReader)ZLApplication.Instance();
fbreader.openBook(book);
fbreader.showBookTextView();
return true;
}
return false;
}
private void editBookInfo(int paragraphIndex) {
final BookDescription book = getCollectionModel().getBookByParagraphIndex(paragraphIndex);
if (book == null) {
return;
}
Runnable action = new Runnable() {
public void run() {
Collection.rebuild(false);
myUpdateModel = true;
selectBook(book);
ZLApplication.Instance().refreshWindow();
}
};
new BookInfoDialog(Collection, book.FileName, action).getDialog().run();
}
private void removeBook(int paragraphIndex) {
final CollectionModel cModel = getCollectionModel();
final BookDescription book = cModel.getBookByParagraphIndex(paragraphIndex);
if (book == null) {
return;
}
String boxKey = "removeBookBox";
final String message;
{
final String format = ZLDialogManager.getDialogMessage(boxKey);
int index = format.indexOf("%s");
if (index == -1) {
message = format;
} else {
message = format.substring(0, index) + book.getTitle() + format.substring(index + 2);
}
}
Runnable okAction = new Runnable() {
public void run() {
cModel.removeAllMarks();
new BookList().removeFileName(book.FileName);
cModel.removeBook(book);
if (cModel.getParagraphsNumber() == 0) {
gotoParagraph(0, false);
} else {
int index = StartCursor.getParagraphCursor().Index;
if (index >= cModel.getParagraphsNumber()) {
index = cModel.getParagraphsNumber() - 1;
}
while (!cModel.getTreeParagraph(index).getParent().isOpen()) {
--index;
}
gotoParagraph(index, false);
}
rebuildPaintInfo(true);
ZLApplication.Instance().refreshWindow();
}
};
ZLDialogManager.getInstance().showQuestionBox(
boxKey, message,
ZLDialogManager.YES_BUTTON, okAction,
ZLDialogManager.NO_BUTTON, null,
null, null
);
}
private void removeTag(int paragraphIndex) {
final String tag = getCollectionModel().getTagByParagraphIndex(paragraphIndex);
if (tag == null) {
return;
}
final String boxKey = "removeTagBox";
final String message;
{
final String format = ZLDialogManager.getDialogMessage(boxKey);
int index = format.indexOf("%s");
if (index == -1) {
message = format;
} else {
message = format.substring(0, index) + tag + format.substring(index + 2);
}
}
final Runnable removeThisTagOnlyAction = new Runnable() {
public void run() {
getCollectionModel().removeAllMarks();
Collection.removeTag(tag, false);
updateModel();
ZLApplication.Instance().refreshWindow();
}
};
final Runnable removeSubTree = new Runnable() {
public void run() {
getCollectionModel().removeAllMarks();
Collection.removeTag(tag, true);
updateModel();
ZLApplication.Instance().refreshWindow();
}
};
if (Collection.hasSubtags(tag)) {
if (Collection.hasBooks(tag)) {
ZLDialogManager.getInstance().showQuestionBox(boxKey, message,
"thisOnly", removeThisTagOnlyAction,
"withSubtags", removeSubTree,
ZLDialogManager.CANCEL_BUTTON, null
);
} else {
ZLDialogManager.getInstance().showQuestionBox(boxKey, message,
"withSubtags", removeSubTree,
ZLDialogManager.CANCEL_BUTTON, null,
null, null
);
}
} else {
ZLDialogManager.getInstance().showQuestionBox(boxKey, message,
ZLDialogManager.YES_BUTTON, removeSubTree,
ZLDialogManager.CANCEL_BUTTON, null,
null, null
);
}
}
private void editTagInfo(int paragraphIndex) {
final String tag = getCollectionModel().getTagByParagraphIndex(paragraphIndex);
if (tag == null) {
return;
}
final boolean tagIsSpecial = (tag == SpecialTagAllBooks) || (tag == SpecialTagNoTagsBooks);
final String tagDisplayName = tagIsSpecial ? "" : tag;
final boolean editNotClone = tag != SpecialTagAllBooks;
final boolean includeSubtags = !tagIsSpecial && Collection.hasSubtags(tag);
final boolean hasBooks = Collection.hasBooks(tag);
final TreeSet tagSet = new TreeSet();
final ArrayList books = Collection.books();
final int len = books.size();
for (int i = 0; i < len; ++i) {
tagSet.addAll(((BookDescription)books.get(i)).getTags());
}
final TreeSet fullTagSet = new TreeSet(tagSet);
for (Iterator it = tagSet.iterator(); it.hasNext(); ) {
final String value = (String)it.next();
for (int index = 0;;) {
index = value.indexOf('/', index);
if (index == -1) {
break;
}
fullTagSet.add(value.substring(0, index++));
}
}
final ArrayList names = new ArrayList();
if (!fullTagSet.contains(tagDisplayName)) {
names.add(tagDisplayName);
}
names.addAll(fullTagSet);
new EditTagDialog(names, tag, tagIsSpecial, includeSubtags, hasBooks, editNotClone).run();
}
public void paint() {
if ((myShowTags != ShowTagsOption.getValue()) ||
(myShowAllBooksList != ShowAllBooksTagOption.getValue())) {
myShowTags = ShowTagsOption.getValue();
myShowAllBooksList = ShowAllBooksTagOption.getValue();
myUpdateModel = true;
}
if (myUpdateModel) {
ZLTextModel oldModel = getModel();
setModel(null);
((CollectionModel)oldModel).update();
setModel(oldModel);
myUpdateModel = false;
}
super.paint();
}
public void updateModel() {
Collection.rebuild(true);
myUpdateModel = true;
Collection.authors();
clearCaches();
}
public void synchronizeModel() {
if (Collection.synchronize()) {
updateModel();
}
}
public void selectBook(BookDescription book) {
if (myUpdateModel) {
ZLTextModel oldModel = getModel();
setModel(null);
((CollectionModel)oldModel).update();
setModel(oldModel);
myUpdateModel = false;
}
final ArrayList toSelect = getCollectionModel().paragraphIndicesByBook(book);
if ((toSelect != null) && !toSelect.isEmpty()) {
final int len = toSelect.size();
int index = 0;
for (int i = 0; i < len; ++i) {
index = ((Integer)toSelect.get(i)).intValue();
highlightParagraph(index);
}
gotoParagraph(index, false);
scrollPage(false, ZLTextView.ScrollingMode.SCROLL_PERCENTAGE, 40);
}
}
private CollectionModel getCollectionModel() {
return (CollectionModel)getModel();
}
final private class EditTagDialog implements Runnable {
private final static String EDIT_OR_CLONE_KEY = "editOrClone";
private final String myTag;
private final boolean myIncludeSubtags;
private final EditOrCloneEntry myEditOrCloneEntry;
private final TagNameEntry myTagNameEntry;
private final IncludeSubtagsEntry myIncludeSubtagsEntry;
public EditTagDialog(ArrayList names, String tag, boolean tagIsSpecial, boolean includeSubtags, boolean hasBooks, boolean editNotClone) {
myTag = tag;
myIncludeSubtags = includeSubtags;
final ZLDialog dialog = ZLDialogManager.getInstance().createDialog("editTagInfoDialog");
myEditOrCloneEntry = new EditOrCloneEntry(dialog.getResource(EDIT_OR_CLONE_KEY), editNotClone);
myEditOrCloneEntry.setActive(!tagIsSpecial);
myTagNameEntry = new TagNameEntry(names, tag);
myIncludeSubtagsEntry = new IncludeSubtagsEntry(includeSubtags);
if (includeSubtags && !hasBooks) {
myIncludeSubtagsEntry.setActive(false);
}
}
public void run() {
final ZLDialog dialog = ZLDialogManager.getInstance().createDialog("editTagInfoDialog");
dialog.addOption(EDIT_OR_CLONE_KEY, myEditOrCloneEntry);
dialog.addOption("name", myTagNameEntry);
if (myIncludeSubtags) {
dialog.addOption("includeSubtags", myIncludeSubtagsEntry);
}
final Runnable acceptAction = new Runnable() {
public void run() {
dialog.acceptValues();
final String tagValue = myTagNameEntry.initialValue().trim();
if (tagValue.length() == 0) {
ZLDialogManager.getInstance().showErrorBox("tagMustBeNonEmpty", EditTagDialog.this);
return;
}
if (tagValue.indexOf(',') != -1) {
ZLDialogManager.getInstance().showErrorBox("tagMustNotContainComma", EditTagDialog.this);
return;
}
if (tagValue.equals(myTag)) {
return;
}
getCollectionModel().removeAllMarks();
if (myTag == SpecialTagAllBooks) {
Collection.addTagToAllBooks(tagValue);
} else if (myTag == SpecialTagNoTagsBooks) {
Collection.addTagToBooksWithNoTags(tagValue);
} else if (myEditOrCloneEntry.getEditNotClone()) {
Collection.renameTag(myTag, tagValue, myIncludeSubtagsEntry.initialState());
} else {
Collection.cloneTag(myTag, tagValue, myIncludeSubtagsEntry.initialState());
}
updateModel();
ZLApplication.Instance().refreshWindow();
}
};
dialog.addButton(ZLDialogManager.OK_BUTTON, acceptAction);
dialog.addButton(ZLDialogManager.CANCEL_BUTTON, null);
dialog.run();
}
}
}
final class EditOrCloneEntry extends ZLChoiceOptionEntry {
private final ZLResource myResource;
private boolean myEditNotClone;
public EditOrCloneEntry(ZLResource resource, boolean editNotClone) {
myResource = resource;
myEditNotClone = editNotClone;
}
public String getText(int index) {
return (index == 0) ? myResource.getResource("edit").getValue() : myResource.getResource("clone").getValue();
}
public int choiceNumber() {
return 2;
}
public int initialCheckedIndex() {
return myEditNotClone ? 0 : 1;
}
public void onAccept(int index) {
myEditNotClone = (index == 0);
}
public boolean getEditNotClone() {
return myEditNotClone;
}
}
final class TagNameEntry extends ZLComboOptionEntry {
private final ArrayList myValuesList;
private String myValue;
private boolean myAddedManualValue;
public TagNameEntry(ArrayList valuesList, String initialValue) {
super(true);
myValuesList = valuesList;
myValue = initialValue;
}
public String initialValue() {
return myValue;
}
public ArrayList getValues() {
return myValuesList;
}
public void onAccept(String value) {
myValue = value;
if (!myValuesList.contains(value)) {
if (myAddedManualValue) {
myValuesList.set(0, value);
} else {
myAddedManualValue = true;
myValuesList.add(0, value);
}
}
}
}
final class IncludeSubtagsEntry extends ZLBooleanOptionEntry {
private boolean myValue;
public IncludeSubtagsEntry(boolean initialValue) {
myValue = initialValue;
}
public boolean initialState() {
return myValue;
}
public void onAccept(boolean state) {
myValue = state;
}
}

View file

@ -1,176 +0,0 @@
/*
* Copyright (C) 2007-2008 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.fbreader;
import java.util.*;
import org.geometerplus.zlibrary.core.options.*;
import org.geometerplus.zlibrary.core.util.*;
import org.geometerplus.zlibrary.core.dialogs.*;
import org.geometerplus.zlibrary.core.filesystem.*;
import org.geometerplus.fbreader.description.BookDescription;
import org.geometerplus.fbreader.formats.*;
public class FBFileHandler extends ZLTreeOpenHandler {
private final ZLStringOption DirectoryOption =
new ZLStringOption(ZLOption.LOOK_AND_FEEL_CATEGORY, "OpenFileDialog", "Directory", System.getProperty("user.home"));
private ZLDir myDir;
private boolean myIsUpToDate;
private final ArrayList mySubnodes = new ArrayList();
private BookDescription myDescription;
private int mySelectedIndex;
private final static String FOLDER_ICON = "folder";
private final static String ZIP_FOLDER_ICON = "zipfolder";
private final static String UPFOLDER_ICON = "upfolder";
private final static HashMap pluginIcons = new HashMap();
public FBFileHandler() {
myIsUpToDate = false;
mySelectedIndex = 0;
myDir = (new ZLFile(DirectoryOption.getValue())).getDirectory();
if (myDir == null) {
myDir = (new ZLFile(System.getProperty("user.home"))).getDirectory();
}
if (myDir == null) {
myDir = ZLDir.getRoot();
}
}
public BookDescription getDescription() {
return myDescription;
}
protected boolean accept(ZLTreeNode node) {
final String name = myDir.getItemPath(node.Id);
FormatPlugin plugin = PluginCollection.instance().getPlugin(new ZLFile(name), false);
final String message = (plugin == null) ? "Unknown File Format" : plugin.tryOpen(name);
if (message.length() != 0) {
final String boxKey = "openBookErrorBox";
ZLDialogManager.getInstance().showErrorBox(boxKey,
ZLDialogManager.getDialogMessage(boxKey) + " " + message, null);
return false;
}
myDescription = BookDescription.getDescription(name);
return true;
}
public void changeFolder(ZLTreeNode node) {
// TODO Auto-generated method stub
// id != null
ZLDir dir = new ZLFile(myDir.getItemPath(node.Id)).getDirectory();
if (dir != null) {
final String selectedId = myDir.getName();
myDir = dir;
DirectoryOption.setValue(myDir.getPath()); //?
myIsUpToDate = false;
mySubnodes.clear();
mySelectedIndex = 0;
if ("..".equals(node.Id)) {
final ArrayList subnodes = this.subnodes();
final int size = subnodes.size();
for (int index = 0; index < size; index++) {
if (((ZLTreeNode)subnodes.get(index)).Id.equals(selectedId)) {
mySelectedIndex = index;
break;
}
}
}
addUpdateInfo(ZLSelectionDialog.UPDATE_ALL);
}
}
public int selectedIndex() {
return mySelectedIndex;
}
public String stateDisplayName() {
return myDir.getPath();
}
public ArrayList subnodes() {
if (!myIsUpToDate) {
ArrayList/*<String>*/ names = myDir.collectSubDirs();
if (names != null) {
int size = names.size();
for (int i = 0; i < size; i++) {
final String subDir = (String) names.get(i);
final String displayName = new ZLFile(subDir).getName(false);
final ZLTreeNode node = new ZLTreeNode(subDir, displayName, FOLDER_ICON, true);
mySubnodes.add(node);
}
names.clear();
}
names = myDir.collectFiles();
if (names != null) {
int size = names.size();
for (int i = 0; i < size; i++) {
final String fileName = (String) names.get(i);
if ("".equals(fileName)) {
continue;
}
ZLFile file = new ZLFile(myDir.getItemPath(fileName));
final String displayName = file.getName(false);
if ("".equals(displayName)) {
continue;
}
FormatPlugin plugin = PluginCollection.instance().getPlugin(file, false);
if (plugin != null && !file.isDirectory()) {
String icon = (String) pluginIcons.get(plugin);
if (icon == null) {
icon = plugin.getIconName();
pluginIcons.put(plugin, icon);
}
final ZLTreeNode node = new ZLTreeNode(fileName, displayName, icon, false);
//fileNodeMap.put(displayName, node);
mySubnodes.add(node);
} else if (file.isArchive()) {
final ZLTreeNode node = new ZLTreeNode(fileName, displayName, ZIP_FOLDER_ICON, true);
//folderNodeMap.put(displayName, node);
mySubnodes.add(node);
}
}
}
myIsUpToDate = true;
Collections.sort(mySubnodes, new ZLTreeNodeComparator());
if (!myDir.isRoot()) {
mySubnodes.add(0, new ZLTreeNode("..", "..", UPFOLDER_ICON, true));
}
}
return mySubnodes;
}
private static class ZLTreeNodeComparator implements Comparator {
public int compare(Object o1, Object o2) {
final ZLTreeNode node1 = (ZLTreeNode)o1;
final ZLTreeNode node2 = (ZLTreeNode)o2;
if (node1.IsFolder == node2.IsFolder) {
return node1.DisplayName.compareToIgnoreCase(node2.DisplayName);
} else {
return node1.IsFolder ? -1 : 1;
}
}
}
}

View file

@ -23,6 +23,7 @@ import java.io.*;
import java.util.*; import java.util.*;
import org.geometerplus.zlibrary.core.util.*; import org.geometerplus.zlibrary.core.util.*;
import org.geometerplus.zlibrary.core.filesystem.*;
import org.geometerplus.zlibrary.core.application.*; import org.geometerplus.zlibrary.core.application.*;
import org.geometerplus.zlibrary.core.dialogs.ZLDialogManager; import org.geometerplus.zlibrary.core.dialogs.ZLDialogManager;
import org.geometerplus.zlibrary.core.library.ZLibrary; import org.geometerplus.zlibrary.core.library.ZLibrary;
@ -36,6 +37,7 @@ import org.geometerplus.zlibrary.text.hyphenation.ZLTextHyphenator;
import org.geometerplus.fbreader.bookmodel.BookModel; import org.geometerplus.fbreader.bookmodel.BookModel;
import org.geometerplus.fbreader.collection.BookCollection; import org.geometerplus.fbreader.collection.BookCollection;
import org.geometerplus.fbreader.collection.RecentBooks;
import org.geometerplus.fbreader.description.BookDescription; import org.geometerplus.fbreader.description.BookDescription;
public final class FBReader extends ZLApplication { public final class FBReader extends ZLApplication {
@ -44,9 +46,6 @@ public final class FBReader extends ZLApplication {
int BOOK_TEXT = 1 << 0; int BOOK_TEXT = 1 << 0;
int FOOTNOTE = 1 << 1; int FOOTNOTE = 1 << 1;
int CONTENTS = 1 << 2; int CONTENTS = 1 << 2;
int BOOKMARKS = 1 << 3;
int BOOK_COLLECTION = 1 << 4;
int RECENT_BOOKS = 1 << 5;
}; };
public final ZLBooleanOption UseSeparateBindingsOption = public final ZLBooleanOption UseSeparateBindingsOption =
@ -89,16 +88,10 @@ public final class FBReader extends ZLApplication {
public final BookTextView BookTextView; public final BookTextView BookTextView;
public final ContentsView ContentsView; public final ContentsView ContentsView;
public final FootnoteView FootnoteView; public final FootnoteView FootnoteView;
public final CollectionView CollectionView;
public final RecentBooksView RecentBooksView;
private BookModel myBookModel; private BookModel myBookModel;
private final String myArg0; private final String myArg0;
public FBReader() {
this(new String[0]);
}
public FBReader(String[] args) { public FBReader(String[] args) {
myArg0 = (args.length > 0) ? args[0] : null; myArg0 = (args.length > 0) ? args[0] : null;
addAction(ActionCode.TOGGLE_FULLSCREEN, new ZLApplication.FullscreenAction(true)); addAction(ActionCode.TOGGLE_FULLSCREEN, new ZLApplication.FullscreenAction(true));
@ -113,12 +106,10 @@ public final class FBReader extends ZLApplication {
addAction(ActionCode.INCREASE_FONT, new ChangeFontSizeAction(this, +2)); addAction(ActionCode.INCREASE_FONT, new ChangeFontSizeAction(this, +2));
addAction(ActionCode.DECREASE_FONT, new ChangeFontSizeAction(this, -2)); addAction(ActionCode.DECREASE_FONT, new ChangeFontSizeAction(this, -2));
addAction(ActionCode.SHOW_COLLECTION, new SetModeAction(this, ViewMode.BOOK_COLLECTION, ViewMode.BOOK_TEXT | ViewMode.CONTENTS | ViewMode.RECENT_BOOKS)); addAction(ActionCode.SHOW_LIBRARY, new ShowLibrary(this));
addAction(ActionCode.SHOW_LAST_BOOKS, new SetModeAction(this, ViewMode.RECENT_BOOKS, ViewMode.BOOK_TEXT | ViewMode.CONTENTS));
addAction(ActionCode.SHOW_OPTIONS, new ShowOptionsDialogAction(this)); addAction(ActionCode.SHOW_OPTIONS, new ShowOptionsDialogAction(this));
addAction(ActionCode.SHOW_CONTENTS, new ShowContentsAction(this)); addAction(ActionCode.SHOW_CONTENTS, new ShowContentsAction(this));
addAction(ActionCode.SHOW_BOOK_INFO, new ShowBookInfoDialogAction(this)); addAction(ActionCode.SHOW_BOOK_INFO, new ShowBookInfoDialogAction(this));
addAction(ActionCode.ADD_BOOK, new AddBookAction(this));
addAction(ActionCode.SEARCH, new SearchAction(this)); addAction(ActionCode.SEARCH, new SearchAction(this));
addAction(ActionCode.FIND_NEXT, new FindNextAction(this)); addAction(ActionCode.FIND_NEXT, new FindNextAction(this));
@ -132,7 +123,6 @@ public final class FBReader extends ZLApplication {
addAction(ActionCode.TRACKBALL_SCROLL_FORWARD, new ScrollingAction(this, TrackballScrollingOptions, true)); addAction(ActionCode.TRACKBALL_SCROLL_FORWARD, new ScrollingAction(this, TrackballScrollingOptions, true));
addAction(ActionCode.TRACKBALL_SCROLL_BACKWARD, new ScrollingAction(this, TrackballScrollingOptions, false)); addAction(ActionCode.TRACKBALL_SCROLL_BACKWARD, new ScrollingAction(this, TrackballScrollingOptions, false));
addAction(ActionCode.CANCEL, new CancelAction(this)); addAction(ActionCode.CANCEL, new CancelAction(this));
addAction(ActionCode.OPEN_PREVIOUS_BOOK, new OpenPreviousBookAction(this));
addAction(ActionCode.SHOW_HELP, new ShowHelpAction(this)); addAction(ActionCode.SHOW_HELP, new ShowHelpAction(this));
addAction(ActionCode.GOTO_NEXT_TOC_SECTION, new DummyAction(this)); addAction(ActionCode.GOTO_NEXT_TOC_SECTION, new DummyAction(this));
addAction(ActionCode.GOTO_PREVIOUS_TOC_SECTION, new DummyAction(this)); addAction(ActionCode.GOTO_PREVIOUS_TOC_SECTION, new DummyAction(this));
@ -144,8 +134,6 @@ public final class FBReader extends ZLApplication {
BookTextView = new BookTextView(context); BookTextView = new BookTextView(context);
ContentsView = new ContentsView(context); ContentsView = new ContentsView(context);
FootnoteView = new FootnoteView(context); FootnoteView = new FootnoteView(context);
CollectionView = new CollectionView(context);
RecentBooksView = new RecentBooksView(context);
setMode(ViewMode.BOOK_TEXT); setMode(ViewMode.BOOK_TEXT);
} }
@ -160,15 +148,9 @@ public final class FBReader extends ZLApplication {
} catch (IOException e) { } catch (IOException e) {
} }
} }
BookDescription description = BookDescription.getDescription(fileName); if (!openFile(fileName) && !openFile(myBookNameOption.getValue())) {
if (description == null) { openFile(getHelpFileName());
description = BookDescription.getDescription(myBookNameOption.getValue());
} }
if (description == null) {
description = BookDescription.getDescription(getHelpFileName());
}
openBook(description);
refreshWindow();
} }
public void openBook(BookDescription bookDescription) { public void openBook(BookDescription bookDescription) {
@ -222,22 +204,6 @@ public final class FBReader extends ZLApplication {
case ViewMode.FOOTNOTE: case ViewMode.FOOTNOTE:
setView(FootnoteView); setView(FootnoteView);
break; break;
case ViewMode.RECENT_BOOKS:
RecentBooksView.rebuild();
setView(RecentBooksView);
break;
case ViewMode.BOOK_COLLECTION:
Runnable action = new Runnable() {
public void run() {
CollectionView.updateModel();
if (myBookModel != null) {
CollectionView.selectBook(myBookModel.Description);
}
setView(CollectionView);
}
};
ZLDialogManager.getInstance().wait("loadingBookList", action);
break;
default: default:
break; break;
} }
@ -270,8 +236,6 @@ public final class FBReader extends ZLApplication {
BookTextView.clearCaches(); BookTextView.clearCaches();
ContentsView.clearCaches(); ContentsView.clearCaches();
FootnoteView.clearCaches(); FootnoteView.clearCaches();
CollectionView.clearCaches();
RecentBooksView.clearCaches();
} }
void openBookInternal(BookDescription description) { void openBookInternal(BookDescription description) {
@ -298,7 +262,7 @@ public final class FBReader extends ZLApplication {
FootnoteView.setCaption(description.getTitle()); FootnoteView.setCaption(description.getTitle());
ContentsView.setModel(myBookModel.ContentsModel); ContentsView.setModel(myBookModel.ContentsModel);
ContentsView.setCaption(description.getTitle()); ContentsView.setCaption(description.getTitle());
RecentBooksView.lastBooks().addBook(fileName); RecentBooks.Instance().addBook(fileName);
} }
resetWindowCaption(); resetWindowCaption();
refreshWindow(); refreshWindow();
@ -323,11 +287,34 @@ public final class FBReader extends ZLApplication {
} }
@Override @Override
public void openFile(String fileName) { public boolean openFile(String fileName) {
if (fileName == null) {
return false;
}
BookDescription description = BookDescription.getDescription(fileName); BookDescription description = BookDescription.getDescription(fileName);
if (description == null) {
final ZLFile file = new ZLFile(fileName);
if (file.isArchive()) {
final ZLDir directory = file.getDirectory();
if (directory != null) {
final ArrayList items = directory.collectFiles();
final int size = items.size();
for (int i = 0; i < size; ++i) {
final String itemFileName = directory.getItemPath((String)items.get(i));
description = BookDescription.getDescription(itemFileName);
if (description != null) {
break;
}
}
}
}
}
if (description != null) { if (description != null) {
openBook(description); openBook(description);
refreshWindow(); refreshWindow();
return true;
} else {
return false;
} }
} }

View file

@ -1,91 +0,0 @@
/*
* Copyright (C) 2007-2008 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.fbreader;
import java.util.*;
import org.geometerplus.zlibrary.core.util.*;
import org.geometerplus.zlibrary.core.view.ZLPaintContext;
import org.geometerplus.zlibrary.core.application.ZLApplication;
import org.geometerplus.zlibrary.text.model.*;
import org.geometerplus.fbreader.bookmodel.FBTextKind;
import org.geometerplus.fbreader.collection.BookCollection;
import org.geometerplus.fbreader.description.BookDescription;
public class RecentBooksView extends FBView {
private static final String LIBRARY = "Recent Books";
private BookCollection.LastOpenedBooks myLastBooks = new BookCollection.LastOpenedBooks();
public RecentBooksView(ZLPaintContext context) {
super(context);
}
public String getCaption() {
return LIBRARY;
}
//TODO
public void rebuild() {
setModel(null);//, LIBRARY);
}
public boolean onStylusRelease(int x, int y) {
if (super.onStylusRelease(x, y)) {
return false;
}
final ArrayList/*<BookDescription>*/ books = myLastBooks.books();
int index = getParagraphIndexByCoordinate(y);
if ((index == -1) || (index >= (int)books.size())) {
return false;
}
final FBReader fbreader = (FBReader)ZLApplication.Instance();
fbreader.openBook((BookDescription)books.get(index));
fbreader.showBookTextView();
return true;
}
public void paint() {
if (getModel() == null) {
final ZLTextPlainModel recentBooksModel = new ZLTextPlainModel(1024);;
final ArrayList books = myLastBooks.books();
for (int i = 0 ; i < books.size(); i++) {
BookDescription it = (BookDescription)books.get(i);
recentBooksModel.createParagraph(ZLTextParagraph.Kind.TEXT_PARAGRAPH);
recentBooksModel.addControl(FBTextKind.RECENT_BOOK_LIST, true);
recentBooksModel.addControl(FBTextKind.LIBRARY_AUTHOR_ENTRY, true);
recentBooksModel.addText((it.getAuthor().getDisplayName() + ". ").toCharArray());
recentBooksModel.addControl(FBTextKind.LIBRARY_AUTHOR_ENTRY, false);
recentBooksModel.addControl(FBTextKind.LIBRARY_BOOK_ENTRY, true);
recentBooksModel.addText(it.getTitle().toCharArray());
}
setModel(recentBooksModel);
}
super.paint();
}
public BookCollection.LastOpenedBooks lastBooks() {
return myLastBooks;
}
}

View file

@ -31,15 +31,13 @@ class ShowBookInfoDialogAction extends FBAction {
} }
public void run() { public void run() {
final BookCollection collection = Reader.CollectionView.Collection;
final String fileName = Reader.BookTextView.getFileName(); final String fileName = Reader.BookTextView.getFileName();
Runnable action = new Runnable() { Runnable action = new Runnable() {
public void run() { public void run() {
Reader.openFile(fileName); Reader.openFile(fileName);
collection.rebuild(false);
Reader.refreshWindow(); Reader.refreshWindow();
} }
}; };
new BookInfoDialog(collection, fileName, action).getDialog().run(); new BookInfoDialog(fileName, action).getDialog().run();
} }
} }

View file

@ -0,0 +1,53 @@
/*
* Copyright (C) 2007-2008 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.fbreader;
import org.geometerplus.fbreader.collection.BookCollection;
import org.geometerplus.android.fbreader.LibraryTabActivity;
import org.geometerplus.zlibrary.ui.android.dialogs.ZLAndroidDialogManager;
class ShowLibrary extends FBAction {
ShowLibrary(FBReader fbreader) {
super(fbreader);
}
public void run() {
final ZLAndroidDialogManager dialogManager =
(ZLAndroidDialogManager)ZLAndroidDialogManager.getInstance();
Runnable action = new Runnable() {
public void run() {
BookCollection collection = BookCollection.Instance();
collection.rebuild();
collection.synchronize();
// TODO: select current book (author?)
/*
if (myBookModel != null) {
CollectionView.selectBook(myBookModel.Description);
}
*/
//setView(CollectionView);
dialogManager.runActivity(LibraryTabActivity.class);
}
};
dialogManager.wait("loadingBookList", action);
}
}

View file

@ -96,9 +96,7 @@ public class KeyBindingsPage {
addAction(ZLApplication.NoAction); addAction(ZLApplication.NoAction);
// switch view // switch view
addAction(ActionCode.SHOW_COLLECTION); addAction(ActionCode.SHOW_LIBRARY);
addAction(ActionCode.SHOW_LAST_BOOKS);
addAction(ActionCode.OPEN_PREVIOUS_BOOK);
addAction(ActionCode.SHOW_CONTENTS); addAction(ActionCode.SHOW_CONTENTS);
// navigation // navigation
@ -130,7 +128,6 @@ public class KeyBindingsPage {
// dialogs // dialogs
addAction(ActionCode.SHOW_OPTIONS); addAction(ActionCode.SHOW_OPTIONS);
addAction(ActionCode.SHOW_BOOK_INFO); addAction(ActionCode.SHOW_BOOK_INFO);
addAction(ActionCode.ADD_BOOK);
// quit // quit
addAction(ActionCode.CANCEL); addAction(ActionCode.CANCEL);

View file

@ -41,19 +41,6 @@ public class OptionsDialog {
final ZLTextBaseStyle baseStyle = ZLTextStyleCollection.getInstance().baseStyle(); final ZLTextBaseStyle baseStyle = ZLTextStyleCollection.getInstance().baseStyle();
myDialog = ZLDialogManager.getInstance().createOptionsDialog("OptionsDialog", null, new OptionsApplyRunnable(fbreader), true); myDialog = ZLDialogManager.getInstance().createOptionsDialog("OptionsDialog", null, new OptionsApplyRunnable(fbreader), true);
final ZLDialogContent libraryTab = myDialog.createTab("Library");
final CollectionView collectionView = fbreader.CollectionView;
final BookCollection collection = collectionView.Collection;
libraryTab.addOption("bookPath", collection.PathOption);
libraryTab.addOption("lookInSubdirectories", collection.ScanSubdirsOption);
libraryTab.addOption("recentListSize", new ZLSimpleSpinOptionEntry(fbreader.RecentBooksView.lastBooks().MaxListSizeOption, 1));
ZLToggleBooleanOptionEntry showTagsEntry = new ZLToggleBooleanOptionEntry(collectionView.ShowTagsOption);
ZLOptionEntry showAllBooksTagEntry = new ZLSimpleBooleanOptionEntry(collectionView.ShowAllBooksTagOption);
showTagsEntry.addDependentEntry(showAllBooksTagEntry);
libraryTab.addOption("showTags", showTagsEntry);
libraryTab.addOption("showAllBooksList", showAllBooksTagEntry);
showTagsEntry.onStateChanged(showTagsEntry.initialState());
final ZLDialogContent encodingTab = myDialog.createTab("Language"); final ZLDialogContent encodingTab = myDialog.createTab("Language");
encodingTab.addOption("autoDetect", new ZLSimpleBooleanOptionEntry(PluginCollection.instance().LanguageAutoDetectOption)); encodingTab.addOption("autoDetect", new ZLSimpleBooleanOptionEntry(PluginCollection.instance().LanguageAutoDetectOption));
encodingTab.addOption("defaultLanguage", new ZLLanguageOptionEntry(PluginCollection.instance().DefaultLanguageOption, ZLLanguageList.languageCodes())); encodingTab.addOption("defaultLanguage", new ZLLanguageOptionEntry(PluginCollection.instance().DefaultLanguageOption, ZLLanguageList.languageCodes()));
@ -123,7 +110,6 @@ public class OptionsDialog {
public void run() { public void run() {
myFBReader.grabAllKeys(myFBReader.KeyboardControlOption.getValue()); myFBReader.grabAllKeys(myFBReader.KeyboardControlOption.getValue());
myFBReader.clearTextCaches(); myFBReader.clearTextCaches();
myFBReader.CollectionView.synchronizeModel();
myFBReader.refreshWindow(); myFBReader.refreshWindow();
} }
} }

View file

@ -219,9 +219,7 @@ public abstract class ZLApplication {
public void onWindowClosing() { public void onWindowClosing() {
} }
public void openFile(String fileName) { public abstract boolean openFile(String fileName);
// TODO: implement or change to abstract
}
public final void presentWindow() { public final void presentWindow() {
if (myWindow != null) { if (myWindow != null) {

View file

@ -43,8 +43,6 @@ public abstract class ZLDialogManager {
return ourInstance; return ourInstance;
} }
public abstract void runSelectionDialog(String key, ZLTreeHandler handler, Runnable actionOnAccept);
public abstract void showInformationBox(String key, String message); public abstract void showInformationBox(String key, String message);
public final void showInformationBox(String key) { public final void showInformationBox(String key) {

View file

@ -1,111 +0,0 @@
/*
* Copyright (C) 2007-2008 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.zlibrary.core.dialogs;
import java.util.*;
import org.geometerplus.zlibrary.core.util.*;
public abstract class ZLSelectionDialog {
public final static int UPDATE_NONE = 0;
public final static int UPDATE_STATE = 1;
public final static int UPDATE_LIST = 2;
public final static int UPDATE_SELECTION = 4;
public final static int UPDATE_ALL = UPDATE_STATE | UPDATE_LIST | UPDATE_SELECTION;
private final ZLTreeHandler myHandler;
protected ZLSelectionDialog(ZLTreeHandler myHandler) {
this.myHandler = myHandler;
}
private void updateSelection() {
ArrayList nodes = handler().subnodes();
if (nodes.size() == 0) {
return;
}
int index = handler().selectedIndex();
if ((index < 0) || (index >= nodes.size())) {
if (handler().isOpenHandler()) {
index = 0;
} else {
return;
}
}
selectItem(index);
}
protected ZLTreeHandler handler() {
return myHandler;
}
protected void runNode(ZLTreeNode node) {
if (node == null) {
return;
}
if (node.IsFolder) {
myHandler.changeFolder(node);
update();
} else if (myHandler.isOpenHandler()) {
if (((ZLTreeOpenHandler)myHandler).accept(node)) {
exitDialog();
} else {
update();
}
} else {
((ZLTreeSaveHandler)myHandler).processNode(node);
update();
}
}
protected void runState(String state) {
if (!myHandler.isOpenHandler()) {
if (((ZLTreeSaveHandler)myHandler).accept(state)) {
exitDialog();
}
}
}
protected void invalidateAll() {
handler().invalidateUpdateInfo();
}
protected void update() {
int info = handler().updateInfo();
if ((info & UPDATE_STATE) != 0) {
updateStateLine();
}
if ((info & UPDATE_LIST) != 0) {
updateList();
}
if ((info & UPDATE_SELECTION) != 0) {
updateSelection();
}
handler().resetUpdateInfo();
}
protected abstract void exitDialog();
protected abstract void updateStateLine();
protected abstract void updateList();
protected abstract void selectItem(int index);
}

View file

@ -1,57 +0,0 @@
/*
* Copyright (C) 2007-2008 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.zlibrary.core.dialogs;
import java.util.*;
import org.geometerplus.zlibrary.core.util.*;
public abstract class ZLTreeHandler {
private int myUpdateInfo;
protected ZLTreeHandler() {
myUpdateInfo = ZLSelectionDialog.UPDATE_ALL;
}
protected void addUpdateInfo(int info) {
myUpdateInfo = myUpdateInfo | info;
}
public int updateInfo() {
return myUpdateInfo;
}
public void invalidateUpdateInfo() {
myUpdateInfo = ZLSelectionDialog.UPDATE_ALL;
}
public void resetUpdateInfo() {
myUpdateInfo = ZLSelectionDialog.UPDATE_NONE;
}
public abstract boolean isOpenHandler();
public abstract String stateDisplayName();
public abstract ArrayList subnodes();
public abstract int selectedIndex();
public abstract void changeFolder(ZLTreeNode node);
}

View file

@ -1,34 +0,0 @@
/*
* Copyright (C) 2007-2008 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.zlibrary.core.dialogs;
public final class ZLTreeNode {
public final String Id;
public final String DisplayName;
public final String PixmapName;
public final boolean IsFolder;
public ZLTreeNode(String id, String displayName, String pixmapName, boolean isFolder) {
Id = id;
DisplayName = displayName;
PixmapName = pixmapName;
IsFolder = isFolder;
}
}

View file

@ -1,30 +0,0 @@
/*
* Copyright (C) 2007-2008 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.zlibrary.core.dialogs;
public abstract class ZLTreeSaveHandler extends ZLTreeHandler {
public boolean isOpenHandler() {
return false;
}
public abstract void processNode(ZLTreeNode node);
public abstract boolean accept(String state);
}

View file

@ -17,74 +17,74 @@
* 02110-1301, USA. * 02110-1301, USA.
*/ */
package org.geometerplus.zlibrary.core.filesystem; package org.geometerplus.zlibrary.core.filesystem;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
import org.geometerplus.zlibrary.core.util.*; import org.geometerplus.zlibrary.core.util.*;
public abstract class ZLDir { public abstract class ZLDir {
protected String myPath; protected String myPath;
public static ZLDir getRoot() { public static ZLDir getRoot() {
return ZLFSUtil.getRootDirectory(); return ZLFSUtil.getRootDirectory();
} }
ZLDir(String path) { ZLDir(String path) {
myPath = path; myPath = path;
} }
public String getPath() { public String getPath() {
return myPath; return myPath;
} }
public String getName() { public String getName() {
int index = ZLFSUtil.findLastFileNameDelimiter(myPath); int index = ZLFSUtil.findLastFileNameDelimiter(myPath);
return myPath.substring(index + 1); return myPath.substring(index + 1);
} }
public String getParentPath() { public String getParentPath() {
return ZLFSUtil.getParentPath(myPath); return ZLFSUtil.getParentPath(myPath);
} }
public String getItemPath(String itemName) { public String getItemPath(String itemName) {
if (itemName == "..") { if (itemName == "..") {
return getParentPath(); return getParentPath();
} else { } else {
return myPath.endsWith(File.separator) || myPath == "" ? myPath + itemName : myPath + getDelimiter() + itemName; return myPath.endsWith(File.separator) || myPath == "" ? myPath + itemName : myPath + getDelimiter() + itemName;
} }
} }
public boolean isRoot() { public boolean isRoot() {
return ZLFSUtil.getRootDirectoryPath().equals(myPath); return ZLFSUtil.getRootDirectoryPath().equals(myPath);
} }
//TODO "" - windows "/"--unix //TODO "" - windows "/"--unix
public ZLDir getRootDirectory() { public ZLDir getRootDirectory() {
return new ZLFSDir(getRootDirectoryPath()); return new ZLFSDir(getRootDirectoryPath());
} }
public String getRootDirectoryPath() { public String getRootDirectoryPath() {
return File.listRoots().length == 1 ? File.listRoots()[0].getPath() : ""; return File.listRoots().length == 1 ? File.listRoots()[0].getPath() : "";
} }
public String getParentPath(String path) { public String getParentPath(String path) {
File file = new File(path); File file = new File(path);
String parent = file.getParent(); String parent = file.getParent();
if (parent == null) { if (parent == null) {
File [] roots = File.listRoots(); File [] roots = File.listRoots();
for (int i = 0; i < roots.length; i++) { for (int i = 0; i < roots.length; i++) {
if (roots[i].equals(file)) { if (roots[i].equals(file)) {
parent = getRootDirectoryPath(); parent = getRootDirectoryPath();
break; break;
} }
} }
} }
return parent; return parent;
} }
abstract public ArrayList collectSubDirs(); abstract public ArrayList collectSubDirs();
abstract public ArrayList collectFiles(); abstract public ArrayList collectFiles();
abstract protected String getDelimiter(); abstract protected String getDelimiter();
} }

View file

@ -21,7 +21,7 @@ package org.geometerplus.zlibrary.core.filesystem;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
import java.util.zip.*; import org.amse.ys.zip.*;
import org.geometerplus.zlibrary.core.util.*; import org.geometerplus.zlibrary.core.util.*;
import org.geometerplus.zlibrary.core.library.ZLibrary; import org.geometerplus.zlibrary.core.library.ZLibrary;
@ -62,7 +62,6 @@ public class ZLFile {
File file = new File(path); File file = new File(path);
info.Exists = file.exists() || ZLFSUtil.getRootDirectoryPath().equals(path);; info.Exists = file.exists() || ZLFSUtil.getRootDirectoryPath().equals(path);;
info.Size = file.length(); info.Size = file.length();
info.MTime = file.lastModified();
info.IsDirectory = file.isDirectory() || ZLFSUtil.getRootDirectoryPath().equals(path); info.IsDirectory = file.isDirectory() || ZLFSUtil.getRootDirectoryPath().equals(path);
return info; return info;
} }
@ -137,12 +136,6 @@ public class ZLFile {
return myInfo.Exists; return myInfo.Exists;
} }
public long getMTime() {
if (myInfo == null)
fillInfo();
return myInfo.MTime;
}
public long size() { public long size() {
if (myInfo == null) if (myInfo == null)
fillInfo(); fillInfo();
@ -217,19 +210,13 @@ public class ZLFile {
InputStream base = baseFile.getInputStream(); InputStream base = baseFile.getInputStream();
if (base != null) { if (base != null) {
if (0 != (baseFile.myArchiveType & ArchiveType.ZIP)) { if (0 != (baseFile.myArchiveType & ArchiveType.ZIP)) {
/*
ZipFile zf = new ZipFile(myPath.substring(0, index)); ZipFile zf = new ZipFile(myPath.substring(0, index));
ZipEntry entry = zf.getEntry (myPath.substring(index+1)); /*
stream = zf.getInputStream (entry); ZipEntry entry = zf.getEntry(myPath.substring(index+1));
stream = zf.getInputStream(entry);
*/ */
final org.amse.ys.zip.ZipInputStream zipStream = new org.amse.ys.zip.ZipInputStream(myPath.substring(0, index));
//final ZipInputStream zipStream = new ZipInputStream(base);
final String entryName = myPath.substring(index + 1); final String entryName = myPath.substring(index + 1);
try { stream = zf.getInputStream(entryName);
zipStream.openFile(entryName);
stream = zipStream;
} catch (org.amse.ys.zip.WrongZipFormatException e) {
}
/* /*
while (true) { while (true) {
ZipEntry entry = zipStream.getNextEntry(); ZipEntry entry = zipStream.getNextEntry();
@ -249,7 +236,7 @@ public class ZLFile {
if (stream != null) { if (stream != null) {
if (0 != (myArchiveType & ArchiveType.GZIP)) { if (0 != (myArchiveType & ArchiveType.GZIP)) {
return new GZIPInputStream(stream, 8192); return new java.util.zip.GZIPInputStream(stream, 8192);
} }
//if (0 != (myArchiveType & ArchiveType.BZIP2)) { //if (0 != (myArchiveType & ArchiveType.BZIP2)) {
//return new ZLBzip2InputStream(stream); //return new ZLBzip2InputStream(stream);

View file

@ -17,11 +17,10 @@
* 02110-1301, USA. * 02110-1301, USA.
*/ */
package org.geometerplus.zlibrary.core.filesystem; package org.geometerplus.zlibrary.core.filesystem;
class ZLFileInfo { class ZLFileInfo {
public boolean Exists; public boolean Exists;
public boolean IsDirectory; public boolean IsDirectory;
public long MTime; public long Size;
public long Size; }
}

View file

@ -21,7 +21,7 @@ package org.geometerplus.zlibrary.core.filesystem;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
import java.util.zip.*; import org.amse.ys.zip.*;
import org.geometerplus.zlibrary.core.util.*; import org.geometerplus.zlibrary.core.util.*;
public class ZLZipDir extends ZLDir { public class ZLZipDir extends ZLDir {
@ -42,27 +42,34 @@ public class ZLZipDir extends ZLDir {
}; };
public ArrayList/*<String>*/ collectFiles() { public ArrayList/*<String>*/ collectFiles() {
File[] dirs = myFile.listFiles();
ArrayList/*<String>*/ newdirs = new ArrayList();
ZipFile zf = null; ZipFile zf = null;
try { try {
zf = new ZipFile(myFile); zf = new ZipFile(myFile.getCanonicalPath());
} catch (ZipException e) {
// TODO Auto-generated catch block
//e.printStackTrace();
} catch (IOException e) { } catch (IOException e) {
// TODO Auto-generated catch block
//e.printStackTrace();
} }
if ((zf == null) || (zf.entries() == null)) { if (zf == null) {
return EMPTY; return EMPTY;
} }
Enumeration/*ZipEntry*/ en = zf.entries();
while (en.hasMoreElements()) { ArrayList fileNames = new ArrayList();
ZipEntry entry = (ZipEntry)en.nextElement(); for (LocalFileHeader header : zf.headers()) {
newdirs.add(entry.getName()); fileNames.add(header.FileName);
} }
return newdirs; return fileNames;
// try {
// zf = new ZipFile(myFile);
// } catch (ZipException e) {
// } catch (IOException e) {
// }
// if ((zf == null) || (zf.entries() == null)) {
// return EMPTY;
// }
// Enumeration/*ZipEntry*/ en = zf.entries();
// while (en.hasMoreElements()) {
// ZipEntry entry = (ZipEntry)en.nextElement();
// fileNames.add(entry.getName());
// }
// return fileNames;
} }
} }