aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debugger/src/dbg_wx_win.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-01-11 13:27:39 +0000
committerErlang/OTP <[email protected]>2010-01-11 13:27:39 +0000
commit838ec24479fa4249e97e754009eb38e8c05ed447 (patch)
treec06ccec11553a82481c9a35aee919d92af400d43 /lib/debugger/src/dbg_wx_win.erl
parent36c0041ea56d915ba9a2259cc918fca76b8c08f9 (diff)
parent85f849c570bc99fe33d3001d8b4f9705ca3a833a (diff)
downloadotp-838ec24479fa4249e97e754009eb38e8c05ed447.tar.gz
otp-838ec24479fa4249e97e754009eb38e8c05ed447.tar.bz2
otp-838ec24479fa4249e97e754009eb38e8c05ed447.zip
Merge branch 'dgud/dbg_mac_menu' into ccase/r13b04_dev
* dgud/dbg_mac_menu: Dbg: Expand the module listbox when window grows. Dbg: Cut variable bindings after 80 chars. Dbg: Fixed documentation links to the new index.html Dbg Fixed mac gui issues OTP-8346 Miscellaneous corrections of the WX version of the debugger.
Diffstat (limited to 'lib/debugger/src/dbg_wx_win.erl')
-rw-r--r--lib/debugger/src/dbg_wx_win.erl23
1 files changed, 15 insertions, 8 deletions
diff --git a/lib/debugger/src/dbg_wx_win.erl b/lib/debugger/src/dbg_wx_win.erl
index f029990aa4..faf3cc178f 100644
--- a/lib/debugger/src/dbg_wx_win.erl
+++ b/lib/debugger/src/dbg_wx_win.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
@@ -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];