diff options
author | Hans Bolinder <[email protected]> | 2017-06-22 14:26:58 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2017-09-05 11:02:26 +0200 |
commit | d6bcae3e68546428cedf244c202eb2802d4fe5ee (patch) | |
tree | acdb3ee713a97d1f4c75c88262b85a747fb90504 /lib/et/src/et_wx_viewer.erl | |
parent | 7c8b2a0d705ede4bc0ec1bfe8e0afe5a9942809b (diff) | |
download | otp-d6bcae3e68546428cedf244c202eb2802d4fe5ee.tar.gz otp-d6bcae3e68546428cedf244c202eb2802d4fe5ee.tar.bz2 otp-d6bcae3e68546428cedf244c202eb2802d4fe5ee.zip |
et: Improve handling of Unicode
Diffstat (limited to 'lib/et/src/et_wx_viewer.erl')
-rw-r--r-- | lib/et/src/et_wx_viewer.erl | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/et/src/et_wx_viewer.erl b/lib/et/src/et_wx_viewer.erl index 9613299e6b..4dd44e7a4c 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-2016. All Rights Reserved. +%% Copyright Ericsson AB 2000-2017. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -352,7 +352,7 @@ handle_call({open_event, N}, _From, S) when is_integer(N), N > 0-> Reply = do_open_event(S, N), reply(Reply, S); handle_call(Request, From, S) -> - ok = error_logger:format("~p(~p): handle_call(~p, ~p, ~p)~n", + ok = error_logger:format("~p(~p): handle_call(~tp, ~tp, ~tp)~n", [?MODULE, self(), Request, From, S]), Reply = {error, {bad_request, Request}}, reply(Reply, S). @@ -365,7 +365,7 @@ handle_call(Request, From, S) -> %%---------------------------------------------------------------------- handle_cast(Msg, S) -> - ok = error_logger:format("~p(~p): handle_cast(~p, ~p)~n", + ok = error_logger:format("~p(~p): handle_cast(~tp, ~tp)~n", [?MODULE, self(), Msg, S]), noreply(S). @@ -803,7 +803,7 @@ handle_info(timeout, S) -> handle_info({'EXIT', Pid, Reason}, S) -> if Pid =:= S#state.collector_pid -> - io:format("collector died: ~p\n\n", [Reason]), + io:format("collector died: ~tp\n\n", [Reason]), wxFrame:destroy(S#state.frame), {stop, Reason, S}; Pid =:= S#state.parent_pid -> @@ -853,10 +853,10 @@ handle_info(#wx{event = #wxPaint{}}, S) -> S2 = refresh_main_window(S), noreply(S2); handle_info(#wx{event = #wxMouse{type = T, x=X,y=Y}}, S) -> - io:format("~p ~p\n", [T, {X,Y}]), + io:format("~tp ~tp\n", [T, {X,Y}]), noreply(S); handle_info(Info, S) -> - ok = error_logger:format("~p(~p): handle_info(~p, ~p)~n", + ok = error_logger:format("~p(~p): handle_info(~tp, ~tp)~n", [?MODULE, self(), Info, S]), noreply(S). @@ -1162,7 +1162,7 @@ open_viewer(Scale, FilterName, Actors, S) -> %% unlink(ViewerPid), ok; {error, Reason} -> - ok = error_logger:format("~p: Failed to start a new window: ~p~n", + ok = error_logger:format("~p: Failed to start a new window: ~tp~n", [?MODULE, Reason]) end. @@ -1393,7 +1393,7 @@ create_filter_menu(S=#state{filter_menu = {Menu,Data}}, ActiveFilterName, Filter wxMenu:delete(Menu,I) catch _:Reason -> - io:format("Could not delete item: ~p, because ~p.\n", [I, Reason]) + io:format("Could not delete item: ~tp, because ~tp.\n", [I, Reason]) end end, Data), @@ -1872,7 +1872,7 @@ create_contents_window(Event, {S, Res}) -> {ok, Pid} -> {S, [{ok, Pid} | Res]}; {error, Reason} -> - ok = error_logger:format("~p(~p): create_contents_window(~p) ->~n ~p~n", + ok = error_logger:format("~p(~p): create_contents_window(~tp) ->~n ~tp~n", [?MODULE, self(), Options, Reason]), {S, [{error, Reason} | Res]}; Stuff -> @@ -2069,15 +2069,15 @@ create_actor(Name) -> #actor{name = Name, string = String, include = false, exclude = false}. name_to_string(Name) -> - case catch io_lib:format("~s", [Name]) of - {'EXIT', _} -> lists:flatten(io_lib:format("~w", [Name])); + case catch io_lib:format("~ts", [Name]) of + {'EXIT', _} -> lists:flatten(io_lib:format("~tw", [Name])); GoodString -> lists:flatten(GoodString) end. pad_string(Atom, MinLen) when is_atom(Atom) -> pad_string(atom_to_list(Atom), MinLen); pad_string(String, MinLen) when is_integer(MinLen), MinLen >= 0 -> - Len = length(String), + Len = string:length(String), case Len >= MinLen of true -> String; |