Changeset 1320

Show
Ignore:
Timestamp:
12/23/07 22:07:23 (8 months ago)
Author:
calvin
Message:

add azerty-support for belgium punt and comma keyboard layouts, fixes in keyjazz playing and recording, call updateAllViews on preference-apply

Location:
trunk/src/buzelib
Files:
9 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/buzelib/Document.cpp

    r1319 r1320  
    12961296} 
    12971297 
    1298 // from player.cpp: 
    1299 namespace zzub { 
    1300         extern bool isNotePlaying(zzub::metaplugin* plugin, const std::vector<zzub::keyjazz_note>& keyjazz, int note); 
    1301 }; 
    1302  
    13031298void CDocument::playStream(int note, std::string pluginUri, std::string dataUrl) { 
    13041299        if (!streamplayer) return ; 
    1305         if (isNotePlaying(streamplayer, player->keyjazz, note)) { 
    1306                 return ; 
    1307         } 
    13081300 
    13091301        zzub::mem_archive archive; 
  • trunk/src/buzelib/FileBrowserView.cpp

    r1319 r1320  
    198198        } 
    199199 
     200        if ((lParam & (1 << 30)) != 0) return 0; 
     201 
    200202        int note = midi_to_buzz_note(keyboard_mapper::map_code_to_note(mainFrame->document->octave, wParam)); 
    201203        if (note == -1) return 0; 
  • trunk/src/buzelib/MachineView.cpp

    r1319 r1320  
    195195 
    196196LRESULT CMachineView::OnKeyDown(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/) { 
    197         int note = midi_to_buzz_note(keyboard_mapper::map_code_to_note(document->octave, wParam)); 
     197        if ((lParam & (1 << 30)) != 0) return 0; 
     198 
     199        int note = keyboard_mapper::map_code_to_note(document->octave, wParam); 
     200        if (note > 0 && note != zzub_note_value_off) note = midi_to_buzz_note(note); 
    198201        if (note == -1) return 0; 
    199202 
  • trunk/src/buzelib/PatternEditor/PatternEditorNoteKeys.h

    r1260 r1320  
    3737                return qwertz_cz; 
    3838            case 7:             // germany 
    39             case 14:            // hungary 
    40                 return qwertz; 
    4139            case 12:            // french 
    4240                switch (sublang) { 
     
    4644                        return azerty; 
    4745                } 
     46            case 14:            // hungary 
     47                return qwertz; 
     48                        case 19: 
     49                                switch (sublang) { 
     50                                        case 2:         // belgium punt 
     51                                                return azerty; 
     52                                        default: 
     53                                                return qwerty; 
     54                                } 
     55                        case 30: 
     56                                switch (sublang) { 
     57                                        case 60:        // belgium comma 
     58                                                return azerty; 
     59                                        default: 
     60                                                return qwerty; 
     61                                }                
    4862            default:            // any other 
    4963                return qwerty; 
  • trunk/src/buzelib/Preferences/UiPreferencesView.cpp

    r1273 r1320  
    3333        _Module.configuration->setPatternMode(patternMode); 
    3434        _Module.configuration->setStickySelections(stickySelections); 
     35 
     36        if (mainFrame->document) mainFrame->document->updateAllViews(0, UpdateSettings, 0); 
    3537} 
  • trunk/src/buzelib/SequenceEditor.cpp

    r1316 r1320  
    854854 
    855855void CSequenceEditor::invalidateSongPosition() { 
     856 
    856857        paintMode=SequenceViewPosition; 
    857858        RECT rc; 
    858859        getPositionRect(&rc); 
    859860 
    860         rc.top=prevPositionRect.top-2; 
    861         rc.bottom+=2; 
     861        if(prevPositionRect.top < rc.top) 
     862                rc.top = prevPositionRect.top - 2; 
     863        else 
     864                rc.top -= 2; 
     865 
     866        if(prevPositionRect.bottom > rc.bottom) 
     867                rc.bottom = prevPositionRect.bottom + 2; 
     868        else 
     869                rc.bottom += 2; 
    862870 
    863871        HideCaret(); 
     
    867875        paintMode=SequenceViewAll; 
    868876        ShowCaret(); 
     877 
     878        /* 
     879        paintMode=SequenceViewPosition; 
     880        RECT rc; 
     881        getPositionRect(&rc); 
     882 
     883        rc.top=prevPositionRect.top-2; 
     884        rc.bottom+=2; 
     885 
     886        HideCaret(); 
     887        InvalidateRect(&rc, FALSE); 
     888 
     889        UpdateWindow(); 
     890        paintMode=SequenceViewAll; 
     891        ShowCaret();*/ 
    869892} 
    870893 
  • trunk/src/buzelib/Utils/Keymaps.cpp

    r1273 r1320  
    4141        { 0x0c,   -1, keyboard_mapper::fr_azerty_keycodes },    // france - rest 
    4242        { 0x0e,   -1, keyboard_mapper::de_qwertz_keycodes },    // hungary 
     43        { 0x13, 0x02, keyboard_mapper::fr_azerty_keycodes },    // belgium (punt) 
    4344        { 0x14,   -1, keyboard_mapper::no_qwerty_keycodes },    // norway 
     45        { 0x1e, 0x3c, keyboard_mapper::fr_azerty_keycodes },    // belgium (comma) 
    4446 
    4547// everybody else gets qwerty 
  • trunk/src/buzelib/WaveTableView.cpp

    r1319 r1320  
    441441 
    442442LRESULT CWaveTableView::OnKeyDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { 
     443        // lParam bit 30 : Specifies the previous key state. The value is 1 if the key is down before the message is sent, or it is zero if the key is up. 
     444 
     445        if ((lParam & (1 << 30)) != 0) return 0; 
     446 
    443447        int note = midi_to_buzz_note(keyboard_mapper::map_code_to_note(document->octave, wParam)); 
    444448        if (note == -1) return 0; 
  • trunk/src/buzelib/res/keyboard_patterneditor.txt

    r1319 r1320  
    6161        Ctrl+R                          Randomize selection  
    6262        Ctrl+T                          Toggle column editor for number columns 
    63         Ctrl+U                          Unselect 
    6463        Ctrl+Up                         Show pattern for next machine  
    6564        Ctrl+Down                       Show pattern for previous machine  
     
    6867        Shift+Ctrl+D                    Select 16/32/64/.. rows from cursor  
    6968        Shift+Ctrl+L                    Select track/group/all 
     69        Shift+Ctrl+U                    Unselect 
    7070        Space                           Paste current parameter value 
    7171        Ctrl+Space                      Paste current group values