forked from KolibriOS/kolibrios
Eolite: fix default icon
WebWiew: handle URLs starting with double slash "//" C-- lib: make some functions include optional git-svn-id: svn://kolibrios.org@7163 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
d82cdb9873
commit
e4b1848a9e
@ -3,6 +3,7 @@ int UrlIsAbsolute(dword in)
|
||||
{
|
||||
if(!strncmp(in,"http:",5)) return true;
|
||||
if(!strncmp(in,"https:",6)) return true;
|
||||
if(!strncmp(in,"file:",5)) return true;
|
||||
if(!strncmp(in,"mailto:",7)) return true;
|
||||
if(!strncmp(in,"ftp:",4)) return true;
|
||||
if(!strncmp(in,"WebView:",8)) return true;
|
||||
@ -30,6 +31,15 @@ void GetAbsoluteURL(dword in_URL)
|
||||
}
|
||||
|
||||
if (UrlIsAbsolute(in_URL)) return;
|
||||
|
||||
IF (!strcmpn(in_URL,"//", 2))
|
||||
{
|
||||
//strcpy(#newurl, "http:");
|
||||
//strcat(#newurl, in_URL);
|
||||
sprintf(#newurl, "http:%s", in_URL);
|
||||
strcpy(orig_URL, #newurl);
|
||||
return;
|
||||
}
|
||||
|
||||
IF (!strcmpn(in_URL,"./", 2)) in_URL+=2;
|
||||
if (!http_transfer)
|
||||
|
@ -5,7 +5,7 @@ void DrawIconByExtension(dword file_path, extension, xx, yy, fairing_color)
|
||||
char BYTE_HEAD_FILE[4];
|
||||
char ext[512];
|
||||
int i;
|
||||
dword icon_n=0;
|
||||
dword icon_n=2; // set default icon
|
||||
|
||||
if (extension)
|
||||
{
|
||||
|
@ -476,11 +476,14 @@ inline fastcall dword SetWindowLayerBehaviour(EDX, ESI)
|
||||
$int 0x40
|
||||
}
|
||||
|
||||
void PutPaletteImage(dword EBX,w,h,x,y,ESI,EDI)
|
||||
:void PutPaletteImage(dword inbuf,w,h,x,y,bits,pal)
|
||||
{
|
||||
EAX = 65;
|
||||
EBX = inbuf;
|
||||
ECX = w<<16+h;
|
||||
EDX = x<<16+y;
|
||||
ESI = bits;
|
||||
EDI = pal;
|
||||
EBP = 0;
|
||||
$int 0x40
|
||||
}
|
||||
|
@ -901,7 +901,7 @@ inline signed strcoll(dword text1,text2)
|
||||
return 0;
|
||||
}
|
||||
|
||||
replace_char(dword in_str, char from_char, to_char, int length) {
|
||||
:replace_char(dword in_str, char from_char, to_char, int length) {
|
||||
int i;
|
||||
for (i=0; i<length; i++) {
|
||||
if (ESBYTE[in_str+i] == from_char) ESBYTE[in_str+i] = to_char;
|
||||
|
@ -13,7 +13,7 @@
|
||||
proc_info Form;
|
||||
dword pick_active = true;
|
||||
dword picked_color = 0;
|
||||
char picked_color_string[11]="0x00111222\0";
|
||||
char picked_color_string[11];
|
||||
#define FORM_W 167
|
||||
#define FORM_H 60
|
||||
#define COLOR_BLOCK_SIZE 42
|
||||
@ -89,7 +89,6 @@ void draw_window()
|
||||
EventUpdateWindowContent();
|
||||
}
|
||||
|
||||
|
||||
void EventUpdateWindowContent()
|
||||
{
|
||||
sprintf(#picked_color_string, "%A", picked_color);
|
||||
|
Loading…
Reference in New Issue
Block a user