cached view is reused.
* grub-core/gfxmenu/view.c: Call the refresh procedure for all
open boot menus.
+2013-04-29 Vladimir Testov <vladimir.testov@rosalab.ru>
+
+ * grub-core/gfxmenu/gui_list.c: Refresh first_shown_entry value when
+ cached view is reused.
+ * grub-core/gfxmenu/view.c: Call the refresh procedure for all
+ open boot menus.
+
2013-04-29 Vladimir Serbinenko <phcoder@gmail.com>
Unify more code in grub-install_header.
self->view = view;
}
+/* Refresh list variables */
+static void
+list_refresh_info (void *vself,
+ grub_gfxmenu_view_t view)
+{
+ list_impl_t self = vself;
+ if (view->nested)
+ self->first_shown_index = 0;
+}
+
static struct grub_gui_component_ops list_comp_ops =
{
.destroy = list_destroy,
static struct grub_gui_list_ops list_ops =
{
- .set_view_info = list_set_view_info
+ .set_view_info = list_set_view_info,
+ .refresh_list = list_refresh_info
};
grub_gui_component_t
update_menu_visit, view);
}
+static void
+refresh_menu_visit (grub_gui_component_t component,
+ void *userdata)
+{
+ grub_gfxmenu_view_t view;
+ view = userdata;
+ if (component->ops->is_instance (component, "list"))
+ {
+ grub_gui_list_t list = (grub_gui_list_t) component;
+ list->ops->refresh_list (list, view);
+ }
+}
+
+/* Refresh list information (useful for submenus) */
+static void
+refresh_menu_components (grub_gfxmenu_view_t view)
+{
+ grub_gui_iterate_recursively ((grub_gui_component_t) view->canvas,
+ refresh_menu_visit, view);
+}
+
static void
draw_message (grub_gfxmenu_view_t view)
{
view->screen.x, view->screen.y,
view->screen.width, view->screen.height);
+ refresh_menu_components (view);
update_menu_components (view);
grub_gfxmenu_view_redraw (view, &view->screen);
{
void (*set_view_info) (void *self,
grub_gfxmenu_view_t view);
+ void (*refresh_list) (void *self,
+ grub_gfxmenu_view_t view);
};
struct grub_gui_progress_ops