aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/cdv_html_wx.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2017-09-13 15:26:55 +0200
committerSiri Hansen <[email protected]>2017-09-18 11:07:08 +0200
commit9ee5ad4f99f2540860f5acb357aac6b08d7e494e (patch)
treeedcde8e08a77dd474e8275e96c71a53ee30b4510 /lib/observer/src/cdv_html_wx.erl
parentae089c72fb06b069675cbebcec10f0820cf16112 (diff)
downloadotp-9ee5ad4f99f2540860f5acb357aac6b08d7e494e.tar.gz
otp-9ee5ad4f99f2540860f5acb357aac6b08d7e494e.tar.bz2
otp-9ee5ad4f99f2540860f5acb357aac6b08d7e494e.zip
cdv: Show progress bar while reading big data
Diffstat (limited to 'lib/observer/src/cdv_html_wx.erl')
-rw-r--r--lib/observer/src/cdv_html_wx.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/observer/src/cdv_html_wx.erl b/lib/observer/src/cdv_html_wx.erl
index 5158e95a65..4b43b6a840 100644
--- a/lib/observer/src/cdv_html_wx.erl
+++ b/lib/observer/src/cdv_html_wx.erl
@@ -52,8 +52,12 @@ init([ParentWin, HtmlText]) ->
init(ParentWin, HtmlText, undefined, cdv).
init(ParentWin, HtmlText, Tab, App) ->
+ %% If progress dialog is shown, remove it now - and sett cursor busy instead
+ observer_lib:destroy_progress_dialog(),
+ wx_misc:beginBusyCursor(),
HtmlWin = observer_lib:html_window(ParentWin),
wxHtmlWindow:setPage(HtmlWin,HtmlText),
+ wx_misc:endBusyCursor(),
{HtmlWin, #state{panel=HtmlWin,expand_table=Tab,app=App}}.
%%%%%%%%%%%%%%%%%%%%%%% Callbacks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -123,11 +127,12 @@ handle_event(Event, State) ->
%%%-----------------------------------------------------------------
%%% Internal
-expand(Id,Callback,#state{expand_wins=Opened0}=State) ->
+expand(Id,Callback,#state{expand_wins=Opened0, app=App}=State) ->
Opened =
case lists:keyfind(Id,1,Opened0) of
false ->
- EW = cdv_detail_wx:start_link(Id,[],State#state.panel,Callback),
+ EW = cdv_detail_wx:start_link(Id,[],State#state.panel,
+ Callback,App),
wx_object:get_pid(EW) ! active,
[{Id,EW}|Opened0];
{_,EW} ->