Rev 5718 | Rev 5747 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5718 | Rev 5746 | ||
---|---|---|---|
Line 28... | Line 28... | ||
28 | #include "..\lib\patterns\libimg_load_skin.h" |
28 | #include "..\lib\patterns\libimg_load_skin.h" |
Line 29... | Line 29... | ||
29 | 29 | ||
Line 30... | Line 30... | ||
30 | char homepage[] = FROM "html\\homepage.htm"; |
30 | char homepage[] = FROM "html\\homepage.htm"; |
31 | 31 | ||
32 | #ifdef LANG_RUS |
32 | #ifdef LANG_RUS |
33 | char version[]=" ¥ªáâ®¢ë© ¡à 㧥à 1.21"; |
33 | char version[]=" ¥ªáâ®¢ë© ¡à 㧥à 1.22"; |
34 | ?define IMAGES_CACHE_CLEARED "íè ª à⨮ª ®ç¨é¥" |
34 | ?define IMAGES_CACHE_CLEARED "íè ª à⨮ª ®ç¨é¥" |
35 | ?define T_LAST_SLIDE "â® ¯®á«¥¤¨© á« ©¤" |
35 | ?define T_LAST_SLIDE "â® ¯®á«¥¤¨© á« ©¤" |
36 | char loading[] = " £à㧪 áâà ¨æë... |
36 | char loading[] = " £à㧪 áâà ¨æë... |
37 | char page_not_found[] = FROM "html\page_not_found_ru.htm"; |
37 | char page_not_found[] = FROM "html\page_not_found_ru.htm"; |
38 | char accept_language[]= "Accept-Language: ru\n"; |
38 | char accept_language[]= "Accept-Language: ru\n"; |
39 | #else |
39 | #else |
40 | char version[]=" Text-based Browser 1.21"; |
40 | char version[]=" Text-based Browser 1.22"; |
41 | ?define IMAGES_CACHE_CLEARED "Images cache cleared" |
41 | ?define IMAGES_CACHE_CLEARED "Images cache cleared" |
42 | ?define T_LAST_SLIDE "This slide is the last" |
42 | ?define T_LAST_SLIDE "This slide is the last" |
43 | char loading[] = "Loading... |
43 | char loading[] = "Loading... |
Line 569... | Line 569... | ||
569 | } |
569 | } |
Line 570... | Line 570... | ||
570 | 570 | ||
571 | void SetPageDefaults() |
571 | void SetPageDefaults() |
572 | { |
572 | { |
573 | strcpy(#header, #version); |
- | |
574 | pre_text = 0; |
573 | strcpy(#header, #version); |
575 | WB1.list.count = WB1.list.first = 0; |
574 | WB1.list.count = WB1.list.first = 0; |
576 | stroka = 0; |
575 | stroka = 0; |
577 | cur_encoding = CH_NULL; |
576 | cur_encoding = CH_NULL; |
578 | if (o_bufpointer) o_bufpointer = free(o_bufpointer); |
577 | if (o_bufpointer) o_bufpointer = free(o_bufpointer); |
Line 587... | Line 586... | ||
587 | strcpy(#editURL, #URL); |
586 | strcpy(#editURL, #URL); |
588 | BrowserHistory.AddUrl(); |
587 | BrowserHistory.AddUrl(); |
589 | if (!strncmp(#URL,"WebView:",8)) |
588 | if (!strncmp(#URL,"WebView:",8)) |
590 | { |
589 | { |
591 | SetPageDefaults(); |
590 | SetPageDefaults(); |
592 | if (!strcmp(#URL, URL_SERVICE_HOME)) WB1.Prepare(#homepage, sizeof(homepage)); |
591 | if (!strcmp(#URL, URL_SERVICE_HOME)) LoadInternalPage(#homepage, sizeof(homepage)); |
593 | else if (!strcmp(#URL, URL_SERVICE_HISTORY)) ShowHistory(); |
592 | else if (!strcmp(#URL, URL_SERVICE_HISTORY)) ShowHistory(); |
594 | return; |
593 | return; |
595 | } |
594 | } |
596 | if (!strncmp(#URL,"http:",5)) |
595 | if (!strncmp(#URL,"http:",5)) |
597 | { |
596 | { |
Line 637... | Line 636... | ||
637 | if (!bufsize) |
636 | if (!bufsize) |
638 | { |
637 | { |
639 | PageLinks.Clear(); |
638 | PageLinks.Clear(); |
640 | if (http_transfer) |
639 | if (http_transfer) |
641 | { |
640 | { |
642 | WB1.Prepare(#loading, sizeof(loading)); |
641 | LoadInternalPage(#loading, sizeof(loading)); |
643 | } |
642 | } |
644 | else |
643 | else |
645 | WB1.Prepare(#page_not_found, sizeof(page_not_found)); |
644 | LoadInternalPage(#page_not_found, sizeof(page_not_found)); |
646 | } |
645 | } |
647 | else |
646 | else |
648 | WB1.Parse(); |
647 | WB1.Parse(); |
Line 649... | Line 648... | ||
649 | 648 | ||
Line 655... | Line 654... | ||
655 | { |
654 | { |
656 | if (!strcmpi(#URL + strlen(#URL) - strlen(ext), ext)) return true; |
655 | if (!strcmpi(#URL + strlen(#URL) - strlen(ext), ext)) return true; |
657 | return false; |
656 | return false; |
658 | } |
657 | } |
Line -... | Line 658... | ||
- | 658 | ||
- | 659 | void LoadInternalPage(dword bufpos, in_filesize){ |
|
- | 660 | bufsize = in_filesize; |
|
- | 661 | bufpointer = bufpos; |
|
- | 662 | WB1.Parse(); |
|
- | 663 | } |
|
- | 664 | ||
Line 659... | Line 665... | ||
659 | 665 | ||
660 | 666 | ||
661 | char downloader_stak[4096]; |
667 | char downloader_stak[4096]; |