Enable the dive planning under a compile flag

Allow subsurface to show the dive planner in case a compile flag is given.

qmake CONFIG+=planner

Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Danilo Cesar Lemes de Paula 2014-02-07 00:14:47 -02:00 committed by Dirk Hohndel
parent 772c9fb0b1
commit 31c45b8c4c
3 changed files with 10 additions and 0 deletions

View file

@ -73,6 +73,10 @@ MainWindow::MainWindow() : QMainWindow(),
ui.ListWidget->scrollTo(ui.ListWidget->model()->index(0,0), QAbstractItemView::PositionAtCenter);
ui.divePlanner->settingsChanged();
ui.divePlannerWidget->settingsChanged();
#ifndef ENABLE_PLANNER
ui.menuLog->removeAction(ui.actionDivePlanner);
#endif
}
// this gets called after we download dives from a divecomputer

View file

@ -614,6 +614,7 @@
<string>&amp;Log</string>
</property>
<addaction name="actionAddDive"/>
<addaction name="actionDivePlanner"/>
<addaction name="separator"/>
<addaction name="actionRenumber"/>
<addaction name="actionAutoGroup"/>

View file

@ -233,5 +233,10 @@ 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)