please test Facebook integration

2015-01-30 Thread Dirk Hohndel
I have pushed a few patches that make Facebook integration work for me.
This may not be the pinnacle of amazing UI design, but it's much better
than what was there.

As I mentioned in my earlier post, I still think we may want to protect
this with a pin, but at least for a beta version this should be good
enough.

Given that I decided to add this really late in the proecss (or given that
Facebook dragged their feet for more than four weeks with approving our
access), I'm quite nervous about this feature. It clearly is something
that a TON of people asked for... So I want to have it in 4.4.

Please test.

Really. I mean YOU. Yes, YOU. I'm not talking about the other 200+ people
on this mailing list, 150 of whom haven't even tested the latest beta or
any dailies since the beta. I'm talking about you. Really.

Yeah right. Why do I bother.

Anyway. It's in master. Dailies are building right now. I'm going to bed.

/D
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH] Include iPhone companion app to user survey

2015-01-30 Thread Dirk Hohndel
I agree. This creates yet another new string.

/D

On Sat, Jan 31, 2015 at 08:05:50AM +0200, Miika Turkia wrote:
> We should mention the iPhone companion app either alongside the Android
> app or at its own line if more precise information is wanted. I suppose
> this text change should be enough as we should get more precise
> statistics of usage of these apps from the server logs.
> 
> Signed-off-by: Miika Turkia 
> ---
>  qt-ui/usersurvey.ui | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/qt-ui/usersurvey.ui b/qt-ui/usersurvey.ui
> index 15dea78..c118fe8 100644
> --- a/qt-ui/usersurvey.ui
> +++ b/qt-ui/usersurvey.ui
> @@ -138,7 +138,7 @@
>  
> 
> 
> -Android companion app
> +   Android/iPhone companion app
> 
>
>
> -- 
> 1.9.1
> 
> ___
> subsurface mailing list
> subsurface@subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH] Include iPhone companion app to user survey

2015-01-30 Thread Miika Turkia
We should mention the iPhone companion app either alongside the Android
app or at its own line if more precise information is wanted. I suppose
this text change should be enough as we should get more precise
statistics of usage of these apps from the server logs.

Signed-off-by: Miika Turkia 
---
 qt-ui/usersurvey.ui | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-ui/usersurvey.ui b/qt-ui/usersurvey.ui
index 15dea78..c118fe8 100644
--- a/qt-ui/usersurvey.ui
+++ b/qt-ui/usersurvey.ui
@@ -138,7 +138,7 @@
 


-Android companion app
+   Android/iPhone companion app

   
   
-- 
1.9.1

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


change in plans re: 4.4

2015-01-30 Thread Dirk Hohndel
Just a quick heads up. Those of you who followed this cycle will remember
that my initial reason for trying to get 4.4 out fairly quickly was to add
Facebook support to Subsurface. And as luck would have it, this afternoon
our post access to Facebook was approved.

So my tentative plan is now to release another Beta this weekend with
Facebook support enabled. I'm afraid this might add a string or two and of
course this will require a quick chapter in the user manual - but I think
this is worth it.

I'll push some changes that enable Facebook support on Qt5 builds by
default and try to wrestle with the user experience a tiny bit - Tomaz and
I stopped worrying about this when we didn't get anything back from
Facebook for nearly a month... in hindsight that was a mistake.

It would be great if people could test posting to Facebook and report any
issues they run into. Using this is fairly straight forward.

1) in the preferences, connect Subsurface to your FB account
2) an 'f' icon will show up next to the notes
3) click the 'f' and you'll see a dialog that allows you to post to FB

Willem - Tomaz will add a couple small changes to this, so don't do
screenshots just yet. We'll ask the user for a PIN in step 1 and have them
enter that PIN in step 3. The reason is that we don't want other
applications to be able to read the FB token in clear text from our
settings and abuse that to post to the users time line without their
knowledge...

/D
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Compilation error with latest master

2015-01-30 Thread Thiago Macieira
On Friday 30 January 2015 19:29:25 Cristian Ionescu-Idbohrn wrote:
> On Fri, 30 Jan 2015, Pedro Neves wrote:
> > In file included from /usr/include/libxml2/libxml/parser.h:810:0,
> >  from /usr/include/libxml2/libxml/globals.h:18,
> >  from /usr/include/libxml2/libxml/threads.h:35,
> >  from /usr/include/libxml2/libxml/xmlmemory.h:218,
> >  from /usr/include/libxml2/libxml/tree.h:1306,
> >  from dive.h:37,
> >  from qt-gui.cpp:12:
>
> That seems to be comming from package:
> 
>   libicu-dev: /usr/include/x86_64-linux-gnu/unicode/ucnv.h
> 
> Yet another dependency?

Not directly. This is not our doing.

Note that dive.h includes libxml/tree.h.

The distribution made libxml2 depend on ICU, so they should have triggered a 
required installation of ICU headers when you installed libxml2's headers. 
Given other emails in this thread, looks like Debian does have the link, so 
check if you somehow bypassed the automatic dependency requirements.
-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
  PGP/GPG: 0x6EF45358; fingerprint:
  E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH] Don't go to edit mode if the dive notes field didn't change.

2015-01-30 Thread Dirk Hohndel
On Fri, Jan 30, 2015 at 11:01:06PM +0200, Gehad Elrobey wrote:
> I forgot to check for the empty value in the two conditions, patch
> re-attached.

Actually, we have our own beautiful same_string() function that does the
sane thing when comparing NULL and "" (they are the same). Let's use that
instead...
I'll update your patch, no need to resend.

/D
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH] Export the XSLT based exports in a new Thread.

2015-01-30 Thread Dirk Hohndel
On Fri, Jan 30, 2015 at 10:45:28PM +0200, Gehad Elrobey wrote:
> libxml2 consumes the main thread time while formatting the xml document. So
> I attached a patch that calls the export function in a new thread.
> 
> Now I am working on adding the progress bar functionality #785, but still
> can't interface with libxml2.

What happens if the user quits after the export (but before the export is
finished)?

/D

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: iPhone companion app

2015-01-30 Thread Yosef Hamza
I used couple of weeks ago.

There's some bugs I wanted to fix but totally forgot I will work on them
tomorrow "hopefully"

1_ The apps drains battery like CRAZY!
It's working invisibly and GPS consume some good battery power, O noticed
it the first day I installed the app to try it and the next day I though my
phone battery was broken somehow till I found that the app was running and
recording dives

Proposed solution: good iPhone apps I used that uses battery in similar
fashion it sends reminder local notification to the user reminding him that
the app is running, so solution: Local notification to remind users


2_ The app UI never responds when login without internet connection, move
to dives table but freezes

3_ That's an enhancement actually, but It only record dives when in
'water', recording dives on my way to college was kinda funny

Last but no least I was wondering If you are interested in more features in
that app than it's current functionality

~Yousef

On Fri Jan 30 2015 at 8:23:57 PM Jason Bramwell  wrote:

>
> > On 30 Jan 2015, at 17:35, Dirk Hohndel  wrote:
> >
> >> On Fri, Jan 30, 2015 at 06:57:25PM +0200, Miika Turkia wrote:
> >> Yep, I got the location to a manually added dive in Subsurface itself.
> >>
> >> If the user ID is correct on both sides, then the only thing I can
> think of
> >> causing trouble is the time sync.
> >
> > I think the biggest problem is that many people appear to assume that a
> > "dive" that was added on the companion app will CREATE a dive in
> > Subsurface.
> >
> > But that is NOT how it works. All the companion app does is add GPS
> > location (and, potentially, a dive site name) to EXISTING dives in
> > Subsurface.
> >
> > This apparently isn't communicated clearly enough.
> >
> > /D
>
> That was my problem I suspect. I was expecting a blank dive to pop up with
> the new locations gps/name.
>
> Jason
> >
> >>> On Fri, Jan 30, 2015 at 6:46 PM, JB2Cool  wrote:
> >>>
> >>> You are seeing this 'dive' from within Subsurface itself?
> >>>
> >>> On Fri, Jan 30, 2015 at 4:27 PM, Miika Turkia 
> >>> wrote:
> >>>
>  I just tested this out and got the location to be added to a "dive" on
>  Subsurface. So it appears to be working. At one point I had an extra
> space
>  on the ID and that prevented it from working, but fixing that got me
> going.
> 
>  miika
> 
> 
> > On Fri, Jan 30, 2015 at 6:24 PM, JB2Cool  wrote:
> >
> > I've tried using it but never seemed to make it do much, perhaps i'm
> > trying to use it incorrectly. I can manually add a dive and it picks
> up my
> > GPS coordinates and i can give it a name it but i never seem to be
> able to
> > pick up this dive from within Subsurface. I have checked that i have
> the
> > same ID plugged in at both ends.
> >
> > Jason
> >
> >> On Fri, Jan 30, 2015 at 3:21 PM, Dirk Hohndel 
> wrote:
> >>
> >> We've had an iPhone companion app since last summer (Andrey created
> it
> >> as
> >> part of GSoC). I just realized (after a post to our user forum)
> that we
> >> don't mention it anywhere in the docs.
> >>
> >> Are there any iPhone users here (sorry, I'm an Android person)? Can
> >> someone confirm that the app works and write a few lines on how to
> >> install
> >> it so we can add this to the manual?
> >>
> >> Thanks
> >>
> >> /D
> >> ___
> >> subsurface mailing list
> >> subsurface@subsurface-divelog.org
> >> http://lists.subsurface-divelog.org/cgi-bin/mailman/
> listinfo/subsurface
> >
> >
> > ___
> > subsurface mailing list
> > subsurface@subsurface-divelog.org
> > http://lists.subsurface-divelog.org/cgi-bin/mailman/
> listinfo/subsurface
> >>>
> >>> ___
> >>> subsurface mailing list
> >>> subsurface@subsurface-divelog.org
> >>> http://lists.subsurface-divelog.org/cgi-bin/mailman/
> listinfo/subsurface
> >
> >> ___
> >> subsurface mailing list
> >> subsurface@subsurface-divelog.org
> >> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
> >
> ___
> subsurface mailing list
> subsurface@subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH] qmake: use a dedicated build script to generate ssrf-version.h

