WebView 1.6: open link in a new window by pressing Middle mouse button on the link

Eolite: fix misspell (found by Ray)

git-svn-id: svn://kolibrios.org@6931 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2017-07-05 10:33:54 +00:00
parent 00b4e63b4e
commit 1d5edfacb9
5 changed files with 23 additions and 15 deletions

View File

@ -74,9 +74,8 @@ bool LinksArray::HoverAndProceed(dword mx, my)
return false;
}
if (mouse.mkm) && (mouse.up) {
// strcpy(#URL_temp, links[active].link);
// GetAbsoluteUrl(#URL_temp);
// RunProgram(#program_path, #URL_temp);
open_in_a_new_window = true;
ClickLink();
return false;
}
if (mouse.lkm) && (mouse.up) {

View File

@ -30,7 +30,7 @@
char homepage[] = FROM "html\\homepage.htm""\0";
#ifdef LANG_RUS
char version[]="’¥ªáâ®¢ë© ¡à ã§¥à 1.58";
char version[]="’¥ªáâ®¢ë© ¡à ã§¥à 1.6";
?define IMAGES_CACHE_CLEARED "Šíè ª à⨭®ª ®ç¨é¥­"
?define T_LAST_SLIDE "<EFBFBD>â® ¯®á«¥¤­¨© á« ©¤"
char loading[] = "‡ £à㧪  áâà ­¨æë...<br>";
@ -43,7 +43,7 @@ char rmb_menu[] =
Žç¨áâ¨âì ªíè ª à⨭®ª
Œ¥­¥¤¦¥à § £à㧮ª";
#else
char version[]="Text-based Browser 1.58";
char version[]="Text-based Browser 1.6";
?define IMAGES_CACHE_CLEARED "Images cache cleared"
?define T_LAST_SLIDE "This slide is the last"
char loading[] = "Loading...<br>";
@ -84,7 +84,8 @@ dword panel_color;
dword border_color;
progress_bar wv_progress_bar;
byte souce_mode = false;
bool souce_mode = false;
bool open_in_a_new_window = false;
enum {
BACK_BUTTON=1000,
@ -503,6 +504,7 @@ void DrawProgress()
DrawBar(address_box.left-2, address_box.top+20, btn, 2, wv_progress_bar.progress_color);
}
char anchor[256];
void ClickLink()
{
@ -571,8 +573,18 @@ void ClickLink()
return;
}
}
if (open_in_a_new_window)
{
RunProgram(#program_path, #URL);
strcpy(#editURL, history.current());
strcpy(#URL, history.current());
}
else
{
OpenPage();
}
open_in_a_new_window = false;
}
void EventShowPageMenu(dword _left, _top)
{

View File

@ -22,7 +22,7 @@ char downloader_edit[10000];
char filepath[4096];
int mouse_twbi;
edit_box ed = {250,20,20,0xffffff,0x94AECE,0xffffff,0xffffff,0x10000000,sizeof(downloader_edit),#downloader_edit,#mouse_twbi,2,19,19};
progress_bar pb = {0, 170, 51, 225, 12, 0, 0, 100, 0xFFFfff, 0x74DA00, 0x9F9F9F};
progress_bar pb = {0, 200, 55, 225, 12, 0, 0, 100, 0xFFFfff, 0x74DA00, 0x9F9F9F};
byte downloader_opened;
char downloader_stak[4096];
@ -146,10 +146,7 @@ void DL_Draw_Window()
ed.left = strlen("URL:")*8 + 10 + cleft;
ed.width = DL_Form.cwidth - ed.left - cleft - 3;
ed.offset=0;
//edit_box_draw stdcall(#ed);
DrawEditBox(#ed);
//DrawRectangle(ed.left-1, ed.top-1, ed.width+2, 16, ed.blur_border_color);
//DrawRectangle(ed.left-2, ed.top-2, ed.width+4, 18, border_color);
}
void StartDownloading()

View File

@ -16,7 +16,7 @@
?define FS_ITEM_ALREADY_EXISTS "'<27>«¥¬¥­â á â ª¨¬ ¨¬¥­¥¬ 㦥 áãé¥áâ¢ã¥â' -E"
?define NOT_CREATE_FOLDER "'<27>¥ 㤠«®áì ᮧ¤ âì ¯ ¯ªã.' -E"
?define NOT_CREATE_FILE "'<27>¥ 㤠«®áì ᮧ¤ âì ä ©«.' -E"
?define T_NOTIFY_APP_PARAM_WRONG "'<27> à ¬¥âà ¤«ï § ¯ã᪠ Eolite ­¥ ¢¥à¥­: ¯ ¯ª  ­¥ á㦥áâ¢ã¥â!' -E"
?define T_NOTIFY_APP_PARAM_WRONG "'<27> à ¬¥âà ¤«ï § ¯ã᪠ Eolite ­¥ ¢¥à¥­: ¯ ¯ª  ­¥ áãé¥áâ¢ã¥â!' -E"
?define T_COPY_WINDOW_TITLE "Š®¯¨àãî..."
?define T_COPY_WINDOW_TEXT "Š®¯¨àã¥âáï ä ©«:"
?define T_MOVE_WINDOW_TITLE "<EFBFBD>¥à¥¬¥é î..."
@ -46,7 +46,7 @@
?define WAIT_DELETING_FOLDER "Deleting folder. Please, wait..."
?define NOT_CREATE_FOLDER "'Folder can not be created.' -E"
?define NOT_CREATE_FILE "'File can not be created.' -E"
?define T_NOTIFY_APP_PARAM_WRONG "'Eolite param is wrong: directory does not exists!' -E"
?define T_NOTIFY_APP_PARAM_WRONG "'Eolite param is wrong: directory does not exist!' -E"
?define T_COPY_WINDOW_TITLE "Copying..."
?define T_COPY_WINDOW_TEXT "Copying file:"
?define T_MOVE_WINDOW_TITLE "Moving..."

View File

@ -149,12 +149,12 @@
#define SIZE 18
dword value_text = itoa(value);
DrawRectangle(x, y, VALUE_FIELD_W, SIZE, system.color.work_graph);
DrawRectangle(x, y, VALUE_FIELD_W+1, SIZE, system.color.work_graph);
DrawRectangle3D(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xDDDddd, 0xffffff);
DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xffffff);
WriteText( -strlen(value_text)+3*8 + x+6, SIZE / 2 + y -6, 0x90, 0x333333, value_text);
DrawCaptButton(VALUE_FIELD_W + x, y, SIZE, SIZE, bt_id_more, system.color.work_button, system.color.work_button_text, "+");
DrawCaptButton(VALUE_FIELD_W + x + 1, y, SIZE, SIZE, bt_id_more, system.color.work_button, system.color.work_button_text, "+");
DrawCaptButton(VALUE_FIELD_W + x + SIZE, y, SIZE, SIZE, bt_id_less, system.color.work_button, system.color.work_button_text, "-");
EDI = system.color.work;
WriteText(x+VALUE_FIELD_W+SIZE+SIZE+10, SIZE / 2 + y -7, 0xD0, system.color.work_text, text);