BOOL CUnzipper::GetFileInfo(int nFile, UZ_FileInfo& info) { if (!m_uzFile) return FALSE; if (!GotoFile(nFile)) return FALSE; return GetFileInfo(info); }
LRESULT CClassView::OnGotoDeclare(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { HTREEITEM item = GetSelectedItem(); vfc_token * tk = NULL; if (item && (tk = GetToken(item)) != NULL) { GotoFile(tk,false); } return 0; }
BOOL CUnzipper::UnzipFile(int nFile, LPCTSTR szFolder, BOOL bIgnoreFilePath) { if (!m_uzFile) return FALSE; if (!szFolder) szFolder = m_szOutputFolder; if (!GotoFile(nFile)) return FALSE; return UnzipFile(szFolder, bIgnoreFilePath); }
LRESULT CClassView::OnGotoDefine(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { HTREEITEM item = GetSelectedItem(); if (item) { vfc_token * tk = GetToken(item); if (tk) { GotoFile(tk,true); } } return 0; }
/* * NewFile - load up a new file */ vi_rc NewFile( char *name, bool same_file ) { vi_rc rc; bool dup; status_type oldstatus; dup = EditFlags.DuplicateFile; EditFlags.DuplicateFile = false; oldstatus = UpdateCurrentStatus( CSTATUS_READING ); ScreenPage( 1 ); #ifdef __WIN__ EditFlags.ResizeableWindow = true; #endif rc = createNewFile( name, same_file ); if( rc != ERR_NO_ERR && rc != NEW_FILE ) { ScreenPage( -1 ); if( !EditFlags.Starting ) { MoveWindowToFrontDammit( MessageWindow, true ); MoveWindowToFrontDammit( CurrentWindow, true ); } UpdateCurrentStatus( oldstatus ); return( rc ); } GoToLineNoRelCurs( 1 ); GoToColumnOnCurrentLine( 1 ); FileSPVAR(); SaveCurrentInfo(); if( !same_file ) { inReadHook++; rc = SourceHook( SRC_HOOK_READ, rc ); inReadHook--; } /* * back from hook, so all loadings are done * (who should have priority - hook or fts commands?) */ #if 0 rc = FTSRunCmds( CurrentFile->name ); FTSRunCmds( CurrentFile->name ); #endif /* * reset the screen to the display page, display everything */ ScreenPage( -1 ); MoveWindowToFrontDammit( CurrentWindow, true ); UpdateStatusWindow(); SetWindowCursor(); DCDisplayAllLines(); EditFlags.DuplicateFile = dup; DisplayFileStatus(); SaveCurrentInfo(); ActiveWindow( CurrentWindow ); VarAddRandC(); SetModifiedVar( false ); UpdateCurrentStatus( oldstatus ); if( !same_file && !inReadHook ) { UpdateLastFileList( CurrentFile->name ); } #ifdef __WIN__ DCUpdateAll(); ResetEditWindowCursor( CurrentWindow ); SetWindowCursorForReal(); GotoFile( CurrentWindow ); #endif return( rc ); } /* NewFile */