30,17 → 30,19 |
#include "img\URLgoto.txt"; |
|
#ifdef LANG_RUS |
char version[]=" ¥ªáâ®¢ë© ¡à 㧥à 0.99.66"; |
char version[]=" ¥ªáâ®¢ë© ¡à 㧥à 0.99.65"; |
?define IMAGES_CACHE_CLEARED "íè ª à⨮ª ®ç¨é¥" |
?define T_LAST_SLIDE "â® ¯®á«¥¤¨© á« ©¤" |
char loading[] = " £à㧪 áâà ¨æë..."; |
unsigned char page_not_found[] = FROM "html\page_not_found_ru.htm"; |
char loading[] = "Loading..."; |
char page_not_found[] = "âà ¨æ ¥ ©¤¥ . ®¬®¦®, URL ᮤ¥à¦¨â ®è¨¡ªã."; |
char page_not_found_no_internet[] = "âà ¨æ ¥ ©¤¥ . ®¬®¦®, URL ᮤ¥à¦¨â ®è¨¡ªã.<br>«¨ ¥â ¤®áâ㯠¢ â¥à¥âë."; |
#else |
char version[]=" Text-based Browser 0.99.66"; |
char version[]=" Text-based Browser 0.99.65"; |
?define IMAGES_CACHE_CLEARED "Images cache cleared" |
?define T_LAST_SLIDE "This slide is the last" |
char loading[] = "Loading..."; |
unsigned char page_not_found[] = FROM "html\page_not_found_en.htm"; |
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."; |
#endif |
|
proc_info Form; |
65,7 → 67,6 |
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 }; |
|
283,11 → 284,6 |
WB1.ParseHTML(bufpointer); |
return; |
|
case 008: //history |
strcpy(#URL, URL_HISTORY); |
OpenPage(); |
return; |
|
case BACK: |
if (!BrowserHistory.GoBack()) return; |
OpenPage(); |
354,7 → 350,7 |
return; |
|
case 178: |
case BTN_UP: |
case BTN_UP: //ìîòàåì ââåðõ |
if (WB1.list.first <= 0) return; |
WB1.list.first--; |
WB1.ParseHTML(bufpointer); |
361,7 → 357,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); |
383,6 → 379,7 |
void ProcessLinks(int id) |
{ |
strcpy(#URL, PageLinks.GetURL(id-401)); |
|
//$1 - Condition Script |
if (URL[0] == '$') |
{ |
463,7 → 460,6 |
address_box.offset=0; |
edit_box_draw stdcall(#address_box); |
|
if (strcmp(#URL, URL_HISTORY)==0) ShowHistory(); else |
if (!bufsize) |
{ |
PageLinks.Clear(); |
474,11 → 470,19 |
} |
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); |
|
486,34 → 490,5 |
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: |