diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2012-03-22 09:34:34 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2012-03-22 09:34:34 +0000 |
commit | 1490b52a6b96b6a69a0c4fe9e0515dc717425128 (patch) | |
tree | 8caba44a9da98e6cebf4f188e3232534b1596a4d /gtk/options.h | |
parent | 0797bf5a5731b2c8d55105b453530584ea4e1f5b (diff) | |
download | netsurf-1490b52a6b96b6a69a0c4fe9e0515dc717425128.tar.gz netsurf-1490b52a6b96b6a69a0c4fe9e0515dc717425128.tar.bz2 |
NetSurf options rework (a=vince r=daniels,jmb)
svn path=/trunk/netsurf/; revision=13548
Diffstat (limited to 'gtk/options.h')
-rw-r--r-- | gtk/options.h | 113 |
1 files changed, 58 insertions, 55 deletions
diff --git a/gtk/options.h b/gtk/options.h index 23de8b745..795eca91d 100644 --- a/gtk/options.h +++ b/gtk/options.h @@ -16,65 +16,68 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#ifndef _NETSURF_DESKTOP_OPTIONS_INCLUDING_ +#error "Frontend options header cannot be included directly" +#endif + #ifndef _NETSURF_GTK_OPTIONS_H_ #define _NETSURF_GTK_OPTIONS_H_ -#include "desktop/options.h" - -extern bool option_render_resample; -extern bool option_downloads_clear; -extern bool option_request_overwrite; -extern char *option_downloads_directory; -extern char *option_url_file; -extern bool option_show_single_tab; -extern int option_button_type; -extern bool option_disable_popups; -extern bool option_disable_plugins; -extern int option_history_age; -extern bool option_hover_urls; -extern bool option_focus_new; -extern bool option_new_blank; -extern char *option_hotlist_path; -extern bool option_source_tab; -extern int option_current_theme; -extern int option_position_tab; +#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 EXTRA_OPTION_DEFINE \ -bool option_render_resample = true; \ -bool option_downloads_clear = false; \ -bool option_request_overwrite = true; \ -char *option_downloads_directory = 0; \ -char *option_url_file = 0; \ -bool option_show_single_tab = false; \ -int option_button_type = 0; \ -bool option_disable_popups = false; \ -bool option_disable_plugins = false; \ -int option_history_age = 0; \ -bool option_hover_urls = false; \ -bool option_focus_new = false; \ -bool option_new_blank = false; \ -char *option_hotlist_path = NULL; \ -bool option_source_tab = false;\ -int option_current_theme = 0;\ -int option_position_tab = 0; +#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 EXTRA_OPTION_TABLE \ -{ "render_resample", OPTION_BOOL, &option_render_resample }, \ -{ "downloads_clear", OPTION_BOOL, &option_downloads_clear }, \ -{ "request_overwrite", OPTION_BOOL, &option_request_overwrite }, \ -{ "downloads_directory",OPTION_STRING, &option_downloads_directory }, \ -{ "url_file", OPTION_STRING, &option_url_file }, \ -{ "show_single_tab", OPTION_BOOL, &option_show_single_tab }, \ -{ "button_type", OPTION_INTEGER, &option_button_type}, \ -{ "disable_popups", OPTION_BOOL, &option_disable_popups}, \ -{ "disable_plugins", OPTION_BOOL, &option_disable_plugins}, \ -{ "history_age", OPTION_INTEGER, &option_history_age}, \ -{ "hover_urls", OPTION_BOOL, &option_hover_urls}, \ -{ "focus_new", OPTION_BOOL, &option_focus_new}, \ -{ "new_blank", OPTION_BOOL, &option_new_blank}, \ -{ "hotlist_path", OPTION_STRING, &option_hotlist_path}, \ -{ "source_tab", OPTION_BOOL, &option_source_tab},\ -{ "current_theme", OPTION_INTEGER, &option_current_theme}, \ -{ "position_tab", OPTION_INTEGER, &option_position_tab} +#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} #endif |