From: <sag...@us...> - 2010-01-15 21:16:04
|
Revision: 466 http://modplug.svn.sourceforge.net/modplug/?rev=466&view=rev Author: saga-games Date: 2010-01-15 21:15:34 +0000 (Fri, 15 Jan 2010) Log Message: ----------- [Imp] Treeview: Right-click options for mod items: "View" and "Close" [Imp] Sample editor: When using timestretch, loop points could exceed sample length in some cases. [Mod] Updated keymap NO_mpt_classic_(rakib).mkb Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/mptrack/View_tre.h trunk/OpenMPT/mptrack/resource.h trunk/OpenMPT/packageTemplate/extraKeymaps/NO_mpt_classic_(rakib).mkb Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2010-01-14 20:46:32 UTC (rev 465) +++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2010-01-15 21:15:34 UTC (rev 466) @@ -1711,19 +1711,17 @@ // Time stretching if(IsDlgButtonChecked(IDC_CHECK3)){ - //rewbs.timeStretchMods UpdateData(TRUE); //Ensure m_dTimeStretchRatio is up-to-date with textbox content errorcode = TimeStretch(m_dTimeStretchRatio/100.0); //Update loop points only if no error occured. if(errorcode == 0) { - pSmp->nLoopStart *= m_dTimeStretchRatio/100.0; - pSmp->nLoopEnd *= m_dTimeStretchRatio/100.0; - pSmp->nSustainStart *= m_dTimeStretchRatio/100.0; - pSmp->nSustainEnd *= m_dTimeStretchRatio/100.0; + pSmp->nLoopStart = min(pSmp->nLoopStart * (m_dTimeStretchRatio / 100.0), pSmp->nLength); + pSmp->nLoopEnd = min(pSmp->nLoopEnd * (m_dTimeStretchRatio/100.0), pSmp->nLength); + pSmp->nSustainStart = min(pSmp->nSustainStart * (m_dTimeStretchRatio/100.0), pSmp->nLength); + pSmp->nSustainEnd = min(pSmp->nSustainEnd * (m_dTimeStretchRatio/100.0), pSmp->nLength); } - //end rewbs.timeStretchMods } // Pitch shifting Modified: trunk/OpenMPT/mptrack/View_tre.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp 2010-01-14 20:46:32 UTC (rev 465) +++ trunk/OpenMPT/mptrack/View_tre.cpp 2010-01-15 21:15:34 UTC (rev 466) @@ -76,6 +76,7 @@ ON_COMMAND(ID_MODTREE_DUPLICATE, OnDuplicateTreeItem) ON_COMMAND(ID_MODTREE_INSERT, OnInsertTreeItem) ON_COMMAND(ID_MODTREE_SWITCHTO, OnSwitchToTreeItem) + ON_COMMAND(ID_MODTREE_CLOSE, OnCloseItem) // -> CODE#0023 // -> DESC="IT project files (.itp)" @@ -2295,6 +2296,12 @@ SelectItem(hItem); switch(modItemType) { + case MODITEM_HDR_SONG: + nDefault = ID_MODTREE_EXECUTE; + AppendMenu(hMenu, MF_STRING, nDefault, "&View"); + AppendMenu(hMenu, MF_STRING, ID_MODTREE_CLOSE, "&Close"); + break; + case MODITEM_COMMENTS: nDefault = ID_MODTREE_EXECUTE; AppendMenu(hMenu, MF_STRING, nDefault, "&View Comments"); @@ -3205,3 +3212,13 @@ GetItem(&tvi); return (tvi.state & TVIS_EXPANDED) != 0 ? true : false; } + + +void CModTree::OnCloseItem() +//-------------------------- +{ + HTREEITEM hItem = GetSelectedItem(); + CModDoc *pModDoc = GetDocumentFromItem(hItem); + if(pModDoc == nullptr) return; + pModDoc->OnCloseDocument(); +} Modified: trunk/OpenMPT/mptrack/View_tre.h =================================================================== --- trunk/OpenMPT/mptrack/View_tre.h 2010-01-14 20:46:32 UTC (rev 465) +++ trunk/OpenMPT/mptrack/View_tre.h 2010-01-15 21:15:34 UTC (rev 466) @@ -209,6 +209,7 @@ afx_msg void OnDuplicateTreeItem(); afx_msg void OnInsertTreeItem(); afx_msg void OnSwitchToTreeItem(); // hack for sequence items to avoid double-click action + afx_msg void OnCloseItem(); // -> CODE#0023 // -> DESC="IT project files (.itp)" Modified: trunk/OpenMPT/mptrack/resource.h =================================================================== --- trunk/OpenMPT/mptrack/resource.h 2010-01-14 20:46:32 UTC (rev 465) +++ trunk/OpenMPT/mptrack/resource.h 2010-01-15 21:15:34 UTC (rev 466) @@ -1177,15 +1177,17 @@ #define ID_EDIT_PUSHFORWARDPASTE 59239 #define ID_EDIT_SPLITKEYBOARDSETTINGS 59240 #define ID_EDIT_PASTESPECIAL 59241 +#define ID_CHANGE_PCNOTE_PARAM 59242 +#define ID_MODTREE_CLOSE 60243 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 524 -#define _APS_NEXT_COMMAND_VALUE 59242 -#define _APS_NEXT_CONTROL_VALUE 2413 +#define _APS_NEXT_RESOURCE_VALUE 526 +#define _APS_NEXT_COMMAND_VALUE 60244 +#define _APS_NEXT_CONTROL_VALUE 2426 #define _APS_NEXT_SYMED_VALUE 901 #endif #endif Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/NO_mpt_classic_(rakib).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/NO_mpt_classic_(rakib).mkb 2010-01-14 20:46:32 UTC (rev 465) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/NO_mpt_classic_(rakib).mkb 2010-01-15 21:15:34 UTC (rev 466) @@ -22,6 +22,7 @@ 0:1359:2:90:1 //Undo: Ctrl+Z (KeyDown) 0:1360:2:88:1 //Cut: Ctrl+X (KeyDown) 0:1361:2:67:1 //Copy: Ctrl+C (KeyDown) +0:1361:2:45:1 //Copy: Ctrl+INS (KeyDown) 0:1362:2:86:1 //Paste: Ctrl+V (KeyDown) 0:1362:1:45:1 //Paste: Shift+INS (KeyDown) 0:1364:2:53:1 //SelectAll: Ctrl+5 (KeyDown) @@ -68,8 +69,7 @@ 2:1048:2:35:1 //Go to last row: Ctrl+END (KeyDown) 2:1049:6:35:1 //Go to last row of last channel: Ctrl+Alt+END (KeyDown) 2:1050:1:16:1 //Selection key: Shift+SKIFT (KeyDown) -2:1051:2:17:1 //Copy select key: Ctrl (KeyDown) -2:1011:2:65:1 //Select channel / Select all: Ctrl+A (KeyDown) +2:1011:2:76:1 //Select channel / Select all: Ctrl+L (KeyDown) 2:1663:0:122:1 //Toggle follow song: F11 (KeyDown) 2:1003:0:13:5 //Quick copy: ENTER (KeyDown|KeyHold) 2:1004:0:32:5 //Quick paste: MELLOMROM (KeyDown|KeyHold) @@ -83,6 +83,7 @@ 2:1005:0:121:5 //Mute current channel: F10 (KeyDown|KeyHold) 2:1006:2:121:5 //Solo current channel: Ctrl+F10 (KeyDown|KeyHold) 2:1007:2:81:5 //Transpose +1: Ctrl+Q (KeyDown|KeyHold) +2:1008:2:65:5 //Transpose -1: Ctrl+A (KeyDown|KeyHold) 2:1009:3:81:5 //Transpose +12: Shift+Ctrl+Q (KeyDown|KeyHold) 2:1010:3:65:5 //Transpose -12: Shift+Ctrl+A (KeyDown|KeyHold) 2:1012:2:77:1 //Amplify selection: Ctrl+M (KeyDown) @@ -114,6 +115,7 @@ 3:1070:0:85:1 //Base octave F#: U (KeyDown) 3:1071:0:73:1 //Base octave G: I (KeyDown) 3:1072:0:79:1 //Base octave G#: O (KeyDown) +3:1073:0:80:1 //Base octave A: P (KeyDown) 3:1074:0:221:1 //Base octave A#: \xE5 (KeyDown) 3:1075:0:186:1 //Base octave B: T\xD8DLER (KeyDown) 3:1076:0:65:1 //Base octave +1 C: A (KeyDown) @@ -137,8 +139,8 @@ 3:1094:0:77:1 //Base octave +2 F#: M (KeyDown) 3:1095:0:188:1 //Base octave +2 G: , (KeyDown) 3:1096:0:190:1 //Base octave +2 G#: . (KeyDown) +3:1097:0:189:1 //Base octave +2 A: - (KeyDown) 3:1212:0:48:1 //Set octave 0: 0 (KeyDown) -3:1212:0:96:1 //Set octave 0: NUM 0 (KeyDown) 3:1213:0:49:1 //Set octave 1: 1 (KeyDown) 3:1213:0:97:1 //Set octave 1: NUM 1 (KeyDown) 3:1214:0:50:1 //Set octave 2: 2 (KeyDown) @@ -158,9 +160,9 @@ 3:1221:0:57:1 //Set octave 9: 9 (KeyDown) 3:1221:0:105:1 //Set octave 9: NUM 9 (KeyDown) 3:1316:1:16:1 //Chord Modifier: Shift+SKIFT (KeyDown) -3:1667:0:219:1 //Note Cut (don't remember instrument): \ (KeyDown) -3:1668:0:187:1 //Note Off (don't remember instrument): + (KeyDown) -3:1792:0:226:1 //Note Fade (don't remember instrument): < (KeyDown) +3:1200:0:219:1 //Note Cut: \ (KeyDown) +3:1201:0:187:1 //Note Off: + (KeyDown) +3:1791:1:219:1 //Note Fade: Shift+\ (KeyDown) //----( Pattern Context [bottom] - Ins Col (4) )------------ 4:1202:0:96:1 //Set instrument digit 0: NUM 0 (KeyDown) @@ -253,9 +255,9 @@ //----( Sample Context [bottom] (8) )------------ 8:1380:2:84:1 //Trim sample around loop points: Ctrl+T (KeyDown) -8:1384:3:78:1 //Normalise Sample: Shift+Ctrl+N (KeyDown) -8:1385:2:65:1 //Amplify Sample: Ctrl+A (KeyDown) -8:1381:2:82:1 //Reverse sample: Ctrl+R (KeyDown) +8:1383:0:8:1 //Silence sample selection: TILBAKE (KeyDown) +8:1385:3:65:1 //Amplify Sample: Shift+Ctrl+A (KeyDown) +8:1381:3:82:1 //Reverse sample: Shift+Ctrl+R (KeyDown) 8:1382:0:46:1 //Delete sample selection: DEL (KeyDown) 8:1386:0:107:1 //Zoom Out: NUM PLUSS (KeyDown) 8:1387:0:109:1 //Zoom In: NUM MINUS (KeyDown) @@ -264,6 +266,21 @@ 8:1790:2:68:1 //Remove DC Offset: Ctrl+D (KeyDown) //----( Instrument Context [bottom] (9) )------------ +9:1825:1:9:5 //Select previous envelope point: Shift+TAB (KeyDown|KeyHold) +9:1826:0:9:5 //Select next envelope point: TAB (KeyDown|KeyHold) +9:1821:0:37:5 //Move envelope point left: PIL VENSTRE (KeyDown|KeyHold) +9:1822:0:39:5 //Move envelope point right: PIL H\xD8YRE (KeyDown|KeyHold) +9:1823:0:38:5 //Move envelope point up: PIL OPP (KeyDown|KeyHold) +9:1834:0:33:5 //Move envelope point up (big step): PGUP (KeyDown|KeyHold) +9:1824:0:40:5 //Move envelope point down: PIL NED (KeyDown|KeyHold) +9:1835:0:34:5 //Move envelope point down (big step): PGDN (KeyDown|KeyHold) +9:1827:0:45:5 //Insert envelope point: INS (KeyDown|KeyHold) +9:1828:0:46:5 //Remove envelope point: DEL (KeyDown|KeyHold) +9:1829:0:36:1 //Set loop start: HOME (KeyDown) +9:1830:0:35:5 //Set loop end: END (KeyDown|KeyHold) +9:1831:2:36:1 //Set sustain loop start: Ctrl+HOME (KeyDown) +9:1832:2:35:1 //Set sustain loop end: Ctrl+END (KeyDown) +9:1833:2:82:1 //Toggle release node: Ctrl+R (KeyDown) //----( Comments Context [bottom] (10) )------------ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |