Squash warnings

svn path=/trunk/netsurf/; revision=6932
This commit is contained in:
John Mark Bell 2009-03-27 02:32:26 +00:00
parent 73365fa023
commit 861970fbcd
1 changed files with 17 additions and 8 deletions

View File

@ -51,7 +51,8 @@ static bool ro_gui_options_image_click(wimp_pointer *pointer);
static bool ro_gui_options_image_ok(wimp_w w);
static void ro_gui_options_image_redraw(wimp_draw *redraw);
static void ro_gui_options_image_update(wimp_w w, wimp_i i);
static void ro_gui_options_image_read(wimp_w w,unsigned int *bg, unsigned int *fg);
static void ro_gui_options_image_read(wimp_w w, unsigned int *bg,
unsigned int *fg);
static void ro_gui_options_update_shading(wimp_w w);
static osspriteop_area *example_images;
@ -85,7 +86,8 @@ bool ro_gui_options_image_initialise(wimp_w w)
image_quality_menu->entries[i].
data.indirected_text.text, true);
}
ro_gui_set_icon_decimal(w, IMAGE_SPEED_FIELD, option_minimum_gif_delay, 2);
ro_gui_set_icon_decimal(w, IMAGE_SPEED_FIELD,
option_minimum_gif_delay, 2);
ro_gui_set_icon_selected_state(w, IMAGE_DISABLE_ANIMATION,
!option_animate_images);
ro_gui_options_update_shading(w);
@ -111,8 +113,8 @@ bool ro_gui_options_image_initialise(wimp_w w)
ro_gui_options_image_ok);
ro_gui_wimp_event_set_help_prefix(w, "HelpImageConfig");
ro_gui_wimp_event_memorise(w);
return true;
return true;
}
void ro_gui_options_image_finalise(wimp_w w)
@ -168,10 +170,10 @@ void ro_gui_options_image_redraw(wimp_draw *redraw)
origin_y = redraw->box.y1 - redraw->yscroll +
icon_state.icon.extent.y0 + 2;
if (bg)
_swix(Tinct_Plot, _IN(2) | _IN(3) | _IN(4) | _IN(7),
_swix(Tinct_Plot, _INR(2,4) | _IN(7),
bg, origin_x, origin_y, bg_tinct);
if (fg)
_swix(Tinct_PlotAlpha, _IN(2) | _IN(3) | _IN(4) | _IN(7),
_swix(Tinct_PlotAlpha, _INR(2,4) | _IN(7),
fg, origin_x, origin_y, fg_tinct);
more = wimp_get_rectangle(redraw);
}
@ -187,6 +189,7 @@ void ro_gui_options_image_read(wimp_w w, unsigned int *bg, unsigned int *fg)
if (!strcmp(text, image_quality_menu->entries[i].
data.indirected_text.text))
*fg = tinct_options[i];
text = ro_gui_get_icon_string(w, IMAGE_BACKGROUND_FIELD);
for (i = 0; i < 4; i++)
if (!strcmp(text, image_quality_menu->entries[i].
@ -201,10 +204,12 @@ bool ro_gui_options_image_click(wimp_pointer *pointer)
ro_gui_options_image_read(pointer->w, &old_bg, &old_fg);
switch (pointer->i) {
case IMAGE_DEFAULT_BUTTON:
ro_gui_set_icon_string(pointer->w, IMAGE_FOREGROUND_FIELD,
ro_gui_set_icon_string(pointer->w,
IMAGE_FOREGROUND_FIELD,
image_quality_menu->entries[3].
data.indirected_text.text, true);
ro_gui_set_icon_string(pointer->w, IMAGE_BACKGROUND_FIELD,
ro_gui_set_icon_string(pointer->w,
IMAGE_BACKGROUND_FIELD,
image_quality_menu->entries[2].
data.indirected_text.text, true);
ro_gui_set_icon_decimal(pointer->w, IMAGE_SPEED_FIELD,
@ -220,9 +225,11 @@ bool ro_gui_options_image_click(wimp_pointer *pointer)
default:
return false;
}
ro_gui_options_image_read(pointer->w, &bg, &fg);
if ((bg != old_bg) || (fg != old_fg))
ro_gui_options_image_update(pointer->w, pointer->i);
return false;
}
@ -240,11 +247,13 @@ void ro_gui_options_update_shading(wimp_w w)
bool ro_gui_options_image_ok(wimp_w w)
{
ro_gui_options_image_read(w, &option_bg_plot_style, &option_fg_plot_style);
ro_gui_options_image_read(w, (unsigned int *) &option_bg_plot_style,
(unsigned int *) &option_fg_plot_style);
option_minimum_gif_delay = ro_gui_get_icon_decimal(w,
IMAGE_SPEED_FIELD, 2);
option_animate_images = !ro_gui_get_icon_selected_state(w,
IMAGE_DISABLE_ANIMATION);
ro_gui_save_options();
return true;
}