1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-27 17:48:38 +02:00

Popup sub-menus don't require ids

This commit is contained in:
Paul Licameli 2020-02-05 14:13:18 -05:00
parent 2ea8c8baa6
commit 1e37172e6d
2 changed files with 5 additions and 6 deletions

View File

@ -135,7 +135,6 @@ enum {
OnChannelMonoID, OnChannelMonoID,
OnMergeStereoID, OnMergeStereoID,
OnWaveColorID,
OnInstrument1ID, OnInstrument1ID,
OnInstrument2ID, OnInstrument2ID,
OnInstrument3ID, OnInstrument3ID,
@ -801,14 +800,14 @@ BEGIN_POPUP_MENU(WaveTrackMenuTable)
) ); ) );
if( hasWaveform ){ if( hasWaveform ){
POPUP_MENU_SEPARATOR() POPUP_MENU_SEPARATOR()
POPUP_MENU_SUB_MENU(OnWaveColorID, XO("&Wave Color"), WaveColorMenuTable) POPUP_MENU_SUB_MENU(XO("&Wave Color"), WaveColorMenuTable)
} }
} }
POPUP_MENU_SEPARATOR() POPUP_MENU_SEPARATOR()
POPUP_MENU_SUB_MENU(0, XO("&Format"), FormatMenuTable) POPUP_MENU_SUB_MENU(XO("&Format"), FormatMenuTable)
POPUP_MENU_SEPARATOR() POPUP_MENU_SEPARATOR()
POPUP_MENU_SUB_MENU(0, XO("Rat&e"), RateMenuTable) POPUP_MENU_SUB_MENU(XO("Rat&e"), RateMenuTable)
END_POPUP_MENU() END_POPUP_MENU()

View File

@ -202,9 +202,9 @@ void HandlerClass::Populate() { \
POPUP_MENU_APPEND_ITEM(Entry::CheckItem, id, string, memFn); POPUP_MENU_APPEND_ITEM(Entry::CheckItem, id, string, memFn);
// classname names a class that derives from MenuTable and defines Instance() // classname names a class that derives from MenuTable and defines Instance()
#define POPUP_MENU_SUB_MENU(id, string, classname) \ #define POPUP_MENU_SUB_MENU(string, classname) \
POPUP_MENU_APPEND( \ POPUP_MENU_APPEND( \
Entry::SubMenu, id, string, nullptr, &classname::Instance() ); Entry::SubMenu, -1, string, nullptr, &classname::Instance() );
#define POPUP_MENU_SEPARATOR() \ #define POPUP_MENU_SEPARATOR() \
POPUP_MENU_APPEND( \ POPUP_MENU_APPEND( \