Welcome to mirror list, hosted at ThFree Co, Russian Federation.

OptionsDialog.cpp « Explorer « UI « 7zip « CPP - github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4b2d3b51189e5948f753ee61bacc26848f2f6d24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// OptionsDialog.cpp

#include "StdAfx.h"

#include "resource.h"

#include "OptionsDialog.h"

#include "Common/StringConvert.h"
#include "Windows/Control/PropertyPage.h"

#include "../FileManager/LangUtils.h"
#include "FoldersPage.h"
#include "FoldersPageRes.h"
#include "SystemPage.h"
#include "SystemPageRes.h"

using namespace NWindows;

static INT_PTR OptionsDialog(HWND hwndOwner)
{
  CSystemPage systemPage;
  CFoldersPage foldersPage;
  UINT32 langIDs[] = { 0x01000300, 0x01000200};
  UINT pageIDs[] = { IDD_SYSTEM, IDD_FOLDERS};
  NControl::CPropertyPage *pagePinters[] = { &systemPage, &foldersPage };
  CObjectVector<NControl::CPageInfo> pages;
  const int kNumPages = sizeof(langIDs) / sizeof(langIDs[0]);
  for (int i = 0; i < kNumPages; i++)
  {
    NControl::CPageInfo page;
    page.Title = LangString(langIDs[i]);
    page.ID = pageIDs[i];
    page.Page = pagePinters[i];
    pages.Add(page);
  }
  return NControl::MyPropertySheet(pages, hwndOwner, 
    LangString(IDS_CONFIG_DIALOG_CAPTION, 0x01000000));
}

STDMETHODIMP CSevenZipOptions::PluginOptions(HWND hWnd, 
    IPluginOptionsCallback * /* callback */)
{
  /*
  CComBSTR programPath;
  RETUEN_IF_NOT_S_OK(callback->GetProgramPath(programName)));
  */
  OptionsDialog(hWnd);
  return S_OK;
}

STDMETHODIMP CSevenZipOptions::GetFileExtensions(BSTR * /* extensions */)
{
  /*
  UString extStrings;
  CObjectVector<NZipRootRegistry::CArchiverInfo> formats;
  NZipRootRegistry::ReadArchiverInfoList(formats);
  for(int i = 0; i < formats.Size(); i++)
  {
    if (i != 0)
      extStrings += L' ';
    extStrings += formats[i].Extension;
  }
  CComBSTR valueTemp = extStrings;
  *extensions = valueTemp.Detach();
  return S_OK;
  */
  return E_NOTIMPL;
}