From a5355ec55721b6d874168d979338044c4a12dc52 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 27 May 2013 09:36:26 +0100 Subject: change all core and frontend options headers to new format --- gtk/options.h | 114 +++++++++++++++++++++++++++------------------------------- 1 file changed, 53 insertions(+), 61 deletions(-) (limited to 'gtk/options.h') diff --git a/gtk/options.h b/gtk/options.h index 795eca91d..612809eac 100644 --- a/gtk/options.h +++ b/gtk/options.h @@ -1,5 +1,5 @@ /* - * Copyright 2006 Rob Kendrick + * Copyright 2012 Vincent Sanders * * This file is part of NetSurf, http://www.netsurf-browser.org/ * @@ -16,68 +16,60 @@ * along with this program. If not, see . */ -#ifndef _NETSURF_DESKTOP_OPTIONS_INCLUDING_ -#error "Frontend options header cannot be included directly" -#endif - #ifndef _NETSURF_GTK_OPTIONS_H_ #define _NETSURF_GTK_OPTIONS_H_ -#define NSOPTION_EXTRA_DEFINE \ - bool render_resample; \ - bool downloads_clear; \ - bool request_overwrite; \ - char *downloads_directory; \ - char *url_file; \ - bool show_single_tab; \ - int button_type; \ - bool disable_popups; \ - bool disable_plugins; \ - int history_age; \ - bool hover_urls; \ - bool focus_new; \ - bool new_blank; \ - char *hotlist_path; \ - bool source_tab; \ - int current_theme; \ - int position_tab - -#define NSOPTION_EXTRA_DEFAULTS \ - .render_resample = true, \ - .downloads_clear = false, \ - .request_overwrite = true, \ - .downloads_directory = NULL, \ - .url_file = NULL, \ - .show_single_tab = false, \ - .button_type = 0, \ - .disable_popups = false, \ - .disable_plugins = false, \ - .history_age = 0, \ - .hover_urls = false, \ - .focus_new = false, \ - .new_blank = false, \ - .hotlist_path = NULL, \ - .source_tab = false, \ - .current_theme = 0, \ - .position_tab = 0 - -#define NSOPTION_EXTRA_TABLE \ -{ "render_resample", OPTION_BOOL, &nsoptions.render_resample }, \ -{ "downloads_clear", OPTION_BOOL, &nsoptions.downloads_clear }, \ -{ "request_overwrite", OPTION_BOOL, &nsoptions.request_overwrite }, \ -{ "downloads_directory",OPTION_STRING, &nsoptions.downloads_directory }, \ -{ "url_file", OPTION_STRING, &nsoptions.url_file }, \ -{ "show_single_tab", OPTION_BOOL, &nsoptions.show_single_tab }, \ -{ "button_type", OPTION_INTEGER, &nsoptions.button_type}, \ -{ "disable_popups", OPTION_BOOL, &nsoptions.disable_popups}, \ -{ "disable_plugins", OPTION_BOOL, &nsoptions.disable_plugins}, \ -{ "history_age", OPTION_INTEGER, &nsoptions.history_age}, \ -{ "hover_urls", OPTION_BOOL, &nsoptions.hover_urls}, \ -{ "focus_new", OPTION_BOOL, &nsoptions.focus_new}, \ -{ "new_blank", OPTION_BOOL, &nsoptions.new_blank}, \ -{ "hotlist_path", OPTION_STRING, &nsoptions.hotlist_path}, \ -{ "source_tab", OPTION_BOOL, &nsoptions.source_tab},\ -{ "current_theme", OPTION_INTEGER, &nsoptions.current_theme}, \ -{ "position_tab", OPTION_INTEGER, &nsoptions.position_tab} +/* currently nothing here */ #endif + +/* High quality image scaling */ +NSOPTION_BOOL(render_resample, true) + +/* clear downloads */ +NSOPTION_BOOL(downloads_clear, false) + +/* prompt before overwriting downloads */ +NSOPTION_BOOL(request_overwrite, true) + +/* location to download files to */ +NSOPTION_STRING(downloads_directory, NULL) + +/* where to store URL database */ +NSOPTION_STRING(url_file, NULL) + +/* Always show tabs even if there is only one */ +NSOPTION_BOOL(show_single_tab, false) + +/* size of buttons */ +NSOPTION_INTEGER(button_type, 0) + +/* disallow popup windows */ +NSOPTION_BOOL(disable_popups, false) + +/* disable content plugins */ +NSOPTION_BOOL(disable_plugins, false) + +/* number of days to keep history data */ +NSOPTION_INTEGER(history_age, 0) + +/* show urls in local history browser */ +NSOPTION_BOOL(hover_urls, false) + +/* bring new tabs to front */ +NSOPTION_BOOL(focus_new, false) + +/* new tabs are blank instead of homepage */ +NSOPTION_BOOL(new_blank, false) + +/* path to save hotlist file */ +NSOPTION_STRING(hotlist_path, NULL) + +/* open source views in a tab */ +NSOPTION_BOOL(source_tab, false) + +/* currently selected theme */ +NSOPTION_INTEGER(current_theme, 0) + +/* where tabs are positioned */ +NSOPTION_INTEGER(position_tab, 0) -- cgit v1.2.3