Rev 4414 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4414 | Rev 4415 | ||
---|---|---|---|
Line 14... | Line 14... | ||
14 | #include "..\lib\figures.h" |
14 | #include "..\lib\figures.h" |
15 | #include "..\lib\encoding.h" |
15 | #include "..\lib\encoding.h" |
16 | #include "..\lib\file_system.h" |
16 | #include "..\lib\file_system.h" |
17 | #include "..\lib\mem.h" |
17 | #include "..\lib\mem.h" |
18 | #include "..\lib\dll.h" |
18 | #include "..\lib\dll.h" |
- | 19 | #include "..\lib\list_box.h" |
|
19 | //*.obj libraries |
20 | //*.obj libraries |
20 | #include "..\lib\lib.obj\box_lib.h" |
21 | #include "..\lib\lib.obj\box_lib.h" |
21 | #include "..\lib\lib.obj\libio_lib.h" |
22 | #include "..\lib\lib.obj\libio_lib.h" |
22 | #include "..\lib\lib.obj\libimg_lib.h" |
23 | #include "..\lib\lib.obj\libimg_lib.h" |
23 | //images |
24 | //images |
24 | #include "img\toolbar_icons.c" |
25 | #include "img\toolbar_icons.c" |
25 | #include "img\URLgoto.txt"; |
26 | #include "img\URLgoto.txt"; |
Line 26... | Line 27... | ||
26 | 27 | ||
27 | #ifdef LANG_RUS |
28 | #ifdef LANG_RUS |
28 | char version[]=" ¥ªáâ®¢ë© ¡à 㧥à 0.99.11"; |
29 | char version[]=" ’ҐЄбв®ўл© Ўа 㧥а 0.99.3"; |
29 | ?define IMAGES_CACHE_CLEARED "íè ª à⨮ª ®ç¨é¥" |
30 | ?define IMAGES_CACHE_CLEARED "Љни Є авЁ®Є ®зЁйҐ" |
30 | #else |
31 | #else |
31 | char version[]=" Text-based Browser 0.99.11"; |
32 | char version[]=" Text-based Browser 0.99.3"; |
32 | ?define IMAGES_CACHE_CLEARED "Images cache cleared" |
33 | ?define IMAGES_CACHE_CLEARED "Images cache cleared" |
Line 33... | Line 34... | ||
33 | #endif |
34 | #endif |
Line 67... | Line 68... | ||
67 | int half_scroll_size; |
68 | int half_scroll_size; |
68 | int scroll_used=0, show_menu; |
69 | int scroll_used=0, show_menu; |
Line 69... | Line 70... | ||
69 | 70 | ||
70 | mem_Init(); |
71 | mem_Init(); |
71 | if (load_dll2(boxlib, #box_lib_init,0)!=0) {notify("System Error: library doesn't exists /rd/1/lib/box_lib.obj"); ExitProcess();} |
72 | if (load_dll2(boxlib, #box_lib_init,0)!=0) {notify("System Error: library doesn't exists /rd/1/lib/box_lib.obj"); ExitProcess();} |
72 | if (load_dll2(libio, #libio_init,1)!=0) debug("Error: library doesn't exists - libio"w); |
73 | if (load_dll2(libio, #libio_init,1)!=0) debug("Error: library doesn't exists - libio"); |
Line 73... | Line 74... | ||
73 | if (load_dll2(libimg, #libimg_init,1)!=0) debug("Error: library doesn't exists - libimg"w); |
74 | if (load_dll2(libimg, #libimg_init,1)!=0) debug("Error: library doesn't exists - libimg"); |
74 | 75 | ||
Line 75... | Line 76... | ||
75 | if (!URL) strcpy(#URL, "/sys/index.htm"); |
76 | if (!URL) strcpy(#URL, "/sys/index.htm"); |
Line 88... | Line 89... | ||
88 | { |
89 | { |
89 | CASE evMouse: |
90 | CASE evMouse: |
90 | /* |
91 | /* |
91 | //not work well, so we are use custom way of processing scroll |
92 | //not work well, so we are use custom way of processing scroll |
92 | scrollbar_v_mouse (#scroll1); |
93 | scrollbar_v_mouse (#scroll1); |
93 | if (lines.first <> scroll1.position) |
94 | if (WB1.list.first <> scroll1.position) |
94 | { |
95 | { |
95 | lines.first = scroll1.position; |
96 | WB1.list.first = scroll1.position; |
96 | WB1.ParseHTML(buf, filesize); |
97 | WB1.ParseHTML(buf, filesize); |
97 | }; |
98 | }; |
98 | */ |
99 | */ |
Line 99... | Line 100... | ||
99 | 100 | ||
Line 116... | Line 117... | ||
116 | CreateThread(#menu_rmb,#stak+4092); |
117 | CreateThread(#menu_rmb,#stak+4092); |
117 | break; |
118 | break; |
118 | } |
119 | } |
119 | } |
120 | } |
Line 120... | Line 121... | ||
120 | 121 | ||
121 | if (m.vert==65535) |
122 | if (m.vert) |
122 | { |
- | |
123 | if (lines.first==0) break; |
123 | { |
124 | if (lines.first>3) lines.first-=2; ELSE lines.first=1; |
- | |
125 | Scan(ID1); |
- | |
126 | break; |
- | |
127 | } |
- | |
128 | if (m.vert==1) |
- | |
129 | { |
- | |
130 | if(lines.visible+lines.first+3>=lines.all) Scan(181); |
- | |
131 | else |
- | |
132 | { |
- | |
133 | lines.first+=2; |
- | |
134 | Scan(ID2); |
- | |
135 | } |
- | |
136 | break; |
124 | if (WB1.list.MouseScroll(m.vert)) WB1.ParseHTML(buf); |
Line 137... | Line 125... | ||
137 | } |
125 | } |
138 | 126 | ||
139 | if (!m.lkm) scroll_used=0; |
127 | if (!m.lkm) scroll_used=0; |
140 | if (m.x>=scroll1.start_x) && (m.x<=scroll1.start_x+scroll1.size_x) |
128 | if (m.x>=scroll1.start_x) && (m.x<=scroll1.start_x+scroll1.size_x) |
141 | && (m.y>=scroll1.start_y+scroll1.btn_height) && (-scroll1.btn_height+scroll1.start_y+scroll1.size_y>m.y) |
129 | && (m.y>=scroll1.start_y+scroll1.btn_height) && (-scroll1.btn_height+scroll1.start_y+scroll1.size_y>m.y) |
142 | && (lines.all>lines.visible) && (m.lkm) |
130 | && (WB1.list.count>WB1.list.visible) && (m.lkm) |
143 | { |
131 | { |
Line 144... | Line 132... | ||
144 | scroll_used=1; |
132 | scroll_used=1; |
145 | } |
133 | } |
146 | 134 | ||
147 | if (scroll_used) |
135 | if (scroll_used) |
148 | { |
136 | { |
149 | half_scroll_size = WB1.list.h - 16 * lines.visible / lines.all - 3 /2; |
137 | half_scroll_size = WB1.list.h - 16 * WB1.list.visible / WB1.list.count - 3 /2; |
150 | if (half_scroll_size+WB1.list.y>m.y) || (m.y<0) || (m.y>4000) m.y=half_scroll_size+WB1.list.y; //åñëè êóðñîð íàä îêíîì |
138 | if (half_scroll_size+WB1.list.y>m.y) || (m.y<0) || (m.y>4000) m.y=half_scroll_size+WB1.list.y; //åñëè êóðñîð íàä îêíîì |
151 | btn=lines.first; //ñîõðàíÿåì ñòàðîå êîëè÷åñòâî |
139 | btn=WB1.list.first; //ñîõðàíÿåì ñòàðîå êîëè÷åñòâî |
152 | lines.first = m.y -half_scroll_size -WB1.list.y * lines.all / WB1.list.h; |
140 | WB1.list.first = m.y -half_scroll_size -WB1.list.y * WB1.list.count / WB1.list.h; |
Line 153... | Line 141... | ||
153 | if (lines.visible+lines.first>lines.all) lines.first=lines.all-lines.visible; |
141 | if (WB1.list.visible+WB1.list.first>WB1.list.count) WB1.list.first=WB1.list.count-WB1.list.visible; |
154 | if (btn<>lines.first) WB1.ParseHTML(buf); //÷òîá ëèøíèé ðàç íå ïåðåðèñîâûâàòü |
142 | if (btn<>WB1.list.first) WB1.ParseHTML(buf); //÷òîá ëèøíèé ðàç íå ïåðåðèñîâûâàòü |
155 | } |
143 | } |
Line 168... | Line 156... | ||
168 | } |
156 | } |
169 | break; |
157 | break; |
170 | case evKey: |
158 | case evKey: |
171 | key = GetKey(); |
159 | key = GetKey(); |
Line 172... | Line 160... | ||
172 | 160 | ||
173 | if (address_box.flags & 0b10) SWITCH(key) //åñëè àêòèâíà ñòðîêà àäðåñà èãíîðèðóåì íåêîòîðûå êíîïêè |
161 | if (address_box.flags & 0b10) SWITCH(key) //åñëè àêòèâíà ñòðîêà àäðåñà èãíîðèðóåì íåêîòîðûå êíîïêè |
Line 174... | Line 162... | ||
174 | { CASE 52: CASE 53: CASE 54: goto _EDIT_MARK; } |
162 | { CASE 52: CASE 53: CASE 54: goto _EDIT_MARK; } |
Line 175... | Line 163... | ||
175 | 163 | ||
176 | Scan(key); |
164 | Scan(key); |
177 | 165 | ||
178 | _EDIT_MARK: |
166 | _EDIT_MARK: |
179 | if (key<>0x0d) && (key<>183) && (key<>184) {EAX=key<<8; edit_box_key stdcall(#address_box);} //àäðåñíàÿ ñòðîêà |
167 | if (key<>0x0d) && (key<>183) && (key<>184) {EAX=key<<8; edit_box_key stdcall(#address_box);} //àäðåñíàÿ ñòðîêà |
180 | break; |
168 | break; |
181 | case evReDraw: |
169 | case evReDraw: |
182 | if (action_buf) { Scan(action_buf); action_buf=0;} |
170 | if (action_buf) { Scan(action_buf); action_buf=0;} |
183 | Draw_Window(); |
171 | Draw_Window(); |
184 | break; |
172 | break; |
185 | default: |
173 | default: |
186 | if (downloader_id<>0) |
174 | if (downloader_id<>0) |
187 | { |
175 | { |
188 | if (GetProcessSlot(downloader_id)<>0) break; |
176 | if (GetProcessSlot(downloader_id)<>0) break; |
189 | downloader_id=0; |
177 | downloader_id=0; |
190 | lines.first = lines.all = 0; |
178 | WB1.list.first = WB1.list.count = 0; |
191 | WB1.ReadHtml(_WIN); |
179 | WB1.ReadHtml(_WIN); |
192 | Draw_Window(); |
180 | Draw_Window(); |
Line 197... | Line 185... | ||
197 | 185 | ||
198 | void SetElementSizes() |
186 | void SetElementSizes() |
199 | { |
187 | { |
200 | address_box.width = Form.width-266; |
188 | address_box.width = Form.width-266; |
201 | WB1.list.SetSizes(0, 44, Form.width - 10 - scroll1.size_x, Form.cheight - 44, 0, 10); |
189 | WB1.list.SetSizes(0, 44, Form.width - 10 - scroll1.size_x, Form.cheight - 44, 0, 10); |
202 | lines.column_max = WB1.list.w - 30 / 6; |
190 | WB1.list.column_max = WB1.list.w - 30 / 6; |
203 | lines.visible = WB1.list.h - 3 / WB1.list.line_h - 2; |
191 | WB1.list.visible = WB1.list.h - 3 / WB1.list.line_h - 2; |
204 | DrawBufInit(); |
192 | DrawBufInit(); |
Line 205... | Line 193... | ||
205 | } |
193 | } |
Line 233... | Line 221... | ||
233 | DrawRectangle(206,15,Form.cwidth-205-50,16,0xE4ECF3); |
221 | DrawRectangle(206,15,Form.cwidth-205-50,16,0xE4ECF3); |
Line 234... | Line 222... | ||
234 | 222 | ||
235 | SetElementSizes(); |
223 | SetElementSizes(); |
Line 236... | Line 224... | ||
236 | WB1.ShowPage(); |
224 | WB1.ShowPage(); |
237 | 225 | ||
238 | DefineButton(scroll1.start_x+1, scroll1.start_y+1, 16, 16, ID1+BT_HIDE, 0xE4DFE1); |
226 | DefineButton(scroll1.start_x+1, scroll1.start_y+1, 16, 16, BTN_UP+BT_HIDE, 0xE4DFE1); |
Line 239... | Line 227... | ||
239 | DefineButton(scroll1.start_x+1, scroll1.start_y+scroll1.size_y-18, 16, 16, ID2+BT_HIDE, 0xE4DFE1); |
227 | DefineButton(scroll1.start_x+1, scroll1.start_y+scroll1.size_y-18, 16, 16, BTN_DOWN+BT_HIDE, 0xE4DFE1); |
240 | } |
228 | } |
241 | - | ||
242 | - | ||
243 | void Scan(int id) |
229 | |
244 | { |
- | |
245 | if (id >= 400) |
- | |
246 | { |
- | |
247 | GetURLfromPageLinks(id); |
- | |
248 | - | ||
249 | //#1 |
- | |
250 | if (URL[0] == '#') |
- | |
251 | { |
- | |
252 | strcpy(#anchor, #URL+strrchr(#URL, '#')); |
- | |
253 | - | ||
254 | strcpy(#URL, BrowserHistory.CurrentUrl()); |
- | |
255 | - | ||
256 | lines.first=lines.all-lines.visible; |
- | |
257 | WB1.ShowPage(); |
- | |
258 | return; |
- | |
259 | } |
- | |
260 | //liner.ru#1 |
- | |
261 | if (strrchr(#URL, '#')<>-1) |
- | |
262 | { |
- | |
263 | strcpy(#anchor, #URL+strrchr(#URL, '#')); |
- | |
264 | URL[strrchr(#URL, '#')-1] = 0x00; //çàãëóøêà |
- | |
265 | } |
- | |
266 | - | ||
267 | WB1.GetNewUrl(); |
- | |
268 | - | ||
269 | if (!strcmp(#URL + strlen(#URL) - 4, ".gif")) || (!strcmp(#URL + strlen(#URL) - 4, ".png")) || (!strcmp(#URL + strlen(#URL) - 4, ".jpg")) |
- | |
270 | { |
- | |
271 | //if (strstr(#URL,"http:")) |
- | |
272 | RunProgram("/sys/media/kiv", #URL); |
- | |
273 | strcpy(#editURL, BrowserHistory.CurrentUrl()); |
- | |
274 | strcpy(#URL, BrowserHistory.CurrentUrl()); |
- | |
275 | return; |
- | |
276 | } |
- | |
277 | if (!strcmpn(#URL,"mailto:", 7)) |
- | |
278 | { |
- | |
279 | RunProgram("@notify", #URL); |
- | |
280 | strcpy(#editURL, BrowserHistory.CurrentUrl()); |
- | |
281 | strcpy(#URL, BrowserHistory.CurrentUrl()); |
- | |
282 | return; |
- | |
283 | } |
- | |
284 | - | ||
285 | WB1.OpenPage(); |
- | |
286 | return; |
- | |
Line 287... | Line 230... | ||
287 | } |
230 | |
288 | 231 | void Scan(int id) |
|
289 | IF(lines.all < lines.visible) SWITCH(id) //åñëè ìàëî ñòðîê èãíîðèðóåì íåêîòîðûå êíîïêè |
232 | { |
290 | { CASE 183: CASE 184: CASE 180: CASE 181: return; } |
233 | if (id >= 400) ProcessLinks(id); |
- | 234 | ||
291 | 235 | switch (id) |
|
- | 236 | { |
|
292 | switch (id) |
237 | case 011: //Ctrk+K |
293 | { |
238 | WB1.ReadHtml(_KOI); |
- | 239 | WB1.ParseHTML(buf); |
|
294 | case 011: //Ctrk+K |
240 | return; |
- | 241 | ||
295 | WB1.ReadHtml(_KOI); |
242 | case 021: //Ctrl+U |
296 | break; |
243 | WB1.ReadHtml(_UTF); |
- | 244 | WB1.ParseHTML(buf); |
|
297 | case 021: //Ctrl+U |
245 | return; |
- | 246 | ||
298 | WB1.ReadHtml(_UTF); |
247 | case 004: //Ctrl+D |
299 | break; |
248 | WB1.ReadHtml(_DOS); |
- | 249 | WB1.ParseHTML(buf); |
|
300 | case 004: //Ctrl+D |
250 | return; |
- | 251 | ||
301 | WB1.ReadHtml(_DOS); |
252 | case 002: //free img cache |
302 | break; |
253 | FreeImgCache(); |
303 | case 002: //free img cache |
254 | WB1.ParseHTML(buf); |
304 | FreeImgCache(); |
255 | return; |
305 | break; |
256 | |
306 | case BACK: |
257 | case BACK: |
307 | if (!BrowserHistory.GoBack()) return; |
258 | if (!BrowserHistory.GoBack()) return; |
308 | WB1.OpenPage(); |
259 | WB1.OpenPage(); |
309 | return; |
260 | return; |
310 | case FORWARD: |
261 | case FORWARD: |
- | 262 | if (!BrowserHistory.GoForward()) return; |
|
311 | if (!BrowserHistory.GoForward()) return; |
263 | WB1.OpenPage(); |
312 | WB1.OpenPage(); |
264 | return; |
313 | return; |
265 | case 052: //F3 |
- | 266 | if (strcmp(get_URL_part(5),"http:")<>0) RunProgram("/rd/1/tinypad", #URL); |
|
- | 267 | else RunProgram("/rd/1/tinypad", #download_path); |
|
314 | case 052: //F3 |
268 | return; |
315 | if (strcmp(get_URL_part(5),"http:")<>0) RunProgram("/rd/1/tinypad", #URL); else RunProgram("/rd/1/tinypad", #download_path); |
269 | case 054: //F5 |
316 | return; |
270 | IF(address_box.flags & 0b10) WB1.ParseHTML(buf); |
317 | case 054: //F5 |
271 | return; |
318 | IF(address_box.flags & 0b10) break; |
272 | |
319 | case REFRESH: |
273 | case REFRESH: |
320 | if (GetProcessSlot(downloader_id)<>0) |
274 | if (GetProcessSlot(downloader_id)<>0) |
321 | { |
275 | { |
322 | KillProcess(downloader_id); |
276 | KillProcess(downloader_id); |
323 | pause(20); |
277 | pause(20); |
324 | Draw_Window(); |
278 | Draw_Window(); |
325 | return; |
279 | return; |
326 | } |
280 | } |
327 | anchor_line_num=lines.first; //âåñ¸ëûé êîñòûëü :Ð |
281 | anchor_line_num=WB1.list.first; |
328 | anchor[0]='|'; |
282 | anchor[0]='|'; |
329 | WB1.OpenPage(); |
283 | WB1.OpenPage(); |
330 | return; |
284 | return; |
331 | case 014: //Ctrl+N íîâîå îêíî |
285 | case 014: |
Line 332... | Line 286... | ||
332 | case 020: //Ctrl+T íîâàÿ âêëàäêà |
286 | case 020: |
333 | case NEWTAB: |
287 | case NEWTAB: |
334 | MoveSize(190,80,OLD,OLD); |
288 | MoveSize(190,80,OLD,OLD); |
335 | RunProgram(#program_path, #URL); |
289 | RunProgram(#program_path, #URL); |
336 | return; |
- | |
337 | - | ||
338 | case HOME: |
290 | return; |
339 | strcpy(#editURL, "http://kolibrios.org/en/index.htm"); |
291 | |
340 | case GOTOURL: |
292 | case HOME: |
341 | case 0x0D: //enter |
293 | strcpy(#editURL, "http://kolibrios.org/en/index.htm"); |
342 | //ïî÷åìó ttp://? Ãîñïîäà, îòëè÷íûé âîïðîñ. Äåëî â òîì, ÷òî ýòî õàê. |
294 | case GOTOURL: |
343 | //strstr() åñëè íå íàøëî âîçâðàùàåò 0 è â ñëó÷àå óñïåõà âîçâðàùàåò 0. Òàê ÷òî ýòî õàê. |
295 | case 0x0D: //enter |
344 | if ((strstr(#editURL,"ttp://")==0) && (editURL[0]!='/')) strcpy(#URL,"http://"); else URL[0] = 0; |
296 | if ((strstr(#editURL,"ttp://")==0) && (editURL[0]!='/')) strcpy(#URL,"http://"); else URL[0] = 0; |
345 | strcat(#URL, #editURL); |
297 | strcat(#URL, #editURL); |
346 | WB1.OpenPage(); |
298 | WB1.OpenPage(); |
Line 347... | Line -... | ||
347 | return; |
- | |
348 | case SEARCHWEB: |
- | |
349 | strcpy(#URL, #search_path); |
- | |
350 | strcat(#URL, #editURL); |
- | |
351 | WB1.OpenPage(); |
- | |
352 | return; |
- | |
353 | - | ||
354 | case ID1: //ìîòàåì ââåðõ |
- | |
355 | IF(lines.first <= 0) return; |
299 | return; |
- | 300 | case SEARCHWEB: |
|
356 | lines.first--; |
301 | strcpy(#URL, #search_path); |
357 | break; |
302 | strcat(#URL, #editURL); |
358 | case ID2: //ìîòàåì âíèç |
303 | WB1.OpenPage(); |
- | 304 | return; |
|
359 | IF(lines.visible + lines.first >= lines.all) return; |
305 | |
- | 306 | case 183: //PgDown |
|
360 | lines.first++; |
307 | if (WB1.list.count < WB1.list.visible) return; |
- | 308 | IF(WB1.list.first == WB1.list.count - WB1.list.visible) return; |
|
361 | break; |
309 | WB1.list.first += WB1.list.visible + 2; |
362 | case 183: //PgDown |
310 | IF(WB1.list.visible + WB1.list.first > WB1.list.count) WB1.list.first = WB1.list.count - WB1.list.visible; |
363 | IF(lines.first == lines.all - lines.visible) return; |
311 | WB1.ParseHTML(buf); |
- | 312 | return; |
|
- | 313 | ||
- | 314 | case 184: //PgUp |
|
- | 315 | if (WB1.list.count < WB1.list.visible) return; |
|
- | 316 | IF(WB1.list.first == 0) return; |
|
- | 317 | WB1.list.first -= WB1.list.visible - 2; |
|
- | 318 | IF(WB1.list.first < 0) WB1.list.first = 0; |
|
- | 319 | WB1.ParseHTML(buf); |
|
- | 320 | return; |
|
- | 321 | ||
- | 322 | case 178: |
|
- | 323 | case BTN_UP: //мотаем вверх |
|
- | 324 | IF(WB1.list.first <= 0) return; |
|
- | 325 | WB1.list.first--; |
|
- | 326 | WB1.ParseHTML(buf); |
|
364 | lines.first += lines.visible + 2; |
327 | return; |
- | 328 | ||
365 | IF(lines.visible + lines.first > lines.all) lines.first = lines.all - lines.visible; |
329 | case 177: |
366 | break; |
330 | case BTN_DOWN: //мотаем вниз |
367 | case 184: //PgUp |
- | |
368 | IF(lines.first == 0) return; |
331 | IF(WB1.list.visible + WB1.list.first >= WB1.list.count) return; |
- | 332 | WB1.list.first++; |
|
369 | lines.first -= lines.visible - 2; |
333 | WB1.ParseHTML(buf); |
370 | IF(lines.first < 0) lines.first = 0; |
334 | return; |
371 | break; |
335 | |
372 | case 180: //home |
- | |
373 | IF(lines.first == 0) return; |
- | |
374 | lines.first = 0; |
336 | case 180: //home |
375 | break; |
337 | if (WB1.list.KeyHome()) WB1.ParseHTML(buf); |
376 | case 181: //end |
- | |
377 | IF (lines.first == lines.all - lines.visible) return; |
338 | return; |
Line -... | Line 339... | ||
- | 339 | ||
- | 340 | case 181: //end |
|
- | 341 | if (WB1.list.count < WB1.list.visible) return; |
|
- | 342 | if (WB1.list.KeyEnd()) WB1.ParseHTML(buf); |
|
- | 343 | return; |
|
- | 344 | } |
|
- | 345 | } |
|
- | 346 | ||
- | 347 | ||
- | 348 | ||
- | 349 | void ProcessLinks(int id) |
|
- | 350 | { |
|
- | 351 | GetURLfromPageLinks(id); |
|
- | 352 | ||
- | 353 | //#1 |
|
- | 354 | if (URL[0] == '#') |
|
- | 355 | { |
|
- | 356 | strcpy(#anchor, #URL+strrchr(#URL, '#')); |
|
- | 357 | ||
- | 358 | strcpy(#URL, BrowserHistory.CurrentUrl()); |
|
- | 359 | ||
- | 360 | WB1.list.first=WB1.list.count-WB1.list.visible; |
|
- | 361 | WB1.ShowPage(); |
|
- | 362 | return; |
|
- | 363 | } |
|
- | 364 | //liner.ru#1 |
|
- | 365 | if (strrchr(#URL, '#')<>-1) |
|
- | 366 | { |
|
- | 367 | strcpy(#anchor, #URL+strrchr(#URL, '#')); |
|
- | 368 | URL[strrchr(#URL, '#')-1] = 0x00; //çàãëóøêà |
|
- | 369 | } |
|
- | 370 | ||
- | 371 | WB1.GetNewUrl(); |
|
- | 372 | ||
- | 373 | if (!strcmp(#URL + strlen(#URL) - 4, ".gif")) || (!strcmp(#URL + strlen(#URL) - 4, ".png")) || (!strcmp(#URL + strlen(#URL) - 4, ".jpg")) |
|
- | 374 | { |
|
- | 375 | //if (strstr(#URL,"http:")) |
|
- | 376 | RunProgram("/sys/media/kiv", #URL); |
|
- | 377 | strcpy(#editURL, BrowserHistory.CurrentUrl()); |
|
- | 378 | strcpy(#URL, BrowserHistory.CurrentUrl()); |
|
- | 379 | return; |
|
- | 380 | } |
|
- | 381 | if (!strcmpn(#URL,"mailto:", 7)) |
|
- | 382 | { |
|
- | 383 | notify(#URL); |
|
- | 384 | strcpy(#editURL, BrowserHistory.CurrentUrl()); |
|
- | 385 | strcpy(#URL, BrowserHistory.CurrentUrl()); |
|
Line 378... | Line 386... | ||
378 | lines.first = lines.all - lines.visible; |
386 | return; |