Subversion Repositories Kolibri OS

Rev

Rev 7800 | Rev 7806 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7800 Rev 7801
Line 511... Line 511...
511
		was_changed = true;
511
		was_changed = true;
512
	}
512
	}
513
	return was_changed;
513
	return was_changed;
514
}
514
}
Line -... Line 515...
-
 
515
 
-
 
516
bool HandleUrlFiles(dword _path, _data)
-
 
517
{
-
 
518
	dword url_from_file;
-
 
519
	if (!UrlExtIs(_path, "url")) return false;
-
 
520
	url_from_file = strstri(_data, "URL=");
-
 
521
	if (url_from_file == -1) return false;
-
 
522
	replace_char(url_from_file, '\n', '\0', strlen(url_from_file));
-
 
523
	OpenPage(url_from_file); 		
-
 
524
}
515
 
525
 
516
bool GetLocalFileData(dword _path)
526
bool GetLocalFileData(dword _path)
517
{
527
{
518
	dword data, size, url_from_file;
528
	dword data, size;
519
	file_size stdcall (_path);
-
 
520
	if (!EBX) {
529
	file_size stdcall (_path);
521
		return false;
530
	if (!EBX) return false;
522
	} else {
531
 
523
		size = EBX;
532
	size = EBX;
524
		data = malloc(size);
533
	data = malloc(size);
525
		ReadFile(0, size, data, _path);
534
	ReadFile(0, size, data, _path);
526
		url_from_file = strstri(data, "URL=");
-
 
527
		if (UrlExtIs(_path, "url")) && (url_from_file != -1) {
-
 
528
			strtrim(url_from_file);
-
 
529
			OpenPage(url_from_file); 				
-
 
530
		} else {
535
	if (!HandleUrlFiles(_path, data)) {
531
			LoadInternalPage(data, size);
536
		LoadInternalPage(data, size);
532
		}
537
	}
533
		free(data);
538
	free(data);
534
		return true;
539
	return true;
535
	}
-
 
Line 536... Line 540...
536
}
540
}
537
 
541
 
538
void OpenPage(dword _open_URL)
542
void OpenPage(dword _open_URL)
539
{
543
{