2015-01-30 Thread Cristian Ionescu-Idbohrn
On Fri, 30 Jan 2015, Lubomir I. Ivanov wrote:

I'll just nitpick on this one:

> diff --git a/scripts/write-version b/scripts/write-version
> new file mode 100644
> index 000..42505ae
> --- /dev/null
> +++ b/scripts/write-version
> @@ -0,0 +1,61 @@
> +#!/bin/sh

Try this same thing with adding:

set -eu
#set -x #xtrace

> +#
> +# arguments:
> +#$1 - target H file
> +#$2 - fallback version string
> +#$3 - os name {linux|darwin|win}
> +#
> +# !!! has no error checking ATM !!!
> +# should be started from where .git is!
> +#
> +
> +# set OS and TARGET

Any of these may fail in absence of

[ $# -eq 3 ] || {
echo "ERROR: missing argument(s)"   # alternative, usage message
exit 1
}

> +TARGET=$1
> +TARGET_TEMP=$TARGET.tmp
> +VERSION=$2
> +OS=$3
> +
> +# check if git is installed
> +GIT_ERROR=1

This is, AFAIK, not portable:

> +HAS_GIT=`git --version 2> NUL`
 ^^^
I'd write this:

> +if [ "$HAS_GIT" ]; then

as:

if HAS_GIT=$(git --version 2>/dev/null) && [ "$HAS_GIT" ]; then

Backticks are considered deprecated.

> + # check if .git exists
> + if [ -d ".git" ]; then
^^
Quotes are useless in that context.

> + FULL_VER=`sh ./scripts/get-version linux`
> + GIT_ERROR=0
> + else
> + echo "WARNING: not a git repository"
> + fi
> +else
> + echo "WARNING: git command not found"
> +fi
> +
> +#if there was an error, fallback to .gitversion or use the dummy version
> +if [ "$GIT_ERROR" == "1" ]; then
 ^^ ^ ^
'==' is a bashism and quotes are useless.

> + if [ -f .gitversion ]; then
 ^^
Existence of that regular file and readabylity of the same is not
realy the same thing.

> + FULL_VER=`cat .gitversion`

read FULL_VER <.gitversion

is more efficient.

> + else
> + FULL_VER=$VERSION
> + fi
> +fi
> +
> +# grab some strings from get-version

Both these:

> +CANONICAL_VER=`sh ./scripts/get-version full $FULL_VER`
> +OS_USABLE_VER=`sh ./scripts/get-version $OS $FULL_VER`

lack error handling, and deprecated backticks apply.

> +
> +# write to a temp file

Error handling (I know, this is really paranoic, but):

> +echo "#define VERSION_STRING \"$OS_USABLE_VER\"" > $TARGET_TEMP
> +echo "#define GIT_VERSION_STRING \"$FULL_VER\"" >> $TARGET_TEMP
> +echo "#define CANONICAL_VERSION_STRING \"$CANONICAL_VER\"" >> $TARGET_TEMP

that won't work if you happen to not have write permissions.

> +
> +# if the target file is missing create it
> +if [ ! -f $TARGET ]; then

or [ ! -w $TARGET ] ?

and more backticks:

> + CMD=`touch $TARGET`
> +fi
> +
> +# if the temp file and the target file differ, replace the target file with 
> the temp file
> +CMD=`diff -q $TARGET $TARGET_TEMP || cp $TARGET_TEMP $TARGET`
> +
> +# remove the temp file
> +CMD=`rm -f $TARGET_TEMP`


Cheers,

-- 
Cristian
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Compilation error with latest master

2015-01-30 Thread Cristian Ionescu-Idbohrn
On Fri, 30 Jan 2015, Dirk Hohndel wrote:
> On Fri, Jan 30, 2015 at 06:21:45PM +, Pedro Neves wrote:
> > Hi all:
> >
> > I'm trying to compile the latest subsurface master on my system (Debian/Sid)
> > and I'm getting the following error.
> > I've just recently installed my OS on this PC and I'm not sure if I'm
> > missing any package:
> >
> >
> > compiling qt-ui/completionmodels.cpp
> > In file included from /usr/include/libxml2/libxml/parser.h:810:0,
> >  from /usr/include/libxml2/libxml/globals.h:18,
> >  from /usr/include/libxml2/libxml/threads.h:35,
> >  from /usr/include/libxml2/libxml/xmlmemory.h:218,
> >  from /usr/include/libxml2/libxml/tree.h:1306,
> >  from dive.h:37,
> >  from qt-gui.cpp:12:
> > /usr/include/libxml2/libxml/encoding.h:31:26: fatal error: unicode/ucnv.h:
> > No such file or directory
> >  #include 
>
> $ dpkg -S /usr/include/x86_64-linux-gnu/unicode/ucnv.h
> libicu-dev:amd64: /usr/include/x86_64-linux-gnu/unicode/ucnv.h
>
> I didn't install this explicitly, so this is implicitly pulled in by one
> of the dependencies of the packages that I DO explicitly require for a
> build on Debian / Ubuntu...

And that may very well be a package dependency problem, as AFAICT:

Package: libxml2-dev
Depends: libxml2

only.


Cheers,

-- 
Cristian
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH] Don't go to edit mode if the dive notes field didn't change.

2015-01-30 Thread Gehad Elrobey
I forgot to check for the empty value in the two conditions, patch
re-attached.

Regards,
Gehad

On Fri, Jan 30, 2015 at 10:47 PM, Miika Turkia 
wrote:

> On Fri, Jan 30, 2015 at 10:40 PM, Gehad Elrobey 
> wrote:
>
>> The main-tab view is inconsistent as mentioned in #804, this patch fixes
>> the notes view.
>>
>
> I get crashes when applying this patch. This occurs when I attempt to
> write to the notes field or focus leaves it.
>
> Program received signal SIGSEGV, Segmentation fault.
> __strcmp_ssse3 () at ../sysdeps/x86_64/multiarch/../strcmp.S:209
> 209../sysdeps/x86_64/multiarch/../strcmp.S: No such file or directory.
> (gdb) bt
> #0  __strcmp_ssse3 () at ../sysdeps/x86_64/multiarch/../strcmp.S:209
> #1  0x004ae01e in MainTab::on_notes_textChanged (this=0xb19450) at
> ../qt-ui/maintab.cpp:1167
> #2  0x00588299 in MainTab::qt_static_metacall (_o=0xb19450,
> _c=QMetaObject::InvokeMetaMethod, _id=14, _a=0x7fffcc50) at
> .moc/moc_maintab.cpp:237
> #3  0x00588784 in MainTab::qt_metacall (this=0xb19450,
> _c=QMetaObject::InvokeMetaMethod, _id=14, _a=0x7fffcc50) at
> .moc/moc_maintab.cpp:327
> #4  0x7521636d in QMetaObject::activate(QObject*, int, int,
> void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
>
> miika
>
>
From bd6cc3f16a928fe355fa4081edf32a543f2ddb2a Mon Sep 17 00:00:00 2001
From: Gehad elrobey 
Date: Fri, 30 Jan 2015 22:27:16 +0200
Subject: [PATCH] Don't go to edit mode if the dive notes field didn't change.

The maintab view must be consistent. some fields just go to edit mode
whenever they acquire focus and most of them wait till their values are
changed.

change the dive Notes field to be consistent with the other fields and
only enter edit mode if its value is changed.

Signed-off-by: Gehad elrobey 

commit 2

Signed-off-by: Gehad elrobey 
---
 qt-ui/maintab.cpp | 4 
 1 file changed, 4 insertions(+)

diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index c247b77..00702e9 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -1159,9 +1159,13 @@ void MainTab::on_notes_textChanged()
 	if (editMode == IGNORE || acceptingEdit == true)
 		return;
 	if (currentTrip) {
+		if (displayedTrip.notes && !strcmp(displayedTrip.notes, ui.notes->toPlainText().toUtf8().data()))
+			return;
 		free(displayedTrip.notes);
 		displayedTrip.notes = strdup(ui.notes->toPlainText().toUtf8().data());
 	} else {
+		if (displayed_dive.notes && !strcmp(displayed_dive.notes, ui.notes->toPlainText().toUtf8().data()))
+			return;
 		free(displayed_dive.notes);
 		if (ui.notes->toHtml().indexOf("toHtml().toUtf8().data());
-- 
1.9.1

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH] Don't go to edit mode if the dive notes field didn't change.

2015-01-30 Thread Miika Turkia
On Fri, Jan 30, 2015 at 10:40 PM, Gehad Elrobey 
wrote:

> The main-tab view is inconsistent as mentioned in #804, this patch fixes
> the notes view.
>

I get crashes when applying this patch. This occurs when I attempt to write
to the notes field or focus leaves it.

Program received signal SIGSEGV, Segmentation fault.
__strcmp_ssse3 () at ../sysdeps/x86_64/multiarch/../strcmp.S:209
209../sysdeps/x86_64/multiarch/../strcmp.S: No such file or directory.
(gdb) bt
#0  __strcmp_ssse3 () at ../sysdeps/x86_64/multiarch/../strcmp.S:209
#1  0x004ae01e in MainTab::on_notes_textChanged (this=0xb19450) at
../qt-ui/maintab.cpp:1167
#2  0x00588299 in MainTab::qt_static_metacall (_o=0xb19450,
_c=QMetaObject::InvokeMetaMethod, _id=14, _a=0x7fffcc50) at
.moc/moc_maintab.cpp:237
#3  0x00588784 in MainTab::qt_metacall (this=0xb19450,
_c=QMetaObject::InvokeMetaMethod, _id=14, _a=0x7fffcc50) at
.moc/moc_maintab.cpp:327
#4  0x7521636d in QMetaObject::activate(QObject*, int, int, void**)
() from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5

miika
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH] Export the XSLT based exports in a new Thread.

2015-01-30 Thread Gehad Elrobey
libxml2 consumes the main thread time while formatting the xml document. So
I attached a patch that calls the export function in a new thread.

Now I am working on adding the progress bar functionality #785, but still
can't interface with libxml2.

Regards,
Gehad
From 0375852abd694fbd988f8253d77d58e7bc528d45 Mon Sep 17 00:00:00 2001
From: Gehad elrobey 
Date: Fri, 30 Jan 2015 21:42:33 +0200
Subject: [PATCH] Export the XSLT based exports in a new Thread.

The XSLT based exports can consume long time while applying the xml format.
this time can make the GUI unresponsive. Simpley the export functions
need to be called in a new Thread.

Signed-off-by: Gehad elrobey 
---
 qt-ui/divelogexportdialog.cpp | 3 ++-
 qt-ui/divelogexportdialog.h   | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/qt-ui/divelogexportdialog.cpp b/qt-ui/divelogexportdialog.cpp
index cb7d6a0..aff0265 100644
--- a/qt-ui/divelogexportdialog.cpp
+++ b/qt-ui/divelogexportdialog.cpp
@@ -1,6 +1,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "divelogexportdialog.h"
 #include "diveshareexportdialog.h"
@@ -310,7 +311,7 @@ void DiveLogExportDialog::on_buttonBox_accepted()
 		settings.endGroup();
 		// the non XSLT exports are called directly above, the XSLT based ons are called here
 		if (!stylesheet.isEmpty())
-			export_dives_xslt(filename.toUtf8(), ui->exportSelected->isChecked(), ui->CSVUnits_2->currentIndex(), stylesheet.toUtf8());
+			future = QtConcurrent::run(export_dives_xslt, filename.toUtf8(), ui->exportSelected->isChecked(), ui->CSVUnits_2->currentIndex(), stylesheet.toUtf8());
 	}
 }
 
diff --git a/qt-ui/divelogexportdialog.h b/qt-ui/divelogexportdialog.h
index 0a603ce..14f8f45 100644
--- a/qt-ui/divelogexportdialog.h
+++ b/qt-ui/divelogexportdialog.h
@@ -3,6 +3,7 @@
 
 #include 
 #include 
+#include 
 #include "helpers.h"
 #include "statistics.h"
 
@@ -27,6 +28,7 @@ slots:
 	void on_exportGroup_buttonClicked(QAbstractButton *);
 
 private:
+	QFuture future;
 	Ui::DiveLogExportDialog *ui;
 	void showExplanation();
 	void exportHtmlInit(const QString &filename);
-- 
1.9.1

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH] Don't go to edit mode if the dive notes field didn't change.

2015-01-30 Thread Gehad Elrobey
The main-tab view is inconsistent as mentioned in #804, this patch fixes
the notes view.

Regards,
Gehad
From b86ac5633ce73ab22a600ff3986dcfc2dfe8d63c Mon Sep 17 00:00:00 2001
From: Gehad elrobey 
Date: Fri, 30 Jan 2015 22:27:16 +0200
Subject: [PATCH] Don't go to edit mode if the dive notes field didn't change.

The maintab view must be consistent. some fields just go to edit mode
whenever they acquire focus and most of them wait till their values are
changed.

change the dive Notes field to be consistent with the other fields and
only enter edit mode if its value is changed.

Signed-off-by: Gehad elrobey 
---
 qt-ui/maintab.cpp | 4 
 1 file changed, 4 insertions(+)

diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index c247b77..0c62ae4 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -1159,9 +1159,13 @@ void MainTab::on_notes_textChanged()
 	if (editMode == IGNORE || acceptingEdit == true)
 		return;
 	if (currentTrip) {
+		if (displayedTrip.notes && !strcmp(displayedTrip.notes, ui.notes->toPlainText().toUtf8().data()))
+			return;
 		free(displayedTrip.notes);
 		displayedTrip.notes = strdup(ui.notes->toPlainText().toUtf8().data());
 	} else {
+		if (!strcmp(displayed_dive.notes, ui.notes->toPlainText().toUtf8().data()))
+			return;
 		free(displayed_dive.notes);
 		if (ui.notes->toHtml().indexOf("toHtml().toUtf8().data());
-- 
1.9.1

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH] Merge pictures when downloading additional DC

2015-01-30 Thread Miika Turkia
Fixes #822

Signed-off-by: Miika Turkia 
---
 dive.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dive.c b/dive.c
index 5732c0f..ce7619e 100644
--- a/dive.c
+++ b/dive.c
@@ -2711,6 +2711,7 @@ struct dive *merge_dives(struct dive *a, struct dive *b, 
int offset, bool prefer
MERGE_MAX(res, a, b, number);
MERGE_NONZERO(res, a, b, cns);
MERGE_NONZERO(res, a, b, visibility);
+   MERGE_NONZERO(res, a, b, picture_list);
taglist_merge(&res->tag_list, a->tag_list, b->tag_list);
merge_equipment(res, a, b);
merge_airtemps(res, a, b);
-- 
1.9.1

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH] Repair broken links on user manual

2015-01-30 Thread Willem Ferguson

On 30/01/2015 20:30, Miika Turkia wrote:
On Fri, Jan 30, 2015 at 8:26 PM, Willem Ferguson 
> wrote:


On 30/01/2015 19:02, Miika Turkia wrote:

There are a couple of broken links / references on our user
manual. I looked at the first one but couldn't figure out where
it should be pointing to..so I am now trying to delegate the
fixing of them to Willem :D

Following x-refs are used but the destination is missing:

S_ExtraTab
S_InfoBox
S_ImportingManualCSV

miika


___
subsurface mailing list
subsurface@subsurface-divelog.org  

http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Easy because I understand the layout. Will respond, just waiting
for the latest release that applies current patches (ios
companion, dive planner) to the manual.

One more broken link appeared after I pulled the latest sources (of 
course this was still without the very latest patches)


_appendix_b_dive_computer_specific_information_for_importing_dive_information

BTW, if you run make on Documentation directory, and then the xmllint 
command given in the error message, you get to see the broken links 
yourself.


miika


Miika, thank you so much for some more Miika magic! Hope this merges ok 
since I used the SHA of a patch that has not been pushed yet.


xmllint does not work on my machine: it is a known bug with asciidoc 
(actually a2x). When I run a2x I need a flag that switches xmllint off!!
Anyway, here is a patch that resolves these cases. I checked all of the 
changes that they link correctly in the HTML version. I have also 
checked all the xref: occurrences in the manual and they all appear to 
be ok. Thank you again.

Kind regards,
willem



>From 019ae7a5c2fed8bff7133c530b333bb37540241c Mon Sep 17 00:00:00 2001
From: willem ferguson 
Date: Fri, 30 Jan 2015 21:44:13 +0200
Subject: [PATCH] User-manual: Unresolved references

Fix four unresolved references in the user-manual

Signed-off-by: willem ferguson 
---
 Documentation/user-manual.txt | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index cfed3cb..16fd5b3 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1745,7 +1745,7 @@ case there is good agreement from the readings of the two oxygen sensors.
 image::images/CCR_dive_profile_f20.jpg["FIGURE: CCR dive profile",align="center"]
 
 _Equipment-specific information_: Equipment-specific information gathered by
-_Subsurface_ is shown in the xref:S_ExtraTab[Extra data tab]. This may include setup information
+_Subsurface_ is shown in the xref:S_ExtraDataTab[Extra data tab]. This may include setup information
 or metadata about the dive.
 
 More equipment-specific information for downloading CCR dive logs for
@@ -1768,6 +1768,7 @@ _Subsurface_ calculates SAC and Gas consumption taking in account gas
 incompressibility, particularly at tank pressures above 200 bar, making them more accurate.
 Users should refer to xref:SAC_CALCULATION[Appendix D] for more information.
 
+[[S_ExtraDataTab]]
 === The *Extra Data* tab (usually for individual dives)
 
 When using a dive computer, it often reports several data items that cannot easily be
@@ -2002,6 +2003,7 @@ an existing marker a menu appears, adding options to allow deletion of the
 marker or to allow all markers of that type to be hidden. Hidden events can be
 restored to view by selecting Unhide all events from the context menu.
 
+[[S_InfoBox]]
 === The *Information Box*
 
 The Information box displays a large range of information pertaining to the dive
@@ -3239,6 +3241,7 @@ manually by running:
 For downloading dives in _Subsurface_ specify the device name connected to the MAC
 address in the last step above, e.g. _/dev/rfcomm0_.
 
+[[_appendix_b_dive_computer_specific_information_for_importing_dive_information]]
 
 == APPENDIX B: Dive Computer specific information for importing dive data.
 
@@ -3529,8 +3532,7 @@ button). Then do the following:
 == APPENDIX D: Exporting a spreadsheet to CSV format
 
 Many divers keep a diving log in some form of a digital file, commonly a spreadsheet
-with various fields of information. These logs can be easily imported into _Subsurface_
-(xref:S_ImportingManualCSV[Importing dives from_manually kept CSV file]), after the
+with various fields of information. These logs can be easily imported into _Subsurface_ after the
 spreadsheet is converted in a .CSV file.
 This section explains the procedure to convert a diving logbook stored in a spreadsheet
 to a .CSV file that will later be imported from _Subsurface_.
@@ -3564,7 +3566,7 @@ After selecting _Save_, select the appropriate field delimiter (choose _Tab_ to
 
 image::images/LOffice_field_options.jpg["FIGURE: Field options",align="center"]
 
-One can doubl

Update ceiling (rather than rep lot) when changing dive type

2015-01-30 Thread Robert C. Helling
From d09e1272b9d2035cfb4b11150fc8c6f5dbb48dae Mon Sep 17 00:00:00 2001
From: "Robert C. Helling" 
Date: Fri, 30 Jan 2015 11:16:55 +0100
Subject: [PATCH] Update ceiling when changing dive mode

Without this patch, the user effectively cannot change the dive mode as any 
change is overwritten by
replot copying current_dive over displayed_dive. The way out is not to call 
replot but only
update the deco ceiling directly.

Signed-off-by: Robert C. Helling 
---
 qt-ui/maintab.cpp| 2 +-
 qt-ui/profile/profilewidget2.cpp | 5 +
 qt-ui/profile/profilewidget2.h   | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index c247b77..cf4981c 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -1018,7 +1018,7 @@ void MainTab::divetype_Changed(int index)
displayed_dive.dc.divemode = (enum dive_comp_type) index;
update_setpoint_events(&displayed_dive.dc);
markChangedWidget(ui.DiveType);
-   MainWindow::instance()->graphics()->replot();
+   MainWindow::instance()->graphics()->recalcCeiling();
 }
 
 void MainTab::on_watertemp_textChanged(const QString &text)
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 924c800..99f497e 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -648,6 +648,11 @@ void ProfileWidget2::plotDive(struct dive *d, bool force)
}
 }
 
