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
Progress handling in BasicOutput
[fanfix.git]
/
src
/
be
/
nikiroo
/
fanfix
/
Main.java
diff --git
a/src/be/nikiroo/fanfix/Main.java
b/src/be/nikiroo/fanfix/Main.java
index ed5664a7f1a41236f72d6c05658b144df2054cc0..09635da1e20243482401c5da545378ee97243489 100644
(file)
--- a/
src/be/nikiroo/fanfix/Main.java
+++ b/
src/be/nikiroo/fanfix/Main.java
@@
-14,7
+14,7
@@
import be.nikiroo.fanfix.reader.BasicReader;
import be.nikiroo.fanfix.reader.BasicReader.ReaderType;
import be.nikiroo.fanfix.supported.BasicSupport;
import be.nikiroo.fanfix.supported.BasicSupport.SupportType;
import be.nikiroo.fanfix.reader.BasicReader.ReaderType;
import be.nikiroo.fanfix.supported.BasicSupport;
import be.nikiroo.fanfix.supported.BasicSupport.SupportType;
-import be.nikiroo.utils.UIUtils;
+import be.nikiroo.utils.
ui.
UIUtils;
import be.nikiroo.utils.ui.Progress;
/**
import be.nikiroo.utils.ui.Progress;
/**
@@
-411,12
+411,19
@@
public class Main {
BasicSupport support = BasicSupport.getSupport(source);
if (support != null) {
BasicSupport support = BasicSupport.getSupport(source);
if (support != null) {
- Story story = support.process(source, pg);
+ Progress pgIn = new Progress();
+ Progress pgOut = new Progress();
+ if (pg != null) {
+ pg.setMax(2);
+ pg.addProgress(pgIn, 1);
+ pg.addProgress(pgOut, 1);
+ }
+ Story story = support.process(source, pgIn);
try {
target = new File(target).getAbsolutePath();
BasicOutput.getOutput(type, infoCover).process(
try {
target = new File(target).getAbsolutePath();
BasicOutput.getOutput(type, infoCover).process(
- story, target);
+ story, target
, pgOut
);
} catch (IOException e) {
Instance.syserr(new IOException(trans(
StringId.ERR_SAVING, target), e));
} catch (IOException e) {
Instance.syserr(new IOException(trans(
StringId.ERR_SAVING, target), e));