2007-03-27 17:47:10 +00:00
|
|
|
/*
|
|
|
|
* CiderPress
|
|
|
|
* Copyright (C) 2007 by faddenSoft, LLC. All Rights Reserved.
|
|
|
|
* See the file LICENSE for distribution terms.
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
* Support for the sub-volume selection dialog.
|
|
|
|
*
|
|
|
|
* This just picks a sub-volume. Image format overrides and blocks vs.
|
|
|
|
* sectors should be chosen elsewhere.
|
|
|
|
*/
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include "SubVolumeDialog.h"
|
|
|
|
#include "resource.h"
|
Volume name and font fixes
More volume name MOR conversions. I think I got them all.
This also switches the "archive info", "add files", and "extract
files" dialogs to use the System Font. We were using "MS Sans
Serif" before, which looks a bit ratty on Windows 7 because it
doesn't take advantage of ClearType. (Apparently the ClearType
version is "Microsoft Sans Serif", though when you set the "use
system font" boolean to true it changes the font name to "MS Shell
Dlg".) The old font also seems to be missing certain glyphs, e.g.
my HFS volume name had 'TM' in it, but that just showed up as a box
(which is why, in case you were wondering, these changes ended up
together).
The new font seems to work equally well on WinXP, so I may enable
it for all dialogs in a follow-up change. As far as I can tell it
has the same font metrics -- I haven't seen anything weird looking
in the dialogs I've updated so far.
Also, bumped the version to 4.0.0-b3.
2015-01-15 19:25:26 +00:00
|
|
|
#include "../reformat/Charset.h"
|
2007-03-27 17:47:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(SubVolumeDialog, CDialog)
|
2014-11-04 00:26:53 +00:00
|
|
|
ON_LBN_DBLCLK(IDC_SUBV_LIST, OnItemDoubleClicked)
|
2007-03-27 17:47:10 +00:00
|
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
BOOL SubVolumeDialog::OnInitDialog(void)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-18 05:13:13 +00:00
|
|
|
ASSERT(fpDiskFS != NULL);
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
CListBox* pListBox = (CListBox*) GetDlgItem(IDC_SUBV_LIST);
|
2014-11-18 05:13:13 +00:00
|
|
|
ASSERT(pListBox != NULL);
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
// if (pListBox->SetTabStops(12) != TRUE) {
|
|
|
|
// ASSERT(false);
|
|
|
|
// }
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-18 05:13:13 +00:00
|
|
|
DiskFS::SubVolume* pSubVol = fpDiskFS->GetNextSubVolume(NULL);
|
|
|
|
ASSERT(pSubVol != NULL); // shouldn't be here otherwise
|
|
|
|
while (pSubVol != NULL) {
|
2015-01-15 22:21:01 +00:00
|
|
|
CString volumeId(Charset::ConvertMORToUNI(pSubVol->GetDiskFS()->GetVolumeID()));
|
Volume name and font fixes
More volume name MOR conversions. I think I got them all.
This also switches the "archive info", "add files", and "extract
files" dialogs to use the System Font. We were using "MS Sans
Serif" before, which looks a bit ratty on Windows 7 because it
doesn't take advantage of ClearType. (Apparently the ClearType
version is "Microsoft Sans Serif", though when you set the "use
system font" boolean to true it changes the font name to "MS Shell
Dlg".) The old font also seems to be missing certain glyphs, e.g.
my HFS volume name had 'TM' in it, but that just showed up as a box
(which is why, in case you were wondering, these changes ended up
together).
The new font seems to work equally well on WinXP, so I may enable
it for all dialogs in a follow-up change. As far as I can tell it
has the same font metrics -- I haven't seen anything weird looking
in the dialogs I've updated so far.
Also, bumped the version to 4.0.0-b3.
2015-01-15 19:25:26 +00:00
|
|
|
pListBox->AddString(volumeId); // makes a copy of the string
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
pSubVol = fpDiskFS->GetNextSubVolume(pSubVol);
|
|
|
|
}
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
return CDialog::OnInitDialog();
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
void SubVolumeDialog::DoDataExchange(CDataExchange* pDX)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-04 00:26:53 +00:00
|
|
|
DDX_LBIndex(pDX, IDC_SUBV_LIST, fListBoxIndex);
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
void SubVolumeDialog::OnItemDoubleClicked(void)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-21 21:18:20 +00:00
|
|
|
// Accept a double-click as an "OK".
|
2014-11-04 00:26:53 +00:00
|
|
|
OnOK();
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|