X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Freader%2Ftui%2FTuiReader.java;h=4da86c51e7825b719c01260aa858891d100153d2;hb=9cc8cf4a3b4b40d82e91cfcc7658c579a737bb87;hp=f94f7838c2552e41d7061cd59e3c5bb3328ca7a9;hpb=350bc060516184774f8116e61696a8c3c45ba85d;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/reader/tui/TuiReader.java b/src/be/nikiroo/fanfix/reader/tui/TuiReader.java index f94f783..4da86c5 100644 --- a/src/be/nikiroo/fanfix/reader/tui/TuiReader.java +++ b/src/be/nikiroo/fanfix/reader/tui/TuiReader.java @@ -7,6 +7,7 @@ import jexer.TApplication.BackendType; import be.nikiroo.fanfix.Instance; import be.nikiroo.fanfix.reader.BasicReader; import be.nikiroo.fanfix.reader.Reader; +import be.nikiroo.fanfix.supported.SupportType; /** * This {@link Reader}is based upon the TUI widget library 'jexer' @@ -51,10 +52,17 @@ class TuiReader extends BasicReader { @Override public void read(boolean sync) throws IOException { + // TODO + if (!sync) { + // How could you do a not-sync in TUI mode? + throw new java.lang.IllegalStateException( + "Async mode not implemented yet."); + } + try { TuiReaderApplication app = new TuiReaderApplication(this, guessBackendType()); - new Thread(app).start(); + app.run(); } catch (Exception e) { Instance.getTraceHandler().error(e); } @@ -65,9 +73,35 @@ class TuiReader extends BasicReader { try { TuiReaderApplication app = new TuiReaderApplication(this, source, guessBackendType()); - new Thread(app).start(); + app.run(); } catch (Exception e) { Instance.getTraceHandler().error(e); } } + + @Override + public void search(boolean sync) throws IOException { + // TODO + if (sync) { + throw new java.lang.IllegalStateException("Not implemented yet."); + } + } + + @Override + public void search(SupportType searchOn, String keywords, int page, + int item, boolean sync) { + // TODO + if (sync) { + throw new java.lang.IllegalStateException("Not implemented yet."); + } + } + + @Override + public void searchTag(SupportType searchOn, int page, int item, + boolean sync, Integer... tags) { + // TODO + if (sync) { + throw new java.lang.IllegalStateException("Not implemented yet."); + } + } }