Browse Source

[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
remotes/trunk
Don Ho 14 years ago
parent
commit
23cfd4cba9
  1. BIN
      PowerEditor/bin/updater/GUP.exe
  2. 5
      PowerEditor/src/WinControls/OpenSaveFileDialog/FileDialog.cpp
  3. 17
      PowerEditor/src/WinControls/shortcut/shortcut.cpp

BIN
PowerEditor/bin/updater/GUP.exe

Binary file not shown.

5
PowerEditor/src/WinControls/OpenSaveFileDialog/FileDialog.cpp

@ -276,9 +276,14 @@ static BOOL CALLBACK fileDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM
HWND fnControl = ::GetDlgItem(hwnd, FileDialog::_dialogFileBoxId);
TCHAR fn[MAX_PATH];
::GetWindowText(fnControl, fn, MAX_PATH);
// Check condition to have the compability of default behaviour
if (*fn == '\0')
return oldProc(hwnd, message, wParam, lParam);
else if (::PathIsDirectory(fn))
return oldProc(hwnd, message, wParam, lParam);
// Process
if (currentExt != TEXT(""))
{
generic_string fnExt = changeExt(fn, currentExt, false);

17
PowerEditor/src/WinControls/shortcut/shortcut.cpp

@ -563,11 +563,19 @@ recordedMacroStep::recordedMacroStep(int iMessage, long wParam, long lParam, int
case IDD_FINDINFILES_DIR_COMBO:
case IDD_FINDINFILES_FILTERS_COMBO:
{
#ifdef UNICODE
char *ch = reinterpret_cast<char *>(lParameter);
TCHAR tch[2];
::MultiByteToWideChar(codepage, 0, ch, -1, tch, 2);
sParameter = *tch;
#else
char ch = *reinterpret_cast<char *>(lParameter);
TCHAR tch = ch;
sParameter = tch;
// dummy call
codepage = 0;
#endif
MacroType = mtUseSParameter;
lParameter = 0;
}
@ -588,12 +596,17 @@ void recordedMacroStep::PlayBack(Window* pNotepad, ScintillaEditView *pEditView)
else
{
long lParam = lParameter;
#ifdef UNICODE
char ansiBuffer[3];
#endif
if (MacroType == mtUseSParameter)
{
#ifdef UNICODE
::WideCharToMultiByte(pEditView->execute(SCI_GETCODEPAGE), 0, sParameter.c_str(), -1, ansiBuffer, 3, NULL, NULL);
lParam = reinterpret_cast<LPARAM>(ansiBuffer);
#else
lParam = reinterpret_cast<LPARAM>(sParameter.c_str());
#endif
}
pEditView->execute(message, wParameter, lParam);

Loading…
Cancel
Save