Rev 8292 | Rev 8305 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8292 | Rev 8302 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | #include "..\lib\patterns\toolbar_button.h" |
30 | #include "..\lib\patterns\toolbar_button.h" |
31 | #include "..\lib\patterns\restart_process.h" |
31 | #include "..\lib\patterns\restart_process.h" |
Line 32... | Line 32... | ||
32 | 32 | ||
Line 33... | Line 33... | ||
33 | char editbox_icons[] = FROM "res/editbox_icons.raw"; |
33 | char editbox_icons[] = FROM "res/editbox_icons.raw"; |
Line 34... | Line 34... | ||
34 | 34 | ||
35 | char version[]="WebView 2.7"; |
35 | char version[]="WebView 2.7a"; |
36 | 36 | ||
Line 236... | Line 236... | ||
236 | 236 | ||
237 | case evNetwork: |
237 | case evNetwork: |
238 | if (http.transfer <= 0) break; |
238 | if (http.transfer <= 0) break; |
239 | http.receive(); |
239 | http.receive(); |
- | 240 | EventUpdateProgressBar(); |
|
240 | EventUpdateProgressBar(); |
241 | if (http.check_content_type()) // application || image |
241 | if (http.check_content_type()) && (!strncmp(#http.content_type,"application",11)) { |
242 | if (http.content_type[0] == 'a') || (http.content_type[0] == 'i') { |
242 | EventOpenDownloader(history.current()); |
243 | EventOpenDownloader(history.current()); |
243 | StopLoading(); |
244 | StopLoading(); |
244 | history.back(); |
245 | history.back(); |
245 | EventRefreshPage(); |
246 | EventRefreshPage(); |
Line 703... | Line 704... | ||
703 | } else { |
704 | } else { |
704 | RunProgram("/sys/@open", #new_url); |
705 | RunProgram("/sys/@open", #new_url); |
705 | } |
706 | } |
706 | return; |
707 | return; |
707 | } |
708 | } |
708 | } else { |
- | |
709 | if (UrlExtIs(#new_url,".png")==true) || (UrlExtIs(#new_url,".jpg")==true) |
- | |
710 | || (UrlExtIs(#new_url,".zip")==true) || (UrlExtIs(#new_url,".kex")==true) || (UrlExtIs(#new_url,".pdf")==true) |
- | |
711 | || (UrlExtIs(#new_url,".7z")==true) { |
- | |
712 | EventOpenDownloader(#new_url); |
- | |
713 | return; |
- | |
714 | } |
- | |
715 | } |
709 | } |
716 | OpenPage(#new_url); |
710 | OpenPage(#new_url); |
717 | } |
711 | } |
Line 718... | Line 712... | ||
718 | 712 | ||
Line 739... | Line 733... | ||
739 | if(!strrchr(#editURL, '#')) { |
733 | if(!strrchr(#editURL, '#')) { |
740 | strcat(#editURL, #anchors.current); |
734 | strcat(#editURL, #anchors.current); |
741 | DrawOmnibox(); |
735 | DrawOmnibox(); |
742 | } |
736 | } |
743 | WB1.ParseHtml(_bufdata, _in_bufsize); |
737 | WB1.ParseHtml(_bufdata, _in_bufsize); |
- | 738 | // REJECTED. Reason: infinite redirect at Google Results. |
|
- | 739 | /* |
|
- | 740 | if (WB1.redirect) { // |
|
- | 741 | get_absolute_url(#WB1.redirect, history.current()); |
|
- | 742 | history.back(); |
|
- | 743 | OpenPage(#WB1.redirect); |
|
- | 744 | } |
|
- | 745 | */ |
|
744 | DrawStatusBar(); |
746 | DrawStatusBar(); |
745 | DrawActiveTab(); |
747 | DrawActiveTab(); |
746 | if (source_mode) { |
748 | if (source_mode) { |
747 | source_mode = false; |
749 | source_mode = false; |
748 | WB1.custom_encoding = CH_CP866; |
750 | WB1.custom_encoding = CH_CP866; |