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

OptionsDialog.cpp « FileManager « 7zip « CPP - github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7413bafc0b90873ee27bc50c472f8dbdd56b67fc (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
// OptionsDialog.cpp

#include "StdAfx.h"

#include "resource.h"

#include "Common/StringConvert.h"

#include "Windows/Control/PropertyPage.h"
#include "Windows/Error.h"

#include "Resource/LangPage/LangPage.h"
#include "Resource/LangPage/resource.h"
#include "Resource/PluginsPage/PluginsPage.h"
#include "Resource/PluginsPage/resource.h"
#include "Resource/SystemPage/SystemPage.h"
#include "Resource/SystemPage/resource.h"
#include "Resource/EditPage/EditPage.h"
#include "Resource/EditPage/resource.h"
#include "Resource/SettingsPage/SettingsPage.h"
#include "Resource/SettingsPage/resource.h"

#include "LangUtils.h"
#include "MyLoadMenu.h"
#include "App.h"

using namespace NWindows;

void OptionsDialog(HWND hwndOwner, HINSTANCE /* hInstance */)
{
  CSystemPage systemPage;
  CPluginsPage pluginsPage;
  CEditPage editPage;
  CSettingsPage settingsPage;
  CLangPage langPage;

  CObjectVector<NControl::CPageInfo> pages;
  UINT32 langIDs[] = { 0x03010300, 0x03010100, 0x03010200, 0x03010400, 0x01000400};
  UINT pageIDs[] = { IDD_SYSTEM, IDD_PLUGINS, IDD_EDIT, IDD_SETTINGS, IDD_LANG};
  NControl::CPropertyPage *pagePinters[] = { &systemPage, &pluginsPage, &editPage, &settingsPage, &langPage };
  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);
  }

  INT_PTR res = NControl::MyPropertySheet(pages, hwndOwner, LangString(IDS_OPTIONS, 0x03010000));
  if (res != -1 && res != 0)
  {
    if (langPage._langWasChanged)
    {
      g_App._window.SetText(LangString(IDS_APP_TITLE, 0x03000000));
      MyLoadMenu();
    }
    g_App.SetListSettings();
    g_App.SetShowSystemMenu();
    g_App.RefreshAllPanels();
    g_App.ReloadToolbars();
    // ::PostMessage(hwndOwner, kLangWasChangedMessage, 0 , 0);
  }
}