Read about our upcoming Code of Conduct on this issue

Commit d257dd98 authored by a1ex's avatar a1ex
Browse files

Removed menu_help_section_print and re-added ML version and changeset info.

--HG--
branch : unified
parent 172b9d8df0de
......@@ -20,7 +20,7 @@ struct menu_entry help_menus[] = {
.name = "About Magic Lantern",
.priv = "About Magic Lantern",
.select = menu_help_go_to_label,
.display = menu_help_section_print,
.display = menu_print,
},"""
print >> o, "001 About Magic Lantern"
......@@ -52,10 +52,10 @@ for l in f[1:]:
print >> o, "%03d %s" % (page, item)
print >> menu, """ {
.name = "%s",
.priv = %s,
.priv = "%s",
.select = menu_help_go_to_label,
.display = menu_help_section_print,
},""" % (item, page)
.display = menu_print,
},""" % (item, item)
if type == "end":
lastpage = page - 1
......
......@@ -593,6 +593,7 @@ menu_redraw_if_damaged()
BMP_SEM( menus_display( menus, 10, 40 ); )
update_stuff();
update_disp_mode_bits_from_params();
if (is_menu_active(" (i)")) menu_show_version();
}
}
}
......@@ -1129,3 +1130,15 @@ menu_help_go_to_selected_entry(
menu_help_go_to_label(entry->name);
}
void menu_show_version()
{
bmp_printf(FONT_MED, 10, 410,
"Magic Lantern version : %s\n"
"Mercurial changeset : %s\n"
"Built on %s by %s.",
build_version,
build_id,
build_date,
build_user);
}
......@@ -76,34 +76,6 @@ void menu_help_go_to_page(int page)
menu_help_active = 1;
}
void
menu_help_section_print(
void * priv,
int x,
int y,
int selected
) // hack: we don't have direct access to menu entry struct
{
extern struct menu_entry help_menus[];
extern int help_menus_num;
int i;
for (i = 0; i < help_menus_num; i++)
{
if (help_menus[i].priv == priv)
{
bmp_printf(
selected ? MENU_FONT_SEL : MENU_FONT,
x, y,
"%s",
(const char*) help_menus[i].name
);
menu_draw_icon(x, y, MNI_ACTION, 0);
return;
}
}
}
void menu_help_go_to_label(char* label)
{
int page = 1;
......
......@@ -13,61 +13,61 @@ struct menu_entry help_menus[] = {
.name = "About Magic Lantern",
.priv = "About Magic Lantern",
.select = menu_help_go_to_label,
.display = menu_help_section_print,
.display = menu_print,
},
{
.name = "Important notes",
.priv = 4,
.priv = "Important notes",
.select = menu_help_go_to_label,
.display = menu_help_section_print,
.display = menu_print,
},
{
.name = "FAQ",
.priv = 5,
.priv = "FAQ",
.select = menu_help_go_to_label,
.display = menu_help_section_print,
.display = menu_print,
},
{
.name = "Known issues",
.priv = 10,
.priv = "Known issues",
.select = menu_help_go_to_label,
.display = menu_help_section_print,
.display = menu_print,
},
{
.name = "Keyboard shortcuts",
.priv = 11,
.priv = "Keyboard shortcuts",
.select = menu_help_go_to_label,
.display = menu_help_section_print,
.display = menu_print,
},
{
.name = "Magic Lantern menu",
.priv = 15,
.priv = "Magic Lantern menu",
.select = menu_help_go_to_label,
.display = menu_help_section_print,
.display = menu_print,
},
{
.name = "Extra info displays",
.priv = 94,
.priv = "Extra info displays",
.select = menu_help_go_to_label,
.display = menu_help_section_print,
.display = menu_print,
},
{
.name = "Power saving",
.priv = 100,
.priv = "Power saving",
.select = menu_help_go_to_label,
.display = menu_help_section_print,
.display = menu_print,
},
{
.name = "Hidden settings",
.priv = 103,
.priv = "Hidden settings",
.select = menu_help_go_to_label,
.display = menu_help_section_print,
.display = menu_print,
},
{
.name = "Epilogue",
.priv = 104,
.priv = "Epilogue",
.select = menu_help_go_to_label,
.display = menu_help_section_print,
.display = menu_print,
},
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment