X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;ds=sidebyside;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Freader%2Fui%2FGuiReaderMainPanel.java;h=bae2742733b474c1f81e3c734a3cebb1e503d84d;hb=4606c850ef0bb0b29b4891d6a4a462aeff42830e;hp=8593fe6471c816812220defeedf5775fe1757642;hpb=1feb447473d8176c3a218cc209c681fb41d468d1;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/reader/ui/GuiReaderMainPanel.java b/src/be/nikiroo/fanfix/reader/ui/GuiReaderMainPanel.java index 8593fe6..bae2742 100644 --- a/src/be/nikiroo/fanfix/reader/ui/GuiReaderMainPanel.java +++ b/src/be/nikiroo/fanfix/reader/ui/GuiReaderMainPanel.java @@ -108,18 +108,18 @@ class GuiReaderMainPanel extends JPanel { } /** - * A {@link Runnable} with a {@link Story} parameter. + * A {@link Runnable} with a {@link MetaData} parameter. * * @author niki */ - public interface StoryRunnable { + public interface MetaDataRunnable { /** * Run the action. * - * @param story - * the story + * @param meta + * the meta of the story */ - public void run(Story story); + public void run(MetaData meta); } /** @@ -517,7 +517,8 @@ class GuiReaderMainPanel extends JPanel { // No data will be handled } - if (clipboard == null || !clipboard.startsWith("http")) { + if (clipboard == null || !(clipboard.startsWith("http://") || // + clipboard.startsWith("https://"))) { clipboard = ""; } @@ -548,7 +549,7 @@ class GuiReaderMainPanel extends JPanel { * @param onSuccessPgName * the name to use for the onSuccess progress bar */ - public void imprt(final String url, final StoryRunnable onSuccess, + public void imprt(final String url, final MetaDataRunnable onSuccess, String onSuccessPgName) { final Progress pg = new Progress(); final Progress pgImprt = new Progress(); @@ -560,9 +561,9 @@ class GuiReaderMainPanel extends JPanel { @Override public void run() { Exception ex = null; - Story story = null; + MetaData meta = null; try { - story = helper.getReader().getLibrary() + meta = helper.getReader().getLibrary() .imprt(BasicReader.getUrl(url), pgImprt); } catch (IOException e) { ex = e; @@ -586,7 +587,7 @@ class GuiReaderMainPanel extends JPanel { } } else { if (onSuccess != null) { - onSuccess.run(story); + onSuccess.run(meta); } } pgOnSuccess.done();