Author: gedmurphy
Date: Wed Mar 29 18:51:37 2006
New Revision: 21405
URL:
http://svn.reactos.ru/svn/reactos?rev=21405&view=rev
Log:
- [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(a)web.de
- fixes bugs 1351 & 1352
Modified:
trunk/reactos/base/applications/notepad/dialog.c (contents, props changed)
trunk/reactos/base/applications/notepad/dialog.h (props changed)
trunk/reactos/base/applications/notepad/license.c (props changed)
trunk/reactos/base/applications/notepad/main.c
trunk/reactos/base/applications/notepad/main.h
trunk/reactos/base/applications/notepad/notepad.h (props changed)
trunk/reactos/base/applications/notepad/res/De.rc
trunk/reactos/base/applications/notepad/settings.c (props changed)
trunk/reactos/base/applications/notepad/text.c (props changed)
Modified: trunk/reactos/base/applications/notepad/dialog.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/base/applications/notepad/d…
==============================================================================
--- trunk/reactos/base/applications/notepad/dialog.c (original)
+++ trunk/reactos/base/applications/notepad/dialog.c Wed Mar 29 18:51:37 2006
@@ -698,8 +698,8 @@
VOID DIALOG_SearchNext(VOID)
{
- /* FIXME: Search Next */
- DIALOG_Search();
+ if (Globals.find.lpstrFindWhat != NULL)
+ NOTEPAD_FindNext(&Globals.find, FALSE, TRUE);
}
VOID DIALOG_Replace(VOID)
Propchange: trunk/reactos/base/applications/notepad/dialog.c
------------------------------------------------------------------------------
--- svn:needs-lock (original)
+++ svn:needs-lock (removed)
@@ -1,1 +1,0 @@
-*
Propchange: trunk/reactos/base/applications/notepad/dialog.h
------------------------------------------------------------------------------
--- svn:needs-lock (original)
+++ svn:needs-lock (removed)
@@ -1,1 +1,0 @@
-*
Propchange: trunk/reactos/base/applications/notepad/license.c
------------------------------------------------------------------------------
--- svn:needs-lock (original)
+++ svn:needs-lock (removed)
@@ -1,1 +1,0 @@
-*
Modified: trunk/reactos/base/applications/notepad/main.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/base/applications/notepad/m…
==============================================================================
--- trunk/reactos/base/applications/notepad/main.c (original)
+++ trunk/reactos/base/applications/notepad/main.c Wed Mar 29 18:51:37 2006
@@ -125,7 +125,7 @@
* 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 @@
lstrcpy(p, all_files);
p += lstrlen(p) + 1;
*p = '\0';
+ Globals.find.lpstrFindWhat = NULL;
}
/***********************************************************************
@@ -358,6 +359,7 @@
if (msg == aFINDMSGSTRING)
{
FINDREPLACE *pFindReplace = (FINDREPLACE *) lParam;
+ Globals.find = *(FINDREPLACE *) lParam;
if (pFindReplace->Flags & FR_FINDNEXT)
NOTEPAD_FindNext(pFindReplace, FALSE, TRUE);
Modified: trunk/reactos/base/applications/notepad/main.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/base/applications/notepad/m…
==============================================================================
--- trunk/reactos/base/applications/notepad/main.h (original)
+++ trunk/reactos/base/applications/notepad/main.h Wed Mar 29 18:51:37 2006
@@ -76,3 +76,6 @@
/* from settings.c */
void LoadSettings(void);
void SaveSettings(void);
+
+/* from main.c */
+BOOL NOTEPAD_FindNext(FINDREPLACE *, BOOL , BOOL );
Propchange: trunk/reactos/base/applications/notepad/notepad.h
------------------------------------------------------------------------------
--- svn:needs-lock (original)
+++ svn:needs-lock (removed)
@@ -1,1 +1,0 @@
-*
Modified: trunk/reactos/base/applications/notepad/res/De.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/base/applications/notepad/r…
==============================================================================
--- trunk/reactos/base/applications/notepad/res/De.rc (original)
+++ trunk/reactos/base/applications/notepad/res/De.rc Wed Mar 29 18:51:37 2006
@@ -154,6 +154,12 @@
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"
}
Propchange: trunk/reactos/base/applications/notepad/settings.c
------------------------------------------------------------------------------
--- svn:needs-lock (original)
+++ svn:needs-lock (removed)
@@ -1,1 +1,0 @@
-*
Propchange: trunk/reactos/base/applications/notepad/text.c
------------------------------------------------------------------------------
--- svn:needs-lock (original)
+++ svn:needs-lock (removed)
@@ -1,1 +1,0 @@
-*