// // Copyright 2007 Perforce Software. All rights reserved. // // This file is part of Perforce - the FAST SCM System. // // p4wResolveIAendPane: // Interactive Resolve ending pane #include <p4wp4.h> #include "p4wStrBuf.h" #include "p4wHtml.h" #include "p4wPane.h" #include "p4wResolveIAendPane.h" p4wResolveIAendPane::p4wResolveIAendPane( p4wView & ParentView, p4wRequest & Request, int rc ) : p4wPane( ParentView, Request ), fSeenData(0) { fRC = rc; } p4wResolveIAendPane::~p4wResolveIAendPane() { } // ------------------------------------- // Render functions. // void p4wResolveIAendPane::Begin() { // // Begin the pane. p4wHtml htm; htm.comment( "BEGIN INTERACTIVE RESOLVE END PANE" ); fRequest << htm; } void p4wResolveIAendPane::Render( StrDict * varList ) { p4wHtml htm; StrBuf clearIcon; htm.beginTRow(); htm.beginCol(); htm.icon( clearIcon.Text(), "15", "1", "", 1 ); htm.endCol(); htm.endTRow(); htm.beginTRow(); htm.beginCol(); htm.beginTable( "0", "100%", "8", "1", "#FFFFFF" ); // 7F7F7F for border htm.beginTRow( NULL, NULL, "#FFFFFF" ); htm.beginCol(); htm.beginTable( "0", NULL, "2", "0", "#FFFFFF" ); htm.beginTRow(); htm.beginCol(); htm.text("Command:", "b"); htm.endCol(); htm.endTRow(); htm.beginTRow(); htm.beginCol(); htm.icon( clearIcon.Text(), "1", "40", "", 1 ); htm << "Resolve " << p4wStrBuf().EscapeHTML( fRequest.GetDepotPath(), Unicode() ).Text(); htm.endCol(); htm.endTRow(); htm.beginTRow(); htm.beginCol(); htm.text("Result:", "b"); htm.endCol(); htm.endTRow(); htm.beginTRow(); htm.beginCol(); htm.icon( clearIcon.Text(), "1", "40", "", 1 ); char time_buffer[255 + 1]; time_buffer[0] = '\0'; time_t iTime = time( NULL ); StrBuf time_format; time_format.Append( "%a, %d %b %Y %H:%M:%S %Z" ); strftime( time_buffer, sizeof( time_buffer ), time_format.Text(), localtime( &iTime ) ); switch(fRC) { case CMS_SKIP: htm << "Resolve skipped at " << time_buffer << crlf; break; case CMS_YOURS: htm << "Your file accepted at " << time_buffer << crlf; break; case CMS_THEIRS: htm << "Their file accepted at " << time_buffer << crlf; break; case CMS_EDIT: htm << "Edited Merged file accepted at " << time_buffer << crlf; break; default: htm << "Merged file accepted at " << time_buffer << crlf; break; } htm.paragraph(); htm.icon( clearIcon.Text(), "1", "40", "", 1 ); htm << "You still need to submit this file's changelist "; StrPtr *change = varList->GetVar( "change" ); fRequest << htm; htm.Clear(); if (change) { p4wHtml htm(1); htm << "("; StrBuf newBase; fRequest.UseNewBase( newBase, NULL, "path", NULL ); p4wURL urlMaker; StrBuf changeURL; StrBufDict cmdArgs; cmdArgs.SetVar( "arg", change ); urlMaker.ConstructURL( changeURL, newBase.Text(), AC_CHANGEPENDINGEDIT, strcmp(change->Text(), "default") ? &cmdArgs : NULL, fRequest.GetUnicode() ); htm.beginLink( changeURL.Text() ); if (strcmp(change->Text(), "default")) htm << p4wStrBuf().EscapeHTML( *change, Unicode() ).Text(); else htm << "Default"; htm.endLink(); htm << ") "; fRequest << htm; } htm << "to update the head revision of the file in the depot."; fRequest << htm; return; } void p4wResolveIAendPane::End() { // // End the pane. p4wHtml htm; htm.endCol(); htm.endTRow(); htm.endTable(); htm << "</center>"; htm.endCol(); htm.endTRow(); htm.endTable(); htm.comment( "END INTERACTIVE RESOLVE END PANE" ); fRequest << htm; }
# | 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/Panes/p4wResolveIAendPane.cpp | |||||
#1 | 8914 | Matt Attaway | Initial add of the P4Web source code |