diff --git a/riscos/gif.c b/riscos/gif.c index b6c57984b..01131ffee 100644 --- a/riscos/gif.c +++ b/riscos/gif.c @@ -234,8 +234,12 @@ void nsgif_animate(void *p) data.redraw.height = c->data.gif.gif->frames[c->data.gif.current_frame].redraw_height; /* redraw background (true) or plot on top (false) */ - data.redraw.full_redraw = - c->data.gif.gif->frames[c->data.gif.current_frame].redraw_required; + if (c->data.gif.current_frame > 0) { + data.redraw.full_redraw = + c->data.gif.gif->frames[c->data.gif.current_frame - 1].redraw_required; + } else { + data.redraw.full_redraw = true; + } /* other data */ data.redraw.object = c; diff --git a/riscos/gifread.c b/riscos/gifread.c index 3e9d39b69..437d8dd88 100644 --- a/riscos/gifread.c +++ b/riscos/gifread.c @@ -245,7 +245,6 @@ int gif_initialise(struct gif_animation *gif) { if (gif->frame_count_partial > 0) { /* Set the redraw for the first frame to the maximum frame size */ - gif->frames[0].redraw_required = 0; gif->frames[0].redraw_x = 0; gif->frames[0].redraw_y = 0; gif->frames[0].redraw_width = gif->width; @@ -517,7 +516,7 @@ int gif_initialise_frame(struct gif_animation *gif) { /* if we are clearing the background then we need to redraw enough to cover the previous frame too */ - if (((background_action == 2) || (background_action == 3)) && (frame > 0)) { + if ((background_action == 2) || (background_action == 3)) { gif->frames[frame].redraw_required = 1; } diff --git a/riscos/gui.h b/riscos/gui.h index 9d23ef1e5..0c1248105 100644 --- a/riscos/gui.h +++ b/riscos/gui.h @@ -129,6 +129,9 @@ void ro_gui_save_options(void); bool ro_gui_dialog_keypress(wimp_key *key); void ro_gui_dialog_close(wimp_w close); void ro_gui_redraw_config_th_pane(wimp_draw *redraw); +void ro_gui_menu_prepare_hotlist(void); +void ro_gui_dialog_open_config(void); +void ro_gui_dialog_update_config(wimp_w w); /* in download.c */ void ro_gui_download_init(void); diff --git a/riscos/hotlist.c b/riscos/hotlist.c index 944cd70be..ed2364210 100644 --- a/riscos/hotlist.c +++ b/riscos/hotlist.c @@ -388,6 +388,7 @@ void ro_gui_hotlist_show(void) { /* Open the window at the top of the stack */ + ro_gui_menu_prepare_hotlist(); state.next = wimp_TOP; error = xwimp_open_window((wimp_open*)&state); if (error) { @@ -1396,11 +1397,13 @@ void ro_gui_hotlist_click(wimp_pointer *pointer) { false, true); entry->selected = true; hotlist_redraw_entry_title(entry); + ro_gui_menu_prepare_hotlist(); } } else if (buttons == (wimp_CLICK_ADJUST << 8)) { entry->selected = !entry->selected; hotlist_redraw_entry_title(entry); + ro_gui_menu_prepare_hotlist(); } /* Check if we should open the URL @@ -1411,6 +1414,7 @@ void ro_gui_hotlist_click(wimp_pointer *pointer) { if (buttons == wimp_DOUBLE_SELECT) { ro_gui_hotlist_selection_state(root.child_entry, false, true); + ro_gui_menu_prepare_hotlist(); } else { entry->selected = false; ro_gui_dialog_close_persistant(hotlist_window); @@ -1477,6 +1481,7 @@ void ro_gui_hotlist_click(wimp_pointer *pointer) { if (buttons == (wimp_CLICK_SELECT << 8)) { ro_gui_hotlist_selection_state(root.child_entry, false, true); + ro_gui_menu_prepare_hotlist(); } /* Handle the start of a drag @@ -1489,6 +1494,7 @@ void ro_gui_hotlist_click(wimp_pointer *pointer) { if (buttons == (wimp_CLICK_SELECT << 4)) { ro_gui_hotlist_selection_state(root.child_entry, false, true); + ro_gui_menu_prepare_hotlist(); } /* Start a drag box @@ -1910,6 +1916,7 @@ void ro_gui_hotlist_selection_drag_end(wimp_dragged *drag) { } else { ro_gui_hotlist_selection_drag(root.child_entry, x0, y0, x1, y1, true, true); } + ro_gui_menu_prepare_hotlist(); } @@ -2334,7 +2341,6 @@ void ro_gui_hotlist_dialog_click(wimp_pointer *pointer) { } } - int ro_gui_hotlist_help(int x, int y) { struct hotlist_entry *entry; wimp_window_state state; diff --git a/riscos/menus.c b/riscos/menus.c index 65577c5d4..3fe6e7a80 100644 --- a/riscos/menus.c +++ b/riscos/menus.c @@ -52,7 +52,6 @@ static void ro_gui_menu_objectinfo(wimp_message_menu_warning *warning); static void ro_gui_menu_object_reload(void); static void ro_gui_menu_browser_warning(wimp_message_menu_warning *warning); static void ro_gui_menu_hotlist_warning(wimp_message_menu_warning *warning); -static void ro_gui_menu_prepare_hotlist(void); struct gui_window *current_gui; wimp_menu *current_menu; @@ -1434,6 +1433,12 @@ void ro_gui_menu_prepare_hotlist(void) { selection = ro_gui_hotlist_get_selected(false); selection_full = ro_gui_hotlist_get_selected(true); + if (hotlist_toolbar) { + ro_gui_set_icon_shaded_state(hotlist_toolbar->toolbar_handle, + ICON_TOOLBAR_DELETE, (selection_full == 0)); + ro_gui_set_icon_shaded_state(hotlist_toolbar->toolbar_handle, + ICON_TOOLBAR_LAUNCH, (selection == 0)); + } if (selection_full == 0) { hotlist_menu->entries[1].icon_flags |= wimp_ICON_SHADED; hotlist_menu->entries[3].icon_flags |= wimp_ICON_SHADED; diff --git a/riscos/toolbar.c b/riscos/toolbar.c index 3b2edddc6..7028c5a19 100644 --- a/riscos/toolbar.c +++ b/riscos/toolbar.c @@ -145,8 +145,7 @@ struct toolbar *ro_toolbar_create(osspriteop_area *sprite_area, char *url_buffer ro_toolbar_add_icon(toolbar, ro_toolbar_initialise_icon(sprite_area, "open", ICON_TOOLBAR_OPEN)); ro_toolbar_add_icon(toolbar, ro_toolbar_initialise_icon(sprite_area, "expand", ICON_TOOLBAR_EXPAND)); ro_toolbar_add_icon(toolbar, ro_toolbar_create_separator()); - ro_toolbar_add_icon(toolbar, ro_toolbar_initialise_icon(sprite_area, "sort", ICON_TOOLBAR_SORT)); - ro_toolbar_add_icon(toolbar, ro_toolbar_create_separator()); +/* ro_toolbar_add_icon(toolbar, ro_toolbar_initialise_icon(sprite_area, "sort", ICON_TOOLBAR_SORT)); */ } /* Set the sprite area