Re: Cylinder vs. tank -

2017-11-28 Thread Tim Wootton
On 28/11/17 20:18, Bill Perry wrote:
> It appears that Wikipedia pushes the term "Diving Cylinder"
> https://en.wikipedia.org/wiki/Diving_cylinder
> And in their terminology section, they say:
>
> "The term "diving cylinder" tends to be used by gas equipment engineers, 
> manufacturers, support professionals, and divers speaking British English. 
> "Scuba tank" or "diving tank" is more often used colloquially by 
> non-professionals and native speakers of
> American English"
If that's the case perhaps we could use "tank" and just replace "tank"
with "cylinder" in the UK English translation
>
> So from Wikipedia's perspective it appears to be somewhat a American English 
> vs British English thing...
> Although it appears that many of the Dive computer manufacturers have leaned 
> towards "tank".
>
>
> Could it be handled as a "language" thing like other translation items?
> using the locale information?
> Even if it could be done that way is it a good idea or worth it?
>
> It is kind of funny (actually in a sad way) that different dive computers 
> from the same manufacturer are not consistent with respect to their 
> terminology,
> and a couple device manuals intermix the terms in the same manual.
>
>  bill
>
>
> ___
> 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: Cylinder vs. tank -

2017-11-28 Thread Tim Wootton
Gas pressure or Gas press. +1
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Cylinder vs. tank -

2017-11-27 Thread Tim Wootton
On 28/11/17 06:52, Martin Měřinský wrote:
> Hi.
>
>> we really usually use "Cylinder" and only in 6 strings use "Tank".
>> Shall we change EVERYTHING to "cylinder" or sometimes "cyl." (which
>> we have already)?
>> Would also mean the "Tank bar" becomes the "Cylinder bar"...
Actually the CodingStyle doc already covers this very case:
" Where more than one term exists for something, please choose the one
already in use within Subsurface e.g. Cylinder vs. Tank."

> In my opinion yes and yes.
> Martin M.
> ___
> 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


one word - two words again

2017-03-12 Thread Tim Wootton
Hi All,

I was just going through the latest translations and came across
"Safetystop". I would write it as "Safety stop", anyone else agree?

cheers,

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


Re: Translations

2017-02-20 Thread Tim Wootton
On 20/02/17 14:20, Stefan Fuchs wrote:
>
> Hello Tim,
>
> Am 20.02.2017 um 14:52 schrieb Tim Wootton:
>>
>>
>> The Subsurface CodingStyle file provides this guidance for these
>> situations:
>>
>>   Only the first word of multi-word text strings should be captalized
>> unless
>>   a word would normally be capitalized mid-sentance, like Africa.
>> This applies
>>   to all UI text including menus, menu items, tool-tips, button text
>> and label
>>   text etc. e.g. "Check for updates" rather than "Check for Updates".
>>
>>   Abbreviations should end with a period, e.g. "temp." not "temp" for
>>   temperature.
>>
>> There doesn't seem to be a view on the full-stop (period) at the and
>> of a sentence, perhaps we should add one, as the key here IMHO is
>> consistency.
> I 100% agree with this and also your second mail.
>
> There should be also a rule how to continue after a colon ":". IMHO in
> most cases with a capital letter.
> E.g.:
> Wrong: Warning: this is more gas than available in the specified cylinder!
> Correct: Warning: This is more gas than available in the specified
> cylinder!
>
Ahh, the grammarians don't all agree on this one, but the consensus
seems to be: You should always capitalise if what follows is more than
one sentence or a direct quote; other than that it's up to you if you do
or don't (but they all advise, once chosen, apply consistently)


> What makes the story a little bit difficult is that a single string in
> the source code notnecessarily ends up as one string in the UI. So one
> needs to be a careful and always check the final result in the UI.
>
> Best regards
> Stefan
>
> -- 
>
> Stefan Fuchs
> E-Mail: sfu...@gmx.de <mailto:sfu...@gmx.de>
>

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


Re: Translations

2017-02-20 Thread Tim Wootton

