30,19 → 30,17 |
#include "img\URLgoto.txt"; |
|
#ifdef LANG_RUS |
char version[]=" ¥ªáâ®¢ë© ¡à 㧥à 0.99.65"; |
char version[]=" ¥ªáâ®¢ë© ¡à 㧥à 0.99.66"; |
?define IMAGES_CACHE_CLEARED "íè ª à⨮ª ®ç¨é¥" |
?define T_LAST_SLIDE "â® ¯®á«¥¤¨© á« ©¤" |
char loading[] = "Loading..."; |
char page_not_found[] = "âà ¨æ ¥ ©¤¥ . ®¬®¦®, URL ᮤ¥à¦¨â ®è¨¡ªã."; |
char page_not_found_no_internet[] = "âà ¨æ ¥ ©¤¥ . ®¬®¦®, URL ᮤ¥à¦¨â ®è¨¡ªã.<br>«¨ ¥â ¤®áâ㯠¢ â¥à¥âë."; |
char loading[] = " £à㧪 áâà ¨æë..."; |
unsigned char page_not_found[] = FROM "html\page_not_found_ru.htm"; |
#else |
char version[]=" Text-based Browser 0.99.65"; |
char version[]=" Text-based Browser 0.99.66"; |
?define IMAGES_CACHE_CLEARED "Images cache cleared" |
?define T_LAST_SLIDE "This slide is the last" |
char loading[] = "Loading..."; |
char page_not_found[] = "Page not found. Maybe, URL contains some errors."; |
char page_not_found_no_internet[] = "Page not found. Maybe, URL contains some errors.<br>Or Internet unavailable for your configuration."; |
unsigned char page_not_found[] = FROM "html\page_not_found_en.htm"; |
#endif |
|
proc_info Form; |
67,6 → 65,7 |
int mouse_twb; |
edit_box address_box= {250,207,16,0xffffff,0x94AECE,0xffffff,0xffffff,0,sizeof(URL),#editURL,#mouse_twb,2,19,19}; |
|
#define URL_HISTORY "WebView://history" |
|
enum { BACK=300, FORWARD, REFRESH, HOME, NEWTAB, GOTOURL, SEARCHWEB, INPUT_CH, INPUT_BT, BTN_UP, BTN_DOWN }; |
|
284,6 → 283,11 |
WB1.ParseHTML(bufpointer); |
return; |
|
case 008: //history |
strcpy(#URL, URL_HISTORY); |
OpenPage(); |
return; |
|
case BACK: |
if (!BrowserHistory.GoBack()) return; |
OpenPage(); |
350,7 → 354,7 |
return; |
|
case 178: |
case BTN_UP: //ìîòàåì ââåðõ |
case BTN_UP: |
if (WB1.list.first <= 0) return; |
WB1.list.first--; |
WB1.ParseHTML(bufpointer); |
357,7 → 361,7 |
return; |
|
case 177: |
case BTN_DOWN: //ìîòàåì âíèç |
case BTN_DOWN: |
if (WB1.list.visible + WB1.list.first >= WB1.list.count) return; |
WB1.list.first++; |
WB1.ParseHTML(bufpointer); |
379,7 → 383,6 |
void ProcessLinks(int id) |
{ |
strcpy(#URL, PageLinks.GetURL(id-401)); |
|
//$1 - Condition Script |
if (URL[0] == '$') |
{ |
460,6 → 463,7 |
address_box.offset=0; |
edit_box_draw stdcall(#address_box); |
|
if (strcmp(#URL, URL_HISTORY)==0) ShowHistory(); else |
if (!bufsize) |
{ |
PageLinks.Clear(); |
470,19 → 474,11 |
} |
else |
{ |
if (strncmp(#URL,"http:",5)==0) |
{ |
bufsize = sizeof(page_not_found_no_internet); |
WB1.ParseHTML(#page_not_found_no_internet); |
} |
else |
{ |
bufsize = sizeof(page_not_found); |
WB1.ParseHTML(#page_not_found); |
} |
bufsize = 0; |
} |
//return; |
} |
else |
WB1.ParseHTML(bufpointer); |
|
490,5 → 486,34 |
if (!strcmp(#version, #header)) DrawTitle(#header); |
} |
|
ShowHistory() |
{ |
int i; |
static int history_pointer; |
|
free(history_pointer); |
history_pointer = malloc(64000); |
strcat(history_pointer, "<h1>History</h1>"); |
strcat(history_pointer, "<h2>Visited pages</h2><blockquote><br>"); |
for (i=1; i<BrowserHistory.links_count; i++) |
{ |
strcat(history_pointer, "<a href='"); |
strcat(history_pointer, BrowserHistory.GetUrl(i)); |
strcat(history_pointer, "'>"); |
strcat(history_pointer, BrowserHistory.GetUrl(i)); |
strcat(history_pointer, "</a><br>"); |
} |
strcat(history_pointer, "</blockquote><h2>Cached images</h2><br>"); |
for (i=1; i<ImgCache.pics_count; i++) |
{ |
strcat(history_pointer, "<img src='"); |
strcat(history_pointer, #pics[i].path); |
strcat(history_pointer, "' /><br>"); |
} |
bufsize = strlen(history_pointer); |
bufpointer = history_pointer; |
WB1.ParseHTML(history_pointer); |
} |
|
|
stop: |