1 /* REXX script for rexxbgui.library: AWeb modes */
3 if ~show('l','rexxbgui.library') then do
4 if ~addlib('rexxbgui.library',0,-30) then do
13 if substr(address(),1,5)~='AWEB.' then do
15 parse var ports dummy 'AWEB.' portnr .
16 address value 'AWEB.' || portnr
21 'JAVASCRIPT SOURCE "window.status=*"Opening window...*""'
23 parse arg '"' pubscrname '"'
24 if pubscrname='' then do
25 'GET SCREEN VAR pubscrname'
29 call bguiopen('AWebModes') /* causes error 12 if it did not work */
30 /* supply a second argument for a '0' return code instead of an ARexx
33 signal on syntax /* important: bguiclose() MUST be called */
43 FixMinSize=bguilayout(LGO_FixMinWidth,1,LGO_FixMinHeight,1)
45 /* using ARexx feature: ,<newline> is translated to nothing */
46 /* the || are essential - any added space will cause trouble */
47 /* redefining the same ID makes previous buttons unaccessible */
48 /* do not redefine winclose etc. */
52 bguicheckbox('gframes','HTML _frames usage',1)FixMinSize||,
53 bguicheckbox('gnframe','_Nominal (fixed) frame size',0)FixMinSize||,
54 bguicheckbox('gjs','_Javascript usage',0)FixMinSize||,
55 bguicheckbox('ganon','_Browse anonymously (no HTTP referrer header)',0)FixMinSize||,
56 bguicheckbox('gmime','_Ignore server MIME type',0)FixMinSize||,
57 '',-2,'F')||bguilayout(LGO_FixMinHeight,1)||,
61 bguimx('ghtml',,bguilist('hmtx','_0 Strict','_1 Tolerant','_2 Compatible'),'R')||FixMinSize||,
63 ,,'F','HTML
\ezm
\e-zode')||,
66 bguimx('gspoof',,bguilist('snames','(AWeb)','MSIE/4.0','Mozilla/3.0','Mozilla/4.0'),'R')||FixMinSize||,
68 ,,'F','
\ezS
\e-zpoof as')||bguilayout(LGO_FixMinHeight,1),
69 )||bguilayout(LGO_FixMinHeight,1)||,
71 bguibutton('ok',esc'bOK_'cr)||,
72 bguibutton('apply','_Apply')||,
73 bguibutton('update','_Get')||,
74 bguibutton('cancel','_Cancel'),
75 )||bguilayout(LGO_FixMinHeight,1),
76 ,grspace.normal,grspace.normal)
80 call bguiset(obj.ghtml,,BT_Key,'m')
81 call bguiset(obj.gspoof,,BT_Key,'s')
82 call bguiaddcondit(obj.gframes,obj.gnframe,GA_Selected,0,GA_Disabled,1,GA_Disabled,0)
85 winobj=bguiwindow('AWeb v'result 'modes',g,'-','-',,pubscrname,'M')
87 if bguiwinopen(winobj)=0 then bguierror(12)
88 'JAVASCRIPT SOURCE "window.status=*"*""'
90 do while bguiwinwaitevent(winobj,'ID')~=id.winclose
92 when id=id.winactive then nop
93 when id=id.wininactive then nop
94 when id=id.update then call getsettings()
95 when id=id.cancel then leave
96 when id=id.ok then do; call setsettings(); leave; end
97 when id=id.apply then call setsettings()
98 when id=id.winclose then nop
105 if rc~=0 then say '+++ ['rc']' errortext(rc) 'at line' sigl
112 say '+++ Break at line' sigl
116 'GetCFG HTMLMODE'; call bguiset(obj.ghtml,winobj,MX_Active,result)
117 'GetCFG FRAMES'; call bguiset(obj.gframes,winobj,GA_Selected,result)
118 'GetCFG NOMINALFRAME'; call bguiset(obj.gnframe,winobj,GA_Selected,result)
119 'GetCFG JAVASCRIPT'; call bguiset(obj.gjs,winobj,GA_Selected,result)
120 'GetCFG ANONYMOUS'; call bguiset(obj.ganon,winobj,GA_Selected,result)
121 'GetCFG IGNOREMIME'; call bguiset(obj.gmime,winobj,GA_Selected,result)
125 when result='MSIE/4.0' then n=1
126 when result='Mozilla/3.0' then n=2
127 when result='Mozilla/4.0' then n=3
130 call bguiset(obj.gspoof,winobj,MX_Active,n)
134 call bguiwinbusy(winobj)
136 NEWCFG.i.ITEM=HTMLMODE; NEWCFG.i.VALUE=bguiget(obj.ghtml,MX_Active); i=i+1
137 NEWCFG.i.ITEM=FRAMES; NEWCFG.i.VALUE=bguiget(obj.gframes,GA_Selected); i=i+1
138 NEWCFG.i.ITEM=NOMINALFRAME; NEWCFG.i.VALUE=bguiget(obj.gnframe,GA_Selected); i=i+1
139 NEWCFG.i.ITEM=JAVASCRIPT; NEWCFG.i.VALUE=bguiget(obj.gjs,GA_Selected); i=i+1
140 NEWCFG.i.ITEM=ANONYMOUS; NEWCFG.i.VALUE=bguiget(obj.ganon,GA_Selected); i=i+1
141 NEWCFG.i.ITEM=IGNOREMIME; NEWCFG.i.VALUE=bguiget(obj.gmime,GA_Selected); i=i+1
143 NEWCFG.i.ITEM=SPOOFAS
144 n=bguiget(obj.gspoof,MX_Active)
145 if n=0 then NEWCFG.i.VALUE=''; else NEWCFG.i.VALUE=snames.n
150 'GetCFG HTMLMODE' /* wait */
151 call bguiwinready(winobj)