>
>
> The Subsurface CodingStyle file provides this guidance for these
> situations:
>
>   Only the first word of multi-word text strings should be captalized
> unless
>   a word would normally be capitalized mid-sentance, like Africa. This
> applies
>   to all UI text including menus, menu items, tool-tips, button text
> and label
>   text etc. e.g. "Check for updates" rather than "Check for Updates".
>
>   Abbreviations should end with a period, e.g. "temp." not "temp" for
>   temperature.
>
> There doesn't seem to be a view on the full-stop (period) at the and
> of a sentence, perhaps we should add one, as the key here IMHO is
> consistency.
>
> cheers,
>
> Tim
>
>
> On 20/02/17 12:56, Stefan Fuchs wrote:
>>
>> Hello Martin,
>>
>> Am 14.02.2017 um 11:47 schrieb Martin Měřinský:
>>> Inconsistencies in source strings:
>>> --
>>> Send the dive data to divelogs.de website. (Ends with dot.)
>>> Send the dive data to dive-share.appspot.com website (No dot at the
>>> end.)
>>>
>>> Temp
>>> Temp.
>>> Max. depth
>>> max depth
>>> Please, either use with dot or don't.
>>>
>>> Dive Details
>>> Dive details
>>> Different letter case.
>>>
>>> Dive Master
>>> Divemaster
>>>
>>> maxdepth
>>> max depth
>>>
>>> [...]
>> I like your approach and even would like to add one more category of
>> items including a few examples:
>> For many strings it is also important to decide if the first word
>> should start with an upper case or lower case letter.
>> Example:
>> The information box in the profile.
>> From the code of profile.c:
>>
>> put_format(b, translate("gettextFromC", "Calculated ceiling
>> %.0f%s\n"), depthvalue, depth_unit);
>>
>> put_format(b, translate("gettextFromC", "Tissue
>> %.0fmin: %.1f%s\n"), buehlmann_N2_t_halflife[k], depthvalue, depth_unit);
>>  
>> put_format(b, translate("gettextFromC", "heartbeat: %d\n"),
>> entry->heartbeat);
>>
>> put_format(b, translate("gettextFromC", "bearing: %d\n"),
>> entry->bearing);
>>
>> put_format(b, translate("gettextFromC", "mean depth to here
>> %.1f%s\n"), depthvalue, depth_unit);
>>
>> "Calculated", "Tissue" vs. "heartbeat", "bearing", "mean"
>>
>> Even in English language having everything upper case would look
>> better and be more correct there!?

>> On 20/02/17 13:52, Tim Wootton wrote:
>> >
>> >
>> > The Subsurface CodingStyle file provides this guidance for these
>> situations:
>> >
>> >   Only the first word of multi-word text strings should be
>> captalized unless
>> >   a word would normally be capitalized mid-sentance, like Africa.
>> This applies
>> >   to all UI text including menus, menu items, tool-tips, button
>> text and label
>> >   text etc. e.g. "Check for updates" rather than "Check for Updates".
>> >
>> >   Abbreviations should end with a period, e.g. "temp." not "temp" for
>> >   temperature.
>> >
>> > There doesn't seem to be a view on the full-stop (period) at the
>> and of a sentence, perhaps we should add one, as the key here IMHO is
>> consistency.
>> >
>> > cheers,
>> >
>> > Tim
Apologies for the earlier top-post. I should also have added that my
vote would be for full stops at the end of sentences in longer blocks of
text that contain more than one sentence (why wouldn't you), but from
the list above that would only be things like certain longer tool-tips
and labels. I'd prefer not to see them in menus, menu items or buttons.


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


Re: Translations

2017-02-20 Thread Tim Wootton


The Subsurface CodingStyle file provides this guidance for these situations:

  Only the first word of multi-word text strings should be captalized unless
  a word would normally be capitalized mid-sentance, like Africa. This
applies
  to all UI text including menus, menu items, tool-tips, button text and
label
  text etc. e.g. "Check for updates" rather than "Check for Updates".

  Abbreviations should end with a period, e.g. "temp." not "temp" for
  temperature.

There doesn't seem to be a view on the full-stop (period) at the and of
a sentence, perhaps we should add one, as the key here IMHO is consistency.

cheers,

Tim


On 20/02/17 12:56, Stefan Fuchs wrote:
>
> Hello Martin,
>
> Am 14.02.2017 um 11:47 schrieb Martin Měřinský:
>> Inconsistencies in source strings:
>> --
>> Send the dive data to divelogs.de website. (Ends with dot.)
>> Send the dive data to dive-share.appspot.com website (No dot at the
>> end.)
>>
>> Temp
>> Temp.
>> Max. depth
>> max depth
>> Please, either use with dot or don't.
>>
>> Dive Details
>> Dive details
>> Different letter case.
>>
>> Dive Master
>> Divemaster
>>
>> maxdepth
>> max depth
>>
>> [...]
> I like your approach and even would like to add one more category of
> items including a few examples:
> For many strings it is also important to decide if the first word
> should start with an upper case or lower case letter.
> Example:
> The information box in the profile.
> From the code of profile.c:
>
> put_format(b, translate("gettextFromC", "Calculated ceiling
> %.0f%s\n"), depthvalue, depth_unit);
>
> put_format(b, translate("gettextFromC", "Tissue
> %.0fmin: %.1f%s\n"), buehlmann_N2_t_halflife[k], depthvalue, depth_unit);
>  
> put_format(b, translate("gettextFromC", "heartbeat: %d\n"),
> entry->heartbeat);
>
> put_format(b, translate("gettextFromC", "bearing: %d\n"),
> entry->bearing);
>
> put_format(b, translate("gettextFromC", "mean depth to here
> %.1f%s\n"), depthvalue, depth_unit);
>
> "Calculated", "Tissue" vs. "heartbeat", "bearing", "mean"
>
> Even in English language having everything upper case would look
> better and be more correct there!?
>
> Best regards
> Stefan
>
> -- 
>
> Stefan Fuchs
> E-Mail: sfu...@gmx.de 
>
>
>
> ___
> 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: 4.6 Beta 1

2016-12-13 Thread Tim Wootton


On 13 December 2016 15:59:55 GMT+00:00, Dirk Hohndel  wrote:
>
>> On Dec 13, 2016, at 2:41 AM, Miika Turkia 
>wrote:
>> 
>> Installing subsurface to yakkety requires me to install also the
>> following dependencies. I really dislike the idea of installing
>> avahi-daeman and libnss-mdns. From my point of view, these are
>useless
>> on any normally configured network, and I have so far never used
>> network autoconfigurations... (Didn't look that carefully into other
>> libraries.)
>> 
>> ---8<---
>> The following additional packages will be installed:
>>  avahi-daemon geoclue-2.0 iio-sensor-proxy libdouble-conversion1v5
>> libgeoclue-2-0 libgrantlee-templates5
>>  libnss-mdns libqt5bluetooth5 libqt5bluetooth5-bin libqt5concurrent5
>> libqt5positioning5 libqt5qml5 libqt5quick5
>>  libqt5script5 libqt5sql5 libqt5sql5-sqlite libqt5webkit5 libqt5xml5
>libzip4
>> ---8<---
>
>Subsurface doesn't depend on avahi-daemon nor on libnss-mdns
>Both of those must be implicit dependencies of other libraries we
>depend on :-(
>
Not sure if it's the case here but I've noticed the default in some distros is 
to install recommends as well as depends. It may just be a recommend on one of 
those other libraries (try apt::install-recommends "false"; in/etc/apt/apt.conf)

I've also noticed the package maintainers of some other packages sometimes 
overstate the dependency and add depends on "something" because "something" is 
needed to support a certain feature, even though the package can happily be 
used without that feature.

>> Anyway Subsurface was installed successfully. However, when I started
>> Subsurface for the first time, declined checking of updates, imported
>> an XML log, and hit quit (without saving), subsurface GUI
>disappeared,
>> but the process keeps on running, apparently forever.
>
>That's not good. If you attach to it with a debugger, what is it doing?
>
>/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


Re: Transifex

2016-12-13 Thread Tim Wootton
Same for UK English

On 13 December 2016 10:54:32 GMT+00:00, Pedro Neves  
wrote:
>Dirk:
>
>Despite having translated all new strings to Pt, Transifex still says 
>that there are 2 untranslated strings (which don't show up when I
>select 
>"Untranslated"). Ignore?
>
>Cheers:
>
>Pedro
>
>
>
>
>
>
>___
>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


[FIXED PATCH] Adds Cylinder helper class for cylinder info access in grantlee templates

2016-07-31 Thread Tim Wootton
to allow grantlee to access individual fields of the cylinder_t struct
rather than a string representation of the whole cylinder info using a
grantlee structure like this one:


Cylinder
Start press.
End press.
Gas mix

{% for cylinderObject in dive.cylinderObjects %}

{{ cylinderObject.description }}
{{ cylinderObject.startPressure }}
{{ cylinderObject.endPressure }}
{{ cylinderObject.gasMix }}

{% endfor %}


Signed-off-by: Tim Wootton <t...@tee-jay.org.uk>
---
 core/CMakeLists.txt |  1 +
 core/subsurface-qt/CylinderObjectHelper.cpp | 37 +
 core/subsurface-qt/CylinderObjectHelper.h   | 31 
 core/subsurface-qt/DiveObjectHelper.cpp | 13 ++
 core/subsurface-qt/DiveObjectHelper.h   |  4 
 5 files changed, 86 insertions(+)
 create mode 100644 core/subsurface-qt/CylinderObjectHelper.cpp
 create mode 100644 core/subsurface-qt/CylinderObjectHelper.h

diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index d9b1d34..5c22e23 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -86,6 +86,7 @@ set(SUBSURFACE_CORE_LIB_SRCS
 
#Subsurface Qt have the Subsurface structs QObjectified for easy access 
via QML.
subsurface-qt/DiveObjectHelper.cpp
+   subsurface-qt/CylinderObjectHelper.cpp
subsurface-qt/SettingsObjectWrapper.cpp
${SERIAL_FTDI}
${PLATFORM_SRC}
diff --git a/core/subsurface-qt/CylinderObjectHelper.cpp 
b/core/subsurface-qt/CylinderObjectHelper.cpp
new file mode 100644
index 000..341d30b
--- /dev/null
+++ b/core/subsurface-qt/CylinderObjectHelper.cpp
@@ -0,0 +1,37 @@
+#include "CylinderObjectHelper.h"
+#include "../helpers.h"
+
+static QString EMPTY_CYLINDER_STRING = QStringLiteral("");
+CylinderObjectHelper::CylinderObjectHelper(cylinder_t *cylinder) :
+   m_cyl(cylinder) {
+}
+
+CylinderObjectHelper::~CylinderObjectHelper() {
+}
+
+QString CylinderObjectHelper::description() const {
+   if (!m_cyl->type.description)
+   return QString(EMPTY_CYLINDER_STRING);
+   else
+   return QString(m_cyl->type.description);
+}
+
+QString CylinderObjectHelper::size() const {
+   return get_volume_string(m_cyl->type.size, true);
+}
+
+QString CylinderObjectHelper::workingPressure() const {
+   return get_pressure_string(m_cyl->type.workingpressure, true);
+}
+
+QString CylinderObjectHelper::startPressure() const {
+   return get_pressure_string(m_cyl->start, true);
+}
+
+QString CylinderObjectHelper::endPressure() const {
+   return get_pressure_string(m_cyl->end, true);
+}
+
+QString CylinderObjectHelper::gasMix() const {
+   return get_gas_string(m_cyl->gasmix);
+}
diff --git a/core/subsurface-qt/CylinderObjectHelper.h 
b/core/subsurface-qt/CylinderObjectHelper.h
new file mode 100644
index 000..c523eee
--- /dev/null
+++ b/core/subsurface-qt/CylinderObjectHelper.h
@@ -0,0 +1,31 @@
+#ifndef CYLINDER_QOBJECT_H
+#define CYLINDER_QOBJECT_H
+
+#include "../dive.h"
+#include 
+#include 
+
+class CylinderObjectHelper : public QObject {
+   Q_OBJECT
+   Q_PROPERTY(QString description READ description CONSTANT)
+   Q_PROPERTY(QString size READ size CONSTANT)
+   Q_PROPERTY(QString workingPressure READ workingPressure CONSTANT)
+   Q_PROPERTY(QString startPressure READ startPressure CONSTANT)
+   Q_PROPERTY(QString endPressure READ endPressure CONSTANT)
+   Q_PROPERTY(QString gasMix READ gasMix CONSTANT)
+public:
+   CylinderObjectHelper(cylinder_t *cylinder = NULL);
+   ~CylinderObjectHelper();
+   QString description() const;
+   QString size() const;
+   QString workingPressure() const;
+   QString startPressure() const;
+   QString endPressure() const;
+   QString gasMix() const;
+
+private:
+   cylinder_t *m_cyl;
+};
+
+   Q_DECLARE_METATYPE(CylinderObjectHelper *)
+#endif
\ No newline at end of file
diff --git a/core/subsurface-qt/DiveObjectHelper.cpp 
b/core/subsurface-qt/DiveObjectHelper.cpp
index c246a12..7da5202 100644
--- a/core/subsurface-qt/DiveObjectHelper.cpp
+++ b/core/subsurface-qt/DiveObjectHelper.cpp
@@ -55,10 +55,18 @@ static QString getPressures(struct dive *dive, enum 
returnPressureSelector ret)
 DiveObjectHelper::DiveObjectHelper(struct dive *d) :
m_dive(d)
 {
+   m_cyls.clear();
+   for (int i = 0; i < MAX_CYLINDERS; i++) {
+   //Don't add blank cylinders, only those that have been defined.
+   if (m_dive->cylinder[i].type.description)
+   m_cyls.append(new 
CylinderObjectHelper(_dive->cy

Re: [PATCH] Adds Cylinder helper class for cylinder info access in grantlee templates

2016-07-31 Thread Tim Wootton
On 31/07/16 18:12, Dirk Hohndel wrote:

> This looks interesting - can you also add a Grantlee template that uses
> this? 
I'm working on one, just not quite ready yet.

> And please incorporate the small suggestion that Tomaz posted.
Will do

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


Re: [PATCH] Adds Cylinder helper class for cylinder info access in grantlee templates

2016-07-31 Thread Tim Wootton

On 31/07/16 19:26, Lubomir I. Ivanov wrote:
> On 31 July 2016 at 21:24, Lubomir I. Ivanov <neolit...@gmail.com> wrote:
>> On 31 July 2016 at 01:25, Tim Wootton <t...@tee-jay.org.uk> wrote:
>>> to allow grantlee to access individual fields of the cylinder_t struct
>>> rather than a string representation of the whole cylinder info
>>>
>>> Signed-off-by: Tim Wootton <t...@tee-jay.org.uk>
>>> ---
>>>  core/CMakeLists.txt |  1 +
>>>  core/subsurface-qt/DiveObjectHelper.cpp | 13 +
>>>  core/subsurface-qt/DiveObjectHelper.h   |  4 
>>>  3 files changed, 18 insertions(+)
>>>
>>
>> 
>>
>>> +   subsurface-qt/CylinderObjectHelper.cpp
>>
>> ^ this file has to be included in the patch.
>>
> 
> P.S. and the header as well.

My bad, I thought I had, I'll re-send with corrections
> 
> lubomir
> --
> 

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


[PATCH] Adds Cylinder helper class for cylinder info access in grantlee templates

2016-07-30 Thread Tim Wootton
to allow grantlee to access individual fields of the cylinder_t struct
rather than a string representation of the whole cylinder info

Signed-off-by: Tim Wootton <t...@tee-jay.org.uk>
---
 core/CMakeLists.txt |  1 +
 core/subsurface-qt/DiveObjectHelper.cpp | 13 +
 core/subsurface-qt/DiveObjectHelper.h   |  4 
 3 files changed, 18 insertions(+)

diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index d9b1d34..5c22e23 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -86,6 +86,7 @@ set(SUBSURFACE_CORE_LIB_SRCS
 
#Subsurface Qt have the Subsurface structs QObjectified for easy access 
via QML.
subsurface-qt/DiveObjectHelper.cpp
+   subsurface-qt/CylinderObjectHelper.cpp
subsurface-qt/SettingsObjectWrapper.cpp
${SERIAL_FTDI}
${PLATFORM_SRC}
diff --git a/core/subsurface-qt/DiveObjectHelper.cpp 
b/core/subsurface-qt/DiveObjectHelper.cpp
index c246a12..7da5202 100644
--- a/core/subsurface-qt/DiveObjectHelper.cpp
+++ b/core/subsurface-qt/DiveObjectHelper.cpp
@@ -55,10 +55,18 @@ static QString getPressures(struct dive *dive, enum 
returnPressureSelector ret)
 DiveObjectHelper::DiveObjectHelper(struct dive *d) :
m_dive(d)
 {
+   m_cyls.clear();
+   for (int i = 0; i < MAX_CYLINDERS; i++) {
+   //Don't add blank cylinders, only those that have been defined.
+   if (m_dive->cylinder[i].type.description)
+   m_cyls.append(new 
CylinderObjectHelper(_dive->cylinder[i]));
+   }
 }
 
 DiveObjectHelper::~DiveObjectHelper()
 {
+while (!m_cyls.isEmpty())
+delete m_cyls.takeFirst();
 }
 
 int DiveObjectHelper::number() const
@@ -271,6 +279,11 @@ QString DiveObjectHelper::cylinder(int idx) const
return getFormattedCylinder(m_dive, idx);
 }
 
+QList<CylinderObjectHelper*> DiveObjectHelper::cylinderObjects() const
+{
+   return m_cyls;
+}
+
 QString DiveObjectHelper::trip() const
 {
return m_dive->divetrip ? m_dive->divetrip->location : 
EMPTY_DIVE_STRING;
diff --git a/core/subsurface-qt/DiveObjectHelper.h 
b/core/subsurface-qt/DiveObjectHelper.h
index ab42a59..c685690 100644
--- a/core/subsurface-qt/DiveObjectHelper.h
+++ b/core/subsurface-qt/DiveObjectHelper.h
@@ -2,6 +2,7 @@
 #define DIVE_QOBJECT_H
 
 #include "../dive.h"
+#include "CylinderObjectHelper.h"
 #include 
 #include 
 #include 
@@ -34,6 +35,7 @@ class DiveObjectHelper : public QObject {
Q_PROPERTY(QString suit READ suit CONSTANT)
Q_PROPERTY(QString cylinderList READ cylinderList CONSTANT)
Q_PROPERTY(QStringList cylinders READ cylinders CONSTANT)
+   Q_PROPERTY(QList<CylinderObjectHelper*> cylinderObjects READ 
cylinderObjects CONSTANT)
Q_PROPERTY(QString trip READ trip CONSTANT)
Q_PROPERTY(QString tripMeta READ tripMeta CONSTANT)
Q_PROPERTY(int maxcns READ maxcns CONSTANT)
@@ -77,6 +79,7 @@ public:
QString cylinderList() const;
QStringList cylinders() const;
QString cylinder(int idx) const;
+   QList<CylinderObjectHelper*> cylinderObjects() const;
QString trip() const;
QString tripMeta() const;
int maxcns() const;
@@ -92,6 +95,7 @@ public:
 
 private:
struct dive *m_dive;
+   QList<CylinderObjectHelper*> m_cyls;
 };
Q_DECLARE_METATYPE(DiveObjectHelper *)
 
-- 
2.1.4

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


please ignore last patch, corrected one to follow

2016-07-18 Thread Tim Wootton

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


[PATCH] Only add non-blank weights to the weight list

2016-07-18 Thread Tim Wootton
Signed-off-by: Tim Wootton <t...@tee-jay.org.uk>
---
 core/subsurface-qt/DiveObjectHelper.cpp | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/core/subsurface-qt/DiveObjectHelper.cpp 
b/core/subsurface-qt/DiveObjectHelper.cpp
index e71b076..89d87d5 100644
--- a/core/subsurface-qt/DiveObjectHelper.cpp
+++ b/core/subsurface-qt/DiveObjectHelper.cpp
@@ -218,8 +218,12 @@ QString DiveObjectHelper::weightList() const
 QStringList DiveObjectHelper::weights() const
 {
QStringList weights;
-   for (int i = 0; i < MAX_WEIGHTSYSTEMS; i++)
+   for (int i = 0; i < MAX_WEIGHTSYSTEMS; i++) {
+   QString w = getFormattedWeight(m_dive, i);
+   if (w == EMPTY_DIVE_STRING)
+   continue;
weights << getFormattedWeight(m_dive, i);
+   }
return weights;
 }
 
-- 
2.8.1

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


[PATCH] Only add non-blank cylinder strings to the cylinder list

2016-07-18 Thread Tim Wootton
Signed-off-by: Tim Wootton <t...@tee-jay.org.uk>
---
 core/subsurface-qt/DiveObjectHelper.cpp | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/core/subsurface-qt/DiveObjectHelper.cpp 
b/core/subsurface-qt/DiveObjectHelper.cpp
index 1c7621e..c246a12 100644
--- a/core/subsurface-qt/DiveObjectHelper.cpp
+++ b/core/subsurface-qt/DiveObjectHelper.cpp
@@ -255,8 +255,12 @@ QString DiveObjectHelper::cylinderList() const
 QStringList DiveObjectHelper::cylinders() const
 {
QStringList cylinders;
-   for (int i = 0; i < MAX_CYLINDERS; i++)
-   cylinders << getFormattedCylinder(m_dive, i);
+   for (int i = 0; i < MAX_CYLINDERS; i++) {
+   QString cyl = getFormattedCylinder(m_dive, i);
+   if (cyl == EMPTY_DIVE_STRING)
+   continue;
+   cylinders << cyl;
+   }
return cylinders;
 }
 
-- 
2.1.4

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


[PATCH] Let cns and otu return ints rather than QStrings so they display correctly when accessed from grantlee template Fixes #1085

2016-07-18 Thread Tim Wootton
Signed-off-by: Tim Wootton <t...@tee-jay.org.uk>
---
 core/subsurface-qt/DiveObjectHelper.cpp | 8 
 core/subsurface-qt/DiveObjectHelper.h   | 8 
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/core/subsurface-qt/DiveObjectHelper.cpp 
b/core/subsurface-qt/DiveObjectHelper.cpp
index fc406d6..1c7621e 100644
--- a/core/subsurface-qt/DiveObjectHelper.cpp
+++ b/core/subsurface-qt/DiveObjectHelper.cpp
@@ -306,14 +306,14 @@ QString DiveObjectHelper::tripMeta() const
return ret;
 }
 
-QString DiveObjectHelper::maxcns() const
+int DiveObjectHelper::maxcns() const
 {
-   return QString(m_dive->maxcns);
+   return m_dive->maxcns;
 }
 
-QString DiveObjectHelper::otu() const
+int DiveObjectHelper::otu() const
 {
-   return QString(m_dive->otu);
+   return m_dive->otu;
 }
 
 int DiveObjectHelper::rating() const
diff --git a/core/subsurface-qt/DiveObjectHelper.h 
b/core/subsurface-qt/DiveObjectHelper.h
index 6d95d75..ab42a59 100644
--- a/core/subsurface-qt/DiveObjectHelper.h
+++ b/core/subsurface-qt/DiveObjectHelper.h
@@ -36,8 +36,8 @@ class DiveObjectHelper : public QObject {
Q_PROPERTY(QStringList cylinders READ cylinders CONSTANT)
Q_PROPERTY(QString trip READ trip CONSTANT)
Q_PROPERTY(QString tripMeta READ tripMeta CONSTANT)
-   Q_PROPERTY(QString maxcns READ maxcns CONSTANT)
-   Q_PROPERTY(QString otu READ otu CONSTANT)
+   Q_PROPERTY(int maxcns READ maxcns CONSTANT)
+   Q_PROPERTY(int otu READ otu CONSTANT)
Q_PROPERTY(QString sumWeight READ sumWeight CONSTANT)
Q_PROPERTY(QString getCylinder READ getCylinder CONSTANT)
Q_PROPERTY(QString startPressure READ startPressure CONSTANT)
@@ -79,8 +79,8 @@ public:
QString cylinder(int idx) const;
QString trip() const;
QString tripMeta() const;
-   QString maxcns() const;
-   QString otu() const;
+   int maxcns() const;
+   int otu() const;
QString sumWeight() const;
QString getCylinder() const;
QString startPressure() const;
-- 
2.1.4

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


[PATCH] Adds missing visibility to DiveObjectHelper, so it too can be used in print templates.

2016-07-16 Thread Tim Wootton
Signed-off-by: Tim Wootton <t...@tee-jay.org.uk>
---
 core/subsurface-qt/DiveObjectHelper.cpp | 5 +
 core/subsurface-qt/DiveObjectHelper.h   | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/core/subsurface-qt/DiveObjectHelper.cpp 
b/core/subsurface-qt/DiveObjectHelper.cpp
index e71b076..fc406d6 100644
--- a/core/subsurface-qt/DiveObjectHelper.cpp
+++ b/core/subsurface-qt/DiveObjectHelper.cpp
@@ -321,6 +321,11 @@ int DiveObjectHelper::rating() const
return m_dive->rating;
 }
 
+int DiveObjectHelper::visibility() const
+{
+   return m_dive->visibility;
+}
+
 QString DiveObjectHelper::sumWeight() const
 {
weight_t sum = { 0 };
diff --git a/core/subsurface-qt/DiveObjectHelper.h 
b/core/subsurface-qt/DiveObjectHelper.h
index fd44f81..6d95d75 100644
--- a/core/subsurface-qt/DiveObjectHelper.h
+++ b/core/subsurface-qt/DiveObjectHelper.h
@@ -11,6 +11,7 @@ class DiveObjectHelper : public QObject {
Q_PROPERTY(int number READ number CONSTANT)
Q_PROPERTY(int id READ id CONSTANT)
Q_PROPERTY(int rating READ rating CONSTANT)
+   Q_PROPERTY(int visibility READ visibility CONSTANT)
Q_PROPERTY(QString date READ date CONSTANT)
Q_PROPERTY(QString time READ time CONSTANT)
Q_PROPERTY(int timestamp READ timestamp CONSTANT)
@@ -51,6 +52,7 @@ public:
int number() const;
int id() const;
int rating() const;
+   int visibility() const;
QString date() const;
timestamp_t timestamp() const;
QString time() const;
-- 
2.1.4

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


Re: DNBFS on Debian Jessie

2016-07-13 Thread Tim Wootton
On 12/07/16 23:21, Tim Wootton wrote:
> On 12/07/16 06:11, Tomaz Canabrava wrote:
>> probably the subsurface app works and was already compiled.
> Sadly not, it's built libdivecomputer,grantlee & marble and then this
> happens, didn't make it as far as a linked subsurface.
> 
>>  I think the test may have not been linked against
>> the qt core (but I don't have my computer at hand to check)

You may be right, I disabled building test altogether in CMakeLists.txt
and everything else built fine.
>>
>> Tomaz
>>
>> Em 11 de jul de 2016 20:09, "Tim Wootton" <t...@tee-jay.org.uk
>> <mailto:t...@tee-jay.org.uk>> escreveu:
>>
>> Hi all,
>>
>> has anyone built from source on Debian Jessie lately?
>> I just tried from a fresh clone, and get:
>> ~/code/subsurface/src/subsurface/build/tests/qrc_subsurface.cpp:9:28:
>> fatal error: QtCore/qglobal.h: No such file or directory
>>  #include 
>>  ^
>> compilation terminated.
>>
>> all the required Qt packages seem to be installed:
>> -- The following REQUIRED packages have been found:
>>   * Qt5Core
>>   * Qt5Xml
>>   * Qt5Network
>>   * Qt5Test
>>   * Qt5Script
>>   * Qt5Gui (required version >= 5.3.2)
>>   * Qt5Widgets
>>   * Qt5Qml (required version >= 5.3.2)
>>   * Qt5Quick
>>   * Qt5WebKit (required version >= 5.3.2)
>>   * Qt5WebKitWidgets
>>   * Qt5Svg
>>   * Qt5Sql
>>   * Qt5Concurrent
>>   * Qt5PrintSupport
>>
>> and QtCore/qglobal.h shows as installed as part of qtbase5-dev
>> $> dpkg -S qglobal.h
>> qtbase5-dev:amd64: /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h
>>
>> and it is indeed there:
>> -rw-r--r-- 1 root root 36717 Sep 11  2014
>> /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h
>>
>> any pointers where to look next? I see INCLUDE_DIRS being set in cmake
>> for grantlee marble etc, but nothing for Qt, is that because as an
>> official package in the system include paths it should just be found
>> anyway.
>>
>> cheers,
>>
>> Tim
>> ___
>> subsurface mailing list
>> subsurface@subsurface-divelog.org
>> <mailto: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: DNBFS on Debian Jessie

2016-07-12 Thread Tim Wootton
On 12/07/16 06:11, Tomaz Canabrava wrote:
> probably the subsurface app works and was already compiled.
Sadly not, it's built libdivecomputer,grantlee & marble and then this
happens, didn't make it as far as a linked subsurface.

 I think the test may have not been linked against
> the qt core (but I don't have my computer at hand to check)
> 
> Tomaz
> 
> Em 11 de jul de 2016 20:09, "Tim Wootton" <t...@tee-jay.org.uk
> <mailto:t...@tee-jay.org.uk>> escreveu:
> 
> Hi all,
> 
> has anyone built from source on Debian Jessie lately?
> I just tried from a fresh clone, and get:
> ~/code/subsurface/src/subsurface/build/tests/qrc_subsurface.cpp:9:28:
> fatal error: QtCore/qglobal.h: No such file or directory
>  #include 
>  ^
> compilation terminated.
> 
> all the required Qt packages seem to be installed:
> -- The following REQUIRED packages have been found:
>   * Qt5Core
>   * Qt5Xml
>   * Qt5Network
>   * Qt5Test
>   * Qt5Script
>   * Qt5Gui (required version >= 5.3.2)
>   * Qt5Widgets
>   * Qt5Qml (required version >= 5.3.2)
>   * Qt5Quick
>   * Qt5WebKit (required version >= 5.3.2)
>   * Qt5WebKitWidgets
>   * Qt5Svg
>   * Qt5Sql
>   * Qt5Concurrent
>   * Qt5PrintSupport
> 
> and QtCore/qglobal.h shows as installed as part of qtbase5-dev
> $> dpkg -S qglobal.h
> qtbase5-dev:amd64: /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h
> 
> and it is indeed there:
> -rw-r--r-- 1 root root 36717 Sep 11  2014
> /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h
> 
> any pointers where to look next? I see INCLUDE_DIRS being set in cmake
> for grantlee marble etc, but nothing for Qt, is that because as an
> official package in the system include paths it should just be found
> anyway.
> 
> cheers,
> 
> Tim
> ___
> subsurface mailing list
> subsurface@subsurface-divelog.org
> <mailto: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


DNBFS on Debian Jessie

2016-07-11 Thread Tim Wootton
Hi all,

has anyone built from source on Debian Jessie lately?
I just tried from a fresh clone, and get:
~/code/subsurface/src/subsurface/build/tests/qrc_subsurface.cpp:9:28:
fatal error: QtCore/qglobal.h: No such file or directory
 #include 
 ^
compilation terminated.

all the required Qt packages seem to be installed:
-- The following REQUIRED packages have been found:
  * Qt5Core
  * Qt5Xml
  * Qt5Network
  * Qt5Test
  * Qt5Script
  * Qt5Gui (required version >= 5.3.2)
  * Qt5Widgets
  * Qt5Qml (required version >= 5.3.2)
  * Qt5Quick
  * Qt5WebKit (required version >= 5.3.2)
  * Qt5WebKitWidgets
  * Qt5Svg
  * Qt5Sql
  * Qt5Concurrent
  * Qt5PrintSupport

and QtCore/qglobal.h shows as installed as part of qtbase5-dev
$> dpkg -S qglobal.h
qtbase5-dev:amd64: /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h

and it is indeed there:
-rw-r--r-- 1 root root 36717 Sep 11  2014
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h

any pointers where to look next? I see INCLUDE_DIRS being set in cmake
for grantlee marble etc, but nothing for Qt, is that because as an
official package in the system include paths it should just be found anyway.

cheers,

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


[PATCH] Updates copyright date on about dialog

2016-06-29 Thread Tim Wootton
Signed-off-by: Tim Wootton <t...@tee-jay.org.uk>
---
 qt-ui/about.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-ui/about.cpp b/qt-ui/about.cpp
index 73db74b..260ade5 100644
--- a/qt-ui/about.cpp
+++ b/qt-ui/about.cpp
@@ -15,7 +15,7 @@ SubsurfaceAbout::SubsurfaceAbout(QWidget *parent, 
Qt::WindowFlags f) : QDialog(p
  "Subsurface %1 "
  "Multi-platform divelog software"
  ""
- "Linus Torvalds, Dirk Hohndel, Tomaz 
Canabrava, and others, 2011-2015"
+ "Linus Torvalds, Dirk Hohndel, Tomaz 
Canabrava, and others, 2011-2016"
  "").arg(versionString));
 
QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), 
this);
-- 
2.8.1

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


Re: Developing and Deploying devices

2016-04-14 Thread Tim Wootton
On 14/04/16 07:05, Jeroen Massar wrote:
> On 2016-04-14 07:54, Tim Wootton wrote:
>> On 12/04/16 15:58, Dirk Hohndel wrote:
> [..]
>> The disadvantage is that a full image download is needed for each
>> upgrade, which provides an intensive to make it as minimal as possible.
>> Group A users can always side-load their favourite tools after updating.
> Binary diff's have existed for a while ;)
>
> But it is the  same situation for a a apt-get updates on a filesystem
> you know exactly what is there: you know what is there, thus you can
> upgrade that perfectly without any issues.

well yes and no, .debs run scripts on deployment, some of those take
actions depending on what they find on the system. Results can vary
based on where you started and what's happened on your system since the
last upgrade. A full image gets everyone back to a known state on each
upgrade.
>
>
> One thing to consider with such upgrades though is that one might want
> to have "dual-image", but I think that is pushing it a bit.
>
> There is a big reason why people tend to state "do not turn off the
> device while upgrading".
>
> Noting that CHIP has a boot repair mode:
> http://docs.getchip.com/#chip-boot-repair-tool
>
> Thus in the case of a 'wrong flash', we could have a tool that just
> flashes it that way as a way of recovery ;)
>
> Greets,
>  Jeroen
>
>

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


Re: Developing and Deploying devices

2016-04-13 Thread Tim Wootton
On 12/04/16 15:58, Dirk Hohndel wrote:
>
> Seriously, we need to very very very clearly separate two user groups:
>
> A) people who are comfortable installing debian on some random device
> and making all this work
> B) actual divers and users of Subsurface-mobile on their iPhone with no
> discernible knowledge of computers
>
> On every dive trip I'm on I somehow end up meeting about zero or one
> people in group A and everyone else is in group B. For group B we should
> pick ONE device, ONE solution, ONE way of doing this. Keep it as simple
> as humanly possible.
>
Just wanted to throw this in as a suggestion:

To make upgrades and upgrade-backout as seamless as possible for group B
, how about having the main software as a complete read-only chroot
image provided by the project? You'd have just enough on the bare metal
to select the latest chroot image (or last known working on failure) and
switch to it. That way it could have a one-click (or possibly no-click)
upgrade. You could keep the last 2 or 3 images for backout purposes.
This avoids the situation where devices get into a state that requires
user intervention because one or more .deb fail to apply properly.

apt-get could still be used by the project team to make the images,

I think of this more like an Android or iPhone upgrade that applies a
complete image rather than a desktop upgrade where you take individual
packages, The difference though is keeping backout images and
automatically failing back in case the new image fails load for some
reason.

This also has the advantage that someone troubleshooting will be able to
know, for a particular version, exactly what software the user has on
the device without worrying about which packages they may or may not
have picked up along the way.

The disadvantage is that a full image download is needed for each
upgrade, which provides an intensive to make it as minimal as possible.
Group A users can always side-load their favourite tools after updating.

cheers,

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


Re: Advanced alternative to cloud storage in Subsurface mobile

2016-02-19 Thread Tim Wootton
On 19/02/16 17:13, Dirk Hohndel wrote:

> Subsurface is open source - you all are capable of building your own APK
> with whatever features you desire. If you decide to make such APKs
> publicly available (be it as download or through the play store) I
> politely request that they are NOT called Subsurface, Subsurface-mobile,
> or something closely derived from those names, simply to avoid end user
> confusion - but since this isn't a registered trademark I of course cannot
> force you to do so.
Supersurface seems to be available on the Play Store ;-)

For clarity, you cite 2 reasons, user confusion & bugs/testing, if there
was a way to completely avoid the user confusion could you be persuaded?

>
>
> /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


Re: Advanced alternative to cloud storage in Subsurface mobile

2016-02-18 Thread Tim Wootton
On 18/02/16 15:18, Dirk Hohndel wrote:
> On Thu, Feb 18, 2016 at 03:13:56PM +0100, Anton Lundin wrote:
>> Hi.
>>
>> I was thinking about adding a "advanced settings" to the cloud storage
>> credentials screen, were one could point the app to a local xml file, or
>> a local git repo. That way one can test the app without the need to push
>> data to the could storage first.
>>
>> Also, the mobile app is built with libgit2 with libssh support, so
>> adding support for using a alternative git url with a ssh key would be
>> really nice to.
>>
>> All the bits are basically already there, from the desktop app, so
>> getting this working in the mobile app would as usual just be a matter
>> of building a Qml ui for it.
>>
>>
>> I'm currently out of a working laptop so I won't be implementing this
>> anytime soon, but just floating the idea here. Anyone against?
> This falls into the "I understand why you want this, but I don't want this
> in the app that will be in the app store" category.
>
> Yes, this is really useful for six people who know what they are doing.
I must be one of those 6 people, this turns out to be exactly the
feature  was waiting for. I'd like to be able to access my dives from my
home server on my mobile (over VPN when I'm away from home). I'd
resigned myself to the fact that the Andoid app wasn't going to be for
me because it only worked with the one anointed data store .

Hands up, who are the other five?

> No, this is not useful and only will cause confusion, bugs, the need for
> more testing, and endless explaining to users "no, this isn't what you are
> looking for" to our target audience.
>
> /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


Re: Translations

2015-10-04 Thread Tim Wootton
Transifex support reckon string 584 is the offending item, but I'm not
sure exactly what needs to be done to fix it.

cheers,

Tim

On 04/10/15 16:52, Dirk Hohndel wrote:
> Hello dear translators.
> 
> I am amazed how many languages are nearly complete (apparently 99% is now
> complete - I have not been able to find out what the one non-existand
> string is). Of the top 12 languages in use (from what I can tell tracking
> the checkins with my server) we have seven in excellent shape and five
> more that need a little more work.
> 
> Russian is almost there, Polish, Swedish, and Dutch are missing between
> 170 and 250 strings, Chinese is missing 290 strings.
> 
> ALL of the languages have received a new string that I just pushed (sorry
> I didn't do this earlier - this is for splitting dives that was
> implemented in the last two days in order to make things more useful for
> free divers).
> 
> As I'm about to release Beta 3 I'm declaring a string freeze. I'm going to
> try hard not to add any more strings before the 4.5 release (but I'll
> admit that my track record with keeping string freezes is not all that
> stellar). But I will send out updates if I really have to reneg on this
> promise.
> 
> I was hoping to release 4.5 fairly soon, maybe as early as Wednesday as
> response to Beta 2 has been almost non-existant and I don't see much value
> in dragging my feet much longer. If this is really hard for any
> translators, please drop me note and we can talk about what would work for
> you.
> 
> 
> Everyone, if you are native or fluent in a language other than American
> English, please run Subsurface in the apropriate localization and please
> help us complete these translations. There are quite a few more
> translations that are in decent shape and wouldn't take a lot of work to
> be complete. Romanian, Bulgarian, Swiss German, Czech, Estonian...
> 
> I know we have quite a few users in Israel but sadly our Hebrew
> translation is far from complete so I'm guessing that the number of Hebrew
> users that I see is actually under-representing the real user base.
> 
> As always, thanks for all the hard work making Subsurface easier to use
> for people who aren't as comfortable in English. It's really appreciate by
> me and even more so by those users.
> 
> /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


Re: Translations

2015-10-04 Thread Tim Wootton
On 04/10/15 22:43, Lubomir I. Ivanov wrote:
> On 5 October 2015 at 00:05, Tim Wootton <t...@tee-jay.org.uk> wrote:
>> Transifex support reckon string 584 is the offending item, but I'm not
>> sure exactly what needs to be done to fix it.
>>
> quite odd as there is nothing wrong with that particular string ("Location: 
> ").
> also Qt Linguist does not complain...
They have it as:

, %n dive(s) here)
the string numbers don't change do they?

>
> what did they say was the exact error?
Here's what they said:

string 584 is missing from the list of strings that are displayed
on Transifex Editor. That's why the percentage of source language
"English" is less that 100%. 

The string 584 is a pluralized string and its statement should be like
the following: 

 
 
 , %n dive(s) here)
 , %n
dive(s)
here)
 

So in order to solve the issue, you could download the source file and
upload it again. The system will recognise it and the string will be
displayed in the list of strings too.

I suppose that in your initial file one of the following statements
was included: 

 
 
 , %n dive(s) here)
 , %n
dive(s) here)
 

or:

 
 
 , %n dive(s) here)
 
 


>
> lubomir
> --
>

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


Re: [PATCH 2/3] Changes to bring pO2 representation in line with CodingStyle

2015-09-05 Thread Tim Wootton
On 05/09/15 15:12, Dirk Hohndel wrote:
> I took the other two, this one I'm not excited about. It basically changes
> a) variable names (yeah, maybe not wrong, but too likely to break things
> in subtle ways right now)
true, not smart this close to release, sorry
> b) as Anton pointed out, changes file format
my bad, should have thought of backward compatibility
> 
> So I'll skip this one entirely, not just the file format changes.
fair enough


> 
> /D
> 
> On Fri, Sep 04, 2015 at 11:25:34PM +0100, Tim Wootton wrote:
>> Signed-off-by: Tim Wootton <t...@tee-jay.org.uk>
>> ---
>>  configuredivecomputer.cpp | 14 +++---
>>  configuredivecomputerthreads.cpp  | 28 ++--
>>  devicedetails.cpp |  6 +++---
>>  devicedetails.h   |  6 +++---
>>  parse-xml.c   | 30 +++---
>>  qt-ui/configuredivecomputerdialog.cpp | 20 ++--
>>  qt-ui/configuredivecomputerdialog.ui  | 12 ++--
>>  7 files changed, 58 insertions(+), 58 deletions(-)
>>
>> diff --git a/configuredivecomputer.cpp b/configuredivecomputer.cpp
>> index 65cf3ce..0b74d01 100644
>> --- a/configuredivecomputer.cpp
>> +++ b/configuredivecomputer.cpp
>> @@ -171,8 +171,8 @@ bool ConfigureDiveComputer::saveXMLBackup(QString 
>> fileName, DeviceDetails *detai
>>  writer.writeTextElement("GfHigh", QString::number(details->gfHigh));
>>  writer.writeTextElement("GfLow", QString::number(details->gfLow));
>>  writer.writeTextElement("PressureSensorOffset", 
>> QString::number(details->pressureSensorOffset));
>> -writer.writeTextElement("PpO2Min", QString::number(details->ppO2Min));
>> -writer.writeTextElement("PpO2Max", QString::number(details->ppO2Max));
>> +writer.writeTextElement("PpO2Min", QString::number(details->pO2Min));
>> +writer.writeTextElement("PpO2Max", QString::number(details->pO2Max));
>>  writer.writeTextElement("FutureTTS", 
>> QString::number(details->futureTTS));
>>  writer.writeTextElement("CcrMode", QString::number(details->ccrMode));
>>  writer.writeTextElement("DecoType", QString::number(details->decoType));
>> @@ -189,7 +189,7 @@ bool ConfigureDiveComputer::saveXMLBackup(QString 
>> fileName, DeviceDetails *detai
>>  writer.writeTextElement("ModWarning", 
>> QString::number(details->modWarning));
>>  writer.writeTextElement("DynamicAscendRate", 
>> QString::number(details->dynamicAscendRate));
>>  writer.writeTextElement("GraphicalSpeedIndicator", 
>> QString::number(details->graphicalSpeedIndicator));
>> -writer.writeTextElement("AlwaysShowppO2", 
>> QString::number(details->alwaysShowppO2));
>> +writer.writeTextElement("AlwaysShowpO2", 
>> QString::number(details->alwaysShowpO2));
>>  
>>  // Suunto vyper settings.
>>  writer.writeTextElement("Altitude", QString::number(details->altitude));
>> @@ -439,10 +439,10 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString 
>> fileName, DeviceDetails *de
>>  details->pressureSensorOffset = 
>> keyString.toInt();
>>  
>>  if (settingName == "PpO2Min")
>> -details->ppO2Min = keyString.toInt();
>> +details->pO2Min = keyString.toInt();
>>  
>>  if (settingName == "PpO2Max")
>> -details->ppO2Max = keyString.toInt();
>> +details->pO2Max = keyString.toInt();
>>  
>>  if (settingName == "FutureTTS")
>>  details->futureTTS = keyString.toInt();
>> @@ -492,8 +492,8 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString 
>> fileName, DeviceDetails *de
>>  if (settingName == "GraphicalSpeedIndicator")
>>  details->graphicalSpeedIndicator = 
>> keyString.toInt();
>>  
>> -if (settingName == "AlwaysShowppO2")
>> -details->alwaysShowppO2 = keyString.toInt();
>> +if (settingName == "AlwaysShowpO2")
>> +details->alwaysShowpO2 = keyString.toInt();
>>  
>>  if (s

[PATCH 3/3] More style and readability changes Changes to capitalisation to comply with coding style Changes to make some blocks of english sound a bit better

2015-09-04 Thread Tim Wootton
Signed-off-by: Tim Wootton <t...@tee-jay.org.uk>
---
 qt-ui/configuredivecomputerdialog.ui | 12 ++--
 qt-ui/divelogexportdialog.cpp|  2 +-
 qt-ui/downloadfromdivecomputer.cpp   |  2 +-
 qt-ui/downloadfromdivecomputer.ui|  2 +-
 qt-ui/mainwindow.cpp |  8 
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/qt-ui/configuredivecomputerdialog.ui 
b/qt-ui/configuredivecomputerdialog.ui
index d040849..f8e1e29 100644
--- a/qt-ui/configuredivecomputerdialog.ui
+++ b/qt-ui/configuredivecomputerdialog.ui
@@ -904,7 +904,7 @@
 
  
   
-   Mod warning
+   MOD warning
   
  
 
@@ -918,7 +918,7 @@
 
  
   
-   Dynamic ascend rate
+   Dynamic ascent rate
   
  
 
@@ -971,7 +971,7 @@
 
  
   
-l/m
+ℓ/min
   
   
5
@@ -987,7 +987,7 @@
 
  
   
-l/m
+ℓ/min
   
   
5
@@ -2216,7 +2216,7 @@
 
  
   
-l/m
+ℓ/min
   
   
5
@@ -2232,7 +2232,7 @@
 
  
   
-l/m
+ℓ/min
   
   
5
diff --git a/qt-ui/divelogexportdialog.cpp b/qt-ui/divelogexportdialog.cpp
index cf48a62..7a406b9 100644
--- a/qt-ui/divelogexportdialog.cpp
+++ b/qt-ui/divelogexportdialog.cpp
@@ -196,7 +196,7 @@ void DiveLogExportDialog::on_buttonBox_accepted()
// the non XSLT exports are called directly above, the XSLT 
based ons are called here
if (!stylesheet.isEmpty()) {
future = QtConcurrent::run(export_dives_xslt, 
filename.toUtf8(), ui->exportSelected->isChecked(), 
ui->CSVUnits_2->currentIndex(), stylesheet.toUtf8());
-   
MainWindow::instance()->getNotificationWidget()->showNotification(tr("Please 
Wait, Exporting..."), KMessageWidget::Information);
+   
MainWindow::instance()->getNotificationWidget()->showNotification(tr("Please 
wait, exporting..."), KMessageWidget::Information);

MainWindow::instance()->getNotificationWidget()->setFuture(future);
}
}
diff --git a/qt-ui/downloadfromdivecomputer.cpp 
b/qt-ui/downloadfromdivecomputer.cpp
index 063e2aa..92f2455 100644
--- a/qt-ui/downloadfromdivecomputer.cpp
+++ b/qt-ui/downloadfromdivecomputer.cpp
@@ -101,7 +101,7 @@ DownloadFromDCWidget::DownloadFromDCWidget(QWidget *parent, 
Qt::WindowFlags f) :
ui.downloadCancelRetryButton->setText(tr("Download"));
 
 #if defined(BT_SUPPORT)
-   ui.bluetoothMode->setText(tr("Choose Bluetooth Download mode"));
+   ui.bluetoothMode->setText(tr("Choose Bluetooth download mode"));
btDeviceSelectionDialog = 0;
ui.chooseBluetoothDevice->setEnabled(ui.bluetoothMode->isChecked());
connect(ui.bluetoothMode, SIGNAL(stateChanged(int)), this, 
SLOT(enableBluetoothMode(int)));
diff --git a/qt-ui/downloadfromdivecomputer.ui 
b/qt-ui/downloadfromdivecomputer.ui
index f232967..b1f1520 100644
--- a/qt-ui/downloadfromdivecomputer.ui
+++ b/qt-ui/downloadfromdivecomputer.ui
@@ -119,7 +119,7 @@
  
   

-Choose Bluetooth Download mode
+Choose Bluetooth download mode

   
  
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 1d98f2b..b19a230 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -1568,10 +1568,10 @@ void MainWindow::loadFiles(const QStringList fileNames)
if (min_datafile_version >0 && min_datafile_version < 
DATAFORMAT_VERSION) {
QMessageBox::warning(this, tr("Opening datafile from older 
version"),
 tr("You opened a data file from an older 
version of Subsurface. We recommend "
-   "to read the manual to learn about the 
changes in the new version, especially "
-   "about dive site management which 
changed significantly.\n"
-   "Subsurface already tried to 
prepopulate the data but it might be worth "
-   "while to take a look at the new dive 
site management system and to make "
+   "you read the manual to learn about the 
changes in the new version, especially "
+

[PATCH 1/3] Style and readability tweaks to btdeviceselectiondialog

2015-09-04 Thread Tim Wootton
Signed-off-by: Tim Wootton <t...@tee-jay.org.uk>
---
 qt-ui/btdeviceselectiondialog.cpp | 10 +-
 qt-ui/btdeviceselectiondialog.ui  |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/qt-ui/btdeviceselectiondialog.cpp 
b/qt-ui/btdeviceselectiondialog.cpp
index a2c6764..4204593 100644
--- a/qt-ui/btdeviceselectiondialog.cpp
+++ b/qt-ui/btdeviceselectiondialog.cpp
@@ -24,7 +24,7 @@ BtDeviceSelectionDialog::BtDeviceSelectionDialog(QWidget 
*parent) :
ui->deviceAddressLabel->setText(tr("Address:"));
ui->deviceNameLabel->setText(tr("Name:"));
ui->deviceState->setText(tr("Bluetooth powered on"));
-   ui->changeDeviceState->setText(tr("Turn On/Off"));
+   ui->changeDeviceState->setText(tr("Turn on/off"));
ui->discoveredDevicesLabel->setText(tr("Discovered devices"));
ui->scan->setText(tr("Scan"));
ui->clear->setText(tr("Clear"));
@@ -47,7 +47,7 @@ BtDeviceSelectionDialog::BtDeviceSelectionDialog(QWidget 
*parent) :
if (ulRetCode != SUCCESS) {
QMessageBox::StandardButton warningBox;
warningBox = QMessageBox::critical(this, "Bluetooth",
-  tr("Could not initialize the 
Winsock version 2.2"), QMessageBox::Ok);
+  tr("Could not initialize 
Winsock version 2.2"), QMessageBox::Ok);
return;
}
 
@@ -158,7 +158,7 @@ void BtDeviceSelectionDialog::on_save_clicked()
 
 void BtDeviceSelectionDialog::on_clear_clicked()
 {
-   ui->dialogStatus->setText(tr("Remote devices list was cleaned."));
+   ui->dialogStatus->setText(tr("Remote devices list was cleared."));
ui->discoveredDevicesList->clear();
ui->save->setEnabled(false);
 
@@ -297,7 +297,7 @@ void BtDeviceSelectionDialog::displayPairingMenu(const 
QPoint )
 #else
QMenu menu(this);
QAction *pairAction = menu.addAction(tr("Pair"));
-   QAction *removePairAction = menu.addAction(tr("Remove Pairing"));
+   QAction *removePairAction = menu.addAction(tr("Remove pairing"));
QAction *chosenAction = 
menu.exec(ui->discoveredDevicesList->viewport()->mapToGlobal(pos));
QListWidgetItem *currentItem = ui->discoveredDevicesList->currentItem();
QBluetoothDeviceInfo currentRemoteDeviceInfo = 
currentItem->data(Qt::UserRole).value();
@@ -395,7 +395,7 @@ void 
BtDeviceSelectionDialog::deviceDiscoveryError(QBluetoothDeviceDiscoveryAgen
errorDescription = tr("The Bluetooth adaptor is powered off, 
power it on before doing discovery.");
break;
case QBluetoothDeviceDiscoveryAgent::InputOutputError:
-   errorDescription = tr("Writing or reading from the device 
resulted in an error.");
+   errorDescription = tr("Writing to or reading from the device 
resulted in an error.");
break;
default:
 #if defined(Q_OS_WIN)
diff --git a/qt-ui/btdeviceselectiondialog.ui b/qt-ui/btdeviceselectiondialog.ui
index 95c09d1..4aa83cf 100644
--- a/qt-ui/btdeviceselectiondialog.ui
+++ b/qt-ui/btdeviceselectiondialog.ui
@@ -190,7 +190,7 @@
  
 
 
- Turn On/Off
+ Turn on/off
 

   
-- 
2.1.4

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


[PATCH 2/3] Changes to bring pO2 representation in line with CodingStyle

2015-09-04 Thread Tim Wootton
Signed-off-by: Tim Wootton <t...@tee-jay.org.uk>
---
 configuredivecomputer.cpp | 14 +++---
 configuredivecomputerthreads.cpp  | 28 ++--
 devicedetails.cpp |  6 +++---
 devicedetails.h   |  6 +++---
 parse-xml.c   | 30 +++---
 qt-ui/configuredivecomputerdialog.cpp | 20 ++--
 qt-ui/configuredivecomputerdialog.ui  | 12 ++--
 7 files changed, 58 insertions(+), 58 deletions(-)

diff --git a/configuredivecomputer.cpp b/configuredivecomputer.cpp
index 65cf3ce..0b74d01 100644
--- a/configuredivecomputer.cpp
+++ b/configuredivecomputer.cpp
@@ -171,8 +171,8 @@ bool ConfigureDiveComputer::saveXMLBackup(QString fileName, 
DeviceDetails *detai
writer.writeTextElement("GfHigh", QString::number(details->gfHigh));
writer.writeTextElement("GfLow", QString::number(details->gfLow));
writer.writeTextElement("PressureSensorOffset", 
QString::number(details->pressureSensorOffset));
-   writer.writeTextElement("PpO2Min", QString::number(details->ppO2Min));
-   writer.writeTextElement("PpO2Max", QString::number(details->ppO2Max));
+   writer.writeTextElement("PpO2Min", QString::number(details->pO2Min));
+   writer.writeTextElement("PpO2Max", QString::number(details->pO2Max));
writer.writeTextElement("FutureTTS", 
QString::number(details->futureTTS));
writer.writeTextElement("CcrMode", QString::number(details->ccrMode));
writer.writeTextElement("DecoType", QString::number(details->decoType));
@@ -189,7 +189,7 @@ bool ConfigureDiveComputer::saveXMLBackup(QString fileName, 
DeviceDetails *detai
writer.writeTextElement("ModWarning", 
QString::number(details->modWarning));
writer.writeTextElement("DynamicAscendRate", 
QString::number(details->dynamicAscendRate));
writer.writeTextElement("GraphicalSpeedIndicator", 
QString::number(details->graphicalSpeedIndicator));
-   writer.writeTextElement("AlwaysShowppO2", 
QString::number(details->alwaysShowppO2));
+   writer.writeTextElement("AlwaysShowpO2", 
QString::number(details->alwaysShowpO2));
 
// Suunto vyper settings.
writer.writeTextElement("Altitude", QString::number(details->altitude));
@@ -439,10 +439,10 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString 
fileName, DeviceDetails *de
details->pressureSensorOffset = 
keyString.toInt();
 
if (settingName == "PpO2Min")
-   details->ppO2Min = keyString.toInt();
+   details->pO2Min = keyString.toInt();
 
if (settingName == "PpO2Max")
-   details->ppO2Max = keyString.toInt();
+   details->pO2Max = keyString.toInt();
 
if (settingName == "FutureTTS")
details->futureTTS = keyString.toInt();
@@ -492,8 +492,8 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString 
fileName, DeviceDetails *de
if (settingName == "GraphicalSpeedIndicator")
details->graphicalSpeedIndicator = 
keyString.toInt();
 
-   if (settingName == "AlwaysShowppO2")
-   details->alwaysShowppO2 = keyString.toInt();
+   if (settingName == "AlwaysShowpO2")
+   details->alwaysShowpO2 = keyString.toInt();
 
if (settingName == "Altitude")
details->altitude = keyString.toInt();
diff --git a/configuredivecomputerthreads.cpp b/configuredivecomputerthreads.cpp
index f775b8b..19a83be 100644
--- a/configuredivecomputerthreads.cpp
+++ b/configuredivecomputerthreads.cpp
@@ -598,8 +598,8 @@ static dc_status_t read_ostc3_settings(dc_device_t *device, 
DeviceDetails *m_dev
READ_SETTING(OSTC3_SAFETY_STOP, safetyStop);
READ_SETTING(OSTC3_GF_HIGH, gfHigh);
READ_SETTING(OSTC3_GF_LOW, gfLow);
-   READ_SETTING(OSTC3_PPO2_MIN, ppO2Min);
-   READ_SETTING(OSTC3_PPO2_MAX, ppO2Max);
+   READ_SETTING(OSTC3_PPO2_MIN, pO2Min);
+   READ_SETTING(OSTC3_PPO2_MAX, pO2Max);
READ_SETTING(OSTC3_FUTURE_TTS, futureTTS);
READ_SETTING(OSTC3_CCR_MODE, ccrMode);
READ_SETTING(OSTC3_DECO_TYPE, decoType);
@@ -616,7 +616,7 @@ static dc_status_t read_ostc3_settings(dc_device_t *device, 
DeviceDetails *m_dev
READ_SETTING(OSTC3_MOD_WARNING, modWarning);
READ_SETTING(OSTC3_DYNAMIC_ASCEND_RATE, dynamicAscendR

[PATCH 2/2] Capitalistion of GPS

2015-09-04 Thread Tim Wootton
Signed-off-by: Tim Wootton <t...@tee-jay.org.uk>
---
 parse-xml.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/parse-xml.c b/parse-xml.c
index 3230154..c4b6d34 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -1086,7 +1086,7 @@ static int uddf_dive_match(struct dive *dive, const char 
*name, char *buf)
 /*
  * This parses "floating point" into micro-degrees.
  * We don't do exponentials etc, if somebody does
- * gps locations in that format, they are insane.
+ * GPS locations in that format, they are insane.
  */
 degrees_t parse_degrees(char *buf, char **end)
 {
@@ -1202,7 +1202,7 @@ static void gps_in_dive(char *buffer, struct dive *dive)
ds->latitude.udeg / 100.0, 
ds->longitude.udeg / 100.0,
latitude.udeg / 100.0, longitude.udeg / 
100.0);
const char *coords = printGPSCoords(latitude.udeg, 
longitude.udeg);
-   ds->notes = add_to_string(ds->notes, 
translate("gettextFromC", "multiple gps locations for this dive site; also 
%s\n"), coords);
+   ds->notes = add_to_string(ds->notes, 
translate("gettextFromC", "multiple GPS locations for this dive site; also 
%s\n"), coords);
free((void *)coords);
} else {
ds->latitude = latitude;
-- 
2.1.4

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


[PATCH 1/2] Style & spelling changes to printing

2015-09-04 Thread Tim Wootton
Signed-off-by: Tim Wootton <t...@tee-jay.org.uk>
---
 qt-ui/printoptions.cpp | 4 ++--
 qt-ui/templateedit.ui  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/qt-ui/printoptions.cpp b/qt-ui/printoptions.cpp
index cb944f9..f976567 100644
--- a/qt-ui/printoptions.cpp
+++ b/qt-ui/printoptions.cpp
@@ -147,7 +147,7 @@ void PrintOptions::on_editButton_clicked()
 
 void PrintOptions::on_importButton_clicked()
 {
-   QString filename = QFileDialog::getOpenFileName(this, tr("Import 
Template file"), "",
+   QString filename = QFileDialog::getOpenFileName(this, tr("Import 
template file"), "",
tr("HTML files 
(*.html)"));
if (filename.isEmpty())
return;
@@ -160,7 +160,7 @@ void PrintOptions::on_importButton_clicked()
 
 void PrintOptions::on_exportButton_clicked()
 {
-   QString filename = QFileDialog::getSaveFileName(this, tr("Export 
Template files as"), "",
+   QString filename = QFileDialog::getSaveFileName(this, tr("Export 
template files as"), "",
tr("HTML files 
(*.html)"));
if (filename.isEmpty())
return;
diff --git a/qt-ui/templateedit.ui b/qt-ui/templateedit.ui
index 322193c..60a0fc7 100644
--- a/qt-ui/templateedit.ui
+++ b/qt-ui/templateedit.ui
@@ -11,7 +11,7 @@

   
   
-   Edit Template
+   Edit template
   
   

@@ -162,7 +162,7 @@
  
   

-Color pallet
+Color palette

   
  
-- 
2.1.4

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


[PATCH 1/3] Typos, punctuation and capitalisation.

2015-01-25 Thread Tim Wootton
Signed-off-by: Tim Wootton t...@tee-jay.demon.co.uk
---
 qt-ui/divelogimportdialog.cpp | 4 ++--
 qt-ui/downloadfromdivecomputer.ui | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
index 1b37258..26b6b2d 100644
--- a/qt-ui/divelogimportdialog.cpp
+++ b/qt-ui/divelogimportdialog.cpp
@@ -23,7 +23,7 @@ const DiveLogImportDialog::CSVAppConfig 
DiveLogImportDialog::CSVApps[CSVAPPS] =
 ColumnNameProvider::ColumnNameProvider(QObject *parent) : 
QAbstractListModel(parent)
 {
columnNames  tr(Dive #)  tr(Date)  tr(Time)  
tr(Duration)  tr(Location)  tr(GPS)  tr(Weight)  tr(Cyl. 
size)  tr(Start pressure) 
-  tr(End pressure)  tr(Max depth)  tr(Avg depth) 
 tr(Divemaster)  tr(Buddy)  tr(Notes)  tr(Tags)  tr(Air 
temp.)  tr(Water temp.) 
+  tr(End pressure)  tr(Max. depth)  tr(Avg. 
depth)  tr(Divemaster)  tr(Buddy)  tr(Notes)  tr(Tags)  
tr(Air temp.)  tr(Water temp.) 
   tr(O₂)  tr(He)  tr(Sample time)  tr(Sample 
depth)  tr(Sample temperature)  tr(Sample pO₂)  tr(Sample CNS)  
tr(Sample NDL) 
   tr(Sample TTS)  tr(Sample stopdepth)  tr(Sample 
pressure);
 }
@@ -486,7 +486,7 @@ void DiveLogImportDialog::loadFileContents(int value, 
whatChanged triggeredBy)
if (CSVApps[value].stopdepth != -1  CSVApps[value].stopdepth 
 currColumns.count())
headers.replace(CSVApps[value].stopdepth, tr(Sample 
stopdepth));
if (CSVApps[value].pressure != -1  CSVApps[value].pressure  
currColumns.count())
-   headers.replace(CSVApps[value].pressure, tr(Samples 
pressure));
+   headers.replace(CSVApps[value].pressure, tr(Sample 
pressure));
}
 
f.reset();
diff --git a/qt-ui/downloadfromdivecomputer.ui 
b/qt-ui/downloadfromdivecomputer.ui
index 8d3f5c1..359b42f 100644
--- a/qt-ui/downloadfromdivecomputer.ui
+++ b/qt-ui/downloadfromdivecomputer.ui
@@ -207,7 +207,7 @@
 /sizepolicy
/property
property name=text
-stringDownloaded Dives/string
+stringDownloaded dives/string
/property
   /widget
  /item
-- 
2.1.4

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


[PATCH 2/3] Heartrate sounds better than heart beat

2015-01-25 Thread Tim Wootton
Signed-off-by: Tim Wootton t...@tee-jay.demon.co.uk
---
 qt-ui/profile/diveplotdatamodel.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-ui/profile/diveplotdatamodel.cpp 
b/qt-ui/profile/diveplotdatamodel.cpp
index cdf17fe..a4d1a90 100644
--- a/qt-ui/profile/diveplotdatamodel.cpp
+++ b/qt-ui/profile/diveplotdatamodel.cpp
@@ -144,7 +144,7 @@ QVariant DivePlotDataModel::headerData(int section, 
Qt::Orientation orientation,
case AMBPRESSURE:
return tr(Ambient pressure);
case HEARTBEAT:
-   return tr(Heart beat);
+   return tr(Heart rate);
case GFLINE:
return tr(Gradient factor);
case INSTANT_MEANDEPTH:
-- 
2.1.4

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


Re: [PATCH] Modification to the User Survey UI

2014-12-16 Thread Tim Wootton
On 16/12/14 17:12, Nikhil Bharadwaj wrote:
 Dirk, Tomaz,

 I have a small suggestion for you.

 Can you have a button in one of the dropdown menus which opens the
 user survey form. As of now the user survey opens automatically, and
 once if you press cancel and never, the user can never again give the
 user survey unless he resets all properties to default.

 So it would be great if you can have a button which opens up the User
 Survey form.
or they could just try
./subsurface --survey
almost the 1st thing in the manual ;-)

 Thanks
 Nikhil Bharadwaj


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


Re: [PATCH] Modification to the User Survey UI

2014-12-16 Thread Tim Wootton
On 16/12/14 17:41, Tomaz Canabrava wrote:


 On Tue, Dec 16, 2014 at 3:36 PM, Tim Wootton t...@tee-jay.demon.co.uk
 mailto:t...@tee-jay.demon.co.uk wrote:

 On 16/12/14 17:12, Nikhil Bharadwaj wrote:
 Dirk, Tomaz,

 I have a small suggestion for you.

 Can you have a button in one of the dropdown menus which opens
 the user survey form. As of now the user survey opens
 automatically, and once if you press cancel and never, the user
 can never again give the user survey unless he resets all
 properties to default.

 So it would be great if you can have a button which opens up the
 User Survey form.
 or they could just try
 ./subsurface --survey
 almost the 1st thing in the manual ;-)


 That's a no-go for windows users, unfortunately.
Does windows not allow cmdline args an more? parse_argument seems to
have windows specific args in the list.
  


 Thanks
 Nikhil Bharadwaj



 ___
 subsurface mailing list
 subsurface@subsurface-divelog.org
 mailto: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] Modification to the User Survey UI

2014-12-16 Thread Tim Wootton
On 16/12/14 18:08, Tomaz Canabrava wrote:


 On Tue, Dec 16, 2014 at 4:05 PM, Tim Wootton t...@tee-jay.demon.co.uk
 mailto:t...@tee-jay.demon.co.uk wrote:


 Does windows not allow cmdline args an more? parse_argument seems
 to have windows specific args in the list.


 it does have, what it doesn't thave is non-tech users that are able to
 navigate directory using the cmd and call an app by it's executable name.
  

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


Re: Debian, Fedora, OpenSUSE people...

2014-12-15 Thread Tim Wootton

On 15/12/14 07:21, Dirk Hohndel wrote:



So how would I try this. I know, stupid question... but what's the repo
name that I would give to a clean Debian install to test, say, the trusty
PPA?

Is this of any help?
http://www.webupd8.org/2014/10/how-to-add-launchpad-ppas-in-debian-via.html

cheers,

Tim

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


Re: [PATCH 1/5] Consistent representation of O₂

2014-11-25 Thread Tim Wootton

On 25/11/14 15:34, Dirk Hohndel wrote:

Not sure what happened here, but look at the patch included below.
Unsurprisingly, git didn't like that very much.

Can you check if there's something odd going on with your encoding
settings? I have never had problems like this with patches from you
before, so something must have changed. Different mail program maybe? Can
you use git send-email ?
That was git send-email so I've done something else stupid.I'll go dig. 
Was it all 5 or just that 1st patch?


cheers,

Tim


/D



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


[PATCH 1/5] Consistent representation of O₂

2014-11-25 Thread Tim Wootton
Signed-off-by: Tim Wootton t...@tee-jay.demon.co.uk
---
 qt-ui/configuredivecomputerdialog.ui | 18 +-
 qt-ui/divelogimportdialog.ui |  2 +-
 qt-ui/models.cpp |  2 +-
 5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/libdivecomputer.c b/libdivecomputer.c
index 18cb76b..a288c3b 100644
--- a/libdivecomputer.c
+++ b/libdivecomputer.c
@@ -121,7 +121,7 @@ static void handle_event(struct divecomputer *dc, struct 
sample *sample, dc_samp
QT_TRANSLATE_NOOP(gettextFromC, transmitter), 
QT_TRANSLATE_NOOP(gettextFromC, violation), 
QT_TRANSLATE_NOOP(gettextFromC, bookmark), 
QT_TRANSLATE_NOOP(gettextFromC, surface), QT_TRANSLATE_NOOP(gettextFromC, 
safety stop),
QT_TRANSLATE_NOOP(gettextFromC, gaschange), 
QT_TRANSLATE_NOOP(gettextFromC, safety stop (voluntary)), 
QT_TRANSLATE_NOOP(gettextFromC, safety stop (mandatory)),
QT_TRANSLATE_NOOP(gettextFromC, deepstop), 
QT_TRANSLATE_NOOP(gettextFromC, ceiling (safety stop)), 
QT_TRANSLATE_NOOP3(gettextFromC, below floor, event showing dive is below 
deco floor and adding deco time), QT_TRANSLATE_NOOP(gettextFromC, 
divetime),
-   QT_TRANSLATE_NOOP(gettextFromC, maxdepth), 
QT_TRANSLATE_NOOP(gettextFromC, OLF), QT_TRANSLATE_NOOP(gettextFromC, 
PO2), QT_TRANSLATE_NOOP(gettextFromC, airtime), 
QT_TRANSLATE_NOOP(gettextFromC, rgbm), QT_TRANSLATE_NOOP(gettextFromC, 
heading),
+   QT_TRANSLATE_NOOP(gettextFromC, maxdepth), 
QT_TRANSLATE_NOOP(gettextFromC, OLF), QT_TRANSLATE_NOOP(gettextFromC, 
pO₂), QT_TRANSLATE_NOOP(gettextFromC, airtime), 
QT_TRANSLATE_NOOP(gettextFromC, rgbm), QT_TRANSLATE_NOOP(gettextFromC, 
heading),
QT_TRANSLATE_NOOP(gettextFromC, tissue level warning), 
QT_TRANSLATE_NOOP(gettextFromC, gaschange), 
QT_TRANSLATE_NOOP(gettextFromC, non stop time)
};
const int nr_events = sizeof(events) / sizeof(const char *);
diff --git a/qt-ui/configuredivecomputerdialog.ui 
b/qt-ui/configuredivecomputerdialog.ui
index dd6bce3..134c435 100644
--- a/qt-ui/configuredivecomputerdialog.ui
+++ b/qt-ui/configuredivecomputerdialog.ui
@@ -913,7 +913,7 @@
   /column
   column
property name=text
-string%O2/string
+string%O₂/string
/property
   /column
   column
@@ -998,7 +998,7 @@
   /column
   column
property name=text
-string%O2/string
+string%O₂/string
/property
   /column
   column
@@ -1121,7 +1121,7 @@
 item row=2 column=2
  widget class=QLabel name=label_35
   property name=text
-   stringO2 in calibration gas/string
+   stringO₂ in calibration gas/string
   /property
  /widget
 /item
@@ -1213,14 +1213,14 @@
 item row=4 column=2
  widget class=QLabel name=label_29
   property name=text
-   stringppO₂ max/string
+   stringpO₂ max/string
   /property
  /widget
 /item
 item row=5 column=2
  widget class=QLabel name=label_30
   property name=text
-   stringppO₂ min/string
+   stringpO₂ min/string
   /property
  /widget
 /item
@@ -2119,7 +2119,7 @@
   /column
   column
property name=text
-string%O2/string
+string%O₂/string
/property
   /column
   column
@@ -2204,7 +2204,7 @@
   /column
   column
property name=text
-string%O2/string
+string%O₂/string
/property
   /column
   column
@@ -2352,14 +2352,14 @@
 item row=3 column=2
  widget class=QLabel name=label_60
   property name=text
-   stringppO₂ max/string
+   stringpO₂ max/string
   /property
  /widget
 /item
 item row=4 column=2
  widget class=QLabel name=label_61
   property name=text
-   stringppO₂ min/string
+   stringpO₂ min/string
   /property
  /widget
 /item
diff --git a/qt-ui/divelogimportdialog.ui b/qt-ui/divelogimportdialog.ui
index 9fd5e44..47a0e54 100644
--- a/qt-ui/divelogimportdialog.ui
+++ b/qt-ui/divelogimportdialog.ui
@@ -118,7 +118,7 @@
   item row=3 column=0
widget class=QCheckBox name=po2CheckBox
 property name=text
- stringPO2/string
+ stringpO₂/string
 /property
/widget
   /item
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index f22a1f6..2bb40ef

Re: [PATCH 1/5] Consistent representation of O₂

2014-11-25 Thread Tim Wootton

On 25/11/14 15:36, Dirk Hohndel wrote:

On Tue, Nov 25, 2014 at 07:34:49AM -0800, Dirk Hohndel wrote:

Not sure what happened here, but look at the patch included below.
Unsurprisingly, git didn't like that very much.

Can you check if there's something odd going on with your encoding
settings? I have never had problems like this with patches from you
before, so something must have changed. Different mail program maybe? Can
you use git send-email ?


Ha. Looking at your headers that's what you did. Linus, any idea why git
send-email would send out such junk?


just ran git format-patch again and the files came out looking way 
better - not sure what went on there, don't think I did anything different.




/D



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


[PATCH 5/5] Corrected diveplan as it's dive plan everywhere else in planner

2014-11-24 Thread Tim Wootton
Signed-off-by: Tim Wootton t...@tee-jay.demon.co.uk
---
 qt-ui/plannerSettings.ui | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-ui/plannerSettings.ui b/qt-ui/plannerSettings.ui
index 3e323eb..f99be98 100644
--- a/qt-ui/plannerSettings.ui
+++ b/qt-ui/plannerSettings.ui
@@ -525,7 +525,7 @@
   item row=3 column=0
widget class=QCheckBox name=verbatim_plan
 property name=text
- stringVerbatim diveplan/string
+ stringVerbatim dive plan/string
 /property
/widget
   /item
-- 
2.1.1

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


[PATCH 4/5] More O₂

2014-11-24 Thread Tim Wootton
Signed-off-by: Tim Wootton t...@tee-jay.demon.co.uk
---
 file.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/file.c b/file.c
index 07774b1..f6b415e 100644
--- a/file.c
+++ b/file.c
@@ -679,9 +679,9 @@ int parse_txt_file(const char *filename, const 
char *csv)
//End of O2 calibration Event: 
0 = OK, 2 = Failed, rest of dive setpoint 1.0
if (value == 2)
add_event(dc, 
cur_sampletime, 0, SAMPLE_FLAGS_END, 0,
-  
QT_TRANSLATE_NOOP(gettextFromC, O2 calibration failed));
+   
QT_TRANSLATE_NOOP(gettextFromC, O₂ calibration failed));
add_event(dc, cur_sampletime, 
0, SAMPLE_FLAGS_END, 0,
-  
QT_TRANSLATE_NOOP(gettextFromC, O2 calibration));
+   
QT_TRANSLATE_NOOP(gettextFromC, O₂ calibration));
break;
case 25:
//25 Max Ascent depth
@@ -690,7 +690,7 @@ int parse_txt_file(const char *filename, const 
char *csv)
case 31:
//Start of O2 calibration 
Event
add_event(dc, cur_sampletime, 
0, SAMPLE_FLAGS_BEGIN, 0,
-  
QT_TRANSLATE_NOOP(gettextFromC, O2 calibration));
+   
QT_TRANSLATE_NOOP(gettextFromC, O₂ calibration));
break;
case 37:
//Remaining dive time #2?
-- 
2.1.1

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


[PATCH 1/5] Consistent representation of O₂

2014-11-24 Thread Tim Wootton
Signed-off-by: Tim Wootton t...@tee-jay.demon.co.uk
---
 qt-ui/configuredivecomputerdialog.ui | 18 +-
 qt-ui/divelogimportdialog.ui |  2 +-
 qt-ui/models.cpp |  2 +-
 5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/qt-ui/configuredivecomputerdialog.ui 
b/qt-ui/configuredivecomputerdialog.ui
index dd6bce3..134c435 100644
--- a/qt-ui/configuredivecomputerdialog.ui
+++ b/qt-ui/configuredivecomputerdialog.ui
@@ -913,7 +913,7 @@
   /column
   column
property name=text
-string%O2/string
+string%O₂/string
/property
   /column
   column
@@ -998,7 +998,7 @@
   /column
   column
property name=text
-string%O2/string
+string%O₂/string
/property
   /column
   column
@@ -1121,7 +1121,7 @@
 item row=2 column=2
  widget class=QLabel name=label_35
   property name=text
-   stringO2 in calibration gas/string
+   stringO₂ in calibration gas/string
   /property
  /widget
 /item
@@ -1213,14 +1213,14 @@
 item row=4 column=2
  widget class=QLabel name=label_29
   property name=text
-   stringppO₂ max/string
+   stringpO₂ max/string
   /property
  /widget
 /item
 item row=5 column=2
  widget class=QLabel name=label_30
   property name=text
-   stringppO₂ min/string
+   stringpO₂ min/string
   /property
  /widget
 /item
@@ -2119,7 +2119,7 @@
   /column
   column
property name=text
-string%O2/string
+string%O₂/string
/property
   /column
   column
@@ -2204,7 +2204,7 @@
   /column
   column
property name=text
-string%O2/string
+string%O₂/string
/property
   /column
   column
@@ -2352,14 +2352,14 @@
 item row=3 column=2
  widget class=QLabel name=label_60
   property name=text
-   stringppO₂ max/string
+   stringpO₂ max/string
   /property
  /widget
 /item
 item row=4 column=2
  widget class=QLabel name=label_61
   property name=text
-   stringppO₂ min/string
+   stringpO₂ min/string
   /property
  /widget
 /item
diff --git a/qt-ui/divelogimportdialog.ui b/qt-ui/divelogimportdialog.ui
index 9fd5e44..47a0e54 100644
--- a/qt-ui/divelogimportdialog.ui
+++ b/qt-ui/divelogimportdialog.ui
@@ -118,7 +118,7 @@
   item row=3 column=0
widget class=QCheckBox name=po2CheckBox
 property name=text
- stringPO2/string
+ stringpO₂/string
 /property
/widget
   /item
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index f22a1f6..2bb40ef 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -75,7 +75,7 @@ CylindersModel::CylindersModel(QObject *parent) : 
changed(false),
rows(0)
 {
//  enum {REMOVE, TYPE, SIZE, WORKINGPRESS, START, END, O2, HE, 
DEPTH};
-  setHeaderDataStrings(QStringList()tr(Type)  tr(Size)  
tr(Work press.)  tr(Start press.)  tr(End press.)  trUtf8(O 
UTF8_SUBSCRIPT_2 %)  tr(He%)
+   setHeaderDataStrings(QStringList()tr(Type)  
tr(Size)  tr(Work press.)  tr(Start press.)  tr(End press.)  
tr(O₂%)  tr(He%)
tr(Switch at)  tr(Use));
 
initTrashIcon();
-- 
2.1.1

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


Re: [PATCH 1/3] Support American date format on manual CSV import

2014-11-24 Thread Tim Wootton


On 25/11/14 05:31, Thiago Macieira wrote:

On Tuesday 25 November 2014 06:26:06 Miika Turkia wrote:

On Tue, Nov 25, 2014 at 1:08 AM, Davide DB dbdav...@gmail.com wrote:

If I correctly understand the problem here is that the CSV file could have
a different locale respect the Subsurface hosting computer.


The date format might be from a spreadsheet, based on locale, but as well
it could be the format the user has chosen himself. I don't think that
locale can be used to reliably guess the date format so I fear that I have
to follow Dirk's suggestion on this one and add a checkbox on the GUI to
decide on whether it is day or month first.
or mandate the user convert any dates to ISO 8601 prior to import, 
that's not ambiguous, and regardless of TZ or preference, people seem to 
recognise and understand it.


Make it a date format. It's entirely possible to have yy/mm/dd too, so
12/11/10 may not be in 2010.







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