- [AUDIT] unlocked notepad. Much of the code is from Wine, ReactOS code builds on this.

- Implement find next and add some German resources - patch by timo.kreuzer@web.de
- fixes bugs 1351 & 1352

svn path=/trunk/; revision=21405
This commit is contained in:
Ged Murphy 2006-03-29 14:51:37 +00:00
parent 6fe727f643
commit 3da0dd2989
4 changed files with 16 additions and 5 deletions

View file

@ -698,8 +698,8 @@ VOID DIALOG_Search(VOID)
VOID DIALOG_SearchNext(VOID)
{
/* FIXME: Search Next */
DIALOG_Search();
if (Globals.find.lpstrFindWhat != NULL)
NOTEPAD_FindNext(&Globals.find, FALSE, TRUE);
}
VOID DIALOG_Replace(VOID)

View file

@ -125,7 +125,7 @@ static BOOL NOTEPAD_FindTextAt(FINDREPLACE *pFindReplace, LPCTSTR pszText, int i
* NOTEPAD_FindNext
*/
static BOOL NOTEPAD_FindNext(FINDREPLACE *pFindReplace, BOOL bReplace, BOOL bShowAlert)
BOOL NOTEPAD_FindNext(FINDREPLACE *pFindReplace, BOOL bReplace, BOOL bShowAlert)
{
int iTextLength, iTargetLength;
int iAdjustment = 0;
@ -255,6 +255,7 @@ static VOID NOTEPAD_InitData(VOID)
lstrcpy(p, all_files);
p += lstrlen(p) + 1;
*p = '\0';
Globals.find.lpstrFindWhat = NULL;
}
/***********************************************************************
@ -358,6 +359,7 @@ static LRESULT WINAPI NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam,
if (msg == aFINDMSGSTRING)
{
FINDREPLACE *pFindReplace = (FINDREPLACE *) lParam;
Globals.find = *(FINDREPLACE *) lParam;
if (pFindReplace->Flags & FR_FINDNEXT)
NOTEPAD_FindNext(pFindReplace, FALSE, TRUE);

View file

@ -76,3 +76,6 @@ BOOL WriteText(HANDLE hFile, LPCWSTR pszText, DWORD dwTextLen, int iEncoding, in
/* from settings.c */
void LoadSettings(void);
void SaveSettings(void);
/* from main.c */
BOOL NOTEPAD_FindNext(FINDREPLACE *, BOOL , BOOL );

View file

@ -154,6 +154,12 @@ STRING_NOTFOUND, "'%s' kann nicht gefunde
STRING_OUT_OF_MEMORY, "Nicht genügend Arbeitsspeicher, \
um diese Funktion \nabzuschließen. Beenden Sie eine oder mehrere \
\nAnwendungen, um den verfügbaren Arbeitsspeicher zu \nerhöhen."
STRING_CANNOTFIND "'%s' wurde nicht gefunden."
STRING_ANSI, "ANSI"
STRING_UNICODE, "Unicode"
STRING_UNICODE_BE, "Unicode (big endian)"
STRING_UTF8, "UTF-8"
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
}