Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2604 → Rev 2605

/programs/network/htmlv/browser/History.txt
1,10 → 1,11
õõ.õõ.12 -- v0.80
13.04.12 -- v0.80
- ïîääåðæêà <body> "bgcolor=" è "text=";
- îáðàáîòêà ïåðåõîäà ââåðõ "../";
- jpg, gif, png îòêðûâàþòñÿ ÷åðåç kiv.
- òåïåðü èçîáðàæåíèÿ ëåãêî ìîãóò áûòü ññûëêàìè;
- 2 íåáîëüøèõ ôèêñà äëÿ èçîáðàæåíèé, êíîïêè BackSpace;
- ÷óòîê óëó÷øåíà îáðàáîòêà óðëîâ, ñîäåðæàùèõ #.
- ÷óòîê óëó÷øåíà îáðàáîòêà óðëîâ, ñîäåðæàùèõ #;
- çàðàáîòàëà êíîïêà "Âïåð¸ä".
 
 
 
/programs/network/htmlv/browser/TWB.h
15,7 → 15,7
char download_path[]="/rd/1/.download";
//char search_path[]="http://nova.rambler.ru/search?words=";
char search_path[]="http://nigma.ru/index.php?s=";
char version[]=" Text-based Browser 0.78";
char version[]=" Text-based Browser 0.80";
 
 
struct TWebBrowser {
36,7 → 36,7
 
 
dword text_colors[10],
text_color_index = 0,
text_color_index,
link_color,
bg_color=0xFFFFFF;
 
108,9 → 108,19
break;
case BACK:
BrowserHistory.GoBack();
copystr(#URL, #editURL);
za_kadrom = count = 0;
if (!strcmp(get_URL_part(5),"http:"))) HttpLoad();
ShowPage(#URL);
return;
case FORWARD:
RunProgram("@notify", "Forward button is not realized yet");
BrowserHistory.GoForward();
 
copystr(#URL, #editURL);
za_kadrom = count = 0;
if (!strcmp(get_URL_part(5),"http:"))) HttpLoad();
ShowPage(#URL);
return;
case 054: //F5
IF(edit1.flags == 66) break;
309,7 → 319,7
temp = '';
goto NEXT_MARK;
}
CASE '\9':
case '\9':
if (pre_text == 1) //èíà÷å èä¸ì íà 0x0d
{
tab_len=strlen(#line)/8;
712,10 → 722,10
return;
}
 
if (!chTag("meta"))
if (!chTag("meta")) || (!chTag("?xml"))
{
META:
if (!strcmp(#parametr, "charset=")) || (!strcmp(#parametr, "content="))
if (!strcmp(#parametr, "charset=")) || (!strcmp(#parametr, "content=")) || (!strcmp(#parametr, "encoding="))
{
copystr(#options[find_symbol(#options, '=')],#options); //ïîèñê â content=
 
/programs/network/htmlv/browser/compile.bat
2,4 → 2,4
del HTMLv
rename HTMLv.com HTMLv
rem ..\C--\kpack HTMLv
rem pause
pause
/programs/network/htmlv/browser/include/history.h
1,36 → 1,55
struct UrlsHistory {
byte UrlHistory[6000];
dword CurrentUrl();
void AddUrl();
void GoBack();
dword CurrentUrl();
void GoForward();
};
 
UrlsHistory BrowserHistory;
 
void UrlsHistory::GoBack()
struct path_string {
char Item[4096];
};
 
#define MAX_HISTORY_NUM 40
path_string history_list[MAX_HISTORY_NUM];
int history_num;
int history_current;
 
dword UrlsHistory::CurrentUrl()
{
j = find_symbol(#UrlHistory, '|') -1; //òåêóùàÿ ñòðàíèöà
if (j<=0) return;
UrlHistory[j] = 0x00;
j = find_symbol(#UrlHistory, '|'); //ïðåäûäóùàÿ ñòðàíèöà -> îíà íàì è íóæíà
copystr(#UrlHistory + j, #URL);
copystr(#URL, #editURL);
za_kadrom = count = 0;
if (!strcmp(get_URL_part(5),"http:"))) HttpLoad();
WB1.ShowPage(#URL);
return #history_list[history_current].Item;
}
 
void UrlsHistory::AddUrl()
void UrlsHistory::AddUrl() //òóò íóæåí ââîäèìûé ýëåìåíò - äëÿ óíèâåðñàëüíîñòè
{
if (strcmp(BrowserHistory.CurrentUrl(), #URL)==0) return; //åñëè íîâûé àäðåññ = òåêóùåìó
if (history_num>0) && (strcmp(#URL,#history_list[history_current].Item)==0) return;
IF (strlen(#UrlHistory)>6000) copystr(#UrlHistory+5000,#UrlHistory);
copystr("|", #UrlHistory + strlen(#UrlHistory));
copystr(#URL, #UrlHistory + strlen(#UrlHistory));
if (history_current>=MAX_HISTORY_NUM-1)
{
history_current/=2;
for (i=0; i<history_current; i++;)
{
copystr(#history_list[MAX_HISTORY_NUM-i].Item, #history_list[i].Item);
}
}
history_current++;
copystr(#URL,#history_list[history_current].Item);
history_num=history_current;
}
 
dword UrlsHistory::CurrentUrl()
 
void UrlsHistory::GoBack()
{
EAX=#UrlHistory + find_symbol(#UrlHistory, '|');
if (history_current<=2) return;
history_current--;
copystr(#history_list[history_current].Item,#URL);
}
 
 
void UrlsHistory::GoForward()
{
if (history_current==history_num) return;
history_current++;
copystr(#history_list[history_current].Item,#URL);
}