diff --git a/programs/cmm/browser/WebView.c b/programs/cmm/browser/WebView.c index ee650ea3c0..8fcc751c84 100644 --- a/programs/cmm/browser/WebView.c +++ b/programs/cmm/browser/WebView.c @@ -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() diff --git a/programs/cmm/browser/texts.h b/programs/cmm/browser/texts.h index 960eb40d8b..375488fc2c 100644 --- a/programs/cmm/browser/texts.h +++ b/programs/cmm/browser/texts.h @@ -16,7 +16,9 @@ char main_menu[] = Очистить кэш Обновить браузер"; char link_menu[] = -"Копировать ссылку +"Открыть в новой вкладке +Открыть в новом окне +Копировать ссылку Скачать содержимое ссылки"; char loading_text[] = "Загрузка..."; @@ -42,7 +44,9 @@ Download Manager|Ctrl+J Clear cache Update browser"; char link_menu[] = -"Copy link +"Open in new tab +Open in new window +Copy link Download link contents"; char loading_text[] = "Loading..."; char update_param[] = "-download_and_exit http://builds.kolibrios.org/eng/data/programs/cmm/browser/WebView.com";