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
ac6ddbc9
Commit
ac6ddbc9
authored
Mar 31, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Mar 31, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Add support for TXTBIT_ALLOWBEEP.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7f7fdd6c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
editor.c
dlls/riched20/editor.c
+12
-6
No files found.
dlls/riched20/editor.c
View file @
ac6ddbc9
...
...
@@ -279,6 +279,11 @@ ME_Paragraph *editor_end_para( ME_TextEditor *editor )
return
&
editor
->
pBuffer
->
pLast
->
member
.
para
;
}
static
BOOL
editor_beep
(
ME_TextEditor
*
editor
,
UINT
type
)
{
return
editor
->
props
&
TXTBIT_ALLOWBEEP
&&
MessageBeep
(
type
);
}
static
LRESULT
ME_StreamInText
(
ME_TextEditor
*
editor
,
DWORD
dwFormat
,
ME_InStream
*
stream
,
ME_Style
*
style
)
{
WCHAR
*
pText
;
...
...
@@ -2281,7 +2286,7 @@ static BOOL paste_special(ME_TextEditor *editor, UINT cf, REPASTESPECIAL *ps, BO
/* Protect read-only edit control from modification */
if
(
editor
->
props
&
TXTBIT_READONLY
)
{
if
(
!
check_only
)
MessageBeep
(
MB_ICONERROR
);
if
(
!
check_only
)
editor_beep
(
editor
,
MB_ICONERROR
);
return
FALSE
;
}
...
...
@@ -2379,7 +2384,7 @@ static BOOL copy_or_cut( ME_TextEditor *editor, BOOL cut )
count
-=
offs
;
hr
=
editor_copy_or_cut
(
editor
,
cut
,
sel_start
,
count
,
NULL
);
if
(
FAILED
(
hr
))
MessageBeep
(
MB_ICONERROR
);
if
(
FAILED
(
hr
))
editor_beep
(
editor
,
MB_ICONERROR
);
return
SUCCEEDED
(
hr
);
}
...
...
@@ -2422,7 +2427,7 @@ static BOOL handle_enter(ME_TextEditor *editor)
if
(
editor
->
props
&
TXTBIT_READONLY
)
{
MessageBeep
(
MB_ICONERROR
);
editor_beep
(
editor
,
MB_ICONERROR
);
return
TRUE
;
}
...
...
@@ -2683,7 +2688,7 @@ static LRESULT handle_wm_char( ME_TextEditor *editor, WCHAR wstr, LPARAM flags )
if
(
editor
->
props
&
TXTBIT_READONLY
)
{
MessageBeep
(
MB_ICONERROR
);
editor_beep
(
editor
,
MB_ICONERROR
);
return
0
;
/* FIXME really 0 ? */
}
...
...
@@ -2737,7 +2742,7 @@ static LRESULT handle_wm_char( ME_TextEditor *editor, WCHAR wstr, LPARAM flags )
if
(
para_in_table
(
para
)
&&
cursor
.
run
->
nFlags
&
MERF_ENDPARA
&&
from
==
to
)
{
/* Text should not be inserted at the end of the table. */
MessageBeep
(
-
1
);
editor_beep
(
editor
,
-
1
);
return
0
;
}
}
...
...
@@ -2951,7 +2956,8 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10)
ed
->
total_rows
=
0
;
ITextHost_TxGetPropertyBits
(
ed
->
texthost
,
TXTBIT_RICHTEXT
|
TXTBIT_MULTILINE
|
TXTBIT_READONLY
|
TXTBIT_USEPASSWORD
|
TXTBIT_HIDESELECTION
|
TXTBIT_SAVESELECTION
|
TXTBIT_AUTOWORDSEL
|
TXTBIT_VERTICAL
|
TXTBIT_WORDWRAP
|
TXTBIT_DISABLEDRAG
,
TXTBIT_AUTOWORDSEL
|
TXTBIT_VERTICAL
|
TXTBIT_WORDWRAP
|
TXTBIT_ALLOWBEEP
|
TXTBIT_DISABLEDRAG
,
&
ed
->
props
);
ITextHost_TxGetScrollBars
(
ed
->
texthost
,
&
ed
->
scrollbars
);
ed
->
pBuffer
=
ME_MakeText
();
...
...
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