String MDIShellBrowserChild::jump_to_int(LPCTSTR url) { String dir, fname; if (!_tcsnicmp(url, TEXT("shell://"), 8)) { if (_shellBrowser->jump_to_pidl(ShellPath(url+8))) return url; } if (SplitFileSysURL(url, dir, fname)) { ///@todo use fname if (_shellBrowser->jump_to_pidl(ShellPath(dir))) return FmtString(TEXT("file://%s"), (LPCTSTR)dir); } return String(); }
String FileChildWindow::jump_to_int(LPCTSTR url) { String dir, fname; if (SplitFileSysURL(url, dir, fname)) { Entry* entry = NULL; // call read_tree() to iterate through the hierarchy and open all folders to reach dir if (_root._entry) switch(_root._entry->_etype) { case ET_SHELL: { //@@ separate into FileChildWindow in ShellChildWindow, WinChildWindow, UnixChildWindow ? ShellPath shell_path(dir); entry = _root.read_tree(&*shell_path); break;} #ifdef __WINE__ case ET_UNIX: { LPCTSTR path = dir; if (!_tcsicmp(path, _root._path, _tcslen(_root._path))) path += _tcslen(_root._path); entry = _root.read_tree(path); break;} #endif default: { // ET_NTOBJS, ET_REGISTRY, ET_FAT, ET_WINDOWS LPCTSTR path = dir; if (!_tcsnicmp(path, _root._path, _tcslen(_root._path))) path += _tcslen(_root._path); entry = _root.read_tree(path); break;} } if (entry) { // refresh left pane entries HiddenWindow hide(_left_hwnd); ListBox_ResetContent(_left_hwnd); _left->insert_entries(_root._entry); if (!_header_wdths_ok) { if (_left->calc_widths(false)) { _left->set_header(); _header_wdths_ok = true; } } set_curdir(entry); if (_left_hwnd) { int idx = ListBox_FindItemData(_left_hwnd, -1, entry); if (idx != -1) { // The item should always be found. ListBox_SetCurSel(_left_hwnd, idx); SetFocus(_left_hwnd); } } ///@todo use fname return dir; //FmtString(TEXT("file://%s"), (LPCTSTR)dir); } } return String(); }