/** * when CONTENT_THEME needs handling call this function */ void theme_install_start(hlcache_handle *c) { assert(c); assert(content_get_type(c) == CONTENT_THEME); /* stop theme sitting in memory cache */ content_invalidate_reuse_data(c); hlcache_handle_replace_callback(c, theme_install_callback, NULL); }
static void html_object_refresh(void *p) { struct content_html_object *object = p; nsurl *refresh_url; assert(content_get_type(object->content) == CONTENT_HTML); refresh_url = content_get_refresh_url(object->content); /* Ignore if refresh URL has gone * (may happen if fetch errored) */ if (refresh_url == NULL) return; content_invalidate_reuse_data(object->content); if (!html_replace_object(object, refresh_url)) { /** \todo handle memory exhaustion */ } }
void theme_install_start(hlcache_handle *c) { assert(c != NULL); assert(content_get_type(c) == CONTENT_THEME); if (ro_gui_dialog_open_top(dialog_theme_install, NULL, 0, 0)) { warn_user("ThemeInstActive", 0); return; } /* stop theme sitting in memory cache */ content_invalidate_reuse_data(c); hlcache_handle_replace_callback(c, theme_install_callback, NULL); ro_gui_set_icon_string(dialog_theme_install, ICON_THEME_INSTALL_MESSAGE, messages_get("ThemeInstDown"), true); ro_gui_set_icon_shaded_state(dialog_theme_install, ICON_THEME_INSTALL_INSTALL, true); ro_gui_wimp_event_register_close_window(dialog_theme_install, theme_install_close); }