summaryrefslogtreecommitdiff
path: root/atari/global_evnt.c
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2012-01-06 23:23:31 +0000
committerOle Loots <ole@monochrom.net>2012-01-06 23:23:31 +0000
commitbe2d2b4ceae826e23b79e20d43bf9c9102840164 (patch)
tree6176d5c5a9d6921b4926a60b2c03bf75d71c69b0 /atari/global_evnt.c
parent4259392e19d3755118543b95362a814d4c94d2dd (diff)
downloadnetsurf-be2d2b4ceae826e23b79e20d43bf9c9102840164.tar.gz
netsurf-be2d2b4ceae826e23b79e20d43bf9c9102840164.tar.bz2
Added menu items for foreground_images,background_images for fast access.
svn path=/trunk/netsurf/; revision=13387
Diffstat (limited to 'atari/global_evnt.c')
-rwxr-xr-xatari/global_evnt.c30
1 files changed, 26 insertions, 4 deletions
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) */
}