// Copyright 1999 (c) by Perforce Software, Inc. All rights reserved. // // p4wChangePendingEditView: // The pending change edit view. // ------------------------------------- // Includes // #include <stdlib.h> #include <string.h> #include <p4wp4.h> #include "p4wView.h" #include "p4wMenuPane.h" #include "p4wChangePendingEditView.h" #include "p4wChangePendingEditPane.h" // // ------------------------------------- // Constructors and destructor. // p4wChangePendingEditView::p4wChangePendingEditView(p4wRequest & Request) : p4wRunView(Request) { // // Set the short and the long versions of the title const StrPtr *changeNo = fRequest.GetCmdArg(); if( !changeNo ) { fShortTitle.Set( "Pending Changelist" ); fFullTitle.Set( "Pending Changelist" ); } else { fShortTitle.Set( "Pending Changelist" ); fFullTitle << "Pending Changelist #" << changeNo; } } p4wChangePendingEditView::~p4wChangePendingEditView() { } // ------------------------------------- // Control item render functions. // void p4wChangePendingEditView::RenderContent() { // // Send the pending change edit pane. StrBuf path; p4wURL urlMaker; AllCommands ac = fRequest.GetLastReturnType(); const StrPtr *changeNo = fRequest.GetCmdArg(); const StrPtr *byPath = fRequest.GetDynArg( "bp" ); p4wChangePendingEditPane changePane(*this, fRequest, 0, 1, 0); // // If the bp (by path) dynamic argument is set, we need // to filter the list of files by the current path. Get // the current path from the last return type, and use // the directory portion if this current path is a file. if( byPath && *byPath == "1" ) { path.Set( fRequest.GetReturnURL( ac ).Text() ); if( ac != AC_PATHBROWSER ) { char *e = urlMaker.GetNodeLocation( path.Text(), fRequest.GetViewMode() != VM_WORKSPACE, AC_BROWSEFILE ); path.Set( path.Text(), e - path.Text() ); } if( !strcmp( path.Text(), "//" ) ) path.Clear(); else path << "..."; } // // If cmdArg is not set, this is a request for editing default change if( !changeNo ) { fRequest.p4Arg( "-o" ); fRequest.p4("change", 0, 0, &changePane); fRequest.p4Wait(); if( changePane.FatalError() ) return; // // Get the opened files with actions and revs fRequest.p4Arg("-c"); fRequest.p4Arg("default"); if( path.Length() ) fRequest.p4Arg( path.Text() ); fRequest.p4("opened", 0, 0, &changePane ); } else { fRequest.p4Arg( "-o" ); fRequest.p4Arg( changeNo->Text() ); fRequest.p4("change", 0, 0, &changePane); fRequest.p4Wait(); if( changePane.FatalError() ) return; // // Get the opened files with actions and revs fRequest.p4Arg( "-c" ); fRequest.p4Arg( changeNo->Text() ); if( path.Length() ) fRequest.p4Arg( path.Text() ); fRequest.p4("opened", 0, 0, &changePane); } fRequest.p4Wait(); if( changePane.FatalError() ) return; // // Request list of all changes (for "move to changelist" button) fRequest.p4Arg("-s"); fRequest.p4Arg("pending"); fRequest.p4("changes", 0, 0, &changePane); // // Wait for the pane to draw. fRequest.p4Wait(); } void p4wChangePendingEditView::RenderMenu() { // // Draw the menu bar p4wMenuPane menuPane(*this, fRequest, "editpending"); menuPane.Render(NULL); }
# | 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/p4wChangePendingEditView.cpp | |||||
#1 | 8914 | Matt Attaway | Initial add of the P4Web source code |