Add "Open in new tab" abd "Open in new window" buttons to Eolite

git-svn-id: svn://kolibrios.org@7789 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
simsanutiy
2020-04-14 16:33:17 +00:00
parent 7ff31d4724
commit ec3cf3d14a
2 changed files with 19 additions and 3 deletions

View File

@@ -80,6 +80,8 @@ enum {
DOWNLOAD_MANAGER,
CLEAR_CACHE,
UPDATE_BROWSER,
IN_NEW_TAB,
IN_NEW_WINDOW,
COPY_LINK_URL,
DOWNLOAD_LINK_CONTENTS,
TAB_ID,
@@ -426,6 +428,16 @@ void ProcessEvent(dword id__)
pages_cache.clear();
notify(#clear_cache_ok);
return;
case IN_NEW_TAB:
open_new_tab = true;
EventOpenNewTab(PageLinks.GetURL(PageLinks.active));
open_new_tab = false;
return;
case IN_NEW_WINDOW:
open_new_tab = true;
RunProgram(#program_path, PageLinks.GetURL(PageLinks.active));
open_new_tab = false;
return;
case COPY_LINK_URL:
Clipboard__CopyText(PageLinks.GetURL(PageLinks.active));
notify("'URL copied to clipboard'O");
@@ -722,7 +734,7 @@ void EventShowPageMenu()
void EventShowLinkMenu()
{
open_lmenu(Form.left + mouse.x+4, Form.top + skin_height + mouse.y, MENU_ALIGN_TOP_LEFT, NULL, #link_menu);
menu_id = COPY_LINK_URL;
menu_id = IN_NEW_TAB;
}
void EventShowMainMenu()