On 07 April, 2014 - Willem Ferguson wrote: > Recently I submitted a patch with updates to the user manual. Included in > that was a section dealing with the dive planner. It now appears that the > visibility of the planner was just a glitch and that V4.1 will not have the > planner. > > I suggest push that patch to the manual. > > I have several small changes to be made to the manual, reflected in > discussions on this message board. I will submit an additional patch that > will, amongst others, remove the text for the planner. (Anton and Robert, I > will not throw away that text so we will have the option to use it as a > basis for documentation later on). > > Is this solution workable? >
A did a quick glance at the asciidoc documentation, and found support for macros there, so i wiped a quick patch on top of your planner documentation to control if the planner should be in the manual or not. The patch is attached, so then we can continue to develop both the planner and its manual, without releasing it. //Anton -- Anton Lundin +46702-161604
>From e220243a69b11b84c356b10508a8a76d271dc654 Mon Sep 17 00:00:00 2001 From: Anton Lundin <[email protected]> Date: Mon, 7 Apr 2014 11:37:45 +0200 Subject: [PATCH] Use the ENABLE_PLANNER macro in the manual too This introduces ifdef control structures in the manual too, so we can continue to develop both the planner and its manual, until its ready for release. Signed-off-by: Anton Lundin <[email protected]> --- Documentation/Makefile | 5 +++-- Documentation/user-manual.txt | 4 ++++ subsurface.pro | 15 +++++++++------ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index 204aeb8..bd5b89c 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -15,6 +15,7 @@ A2X = a2x BROWSER = firefox THEME = compact_subsurface PWD = $(realpath .) +ENABLE_PLANNER := 0 all: doc $(addprefix $(DOCNAME).,pdf text) @@ -29,11 +30,11 @@ $(OUT)$(DOCNAME).pdf: $(DOCSOURCE) $(OUT)$(HTMLDOC): $(DOCSOURCE) @echo "if asciidoc isn't found the html file included in the sources is copied" $(ASCIIDOC) -a toc -a toclevels=3 -a themedir=$(PWD) -a theme=$(THEME) -a stylesdir=$(PWD) \ - -o $(OUT)$(HTMLDOC) $< || cp $(HTMLDOC).git $(OUT)$(HTMLDOC) + -a ENABLE_PLANNER=$(ENABLE_PLANNER) -o $(OUT)$(HTMLDOC) $< || cp $(HTMLDOC).git $(OUT)$(HTMLDOC) # Alternatively:: $(OUT)$(DOCNAME).xhtml: $(DOCSOURCE) - $(A2X) --icons -f xhtml $< + $(A2X) -a ENABLE_PLANNER=$(PLANNER) --icons -f xhtml $< show: $(HTMLDOC) $(BROWSER) $< diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index 0bac14f..8a80206 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -1775,6 +1775,7 @@ language / country settings as the underlying OS. If this is for some reason undesirable users can uncheck this checkbox and pick a language / country combination from the list of included localizations. +ifdef::ENABLE_PLANNER[] [[S_DivePlanner]] == The Subsurface dive planner The dive planner is accessed by selecting _Log -> Plan Dive_ from the main menu. This @@ -1868,6 +1869,7 @@ there is no provision for any reserve gas. image::images/Planner2.jpg["FIGURE: Planning a dive: evaluation",align="center"] This part of the software is in active development. +endif::ENABLE_PLANNER[] == Description of the Subsurface Main Menu items @@ -1906,7 +1908,9 @@ from _www.Divelogs.de_. - <<S_EnterData,_Add Dive_>> - Manually add a new dive to the *Dive List* panel. - <<S_Renumber,_Renumber_>> - Renumber the dives listed in the *Dive List* panel. +ifdef::ENABLE_PLANNER[] -_Plan Dive_ - This experimental feature allows planning of simple dives. +endif::ENABLE_PLANNER[] - <<S_Group,_Auto Group_>> - Group the dives in the *Dive List* panel into dive trips. - _Edit Device Names_ - Edit the names of dive computers. diff --git a/subsurface.pro b/subsurface.pro index 6d13c1d..2eaed32 100644 --- a/subsurface.pro +++ b/subsurface.pro @@ -15,6 +15,11 @@ else: TARGET = subsurface VERSION = 4.0.2 +# enable or disable the dive planner +planner { + DEFINES += ENABLE_PLANNER +} + HEADERS = \ color.h \ deco.h \ @@ -226,7 +231,10 @@ QTTRANSLATIONS = \ qt_sv.qm \ qt_zh_TW.qm -doc.commands += $(CHK_DIR_EXISTS) $$OUT_PWD/Documentation || $(MKDIR) $$OUT_PWD/Documentation $$escape_expand(\\n\\t)$(MAKE) -C $$PWD/Documentation OUT=$$OUT_PWD/Documentation/ doc +# Should we enable the planner sections in the manual? +planner: ENABLE_PLANNER=1 +else: ENABLE_PLANNER=0 +doc.commands += $(CHK_DIR_EXISTS) $$OUT_PWD/Documentation || $(MKDIR) $$OUT_PWD/Documentation $$escape_expand(\\n\\t)$(MAKE) -C $$PWD/Documentation OUT=$$OUT_PWD/Documentation/ ENABLE_PLANNER=$$ENABLE_PLANNER doc all.depends += doc QMAKE_EXTRA_TARGETS += doc all @@ -267,10 +275,5 @@ QMAKE_INFO_PLIST = packaging/macosx/Info.plist.in OTHER_FILES += $$DESKTOPFILE $$ICON $$MANPAGE $$XSLT_FILES $$DOC_FILES $$MARBLEDIR \ $$QMAKE_INFO_PLIST -# enable or disable the dive planner -planner { - DEFINES += ENABLE_PLANNER -} - include(subsurface-gen-version.pri) include(subsurface-install.pri) -- 1.9.1
_______________________________________________ subsurface mailing list [email protected] http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
