9.04 beta

This commit is contained in:
Igor Pavlov
2009-06-02 00:00:00 +00:00
committed by Kornel Lesiński
parent 8874e4fbc9
commit 829409452d
440 changed files with 19803 additions and 9941 deletions

View File

@@ -4,21 +4,15 @@
#include "resource.h"
#include "Common/StringConvert.h"
#include "Windows/Defs.h"
#include "Windows/FileDir.h"
#include "Windows/FileName.h"
#include "Windows/DLL.h"
#include "Windows/Thread.h"
#include "IFolder.h"
#include "RegistryAssociations.h"
#include "RegistryPlugins.h"
#include "../Agent/Agent.h"
#include "LangUtils.h"
#include "OpenCallback.h"
#include "PluginLoader.h"
#include "LangUtils.h"
#include "../Agent/Agent.h"
#include "RegistryAssociations.h"
#include "RegistryPlugins.h"
using namespace NWindows;
using namespace NRegistryAssociations;
@@ -26,6 +20,7 @@ using namespace NRegistryAssociations;
struct CThreadArchiveOpen
{
UString Path;
CMyComPtr<IInStream> InStream;
CMyComPtr<IFolderManager> FolderManager;
CMyComPtr<IProgress> OpenCallback;
COpenArchiveCallback *OpenCallbackSpec;
@@ -36,7 +31,7 @@ struct CThreadArchiveOpen
void Process()
{
OpenCallbackSpec->ProgressDialog.WaitCreating();
Result = FolderManager->OpenFolderFile(Path, &Folder, OpenCallback);
Result = FolderManager->OpenFolderFile(InStream, Path, &Folder, OpenCallback);
OpenCallbackSpec->ProgressDialog.MyClose();
}
@@ -57,6 +52,7 @@ static int FindPlugin(const CObjectVector<CPluginInfo> &plugins,
}
HRESULT OpenFileFolderPlugin(
IInStream *inStream,
const UString &path,
HMODULE *module,
IFolderFolder **resultFolder,
@@ -66,13 +62,7 @@ HRESULT OpenFileFolderPlugin(
CObjectVector<CPluginInfo> plugins;
ReadFileFolderPluginInfoList(plugins);
UString extension;
UString name, pureName, dot;
if(!NFile::NDirectory::GetOnlyName(path, name))
return E_FAIL;
NFile::NName::SplitNameToPureNameAndExtension(name, pureName, dot, extension);
UString extension, name, pureName, dot;
int slashPos = path.ReverseFind(WCHAR_PATH_SEPARATOR);
UString dirPrefix;
@@ -85,6 +75,8 @@ HRESULT OpenFileFolderPlugin(
else
fileName = path;
NFile::NName::SplitNameToPureNameAndExtension(fileName, pureName, dot, extension);
if (!extension.IsEmpty())
{
CExtInfo extInfo;
@@ -122,8 +114,13 @@ HRESULT OpenFileFolderPlugin(
t.OpenCallbackSpec->PasswordIsDefined = encrypted;
t.OpenCallbackSpec->Password = password;
t.OpenCallbackSpec->ParentWindow = parentWindow;
t.OpenCallbackSpec->LoadFileInfo(dirPrefix, fileName);
if (inStream)
t.OpenCallbackSpec->SetSubArchiveName(fileName);
else
t.OpenCallbackSpec->LoadFileInfo(dirPrefix, fileName);
t.InStream = inStream;
t.Path = path;
UString progressTitle = LangString(IDS_OPENNING, 0x03020283);