Author: tlsa
Date: Fri Dec 23 15:49:13 2011
New Revision: 13333
URL:
http://source.netsurf-browser.org?rev=13333&view=rev
Log:
Make the RISC OS front end foreground/background menu options work.
Modified:
trunk/netsurf/riscos/gui.h
trunk/netsurf/riscos/print.c
trunk/netsurf/riscos/window.c
Modified: trunk/netsurf/riscos/gui.h
URL:
http://source.netsurf-browser.org/trunk/netsurf/riscos/gui.h?rev=13333&am...
==============================================================================
--- trunk/netsurf/riscos/gui.h (original)
+++ trunk/netsurf/riscos/gui.h Fri Dec 23 15:49:13 2011
@@ -100,7 +100,6 @@
/** Options. */
struct {
- bool background_images; /**< Display background images. */
bool buffer_animations; /**< Use screen buffering for animations. */
bool buffer_everything; /**< Use screen buffering for everything. */
} option;
Modified: trunk/netsurf/riscos/print.c
URL:
http://source.netsurf-browser.org/trunk/netsurf/riscos/print.c?rev=13333&...
==============================================================================
--- trunk/netsurf/riscos/print.c (original)
+++ trunk/netsurf/riscos/print.c Fri Dec 23 15:49:13 2011
@@ -32,6 +32,7 @@
#include "utils/config.h"
#include "content/content.h"
#include "content/hlcache.h"
+#include "desktop/options.h"
#include "desktop/plotters.h"
#include "riscos/dialog.h"
#include "riscos/menus.h"
@@ -192,7 +193,7 @@
printers_exists = false;
}
- print_bg_images = g->option.background_images;
+ print_bg_images = option_background_images;
ro_gui_set_icon_selected_state(dialog_print, ICON_PRINT_TO_BOTTOM,
true);
@@ -273,9 +274,8 @@
print_max_sheets = sheets;
else
print_max_sheets = -1;
- ro_print_current_window->option.background_images =
- ro_gui_get_icon_selected_state(dialog_print,
- ICON_PRINT_BG_IMAGES);
+ option_background_images = ro_gui_get_icon_selected_state(dialog_print,
+ ICON_PRINT_BG_IMAGES);
print_send_printsave(ro_print_current_window->bw->current_content);
@@ -521,9 +521,7 @@
void ro_print_cleanup(void)
{
- if (ro_print_current_window)
- ro_print_current_window->option.background_images =
- print_bg_images;
+ option_background_images = print_bg_images;
ro_print_current_window = NULL;
print_text_black = false;
print_prev_message = 0;
Modified: trunk/netsurf/riscos/window.c
URL:
http://source.netsurf-browser.org/trunk/netsurf/riscos/window.c?rev=13333...
==============================================================================
--- trunk/netsurf/riscos/window.c (original)
+++ trunk/netsurf/riscos/window.c Fri Dec 23 15:49:13 2011
@@ -2330,12 +2330,11 @@
/* View Submenu */
- ro_gui_menu_set_entry_shaded(menu, BROWSER_IMAGES_FOREGROUND, true);
- ro_gui_menu_set_entry_ticked(menu, BROWSER_IMAGES_FOREGROUND, true);
- /* Not yet implemented. */
+ ro_gui_menu_set_entry_ticked(menu, BROWSER_IMAGES_FOREGROUND,
+ g != NULL && option_foreground_images);
ro_gui_menu_set_entry_ticked(menu, BROWSER_IMAGES_BACKGROUND,
- g != NULL && g->option.background_images);
+ g != NULL && option_background_images);
ro_gui_menu_set_entry_shaded(menu, BROWSER_BUFFER_ANIMS,
g == NULL || g->option.buffer_everything);
@@ -2849,12 +2848,15 @@
case BROWSER_FIND_TEXT:
ro_gui_window_action_search(g);
break;
+ case BROWSER_IMAGES_FOREGROUND:
+ if (g != NULL)
+ option_foreground_images =
+ !option_foreground_images;
+ break;
case BROWSER_IMAGES_BACKGROUND:
- if (g != NULL) {
- g->option.background_images =
- !g->option.background_images;
- gui_window_redraw_window(g);
- }
+ if (g != NULL)
+ option_background_images =
+ !option_background_images;
break;
case BROWSER_BUFFER_ANIMS:
if (g != NULL)
@@ -4447,7 +4449,6 @@
*/
if (!old_gui) {
new_bw->scale = ((float)option_scale) / 100;
- new_gui->option.background_images = option_background_images;
new_gui->option.buffer_animations = option_buffer_animations;
new_gui->option.buffer_everything = option_buffer_everything;
} else {