Rev 6795 | Rev 6808 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6795 | Rev 6803 | ||
---|---|---|---|
Line 122... | Line 122... | ||
122 | load_dll(iconv_lib, #iconv_open,0); |
122 | load_dll(iconv_lib, #iconv_open,0); |
123 | Libimg_LoadImage(#skin, abspath("wv_skin.png")); |
123 | Libimg_LoadImage(#skin, abspath("wv_skin.png")); |
124 | SetSkinColors(); |
124 | SetSkinColors(); |
125 | CreateDir("/tmp0/1/downloads"); |
125 | CreateDir("/tmp0/1/downloads"); |
126 | if (param) strcpy(#URL, #param); else strcpy(#URL, URL_SERVICE_HOME); |
126 | if (param) strcpy(#URL, #param); else strcpy(#URL, URL_SERVICE_HOME); |
127 | WB1.DrawBuf.zoom = 1; |
- | |
128 | WB1.list.SetFont(8, 14, 10011000b); |
127 | WB1.list.SetFont(8, 14, 10011000b); |
129 | WB1.list.no_selection = true; |
128 | WB1.list.no_selection = true; |
130 | SetEventMask(0xa7); |
129 | SetEventMask(0xa7); |
131 | BEGIN_LOOP_APPLICATION: |
130 | BEGIN_LOOP_APPLICATION: |
132 | WaitEventTimeout(2); |
131 | WaitEventTimeout(2); |
Line 266... | Line 265... | ||
266 | void SetElementSizes() |
265 | void SetElementSizes() |
267 | { |
266 | { |
268 | address_box.top = TOOLBAR_H/2-10; |
267 | address_box.top = TOOLBAR_H/2-10; |
269 | basic_line_h = calc(WB1.list.font_h * 130) / 100; |
268 | basic_line_h = calc(WB1.list.font_h * 130) / 100; |
270 | address_box.width = Form.cwidth - address_box.left - 50; |
269 | address_box.width = Form.cwidth - address_box.left - 50; |
271 | WB1.list.SetSizes(0, TOOLBAR_H, Form.width - 10 - scroll_wv.size_x / WB1.DrawBuf.zoom, |
270 | WB1.list.SetSizes(0, TOOLBAR_H, Form.width - 10 - scroll_wv.size_x, |
272 | Form.cheight - TOOLBAR_H - STATUSBAR_H, basic_line_h); |
271 | Form.cheight - TOOLBAR_H - STATUSBAR_H, basic_line_h); |
273 | WB1.list.wheel_size = 7 * basic_line_h; |
272 | WB1.list.wheel_size = 7 * basic_line_h; |
274 | WB1.list.column_max = WB1.list.w - scroll_wv.size_x / WB1.list.font_w; |
273 | WB1.list.column_max = WB1.list.w - scroll_wv.size_x / WB1.list.font_w; |
275 | WB1.list.visible = WB1.list.h; |
274 | WB1.list.visible = WB1.list.h; |
276 | if (WB1.list.w!=WB1.DrawBuf.bufw) { |
275 | if (WB1.list.w!=WB1.DrawBuf.bufw) { |
277 | WB1.DrawBuf.Init(WB1.list.x, WB1.list.y, WB1.list.w, 2048 * WB1.list.item_h); |
276 | WB1.DrawBuf.Init(WB1.list.x, WB1.list.y, WB1.list.w, 32700); |
278 | ProcessEvent(REFRESH_BUTTON); |
277 | ProcessEvent(REFRESH_BUTTON); |
279 | } |
278 | } |
280 | } |
279 | } |
Line 403... | Line 402... | ||
403 | { |
402 | { |
404 | strcpy(#header, #version); |
403 | strcpy(#header, #version); |
405 | WB1.list.count = WB1.list.first = 0; |
404 | WB1.list.count = WB1.list.first = 0; |
406 | cur_encoding = CH_NULL; |
405 | cur_encoding = CH_NULL; |
407 | if (o_bufpointer) o_bufpointer = free(o_bufpointer); |
406 | if (o_bufpointer) o_bufpointer = free(o_bufpointer); |
408 | anchor_y = WB1.list.first; |
- | |
409 | //anchor[0]='|'; |
- | |
410 | anchor=NULL; |
- | |
411 | } |
407 | } |
Line 412... | Line 408... | ||
412 | 408 | ||
413 | void OpenPage() |
409 | void OpenPage() |
414 | { |
410 | { |
Line 506... | Line 502... | ||
506 | if (http_transfer == 0) return; |
502 | if (http_transfer == 0) return; |
507 | if (wv_progress_bar.max) btn = address_box.width*wv_progress_bar.value/wv_progress_bar.max; else btn = 30; |
503 | if (wv_progress_bar.max) btn = address_box.width*wv_progress_bar.value/wv_progress_bar.max; else btn = 30; |
508 | DrawBar(address_box.left-2, address_box.top+20, btn, 2, wv_progress_bar.progress_color); |
504 | DrawBar(address_box.left-2, address_box.top+20, btn, 2, wv_progress_bar.progress_color); |
509 | } |
505 | } |
Line -... | Line 506... | ||
- | 506 | ||
510 | 507 | char anchor[256]; |
|
511 | void ClickLink() |
508 | void ClickLink() |
512 | { |
509 | { |
513 | if (http_transfer > 0) |
510 | if (http_transfer > 0) |
514 | { |
511 | { |
Line 532... | Line 529... | ||
532 | return; |
529 | return; |
533 | } |
530 | } |
534 | //liner.ru#1 |
531 | //liner.ru#1 |
535 | if (strrchr(#URL, '#')!=0) |
532 | if (strrchr(#URL, '#')!=0) |
536 | { |
533 | { |
537 | strcpy(#anchor, #URL+strrchr(#URL, '#')); |
534 | strlcpy(#anchor, #URL+strrchr(#URL, '#'), sizeof(anchor)); |
538 | URL[strrchr(#URL, '#')-1] = 0x00; |
535 | URL[strrchr(#URL, '#')-1] = 0x00; |
539 | } |
536 | } |
Line 540... | Line 537... | ||
540 | 537 | ||
541 | if (!strncmp(#URL,"mailto:", 7)) |
538 | if (!strncmp(#URL,"mailto:", 7)) |