From be2d2b4ceae826e23b79e20d43bf9c9102840164 Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Fri, 6 Jan 2012 23:23:31 +0000 Subject: Added menu items for foreground_images,background_images for fast access. svn path=/trunk/netsurf/; revision=13387 --- atari/global_evnt.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'atari/global_evnt.c') diff --git a/atari/global_evnt.c b/atari/global_evnt.c index ccb4b39c4..bb44601f1 100755 --- a/atari/global_evnt.c +++ b/atari/global_evnt.c @@ -271,8 +271,20 @@ static void __CDECL menu_debug_render(WINDOW *win, int item, int title, void *da (html_redraw_debug) ? 1 : 0 ); } } -} - +} + +static void __CDECL menu_fg_images(WINDOW *win, int item, int title, void *data) +{ + option_foreground_images = !option_foreground_images; + MenuIcheck( NULL, MAINMENU_M_FG_IMAGES, (option_foreground_images) ? 1 : 0); +} + +static void __CDECL menu_bg_images(WINDOW *win, int item, int title, void *data) +{ + option_background_images = !option_background_images; + MenuIcheck( NULL, MAINMENU_M_BG_IMAGES, (option_background_images) ? 1 : 0); +} + static void __CDECL menu_back(WINDOW *win, int item, int title, void *data) { LOG(("%s", __FUNCTION__)); @@ -360,7 +372,9 @@ static struct s_menu_item_evnt menu_evnt_tbl[] = {T_VIEW, MAINMENU_M_RELOAD, "Reload", menu_reload, {0,NK_F5,0}, NULL}, {T_VIEW, MAINMENU_M_TOOLBARS, "Toolbars", menu_toolbars, {0,0,0}, NULL}, {T_VIEW, MAINMENU_M_SAVEWIN, "", menu_savewin, {0,0,0}, NULL}, - {T_VIEW, MAINMENU_M_DEBUG_RENDER, "", menu_debug_render, {0,0,0}, NULL}, + {T_VIEW, MAINMENU_M_DEBUG_RENDER, "", menu_debug_render, {0,0,0}, NULL}, + {T_VIEW, MAINMENU_M_FG_IMAGES, "", menu_fg_images, {0,0,0}, NULL}, + {T_VIEW, MAINMENU_M_BG_IMAGES, "", menu_bg_images, {0,0,0}, NULL}, {T_VIEW, MAINMENU_M_STOP, "Stop", menu_stop, {0,0,0}, NULL}, {T_NAV, MAINMENU_M_BACK, "Back", menu_back, {0,0,0}, NULL}, {T_NAV, MAINMENU_M_FORWARD, "Forward", menu_forward, {0,0,0}, NULL}, @@ -654,6 +668,13 @@ static void set_menu_title(int rid, const char * nsid) count++; } } +} + +void main_menu_update( void ) +{ + MenuIcheck( NULL, MAINMENU_M_DEBUG_RENDER, (html_redraw_debug) ? 1 : 0); + MenuIcheck( NULL, MAINMENU_M_FG_IMAGES, (option_foreground_images) ? 1 : 0); + MenuIcheck( NULL, MAINMENU_M_BG_IMAGES, (option_background_images) ? 1 : 0); } @@ -749,7 +770,8 @@ void bind_global_events( void ) MenuText( NULL, menu_evnt_tbl[i].rid, menu_evnt_tbl[i].menustr ); } i++; - } + } + main_menu_update(); /* TODO: Fix pixel sizes for Titles and Items (for non-8px fonts) */ } -- cgit v1.2.3