// Copyright 1999 (c) by Perforce Software, Inc. All rights reserved. // // p4wCmdProcessorView: // Runs a cmd and saves the output for later display. // ------------------------------------- // Includes // #include <stdlib.h> #include <string.h> #include <p4wp4.h> #include "p4wView.h" #include "p4wStrBuf.h" #include "p4wAddPane.h" #include "p4wAddSelectPane.h" #include "p4wBranchPane.h" #include "p4wBranchDiffPane.h" #include "p4wCmdPane.h" #include "p4wCmdView.h" #include "p4wChangesPane.h" #include "p4wDeletePane.h" #include "p4wDelConfirmPane.h" #include "p4wEditPane.h" #include "p4wFTypePane.h" #include "p4wIntegPane.h" #include "p4wJobPane.h" #include "p4wLabelFilesPane.h" #include "p4wLabelPane.h" #include "p4wLabelReplacePane.h" #include "p4wLockPane.h" #include "p4wMatchPane.h" #include "p4wSyncPane.h" #include "p4wResolvePane.h" #include "p4wRevertPane.h" #include "p4wUnlockPane.h" #include "changeshelper.h" #include "p4wUpdatePane.h" #include "p4wMenuPane.h" #include "p4wConfigPane.h" #include "p4wMultiUserPane.h" #include "p4wP4CmdPane.h" #include "p4wSubmitDefPane.h" #include "p4wPasswdTestPane.h" #include "p4wMenuProcessorView.h" #include "p4wCmdProcessorView.h" // ------------------------------------- // Constructors and destructor. // p4wCmdProcessorView::p4wCmdProcessorView( p4wRequest & Request, AllCommands cmd ) : p4wView( Request ), fCommand( cmd ) { // // Initialize "from file browser" status and title fIsFromFileBrowser = p4wMenuPane::FromFileBrowser( fCommand ); fShortTitle << fFullTitle << "Save for Later"; #if 0 // // Use the actual menu string for the title, except for // the forms which have an intermediate screen. if( cmd == AC_ADDFRM ) { fMenuTitle.Set( "Select files to add" ); return; } else if( cmd == AC_DELETEJOB ) { fMenuTitle.Set( "Job -d " ); fMenuTitle << fRequest.GetURL() << " Result"; return; } else if( cmd == AC_DELETELABEL ) { fMenuTitle.Set( "Label -d " ); fMenuTitle << fRequest.GetURL() << " Result"; return; } else if( cmd == AC_DELETEBRANCH ) { fMenuTitle.Set( "Branch -d " ); fMenuTitle << fRequest.GetURL() << " Result"; return; } // // Strip off the ellipses from the menu title if found fMenuTitle.Set( p4wMenuPane::GetMenuItem( cmd, fRequest.GetBrowseMode() ) ); char *e = strstr( fMenuTitle.Text(), "..." ); if( e ) fMenuTitle.Set( fMenuTitle.Text(), e - fMenuTitle.Text() ); // // Set the short and long versions of the title fFullTitle << fMenuTitle; // // Pages that show command results display // only Command Results in the info pane title switch( fCommand ) { case AC_REMOVEFILEFRM: case AC_LOCKFILEFRM: case AC_UNLOCKFILEFRM: case AC_REVERTUNCHANGEDFILEFRM: case AC_REVERTFILEFRM: case AC_DELETELABEL: case AC_DELETEBRANCH: case AC_DELETEJOB: fShortTitle << "Command Result"; break; default: fShortTitle << fMenuTitle; break; } #endif } p4wCmdProcessorView::~p4wCmdProcessorView() { } // ------------------------------------- // Menu render functions. // void p4wCmdProcessorView::Render() { // // Bacically, this is just a wrapper around p4wMenuProcessorView::RenderContent() // but we want to so by intercepting the Render() call to prevent the p4wView::Render() // default behavior which outputs html we are not yet ready to output fRequest.fSave4Later = 1; switch(fRequest.GetCmd()) { case AC_SYNCFILE: { p4wCmdView cmdView(fRequest, "sync"); cmdView.RenderContent(); break; } case AC_EDITFILE: { p4wCmdView cmdView(fRequest, "edit"); cmdView.RenderContent(); break; } case AC_ADDFILE: { p4wCmdView cmdView(fRequest, "add"); cmdView.RenderContent(); break; } case AC_DELETEFILE: { p4wCmdView cmdView(fRequest, "delete"); cmdView.RenderContent(); break; } case AC_REVERTCMD: case AC_REVERTFILE: { p4wCmdView cmdView(fRequest, "revert"); cmdView.RenderContent(); break; } default: { p4wMenuProcessorView mpView(fRequest, fRequest.GetCmd()); mpView.RenderContent(); break; } } fRequest.fSave4Later = 0; } void p4wCmdProcessorView::RenderMenu() { p4wMenuProcessorView mpView(fRequest, fRequest.GetCmd()); mpView.RenderMenu(); }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 12234 | Matt Attaway |
Rejigger P4Web project in preparation for official sunsetting The bin directory contains the last official builds of P4Web from the Perforce download site. P4Web is soon to be completely sunsetted; these builds are here for folks who don't want to build their own. To better handle the archived builds the source code has been moved into a separate src directory. |
||
//guest/perforce_software/p4web/Views/p4wCmdProcessorView.cpp | |||||
#1 | 8914 | Matt Attaway | Initial add of the P4Web source code |