// // Copyright 2000 Perforce Software. All rights reserved. // // This file is part of Perforce - the FAST SCM System. // // p4wAddSelectView -- Call fstat on files entered from the Select Files // to add form, and pass the results to the final Add form. #include <stdlib.h> #include <string.h> #include <p4wp4.h> #include "p4wAddSelectView.h" #include "p4wMenuPane.h" #include "p4wAddPane.h" p4wAddSelectView::p4wAddSelectView(p4wRequest & Request) : p4wRunView(Request) { // // Set the short and long versions of the title fShortTitle.Set( "Open files for add..." ); fFullTitle.Set( "Open files for add..." ); } p4wAddSelectView::~p4wAddSelectView() { } // ------------------------------------- // Control item render functions. // void p4wAddSelectView::RenderContent() { // Build a spec to parse the Files options if( !ProcessForm() ) { RenderError("Requested URL is invalid in this context."); return; } StrPtr *uch = specTable.GetVar("CheckOption"); int unchecked = 0; if( uch && *uch == "unchecked" ) unchecked = 1; // // Get pending changes p4wAddPane addPane( *this, fRequest, 0, unchecked ); const char *changesArgs[] = { "-s", "pending" }; fRequest.p4("changes", 2, changesArgs, &addPane); fRequest.p4Wait(); if( addPane.FatalError() ) return; // // Parse the Files variable to get file arguments. Don't issue command // if this returned an error. // // If the server supports allowing protected characters in // filenames, flag this so that the characters will be // protected prior to calling fstat const StrPtr *server = fRequest.GetProtocol( "server2" ); if( server && server->Atoi() > 17 ) ++fProtectP4Chars; if( !AddFileArgs() ) { addPane.EndPage(); return; } // // Run fstat to get the list of files for the next Add form fRequest.p4( "fstat", 0, 0, &addPane ); fRequest.p4Wait(); } void p4wAddSelectView::RenderMenu() { // // Draw the menu bar p4wMenuPane menuPane(*this, fRequest, "add"); menuPane.Render(NULL); }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 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. |
||
#1 | 8914 | Matt Attaway | Initial add of the P4Web source code |