diff options
author | Dan Gudmundsson <[email protected]> | 2009-12-16 13:53:01 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2009-12-18 16:30:07 +0100 |
commit | 438d778eb1ccf432ddc8e275e5ee3e91f590cf8c (patch) | |
tree | 0e6fa3a105e8efdf27bfe7091885b068d7a1fd6d /lib/debugger/src/dbg_wx_win.erl | |
parent | cb62972ca24198cc13e030adbd0b8a757bdb293c (diff) | |
download | otp-438d778eb1ccf432ddc8e275e5ee3e91f590cf8c.tar.gz otp-438d778eb1ccf432ddc8e275e5ee3e91f590cf8c.tar.bz2 otp-438d778eb1ccf432ddc8e275e5ee3e91f590cf8c.zip |
Dbg Fixed mac gui issues
Diffstat (limited to 'lib/debugger/src/dbg_wx_win.erl')
-rw-r--r-- | lib/debugger/src/dbg_wx_win.erl | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/debugger/src/dbg_wx_win.erl b/lib/debugger/src/dbg_wx_win.erl index f029990aa4..a93b562a81 100644 --- a/lib/debugger/src/dbg_wx_win.erl +++ b/lib/debugger/src/dbg_wx_win.erl @@ -75,7 +75,8 @@ create_menus(MB, [{Title,Items}|Ms], Win, Id0) -> Id = create_menu_item(Menu, Items, Win, Id0, true), wxMenuBar:append(MB,Menu,menu_name(Title,ignore)), create_menus(MB,Ms,Win,Id); -create_menus(_MB,[], _Win,Id) -> Id. +create_menus(_MB,[], _Win,Id) -> + Id. create_menu_item(Menu, [separator|Is], Win, Id,Connect) -> wxMenu:appendSeparator(Menu), @@ -102,10 +103,14 @@ create_menu_item(Menu, [{Name, _N, cascade, Items}|Is], Win, Id0,Connect) -> [{id,Id0},{lastId, Id-1},{callback,Filter}]), create_menu_item(Menu, Is, Win, Id, Connect); create_menu_item(Menu, [{Name,Pos}|Is], Win, Id, Connect) -> - Item = wxMenu:append(Menu, Id, menu_name(Name,Pos)), + MenuId = case lists:member(Name, ['Debugger']) of + true -> ?wxID_HELP; + _ -> Id + end, + Item = wxMenu:append(Menu, MenuId, menu_name(Name,Pos)), put(Name,Item), if Connect -> - wxMenu:connect(Win, command_menu_selected, [{id,Id},{userData, Name}]); + wxMenu:connect(Win, command_menu_selected, [{id,MenuId},{userData, Name}]); true -> ignore end, create_menu_item(Menu,Is,Win,Id+1, Connect); @@ -308,6 +313,8 @@ to_string(Format,Args) -> menu_name(Atom, N) when is_atom(Atom) -> menu_name(atom_to_list(Atom),N); +menu_name("Help", _) -> %% Mac needs this to be exactly this + "&Help"; menu_name(Str, Pos) when is_integer(Pos) -> {S1,S2} = lists:split(Pos,Str), S1 ++ [$&|S2]; |