diff options
author | jcid <devnull@localhost> | 2008-09-26 00:53:13 +0200 |
---|---|---|
committer | jcid <devnull@localhost> | 2008-09-26 00:53:13 +0200 |
commit | f0eaf18f7bf51913b8e10c98ee92c69e6fff6a30 (patch) | |
tree | 214b09c3ceebfe19e56093b49ec1953974b695d3 /src/menu.cc | |
parent | 061a12750c5fafcb0c582d182975022c3aa8b7ff (diff) |
- Added the "middle_click_opens_new_tab" option to dillo2rc.
- Added the "focus_new_tab" option to dillo2rc.
- Added "New Tab", "Open Link in new Tab" and "Open Image in new Tab".
- Fixed the resizable when removed by tabs
Diffstat (limited to 'src/menu.cc')
-rw-r--r-- | src/menu.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/menu.cc b/src/menu.cc index c6a4bb90..d8d7480d 100644 --- a/src/menu.cc +++ b/src/menu.cc @@ -106,11 +106,21 @@ static void Menu_open_url_cb(Widget* ) */ static void Menu_open_url_nw_cb(Widget* ) { - MSG("Open URL in new window cb: click! :-)\n"); + _MSG("Open URL in new window cb: click! :-)\n"); a_UIcmd_open_url_nw(popup_bw, popup_url); } /* + * Open URL in new Tab + */ +static void Menu_open_url_nt_cb(Widget* ) +{ + int focus = prefs.focus_new_tab ? 1 : 0; + if (event_state(SHIFT)) focus = !focus; + a_UIcmd_open_url_nt(popup_bw, popup_url, focus); +} + +/* * Add bookmark */ static void Menu_add_bookmark_cb(Widget* ) @@ -303,6 +313,9 @@ void a_Menu_link_popup(BrowserWindow *bw, const DilloUrl *url) pm->begin(); i = new Item("Open Link in New Window"); i->callback(Menu_open_url_nw_cb); + i = new Item("Open Link in New Tab"); + i->callback(Menu_open_url_nt_cb); + new Divider(); i = new Item("Bookmark this Link"); i->callback(Menu_add_bookmark_cb); i = new Item("Copy Link location"); @@ -343,6 +356,9 @@ void a_Menu_image_popup(BrowserWindow *bw, const DilloUrl *url, i->callback(Menu_open_url_cb); i = new Item("Open Image in New Window"); i->callback(Menu_open_url_nw_cb); + i = new Item("Open Image in New Tab"); + i->callback(Menu_open_url_nt_cb); + new Divider(); i = load_menuitem = new Item("Load image"); i->callback(Menu_load_images_cb); i = new Item("Bookmark this Image"); |