mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 20:46:50 +03:00
Make the RISC OS front end foreground/background menu options work.
svn path=/trunk/netsurf/; revision=13333
This commit is contained in:
parent
081217a321
commit
905df166b0
@ -100,7 +100,6 @@ struct gui_window {
|
||||
|
||||
/** 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;
|
||||
|
@ -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 @@ void ro_gui_print_prepare(struct gui_window *g)
|
||||
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,8 +274,7 @@ bool ro_gui_print_apply(wimp_w w)
|
||||
print_max_sheets = sheets;
|
||||
else
|
||||
print_max_sheets = -1;
|
||||
ro_print_current_window->option.background_images =
|
||||
ro_gui_get_icon_selected_state(dialog_print,
|
||||
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_dataload_bounce(wimp_message *m)
|
||||
|
||||
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;
|
||||
|
@ -2330,12 +2330,11 @@ bool ro_gui_window_menu_prepare(wimp_w w, wimp_i i, wimp_menu *menu,
|
||||
|
||||
/* 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 @@ bool ro_gui_window_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
|
||||
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 @@ void ro_gui_window_clone_options(struct browser_window *new_bw,
|
||||
*/
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user