aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2011-04-26 11:01:38 +0200
committerDan Gudmundsson <[email protected]>2011-05-11 16:01:46 +0200
commitd3d2a66af3b7a4a29d3f5ba477a81c7e6f147653 (patch)
tree63b6304bf9df591beee2a456be1efaa3f0c77008
parent116deb98aa1309039d06530de3351feec1163c3f (diff)
downloadotp-d3d2a66af3b7a4a29d3f5ba477a81c7e6f147653.tar.gz
otp-d3d2a66af3b7a4a29d3f5ba477a81c7e6f147653.tar.bz2
otp-d3d2a66af3b7a4a29d3f5ba477a81c7e6f147653.zip
Windows fixes, content_viewer window size was wrong and removed focus stealing
-rw-r--r--lib/et/src/et_wx_contents_viewer.erl4
-rw-r--r--lib/et/src/et_wx_viewer.erl6
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/et/src/et_wx_contents_viewer.erl b/lib/et/src/et_wx_contents_viewer.erl
index aada184a76..86f46f25d0 100644
--- a/lib/et/src/et_wx_contents_viewer.erl
+++ b/lib/et/src/et_wx_contents_viewer.erl
@@ -464,7 +464,8 @@ create_window(S) ->
wxFrame:setMenuBar(Frame,Bar),
create_file_menu(Bar),
Editor = wxTextCtrl:new(Panel, ?wxID_ANY, [{style, 0
- bor ?wxDEFAULT
+ bor ?wxDEFAULT
+ bor ?wxTE_RICH2 %% Needed on Windows
bor ?wxTE_MULTILINE
bor ?wxTE_READONLY
bor ?wxTE_DONTWRAP}]),
@@ -483,6 +484,7 @@ create_window(S) ->
wxFrame:connect(Frame, close_window, [{skip,true}]),
wxFrame:setFocus(Frame),
wxPanel:setSizer(Panel, Sizer),
+ wxSizer:fit(Sizer, Panel),
wxFrame:show(Frame),
S2#state{menu_data = HideData++SearchData++FilterData, editor = Editor, frame = Frame}.
diff --git a/lib/et/src/et_wx_viewer.erl b/lib/et/src/et_wx_viewer.erl
index d42f8c0c86..7d4286ed9d 100644
--- a/lib/et/src/et_wx_viewer.erl
+++ b/lib/et/src/et_wx_viewer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2011. 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
@@ -846,9 +846,6 @@ handle_info(#wx{event = #wxSize{size = {OldW, OldH}}} = Wx, S) ->
refresh_main_window(S4)
end,
noreply(S6);
-handle_info(#wx{event = #wxFocus{}}, S) ->
- wxWindow:setFocus(S#state.canvas), % Get keyboard focus
- noreply(S);
handle_info(#wx{event = #wxMouse{type = enter_window}}, S) ->
wxWindow:setFocus(S#state.canvas), % Get keyboard focus
noreply(S);
@@ -1252,7 +1249,6 @@ create_main_window(S) ->
Self ! Ev
end}]),
wxPanel:connect(Canvas, key_down),
- wxPanel:connect(Canvas, kill_focus),
wxPanel:connect(Canvas, enter_window, [{skip, true}]),
wxFrame:connect(Frame, command_menu_selected),
wxFrame:connect(Frame, close_window),