[BEHAVIOUR_CHANGED] Modify SaveFile dialog behaviour: it will not process a given directory as saving file name. It browse inside the directory instead.
[BUG_FIXED] Fix build problem for ANSI version. [UPDATE] Update GUP.exe to v1.9. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@678 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
5f9206f627
commit
23cfd4cba9
Binary file not shown.
|
@ -276,9 +276,14 @@ static BOOL CALLBACK fileDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||||
HWND fnControl = ::GetDlgItem(hwnd, FileDialog::_dialogFileBoxId);
|
HWND fnControl = ::GetDlgItem(hwnd, FileDialog::_dialogFileBoxId);
|
||||||
TCHAR fn[MAX_PATH];
|
TCHAR fn[MAX_PATH];
|
||||||
::GetWindowText(fnControl, fn, MAX_PATH);
|
::GetWindowText(fnControl, fn, MAX_PATH);
|
||||||
|
|
||||||
|
// Check condition to have the compability of default behaviour
|
||||||
if (*fn == '\0')
|
if (*fn == '\0')
|
||||||
return oldProc(hwnd, message, wParam, lParam);
|
return oldProc(hwnd, message, wParam, lParam);
|
||||||
|
else if (::PathIsDirectory(fn))
|
||||||
|
return oldProc(hwnd, message, wParam, lParam);
|
||||||
|
|
||||||
|
// Process
|
||||||
if (currentExt != TEXT(""))
|
if (currentExt != TEXT(""))
|
||||||
{
|
{
|
||||||
generic_string fnExt = changeExt(fn, currentExt, false);
|
generic_string fnExt = changeExt(fn, currentExt, false);
|
||||||
|
|
|
@ -563,11 +563,19 @@ recordedMacroStep::recordedMacroStep(int iMessage, long wParam, long lParam, int
|
||||||
case IDD_FINDINFILES_DIR_COMBO:
|
case IDD_FINDINFILES_DIR_COMBO:
|
||||||
case IDD_FINDINFILES_FILTERS_COMBO:
|
case IDD_FINDINFILES_FILTERS_COMBO:
|
||||||
{
|
{
|
||||||
|
#ifdef UNICODE
|
||||||
char *ch = reinterpret_cast<char *>(lParameter);
|
char *ch = reinterpret_cast<char *>(lParameter);
|
||||||
TCHAR tch[2];
|
TCHAR tch[2];
|
||||||
::MultiByteToWideChar(codepage, 0, ch, -1, tch, 2);
|
::MultiByteToWideChar(codepage, 0, ch, -1, tch, 2);
|
||||||
sParameter = *tch;
|
sParameter = *tch;
|
||||||
|
#else
|
||||||
|
char ch = *reinterpret_cast<char *>(lParameter);
|
||||||
|
TCHAR tch = ch;
|
||||||
|
sParameter = tch;
|
||||||
|
|
||||||
|
// dummy call
|
||||||
|
codepage = 0;
|
||||||
|
#endif
|
||||||
MacroType = mtUseSParameter;
|
MacroType = mtUseSParameter;
|
||||||
lParameter = 0;
|
lParameter = 0;
|
||||||
}
|
}
|
||||||
|
@ -588,12 +596,17 @@ void recordedMacroStep::PlayBack(Window* pNotepad, ScintillaEditView *pEditView)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
long lParam = lParameter;
|
long lParam = lParameter;
|
||||||
|
#ifdef UNICODE
|
||||||
char ansiBuffer[3];
|
char ansiBuffer[3];
|
||||||
|
#endif
|
||||||
if (MacroType == mtUseSParameter)
|
if (MacroType == mtUseSParameter)
|
||||||
{
|
{
|
||||||
|
#ifdef UNICODE
|
||||||
::WideCharToMultiByte(pEditView->execute(SCI_GETCODEPAGE), 0, sParameter.c_str(), -1, ansiBuffer, 3, NULL, NULL);
|
::WideCharToMultiByte(pEditView->execute(SCI_GETCODEPAGE), 0, sParameter.c_str(), -1, ansiBuffer, 3, NULL, NULL);
|
||||||
lParam = reinterpret_cast<LPARAM>(ansiBuffer);
|
lParam = reinterpret_cast<LPARAM>(ansiBuffer);
|
||||||
|
#else
|
||||||
|
lParam = reinterpret_cast<LPARAM>(sParameter.c_str());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
pEditView->execute(message, wParameter, lParam);
|
pEditView->execute(message, wParameter, lParam);
|
||||||
|
|
Loading…
Reference in New Issue