Skip to content

Commit

Permalink
Fix or improve context menu entries for structured resources
Browse files Browse the repository at this point in the history
- Fixes "Show in new viewer" context menu entry for DLG resources which
previously executed the wrong command
- Improves wording of several "Edit as ..." context menu entries
  • Loading branch information
Argent77 committed Apr 20, 2024
1 parent cd05ff2 commit 673eff4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/org/infinity/gui/StructViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,19 +159,19 @@ public final class StructViewer extends JPanel implements ListSelectionListener,
private final JMenuItem miCut = createMenuItem(CMD_CUT, "Cut", Icons.ICON_CUT_16.getIcon(), this);
private final JMenuItem miCopy = createMenuItem(CMD_COPY, "Copy", Icons.ICON_COPY_16.getIcon(), this);
private final JMenuItem miPaste = createMenuItem(CMD_PASTE, "Paste", Icons.ICON_PASTE_16.getIcon(), this);
private final JMenuItem miToHex = createMenuItem(CMD_TOHEX, "Edit as hex", Icons.ICON_REFRESH_16.getIcon(), this);
private final JMenuItem miToHex = createMenuItem(CMD_TOHEX, "Edit as hexadecimal data", Icons.ICON_REFRESH_16.getIcon(), this);
private final JMenuItem miToString = createMenuItem(CMD_TOSTRING, "Edit as string", Icons.ICON_REFRESH_16.getIcon(), this);
private final JMenuItem miToBin = createMenuItem(CMD_TOBIN, "Edit as binary", Icons.ICON_REFRESH_16.getIcon(), this);
private final JMenuItem miToDec = createMenuItem(CMD_TODEC, "Edit as decimal", Icons.ICON_REFRESH_16.getIcon(), this);
private final JMenuItem miToBin = createMenuItem(CMD_TOBIN, "Edit as binary data", Icons.ICON_REFRESH_16.getIcon(), this);
private final JMenuItem miToDec = createMenuItem(CMD_TODEC, "Edit as decimal data", Icons.ICON_REFRESH_16.getIcon(), this);
private final JMenuItem miToInt = createMenuItem(CMD_TOINT, "Edit as number", Icons.ICON_REFRESH_16.getIcon(), this);
private final JMenuItem miToHexInt = createMenuItem(CMD_TOHEXINT, "Edit as hex number", Icons.ICON_REFRESH_16.getIcon(), this);
private final JMenuItem miToHexInt = createMenuItem(CMD_TOHEXINT, "Edit as hexadecimal number", Icons.ICON_REFRESH_16.getIcon(), this);
private final JMenuItem miToFlags = createMenuItem(CMD_TOFLAGS, "Edit as bit field", Icons.ICON_REFRESH_16.getIcon(), this);
private final JMenuItem miReset = createMenuItem(CMD_RESET, "Reset field type", Icons.ICON_REFRESH_16.getIcon(), this);
private final JMenuItem miAddToAdvSearch = createMenuItem(CMD_ADD_ADV_SEARCH, "Add to Advanced Search", Icons.ICON_FIND_16.getIcon(), this);
private final JMenuItem miGotoOffset = createMenuItem(CMD_GOTO_OFFSET, "Go to offset", null, this);
private final JMenuItem miShowInTree = createMenuItem(CMD_SHOW_IN_TREE, "Show in tree", Icons.ICON_SELECT_IN_TREE_16.getIcon(), this);
private final JMenuItem miShowViewer = createMenuItem(CMD_SHOWVIEWER, "Show in viewer", Icons.ICON_ROW_INSERT_AFTER_16.getIcon(), this);
private final JMenuItem miShowNewViewer = createMenuItem(CMD_COPYVALUE, "Show in new viewer", null, this);
private final JMenuItem miShowNewViewer = createMenuItem(CMD_SHOWNEWVIEWER, "Show in new viewer", null, this);
private final JMenu miToResref = createResrefMenu(CMD_TORESLIST, "Edit as resref", Profile.getAvailableResourceTypes(), Icons.ICON_REFRESH_16.getIcon(), this);
private final JPanel lowerpanel = new JPanel(cards);
private final JPanel editpanel = new JPanel();
Expand Down

0 comments on commit 673eff4

Please sign in to comment.