MENU_EDIT_SET_COVER_FOR_SOURCE, //
@Meta(def = "Set as cover for author", format = Format.STRING, description = "the edit/Set as cover for author menu button")
MENU_EDIT_SET_COVER_FOR_AUTHOR, //
+ @Meta(def = "Search", format = Format.STRING, description = "the search menu to open the earch stories on one of the searchable websites")
+ MENU_SEARCH,
@Meta(def = "View", format = Format.STRING, description = "the view menu")
MENU_VIEW, //
@Meta(def = "Word count", format = Format.STRING, description = "the view/word_count menu button, to show the word/image/story count as secondary info")
# the edit/Set as cover for author menu button
# (FORMAT: STRING)
MENU_EDIT_SET_COVER_FOR_AUTHOR = Set as cover for author
+# the search menu to open the earch stories on one of the searchable websites
+# (FORMAT: STRING)
+MENU_SEARCH = Search
# the view menu (FORMAT: STRING)
MENU_VIEW = View
# the view/word_count menu button, to show the word/image/story count as secondary info
# the edit/Set as cover for author menu button
# (FORMAT: STRING)
MENU_EDIT_SET_COVER_FOR_AUTHOR = Utiliser comme cover pour l'auteur
+# the search menu to open the earch stories on one of the searchable websites
+# (FORMAT: STRING)
+MENU_SEARCH = Recherche
# the view menu (FORMAT: STRING)
MENU_VIEW = Affichage
# the view/word_count menu button, to show the word/image/story count as secondary info
import be.nikiroo.fanfix.reader.BasicReader;
import be.nikiroo.fanfix.reader.ui.GuiReaderMainPanel.FrameHelper;
import be.nikiroo.fanfix.reader.ui.GuiReaderMainPanel.StoryRunnable;
+import be.nikiroo.fanfix.searchable.BasicSearchable;
+import be.nikiroo.fanfix.supported.SupportType;
import be.nikiroo.utils.Progress;
import be.nikiroo.utils.Version;
import be.nikiroo.utils.ui.ConfigEditor;
bar.add(edit);
+ JMenu search = new JMenu(GuiReader.trans(StringIdGui.MENU_SEARCH));
+ search.setMnemonic(KeyEvent.VK_H);
+ for (SupportType type : SupportType.values()) {
+ BasicSearchable searchable = BasicSearchable.getSearchable(type);
+ if (searchable != null) {
+ JMenuItem searchItem = new JMenuItem(type.getSourceName());
+ searchItem.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ // TODO: open a search window
+ }
+ });
+ search.add(searchItem);
+ }
+ }
+ bar.add(search);
+
JMenu view = new JMenu(GuiReader.trans(StringIdGui.MENU_VIEW));
view.setMnemonic(KeyEvent.VK_V);
JMenuItem vauthors = new JMenuItem(