+void ProfileWidget2::recalcCeiling()
+{
+   diveCeiling->recalc();
+}
+
 void ProfileWidget2::settingsChanged()
 {
// if we are showing calculated ceilings then we have to replot()
diff --git a/qt-ui/profile/profilewidget2.h b/qt-ui/profile/profilewidget2.h
index d594748..c0ada09 100644
--- a/qt-ui/profile/profilewidget2.h
+++ b/qt-ui/profile/profilewidget2.h
@@ -82,6 +82,7 @@ public:
double getFontPrintScale();
void setFontPrintScale(double scale);
void clearHandlers();
+   void recalcCeiling();
State currentState;
 
 public
-- 
1.9.3 (Apple Git-50)


Hi,

I thought I had sent this earlier. This solves the replot/change dive type 
problem that I reported yesterday. Without it a changed dive type is reset to 
the initial value upon pressing apply. This is fixed and the profile gets 
updated with the new deco situation (as that depends on the dive type).

Best
Robert

--  
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO 
Robert C. Helling Elite Master Course Theoretical and Mathematical Physics  
  Scientific Coordinator   
  Ludwig Maximilians Universitaet Muenchen, Dept. Physik
print "Just another   Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339   
stupid .sig\n";   http://www.atdotde.de 



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Problems setting tank information.

2015-01-30 Thread Pedro Neves

Hi:

I'm not sure if it's related with bug #803, but I'm also having problems 
selecting tanks.
When I select a tank, the tank nformation disapears from the tab and the 
cylinders tab doesn't get populated.
If I manually fill all the info (Type, size, Work press., etc.), after I 
apply changes, the type disapears...



All the best:

Pedro


On 01/30/2015 06:04 PM, Dirk Hohndel wrote:

That one have been reported, #803




___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Compilation error with latest master

2015-01-30 Thread Pedro Neves

Hi:

Installing libicu-dev solved the problem.

Cheers:

Pedro

On 01/30/2015 06:29 PM, Dirk Hohndel wrote:

On Fri, Jan 30, 2015 at 06:21:45PM +, Pedro Neves wrote:

Hi all:

I'm trying to compile the latest subsurface master on my system (Debian/Sid)
and I'm getting the following error.
I've just recently installed my OS on this PC and I'm not sure if I'm
missing any package:


compiling qt-ui/completionmodels.cpp
In file included from /usr/include/libxml2/libxml/parser.h:810:0,
  from /usr/include/libxml2/libxml/globals.h:18,
  from /usr/include/libxml2/libxml/threads.h:35,
  from /usr/include/libxml2/libxml/xmlmemory.h:218,
  from /usr/include/libxml2/libxml/tree.h:1306,
  from dive.h:37,
  from qt-gui.cpp:12:
/usr/include/libxml2/libxml/encoding.h:31:26: fatal error: unicode/ucnv.h:
No such file or directory
  #include 

$ dpkg -S /usr/include/x86_64-linux-gnu/unicode/ucnv.h
libicu-dev:amd64: /usr/include/x86_64-linux-gnu/unicode/ucnv.h

I didn't install this explicitly, so this is implicitly pulled in by one
of the dependencies of the packages that I DO explicitly require for a
build on Debian / Ubuntu...

/D


___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Broken links on user manual

2015-01-30 Thread Miika Turkia
On Fri, Jan 30, 2015 at 8:26 PM, Willem Ferguson <
willemfergu...@zoology.up.ac.za> wrote:

>  On 30/01/2015 19:02, Miika Turkia wrote:
>
>  There are a couple of broken links / references on our user manual. I
> looked at the first one but couldn't figure out where it should be pointing
> to..so I am now trying to delegate the fixing of them to Willem :D
>
> Following x-refs are used but the destination is missing:
>
> S_ExtraTab
> S_InfoBox
> S_ImportingManualCSV
>
>  miika
>
>
> ___
> subsurface mailing 
> listsubsurface@subsurface-divelog.orghttp://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
>
> Easy because I understand the layout. Will respond, just waiting for the
> latest release that applies current patches (ios companion, dive planner)
> to the manual.
>  
> 
>
One more broken link appeared after I pulled the latest sources (of course
this was still without the very latest patches)

_appendix_b_dive_computer_specific_information_for_importing_dive_information

BTW, if you run make on Documentation directory, and then the xmllint
command given in the error message, you get to see the broken links
yourself.

miika
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Compilation error with latest master

2015-01-30 Thread Cristian Ionescu-Idbohrn
On Fri, 30 Jan 2015, Pedro Neves wrote:
>
> I'm trying to compile the latest subsurface master on my system
> (Debian/Sid) and I'm getting the following error.
> I've just recently installed my OS on this PC and I'm not sure if
> I'm missing any package:
>
>
> compiling qt-ui/completionmodels.cpp
> In file included from /usr/include/libxml2/libxml/parser.h:810:0,
>  from /usr/include/libxml2/libxml/globals.h:18,
>  from /usr/include/libxml2/libxml/threads.h:35,
>  from /usr/include/libxml2/libxml/xmlmemory.h:218,
>  from /usr/include/libxml2/libxml/tree.h:1306,
>  from dive.h:37,
>  from qt-gui.cpp:12:
> /usr/include/libxml2/libxml/encoding.h:31:26: fatal error: unicode/ucnv.h: No 
> such file or directory
>  #include 
>   ^
> compilation terminated.

That seems to be comming from package:

libicu-dev: /usr/include/x86_64-linux-gnu/unicode/ucnv.h

Yet another dependency?


Cheers,

-- 
Cristian
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Compilation error with latest master

2015-01-30 Thread Dirk Hohndel
On Fri, Jan 30, 2015 at 06:21:45PM +, Pedro Neves wrote:
> Hi all:
> 
> I'm trying to compile the latest subsurface master on my system (Debian/Sid)
> and I'm getting the following error.
> I've just recently installed my OS on this PC and I'm not sure if I'm
> missing any package:
> 
> 
> compiling qt-ui/completionmodels.cpp
> In file included from /usr/include/libxml2/libxml/parser.h:810:0,
>  from /usr/include/libxml2/libxml/globals.h:18,
>  from /usr/include/libxml2/libxml/threads.h:35,
>  from /usr/include/libxml2/libxml/xmlmemory.h:218,
>  from /usr/include/libxml2/libxml/tree.h:1306,
>  from dive.h:37,
>  from qt-gui.cpp:12:
> /usr/include/libxml2/libxml/encoding.h:31:26: fatal error: unicode/ucnv.h:
> No such file or directory
>  #include 

$ dpkg -S /usr/include/x86_64-linux-gnu/unicode/ucnv.h
libicu-dev:amd64: /usr/include/x86_64-linux-gnu/unicode/ucnv.h

I didn't install this explicitly, so this is implicitly pulled in by one
of the dependencies of the packages that I DO explicitly require for a
build on Debian / Ubuntu...

/D
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Broken links on user manual

2015-01-30 Thread Willem Ferguson

On 30/01/2015 19:02, Miika Turkia wrote:
There are a couple of broken links / references on our user manual. I 
looked at the first one but couldn't figure out where it should be 
pointing to..so I am now trying to delegate the fixing of them to 
Willem :D


Following x-refs are used but the destination is missing:

S_ExtraTab
S_InfoBox
S_ImportingManualCSV

miika


___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Easy because I understand the layout. Will respond, just waiting for the 
latest release that applies current patches (ios companion, dive 
planner) to the manual.

Kind regards,
willem

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: iPhone companion app

2015-01-30 Thread Jason Bramwell

> On 30 Jan 2015, at 17:35, Dirk Hohndel  wrote:
> 
>> On Fri, Jan 30, 2015 at 06:57:25PM +0200, Miika Turkia wrote:
>> Yep, I got the location to a manually added dive in Subsurface itself.
>> 
>> If the user ID is correct on both sides, then the only thing I can think of
>> causing trouble is the time sync.
> 
> I think the biggest problem is that many people appear to assume that a
> "dive" that was added on the companion app will CREATE a dive in
> Subsurface.
> 
> But that is NOT how it works. All the companion app does is add GPS
> location (and, potentially, a dive site name) to EXISTING dives in
> Subsurface.
> 
> This apparently isn't communicated clearly enough.
> 
> /D

That was my problem I suspect. I was expecting a blank dive to pop up with the 
new locations gps/name.

Jason
> 
>>> On Fri, Jan 30, 2015 at 6:46 PM, JB2Cool  wrote:
>>> 
>>> You are seeing this 'dive' from within Subsurface itself?
>>> 
>>> On Fri, Jan 30, 2015 at 4:27 PM, Miika Turkia 
>>> wrote:
>>> 
 I just tested this out and got the location to be added to a "dive" on
 Subsurface. So it appears to be working. At one point I had an extra space
 on the ID and that prevented it from working, but fixing that got me going.
 
 miika
 
 
> On Fri, Jan 30, 2015 at 6:24 PM, JB2Cool  wrote:
> 
> I've tried using it but never seemed to make it do much, perhaps i'm
> trying to use it incorrectly. I can manually add a dive and it picks up my
> GPS coordinates and i can give it a name it but i never seem to be able to
> pick up this dive from within Subsurface. I have checked that i have the
> same ID plugged in at both ends.
> 
> Jason
> 
>> On Fri, Jan 30, 2015 at 3:21 PM, Dirk Hohndel  wrote:
>> 
>> We've had an iPhone companion app since last summer (Andrey created it
>> as
>> part of GSoC). I just realized (after a post to our user forum) that we
>> don't mention it anywhere in the docs.
>> 
>> Are there any iPhone users here (sorry, I'm an Android person)? Can
>> someone confirm that the app works and write a few lines on how to
>> install
>> it so we can add this to the manual?
>> 
>> Thanks
>> 
>> /D
>> ___
>> subsurface mailing list
>> subsurface@subsurface-divelog.org
>> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
> 
> 
> ___
> subsurface mailing list
> subsurface@subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>>> 
>>> ___
>>> subsurface mailing list
>>> subsurface@subsurface-divelog.org
>>> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
> 
>> ___
>> subsurface mailing list
>> subsurface@subsurface-divelog.org
>> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
> 
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Compilation error with latest master

2015-01-30 Thread Pedro Neves

Hi all:

I'm trying to compile the latest subsurface master on my system 
(Debian/Sid) and I'm getting the following error.
I've just recently installed my OS on this PC and I'm not sure if I'm 
missing any package:



compiling qt-ui/completionmodels.cpp
In file included from /usr/include/libxml2/libxml/parser.h:810:0,
 from /usr/include/libxml2/libxml/globals.h:18,
 from /usr/include/libxml2/libxml/threads.h:35,
 from /usr/include/libxml2/libxml/xmlmemory.h:218,
 from /usr/include/libxml2/libxml/tree.h:1306,
 from dive.h:37,
 from qt-gui.cpp:12:
/usr/include/libxml2/libxml/encoding.h:31:26: fatal error: 
unicode/ucnv.h: No such file or directory

 #include 
  ^
compilation terminated.
In file included from /usr/include/libxml2/libxml/parser.h:810:0,
 from /usr/include/libxml2/libxml/globals.h:18,
 from /usr/include/libxml2/libxml/threads.h:35,
 from /usr/include/libxml2/libxml/xmlmemory.h:218,
 from /usr/include/libxml2/libxml/tree.h:1306,
 from dive.h:37,
 from divecomputer.cpp:2:
/usr/include/libxml2/libxml/encoding.h:31:26: fatal error: 
unicode/ucnv.h: No such file or directory

 #include 
  ^
compilation terminated.
In file included from /usr/include/libxml2/libxml/parser.h:810:0,
 from /usr/include/libxml2/libxml/globals.h:18,
 from /usr/include/libxml2/libxml/threads.h:35,
 from /usr/include/libxml2/libxml/xmlmemory.h:218,
 from /usr/include/libxml2/libxml/tree.h:1306,
 from ./dive.h:37
 from qt-ui/completionmodels.cpp:2:
/usr/include/libxml2/libxml/encoding.h:31:26: fatal error: 
unicode/ucnv.h: No such file or directory

 #include 
  ^
compilation terminated.
Makefile:1803: recipe for target '.obj/qt-gui.o' failed
make: *** [.obj/qt-gui.o] Error 1
make: *** Waiting for unfinished jobs
Makefile:1726: recipe for target '.obj/divecomputer.o' failed
make: *** [.obj/divecomputer.o] Error 1
Makefile:1863: recipe for target '.obj/completionmodels.o' failed
make: *** [.obj/completionmodels.o] Error 1

Thanks in advance:

Pedro Neves



___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH] User-manual - Update and expand section dealing with dive planning

