mirror of
https://github.com/reactos/reactos.git
synced 2024-07-21 11:48:04 +00:00
- handle case, when having problems to open image file
- disable FAT-button since it's not yet ready svn path=/trunk/; revision=8299
This commit is contained in:
parent
cc3221be2c
commit
b45d1b24ec
|
@ -3,7 +3,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><address style="align: right;"><small>
|
<td><address style="align: right;"><small>
|
||||||
ROS Explorer Source Code Documentation
|
ROS Explorer Source Code Documentation
|
||||||
<br>generated on 11.02.2004 by <a href="http://www.doxygen.org/index.html">
|
<br>generated on 22.02.2004 by <a href="http://www.doxygen.org/index.html">
|
||||||
<img src="doxygen.png" alt="doxygen" align="middle" border=0>
|
<img src="doxygen.png" alt="doxygen" align="middle" border=0>
|
||||||
</small></address>
|
</small></address>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -101,7 +101,10 @@ FileChildWindow::FileChildWindow(HWND hwnd, const FileChildWndInfo& info)
|
||||||
CONTEXT("FileChildWindow::FileChildWindow()");
|
CONTEXT("FileChildWindow::FileChildWindow()");
|
||||||
|
|
||||||
TCHAR drv[_MAX_DRIVE+1];
|
TCHAR drv[_MAX_DRIVE+1];
|
||||||
Entry* entry;
|
Entry* entry = NULL;
|
||||||
|
|
||||||
|
_left = NULL;
|
||||||
|
_right = NULL;
|
||||||
|
|
||||||
switch(info._etype) {
|
switch(info._etype) {
|
||||||
case ET_SHELL: { //@@ evtl. Aufteilung von FileChildWindow in ShellChildWindow, WinChildWindow, UnixChildWindow
|
case ET_SHELL: { //@@ evtl. Aufteilung von FileChildWindow in ShellChildWindow, WinChildWindow, UnixChildWindow
|
||||||
|
@ -156,7 +159,7 @@ FileChildWindow::FileChildWindow(HWND hwnd, const FileChildWndInfo& info)
|
||||||
entry = _root._entry->read_tree(info._path, SORT_NONE);
|
entry = _root._entry->read_tree(info._path, SORT_NONE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ET_FAT:
|
case ET_FAT: {
|
||||||
_root._drive_type = DRIVE_UNKNOWN;
|
_root._drive_type = DRIVE_UNKNOWN;
|
||||||
|
|
||||||
_tsplitpath(info._path, drv, NULL, NULL, NULL);
|
_tsplitpath(info._path, drv, NULL, NULL, NULL);
|
||||||
|
@ -164,9 +167,13 @@ FileChildWindow::FileChildWindow(HWND hwnd, const FileChildWndInfo& info)
|
||||||
lstrcpy(_root._volname, TEXT("FAT XXX")); //@@
|
lstrcpy(_root._volname, TEXT("FAT XXX")); //@@
|
||||||
lstrcpy(_root._fs, TEXT("FAT"));
|
lstrcpy(_root._fs, TEXT("FAT"));
|
||||||
lstrcpy(_root._path, drv);
|
lstrcpy(_root._path, drv);
|
||||||
_root._entry = new FATDrive(TEXT("c:/reactos-bochs/cdrv.img")); //TEXT("\\\\.\\F:")); //@@
|
FATDrive* drive = new FATDrive(TEXT("c:/reactos-bochs/cdrv.img")); //TEXT("\\\\.\\F:")); //@@
|
||||||
|
|
||||||
|
if (drive->_hDrive != INVALID_HANDLE_VALUE) {
|
||||||
|
_root._entry = drive;
|
||||||
entry = _root._entry->read_tree(info._path, SORT_NONE);
|
entry = _root._entry->read_tree(info._path, SORT_NONE);
|
||||||
break;
|
}
|
||||||
|
break;}
|
||||||
|
|
||||||
default: // ET_WINDOWS
|
default: // ET_WINDOWS
|
||||||
_root._drive_type = GetDriveType(info._path);
|
_root._drive_type = GetDriveType(info._path);
|
||||||
|
@ -179,6 +186,7 @@ FileChildWindow::FileChildWindow(HWND hwnd, const FileChildWndInfo& info)
|
||||||
entry = _root._entry->read_tree(info._path, SORT_NAME);
|
entry = _root._entry->read_tree(info._path, SORT_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_root._entry) {
|
||||||
if (info._etype != ET_SHELL)
|
if (info._etype != ET_SHELL)
|
||||||
wsprintf(_root._entry->_data.cFileName, TEXT("%s - %s"), drv, _root._fs);
|
wsprintf(_root._entry->_data.cFileName, TEXT("%s - %s"), drv, _root._fs);
|
||||||
/*@@else
|
/*@@else
|
||||||
|
@ -192,10 +200,12 @@ FileChildWindow::FileChildWindow(HWND hwnd, const FileChildWndInfo& info)
|
||||||
|
|
||||||
_right_hwnd = *(_right=new Pane(_hwnd, IDW_TREE_RIGHT, IDW_HEADER_RIGHT, NULL, false,
|
_right_hwnd = *(_right=new Pane(_hwnd, IDW_TREE_RIGHT, IDW_HEADER_RIGHT, NULL, false,
|
||||||
COL_TYPE|COL_SIZE|COL_DATE|COL_TIME|COL_ATTRIBUTES|COL_INDEX|COL_LINKS|COL_CONTENT));
|
COL_TYPE|COL_SIZE|COL_DATE|COL_TIME|COL_ATTRIBUTES|COL_INDEX|COL_LINKS|COL_CONTENT));
|
||||||
|
}
|
||||||
|
|
||||||
_sortOrder = SORT_NAME;
|
_sortOrder = SORT_NAME;
|
||||||
_header_wdths_ok = false;
|
_header_wdths_ok = false;
|
||||||
|
|
||||||
|
if (entry)
|
||||||
set_curdir(entry, hwnd);
|
set_curdir(entry, hwnd);
|
||||||
|
|
||||||
if (_left_hwnd) {
|
if (_left_hwnd) {
|
||||||
|
@ -346,7 +356,7 @@ void FileChildWindow::resize_children(int cx, int cy)
|
||||||
|
|
||||||
cx = _split_pos + SPLIT_WIDTH/2;
|
cx = _split_pos + SPLIT_WIDTH/2;
|
||||||
|
|
||||||
{
|
if (_left && _right) {
|
||||||
WINDOWPOS wp;
|
WINDOWPOS wp;
|
||||||
HD_LAYOUT hdl;
|
HD_LAYOUT hdl;
|
||||||
|
|
||||||
|
@ -397,7 +407,7 @@ LRESULT FileChildWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
|
||||||
case WM_SETFOCUS: {
|
case WM_SETFOCUS: {
|
||||||
TCHAR path[MAX_PATH];
|
TCHAR path[MAX_PATH];
|
||||||
|
|
||||||
if (_left->_cur) {
|
if (_left && _left->_cur) {
|
||||||
_left->_cur->get_path(path);
|
_left->_cur->get_path(path);
|
||||||
SetCurrentDirectory(path);
|
SetCurrentDirectory(path);
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,12 +144,14 @@ MainFrame::MainFrame(HWND hwnd)
|
||||||
SendMessage(_hdrivebar, TB_INSERTBUTTON, btn++, (LPARAM)&drivebarBtn);
|
SendMessage(_hdrivebar, TB_INSERTBUTTON, btn++, (LPARAM)&drivebarBtn);
|
||||||
++drivebarBtn.iString;
|
++drivebarBtn.iString;
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
// insert FAT direct file system access button
|
// insert FAT direct file system access button
|
||||||
SendMessage(_hdrivebar, TB_ADDSTRING, 0, (LPARAM)TEXT("FAT\0"));
|
SendMessage(_hdrivebar, TB_ADDSTRING, 0, (LPARAM)TEXT("FAT\0"));
|
||||||
|
|
||||||
drivebarBtn.idCommand = ID_DRIVE_FAT;
|
drivebarBtn.idCommand = ID_DRIVE_FAT;
|
||||||
SendMessage(_hdrivebar, TB_INSERTBUTTON, btn++, (LPARAM)&drivebarBtn);
|
SendMessage(_hdrivebar, TB_INSERTBUTTON, btn++, (LPARAM)&drivebarBtn);
|
||||||
++drivebarBtn.iString;
|
++drivebarBtn.iString;
|
||||||
|
#endif
|
||||||
|
|
||||||
// insert web control button
|
// insert web control button
|
||||||
SendMessage(_hdrivebar, TB_ADDSTRING, 0, (LPARAM)TEXT("Web\0"));
|
SendMessage(_hdrivebar, TB_ADDSTRING, 0, (LPARAM)TEXT("Web\0"));
|
||||||
|
|
Loading…
Reference in a new issue