git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Code cleanup: Libraries/Readers
[fanfix.git]
/
src
/
be
/
nikiroo
/
fanfix
/
reader
/
GuiReader.java
diff --git
a/src/be/nikiroo/fanfix/reader/GuiReader.java
b/src/be/nikiroo/fanfix/reader/GuiReader.java
index cdf80d0c9fda7b3d02b0d4b7d045a011f877b551..06b3473c74c95f9abe7035f78852b3a1604938f4 100644
(file)
--- a/
src/be/nikiroo/fanfix/reader/GuiReader.java
+++ b/
src/be/nikiroo/fanfix/reader/GuiReader.java
@@
-13,10
+13,10
@@
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
import be.nikiroo.fanfix.Instance;
import javax.swing.event.HyperlinkListener;
import be.nikiroo.fanfix.Instance;
-import be.nikiroo.fanfix.LocalLibrary;
import be.nikiroo.fanfix.VersionCheck;
import be.nikiroo.fanfix.bundles.UiConfig;
import be.nikiroo.fanfix.data.Story;
import be.nikiroo.fanfix.VersionCheck;
import be.nikiroo.fanfix.bundles.UiConfig;
import be.nikiroo.fanfix.data.Story;
+import be.nikiroo.fanfix.library.LocalLibrary;
import be.nikiroo.fanfix.output.BasicOutput.OutputType;
import be.nikiroo.utils.Progress;
import be.nikiroo.utils.Version;
import be.nikiroo.fanfix.output.BasicOutput.OutputType;
import be.nikiroo.utils.Progress;
import be.nikiroo.utils.Version;
@@
-69,7
+69,6
@@
class GuiReader extends BasicReader {
localLibrary = new LocalLibrary(dir, text, images);
}
localLibrary = new LocalLibrary(dir, text, images);
}
- @Override
public void read() throws IOException {
if (getStory() == null) {
throw new IOException("No story to read");
public void read() throws IOException {
if (getStory() == null) {
throw new IOException("No story to read");
@@
-78,7
+77,6
@@
class GuiReader extends BasicReader {
open(getStory().getMeta().getLuid(), null);
}
open(getStory().getMeta().getLuid(), null);
}
- @Override
public void read(int chapter) throws IOException {
// TODO: show a special page?
read();
public void read(int chapter) throws IOException {
// TODO: show a special page?
read();
@@
-105,7
+103,7
@@
class GuiReader extends BasicReader {
}
try {
}
try {
- Story story =
Instance.
getLibrary().getStory(luid, pgGetStory);
+ Story story = getLibrary().getStory(luid, pgGetStory);
if (story != null) {
story = localLibrary.save(story, luid, pgSave);
} else {
if (story != null) {
story = localLibrary.save(story, luid, pgSave);
} else {
@@
-131,7
+129,6
@@
class GuiReader extends BasicReader {
return localLibrary.getInfo(luid) != null;
}
return localLibrary.getInfo(luid) != null;
}
- @Override
public void browse(String type) {
// TODO: improve presentation of update message
final VersionCheck updates = VersionCheck.check();
public void browse(String type) {
// TODO: improve presentation of update message
final VersionCheck updates = VersionCheck.check();
@@
-189,8
+186,7
@@
class GuiReader extends BasicReader {
}
}
}
}
- new GuiReaderFrame(GuiReader.this, typeFinal)
- .setVisible(true);
+ new GuiReaderFrame(GuiReader.this, typeFinal).setVisible(true);
}
});
}
}
});
}
@@
-208,7
+204,7
@@
class GuiReader extends BasicReader {
void delete(String luid) {
try {
localLibrary.delete(luid);
void delete(String luid) {
try {
localLibrary.delete(luid);
-
Instance.
getLibrary().delete(luid);
+ getLibrary().delete(luid);
} catch (IOException e) {
Instance.syserr(e);
}
} catch (IOException e) {
Instance.syserr(e);
}
@@
-228,7
+224,7
@@
class GuiReader extends BasicReader {
void changeType(String luid, String newType) {
try {
localLibrary.changeSource(luid, newType, null);
void changeType(String luid, String newType) {
try {
localLibrary.changeSource(luid, newType, null);
-
Instance.
getLibrary().changeSource(luid, newType, null);
+ getLibrary().changeSource(luid, newType, null);
} catch (IOException e) {
Instance.syserr(e);
}
} catch (IOException e) {
Instance.syserr(e);
}