aboutsummaryrefslogtreecommitdiffstats
path: root/lib/reltool/src/reltool_app_win.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2012-03-21 19:35:17 +0100
committerSiri Hansen <[email protected]>2012-03-22 08:46:30 +0100
commit602d96340b97315c156b597a5ccbfcc135a9a682 (patch)
tree160273a3c55e7a5445cfc1a7ec2bcd956e888116 /lib/reltool/src/reltool_app_win.erl
parent33e42a694e0ddd8a6c02bfe6c04298ca95aa938a (diff)
downloadotp-602d96340b97315c156b597a5ccbfcc135a9a682.tar.gz
otp-602d96340b97315c156b597a5ccbfcc135a9a682.tar.bz2
otp-602d96340b97315c156b597a5ccbfcc135a9a682.zip
[reltool] Add configuration parameter lib_dir on application level
As a way of specifying one specific version of an application, the following configuration parameter is added on application level: {lib_dir,Dir}, Dir = string() This can be useful if the parent directory of the application directory is not suitable to use as a lib dir on system level.
Diffstat (limited to 'lib/reltool/src/reltool_app_win.erl')
-rw-r--r--lib/reltool/src/reltool_app_win.erl13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/reltool/src/reltool_app_win.erl b/lib/reltool/src/reltool_app_win.erl
index e0acfab7aa..6cd0d2f90b 100644
--- a/lib/reltool/src/reltool_app_win.erl
+++ b/lib/reltool/src/reltool_app_win.erl
@@ -611,7 +611,7 @@ handle_event(#state{sys = Sys, app = App} = S, Wx) ->
redraw_window(S2);
#wx{userData = use_selected_vsn} ->
%% Use selected version
- App2 = App#app{use_selected_vsn = true},
+ App2 = App#app{use_selected_vsn = dir},
{ok, App3} = reltool_sys_win:set_app(S#state.parent_pid, App2),
S2 = S#state{app = App3},
redraw_window(S2);
@@ -619,7 +619,8 @@ handle_event(#state{sys = Sys, app = App} = S, Wx) ->
event = #wxCommand{type = command_radiobox_selected,
cmdString = ActiveDir}} ->
%% Change app source
- S2 = change_version(S, App, ActiveDir),
+ App2 = App#app{use_selected_vsn = dir},
+ S2 = change_version(S, App2, ActiveDir),
redraw_window(S2);
#wx{userData = {mod_button, Action, ListCtrl},
event = #wxCommand{type = command_button_clicked}} ->
@@ -942,11 +943,11 @@ redraw_config(#state{sys = #sys{incl_cond = GlobalIncl,
LatestRadio,
SelectedRadio,
SourceBox,
- fun(true) ->
+ fun(false) ->
+ 0;
+ (_) ->
reltool_utils:elem_to_index(ActiveDir,
- SortedDirs) - 1;
- (false) ->
- 0
+ SortedDirs) - 1
end).
redraw_double_box(Global, Local, GlobalRadio, LocalRadio, LocalBox, GetChoice) ->