mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 08:18:52 -05:00
Fix MAS review issue:
The user interface of your app is not consistent with the macOS Human Interface Guidelines. Specifically: We found that menu items are not visible, except by right-clicking (see screenshot). See the "WYSIWYG (What You See Is What You Get)," "Give Users Alternate Ways to Accomplish Tasks," and "Designing Contextual Menus" sections of the Human Interface Guidelines.
This commit is contained in:
parent
7f09ea696c
commit
eb7310f095
@ -1,5 +1,6 @@
|
||||
package net.filebot.ui.episodelist;
|
||||
|
||||
import static net.filebot.Settings.*;
|
||||
import static net.filebot.ui.episodelist.SeasonSpinnerModel.*;
|
||||
import static net.filebot.util.ui.SwingUI.*;
|
||||
import static net.filebot.web.EpisodeUtilities.*;
|
||||
@ -244,28 +245,31 @@ public class EpisodeListPanel extends AbstractSearchPanel<EpisodeListProvider, E
|
||||
listScrollPane.setBorder(null);
|
||||
setBorder(null);
|
||||
|
||||
// popup menu
|
||||
JPopupMenu popup = new JPopupMenu("Episodes");
|
||||
// XXX The user interface of your app is not consistent with the macOS Human Interface Guidelines. Specifically: We found that menu items are not visible, except by right-clicking (see screenshot). See the "WYSIWYG (What You See Is What You Get)," "Give Users
|
||||
// Alternate Ways to Accomplish Tasks," and "Designing Contextual Menus" sections of the Human Interface Guidelines.
|
||||
if (!isMacSandbox()) {
|
||||
JPopupMenu popup = new JPopupMenu("Episodes");
|
||||
|
||||
JMenu menu = new JMenu("Send to");
|
||||
for (PanelBuilder panel : PanelBuilder.episodeHandlerSequence()) {
|
||||
menu.add(newAction(panel.getName(), panel.getIcon(), evt -> {
|
||||
// switch to Rename panel
|
||||
SwingEventBus.getInstance().post(panel);
|
||||
JMenu menu = new JMenu("Send to");
|
||||
for (PanelBuilder panel : PanelBuilder.episodeHandlerSequence()) {
|
||||
menu.add(newAction(panel.getName(), panel.getIcon(), evt -> {
|
||||
// switch to Rename panel
|
||||
SwingEventBus.getInstance().post(panel);
|
||||
|
||||
// load episode data
|
||||
invokeLater(200, () -> SwingEventBus.getInstance().post(exportHandler.export(this, false)));
|
||||
// load episode data
|
||||
invokeLater(200, () -> SwingEventBus.getInstance().post(exportHandler.export(this, false)));
|
||||
}));
|
||||
}
|
||||
|
||||
popup.add(menu);
|
||||
popup.addSeparator();
|
||||
|
||||
popup.add(newAction("Copy", ResourceManager.getIcon("rename.action.copy"), evt -> {
|
||||
getTransferHandler().getClipboardHandler().exportToClipboard(this, Toolkit.getDefaultToolkit().getSystemClipboard(), TransferHandler.COPY);
|
||||
}));
|
||||
popup.add(new SaveAction(getExportHandler()));
|
||||
getListComponent().setComponentPopupMenu(popup);
|
||||
}
|
||||
|
||||
popup.add(menu);
|
||||
popup.addSeparator();
|
||||
|
||||
popup.add(newAction("Copy", ResourceManager.getIcon("rename.action.copy"), evt -> {
|
||||
getTransferHandler().getClipboardHandler().exportToClipboard(this, Toolkit.getDefaultToolkit().getSystemClipboard(), TransferHandler.COPY);
|
||||
}));
|
||||
popup.add(new SaveAction(getExportHandler()));
|
||||
getListComponent().setComponentPopupMenu(popup);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package net.filebot.ui.list;
|
||||
import static java.awt.Font.*;
|
||||
import static java.util.stream.Collectors.*;
|
||||
import static javax.swing.BorderFactory.*;
|
||||
import static net.filebot.Settings.*;
|
||||
import static net.filebot.util.ui.SwingUI.*;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
@ -77,23 +78,26 @@ public class ListPanel extends JComponent {
|
||||
list.setExportHandler(exportHandler);
|
||||
list.getTransferHandler().setClipboardHandler(exportHandler);
|
||||
|
||||
// context menu
|
||||
JPopupMenu popup = new JPopupMenu("List");
|
||||
JMenu menu = new JMenu("Send to");
|
||||
for (PanelBuilder panel : PanelBuilder.textHandlerSequence()) {
|
||||
menu.add(newAction(panel.getName(), panel.getIcon(), evt -> {
|
||||
String text = list.getExportHandler().export();
|
||||
SwingEventBus.getInstance().post(panel);
|
||||
invokeLater(200, () -> SwingEventBus.getInstance().post(new StringSelection(text)));
|
||||
// XXX The user interface of your app is not consistent with the macOS Human Interface Guidelines. Specifically: We found that menu items are not visible, except by right-clicking (see screenshot). See the "WYSIWYG (What You See Is What You Get)," "Give Users
|
||||
// Alternate Ways to Accomplish Tasks," and "Designing Contextual Menus" sections of the Human Interface Guidelines.
|
||||
if (!isMacSandbox()) {
|
||||
JPopupMenu popup = new JPopupMenu("List");
|
||||
JMenu menu = new JMenu("Send to");
|
||||
for (PanelBuilder panel : PanelBuilder.textHandlerSequence()) {
|
||||
menu.add(newAction(panel.getName(), panel.getIcon(), evt -> {
|
||||
String text = list.getExportHandler().export();
|
||||
SwingEventBus.getInstance().post(panel);
|
||||
invokeLater(200, () -> SwingEventBus.getInstance().post(new StringSelection(text)));
|
||||
}));
|
||||
}
|
||||
popup.add(menu);
|
||||
popup.addSeparator();
|
||||
popup.add(newAction("Copy", ResourceManager.getIcon("rename.action.copy"), evt -> {
|
||||
list.getTransferHandler().getClipboardHandler().exportToClipboard(this, Toolkit.getDefaultToolkit().getSystemClipboard(), TransferHandler.COPY);
|
||||
}));
|
||||
popup.add(new SaveAction(list.getExportHandler()));
|
||||
list.getListComponent().setComponentPopupMenu(popup);
|
||||
}
|
||||
popup.add(menu);
|
||||
popup.addSeparator();
|
||||
popup.add(newAction("Copy", ResourceManager.getIcon("rename.action.copy"), evt -> {
|
||||
list.getTransferHandler().getClipboardHandler().exportToClipboard(this, Toolkit.getDefaultToolkit().getSystemClipboard(), TransferHandler.COPY);
|
||||
}));
|
||||
popup.add(new SaveAction(list.getExportHandler()));
|
||||
list.getListComponent().setComponentPopupMenu(popup);
|
||||
|
||||
// cell renderer
|
||||
list.getListComponent().setCellRenderer(new DefaultFancyListCellRenderer() {
|
||||
|
Loading…
Reference in New Issue
Block a user