@ -204,7 +204,14 @@ void PluginsManager::setMenu(HMENU hMenu, const char *menuName)
for ( int j = 0 ; j < _pluginInfos [ i ] - > _nbFuncItem ; j + + )
for ( int j = 0 ; j < _pluginInfos [ i ] - > _nbFuncItem ; j + + )
{
{
if ( _pluginInfos [ i ] - > _funcItems [ j ] . _pFunc = = NULL )
{
: : InsertMenu ( _pluginInfos [ i ] - > _pluginMenu , j , MF_BYPOSITION | MF_SEPARATOR , 0 , " " ) ;
continue ;
}
_pluginsCommands . push_back ( PluginCommand ( _pluginInfos [ i ] - > _moduleName , j , _pluginInfos [ i ] - > _funcItems [ j ] . _pFunc ) ) ;
_pluginsCommands . push_back ( PluginCommand ( _pluginInfos [ i ] - > _moduleName , j , _pluginInfos [ i ] - > _funcItems [ j ] . _pFunc ) ) ;
int cmdID = ID_PLUGINS_CMD + ( _pluginsCommands . size ( ) - 1 ) ;
int cmdID = ID_PLUGINS_CMD + ( _pluginsCommands . size ( ) - 1 ) ;
_pluginInfos [ i ] - > _funcItems [ j ] . _cmdID = ( _pluginInfos [ i ] - > _funcItems [ j ] . _pFunc = = NULL ) ? 0 : cmdID ;
_pluginInfos [ i ] - > _funcItems [ j ] . _cmdID = ( _pluginInfos [ i ] - > _funcItems [ j ] . _pFunc = = NULL ) ? 0 : cmdID ;
string itemName = _pluginInfos [ i ] - > _funcItems [ j ] . _itemName ;
string itemName = _pluginInfos [ i ] - > _funcItems [ j ] . _itemName ;
@ -222,8 +229,7 @@ void PluginsManager::setMenu(HMENU hMenu, const char *menuName)
PluginCmdShortcut pcs ( Shortcut ( itemName . c_str ( ) , false , false , false , 0x00 ) , cmdID , _pluginInfos [ i ] - > _moduleName , j ) ; //VK_NULL and everything disabled, the menu name is left alone
PluginCmdShortcut pcs ( Shortcut ( itemName . c_str ( ) , false , false , false , 0x00 ) , cmdID , _pluginInfos [ i ] - > _moduleName , j ) ; //VK_NULL and everything disabled, the menu name is left alone
pluginCmdSCList . push_back ( pcs ) ;
pluginCmdSCList . push_back ( pcs ) ;
}
}
unsigned int flag = MF_BYPOSITION | ( ( _pluginInfos [ i ] - > _funcItems [ j ] . _pFunc = = NULL ) ? MF_SEPARATOR : 0 ) ;
: : InsertMenu ( _pluginInfos [ i ] - > _pluginMenu , j , MF_BYPOSITION , cmdID , itemName . c_str ( ) ) ;
: : InsertMenu ( _pluginInfos [ i ] - > _pluginMenu , j , flag , ( _pluginInfos [ i ] - > _funcItems [ j ] . _pFunc = = NULL ) ? 0 : cmdID , itemName . c_str ( ) ) ;
if ( _pluginInfos [ i ] - > _funcItems [ j ] . _init2Check )
if ( _pluginInfos [ i ] - > _funcItems [ j ] . _init2Check )
: : CheckMenuItem ( _hPluginsMenu , cmdID , MF_BYCOMMAND | MF_CHECKED ) ;
: : CheckMenuItem ( _hPluginsMenu , cmdID , MF_BYCOMMAND | MF_CHECKED ) ;