Re: Compilation error with latest master

2015-02-01 Thread Cristian Ionescu-Idbohrn
On Fri, 30 Jan 2015, Cristian Ionescu-Idbohrn wrote:
 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 unicode/ucnv.h
 
  $ 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.

See bug:

https://bugs.debian.org/776694

now resolved in version 2.9.2+dfsg1-3.


Cheers,

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


[PATCH] Fix crash if one selects incorrectly Seabear CSV

2015-02-01 Thread Miika Turkia
Signed-off-by: Miika Turkia miika.tur...@gmail.com
---
 file.c| 7 +++
 qt-ui/divelogimportdialog.cpp | 5 +++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/file.c b/file.c
index eacd875..e03edaf 100644
--- a/file.c
+++ b/file.c
@@ -932,6 +932,13 @@ int parse_seabear_csv_file(const char *filename, int 
timef, int depthf, int temp
NL = \r\n;
}
 
+   /*
+* If file does not contain empty lines, it is not a valid
+* Seabear CSV file.
+*/
+   if (!ptr)
+   return -1;
+
if (!ptr_old) {
while ((ptr = strstr(ptr, \n\n)) != NULL) {
ptr_old = ptr;
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
index c79b9df..ca3a2be 100644
--- a/qt-ui/divelogimportdialog.cpp
+++ b/qt-ui/divelogimportdialog.cpp
@@ -526,7 +526,7 @@ void DiveLogImportDialog::on_buttonBox_accepted()
if (ui-knownImports-currentText() != Manual import) {
for (int i = 0; i  fileNames.size(); ++i) {
if (ui-knownImports-currentText() == Seabear CSV) {
-   
parse_seabear_csv_file(fileNames[i].toUtf8().data(),
+   if 
(parse_seabear_csv_file(fileNames[i].toUtf8().data(),
   r.indexOf(tr(Sample 
time)),
   r.indexOf(tr(Sample 
depth)),
   r.indexOf(tr(Sample 
temperature)),
@@ -539,7 +539,8 @@ void DiveLogImportDialog::on_buttonBox_accepted()
   
ui-CSVSeparator-currentIndex(),
   
specialCSV.contains(ui-knownImports-currentIndex()) ? 
CSVApps[ui-knownImports-currentIndex()].name.toUtf8().data() : csv,
   
ui-CSVUnits-currentIndex()
-  );
+  )  0)
+   return;
 
// Seabear CSV stores NDL and TTS in Minutes, 
not seconds
struct dive *dive = 
dive_table.dives[dive_table.nr - 1];
-- 
1.9.1

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


Re: [PATCH] Update spanish translation of user manual to english 47c5a28f

2015-02-01 Thread Dirk Hohndel
Thanks... 
There were a couple of issues with incorrect IDs in the Spanish
translation that I fixed.

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


[PATCH] Do not go to edit mode if nothing changed

2015-02-01 Thread Miika Turkia
Fixes #804

Signed-off-by: Miika Turkia miika.tur...@gmail.com
---
 qt-ui/maintab.cpp | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 7335711..00aae5f 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -980,6 +980,10 @@ void MainTab::on_buddy_textChanged()
 {
if (editMode == IGNORE || acceptingEdit == true)
return;
+
+   if (same_string(displayed_dive.buddy, 
ui.buddy-toPlainText().toUtf8().data()))
+   return;
+
QStringList text_list = ui.buddy-toPlainText().split(,, 
QString::SkipEmptyParts);
for (int i = 0; i  text_list.size(); i++)
text_list[i] = text_list[i].trimmed();
@@ -993,6 +997,10 @@ void MainTab::on_divemaster_textChanged()
 {
if (editMode == IGNORE || acceptingEdit == true)
return;
+
+   if (same_string(displayed_dive.divemaster, 
ui.divemaster-toPlainText().toUtf8().data()))
+   return;
+
QStringList text_list = ui.divemaster-toPlainText().split(,, 
QString::SkipEmptyParts);
for (int i = 0; i  text_list.size(); i++)
text_list[i] = text_list[i].trimmed();
@@ -1102,8 +1110,15 @@ void MainTab::saveTags()
 
 void MainTab::on_tagWidget_textChanged()
 {
+   char buf[1024];
+
if (editMode == IGNORE || acceptingEdit == true)
return;
+
+   taglist_get_tagstring(displayed_dive.tag_list, buf, 1024);
+   if (same_string(buf, ui.tagWidget-toPlainText().toUtf8().data()))
+   return;
+
markChangedWidget(ui.tagWidget);
 }
 
-- 
1.9.1

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


Re: User Manual: Facebook tests

2015-02-01 Thread Dirk Hohndel

 On Feb 1, 2015, at 11:08 AM, Willem Ferguson 
 willemfergu...@zoology.up.ac.za wrote:
 
 The Facebook-related panels all have the standard  OK/Apply/Discard buttons 
 near the bottom right.
 Discard = cancel = close without saving
 Apply = assign the values to the completed fields
 OK = Close panel without saving
 What are the semantic differences among the three options?

These are the buttons for the preferences.

They have NO EFFECT AT ALL when it comes to the FB login.
This may be a bug, but that’s how it is right now.

/D

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


User Manual: Facebook tests

2015-02-01 Thread Willem Ferguson
The Facebook-related panels all have the standard  OK/Apply/Discard 
buttons near the bottom right.

Discard = cancel = close without saving
Apply = assign the values to the completed fields
OK = Close panel without saving
What are the semantic differences among the three options?
Kind regards,
willem

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


Re: Beta 3 and what's missing for 4.4

2015-02-01 Thread Dirk Hohndel
On Sun, Feb 01, 2015 at 07:16:39AM -0800, Dirk Hohndel wrote:
 I will release Beta 3 today.

Binaries are up for Windows and Mac and being built for the Linux flavors.

Users checking for updates from within Subsurface will be informed that
the new beta is up, but I haven't announced it, yet.

It would be nice if a few people could test this. I gave the Mac beta a
bit of a workout, that one seems OK. I haven't looked at the Windows one,
yet. And I haven't had a chance to play with any of the Linux packages,
either. I'll be busy with real life for the next hour or two, after that
I'm hoping to announce the beta.

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


Re: GSoC 2015

2015-02-01 Thread Robert C. Helling

 On 01 Feb 2015, at 21:14, Dirk Hohndel d...@hohndel.org wrote:
 
 If you have ideas we should propose for students, please post.

I would love to see better support for images beyond local files. I would like 
to have pictures from he net (cloud, web pages, flickr, you name it). And 
associating those to dives should be easier. Also the clock sync it terrible 
from a user perspective (no feedback what gets matched to what).

The other big thing is of course a UI for git load/save.

These are just the things that are in the back of my head of „what needs to be 
done“.

Best
Robert


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: [PATCH] Update spanish translation of user manual to english 47c5a28f

2015-02-01 Thread Salvador Cuñat
Thanks Dirk. I'll take a look on your fixes when pushed, as this patch gave
no problem to me while trying on master.

There's still another patch, but it won't be completed until tomorrow
evening (Spain time).

Regards.

Salva.

2015-02-01 18:11 GMT+01:00 Dirk Hohndel d...@hohndel.org:

 Thanks...
 There were a couple of issues with incorrect IDs in the Spanish
 translation that I fixed.

 /D

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


Re: Facebook testing

2015-02-01 Thread Davide DB
Dirk,

out of curiosity: FB developers have some tool to see how their apps
are being used?
In other words, could you check how many people publish their dive profiles?
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


GSoC 2015

2015-02-01 Thread Dirk Hohndel


I'd like to participate again. I think we got some really great result last 
time and gained a few new developers, too!


If you have ideas we should propose for students, please post.

/D


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


Re: GSoC 2015

2015-02-01 Thread Long, Martin
 We have very good HTML export as a result of the last GSoC. Have
 you played with it? Are there features missing from it? If yes, I’m sure
 Gehad will be curious to hear what you’d like to see added…

I only mentioned HTML as some form that could be printed as a log book.

Yes, it is excellent, but very interactive, and not close to being
usable for a printed log, nor does it have any customisable options
over and above the few checkboxes for what to include. ie - while it
is a great feature, and very well done, it doesn't come close to
solving the 'printed logbook' problem.

HOWEVER, what it does is provide the bare building blocks - eg profile
rendered as an image/canvas. It does perhaps make it an easier option
to do a XSLT transform on this data. Perhaps an option to do a more
'basic' export, as it looks as thought the current export is not a
simple webpage but built up with javascript, and so it wouldn't be
possible to transform it.
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Facebook testing

2015-02-01 Thread Dirk Hohndel
On Sun, Feb 01, 2015 at 04:44:25PM -0600, Matt Thompson wrote:
 I just played with this a little bit and it pretty much just worked
 for me as far as basic pasting to FB goes. Nice job!

Great.

  I just pushed another very ugly commit - I'll clean this up once we agree
  that this is the behavior we want.
 
  With this change Subsurface forgets Facebook credentials once you quit.
  You can still log out manually, but that's almost obsolete now. The
  credentials only stay valid while this Subsurface process is running.
 
 This quite honestly annoys me.  I use ridiculous, unique passwords
 that I don't memorize for every different site so having to go grab
 the password from LastPass every time I want to post a dive is a large
 pain.  I understand that some folks don't want to stay logged in
 permanently so until things can be made to work following the checkbox
 on the FB login page I suppose this is not unreasonable but I look
 forward to the day when things are fully functional.

I spent an hour trying to figure out how to tell if that checkbox was
checked or not. I must have logged in and out 50 times today. There is
absolutely no way I can see to tell if the user checked that.

It's driving me nuts.

Yes, I have some sneaky ideas how to store the connection token in a
reasonably safe way without requiring a pin or anything. It's all of
course just obfuscation (given that we're an open source project), but I
think it would work reasonably well.

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


Re: [PATCH] User manual: refine images and text for using iphone

2015-02-01 Thread Andrey Zhdanov

 On 31 Jan 2015, at 12:40, Willem Ferguson willemfergu...@zoology.up.ac.za 
 wrote:
 On 31/01/2015 11:17, Miika Turkia wrote:
 If the app is recording the path continuously, I suppose this mention is 
 slightly misleading. (I do not really know how this thing works, so I added 
 this comment as I noticed that only the manual option was available..but now 
 I guess that the automatic dive location recording is running at this stage)
 
 Who was the tutor/supervisor when Muhammad did this coding last year? Maybe 
 that person has more information or understands the underlying code? In the 
 Android app, waypoint storing and GPS streaming are quite different 
 activities.

While the location service is running dives are added automatically based on 
distance + you can add dive manually while location service is working.

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


Re: creating an FAQ

2015-02-01 Thread Davide DB
On Sun, Feb 1, 2015 at 10:45 PM, Dirk Hohndel d...@hohndel.org wrote:


 Thanks for the ZERO contributions. That really makes me excited to spend
 my time on Subsurface.

 In the meantime I put up an initial FAQ on the website. If you have ideas
 what should be added, or would like to propose a better answer, please let
 me know.


Life comes first :)

Q1: How much does it cost my passion? (do not let see this feature to
your partner)

With to the gas consumption stats I discovered I saved 1000 EURO of gas in
less of one year (66 dives) with my pSCR.
Thanks to Anton and Thanks to Subsurface!


Q2: Can I log dives with multiple tanks with the same gas in
subsurface? In other words can I use Subsurface for serious cave or
tech diving?

Description on how to add tanks, mix and gas switches... (Actually I
thought I would write a Subsurface survival guide for tech divers)

Q3: Logging dives is boring and life is short; how Subsurface could help me?


Bye

-- 
Davide
https://vimeo.com/bocio/videos
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: I.possible saving Olold PSCR dives

2015-02-01 Thread Davide DB
I changed dive mode to all my pSCR dives.

I realized that calculated ceiling changes (increase) when switching
to pSCR. I guess the Buhlmann algorithm is fed with the pO2 calculated
values. This is a good teaching tool indeed.

Good job indeed guys. Thank you for your wondeful work!

Bye

-- 
Davide
https://vimeo.com/bocio/videos
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Import problems with Cobalt 2 on Fedora 21

2015-02-01 Thread Matt Thompson
I know this is probably more of a distro specific question but I'm
hoping that someone here has seen this and can point me in the right
direction.

I recently switched to Fedora 21 from Sabayon.  I added my user to the
dialout group as that is the group for /dev/ttyS*.  All of the
/dev/ttyS* devices have permissions 660.  I made sure to log out and
back in and tried to download dives from my Cobalt2 connected to
/dev/ttyS3 and it failed.  I checked the log file and it contains only
1 line:

ERROR: Failed to open the usb device. [in atomics_cobalt.c:114
(atomics_cobalt_device_open)]

If I run Subsurface as root I can successfully download my dives.
Also I can successfully download my dives from my Suunto D4i as my
normal user.

I tried temporarily disabling SELinux with setenforce 0 but that makes
no difference.

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


Re: Import problems with Cobalt 2 on Fedora 21

2015-02-01 Thread Linus Torvalds
On Sun, Feb 1, 2015 at 7:36 PM, Matt Thompson math...@gmail.com wrote:

 I recently switched to Fedora 21 from Sabayon.  I added my user to the
 dialout group as that is the group for /dev/ttyS*.  All of the
 /dev/ttyS* devices have permissions 660.

The cobalt isn't a serial device, so the usual dialout thing won't
help. You need to make the USB device accessible so that libusb can
access it.

Generally that means a udev rule.

I don't know what the device ID's for Cobalt are, but for the Suunto
EON Steel I have something like this:

[torvalds@i7 subsurface]$ cat /lib/udev/rules.d/91-suunto-eonsteel.rules
SUBSYSTEM==usb,ATTR{idVendor}==1493,ATTR{idProduct}==0030, MODE=0666
SUBSYSTEM==usb,ATTR{idVendor}==1493,ATTR{idProduct}==0031,
MODE=0666

which just makes the dang thing world read-write.  It would probably
be a better idea to make it do GROUP=dialout and make it only group
read-write, but I couldn't be bothered.

(The reason for the two different product IDs? The EON Steel actually
goes into a magical firmware update mode where it has that 0031
product ID, while the 0030 ID is the normal USB ID for it)

I *think* udevd will just automatically notice new rules, but maybe I
remember incorrectly and you may have to do something like udevadm
control --reload after adding the new rule file.  No need to reboot
or anything quite that drastic.

Maybe we should try to gather those kinds of rules in the Linux
packages? I have no idea how to do udev rule packaging, though, so
somebody else would have to do it.

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


Re: Import problems with Cobalt 2 on Fedora 21

2015-02-01 Thread Dirk Hohndel

 On Feb 1, 2015, at 8:33 PM, Linus Torvalds torva...@linux-foundation.org 
 wrote:
 
 On Sun, Feb 1, 2015 at 7:36 PM, Matt Thompson math...@gmail.com wrote:
 
 I recently switched to Fedora 21 from Sabayon.  I added my user to the
 dialout group as that is the group for /dev/ttyS*.  All of the
 /dev/ttyS* devices have permissions 660.
 
 The cobalt isn't a serial device, so the usual dialout thing won't
 help. You need to make the USB device accessible so that libusb can
 access it.
 
 Generally that means a udev rule.
 
 I don't know what the device ID's for Cobalt are, but for the Suunto
 EON Steel I have something like this:
 
[torvalds@i7 subsurface]$ cat /lib/udev/rules.d/91-suunto-eonsteel.rules
SUBSYSTEM==usb,ATTR{idVendor}==1493,ATTR{idProduct}==0030, 
 MODE=0666
SUBSYSTEM==usb,ATTR{idVendor}==1493,ATTR{idProduct}==0031,
 MODE=0666
 
 which just makes the dang thing world read-write.  It would probably
 be a better idea to make it do GROUP=dialout and make it only group
 read-write, but I couldn't be bothered.
 […]
 Maybe we should try to gather those kinds of rules in the Linux
 packages? I have no idea how to do udev rule packaging, though, so
 somebody else would have to do it.

We should at least at them to the FAQ.

For the Cobalt case I think what we need to document is
a) the device doesn’t matter, it’s not used (and so its permissions don’t 
matter, either)
b) you may need a udev rule on Linux… but what’s that rule?
Try 

SUBSYSTEM==usb,ATTR{idVendor}==“0471,ATTR{idProduct}==“0888, MODE=0666

Can you confirm that, Matt?

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


Re: creating an FAQ

2015-02-01 Thread Benjamin
On 2 Feb 2015 08:28, Dirk Hohndel d...@hohndel.org wrote:

 Miika,

 excellent, excellent input.

 I have added most of your questions. I rephrased some of them (so all the
questions are actually, you know, questions) and also changed some of the
answers. Please double check what I just posted…
 \
  On Feb 1, 2015, at 9:56 PM, Miika Turkia miika.tur...@gmail.com wrote:
 
  Q: Editing dive sites

 What would you want there as response?

  Insufficient privileges to open device

 Again, what would be a good response?

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

Maybe say what is done with the user input from the survey? For the privacy
fanatics out there... :)

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