/* * Copyright 2004 Perforce Software. All rights reserved. * * Developed by Data Shades Ltd. */ #include "OldVersionDialog.h" OldVersionDialog::OldVersionDialog( PluginOperations *ops, StrPtr *have, StrPtr *head ) : Dialog( ops, IDD_OLD_VERSION_DIALOG, DialogWndProc ) { this->have = have; this->head = head; } BOOL CALLBACK OldVersionDialog::DialogWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) { switch(uMsg) { case WM_INITDIALOG: { OldVersionDialog *dialog = ( OldVersionDialog * )lParam; SaveDialogObject( hWnd, dialog ); UniStrBuf buff; buff.Set( _T("You have an old version of this document (") ); buff.Append( dialog->HaveRevision() ); buff.Append( _T(") and the newest version in the Perforce depot is ") ); buff.Append( dialog->HeadRevision() ); buff.Append( _T(".") ); SetDlgItemText( hWnd, IDC_VERSION_TEXT, buff.Text() ); Centre( hWnd ); } break; case WM_COMMAND: OldVersionDialog *dialog = ( OldVersionDialog * )DialogObject( hWnd ); switch ( LOWORD( wParam ) ) { case IDSYNC: dialog->SetExitCode( IDSYNC ); EndDialog( hWnd, TRUE) ; return true; case IDCHECKOUT: dialog->SetExitCode( IDCHECKOUT ); EndDialog( hWnd, TRUE ); return true; case IDCANCEL: EndDialog( hWnd, FALSE ); return true; } break; } return false; } void OldVersionDialog::SetExitCode( int code ) { exitCode = code; } int OldVersionDialog::ExitCode() { return exitCode; } StrPtr *OldVersionDialog::HaveRevision() { return have; } StrPtr *OldVersionDialog::HeadRevision() { return head; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 11893 | Robert Cowham |
Populate -o //guest/robert_cowham/perforce/P4OFC/main/... //guest/robert_cowham/perforce/P4OFC/icm/.... |
||
//guest/robert_cowham/perforce/P4OFC/main/libp4gt/OldVersionDialog.cpp | |||||
#1 | 10843 | Robert Cowham |
Initial version of P4OFC source code. See README.txt (and LICENSE.txt and doc\P4OFC-Design.docx) |