| 375 | } |
| 376 | |
| 377 | void CartManager::programRightClicked(ProgramListBox *source, int pos) { |
| 378 | PopupMenu menu; |
| 379 | |
| 380 | menu.addItem(1000, "Send program '" + source->programNames[pos] + "' to DX7"); |
| 381 | |
| 382 | if ( source == activeCart.get() ) |
| 383 | menu.addItem(1010, "Send current sysex cartridge to DX7"); |
| 384 | |
| 385 | switch(menu.show()) { |
| 386 | case 1000: |
| 387 | uint8_t unpackPgm[161]; |
| 388 | |
| 389 | if ( source == activeCart.get() ) { |
| 390 | mainWindow->processor->currentCart.unpackProgram(unpackPgm, pos); |
| 391 | } else { |
| 392 | source->getCurrentCart().unpackProgram(unpackPgm, pos); |
| 393 | } |
| 394 | |
| 395 | if ( mainWindow->processor->sysexComm.isOutputActive() ) { |
| 396 | uint8_t msg[163]; |
| 397 | exportSysexPgm(msg, unpackPgm); |
| 398 | msg[2] |= mainWindow->processor->sysexComm.getChl(); |
| 399 | mainWindow->processor->sysexComm.send(MidiMessage(msg, 163)); |
| 400 | } |
| 401 | break; |
| 402 | |
| 403 | case 1010: |
| 404 | mainWindow->processor->sendCurrentSysexCartridge(); |
| 405 | break; |
| 406 | } |
| 407 | } |
| 408 | |
| 409 | void CartManager::programDragged(ProgramListBox *destListBox, int dest, char *packedPgm) { |
| 410 | if ( destListBox == activeCart.get() ) { |
no test coverage detected