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
c6369b0b
Commit
c6369b0b
authored
May 14, 2000
by
Gerard Patel
Committed by
Alexandre Julliard
May 14, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When new menu Id is not found or index > nitems, insert the new menu
at end of current menu.
parent
8c735b9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
menu.c
controls/menu.c
+8
-10
No files found.
controls/menu.c
View file @
c6369b0b
...
...
@@ -281,7 +281,7 @@ POPUPMENU *MENU_GetMenu(HMENU hMenu)
menu
=
(
POPUPMENU
*
)
USER_HEAP_LIN_ADDR
(
hMenu
);
if
(
!
IS_A_MENU
(
menu
))
{
ERR
(
"invalid menu handle=%x, ptr=%p, magic=%x
\n
"
,
hMenu
,
menu
,
menu
?
menu
->
wMagic
:
0
);
WARN
(
"invalid menu handle=%x, ptr=%p, magic=%x
\n
"
,
hMenu
,
menu
,
menu
?
menu
->
wMagic
:
0
);
menu
=
NULL
;
}
return
menu
;
...
...
@@ -1887,18 +1887,16 @@ static MENUITEM *MENU_InsertItem( HMENU hMenu, UINT pos, UINT flags )
/* Find where to insert new item */
if
((
pos
==
(
UINT
)
-
1
)
||
((
flags
&
MF_BYPOSITION
)
&&
(
pos
==
menu
->
nItems
)))
{
/* Special case: append to menu */
/* Some programs specify the menu length to do that */
pos
=
menu
->
nItems
;
if
(
flags
&
MF_BYPOSITION
)
{
if
(
pos
>
menu
->
nItems
)
pos
=
menu
->
nItems
;
}
else
{
if
(
!
MENU_FindItem
(
&
hMenu
,
&
pos
,
flags
))
{
FIXME
(
"item %x not found
\n
"
,
pos
);
return
NULL
;
pos
=
menu
->
nItems
;
else
{
if
(
!
(
menu
=
MENU_GetMenu
(
hMenu
)))
return
NULL
;
}
if
(
!
(
menu
=
MENU_GetMenu
(
hMenu
)))
return
NULL
;
}
/* Create new items array */
...
...
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