[project @ 2004-06-29 17:26:42 by jmb]

Reinstate Object->reload menu entry and make it work.

svn path=/import/netsurf/; revision=1028
This commit is contained in:
John Mark Bell 2004-06-29 17:26:42 +00:00
parent 6efe47b59d
commit afd366ecae

View File

@ -47,6 +47,7 @@ static void ro_gui_menu_prepare_help(int forced);
static void ro_gui_menu_pageinfo(wimp_message_menu_warning *warning);
static void ro_gui_menu_objectinfo(wimp_message_menu_warning *warning);
static struct box *ro_gui_menu_find_object_box(void);
static void ro_gui_menu_object_reload(void);
wimp_menu *current_menu;
static int current_menu_x, current_menu_y;
@ -123,14 +124,14 @@ static wimp_MENU(2) object_export_menu = {
/* Object submenu
*/
static wimp_MENU(4) object_menu = {
static wimp_MENU(5) object_menu = {
{ "Object" }, 7,2,7,0, 300, 44, 0,
{
{ wimp_MENU_GIVE_WARNING, (wimp_menu *)1, DEFAULT_FLAGS, { "ObjInfo" } },
{ wimp_MENU_GIVE_WARNING, (wimp_menu *)1, DEFAULT_FLAGS, { "ObjSave" } },
{ 0, (wimp_menu *)&object_export_menu, DEFAULT_FLAGS, { "Export" } },
{ wimp_MENU_LAST /*wimp_MENU_SEPARATE*/, (wimp_menu *)&link_menu, DEFAULT_FLAGS, { "SaveURL" } },
// { wimp_MENU_LAST, wimp_NO_SUB_MENU, DEFAULT_FLAGS, { "ObjReload" } }
{ wimp_MENU_SEPARATE, (wimp_menu *)&link_menu, DEFAULT_FLAGS, { "SaveURL" } },
{ wimp_MENU_LAST, wimp_NO_SUB_MENU, DEFAULT_FLAGS, { "ObjReload" } }
}
};
@ -480,6 +481,9 @@ void ro_gui_menu_selection(wimp_selection *selection)
break;
}
break;
case 4: /* Reload */
ro_gui_menu_object_reload();
break;
}
break;
case MENU_SELECTION:
@ -1171,3 +1175,13 @@ struct box *ro_gui_menu_find_object_box(void)
return box;
}
void ro_gui_menu_object_reload(void)
{
struct box *box = ro_gui_menu_find_object_box();
if (box) {
box->object->fresh = false;
browser_window_reload(current_gui->data.browser.bw);
}
}