2015-01-30 Thread Willem Ferguson

User-manual: Dive planner text

I took Robert's contribution describing the dive planner and
expanded it a bit, added two more graphics
to show CCR and pSCR dive planning, and changed a third image.

Moved the section dealing with configuring a dive computer to
be in a more logical place, just before the Subsurface Settings.

Signed-off-by: willem ferguson 

This patch does NOT contain the graphics.
Sent complete patch with graphics to Dirk.
This message meant for our translators.
Kind regards,
willem



>From b4c61c5612c857547bb3db27f5dc2e17205b188c Mon Sep 17 00:00:00 2001
From: willem ferguson 
Date: Fri, 30 Jan 2015 19:59:49 +0200
Subject: [PATCH 3/3] User-manual: Dive planner text

I took Robert's contribution describing the dive planner and
expanded it a bit, added two more graphics
to show CCR and pSCR dive planning, and changed a third image.

Moved the section dealing with configuring a dive computer to
be in a more logical place, just before the Subsurface Settings.

Signed-off-by: willem ferguson 
---
 Documentation/images/DivePlanner2_f20.jpg  | Bin 86758 -> 97331 bytes
 Documentation/images/Planner_CCR1_f20.jpg  | Bin 0 -> 90805 bytes
 Documentation/images/Planner_pSCR1_f20.jpg | Bin 0 -> 85986 bytes
 Documentation/user-manual.txt  | 171 -
 4 files changed, 96 insertions(+), 75 deletions(-)
 create mode 100644 Documentation/images/Planner_CCR1_f20.jpg
 create mode 100644 Documentation/images/Planner_pSCR1_f20.jpg


diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index b1f9658..cfed3cb 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -2519,6 +2519,37 @@ the output for one particular page.
 image::images/Printpreview.jpg["FIGURE: Print preview page",align="center"]
 
 
+[[S_Configure]]
+== Configuring a dive computer
+
+_Subsurface_ enables one to configure a dive computer. Currently the Heinrichs-Weikamp (OSTC 2, OSTC 3) and
+Suunto Vyper (Stinger, Mosquito, D3, Vyper, Vytec,
+Cobra, Gekko and Zoop) family of dive computers are supported. A large number of settings of these dive computers
+can be read and changed to different values. As a first step, ensure that the appropriate hardware driver
+is installed for the dive computer and that the device name of the dive computer is known.
+See <<_appendix_a_operating_system_specific_information_for_importing_dive_information_from_a_dive_computer,APPENDIX A>> for information on how to do this.
+
+Once the dive computer is connected to the _Subsurface_ computer, select _File ->  Configure dive
+computer_ from the _Main Menu_. Provide the appropriate device name in the text box at the
+top of the configuration panel that opens and select the appropriate dive
+computer model from the panel on the lefthand (see image below).
+
+image::images/Configure_dc_f20.jpg["FIGURE: Configure dive computer",align="center"]
+
+Using the appropriate buttons on the configuration panel, the following actions can be performed:
+
+ - *Retrieve available details*. This loads the existing configuration from the dive computer
+   to _Subsurface_, showing this in the configuration panel.
+ - *Save changes to device*. This changes the configuration of the
+   dive computer to correspond to the information shown in the configuration panel.
+ - *Backup*. This saves the configuration data to a file. _Subsurface_ asks for
+   a file location and file name for the saved information.
+ - *Restore backup*. This loads the information from a backup file and displays it
+   in the configuration panel.
+ - *Update firmware*. If new firmware is available for the dive computer, this is
+   loaded into the dive computer.
+
+
 [[S_Preferences]]
 == Setting user _Preferences_ for _Subsurface_
 
