Skip to content

Commit

Permalink
[#57] Support for KryoFlux and associated images (Part 196: Warning s…
Browse files Browse the repository at this point in the history
…ign if "No" decoder selected)
  • Loading branch information
tomas-nestorovic committed May 4, 2024
1 parent 47d2044 commit 0dbe20f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions Main/res/resource.rc
Original file line number Diff line number Diff line change
Expand Up @@ -1807,6 +1807,7 @@ BEGIN
COMBOBOX ID_ROTATION,71,22,147,46,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "&Flux decoder:",IDC_STATIC,7,41,44,8,NOT WS_GROUP
LTEXT "W",ID_HIDDEN,54,38,18,16,NOT WS_VISIBLE | NOT WS_GROUP
COMBOBOX ID_ACCURACY,71,39,147,46,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
CONTROL "&Reset on index",ID_DEFAULT1,"Button",BS_AUTOCHECKBOX |
Expand Down
14 changes: 9 additions & 5 deletions Main/src/CapsBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,7 @@
class CParamsDialog sealed:public Utils::CRideDialog{
const LPCTSTR firmware;
const bool initialEditing;
const Utils::CRideFont warningFont;
CCapsBase &rcb;
CPrecompensation tmpPrecomp;
TCHAR flippyDiskTextOrg[40],doubleTrackDistanceTextOrg[80];
Expand Down Expand Up @@ -1333,6 +1334,7 @@
}
// . forcing redrawing (as the new text may be shorter than the original text, leaving the original partly visible)
InvalidateDlgItem(ID_MEDIUM);
Invalidate(FALSE);
// . refreshing the status of Precompensation
tmpPrecomp.Load(mt);
RefreshPrecompensationStatus();
Expand Down Expand Up @@ -1385,6 +1387,9 @@
static constexpr WORD InitialSettingIds[]={ ID_ROTATION, ID_ACCURACY, ID_DEFAULT1, ID_SIDE, ID_DRIVE, ID_40D80, ID_TRACK, ID_TIME, 0 };
EnableDlgItems( InitialSettingIds, initialEditing );
EnableDlgItem( ID_READABLE, params.calibrationAfterError!=TParams::TCalibrationAfterError::NONE );
SetDlgItemSingleCharUsingFont( // a warning that No decoder selected (archivation)
ID_HIDDEN, L'\xf0ea', warningFont
);
// . if DoubleTrackStep changed manually, adjusting the text of the ID_40D80 checkbox
SetDlgItemSingleCharUsingFont( ID_RECOVER, 0xf071, FONT_WEBDINGS, 120 );
GetDlgItemText( ID_SIDE, flippyDiskTextOrg, ARRAYSIZE(flippyDiskTextOrg) );
Expand All @@ -1399,14 +1404,12 @@
);
// . displaying inserted Medium information
SetDlgItemSingleCharUsingFont( // a warning that a 40-track disk might have been misrecognized
ID_INFORMATION,
L'\xf0ea', (HFONT)Utils::CRideFont(FONT_WEBDINGS,175,false,true).Detach()
ID_INFORMATION, L'\xf0ea', warningFont
);
RefreshMediumInformation();
// . updating write pre-compensation status
SetDlgItemSingleCharUsingFont( // a warning that pre-compensation not up-to-date
ID_INSTRUCTION,
L'\xf0ea', (HFONT)Utils::CRideFont(FONT_WEBDINGS,175,false,true).Detach()
ID_INSTRUCTION, L'\xf0ea', warningFont
);
RefreshPrecompensationStatus();
// . adjusting calibration possibilities
Expand Down Expand Up @@ -1497,7 +1500,7 @@
case MAKELONG(ID_ACCURACY,CBN_SELCHANGE):{
// FluxDecoder changed
const Utils::CVarTempReset<TParams::TFluxDecoder> fd0( rcb.params.fluxDecoder, (TParams::TFluxDecoder)GetDlgComboBoxSelectedIndex(ID_ACCURACY) );
if (!EnableDlgItem( ID_TRACK, rcb.params.fluxDecoder!=TParams::TFluxDecoder::NO_FLUX_DECODER ))
if (ShowDlgItem( ID_HIDDEN, !EnableDlgItem( ID_TRACK, rcb.params.fluxDecoder!=TParams::TFluxDecoder::NO_FLUX_DECODER ) ))
CheckDlgButton( ID_TRACK, BST_UNCHECKED ); // when archiving, any corrections must be turned off
SendMessage( WM_COMMAND, ID_RECOVER ); // refresh information on inserted Medium
break;
Expand Down Expand Up @@ -1584,6 +1587,7 @@
CParamsDialog(CCapsBase &rcb,LPCTSTR firmware,bool initialEditing)
// ctor
: Utils::CRideDialog(IDR_CAPS_DEVICE_ACCESS)
, warningFont( FONT_WEBDINGS, 175, false, true )
, rcb(rcb) , params(rcb.params) , initialEditing(initialEditing) , firmware(firmware)
, tmpPrecomp(rcb.precompensation) {
}
Expand Down

0 comments on commit 0dbe20f

Please sign in to comment.