~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to lib/debugger/src/dbg_ui_break_win.erl

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%%
2
2
%% %CopyrightBegin%
3
3
%% 
4
 
%% Copyright Ericsson AB 2002-2009. All Rights Reserved.
 
4
%% Copyright Ericsson AB 2002-2011. All Rights Reserved.
5
5
%% 
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
81
81
                          {pack_x, 2}, {pack_y, 3},
82
82
                          {selectmode, multiple}]),
83
83
 
84
 
    %% Add Ok and Cancel buttons
85
 
    {Wbtn, Hbtn} = dbg_ui_win:min_size(["Ok","Cancel"], 70, 30),
 
84
    %% Add OK and Cancel buttons
 
85
    {Wbtn, Hbtn} = dbg_ui_win:min_size(["OK","Cancel"], 70, 30),
86
86
    Bot = gs:frame(Frm, [{pack_x, {1, 3}}, {pack_y, 4}]),
87
 
    Ok = gs:button(Bot, [{x, Pad}, {y, Pad},
 
87
    OK = gs:button(Bot, [{x, Pad}, {y, Pad},
88
88
                         {width, Wbtn}, {height, Hbtn},
89
 
                         {label, {text,"Ok"}}, {font, Font}]),
 
89
                         {label, {text,"OK"}}, {font, Font}]),
90
90
    Cancel = gs:button(Bot, [{x, W-Pad-Wbtn}, {y, Pad},
91
91
                             {width, Wbtn}, {height, Hbtn},
92
92
                             {label, {text,"Cancel"}}, {font, Font}]),
95
95
    gs:config(Win, [{width, Wfrm}, {height, Hfrm}, {map, true}]),
96
96
    #winInfo{type=function, win=Win,
97
97
             packer=Frm, entries=Entries, trigger=enable,
98
 
             ok=Ok, cancel=Cancel, listbox=Lb, funcs=[]};
 
98
             ok=OK, cancel=Cancel, listbox=Lb, funcs=[]};
99
99
create_win(GS, {X, Y}, Type, Mod, Line) ->
100
100
    Pad = 8,
101
101
    W = 230,
161
161
                         {align, w}, {group, Grp},
162
162
                         {data, {trigger, delete}}]),
163
163
 
164
 
    %% Add Ok and Cancel buttons
165
 
    {Wbtn, Hbtn} = dbg_ui_win:min_size(["Ok","Cancel"], 70, 30),
 
164
    %% Add OK and Cancel buttons
 
165
    {Wbtn, Hbtn} = dbg_ui_win:min_size(["OK","Cancel"], 70, 30),
166
166
    Ybtn = Yacc + Pad + Hfrm + Pad,
167
 
    Ok = gs:button(Win, [{x, Pad}, {y, Ybtn},
 
167
    OK = gs:button(Win, [{x, Pad}, {y, Ybtn},
168
168
                         {width, Wbtn}, {height, Hbtn},
169
 
                         {label, {text,"Ok"}}, {font, Font}]),
 
169
                         {label, {text,"OK"}}, {font, Font}]),
170
170
    gs:button(Win, [{x, W-Pad-Wbtn}, {y, Ybtn},
171
171
                    {width, Wbtn}, {height, Hbtn},
172
172
                    {label, {text,"Cancel"}}, {font, Font}]),
175
175
    gs:config(Win, [{width, W}, {height, Hwin}, {map, true}]),
176
176
 
177
177
    #winInfo{type=Type, win=Win,
178
 
             entries=Entries, trigger=enable, ok=Ok}.
 
178
             entries=Entries, trigger=enable, ok=OK}.
179
179
 
180
180
%%--------------------------------------------------------------------
181
181
%% update_functions(WinInfo, Funcs) -> WinInfo
229
229
        Key/='Tab', Key/='Return' ->
230
230
            ignore;
231
231
        true ->
232
 
            handle_event({gs, LB, click, listbox, ["Ok"]}, WinInfo)
 
232
            handle_event({gs, LB, click, listbox, ["OK"]}, WinInfo)
233
233
    end;
234
234
handle_event({gs, Ent, keypress, Data, [Key|_]}, WinInfo) ->
235
235
    case WinInfo#winInfo.type of
249
249
            case next_entry(Ent, WinInfo#winInfo.entries) of
250
250
                last ->
251
251
                    gs:config(WinInfo#winInfo.ok, flash),
252
 
                    handle_event({gs, Ent, click, Data, ["Ok"]}, WinInfo);
 
252
                    handle_event({gs, Ent, click, Data, ["OK"]}, WinInfo);
253
253
                Next ->
254
254
                    gs:config(Next, {setfocus, true}),
255
255
                    ignore
256
256
            end;
257
257
        _Type -> ignore
258
258
    end;
259
 
handle_event({gs, _Id, click, _Data, ["Ok"|_]}, WinInfo) ->
 
259
handle_event({gs, _Id, click, _Data, ["OK"|_]}, WinInfo) ->
260
260
    case check_input(WinInfo#winInfo.entries) of
261
261
        error -> ignore;
262
262
        Data when WinInfo#winInfo.type/=function ->