@@ -2675,6 +2706,7 @@ be provided. If the proxy server uses authentication, the appropriate userID and
 password also needs to be provided so that _Subsurface_ can automatically pass
 through the proxy server to access the Internet.
 
+
 [[S_DivePlanner]]
 == The _Subsurface_ dive planner
 Dive planning is an advanced feature of _Subsurface_, accessible by selecting
@@ -2719,16 +2751,14 @@ any warning messages about the dive plan are printed.
 image::images/PlannerWindow1_f20.jpg["FIGURE: Dive planner startup window",align="center"]
 
 
-=== Initiating dive planning
-
-The dive planner comprises two parts: *constructing a dive plan* and *evaluating*
-that dive plan. To perform dive planning, perform these steps:
+=== Open circuit dives as an example of dive planning
 
-- Clear the existing dive log by creating a new planning log. This is achieved by selecting
-  _File ->  New logbook_ from the main menu. This way, dive plans are kept separate
-  from the existing dive log of completed dives.
+-  Towards the left bottom of the planner (circled in blue in the image below) is a dropbox with three options. Select the appropriate one of these:
+ ** Open Circuit (the default)
+ ** 

Re: Problems setting tank information.

2015-01-30 Thread Dirk Hohndel
On Fri, Jan 30, 2015 at 07:02:03PM +0100, Joakim Bygdell wrote:
> > I'm kind of shocked that we are this late in the release process and no
> > one has noticed.
> 
> That one have been reported, #803

:facepalm: - that wasn't on my list of "bugs to fix" :-(

Apologies.

/D
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


creating an FAQ

2015-01-30 Thread Dirk Hohndel
We need a user focused FAQ. In addition to the manual.

Questions like "I added a dive on the companion app but don't see it in
Subsurface". I'll add this to the website but need help collecting some of
the questions.

If you have a question you think should be added, please send as reply to
this email. Don't worry about phrasing, don't worry if you don't know the
full answer. It's easy to clean this up. It's quite hard to collect the
questions (I kinda know how all this works - it's the people who aren't as
deeply inside of the code that have the questions...)

So this is a great opportunity for the 150 or so non-developers on this
list to contribute!

Thanks

/D
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Problems setting tank information.

2015-01-30 Thread Joakim Bygdell

> On 30 Jan 2015, at 18:52, Dirk Hohndel  wrote:
> 
> On Fri, Jan 30, 2015 at 06:52:53PM +0200, Benjamin wrote:
>> After I imported a dive today from my non-AI dive computer, I tried to set
>> the tank size. No matter what I did, it always bounced my selection back to
>> the default tank when I tried to either click on the tank from the
>> drop-list or press "enter" to select the tank size.
>> I'm using the latest git version (as of 18:51 local time here - Israel).
>> Does anybody have an idea as to how I could solve the problem?
> 
> Very strange. I just tried this with a manually added dive and that works.
> But then I downloaded dives from a Suunto Zoop (oh how I love the
> libdivecomputer simulator) and I can reproduce this.
> 
> I'm kind of shocked that we are this late in the release process and no
> one has noticed.

That one have been reported, #803

> 
> I'll look into this.
> 
> Thanks for the report, Benjamin.
> 
> /D
> ___
> subsurface mailing list
> subsurface@subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

/Jocke

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH] Document iPhone companion app

2015-01-30 Thread Dirk Hohndel
Thank you so much, Miika!

/D

On Fri, Jan 30, 2015 at 06:54:59PM +0200, Miika Turkia wrote:
> Signed-off-by: Miika Turkia 
> ---
>  Documentation/images/iphone.png | Bin 0 -> 348315 bytes
>  Documentation/user-manual.txt   |  32 
>  2 files changed, 28 insertions(+), 4 deletions(-)
>  create mode 100644 Documentation/images/iphone.png
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Problems setting tank information.

2015-01-30 Thread Dirk Hohndel
On Fri, Jan 30, 2015 at 06:52:53PM +0200, Benjamin wrote:
> After I imported a dive today from my non-AI dive computer, I tried to set
> the tank size. No matter what I did, it always bounced my selection back to
> the default tank when I tried to either click on the tank from the
> drop-list or press "enter" to select the tank size.
> I'm using the latest git version (as of 18:51 local time here - Israel).
> Does anybody have an idea as to how I could solve the problem?

Very strange. I just tried this with a manually added dive and that works.
But then I downloaded dives from a Suunto Zoop (oh how I love the
libdivecomputer simulator) and I can reproduce this.

I'm kind of shocked that we are this late in the release process and no
one has noticed.

I'll look into this.

Thanks for the report, Benjamin.

/D
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: iPhone companion app

2015-01-30 Thread Dirk Hohndel
On Fri, Jan 30, 2015 at 06:57:25PM +0200, Miika Turkia wrote:
> Yep, I got the location to a manually added dive in Subsurface itself.
> 
> If the user ID is correct on both sides, then the only thing I can think of
> causing trouble is the time sync.

I think the biggest problem is that many people appear to assume that a
"dive" that was added on the companion app will CREATE a dive in
Subsurface.

But that is NOT how it works. All the companion app does is add GPS
location (and, potentially, a dive site name) to EXISTING dives in
Subsurface.

This apparently isn't communicated clearly enough.

/D

> On Fri, Jan 30, 2015 at 6:46 PM, JB2Cool  wrote:
> 
> > You are seeing this 'dive' from within Subsurface itself?
> >
> > On Fri, Jan 30, 2015 at 4:27 PM, Miika Turkia 
> > wrote:
> >
> >> I just tested this out and got the location to be added to a "dive" on
> >> Subsurface. So it appears to be working. At one point I had an extra space
> >> on the ID and that prevented it from working, but fixing that got me going.
> >>
> >> miika
> >>
> >>
> >> On Fri, Jan 30, 2015 at 6:24 PM, JB2Cool  wrote:
> >>
> >>> I've tried using it but never seemed to make it do much, perhaps i'm
> >>> trying to use it incorrectly. I can manually add a dive and it picks up my
> >>> GPS coordinates and i can give it a name it but i never seem to be able to
> >>> pick up this dive from within Subsurface. I have checked that i have the
> >>> same ID plugged in at both ends.
> >>>
> >>> Jason
> >>>
> >>> On Fri, Jan 30, 2015 at 3:21 PM, Dirk Hohndel  wrote:
> >>>
>  We've had an iPhone companion app since last summer (Andrey created it
>  as
>  part of GSoC). I just realized (after a post to our user forum) that we
>  don't mention it anywhere in the docs.
> 
>  Are there any iPhone users here (sorry, I'm an Android person)? Can
>  someone confirm that the app works and write a few lines on how to
>  install
>  it so we can add this to the manual?
> 
>  Thanks
> 
>  /D
>  ___
>  subsurface mailing list
>  subsurface@subsurface-divelog.org
>  http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
> 
> >>>
> >>>
> >>> ___
> >>> subsurface mailing list
> >>> subsurface@subsurface-divelog.org
> >>> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
> >>>
> >>>
> >>
> >
> > ___
> > subsurface mailing list
> > subsurface@subsurface-divelog.org
> > http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
> >
> >

> ___
> subsurface mailing list
> subsurface@subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Any qmake experts out there?

2015-01-30 Thread Lubomir I. Ivanov
On 30 January 2015 at 03:07, Lubomir I. Ivanov  wrote:
> here is my progress in a single patch if someone is interested.
>
> i'm CCing Thiago, because maybe he can help with a qmake issue.
>
> basically i have the same setup that this patch applies in a test project:
> - the version_h rule is generated in a .pro (.pri) file
> - the rule simply calls a script that may or may not create or update
> ssrf-version.h
>
> the problem is that qmake does not generate the rule in the first
> place for subsurface (hopefully not a qmake bug).
>
> for my other test project it generates this:
> $(DESTDIR_TARGET): ssrf-version.h...
>
> 
>
> ssrf-version.h: FORCE
> @sh ./scripts/write-version ssrf-version.h 4.3 win
>
> the above is not ideal because i think we really want .PHONY but qmake
> doesn't really provide us with the option to add to the directive and
> what it has instead is QMAKE_EXTRA_TARGETS and PRE_TARGETDEPS.
> with FORCE (an empty rule) i have no experience with but it does
> generate the ssrf-version.h.tmp file each time 'make' is called, which
> is what we want in a way.
>

some progress, but i think i'm either finding some problems with qmake
or it's very undocumented.

i was able to create a rule, but now the problem of re-linking rises.
(patch attached)

PHONY_DEPS = .
version_h.input = PHONY_DEPS
version_h.output = phony_version
version_h.commands = @echo writing $$VERSION_FILE ... && sh
./scripts/write-version $$VERSION_FILE $$VERSION $$VER_OS
version_h.CONFIG += no_link target_predeps
QMAKE_EXTRA_COMPILERS += version_h
QMAKE_CLEAN += $$VERSION_FILE

this line is the problematic one:
version_h.CONFIG += no_link target_predeps

it supposedly tells qmake not to link the output of this rule and to
insert it a $(DESTDIR_TARGET) dependency.
the problem is that it shouldn't be a  $(DESTDIR_TARGET) dependency,
it should be a rule that is a PHONY rule...

if i remove "target_predeps" and manually go in the Makefile and add
phony_version in the "first" rule as:
first: phony_version all
it works...

things like:
first.depends += phony_version
or
all.depends += phony_version
don't work.

any ideas of a "target_predeps" alternative?

lubomir
--
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH] Document iPhone companion app

