mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 16:07:04 -06:00
16.01
This commit is contained in:
committed by
Kornel Lesiński
parent
66ac98bb02
commit
bec3b479dc
@@ -508,10 +508,10 @@ EXTERN_C HANDLE WINAPI OpenPlugin(int openFrom, INT_PTR item)
|
||||
EXTERN_C void WINAPI ClosePlugin(HANDLE plugin)
|
||||
{
|
||||
// OutputDebugStringA("-- ClosePlugin --- START");
|
||||
MY_TRY_BEGIN;
|
||||
// MY_TRY_BEGIN;
|
||||
delete (CPlugin *)plugin;
|
||||
// OutputDebugStringA("-- ClosePlugin --- END");
|
||||
MY_TRY_END1("ClosePlugin");
|
||||
// MY_TRY_END1("ClosePlugin");
|
||||
}
|
||||
|
||||
EXTERN_C int WINAPI GetFindData(HANDLE plugin, struct PluginPanelItem **panelItems, int *itemsNumber, int opMode)
|
||||
|
||||
@@ -496,6 +496,7 @@ void CPlugin::GetOpenPluginInfo(struct OpenPluginInfo *info)
|
||||
|
||||
info->Format = kPluginFormatName;
|
||||
|
||||
{
|
||||
UString name;
|
||||
{
|
||||
FString dirPrefix, fileName;
|
||||
@@ -517,6 +518,8 @@ void CPlugin::GetOpenPluginInfo(struct OpenPluginInfo *info)
|
||||
COPY_STR_LIMITED(m_PannelTitleBuffer, UnicodeStringToMultiByte(m_PannelTitle, CP_OEMCP));
|
||||
info->PanelTitle = m_PannelTitleBuffer;
|
||||
|
||||
}
|
||||
|
||||
memset(m_InfoLines, 0, sizeof(m_InfoLines));
|
||||
m_InfoLines[0].Text[0] = 0;
|
||||
m_InfoLines[0].Separator = TRUE;
|
||||
@@ -716,11 +719,14 @@ HRESULT CPlugin::ShowAttributesWindow()
|
||||
|
||||
int size = 2;
|
||||
CRecordVector<CInitDialogItem> initDialogItems;
|
||||
|
||||
|
||||
int xSize = 70;
|
||||
CInitDialogItem idi =
|
||||
{ DI_DOUBLEBOX, 3, 1, xSize - 4, size - 2, false, false, 0, false, NMessageID::kProperties, NULL, NULL };
|
||||
initDialogItems.Add(idi);
|
||||
{
|
||||
const CInitDialogItem idi =
|
||||
{ DI_DOUBLEBOX, 3, 1, xSize - 4, size - 2, false, false, 0, false, NMessageID::kProperties, NULL, NULL };
|
||||
initDialogItems.Add(idi);
|
||||
}
|
||||
|
||||
AStringVector values;
|
||||
|
||||
const int kStartY = 3;
|
||||
@@ -731,12 +737,14 @@ HRESULT CPlugin::ShowAttributesWindow()
|
||||
|
||||
int startY = kStartY + values.Size();
|
||||
|
||||
CInitDialogItem idi =
|
||||
{ DI_TEXT, 5, startY, 0, 0, false, false, 0, false, 0, NULL, NULL };
|
||||
idi.DataMessageId = FindPropNameID(property.ID);
|
||||
if (idi.DataMessageId < 0)
|
||||
idi.DataString = property.Name;
|
||||
initDialogItems.Add(idi);
|
||||
{
|
||||
CInitDialogItem idi =
|
||||
{ DI_TEXT, 5, startY, 0, 0, false, false, 0, false, 0, NULL, NULL };
|
||||
idi.DataMessageId = FindPropNameID(property.ID);
|
||||
if (idi.DataMessageId < 0)
|
||||
idi.DataString = property.Name;
|
||||
initDialogItems.Add(idi);
|
||||
}
|
||||
|
||||
NCOM::CPropVariant prop;
|
||||
RINOK(_folder->GetProperty(itemIndex, property.ID, &prop));
|
||||
@@ -744,7 +752,7 @@ HRESULT CPlugin::ShowAttributesWindow()
|
||||
values.Add(s);
|
||||
|
||||
{
|
||||
CInitDialogItem idi =
|
||||
const CInitDialogItem idi =
|
||||
{ DI_TEXT, 30, startY, 0, 0, false, false, 0, false, -1, NULL, NULL };
|
||||
initDialogItems.Add(idi);
|
||||
}
|
||||
@@ -774,7 +782,7 @@ HRESULT CPlugin::ShowAttributesWindow()
|
||||
properties2.Add(prop);
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < properties2.Size(); i++)
|
||||
for (i = 0; i < properties2.Size(); i++)
|
||||
{
|
||||
const CArchiveItemProperty &property = properties2[i];
|
||||
CMyComBSTR name;
|
||||
@@ -802,9 +810,9 @@ HRESULT CPlugin::ShowAttributesWindow()
|
||||
}
|
||||
else
|
||||
{
|
||||
for (UInt32 i = 0; i < dataSize; i++)
|
||||
for (UInt32 k = 0; k < dataSize; k++)
|
||||
{
|
||||
Byte b = ((const Byte *)data)[i];
|
||||
Byte b = ((const Byte *)data)[k];
|
||||
s += GetHex((Byte)((b >> 4) & 0xF));
|
||||
s += GetHex((Byte)(b & 0xF));
|
||||
}
|
||||
@@ -812,17 +820,20 @@ HRESULT CPlugin::ShowAttributesWindow()
|
||||
}
|
||||
|
||||
int startY = kStartY + values.Size();
|
||||
CInitDialogItem idi =
|
||||
{ DI_TEXT, 5, startY, 0, 0, false, false, 0, false, 0, NULL, NULL };
|
||||
idi.DataMessageId = FindPropNameID(property.ID);
|
||||
if (idi.DataMessageId < 0)
|
||||
idi.DataString = property.Name;
|
||||
initDialogItems.Add(idi);
|
||||
|
||||
{
|
||||
CInitDialogItem idi =
|
||||
{ DI_TEXT, 5, startY, 0, 0, false, false, 0, false, 0, NULL, NULL };
|
||||
idi.DataMessageId = FindPropNameID(property.ID);
|
||||
if (idi.DataMessageId < 0)
|
||||
idi.DataString = property.Name;
|
||||
initDialogItems.Add(idi);
|
||||
}
|
||||
|
||||
values.Add(s);
|
||||
|
||||
{
|
||||
CInitDialogItem idi =
|
||||
const CInitDialogItem idi =
|
||||
{ DI_TEXT, 30, startY, 0, 0, false, false, 0, false, -1, NULL, NULL };
|
||||
initDialogItems.Add(idi);
|
||||
}
|
||||
|
||||
@@ -437,10 +437,8 @@ HRESULT CompressFiles(const CObjectVector<PluginPanelItem> &pluginPanelItems)
|
||||
UString archiveNameSrc = resultPath;
|
||||
UString arcName = archiveNameSrc;
|
||||
|
||||
const CArcInfoEx &arcInfo = codecs->Formats[archiverIndex];
|
||||
int prevFormat = archiverIndex;
|
||||
|
||||
SetArcName(arcName, arcInfo);
|
||||
SetArcName(arcName, codecs->Formats[archiverIndex]);
|
||||
|
||||
const CActionSet *actionSet = &k_ActionSet_Add;
|
||||
|
||||
@@ -454,13 +452,14 @@ HRESULT CompressFiles(const CObjectVector<PluginPanelItem> &pluginPanelItems)
|
||||
const int kMethodRadioIndex = kArchiveNameIndex + 2;
|
||||
const int kModeRadioIndex = kMethodRadioIndex + 7;
|
||||
|
||||
const CArcInfoEx &arcInfo = codecs->Formats[archiverIndex];
|
||||
|
||||
char updateAddToArchiveString[512];
|
||||
const AString s = UnicodeStringToMultiByte(arcInfo.Name, CP_OEMCP);
|
||||
|
||||
sprintf(updateAddToArchiveString,
|
||||
{
|
||||
const CArcInfoEx &arcInfo = codecs->Formats[archiverIndex];
|
||||
const AString s = UnicodeStringToMultiByte(arcInfo.Name, CP_OEMCP);
|
||||
sprintf(updateAddToArchiveString,
|
||||
g_StartupInfo.GetMsgString(NMessageID::kUpdateAddToArchive), (const char *)s);
|
||||
}
|
||||
|
||||
int methodIndex = 0;
|
||||
int i;
|
||||
@@ -471,7 +470,7 @@ HRESULT CompressFiles(const CObjectVector<PluginPanelItem> &pluginPanelItems)
|
||||
break;
|
||||
}
|
||||
|
||||
struct CInitDialogItem initItems[]=
|
||||
const struct CInitDialogItem initItems[]=
|
||||
{
|
||||
{ DI_DOUBLEBOX, 3, 1, 72, kYSize - 2, false, false, 0, false, NMessageID::kUpdateTitle, NULL, NULL },
|
||||
|
||||
@@ -532,12 +531,12 @@ HRESULT CompressFiles(const CObjectVector<PluginPanelItem> &pluginPanelItems)
|
||||
{
|
||||
CIntVector indices;
|
||||
CSysStringVector archiverNames;
|
||||
FOR_VECTOR (i, codecs->Formats)
|
||||
FOR_VECTOR (k, codecs->Formats)
|
||||
{
|
||||
const CArcInfoEx &arc = codecs->Formats[i];
|
||||
const CArcInfoEx &arc = codecs->Formats[k];
|
||||
if (arc.UpdateEnabled)
|
||||
{
|
||||
indices.Add(i);
|
||||
indices.Add(k);
|
||||
archiverNames.Add(GetSystemString(arc.Name, CP_OEMCP));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user