- mainPanel.imprt(
- meta.getUrl(),
- new StoryRunnable() {
- @Override
- public void run(Story story) {
- MetaData newMeta = story.getMeta();
- if (!newMeta.getSource().equals(
- meta.getSource())) {
- reader.changeSource(newMeta.getLuid(),
- meta.getSource());
- }
- }
- },
- GuiReader
- .trans(StringIdGui.PROGRESS_CHANGE_SOURCE));
+ mainPanel.imprt(meta.getUrl(), new MetaDataRunnable() {
+ @Override
+ public void run(MetaData newMeta) {
+ if (!newMeta.getSource().equals(meta.getSource())) {
+ reader.changeSource(newMeta.getLuid(),
+ meta.getSource());
+ }
+ }
+ }, GuiReader.trans(StringIdGui.PROGRESS_CHANGE_SOURCE));
+ }
+ }
+ });
+
+ return refresh;
+ }
+
+ /**
+ * Create the download to cache menu item.
+ *
+ * @return the item
+ */
+ private JMenuItem createMenuItemDownloadToCache() {
+ JMenuItem refresh = new JMenuItem(
+ GuiReader.trans(StringIdGui.MENU_EDIT_DOWNLOAD_TO_CACHE),
+ KeyEvent.VK_T);
+ refresh.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ final GuiReaderBook selectedBook = mainPanel.getSelectedBook();
+ if (selectedBook != null) {
+ mainPanel.prefetchBook(selectedBook);