mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-14 18:11:41 -06:00
3.13
This commit is contained in:
68
7zip/FileManager/Resource/SettingsPage/SettingsPage.cpp
Executable file
68
7zip/FileManager/Resource/SettingsPage/SettingsPage.cpp
Executable file
@@ -0,0 +1,68 @@
|
||||
// SettingsPage.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
#include "resource.h"
|
||||
#include "SettingsPage.h"
|
||||
|
||||
#include "Common/StringConvert.h"
|
||||
|
||||
#include "Windows/Defs.h"
|
||||
|
||||
#include "../../RegistryUtils.h"
|
||||
#include "../../HelpUtils.h"
|
||||
#include "../../LangUtils.h"
|
||||
#include "../../ProgramLocation.h"
|
||||
|
||||
using namespace NWindows;
|
||||
|
||||
static CIDLangPair kIDLangPairs[] =
|
||||
{
|
||||
{ IDC_SETTINGS_SHOW_DOTS, 0x03010401},
|
||||
{ IDC_SETTINGS_SHOW_REAL_FILE_ICONS, 0x03010402},
|
||||
{ IDC_SETTINGS_SHOW_SYSTEM_MENU, 0x03010410}
|
||||
};
|
||||
|
||||
static LPCWSTR kEditTopic = L"FM/options.htm#settings";
|
||||
|
||||
bool CSettingsPage::OnInit()
|
||||
{
|
||||
LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0]));
|
||||
|
||||
CheckButton(IDC_SETTINGS_SHOW_DOTS, ReadShowDots());
|
||||
CheckButton(IDC_SETTINGS_SHOW_SYSTEM_MENU, ReadShowSystemMenu());
|
||||
CheckButton(IDC_SETTINGS_SHOW_REAL_FILE_ICONS, ReadShowRealFileIcons());
|
||||
return CPropertyPage::OnInit();
|
||||
}
|
||||
|
||||
LONG CSettingsPage::OnApply()
|
||||
{
|
||||
SaveShowDots(IsButtonCheckedBool(IDC_SETTINGS_SHOW_DOTS));
|
||||
SaveShowSystemMenu(IsButtonCheckedBool(IDC_SETTINGS_SHOW_SYSTEM_MENU));
|
||||
SaveShowRealFileIcons(IsButtonCheckedBool(IDC_SETTINGS_SHOW_REAL_FILE_ICONS));
|
||||
|
||||
return PSNRET_NOERROR;
|
||||
}
|
||||
|
||||
void CSettingsPage::OnNotifyHelp()
|
||||
{
|
||||
ShowHelpWindow(NULL, kEditTopic); // change it
|
||||
}
|
||||
|
||||
|
||||
bool CSettingsPage::OnCommand(int code, int itemID, LPARAM param)
|
||||
{
|
||||
if (code == EN_CHANGE &&
|
||||
(
|
||||
itemID == IDC_SETTINGS_SHOW_DOTS ||
|
||||
itemID == IDC_SETTINGS_SHOW_SYSTEM_MENU ||
|
||||
itemID == IDC_SETTINGS_SHOW_REAL_FILE_ICONS
|
||||
)
|
||||
)
|
||||
{
|
||||
Changed();
|
||||
return true;
|
||||
}
|
||||
return CPropertyPage::OnCommand(code, itemID, param);
|
||||
}
|
||||
|
||||
|
||||
20
7zip/FileManager/Resource/SettingsPage/SettingsPage.h
Executable file
20
7zip/FileManager/Resource/SettingsPage/SettingsPage.h
Executable file
@@ -0,0 +1,20 @@
|
||||
// SettingsPage.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __SETTINGSPAGE_H
|
||||
#define __SETTINGSPAGE_H
|
||||
|
||||
#include "Windows/Control/PropertyPage.h"
|
||||
#include "Windows/Control/Edit.h"
|
||||
|
||||
class CSettingsPage: public NWindows::NControl::CPropertyPage
|
||||
{
|
||||
public:
|
||||
virtual bool OnInit();
|
||||
virtual void OnNotifyHelp();
|
||||
virtual bool OnCommand(int code, int itemID, LPARAM param);
|
||||
virtual LONG OnApply();
|
||||
};
|
||||
|
||||
#endif
|
||||
19
7zip/FileManager/Resource/SettingsPage/resource.h
Executable file
19
7zip/FileManager/Resource/SettingsPage/resource.h
Executable file
@@ -0,0 +1,19 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by resource.rc
|
||||
//
|
||||
#define IDD_SETTINGS 904
|
||||
#define IDC_SETTINGS_SHOW_DOTS 1000
|
||||
#define IDC_SETTINGS_SHOW_REAL_FILE_ICONS 1001
|
||||
#define IDC_SETTINGS_SHOW_SYSTEM_MENU 1010
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 135
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1011
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
101
7zip/FileManager/Resource/SettingsPage/resource.rc
Executable file
101
7zip/FileManager/Resource/SettingsPage/resource.rc
Executable file
@@ -0,0 +1,101 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Russian resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
||||
#pragma code_page(1251)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // Russian resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_SETTINGS DIALOG DISCARDABLE 0, 0, 210, 154
|
||||
STYLE DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
|
||||
CAPTION "Settings"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
CONTROL "Show "".."" item",IDC_SETTINGS_SHOW_DOTS,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,7,196,10
|
||||
CONTROL "Show real file icons",IDC_SETTINGS_SHOW_REAL_FILE_ICONS,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,21,196,10
|
||||
CONTROL "Show system menu",IDC_SETTINGS_SHOW_SYSTEM_MENU,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,35,196,10
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_SETTINGS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 203
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 147
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
Reference in New Issue
Block a user