From 0bdff384163e6c9fc5998f305cdfb78a8189043e Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 29 Nov 2008 00:24:09 +0000 Subject: Move tab opening logic to same place as new window opening. Make option for "Tabbed browsing", which is enabled by default. Someone who knows how to work glade could add the "Tabbed browsing" option to the choices dialogue. When a link is opened in a new tab, don't change tab. svn path=/trunk/netsurf/; revision=5816 --- desktop/options.c | 122 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 67 insertions(+), 55 deletions(-) (limited to 'desktop/options.c') diff --git a/desktop/options.c b/desktop/options.c index d8812dfb9..6cf6dcf04 100644 --- a/desktop/options.c +++ b/desktop/options.c @@ -186,6 +186,9 @@ bool option_suppress_curl_debug = true; /** Whether to allow target="_blank" */ bool option_target_blank = true; +/** Whether second mouse button opens in new tab */ +bool option_button_2_tab = true; + EXTRA_OPTION_DEFINE @@ -194,64 +197,73 @@ struct { enum { OPTION_BOOL, OPTION_INTEGER, OPTION_STRING } type; void *p; } option_table[] = { - { "http_proxy", OPTION_BOOL, &option_http_proxy }, - { "http_proxy_host", OPTION_STRING, &option_http_proxy_host }, - { "http_proxy_port", OPTION_INTEGER, &option_http_proxy_port }, - { "http_proxy_auth", OPTION_INTEGER, &option_http_proxy_auth }, - { "http_proxy_auth_user", OPTION_STRING, &option_http_proxy_auth_user }, - { "http_proxy_auth_pass", OPTION_STRING, &option_http_proxy_auth_pass }, - { "font_size", OPTION_INTEGER, &option_font_size }, - { "font_min_size", OPTION_INTEGER, &option_font_min_size }, - { "font_sans", OPTION_STRING, &option_font_sans }, - { "font_serif", OPTION_STRING, &option_font_serif }, - { "font_mono", OPTION_STRING, &option_font_mono }, - { "font_cursive", OPTION_STRING, &option_font_cursive }, - { "font_fantasy", OPTION_STRING, &option_font_fantasy }, - { "accept_language", OPTION_STRING, &option_accept_language }, - { "accept_charset", OPTION_STRING, &option_accept_charset }, - { "memory_cache_size", OPTION_INTEGER, &option_memory_cache_size }, - { "disc_cache_age", OPTION_INTEGER, &option_disc_cache_age }, - { "block_advertisements", OPTION_BOOL, &option_block_ads }, - { "minimum_gif_delay", OPTION_INTEGER, &option_minimum_gif_delay }, - { "send_referer", OPTION_BOOL, &option_send_referer }, - { "animate_images", OPTION_BOOL, &option_animate_images }, - { "expire_url", OPTION_INTEGER, &option_expire_url }, - { "font_default", OPTION_INTEGER, &option_font_default }, - { "ca_bundle", OPTION_STRING, &option_ca_bundle }, - { "ca_path", OPTION_STRING, &option_ca_path }, - { "cookie_file", OPTION_STRING, &option_cookie_file }, - { "cookie_jar", OPTION_STRING, &option_cookie_jar }, - { "homepage_url", OPTION_STRING, &option_homepage_url }, - { "url_suggestion", OPTION_BOOL, &option_url_suggestion }, - { "window_x", OPTION_INTEGER, &option_window_x }, - { "window_y", OPTION_INTEGER, &option_window_y }, - { "window_width", OPTION_INTEGER, &option_window_width }, - { "window_height", OPTION_INTEGER, &option_window_height }, - { "window_screen_width", OPTION_INTEGER, &option_window_screen_width }, - { "window_screen_height",OPTION_INTEGER, &option_window_screen_height }, - { "toolbar_status_size", OPTION_INTEGER, &option_toolbar_status_width }, - { "scale", OPTION_INTEGER, &option_scale }, - { "incremental_reflow", OPTION_BOOL, &option_incremental_reflow }, - { "min_reflow_period", OPTION_INTEGER, &option_min_reflow_period }, + { "http_proxy", OPTION_BOOL, &option_http_proxy }, + { "http_proxy_host", OPTION_STRING, &option_http_proxy_host }, + { "http_proxy_port", OPTION_INTEGER, &option_http_proxy_port }, + { "http_proxy_auth", OPTION_INTEGER, &option_http_proxy_auth }, + { "http_proxy_auth_user", + OPTION_STRING, &option_http_proxy_auth_user }, + { "http_proxy_auth_pass", + OPTION_STRING, &option_http_proxy_auth_pass }, + { "font_size", OPTION_INTEGER, &option_font_size }, + { "font_min_size", OPTION_INTEGER, &option_font_min_size }, + { "font_sans", OPTION_STRING, &option_font_sans }, + { "font_serif", OPTION_STRING, &option_font_serif }, + { "font_mono", OPTION_STRING, &option_font_mono }, + { "font_cursive", OPTION_STRING, &option_font_cursive }, + { "font_fantasy", OPTION_STRING, &option_font_fantasy }, + { "accept_language", OPTION_STRING, &option_accept_language }, + { "accept_charset", OPTION_STRING, &option_accept_charset }, + { "memory_cache_size", OPTION_INTEGER, &option_memory_cache_size }, + { "disc_cache_age", OPTION_INTEGER, &option_disc_cache_age }, + { "block_advertisements", + OPTION_BOOL, &option_block_ads }, + { "minimum_gif_delay", OPTION_INTEGER, &option_minimum_gif_delay }, + { "send_referer", OPTION_BOOL, &option_send_referer }, + { "animate_images", OPTION_BOOL, &option_animate_images }, + { "expire_url", OPTION_INTEGER, &option_expire_url }, + { "font_default", OPTION_INTEGER, &option_font_default }, + { "ca_bundle", OPTION_STRING, &option_ca_bundle }, + { "ca_path", OPTION_STRING, &option_ca_path }, + { "cookie_file", OPTION_STRING, &option_cookie_file }, + { "cookie_jar", OPTION_STRING, &option_cookie_jar }, + { "homepage_url", OPTION_STRING, &option_homepage_url }, + { "url_suggestion", OPTION_BOOL, &option_url_suggestion }, + { "window_x", OPTION_INTEGER, &option_window_x }, + { "window_y", OPTION_INTEGER, &option_window_y }, + { "window_width", OPTION_INTEGER, &option_window_width }, + { "window_height", OPTION_INTEGER, &option_window_height }, + { "window_screen_width", + OPTION_INTEGER, &option_window_screen_width }, + { "window_screen_height", + OPTION_INTEGER, &option_window_screen_height }, + { "toolbar_status_size", + OPTION_INTEGER, &option_toolbar_status_width }, + { "scale", OPTION_INTEGER, &option_scale }, + { "incremental_reflow", OPTION_BOOL, &option_incremental_reflow }, + { "min_reflow_period", OPTION_INTEGER, &option_min_reflow_period }, /* Fetcher options */ - { "max_fetchers", OPTION_INTEGER, &option_max_fetchers }, + { "max_fetchers", OPTION_INTEGER, &option_max_fetchers }, { "max_fetchers_per_host", - OPTION_INTEGER, &option_max_fetchers_per_host }, + OPTION_INTEGER, &option_max_fetchers_per_host }, { "max_cached_fetch_handles", - OPTION_INTEGER, &option_max_cached_fetch_handles }, - { "suppress_curl_debug", OPTION_BOOL, &option_suppress_curl_debug }, - { "target_blank", - OPTION_BOOL, &option_target_blank }, - { "margin_top", OPTION_INTEGER, &option_margin_top}, - { "margin_bottom", OPTION_INTEGER, &option_margin_bottom}, - { "margin_left", OPTION_INTEGER, &option_margin_left}, - { "margin_right", OPTION_INTEGER, &option_margin_right}, - { "export_scale", OPTION_INTEGER, &option_export_scale}, - { "suppress_images", OPTION_BOOL, &option_suppress_images}, - { "remove_backgrounds", OPTION_BOOL, &option_remove_backgrounds}, - { "enable_loosening", OPTION_BOOL, &option_enable_loosening}, - { "enable_PDF_compression", OPTION_BOOL, &option_enable_PDF_compression}, - { "enable_PDF_password", OPTION_BOOL, &option_enable_PDF_password}, + OPTION_INTEGER, &option_max_cached_fetch_handles }, + { "suppress_curl_debug",OPTION_BOOL, &option_suppress_curl_debug }, + { "target_blank", OPTION_BOOL, &option_target_blank }, + { "button_2_tab", OPTION_BOOL, &option_button_2_tab }, + /* PDF / Print options*/ + { "margin_top", OPTION_INTEGER, &option_margin_top}, + { "margin_bottom", OPTION_INTEGER, &option_margin_bottom}, + { "margin_left", OPTION_INTEGER, &option_margin_left}, + { "margin_right", OPTION_INTEGER, &option_margin_right}, + { "export_scale", OPTION_INTEGER, &option_export_scale}, + { "suppress_images", OPTION_BOOL, &option_suppress_images}, + { "remove_backgrounds", OPTION_BOOL, &option_remove_backgrounds}, + { "enable_loosening", OPTION_BOOL, &option_enable_loosening}, + { "enable_PDF_compression", + OPTION_BOOL, &option_enable_PDF_compression}, + { "enable_PDF_password", + OPTION_BOOL, &option_enable_PDF_password}, EXTRA_OPTION_TABLE }; -- cgit v1.2.3