+ public void actionPerformed(ActionEvent ae) {
+ final GuiReaderBook selectedBook = mainPanel.getSelectedBook();
+ if (selectedBook != null) {
+ BasicLibrary lib = reader.getLibrary();
+ String luid = selectedBook.getInfo().getMeta().getLuid();
+ String source = selectedBook.getInfo().getMeta()
+ .getSource();
+
+ try {
+ lib.setSourceCover(source, luid);
+ } catch (IOException e) {
+ error(e.getLocalizedMessage(), "IOException", e);
+ }
+
+ GuiReaderBookInfo sourceInfo = GuiReaderBookInfo
+ .fromSource(lib, source);
+ GuiReaderCoverImager.clearIcon(sourceInfo);
+ }
+ }
+ });
+
+ return open;
+ }
+
+ /**
+ * Create the SetCover menu item for a book to change the linked source
+ * cover.
+ *
+ * @return the item
+ */
+ private JMenuItem createMenuItemSetCoverForAuthor() {
+ JMenuItem open = new JMenuItem(
+ GuiReader.trans(StringIdGui.MENU_EDIT_SET_COVER_FOR_AUTHOR),
+ KeyEvent.VK_A);
+ open.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent ae) {