Skip to content

Commit

Permalink
[Imp] Add shortcut for browsing template modules.
Browse files Browse the repository at this point in the history
git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@22140 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
sagamusix committed Nov 10, 2024
1 parent 13e9d06 commit b392ffc
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 20 deletions.
7 changes: 4 additions & 3 deletions mptrack/CommandSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1395,9 +1395,10 @@ static constexpr struct
{2100, kcGotoParamColumn, _T("Go to effect parameter column")},
{2101, kcContextMenu, _T("Open Context Menu")},
{2102, kcOrderlistStreamExport, _T("Stream Export")},
{2103, kcToggleVisibilityInstrColumn, _T("Toggle instrument column visibility") },
{2104, kcToggleVisibilityVolumeColumn, _T("Toggle volume column visibility") },
{2105, kcToggleVisibilityEffectColumn, _T("Toggle effect column visibility") },
{2103, kcToggleVisibilityInstrColumn, _T("Toggle instrument column visibility")},
{2104, kcToggleVisibilityVolumeColumn, _T("Toggle volume column visibility")},
{2105, kcToggleVisibilityEffectColumn, _T("Toggle effect column visibility")},
{2106, kcFileOpenTemplate, _T("File/Open Template")},
};
// clang-format on

Expand Down
1 change: 1 addition & 0 deletions mptrack/CommandSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ enum CommandID
kcFileSaveAs,
kcFileSaveCopy,
kcFileSaveTemplate,
kcFileOpenTemplate,
kcFileSaveAsWave,
kcFileSaveAsMP3,
kcFileSaveMidi,
Expand Down
34 changes: 18 additions & 16 deletions mptrack/InputHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,22 +388,23 @@ CString CInputHandler::GetMenuText(UINT id) const
{
static constexpr std::tuple<UINT, CommandID, const TCHAR *> MenuItems[] =
{
{ ID_FILE_NEW, kcFileNew, _T("&New") },
{ ID_FILE_OPEN, kcFileOpen, _T("&Open...") },
{ ID_FILE_OPENTEMPLATE, kcNull, _T("Open &Template") },
{ ID_FILE_CLOSE, kcFileClose, _T("&Close") },
{ ID_FILE_CLOSEALL, kcFileCloseAll, _T("C&lose All") },
{ ID_FILE_APPENDMODULE, kcFileAppend, _T("Appen&d Module...") },
{ ID_FILE_SAVE, kcFileSave, _T("&Save") },
{ ID_FILE_SAVE_AS, kcFileSaveAs, _T("Save &As...") },
{ ID_FILE_SAVE_COPY, kcFileSaveCopy, _T("Save Cop&y...") },
{ ID_FILE_SAVEASTEMPLATE, kcFileSaveTemplate, _T("Sa&ve as Template") },
{ ID_FILE_SAVEASWAVE, kcFileSaveAsWave, _T("Stream Export (&WAV, FLAC, MP3, etc.)...") },
{ ID_FILE_SAVEMIDI, kcFileSaveMidi, _T("Export as M&IDI...") },
{ ID_FILE_SAVEOPL, kcFileSaveOPL, _T("Export O&PL Register Dump...") },
{ ID_FILE_SAVECOMPAT, kcFileExportCompat, _T("Compatibility &Export...") },
{ ID_IMPORT_MIDILIB, kcFileImportMidiLib, _T("Import &MIDI Library...") },
{ ID_ADD_SOUNDBANK, kcFileAddSoundBank, _T("Add Sound &Bank...") },
{ ID_FILE_NEW, kcFileNew, _T("&New") },
{ ID_FILE_OPEN, kcFileOpen, _T("&Open...") },
{ ID_FILE_OPENTEMPLATE, kcNull, _T("Open &Template") },
{ ID_FILE_OPENTEMPLATE_LASTINRANGE, kcFileOpenTemplate, _T("&Browse...") },
{ ID_FILE_CLOSE, kcFileClose, _T("&Close") },
{ ID_FILE_CLOSEALL, kcFileCloseAll, _T("C&lose All") },
{ ID_FILE_APPENDMODULE, kcFileAppend, _T("Appen&d Module...") },
{ ID_FILE_SAVE, kcFileSave, _T("&Save") },
{ ID_FILE_SAVE_AS, kcFileSaveAs, _T("Save &As...") },
{ ID_FILE_SAVE_COPY, kcFileSaveCopy, _T("Save Cop&y...") },
{ ID_FILE_SAVEASTEMPLATE, kcFileSaveTemplate, _T("Sa&ve as Template") },
{ ID_FILE_SAVEASWAVE, kcFileSaveAsWave, _T("Stream Export (&WAV, FLAC, MP3, etc.)...") },
{ ID_FILE_SAVEMIDI, kcFileSaveMidi, _T("Export as M&IDI...") },
{ ID_FILE_SAVEOPL, kcFileSaveOPL, _T("Export O&PL Register Dump...") },
{ ID_FILE_SAVECOMPAT, kcFileExportCompat, _T("Compatibility &Export...") },
{ ID_IMPORT_MIDILIB, kcFileImportMidiLib, _T("Import &MIDI Library...") },
{ ID_ADD_SOUNDBANK, kcFileAddSoundBank, _T("Add Sound &Bank...") },

{ ID_PLAYER_PLAY, kcPlayPauseSong, _T("Pause / &Resume") },
{ ID_PLAYER_PLAYFROMSTART, kcPlaySongFromStart, _T("&Play from Start") },
Expand Down Expand Up @@ -474,6 +475,7 @@ void CInputHandler::UpdateMainMenu()
static constexpr int MenuItems[] =
{
ID_FILE_OPEN,
ID_FILE_OPENTEMPLATE_LASTINRANGE,
ID_FILE_APPENDMODULE,
ID_FILE_CLOSE,
ID_FILE_CLOSEALL,
Expand Down
2 changes: 1 addition & 1 deletion mptrack/MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3095,7 +3095,7 @@ HMENU CMainFrame::CreateFileMenu(const size_t maxCount, std::vector<mpt::PathStr
} else
{
AppendMenu(hMenu, MF_SEPARATOR, 0, 0);
AppendMenu(hMenu, MF_STRING, idRangeBegin + maxCount, _T("Browse..."));
AppendMenu(hMenu, MF_STRING, idRangeBegin + maxCount, _T("&Browse..."));
}
}

Expand Down

0 comments on commit b392ffc

Please sign in to comment.