Read about our upcoming Code of Conduct on this issue

This instance will be upgraded to Heptapod 0.28.0 on 2022-01-18 at 14:00 UTC+1 (a few minutes of down time)

Commit f125b781 authored by a1ex's avatar a1ex
Browse files

Help menu contents found by label, not by hardcoded page number; make docq for...

Help menu contents found by label, not by hardcoded page number; make docq for building PDF docs only (for preview when editing the docs)

--HG--
branch : unified
parent 318a1752cf8a
......@@ -74,6 +74,10 @@ docs:
cd doc && python mkdoc.py
cd doc && python mkdoc-cam.py
docq:
cd doc && python mkdoc.py
cd doc && python mkdoc-cam.py quick
installdoc:
mkdir $(CF_CARD)/doc || echo "no problem"
mkdir $(CF_CARD)/doc/cam || echo "no problem"
......@@ -101,7 +105,6 @@ magiclantern-$(VERSION).zip: \
doc/INSTALL.pdf \
doc/UserGuide.pdf \
make_bootable.sh\
logo.bmp\
cropmks/* \
doc/cam/* \
......
......@@ -18,8 +18,8 @@ print >> menu, """
struct menu_entry help_menus[] = {
{
.name = "About Magic Lantern",
.priv = 1,
.select = menu_help_go_to_page,
.priv = "About Magic Lantern",
.select = menu_help_go_to_label,
.display = menu_help_section_print,
},"""
......@@ -53,7 +53,7 @@ for l in f[1:]:
print >> menu, """ {
.name = "%s",
.priv = %s,
.select = menu_help_go_to_page,
.select = menu_help_go_to_label,
.display = menu_help_section_print,
},""" % (item, page)
......
......@@ -8,7 +8,7 @@
# Author: Alex Dumitrache <broscutamaker@gmail.com>
# License: GPL
import os, re, time
import os, re, time, sys
import urllib
m = open("MANUAL.txt").readlines();
......@@ -69,7 +69,7 @@ def labelhack(file): # bug in rst2latex? it forgets to place labels in tex sourc
f.write(txt)
f.close()
nonewlineitems = ['Output volume', 'WBShift','Aperture','PictureStyle','Contrast','Focus delay', 'Focus A', 'Rack Focus', 'Hyperfocal', 'DOF', 'Lockup', 'ISO selection', 'Screenshot', 'Spy', 'Save config', 'Delete config', 'Movie REC', 'Movie Restart', 'Zebra when REC', 'Gain', 'AGC', 'Zoom in PLAY']
nonewlineitems = ['Output volume', 'WBShift','Aperture','PictureStyle','Contrast','Focus delay', 'Focus A', 'Rack Focus', 'Hyperfocal', 'DOF', 'Lockup', 'ISO selection', 'Screenshot', 'Spy', 'Save config', 'Delete config', 'Movie REC', 'Movie Restart', 'Zebra when REC', 'Gain', 'AGC', 'Zoom in PLAY', "Swap MENU"]
def should_add_newline(l):
for it in nonewlineitems:
if it in l:
......@@ -129,7 +129,8 @@ os.system("lualatex UserGuide-cam.tex")
#os.system("pdflatex UserGuide-cam.tex")
#os.system("pdflatex UserGuide-cam.tex")
#~ raise SystemExit # from this point it's very slow
if len(sys.argv) > 1:
raise SystemExit # from this point it's very slow
os.system("rm cam/*")
os.system("mkdir cam")
......
......@@ -119,14 +119,13 @@ void menu_help_go_to_label(char* label)
while( read_line(line_buf, sizeof(line_buf) ) >= 0 )
{
char* name = line_buf+4;
//~ bmp_printf(FONT_MED, 0, 0, "'%s' '%s'" , name, label);
//~ msleep(200);
if(!strcmp(name, label))
{
//~ bmp_printf(FONT_MED, 0, 0, "'%s' :) " , name);
//~ msleep(1000);
page = atoi(line_buf);
break;
}
if(!strcmp(name, "end"))
{
help_pages = atoi(line_buf);
}
}
free_dma_memory(config_file_buf);
......
void menu_help_go_to_page(int page);
void menu_help_go_to_label(char* label);
void menu_help_section_print(
void * priv,
int x,
......
......@@ -11,62 +11,62 @@
struct menu_entry help_menus[] = {
{
.name = "About Magic Lantern",
.priv = 1,
.select = menu_help_go_to_page,
.priv = "About Magic Lantern",
.select = menu_help_go_to_label,
.display = menu_help_section_print,
},
{
.name = "Important notes",
.priv = 4,
.select = menu_help_go_to_page,
.select = menu_help_go_to_label,
.display = menu_help_section_print,
},
{
.name = "FAQ",
.priv = 5,
.select = menu_help_go_to_page,
.select = menu_help_go_to_label,
.display = menu_help_section_print,
},
{
.name = "Known issues",
.priv = 10,
.select = menu_help_go_to_page,
.select = menu_help_go_to_label,
.display = menu_help_section_print,
},
{
.name = "Keyboard shortcuts",
.priv = 11,
.select = menu_help_go_to_page,
.select = menu_help_go_to_label,
.display = menu_help_section_print,
},
{
.name = "Menu options",
.name = "Magic Lantern menu",
.priv = 15,
.select = menu_help_go_to_page,
.select = menu_help_go_to_label,
.display = menu_help_section_print,
},
{
.name = "Extra info displays",
.priv = 90,
.select = menu_help_go_to_page,
.priv = 94,
.select = menu_help_go_to_label,
.display = menu_help_section_print,
},
{
.name = "Power saving",
.priv = 96,
.select = menu_help_go_to_page,
.priv = 100,
.select = menu_help_go_to_label,
.display = menu_help_section_print,
},
{
.name = "Hidden settings",
.priv = 99,
.select = menu_help_go_to_page,
.priv = 103,
.select = menu_help_go_to_label,
.display = menu_help_section_print,
},
{
.name = "Epilogue",
.priv = 100,
.select = menu_help_go_to_page,
.priv = 104,
.select = menu_help_go_to_label,
.display = menu_help_section_print,
},
};
......@@ -79,7 +79,7 @@ help_menu_init( void* unused )
INIT_FUNC( "help_menu", help_menu_init );
int help_pages = 100;
int help_pages = 104;
int help_menus_num = 10;
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