Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
48aba990
Commit
48aba990
authored
Aug 26, 2007
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Sep 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Add replace dialog.
parent
917fc5fd
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
43 additions
and
13 deletions
+43
-13
De.rc
programs/wordpad/De.rc
+2
-1
En.rc
programs/wordpad/En.rc
+3
-2
Fr.rc
programs/wordpad/Fr.rc
+2
-1
Hu.rc
programs/wordpad/Hu.rc
+1
-0
Ko.rc
programs/wordpad/Ko.rc
+3
-2
Nl.rc
programs/wordpad/Nl.rc
+1
-0
No.rc
programs/wordpad/No.rc
+2
-1
Pl.rc
programs/wordpad/Pl.rc
+1
-0
Ru.rc
programs/wordpad/Ru.rc
+1
-0
Tr.rc
programs/wordpad/Tr.rc
+1
-0
resource.h
programs/wordpad/resource.h
+3
-2
rsrc.rc
programs/wordpad/rsrc.rc
+1
-0
wordpad.c
programs/wordpad/wordpad.c
+22
-4
No files found.
programs/wordpad/De.rc
View file @
48aba990
...
...
@@ -35,7 +35,7 @@ BEGIN
END
POPUP "&Bearbeiten"
BEGIN
MENUITEM "
&R
ckgngig\tCtrl+Z", ID_EDIT_UNDO
MENUITEM "
R&
ckgngig\tCtrl+Z", ID_EDIT_UNDO
MENUITEM "&Wiederholen\tCtrl+Y", ID_EDIT_REDO
MENUITEM SEPARATOR
MENUITEM "Aus&schneiden\tCtrl+X", ID_EDIT_CUT
...
...
@@ -46,6 +46,7 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM "&Find . . .\tCrtl+F", ID_FIND
MENUITEM "Find &next\tF3", ID_FIND_NEXT
MENUITEM "&Replace . . .\tCtrl+H", ID_REPLACE
MENUITEM SEPARATOR
MENUITEM "Schreibgesch&tzt", ID_EDIT_READONLY
MENUITEM "&Gendert", ID_EDIT_MODIFIED
...
...
programs/wordpad/En.rc
View file @
48aba990
...
...
@@ -36,7 +36,7 @@ BEGIN
POPUP "&Edit"
BEGIN
MENUITEM "&Undo\tCtrl+Z", ID_EDIT_UNDO
MENUITEM "
&R
edo\tCtrl+Y", ID_EDIT_REDO
MENUITEM "
R&
edo\tCtrl+Y", ID_EDIT_REDO
MENUITEM SEPARATOR
MENUITEM "Cu&t\tCtrl+X", ID_EDIT_CUT
MENUITEM "&Copy\tCtrl+C", ID_EDIT_COPY
...
...
@@ -46,11 +46,12 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM "&Find . . .\tCrtl+F", ID_FIND
MENUITEM "Find &next\tF3", ID_FIND_NEXT
MENUITEM "&Replace . . .\tCtrl+H", ID_REPLACE
MENUITEM SEPARATOR
MENUITEM "Read-&only", ID_EDIT_READONLY
MENUITEM "&Modified", ID_EDIT_MODIFIED
MENUITEM SEPARATOR
POPUP "
&E
xtras"
POPUP "
E&
xtras"
BEGIN
MENUITEM "Selection &info", ID_EDIT_SELECTIONINFO
MENUITEM "Character &format", ID_EDIT_CHARFORMAT
...
...
programs/wordpad/Fr.rc
View file @
48aba990
...
...
@@ -36,7 +36,7 @@ BEGIN
POPUP "&dition"
BEGIN
MENUITEM "&Annuler\tCtrl+Z", ID_EDIT_UNDO
MENUITEM "
&R
pter\tCtrl+Y", ID_EDIT_REDO
MENUITEM "
R&
pter\tCtrl+Y", ID_EDIT_REDO
MENUITEM SEPARATOR
MENUITEM "&Couper\tCtrl+X", ID_EDIT_CUT
MENUITEM "Co&pier\tCtrl+C", ID_EDIT_COPY
...
...
@@ -46,6 +46,7 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM "&Find . . .\tCrtl+F", ID_FIND
MENUITEM "Find &next\tF3", ID_FIND_NEXT
MENUITEM "&Replace . . .\tCtrl+H", ID_REPLACE
MENUITEM SEPARATOR
MENUITEM "Lecture-&seule", ID_EDIT_READONLY
MENUITEM "&Modifi", ID_EDIT_MODIFIED
...
...
programs/wordpad/Hu.rc
View file @
48aba990
...
...
@@ -46,6 +46,7 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM "&Find . . .\tCrtl+F", ID_FIND
MENUITEM "Find &next\tF3", ID_FIND_NEXT
MENUITEM "&Replace . . .\tCtrl+H", ID_REPLACE
MENUITEM SEPARATOR
MENUITEM "Csak &olvashat", ID_EDIT_READONLY
MENUITEM "M&dostva", ID_EDIT_MODIFIED
...
...
programs/wordpad/Ko.rc
View file @
48aba990
...
...
@@ -37,7 +37,7 @@ BEGIN
POPUP "편집(&E)"
BEGIN
MENUITEM "되돌리기(&U)\tCtrl+Z", ID_EDIT_UNDO
MENUITEM "다시 실행(&
R
)\tCtrl+Y", ID_EDIT_REDO
MENUITEM "다시 실행(&
E
)\tCtrl+Y", ID_EDIT_REDO
MENUITEM SEPARATOR
MENUITEM "잘라내기(&T)\tCtrl+X", ID_EDIT_CUT
MENUITEM "복사(&C)\tCtrl+C", ID_EDIT_COPY
...
...
@@ -47,11 +47,12 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM "찾기(&F). . .\tCrtl+F", ID_FIND
MENUITEM "다음 찾기(&N)\tF3", ID_FIND_NEXT
MENUITEM "&Replace . . .\tCtrl+H", ID_REPLACE
MENUITEM SEPARATOR
MENUITEM "읽기 전용(&O)", ID_EDIT_READONLY
MENUITEM "수정 가능(&M)", ID_EDIT_MODIFIED
MENUITEM SEPARATOR
POPUP "기타(&
E
)"
POPUP "기타(&
X
)"
BEGIN
MENUITEM "선택 영역 정보(&I)", ID_EDIT_SELECTIONINFO
MENUITEM "문자 형식(&F)", ID_EDIT_CHARFORMAT
...
...
programs/wordpad/Nl.rc
View file @
48aba990
...
...
@@ -46,6 +46,7 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM "&Find . . .\tCrtl+F", ID_FIND
MENUITEM "Find &next\tF3", ID_FIND_NEXT
MENUITEM "&Replace . . .\tCtrl+H", ID_REPLACE
MENUITEM SEPARATOR
MENUITEM "Alleen &lezen", ID_EDIT_READONLY
MENUITEM "&Gewijzigd", ID_EDIT_MODIFIED
...
...
programs/wordpad/No.rc
View file @
48aba990
...
...
@@ -46,8 +46,9 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM "&Sk etter . . .\tCrtl+F", ID_FIND
MENUITEM "Sk etter &neste\tF3", ID_FIND_NEXT
MENUITEM "E&rstatt . . .\tCtrl+H", ID_REPLACE
MENUITEM SEPARATOR
MENUITEM "S
k&
rivebeskyttet", ID_EDIT_READONLY
MENUITEM "S
&k
rivebeskyttet", ID_EDIT_READONLY
MENUITEM "E&ndret", ID_EDIT_MODIFIED
MENUITEM SEPARATOR
POPUP "&Ekstra"
...
...
programs/wordpad/Pl.rc
View file @
48aba990
...
...
@@ -47,6 +47,7 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM "&Find . . .\tCrtl+F", ID_FIND
MENUITEM "Find &next\tF3", ID_FIND_NEXT
MENUITEM "&Replace . . .\tCtrl+H", ID_REPLACE
MENUITEM SEPARATOR
MENUITEM "Tylko do &odczytu", ID_EDIT_READONLY
MENUITEM "&Zmodifykowany", ID_EDIT_MODIFIED
...
...
programs/wordpad/Ru.rc
View file @
48aba990
...
...
@@ -45,6 +45,7 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM "&Find . . .\tCrtl+F", ID_FIND
MENUITEM "Find &next\tF3", ID_FIND_NEXT
MENUITEM "&Replace . . .\tCtrl+H", ID_REPLACE
MENUITEM SEPARATOR
MENUITEM "& ", ID_EDIT_READONLY
MENUITEM "&", ID_EDIT_MODIFIED
...
...
programs/wordpad/Tr.rc
View file @
48aba990
...
...
@@ -49,6 +49,7 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM "&Find . . .\tCrtl+F", ID_FIND
MENUITEM "Find &next\tF3", ID_FIND_NEXT
MENUITEM "&Replace . . .\tCtrl+H", ID_REPLACE
MENUITEM SEPARATOR
MENUITEM "Salt-&okunur", ID_EDIT_READONLY
MENUITEM "&Deimi", ID_EDIT_MODIFIED
...
...
programs/wordpad/resource.h
View file @
48aba990
...
...
@@ -36,9 +36,10 @@
#define ID_FIND 1014
#define ID_FIND_NEXT 1015
#define ID_REPLACE 1016
#define ID_PREVIEW_NEXTPAGE 101
6
#define ID_PREVIEW_PREVPAGE 101
7
#define ID_PREVIEW_NEXTPAGE 101
7
#define ID_PREVIEW_PREVPAGE 101
8
#define ID_ALIGN_LEFT 1100
#define ID_ALIGN_CENTER 1101
...
...
programs/wordpad/rsrc.rc
View file @
48aba990
...
...
@@ -31,6 +31,7 @@ BEGIN
"R", ID_ALIGN_RIGHT, VIRTKEY, CONTROL
"F", ID_FIND, VIRTKEY, CONTROL
VK_F3, ID_FIND_NEXT, VIRTKEY
"H", ID_REPLACE, VIRTKEY, CONTROL
"A", ID_EDIT_SELECTALL, VIRTKEY, CONTROL
"X", ID_EDIT_CUT, VIRTKEY, CONTROL
"C", ID_EDIT_COPY, VIRTKEY, CONTROL
...
...
programs/wordpad/wordpad.c
View file @
48aba990
...
...
@@ -1844,7 +1844,9 @@ static LRESULT handle_findmsg(LPFINDREPLACEW pFr)
hFindWnd
=
0
;
pFr
->
Flags
=
FR_FINDNEXT
;
return
0
;
}
else
if
(
pFr
->
Flags
&
FR_FINDNEXT
)
}
if
(
pFr
->
Flags
&
FR_FINDNEXT
||
pFr
->
Flags
&
FR_REPLACE
||
pFr
->
Flags
&
FR_REPLACEALL
)
{
DWORD
flags
=
FR_DOWN
;
FINDTEXTW
ft
;
...
...
@@ -1918,13 +1920,19 @@ static LRESULT handle_findmsg(LPFINDREPLACEW pFr)
cr
.
cpMin
=
end
;
SendMessageW
(
hEditorWnd
,
EM_SETSEL
,
(
WPARAM
)
ret
,
(
LPARAM
)
end
);
SendMessageW
(
hEditorWnd
,
EM_SCROLLCARET
,
0
,
0
);
if
(
pFr
->
Flags
&
FR_REPLACE
||
pFr
->
Flags
&
FR_REPLACEALL
)
SendMessageW
(
hEditorWnd
,
EM_REPLACESEL
,
TRUE
,
(
LPARAM
)
pFr
->
lpstrReplaceWith
);
if
(
pFr
->
Flags
&
FR_REPLACEALL
)
handle_findmsg
(
pFr
);
}
}
return
0
;
}
static
void
dialog_find
(
LPFINDREPLACEW
fr
)
static
void
dialog_find
(
LPFINDREPLACEW
fr
,
BOOL
replace
)
{
static
WCHAR
findBuffer
[
MAX_STRING_LEN
];
...
...
@@ -1936,7 +1944,10 @@ static void dialog_find(LPFINDREPLACEW fr)
fr
->
lCustData
=
-
1
;
fr
->
wFindWhatLen
=
MAX_STRING_LEN
*
sizeof
(
WCHAR
);
hFindWnd
=
FindTextW
(
fr
);
if
(
replace
)
hFindWnd
=
ReplaceTextW
(
fr
);
else
hFindWnd
=
FindTextW
(
fr
);
}
static
void
registry_read_options
(
void
)
...
...
@@ -2716,13 +2727,17 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
break
;
case
ID_FIND
:
dialog_find
(
&
findreplace
);
dialog_find
(
&
findreplace
,
FALSE
);
break
;
case
ID_FIND_NEXT
:
handle_findmsg
(
&
findreplace
);
break
;
case
ID_REPLACE
:
dialog_find
(
&
findreplace
,
TRUE
);
break
;
case
ID_FONTSETTINGS
:
dialog_choose_font
();
break
;
...
...
@@ -3048,6 +3063,9 @@ static LRESULT OnInitPopupMenu( HWND hWnd, WPARAM wParam, LPARAM lParam )
EnableMenuItem
(
hMenu
,
ID_FIND_NEXT
,
MF_BYCOMMAND
|
((
textLength
&&
mi
.
dwItemData
)
?
MF_ENABLED
:
MF_GRAYED
));
EnableMenuItem
(
hMenu
,
ID_REPLACE
,
MF_BYCOMMAND
|
(
textLength
?
MF_ENABLED
:
MF_GRAYED
));
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment