mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-15 00:11:40 -06:00
4.25 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
47f4915611
commit
af1fe52701
16
7zip/FileManager/Resource/SystemPage/StdAfx.h
Executable file
16
7zip/FileManager/Resource/SystemPage/StdAfx.h
Executable file
@@ -0,0 +1,16 @@
|
||||
// stdafx.h
|
||||
|
||||
#ifndef __STDAFX_H
|
||||
#define __STDAFX_H
|
||||
|
||||
#define _WIN32_WINNT 0x0400
|
||||
|
||||
// it's for Windows NT supporting (MENUITEMINFOW)
|
||||
#define WINVER 0x0400
|
||||
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
|
||||
#include "Common/NewHandler.h"
|
||||
|
||||
#endif
|
||||
@@ -26,7 +26,8 @@ const int kUpdateDatabase = kRefreshpluginsListMessage + 1;
|
||||
|
||||
static CIDLangPair kIDLangPairs[] =
|
||||
{
|
||||
{ IDC_SYSTEM_STATIC_ASSOCIATE, 0x03010302}
|
||||
{ IDC_SYSTEM_STATIC_ASSOCIATE, 0x03010302},
|
||||
{ IDC_SYSTEM_SELECT_ALL, 0x03000330}
|
||||
};
|
||||
|
||||
static LPCWSTR kSystemTopic = L"FM/options.htm#system";
|
||||
@@ -115,6 +116,7 @@ void CSystemPage::SetMainPluginText(int itemIndex, int indexInDatabase)
|
||||
_listViewExt.SetItem(&item);
|
||||
}
|
||||
|
||||
#ifndef _WIN64
|
||||
static bool IsItWindowsNT()
|
||||
{
|
||||
OSVERSIONINFO versionInfo;
|
||||
@@ -123,6 +125,7 @@ static bool IsItWindowsNT()
|
||||
return false;
|
||||
return (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT);
|
||||
}
|
||||
#endif
|
||||
|
||||
static UString GetProgramCommand()
|
||||
{
|
||||
@@ -130,11 +133,12 @@ static UString GetProgramCommand()
|
||||
UString folder;
|
||||
if (GetProgramFolderPath(folder))
|
||||
path += folder;
|
||||
path += L"7zFM";
|
||||
#ifndef _WIN64
|
||||
if (IsItWindowsNT())
|
||||
path += L"7zFMn.exe";
|
||||
else
|
||||
path += L"7zFM.exe";
|
||||
path += L"\" \"%1\"";
|
||||
path += L"n";
|
||||
#endif
|
||||
path += L".exe\" \"%1\"";
|
||||
return path;
|
||||
}
|
||||
|
||||
@@ -174,6 +178,7 @@ static CSysString GetIconPath(const CSysString &filePath,
|
||||
|
||||
LONG CSystemPage::OnApply()
|
||||
{
|
||||
UpdateDatabase();
|
||||
_extDatabase.Save();
|
||||
UString command = GetProgramCommand();
|
||||
|
||||
@@ -214,13 +219,24 @@ void CSystemPage::OnNotifyHelp()
|
||||
ShowHelpWindow(NULL, kSystemTopic);
|
||||
}
|
||||
|
||||
void CSystemPage::SelectAll()
|
||||
{
|
||||
int count = _listViewExt.GetItemCount();
|
||||
for (int i = 0; i < count; i++)
|
||||
_listViewExt.SetCheckState(i, true);
|
||||
UpdateDatabase();
|
||||
}
|
||||
|
||||
bool CSystemPage::OnButtonClicked(int buttonID, HWND buttonHWND)
|
||||
{
|
||||
switch(buttonID)
|
||||
{
|
||||
case IDC_SYSTEM_INTEGRATE_TO_CONTEXT_MENU:
|
||||
case IDC_SYSTEM_SELECT_ALL:
|
||||
{
|
||||
SelectAll();
|
||||
Changed();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return CPropertyPage::OnButtonClicked(buttonID, buttonHWND);
|
||||
}
|
||||
@@ -332,7 +348,7 @@ bool CSystemPage::OnItemChanged(const NMLISTVIEW *info)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CSystemPage::OnMessage(UINT message, UINT wParam, LPARAM lParam)
|
||||
bool CSystemPage::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(message)
|
||||
{
|
||||
|
||||
@@ -23,9 +23,10 @@ class CSystemPage: public NWindows::NControl::CPropertyPage
|
||||
void RefreshPluginsList(int selectIndex);
|
||||
void MovePlugin(bool upDirection);
|
||||
void UpdateDatabase();
|
||||
void SelectAll();
|
||||
|
||||
public:
|
||||
virtual bool OnMessage(UINT message, UINT wParam, LPARAM lParam);
|
||||
virtual bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
virtual bool OnInit();
|
||||
virtual void OnNotifyHelp();
|
||||
virtual bool OnNotify(UINT controlID, LPNMHDR lParam);
|
||||
|
||||
@@ -1,21 +1,7 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by resource.rc
|
||||
//
|
||||
#define IDD_SYSTEM 902
|
||||
#define IDS_PLUGIN 990
|
||||
#define IDC_SYSTEM_INTEGRATE_TO_CONTEXT_MENU 1010
|
||||
// #define IDC_SYSTEM_INTEGRATE_TO_CONTEXT_MENU 1010
|
||||
#define IDC_SYSTEM_STATIC_ASSOCIATE 1020
|
||||
#define IDC_SYSTEM_LIST_ASSOCIATE 1021
|
||||
#define IDC_SYSTEM_LIST_PLUGINS 1022
|
||||
|
||||
// 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 1022
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
#define IDC_SYSTEM_SELECT_ALL 1023
|
||||
|
||||
@@ -1,115 +1,31 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
#include "../../../GuiCommon.rc"
|
||||
|
||||
#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
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#define xSize2 238
|
||||
#define ySize2 204
|
||||
#define xSize (xSize2 + marg + marg)
|
||||
#define ySize (ySize2 + marg + marg)
|
||||
#define gSpace 30
|
||||
#define g0Size 105
|
||||
#define gYSize (ySize2 - 20 - bYSize)
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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_SYSTEM DIALOG DISCARDABLE 0, 0, 252, 218
|
||||
STYLE DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
|
||||
IDD_SYSTEM DIALOG 0, 0, xSize, ySize MY_PAGE_STYLE
|
||||
CAPTION "System"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
MY_FONT
|
||||
BEGIN
|
||||
LTEXT "Associate 7-Zip with:",IDC_SYSTEM_STATIC_ASSOCIATE,7,7,
|
||||
238,8
|
||||
CONTROL "List1",IDC_SYSTEM_LIST_ASSOCIATE,"SysListView32",
|
||||
LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SORTASCENDING |
|
||||
WS_BORDER | WS_TABSTOP,7,20,105,186
|
||||
CONTROL "List1",IDC_SYSTEM_LIST_PLUGINS,"SysListView32",
|
||||
LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | NOT
|
||||
WS_VISIBLE | WS_BORDER | WS_TABSTOP,143,20,102,186
|
||||
LTEXT "Associate 7-Zip with:", IDC_SYSTEM_STATIC_ASSOCIATE, marg, marg, xSize2, 8
|
||||
CONTROL "List1", IDC_SYSTEM_LIST_ASSOCIATE, "SysListView32",
|
||||
LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,
|
||||
marg, 20, g0Size, gYSize
|
||||
CONTROL "List1", IDC_SYSTEM_LIST_PLUGINS, "SysListView32",
|
||||
LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | NOT WS_VISIBLE | WS_BORDER | WS_TABSTOP,
|
||||
marg + g0Size + gSpace, 20, xSize2 - gSpace - g0Size, gYSize
|
||||
PUSHBUTTON "Select all", IDC_SYSTEM_SELECT_ALL, marg, (ySize - marg - bYSize), 90, bYSize
|
||||
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDD_SYSTEM, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 245
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 211
|
||||
HORZGUIDE, 25
|
||||
END
|
||||
IDS_PLUGIN "Plugin"
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_PLUGIN "Plugin"
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user