forked from KolibriOS/kolibrios
fix browser crash and rare bug with redirects
git-svn-id: svn://kolibrios.org@7791 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
75a8dbc548
commit
abbaaa2ff2
@ -36,6 +36,31 @@
|
|||||||
|
|
||||||
bool debug_mode = false;
|
bool debug_mode = false;
|
||||||
|
|
||||||
|
enum {
|
||||||
|
NEW_TAB=600,
|
||||||
|
ENCODINGS=700,
|
||||||
|
BACK_BUTTON=800,
|
||||||
|
FORWARD_BUTTON,
|
||||||
|
REFRESH_BUTTON,
|
||||||
|
GOTOURL_BUTTON,
|
||||||
|
CHANGE_ENCODING,
|
||||||
|
SANDWICH_BUTTON,
|
||||||
|
VIEW_SOURCE,
|
||||||
|
EDIT_SOURCE,
|
||||||
|
OPEN_FILE,
|
||||||
|
NEW_WINDOW,
|
||||||
|
VIEW_HISTORY,
|
||||||
|
DOWNLOAD_MANAGER,
|
||||||
|
CLEAR_CACHE,
|
||||||
|
UPDATE_BROWSER,
|
||||||
|
IN_NEW_TAB,
|
||||||
|
IN_NEW_WINDOW,
|
||||||
|
COPY_LINK_URL,
|
||||||
|
DOWNLOAD_LINK_CONTENTS,
|
||||||
|
TAB_ID,
|
||||||
|
TAB_CLOSE_ID = 900
|
||||||
|
};
|
||||||
|
|
||||||
#include "..\TWB\TWB.c" //HTML Parser, a core component
|
#include "..\TWB\TWB.c" //HTML Parser, a core component
|
||||||
|
|
||||||
TWebBrowser WB1;
|
TWebBrowser WB1;
|
||||||
@ -63,31 +88,6 @@ proc_info Form;
|
|||||||
|
|
||||||
int menu_id=NULL;
|
int menu_id=NULL;
|
||||||
|
|
||||||
enum {
|
|
||||||
NEW_TAB=600,
|
|
||||||
ENCODINGS=700,
|
|
||||||
BACK_BUTTON=800,
|
|
||||||
FORWARD_BUTTON,
|
|
||||||
REFRESH_BUTTON,
|
|
||||||
GOTOURL_BUTTON,
|
|
||||||
CHANGE_ENCODING,
|
|
||||||
SANDWICH_BUTTON,
|
|
||||||
VIEW_SOURCE,
|
|
||||||
EDIT_SOURCE,
|
|
||||||
OPEN_FILE,
|
|
||||||
NEW_WINDOW,
|
|
||||||
VIEW_HISTORY,
|
|
||||||
DOWNLOAD_MANAGER,
|
|
||||||
CLEAR_CACHE,
|
|
||||||
UPDATE_BROWSER,
|
|
||||||
IN_NEW_TAB,
|
|
||||||
IN_NEW_WINDOW,
|
|
||||||
COPY_LINK_URL,
|
|
||||||
DOWNLOAD_LINK_CONTENTS,
|
|
||||||
TAB_ID,
|
|
||||||
TAB_CLOSE_ID = 900
|
|
||||||
};
|
|
||||||
|
|
||||||
#include "tabs.h"
|
#include "tabs.h"
|
||||||
|
|
||||||
char default_dir[] = "/rd/1";
|
char default_dir[] = "/rd/1";
|
||||||
@ -235,6 +235,7 @@ void main()
|
|||||||
} else {
|
} else {
|
||||||
notify("'Too many redirects.' -E");
|
notify("'Too many redirects.' -E");
|
||||||
StopLoading();
|
StopLoading();
|
||||||
|
redirect_count = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Loading the page is complete, free resources
|
// Loading the page is complete, free resources
|
||||||
@ -430,12 +431,12 @@ void ProcessEvent(dword id__)
|
|||||||
return;
|
return;
|
||||||
case IN_NEW_TAB:
|
case IN_NEW_TAB:
|
||||||
open_new_tab = true;
|
open_new_tab = true;
|
||||||
EventOpenNewTab(PageLinks.GetURL(PageLinks.active));
|
EventClickLink(PageLinks.GetURL(PageLinks.active));
|
||||||
open_new_tab = false;
|
open_new_tab = false;
|
||||||
return;
|
return;
|
||||||
case IN_NEW_WINDOW:
|
case IN_NEW_WINDOW:
|
||||||
open_new_tab = true;
|
open_new_tab = true;
|
||||||
RunProgram(#program_path, PageLinks.GetURL(PageLinks.active));
|
EventClickLink(PageLinks.GetURL(PageLinks.active));
|
||||||
open_new_tab = false;
|
open_new_tab = false;
|
||||||
return;
|
return;
|
||||||
case COPY_LINK_URL:
|
case COPY_LINK_URL:
|
||||||
|
@ -35,7 +35,7 @@ bool TAB::close(int _tab_number)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
if (count==1) return false;
|
if (count==1) return false;
|
||||||
for (i=_tab_number; i<=TABS_MAX; i++) {
|
for (i=_tab_number; i<TABS_MAX; i++) {
|
||||||
data[i] = data[i+1];
|
data[i] = data[i+1];
|
||||||
tabstory[i] = tabstory[i+1];
|
tabstory[i] = tabstory[i+1];
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
char version[]="WebView 2.46";
|
char version[]="WebView 2.46b";
|
||||||
|
|
||||||
#ifdef LANG_RUS
|
#ifdef LANG_RUS
|
||||||
char page_not_found[] = FROM "html\\page_not_found_ru.htm""\0";
|
char page_not_found[] = FROM "html\\page_not_found_ru.htm""\0";
|
||||||
|
Loading…
Reference in New Issue
Block a user