diff options
author | Siri Hansen <[email protected]> | 2017-09-13 15:26:55 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2017-09-18 11:07:08 +0200 |
commit | 9ee5ad4f99f2540860f5acb357aac6b08d7e494e (patch) | |
tree | edcde8e08a77dd474e8275e96c71a53ee30b4510 /lib/observer/src/cdv_html_wx.erl | |
parent | ae089c72fb06b069675cbebcec10f0820cf16112 (diff) | |
download | otp-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.erl | 9 |
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} -> |