2015-01-30 Thread Miika Turkia
I intended to have width limitation for the image, but it seems to be
missing from this patch.

---8<---
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 471647c..b3c98d7 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1447,7 +1447,8 @@ The iPhone interface is quite simple. One needs to
add the user ID given
 during the registration to the space reserved for it as shown on left
 part of the image below.

-image::images/iphone.png["FIGURE: Using iPhone companion
application",align="center"]
+image::images/iphone.png["FIGURE: Using iPhone companion
application",align="center", width=640]

 Next step is to click "Dive in" and start collecting location
 information. Dive can be added automatically or manually. The difference
---8<---

miika
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Broken links on user manual

2015-01-30 Thread Miika Turkia
There are a couple of broken links / references on our user manual. I
looked at the first one but couldn't figure out where it should be pointing
to..so I am now trying to delegate the fixing of them to Willem :D

Following x-refs are used but the destination is missing:

S_ExtraTab
S_InfoBox
S_ImportingManualCSV

miika
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: iPhone companion app

2015-01-30 Thread Miika Turkia
Yep, I got the location to a manually added dive in Subsurface itself.

If the user ID is correct on both sides, then the only thing I can think of
causing trouble is the time sync.

miika

On Fri, Jan 30, 2015 at 6:46 PM, JB2Cool  wrote:

> You are seeing this 'dive' from within Subsurface itself?
>
> On Fri, Jan 30, 2015 at 4:27 PM, Miika Turkia 
> wrote:
>
>> I just tested this out and got the location to be added to a "dive" on
>> Subsurface. So it appears to be working. At one point I had an extra space
>> on the ID and that prevented it from working, but fixing that got me going.
>>
>> miika
>>
>>
>> On Fri, Jan 30, 2015 at 6:24 PM, JB2Cool  wrote:
>>
>>> I've tried using it but never seemed to make it do much, perhaps i'm
>>> trying to use it incorrectly. I can manually add a dive and it picks up my
>>> GPS coordinates and i can give it a name it but i never seem to be able to
>>> pick up this dive from within Subsurface. I have checked that i have the
>>> same ID plugged in at both ends.
>>>
>>> Jason
>>>
>>> On Fri, Jan 30, 2015 at 3:21 PM, Dirk Hohndel  wrote:
>>>
 We've had an iPhone companion app since last summer (Andrey created it
 as
 part of GSoC). I just realized (after a post to our user forum) that we
 don't mention it anywhere in the docs.

 Are there any iPhone users here (sorry, I'm an Android person)? Can
 someone confirm that the app works and write a few lines on how to
 install
 it so we can add this to the manual?

 Thanks

 /D
 ___
 subsurface mailing list
 subsurface@subsurface-divelog.org
 http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

>>>
>>>
>>> ___
>>> subsurface mailing list
>>> subsurface@subsurface-divelog.org
>>> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>>>
>>>
>>
>
> ___
> subsurface mailing list
> subsurface@subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
>
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Problems setting tank information.

2015-01-30 Thread Benjamin
After I imported a dive today from my non-AI dive computer, I tried to set
the tank size. No matter what I did, it always bounced my selection back to
the default tank when I tried to either click on the tank from the
drop-list or press "enter" to select the tank size.
I'm using the latest git version (as of 18:51 local time here - Israel).
Does anybody have an idea as to how I could solve the problem?

Thank you
Benjamin
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: iPhone companion app

2015-01-30 Thread JB2Cool
You are seeing this 'dive' from within Subsurface itself?

On Fri, Jan 30, 2015 at 4:27 PM, Miika Turkia 
wrote:

> I just tested this out and got the location to be added to a "dive" on
> Subsurface. So it appears to be working. At one point I had an extra space
> on the ID and that prevented it from working, but fixing that got me going.
>
> miika
>
>
> On Fri, Jan 30, 2015 at 6:24 PM, JB2Cool  wrote:
>
>> I've tried using it but never seemed to make it do much, perhaps i'm
>> trying to use it incorrectly. I can manually add a dive and it picks up my
>> GPS coordinates and i can give it a name it but i never seem to be able to
>> pick up this dive from within Subsurface. I have checked that i have the
>> same ID plugged in at both ends.
>>
>> Jason
>>
>> On Fri, Jan 30, 2015 at 3:21 PM, Dirk Hohndel  wrote:
>>
>>> We've had an iPhone companion app since last summer (Andrey created it as
>>> part of GSoC). I just realized (after a post to our user forum) that we
>>> don't mention it anywhere in the docs.
>>>
>>> Are there any iPhone users here (sorry, I'm an Android person)? Can
>>> someone confirm that the app works and write a few lines on how to
>>> install
>>> it so we can add this to the manual?
>>>
>>> Thanks
>>>
>>> /D
>>> ___
>>> subsurface mailing list
>>> subsurface@subsurface-divelog.org
>>> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>>>
>>
>>
>> ___
>> subsurface mailing list
>> subsurface@subsurface-divelog.org
>> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>>
>>
>
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: iPhone companion app

2015-01-30 Thread Miika Turkia
I just tested this out and got the location to be added to a "dive" on
Subsurface. So it appears to be working. At one point I had an extra space
on the ID and that prevented it from working, but fixing that got me going.

miika

On Fri, Jan 30, 2015 at 6:24 PM, JB2Cool  wrote:

> I've tried using it but never seemed to make it do much, perhaps i'm
> trying to use it incorrectly. I can manually add a dive and it picks up my
> GPS coordinates and i can give it a name it but i never seem to be able to
> pick up this dive from within Subsurface. I have checked that i have the
> same ID plugged in at both ends.
>
> Jason
>
> On Fri, Jan 30, 2015 at 3:21 PM, Dirk Hohndel  wrote:
>
>> We've had an iPhone companion app since last summer (Andrey created it as
>> part of GSoC). I just realized (after a post to our user forum) that we
>> don't mention it anywhere in the docs.
>>
>> Are there any iPhone users here (sorry, I'm an Android person)? Can
>> someone confirm that the app works and write a few lines on how to install
>> it so we can add this to the manual?
>>
>> Thanks
>>
>> /D
>> ___
>> subsurface mailing list
>> subsurface@subsurface-divelog.org
>> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>>
>
>
> ___
> subsurface mailing list
> subsurface@subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
>
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: iPhone companion app

2015-01-30 Thread JB2Cool
I've tried using it but never seemed to make it do much, perhaps i'm trying
to use it incorrectly. I can manually add a dive and it picks up my GPS
coordinates and i can give it a name it but i never seem to be able to pick
up this dive from within Subsurface. I have checked that i have the same ID
plugged in at both ends.

Jason

On Fri, Jan 30, 2015 at 3:21 PM, Dirk Hohndel  wrote:

> We've had an iPhone companion app since last summer (Andrey created it as
> part of GSoC). I just realized (after a post to our user forum) that we
> don't mention it anywhere in the docs.
>
> Are there any iPhone users here (sorry, I'm an Android person)? Can
> someone confirm that the app works and write a few lines on how to install
> it so we can add this to the manual?
>
> Thanks
>
> /D
> ___
> subsurface mailing list
> subsurface@subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


iPhone companion app

2015-01-30 Thread Dirk Hohndel
We've had an iPhone companion app since last summer (Andrey created it as
part of GSoC). I just realized (after a post to our user forum) that we
don't mention it anywhere in the docs.

Are there any iPhone users here (sorry, I'm an Android person)? Can
someone confirm that the app works and write a few lines on how to install
it so we can add this to the manual?

Thanks

/D
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Segfault after export to DiveShare

2015-01-30 Thread Dirk Hohndel
On Fri, Jan 30, 2015 at 07:15:32AM -0800, Dirk Hohndel wrote:
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x01810b80 in ?? ()
> > (gdb) bt
> > #0  0x01810b80 in ?? ()
> > #1  0x0056a464 in DiveShareExportDialog::~DiveShareExportDialog() ()
> > #2  0x0056a489 in DiveShareExportDialog::~DiveShareExportDialog() ()
> 
> Yeah, we deleted an object that was already marked as deleteLater()
> earlier. Fix will be pushed soon.

And by that I meant to say, Anton fixed it already...
So I dropped my patch and took his (not that they were any different, mind
you).

:-)

/D
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Segfault after export to DiveShare

2015-01-30 Thread Dirk Hohndel
On Fri, Jan 30, 2015 at 04:20:30PM +0300, Sergey Starosek wrote:
> Steps to reproduce:
> 
> - start subsurface
> - select one dive and export it to DiveShare

Wow. I completely forgot about DiveShare.

Salvo, the UI where you collect the impressively long token is hideous.
:-/

But of course that leads to an interesting question... do you have an API
for people to get the dive sites back from you? Since this is something
that we are planning on adding soon after the 4.4 release (and already
have a couple of web sites willing to integrate with us), I'd like to be
able to get the data from your site as well!

> - close Subsurface
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x01810b80 in ?? ()
> (gdb) bt
> #0  0x01810b80 in ?? ()
> #1  0x0056a464 in DiveShareExportDialog::~DiveShareExportDialog() ()
> #2  0x0056a489 in DiveShareExportDialog::~DiveShareExportDialog() ()

Yeah, we deleted an object that was already marked as deleteLater()
earlier. Fix will be pushed soon.

/D
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH] Prevent crash on shutdown

