Commit d4414a60 authored by Andrew Hodgkinson's avatar Andrew Hodgkinson
Browse files

Didn't redraw browsers which would be immediately affected by a change to the...

Didn't redraw browsers which would be immediately affected by a change to the Choices when 'Set' was used. Appropriate redraw calls added. Reversed decision to toe in the pane window by 8 OS units relative to the placeholder icon sides.
parent 632df794
......@@ -139,13 +139,6 @@ static _kernel_oserror * choices_show_subwindow(ObjectId choices_window, int sub
show_block.visible_area.ymin = coords_y_toscreen(show_block.visible_area.ymin, (WimpRedrawWindowBlock *) &state);
show_block.visible_area.ymax = coords_y_toscreen(show_block.visible_area.ymax, (WimpRedrawWindowBlock *) &state);
/* Toe it in for the borders */
show_block.visible_area.xmin += 8;
show_block.visible_area.ymin += 8;
show_block.visible_area.xmax -= 8;
show_block.visible_area.ymax -= 8;
/* Adjustments for different types of window */
#ifdef TRACE
......@@ -422,9 +415,9 @@ static int choices_radio_click_handler(int eventcode, ToolboxEvent * event, IdBl
/* Returns: pointer to _kernel_oserror. */
/*************************************************/
static _kernel_oserror *choices_set_contents(void)
static _kernel_oserror * choices_set_contents(void)
{
_kernel_oserror *e;
_kernel_oserror * e;
/* Check that the BrowseDefaults subwindow exists */
......@@ -442,7 +435,8 @@ static _kernel_oserror *choices_set_contents(void)
RetError(choices_set_encoding_field());
}
/* Check that the Windows subwindow exists */
/* Check that the various subwindows exist before reading */
/* their contents. */
if (*(subwindows + CDSubWindows))
{
......@@ -466,7 +460,9 @@ static _kernel_oserror *choices_set_contents(void)
{
RetError(numberrange_set_value(0, *(subwindows + CDSubHotlist), CD_HlAutoOpen, new_choices->auto_open_delay));
RetError(numberrange_set_value(0, *(subwindows + CDSubHotlist), CD_HlAutoScroll, new_choices->auto_scroll_delay));
RetError(choices_set_display_field(*(subwindows + CDSubHotlist), CD_HlDispDisp, new_choices->hotlist_show));
RetError(choices_set_save_field(*(subwindows + CDSubHotlist), CD_HlSaveDisp, new_choices->save_hotlist));
}
......@@ -474,10 +470,11 @@ static _kernel_oserror *choices_set_contents(void)
{
RetError(numberrange_set_value(0, *(subwindows + CDSubHistory), CD_HiLines, new_choices->v_hist_size));
RetError(numberrange_set_value(0, *(subwindows + CDSubHistory), CD_HiMaxSize, new_choices->g_hist_size));
RetError(choices_set_display_field(*(subwindows + CDSubHistory), CD_HiDispDisp, new_choices->show_urls));
RetError(choices_set_save_field(*(subwindows + CDSubHistory), CD_HiSaveDisp, new_choices->save_history));
}
return NULL;
}
......@@ -493,10 +490,12 @@ static _kernel_oserror *choices_set_contents(void)
static _kernel_oserror * choices_get_contents(void)
{
_kernel_oserror *e;
int state;
char *tempstring;
int reqsize;
_kernel_oserror * e;
WimpGetWindowStateBlock s;
browser_data * b;
char * tempstring;
int state;
int reqsize;
/* Check that the BrowseDefaults subwindow exists */
......@@ -562,6 +561,34 @@ static _kernel_oserror * choices_get_contents(void)
memcpy(&choices, new_choices, sizeof(global_choices));
/* Update browsers */
b = last_browser;
while (b)
{
/* The Choices are only used directly for browsers which are */
/* set to override document colours. Otherwise defaults will */
/* have been read locally and possibly overridden by HTML, */
/* and a reload will be needed to reflect the changes. */
if (!b->use_source_cols)
{
s.window_handle = b->window_handle;
RetError(wimp_get_window_state(&s));
coords_box_toworkarea(&s.visible_area, (WimpRedrawWindowBlock *) &s);
RetError(wimp_force_redraw(b->window_handle,
s.visible_area.xmin,
s.visible_area.ymin,
s.visible_area.xmax,
s.visible_area.ymax));
}
b = b->previous;
}
return NULL;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment