4.44 beta

This commit is contained in:
Igor Pavlov
2007-01-20 00:00:00 +00:00
committed by Kornel Lesiński
parent 804edc5756
commit d9666cf046
1331 changed files with 10535 additions and 13791 deletions

View File

@@ -0,0 +1,81 @@
// CopyDialog.cpp
#include "StdAfx.h"
#include "CopyDialog.h"
#include "Common/StringConvert.h"
#include "Windows/Control/Static.h"
#include "Windows/Shell.h"
#include "Windows/FileName.h"
#ifdef LANG
#include "../../LangUtils.h"
#endif
using namespace NWindows;
#ifdef LANG
static CIDLangPair kIDLangPairs[] =
{
{ IDOK, 0x02000702 },
{ IDCANCEL, 0x02000710 }
};
#endif
bool CCopyDialog::OnInit()
{
#ifdef LANG
LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0]));
#endif
_path.Attach(GetItem(IDC_COPY_COMBO));
SetText(Title);
NControl::CStatic staticContol;
staticContol.Attach(GetItem(IDC_COPY_STATIC));
staticContol.SetText(Static);
for(int i = 0; i < Strings.Size(); i++)
_path.AddString(Strings[i]);
_path.SetText(Value);
return CModalDialog::OnInit();
}
bool CCopyDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
{
switch(buttonID)
{
case IDC_COPY_SET_PATH:
OnButtonSetPath();
return true;
}
return CModalDialog::OnButtonClicked(buttonID, buttonHWND);
}
void CCopyDialog::OnButtonSetPath()
{
UString currentPath;
_path.GetText(currentPath);
/*
#ifdef LANG
UString title = LangLoadString(IDS_EXTRACT_SET_FOLDER, 0x02000881);
#else
UString title = MyLoadString(IDS_EXTRACT_SET_FOLDER);
#endif
*/
UString title = LangStringSpec(IDS_SET_FOLDER, 0x03020209);
// UString title = L"Specify a location for output folder";
UString resultPath;
if (!NShell::BrowseForFolder(HWND(*this), title, currentPath, resultPath))
return;
NFile::NName::NormalizeDirPathPrefix(resultPath);
_path.SetCurSel(-1);
_path.SetText(resultPath);
}
void CCopyDialog::OnOK()
{
_path.GetText(Value);
CModalDialog::OnOK();
}

View File

@@ -0,0 +1,26 @@
// CopyDialog.h
#ifndef __COPYDIALOG_H
#define __COPYDIALOG_H
#include "Windows/Control/Dialog.h"
#include "Windows/Control/ComboBox.h"
#include "resource.h"
class CCopyDialog: public NWindows::NControl::CModalDialog
{
NWindows::NControl::CComboBox _path;
virtual void OnOK();
virtual bool OnInit();
void OnButtonSetPath();
bool OnButtonClicked(int buttonID, HWND buttonHWND);
public:
UString Title;
UString Static;
UString Value;
UStringVector Strings;
INT_PTR Create(HWND parentWindow = 0) { return CModalDialog::Create(IDD_DIALOG_COPY, parentWindow); }
};
#endif

View 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

View File

@@ -0,0 +1,7 @@
#define IDD_DIALOG_COPY 202
#define IDC_COPY_STATIC 1000
#define IDC_COPY_COMBO 1001
#define IDC_COPY_SET_PATH 1002
#define IDS_SET_FOLDER 210

View File

@@ -0,0 +1,28 @@
#include "resource.h"
#include "../../../GuiCommon.rc"
#define xSize2 346
#define ySize2 57
#define xSize (xSize2 + marg + marg)
#define ySize (ySize2 + marg + marg)
#define bYPos (ySize - marg - bYSize)
#define b1XPos (xSize - marg - bXSize)
#define b2XPos (b1XPos - 10 - bXSize)
IDD_DIALOG_COPY DIALOG 0, 0, xSize, ySize MY_MODAL_DIALOG_STYLE
CAPTION "Copy"
MY_FONT
BEGIN
LTEXT "", IDC_COPY_STATIC, marg, marg, xSize2, 8
COMBOBOX IDC_COPY_COMBO, marg, 20, xSize2 - bDotsSize - 12, 65, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "...", IDC_COPY_SET_PATH, (xSize - marg - bDotsSize), 20, bDotsSize, 14, WS_GROUP
DEFPUSHBUTTON "OK", IDOK, b2XPos, bYPos, bXSize, bYSize
PUSHBUTTON "Cancel", IDCANCEL, b1XPos, bYPos, bXSize, bYSize
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_SET_FOLDER "Specify a location for output folder."
END