MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / OnApply

Method OnApply

Source/ConfigGeneral.cpp:124–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124BOOL CConfigGeneral::OnApply()
125{
126 // Translate page length
127 BOOL Trans;
128
129 m_iPageStepSize = GetDlgItemInt(IDC_PAGELENGTH, &Trans, FALSE);
130
131 if (Trans == FALSE)
132 m_iPageStepSize = 4;
133 else if (m_iPageStepSize > 256 /*MAX_PATTERN_LENGTH*/)
134 m_iPageStepSize = 256 /*MAX_PATTERN_LENGTH*/;
135
136 if (m_bCheckVersion && !theApp.GetSettings()->General.bCheckVersion) // // //
137 theApp.CheckNewVersion(false);
138
139 auto *pSettings = theApp.GetSettings(); // // //
140 pSettings->General.bWrapCursor = m_bWrapCursor;
141 pSettings->General.bWrapFrames = m_bWrapFrames;
142 pSettings->General.bFreeCursorEdit = m_bFreeCursorEdit;
143 pSettings->General.bWavePreview = m_bPreviewWAV;
144 pSettings->General.bKeyRepeat = m_bKeyRepeat;
145 pSettings->General.bRowInHex = m_bRowInHex;
146 pSettings->General.iEditStyle = enum_cast<edit_style_t>(m_iEditStyle);
147 pSettings->General.bFramePreview = m_bFramePreview;
148 pSettings->General.bNoDPCMReset = m_bNoDPCMReset;
149 pSettings->General.bNoStepMove = m_bNoStepMove;
150 pSettings->General.iPageStepSize = m_iPageStepSize;
151 pSettings->General.bPullUpDelete = m_bPullUpDelete;
152 pSettings->General.bBackups = m_bBackups;
153 pSettings->General.bSingleInstance = m_bSingleInstance;
154 pSettings->General.bPreviewFullRow = m_bPreviewFullRow;
155 pSettings->General.bDblClickSelect = m_bDisableDblClick;
156 // // //
157 pSettings->General.bWrapPatternValue = m_bWrapPatternValue;
158 pSettings->General.bCutVolume = m_bCutVolume;
159 pSettings->General.bFDSOldVolume = m_bFDSOldVolume;
160 pSettings->General.bRetrieveChanState = m_bRetrieveChanState;
161 pSettings->General.bOverflowPaste = m_bOverflowPaste;
162 pSettings->General.bShowSkippedRows = m_bShowSkippedRows;
163 pSettings->General.bHexKeypad = m_bHexKeypad;
164 pSettings->General.bMultiFrameSel = m_bMultiFrameSel;
165 pSettings->General.bCheckVersion = m_bCheckVersion;
166
167 pSettings->Keys.iKeyNoteCut = m_iKeyNoteCut;
168 pSettings->Keys.iKeyNoteRelease = m_iKeyNoteRelease;
169 pSettings->Keys.iKeyClear = m_iKeyClear;
170 pSettings->Keys.iKeyRepeat = m_iKeyRepeat;
171 pSettings->Keys.iKeyEchoBuffer = m_iKeyEchoBuffer; // // //
172
173 theApp.GetMainFrame()->GetTrackerView()->UpdateSongView(); // // //
174
175 return CPropertyPage::OnApply();
176}
177
178BOOL CConfigGeneral::OnInitDialog()
179{

Callers

nothing calls this directly

Calls 5

CheckNewVersionMethod · 0.80
UpdateSongViewMethod · 0.80
GetTrackerViewMethod · 0.80
GetSettingsMethod · 0.45
GetMainFrameMethod · 0.45

Tested by

no test coverage detected