2015-01-30 Thread Anton Lundin
We always call reply->deleteLater(), so we where actually calling delete
on a stale pointer, that caused subsurface to crash on shutdown.

Reported-by: Sergey Starosek 
Signed-off-by: Anton Lundin 
---
 qt-ui/diveshareexportdialog.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/qt-ui/diveshareexportdialog.cpp b/qt-ui/diveshareexportdialog.cpp
index 3ce2e0b..9e8e69a 100644
--- a/qt-ui/diveshareexportdialog.cpp
+++ b/qt-ui/diveshareexportdialog.cpp
@@ -19,7 +19,6 @@ DiveShareExportDialog::DiveShareExportDialog(QWidget *parent) 
:
 DiveShareExportDialog::~DiveShareExportDialog()
 {
delete ui;
-   delete reply;
 }
 
 void DiveShareExportDialog::UIDFromBrowser()
-- 
2.1.0

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Segfault after export to DiveShare

2015-01-30 Thread Sergey Starosek
Steps to reproduce:

- start subsurface
- select one dive and export it to DiveShare
- close Subsurface

Program received signal SIGSEGV, Segmentation fault.
0x01810b80 in ?? ()
(gdb) bt
#0  0x01810b80 in ?? ()
#1  0x0056a464 in DiveShareExportDialog::~DiveShareExportDialog() ()
#2  0x0056a489 in DiveShareExportDialog::~DiveShareExportDialog() ()
#3  0x747eac9c in QObjectPrivate::deleteChildren() () from 
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x7590abf9 in QWidget::~QWidget() () from 
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#5  0x004bbe29 in MainWindow::~MainWindow() ()
#6  0x00472e26 in exit_ui() ()
#7  0x004391a9 in main ()

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Manual update for planning rebreather dives

2015-01-30 Thread Robert Helling
From a068ae104175b3e51316456f58bc3098469bb496 Mon Sep 17 00:00:00 2001
From: "Robert C. Helling" 
Date: Fri, 30 Jan 2015 11:57:57 +0100
Subject: [PATCH] User manual additions for rebreather modes

...in particular for planning rebreather dives.

Signed-off-by: Robert C. Helling 
---
 Documentation/user-manual.txt | 30 +++---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index cb77a05..7735246 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1683,7 +1683,7 @@ CCR equipment provide actual measurements of pO~2~, 
derived from oxygen sensors.
 In this case the graph for oxygen partial pressure
 should be fairly flat, reflecting the setpoint settings during the dive. The 
mean
 pO~2~ is NOT the mean oxygen partial pressure as given by the CCR equipment, 
but
-a value xalculated by _Subsurface_ as follows:
+a value calculated by _Subsurface_ as follows:
 
 - For TWO O~2~ sensors the mean value of the two sensors are given.
 
@@ -1691,6 +1691,8 @@ a value xalculated by _Subsurface_ as follows:
   differences of more than 0,1 bar in the simultaneous readings of different 
sensors are
   treated as spurious. If one of the three sensors provides spurious data, it 
is ignored.
 
+- If no sensor data is available, the pO~2~ value is assumed to be equal to 
the setpoint.
+
 The mean pO~2~ of the sensors is indicated with a green line,
 
 The oxygen setpoint values as well as the readings from the individual
@@ -2629,10 +2631,13 @@ This panel allows two type of selections:
 
  ** _Default CCR setpoint for dive planning:_ Specify the O~2~ setpoint for a
 CCR dive plan. This determines the pO~2~ that will be maintained
-during a particular dive.
+during a particular dive. This is the setpoint that is used at the start
+of any CCR dive. Setpoint changes during the dive can be added via the
+profile context menu.
 
  ** _pSCR O~2~ metabolism rate:_ For a semiclosed rebreather (pSCR) system, 
this is the
-volume of oxygen used by a diver each minute. Set this value for pSCR dive 
planning.
+volume of oxygen used by a diver each minute. Set this value for pSCR dive 
planning
+and decompression calculations.
 
  ** _pSCR ratio:_ For pSCR equipment the dump ratio is the ratio of gas 
released to the
 environment to that of the gas recirculated to the diver. Set this value 
for a
@@ -2857,6 +2862,25 @@ level is indicated in the _Dive Plan Details_. This 
duration INCLUDES the transi
 time to get to that level. However, if the _Display transition in deco_ option 
is checked,
 the transitions are shown separately from the segment durations at a 
particular level.
 
+=== Planning rebreather dives
+
+To plan a dive using a passive semi-closed rebreather (pSCR), select "pSCR" 
rather than
+"Open circuit" in the Planning tab. This takes the oxygen drop in the 
rebreather into account.
+The parameters of the pSCR can be set in the preferences in the Graph tab. A 
warning apears
+in the dive plan details, if the pO~2~ drops below what is considered a save 
value. For pSCR dives,
+the gas consumption calculation takes into account the pSCR ratio (default 
10:1).
+
+To plan a dive using a closed circuit rebreather (CCR), select the "CCR" 
option in the PLannig tab.
+This makes all user entered segments use the default setpoint value 
(configured in the Preferences
+in the Graph tab). The gases from the gas list are considered to be diluent 
gases (the oxygen tank is
+implicitely assumed to be present).
+
+Then, individual setpoints can be set for dive segments in the "Dive planner 
points" table. A zero setpoint
+means the diver bails out to open circuit mode for that segment. The 
decompression is always calculated
+with the setpoint of the last manually entered segment. So, to plan an bail 
out ascent for a
+CCR dive, add a one minute dive segment in the end with a setpoint value of 0. 
The decompresseion
+algorithm does not switch decogases automatically in CCR mode (but of course 
for bail out ascents).
+
 [[S_Replan]]
 === Modifying an existing dive plan
 
-- 
1.9.3 (Apple Git-50)


-- .oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oORobert C. Helling     Elite Master Course Theoretical and Mathematical Physics                      Scientific Coordinator                      Ludwig Maximilians Universitaet Muenchen, Dept. Physik                      Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339                      http://www.atdotde.deEnhance your privacy, use cryptography! My PGP keys have fingerprintsA9D1 A01D 13A5 31FA 6515  BB44 0820 367C 36BC 0C1D    andDCED 37B6 251C 7861 270D  5613 95C7 9D32 9A8D 9B8F



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/

Make the dive mode change effective

2015-01-30 Thread Robert Helling
This patch fixes the problem that when the user tried to change the dive mode of a dive via the combo box, it jumped back as soon as apply was pressed (and the change was never reflected in the profile). This came about as replot copied current_dive over displayed dive before replotting so the change in dive mode was overwritten.This patch just updates the ceiling rather than asking for a full replot.From d09e1272b9d2035cfb4b11150fc8c6f5dbb48dae Mon Sep 17 00:00:00 2001
From: "Robert C. Helling" 
Date: Fri, 30 Jan 2015 11:16:55 +0100
Subject: [PATCH] Update ceiling when changing dive mode

Without this patch, the user effectively cannot change the dive mode as any 
change is overwritten by
replot copying current_dive over displayed_dive. The way out is not to call 
replot but only
update the deco ceiling directly.

Signed-off-by: Robert C. Helling 
---
 qt-ui/maintab.cpp| 2 +-
 qt-ui/profile/profilewidget2.cpp | 5 +
 qt-ui/profile/profilewidget2.h   | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index c247b77..cf4981c 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -1018,7 +1018,7 @@ void MainTab::divetype_Changed(int index)
displayed_dive.dc.divemode = (enum dive_comp_type) index;
update_setpoint_events(&displayed_dive.dc);
markChangedWidget(ui.DiveType);
-   MainWindow::instance()->graphics()->replot();
+   MainWindow::instance()->graphics()->recalcCeiling();
 }
 
 void MainTab::on_watertemp_textChanged(const QString &text)
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 924c800..99f497e 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -648,6 +648,11 @@ void ProfileWidget2::plotDive(struct dive *d, bool force)
}
 }
 
+void ProfileWidget2::recalcCeiling()
+{
+   diveCeiling->recalc();
+}
+
 void ProfileWidget2::settingsChanged()
 {
// if we are showing calculated ceilings then we have to replot()
diff --git a/qt-ui/profile/profilewidget2.h b/qt-ui/profile/profilewidget2.h
index d594748..c0ada09 100644
--- a/qt-ui/profile/profilewidget2.h
+++ b/qt-ui/profile/profilewidget2.h
@@ -82,6 +82,7 @@ public:
double getFontPrintScale();
void setFontPrintScale(double scale);
void clearHandlers();
+   void recalcCeiling();
State currentState;
 
 public
-- 
1.9.3 (Apple Git-50)

BestRobert
-- .oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oORobert C. Helling     Elite Master Course Theoretical and Mathematical Physics                      Scientific Coordinator                      Ludwig Maximilians Universitaet Muenchen, Dept. Physik                      Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339                      http://www.atdotde.deEnhance your privacy, use cryptography! My PGP keys have fingerprintsA9D1 A01D 13A5 31FA 6515  BB44 0820 367C 36BC 0C1D    andDCED 37B6 251C 7861 270D  5613 95C7 9D32 9A8D 9B8F




signature.asc
Description: Message signed with OpenPGP using GPGMail
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface