summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Configure.mk10
-rw-r--r--README2
-rw-r--r--Rules.mk10
-rw-r--r--libdivecomputer.h8
-rw-r--r--qt-ui/diveplanner.cpp10
-rw-r--r--qt-ui/diveplanner.ui2
-rw-r--r--uemis.h8
7 files changed, 31 insertions, 19 deletions
diff --git a/Configure.mk b/Configure.mk
index 3ecde6a9d..9e9a2ba0e 100644
--- a/Configure.mk
+++ b/Configure.mk
@@ -34,6 +34,10 @@ ifeq ($(CC), i686-w64-mingw32-gcc)
else ifeq ($(UNAME), darwin)
LIBDIVECOMPUTERINCLUDES = $(shell $(PKGCONFIG) --cflags libdivecomputer)
LIBDIVECOMPUTERARCHIVE = $(shell $(PKGCONFIG) --libs libdivecomputer)
+else ifneq ($(LIBDCDEVEL),)
+ LIBDIVECOMPUTERDIR = ../libdivecomputer
+ LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include
+ LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/src/.libs/libdivecomputer.a
else ifeq ($(shell $(PKGCONFIG) --exists libdivecomputer; echo $$?),0)
LIBDIVECOMPUTERINCLUDES = $(shell $(PKGCONFIG) --cflags libdivecomputer)
LIBDIVECOMPUTERARCHIVE = $(shell $(PKGCONFIG) --libs libdivecomputer)
@@ -43,11 +47,7 @@ libdc-local64 := $(wildcard /usr/local/lib64/libdivecomputer.a)
libdc-usr := $(wildcard /usr/lib/libdivecomputer.a)
libdc-usr64 := $(wildcard /usr/lib64/libdivecomputer.a)
-ifneq ($(LIBDCDEVEL),)
- LIBDIVECOMPUTERDIR = ../libdivecomputer
- LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include
- LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/src/.libs/libdivecomputer.a
-else ifneq ($(strip $(libdc-local)),)
+ifneq ($(strip $(libdc-local)),)
LIBDIVECOMPUTERDIR = /usr/local
LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include
LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a
diff --git a/README b/README
index 0dbe8933e..936910846 100644
--- a/README
+++ b/README
@@ -118,7 +118,7 @@ Check with your Linux distribution how to install these packages.
On Debian the package names are different; try libxml2-dev,
libgtk2.0-dev, libglib2.0-dev, libgconf2-dev, libsoup2.4-dev,
libosmgpsmap-dev, libsqlite3-dev, libxslt1-dev, libzip-dev,
-zlib1g-dev.
+zlib1g-dev (and libusb-1.0-0-dev if libdivecomputer is built with it).
Note that contrary to earlier versions of Subsurface, starting in v3.1
XSLT, LIBZIP and OSMGPSMAP are no longer optional but instead are
diff --git a/Rules.mk b/Rules.mk
index bab6752eb..7f30a84dd 100644
--- a/Rules.mk
+++ b/Rules.mk
@@ -48,7 +48,7 @@ CREATOR_FILES = $(NAME).config $(NAME).creator $(NAME).files $(NAME).includes
all: $(TARGET) doc
-$(TARGET): gen_version_file $(ALL_OBJS) $(INFOPLIST)
+$(TARGET): gen_version_file $(UIC_HEADERS) $(ALL_OBJS) $(INFOPLIST)
@$(PRETTYECHO) ' LINK' $(TARGET)
$(COMPILE_PREFIX)$(CXX) $(LDFLAGS) -o $(TARGET) $(ALL_OBJS) $(LIBS)
@@ -215,8 +215,12 @@ ui_%.h: %.ui .uic
@mkdir -p .uic/qt-ui
$(COMPILE_PREFIX)$(UIC) $< -o .uic/$@
-.uic:
- $(COMPILE_PREFIX)mkdir $@
+# This forces the creation of ui headers with the wrong path
+# This is required because the -MG option to the compiler outputs
+# unknown files with no path prefix
+ui_%.h: qt-ui/%.ui
+ @$(PRETTYECHO) ' UIC' $<
+ $(COMPILE_PREFIX)$(UIC) $< -o qt-ui/$@
share/locale/%.UTF-8/LC_MESSAGES/$(NAME).mo: po/%.po po/%.aliases
@$(PRETTYECHO) ' MSGFMT' $*.po
diff --git a/libdivecomputer.h b/libdivecomputer.h
index d1673f4d9..39fd80909 100644
--- a/libdivecomputer.h
+++ b/libdivecomputer.h
@@ -2,10 +2,6 @@
#define LIBDIVECOMPUTER_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* libdivecomputer */
#include <libdivecomputer/version.h>
#include <libdivecomputer/device.h>
@@ -14,6 +10,10 @@ extern "C" {
/* handling uemis Zurich SDA files */
#include "uemis.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* don't forget to include the UI toolkit specific display-XXX.h first
to get the definition of progressbar_t */
typedef struct device_data_t {
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index e1dcc3d9e..452d1c848 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -1150,11 +1150,11 @@ struct diveplan DivePlannerPointsModel::getDiveplan()
void DivePlannerPointsModel::cancelPlan()
{
if (mode == PLAN && rowCount()) {
- if (QMessageBox::warning(mainWindow(), tr("Save the Plan?"),
- tr("You have a working plan, \n are you sure that you wanna cancel it?"),
- QMessageBox::Ok | QMessageBox::Cancel) != QMessageBox::Ok) {
- return;
- }
+ if (QMessageBox::warning(mainWindow(), tr("Discard the Plan?"),
+ tr("You are about to discard your plan."),
+ QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard) != QMessageBox::Discard) {
+ return;
+ }
}
beginRemoveRows(QModelIndex(), 0, rowCount()-1);
diff --git a/qt-ui/diveplanner.ui b/qt-ui/diveplanner.ui
index 462c26e48..5c2f1ef69 100644
--- a/qt-ui/diveplanner.ui
+++ b/qt-ui/diveplanner.ui
@@ -128,7 +128,7 @@
<item row="8" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ <set>QDialogButtonBox::Abort|QDialogButtonBox::Save</set>
</property>
</widget>
</item>
diff --git a/uemis.h b/uemis.h
index f8489f5c3..66a2b9153 100644
--- a/uemis.h
+++ b/uemis.h
@@ -8,6 +8,10 @@
#include <stdint.h>
#include "dive.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void uemis_parse_divelog_binary(char *base64, void *divep);
int uemis_get_weight_unit(int diveid);
void uemis_mark_divelocation(int diveid, int divespot, char **location, degrees_t *longitude, degrees_t *latitude);
@@ -41,4 +45,8 @@ typedef struct {
uint8_t flags[8];
} __attribute((packed)) uemis_sample_t;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* UEMIS_H */