From 02eb16aec5c1189b1b4c2c35e7a493e9269b09e6 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sat, 31 Dec 2016 09:52:46 +0200 Subject: XSLT to parse AV1 log file Support for importing the dive profile from Underwater Technologies AV1 dive computer export. Signed-off-by: Miika Turkia --- xslt/av1.xslt | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 xslt/av1.xslt diff --git a/xslt/av1.xslt b/xslt/av1.xslt new file mode 100644 index 000000000..e5f73fa88 --- /dev/null +++ b/xslt/av1.xslt @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3-70-g09d2 From e94d49668ef9e216e1fff0de8ce9303b55c67c35 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sat, 31 Dec 2016 09:56:08 +0200 Subject: Hooking up av1.xslt for log import Signed-off-by: Miika Turkia --- core/parse-xml.c | 1 + desktop-widgets/divelogimportdialog.cpp | 5 ++++- desktop-widgets/divelogimportdialog.h | 2 +- subsurface.qrc | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core/parse-xml.c b/core/parse-xml.c index aa2e7125f..44cfece57 100644 --- a/core/parse-xml.c +++ b/core/parse-xml.c @@ -3738,6 +3738,7 @@ static struct xslt_files { { "SubsurfaceCSV", "subsurfacecsv.xslt", NULL }, { "manualcsv", "manualcsv2xml.xslt", NULL }, { "logbook", "DiveLog.xslt", NULL }, + { "AV1", "av1.xslt", NULL }, { NULL, } }; diff --git a/desktop-widgets/divelogimportdialog.cpp b/desktop-widgets/divelogimportdialog.cpp index c65f89982..2c87c1188 100644 --- a/desktop-widgets/divelogimportdialog.cpp +++ b/desktop-widgets/divelogimportdialog.cpp @@ -23,6 +23,7 @@ const DiveLogImportDialog::CSVAppConfig DiveLogImportDialog::CSVApps[CSVAPPS] = { "SensusCSV", 9, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "," }, { "Seabear CSV", 0, 1, 5, -1, -1, -1, -1, -1, 2, 3, 4, 6, -1, ";" }, { "SubsurfaceCSV", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "Tab" }, + { "AV1", 0, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, " " }, { NULL, SILENCE_WARNING } }; @@ -34,7 +35,8 @@ enum Known { XP5, SENSUS, SEABEAR, - SUBSURFACE + SUBSURFACE, + AV1 }; ColumnNameProvider::ColumnNameProvider(QObject *parent) : QAbstractListModel(parent) @@ -348,6 +350,7 @@ DiveLogImportDialog::DiveLogImportDialog(QStringList fn, QWidget *parent) : QDia specialCSV << SENSUS; specialCSV << SUBSURFACE; specialCSV << DL7; + specialCSV << AV1; for (int i = 0; !CSVApps[i].name.isNull(); ++i) ui->knownImports->addItem(CSVApps[i].name); diff --git a/desktop-widgets/divelogimportdialog.h b/desktop-widgets/divelogimportdialog.h index 8c752844d..734cc7df3 100644 --- a/desktop-widgets/divelogimportdialog.h +++ b/desktop-widgets/divelogimportdialog.h @@ -118,7 +118,7 @@ private: QString separator; }; -#define CSVAPPS 9 +#define CSVAPPS 10 static const CSVAppConfig CSVApps[CSVAPPS]; }; diff --git a/subsurface.qrc b/subsurface.qrc index dc73ad454..1a48bfc79 100644 --- a/subsurface.qrc +++ b/subsurface.qrc @@ -46,6 +46,7 @@ xslt/manualcsv2xml.xslt xslt/shearwater.xslt xslt/DiveLog.xslt + xslt/av1.xslt icons/gas.png icons/mod.png icons/he.png -- cgit v1.2.3-70-g09d2 From af65e6be0facac661ba1748e0ebee867761e5690 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 31 Dec 2016 20:34:54 -0800 Subject: Fix MacOS make-package script We need the full path to the local libssh in order to replace it with the correct path. Signed-off-by: Dirk Hohndel --- packaging/macosx/make-package.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packaging/macosx/make-package.sh b/packaging/macosx/make-package.sh index 6504e8ccd..6ff1d4cf0 100755 --- a/packaging/macosx/make-package.sh +++ b/packaging/macosx/make-package.sh @@ -32,7 +32,8 @@ for i in libssh libssrfmarblewidget libgit2 libGrantlee_TextDocument.dylib libGr LIBSSH=$(basename ${OLD}) fi if [[ "$i" = "libgit2" && ! -z ${LIBSSH} ]] ; then - install_name_tool -change ${LIBSSH} @executable_path/../Frameworks/${LIBSSH} Subsurface.app/Contents/Frameworks/${SONAME} + CURLIBSSH=$(otool -L Subsurface.app/Contents/Frameworks/${SONAME} | grep libssh | cut -d\ -f1 | tr -d "\t") + install_name_tool -change ${CURLIBSSH} @executable_path/../Frameworks/${LIBSSH} Subsurface.app/Contents/Frameworks/${SONAME} fi fi done -- cgit v1.2.3-70-g09d2 From 004f68083877dc4a49e7322610e08111d6b859b1 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 31 Dec 2016 20:37:05 -0800 Subject: build.sh: use a more current version of libgit2 Signed-off-by: Dirk Hohndel --- scripts/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index 404ae1100..35ad3a3ec 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -87,7 +87,7 @@ fi cd libgit2 # let's build with a recent enough version of master for the latest features git fetch origin -if ! git checkout v0.23.1 ; then +if ! git checkout v0.24.5 ; then echo "Can't find the right tag in libgit2 - giving up" exit 1 fi -- cgit v1.2.3-70-g09d2 From 76dfcdc14c0e3abf540d556ea1cf3b19add66a5f Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 31 Dec 2016 21:17:02 -0800 Subject: Mac build: hack to get the correct std C++ lib on Lion Signed-off-by: Dirk Hohndel --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 991eabaf5..cfeee5b74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,7 +69,11 @@ set(CMAKE_MODULE_PATH # if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND ${CMAKE_SYSTEM_VERSION} MATCHES "11.4.") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + endif() elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") -- cgit v1.2.3-70-g09d2 From 888967988439c2d7f115d8818e96aaa916283c9b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 31 Dec 2016 21:17:20 -0800 Subject: Mac: more generous margins for table columns Fixes #974 Fixes #873 Signed-off-by: Dirk Hohndel --- desktop-widgets/tableview.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/desktop-widgets/tableview.cpp b/desktop-widgets/tableview.cpp index 20b62ac3c..3e9bb129e 100644 --- a/desktop-widgets/tableview.cpp +++ b/desktop-widgets/tableview.cpp @@ -135,8 +135,13 @@ void TableView::edit(const QModelIndex &index) int TableView::defaultColumnWidth(int col) { + int width; QString text = ui.tableView->model()->headerData(col, Qt::Horizontal).toString(); - return text.isEmpty() ? metrics.rm_col_width : defaultModelFontMetrics().width(text) + 4; // add small margin + width = text.isEmpty() ? metrics.rm_col_width : defaultModelFontMetrics().width(text) + 4; // add small margin +#if defined(Q_OS_MAC) + width += 10; // Mac needs more margin +#endif + return width; } QTableView *TableView::view() -- cgit v1.2.3-70-g09d2 From 3005d51450be3f11699efb8a7ffc75de3f12d25a Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 31 Dec 2016 21:33:36 -0800 Subject: Mac build: make std C++ lib hack catch more situations Signed-off-by: Dirk Hohndel --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cfeee5b74..30ed16d90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,7 +69,8 @@ set(CMAKE_MODULE_PATH # if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ") - if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND ${CMAKE_SYSTEM_VERSION} MATCHES "11.4.") + if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND + (${CMAKE_SYSTEM_VERSION} MATCHES "11.4." OR ${CMAKE_OSX_DEPLOYMENT_TARGET} MATCHES "10.7" OR ${CMAKE_OSX_DEPLOYMENT_TARGET} MATCHES "10.8")) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") -- cgit v1.2.3-70-g09d2