Hello All,
Please forgive my ignorance if I ask obvious questions - I'm just starting out with NetSurf!
Steve suggested I take a look at Bug 2171 (http://bugs.netsurf-browser.org/mantis/view.php?id=2171) as a way of getting to grips with the source code.
I've been looking and scratching my head for a day or so.
I get that the menu for the Iconbar is set up in iconbar.c with this struct:
static const struct ns_menu iconbar_definition = {
"NetSurf", {
{ "Info", NO_ACTION, &dialog_info },
{ "AppHelp", HELP_OPEN_CONTENTS, 0 },
{ "Open", BROWSER_NAVIGATE_URL, 0 },
{ "Open.OpenURL", BROWSER_NAVIGATE_URL, &dialog_openurl },
{ "Open.HotlistShow", HOTLIST_SHOW, 0 },
{ "Open.HistGlobal", HISTORY_SHOW_GLOBAL, 0 },
{ "Open.ShowCookies", COOKIES_SHOW, 0 },
{ "Choices", CHOICES_SHOW, 0 },
{ "Quit", APPLICATION_QUIT, 0 },
{NULL, 0, 0}
}
"NetSurf", {
{ "Info", NO_ACTION, &dialog_info },
{ "AppHelp", HELP_OPEN_CONTENTS, 0 },
{ "Open", BROWSER_NAVIGATE_URL, 0 },
{ "Open.OpenURL", BROWSER_NAVIGATE_URL, &dialog_openurl },
{ "Open.HotlistShow", HOTLIST_SHOW, 0 },
{ "Open.HistGlobal", HISTORY_SHOW_GLOBAL, 0 },
{ "Open.ShowCookies", COOKIES_SHOW, 0 },
{ "Choices", CHOICES_SHOW, 0 },
{ "Quit", APPLICATION_QUIT, 0 },
{NULL, 0, 0}
}
Which uses the enum in menus.h to set up the menu order and creates the menu according to functions in menu.c
As far as I can gather the actual text (i.e., "Help... F1") is set up using the function ro_gui_menu_transate
Is that correct? I can't seem to find any references to the text in the source code ("Help..." or any of the other strings). Am I missing something obvious?
Glen