9.06 beta

This commit is contained in:
Igor Pavlov
2009-08-17 00:00:00 +00:00
committed by Kornel Lesiński
parent 829409452d
commit c99f3ebdd6
445 changed files with 15246 additions and 8133 deletions

View File

@@ -2,73 +2,56 @@
#include "StdAfx.h"
#include "MessagesDialog.h"
#include "PasswordDialog.h"
#include "UpdateCallback100.h"
CUpdateCallback100Imp::~CUpdateCallback100Imp()
{
if (ShowMessages && !Messages.IsEmpty())
{
CMessagesDialog messagesDialog;
messagesDialog.Messages = &Messages;
messagesDialog.Create(_parentWindow);
}
}
void CUpdateCallback100Imp::AddErrorMessage(LPCWSTR message)
{
Messages.Add(message);
}
STDMETHODIMP CUpdateCallback100Imp::SetNumFiles(UInt64 numFiles)
{
ProgressDialog.ProgressSynch.SetNumFilesTotal(numFiles);
ProgressDialog->Sync.SetNumFilesTotal(numFiles);
return S_OK;
}
STDMETHODIMP CUpdateCallback100Imp::SetTotal(UInt64 size)
{
ProgressDialog.ProgressSynch.SetProgress(size, 0);
ProgressDialog->Sync.SetProgress(size, 0);
return S_OK;
}
STDMETHODIMP CUpdateCallback100Imp::SetCompleted(const UInt64 *completeValue)
{
RINOK(ProgressDialog.ProgressSynch.ProcessStopAndPause());
RINOK(ProgressDialog->Sync.ProcessStopAndPause());
if (completeValue != NULL)
ProgressDialog.ProgressSynch.SetPos(*completeValue);
ProgressDialog->Sync.SetPos(*completeValue);
return S_OK;
}
STDMETHODIMP CUpdateCallback100Imp::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize)
{
ProgressDialog.ProgressSynch.SetRatioInfo(inSize, outSize);
ProgressDialog->Sync.SetRatioInfo(inSize, outSize);
return S_OK;
}
STDMETHODIMP CUpdateCallback100Imp::CompressOperation(const wchar_t *name)
{
ProgressDialog.ProgressSynch.SetCurrentFileName(name);
ProgressDialog->Sync.SetCurrentFileName(name);
return S_OK;
}
STDMETHODIMP CUpdateCallback100Imp::DeleteOperation(const wchar_t *name)
{
ProgressDialog.ProgressSynch.SetCurrentFileName(name);
ProgressDialog->Sync.SetCurrentFileName(name);
return S_OK;
}
STDMETHODIMP CUpdateCallback100Imp::OperationResult(Int32 /* operationResult */)
{
NumFiles++;
ProgressDialog.ProgressSynch.SetNumFilesCur(NumFiles);
ProgressDialog->Sync.SetNumFilesCur(++_numFiles);
return S_OK;
}
STDMETHODIMP CUpdateCallback100Imp::UpdateErrorMessage(const wchar_t *message)
{
AddErrorMessage(message);
ProgressDialog->Sync.AddErrorMessage(message);
return S_OK;
}
@@ -88,7 +71,7 @@ STDMETHODIMP CUpdateCallback100Imp::SetTotal(const UInt64 * /* files */, const U
STDMETHODIMP CUpdateCallback100Imp::SetCompleted(const UInt64 * /* files */, const UInt64 * /* bytes */)
{
return ProgressDialog.ProgressSynch.ProcessStopAndPause();
return ProgressDialog->Sync.ProcessStopAndPause();
}
STDMETHODIMP CUpdateCallback100Imp::CryptoGetTextPassword(BSTR *password)
@@ -97,7 +80,8 @@ STDMETHODIMP CUpdateCallback100Imp::CryptoGetTextPassword(BSTR *password)
if (!_passwordIsDefined)
{
CPasswordDialog dialog;
if (dialog.Create(_parentWindow) == IDCANCEL)
ProgressDialog->WaitCreating();
if (dialog.Create(*ProgressDialog) == IDCANCEL)
return E_ABORT;
_password = dialog.Password;
_passwordIsDefined = true;