aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/observer/src/observer_lib.erl34
-rw-r--r--lib/observer/test/crashdump_viewer_SUITE.erl6
2 files changed, 14 insertions, 26 deletions
diff --git a/lib/observer/src/observer_lib.erl b/lib/observer/src/observer_lib.erl
index 6288dd3a45..863ef8c2dc 100644
--- a/lib/observer/src/observer_lib.erl
+++ b/lib/observer/src/observer_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. 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
@@ -730,31 +730,19 @@ progress_loop(Title,PD,Caller) ->
unlink(Caller)
end.
-progress_dialog(Env,Title,Str) ->
- %% Spawning separat process to hold this since we use showModal.
- spawn_link(
- fun() ->
- wx:set_env(Env),
- PD = wxProgressDialog:new(Title,Str,
- [{maximum,101},
- {style,
- ?wxPD_APP_MODAL bor
- ?wxPD_SMOOTH bor
- ?wxPD_AUTO_HIDE}]),
- wxProgressDialog:setMinSize(PD,{200,-1}),
- ?progress_handler ! {progress_dialog,PD},
- wxProgressDialog:showModal(PD),
- wxDialog:destroy(PD)
- end),
- receive
- {progress_dialog,PD} ->
- timer:sleep(300), % To allow the window to show before reporting
- PD
- end.
+progress_dialog(_Env,Title,Str) ->
+ PD = wxProgressDialog:new(Title,Str,
+ [{maximum,101},
+ {style,
+ ?wxPD_APP_MODAL bor
+ ?wxPD_SMOOTH bor
+ ?wxPD_AUTO_HIDE}]),
+ wxProgressDialog:setMinSize(PD,{200,-1}),
+ PD.
update_progress(PD,Value) ->
wxProgressDialog:update(PD,Value).
update_progress_text(PD,Text) ->
wxProgressDialog:update(PD,0,[{newmsg,Text}]).
finish_progress(PD) ->
- wxProgressDialog:endModal(PD, ?wxID_OK).
+ wxProgressDialog:destroy(PD).
diff --git a/lib/observer/test/crashdump_viewer_SUITE.erl b/lib/observer/test/crashdump_viewer_SUITE.erl
index 3c8d1856b1..7a582436b4 100644
--- a/lib/observer/test/crashdump_viewer_SUITE.erl
+++ b/lib/observer/test/crashdump_viewer_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. 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
@@ -132,9 +132,9 @@ start_stop(Config) when is_list(Config) ->
true = is_pid(whereis(cdv_atom_cb)),
true = is_pid(whereis(cdv_dist_cb)),
true = is_pid(whereis(cdv_mod_cb)),
- timer:sleep(1000), % give some time to live
+ timer:sleep(5000), % give some time to live
ok = crashdump_viewer:stop(),
- timer:sleep(100), % give some time to stop
+ timer:sleep(1000), % give some time to stop
undefined = whereis(crashdump_viewer_server),
undefined = whereis(cdv_wx),
ProcsAfter=length(processes()),