Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5977 → Rev 5978

/programs/cmm/browser/WebView.c
13,6 → 13,7
#include "..\lib\draw_buf.h"
#include "..\lib\list_box.h"
#include "..\lib\cursor.h"
#include "..\lib\collection.h"
//*.obj libraries
#include "..\lib\obj\box_lib.h"
#include "..\lib\obj\libio_lib.h"
21,6 → 22,7
#include "..\lib\obj\iconv.h"
//useful patterns
#include "..\lib\patterns\libimg_load_skin.h"
#include "..\lib\patterns\history.h"
 
char homepage[] = FROM "html\\homepage.htm";
 
214,7 → 216,7
http_free stdcall (http_transfer);
http_transfer=0;
PageLinks.GetAbsoluteURL(#URL);
BrowserHistory.cur_y--;
History.back();
strcpy(#editURL, #URL);
DrawEditBox();
OpenPage();
221,7 → 223,7
}
else
{
BrowserHistory.AddUrl();
History.add(#URL);
ESI = http_transfer;
bufpointer = ESI.http_msg.content_ptr;
bufsize = ESI.http_msg.content_received;
277,12 → 279,16
{
case SCAN_CODE_BS:
case BACK_BUTTON:
if (!BrowserHistory.GoBack()) return;
if (History.back()) {
strcpy(#URL, History.current());
OpenPage();
}
return;
case FORWARD_BUTTON:
if (!BrowserHistory.GoForward()) return;
if (History.forward()) {
strcpy(#URL, History.current());
OpenPage();
}
return;
case GOTOURL_BUTTON:
case SCAN_CODE_ENTER:
387,7 → 393,7
StopLoading();
souce_mode = false;
strcpy(#editURL, #URL);
BrowserHistory.AddUrl();
History.add(#URL);
if (!strncmp(#URL,"WebView:",8))
{
SetPageDefaults();
448,7 → 454,6
{
WB1.Prepare();
}
 
//if (!header) strcpy(#header, #version);
if (!strcmp(#version, #header)) DrawTitle(#header);
}
486,7 → 491,7
if (http_transfer > 0)
{
StopLoading();
BrowserHistory.cur_y--;
History.back();
}
 
strcpy(#URL, PageLinks.GetURL(PageLinks.active));
494,7 → 499,7
if (URL[0] == '#')
{
strcpy(#anchor, #URL+strrchr(#URL, '#'));
strcpy(#URL, BrowserHistory.CurrentUrl());
strcpy(#URL, History.current());
WB1.list.first=WB1.list.count-WB1.list.visible;
ShowPage();
return;
518,15 → 523,15
CreateThread(#Downloader,#downloader_stak+4092);
}
else RunProgram("@open", #URL);
strcpy(#editURL, BrowserHistory.CurrentUrl());
strcpy(#URL, BrowserHistory.CurrentUrl());
strcpy(#editURL, History.current());
strcpy(#URL, History.current());
return;
}
if (!strncmp(#URL,"mailto:", 7))
{
notify(#URL);
strcpy(#editURL, BrowserHistory.CurrentUrl());
strcpy(#URL, BrowserHistory.CurrentUrl());
strcpy(#editURL, History.current());
strcpy(#URL, History.current());
return;
}
OpenPage();
/programs/cmm/browser/history.h
5,17 → 5,15
int t;
free(history_pointer);
history_pointer = malloc(64000);
history_pointer = malloc(History.items.data_size+256);
strcat(history_pointer, "<html><head><title>History</title></head><body><h1>History</h1>");
strcat(history_pointer, "<h2>Visited pages</h2><blockquote><br>");
for (i=1; i<BrowserHistory.links_count; i++)
for (i=1; i<History.items.count; i++)
{
// t = BrowserHistory.GetFirstLine(i);
// strcat(history_pointer, itoa(t));
strcat(history_pointer, " <a href='");
strcat(history_pointer, BrowserHistory.GetUrl(i));
strcat(history_pointer, History.items.get(i));
strcat(history_pointer, "'>");
strcat(history_pointer, BrowserHistory.GetUrl(i));
strcat(history_pointer, History.items.get(i));
strcat(history_pointer, "</a><br>");
}
strcat(history_pointer, "</blockquote><h2>Cached images</h2>");