Commit graph

1964 commits

Author SHA1 Message Date
Dirk Hohndel
51d2088021 Merge branch 'map-providers' 2013-03-01 23:11:41 -08:00
Dirk Hohndel
d1c394e51f Make the map provider choice a preference
Not all of the providers seem to work for me (Yahoo Satellite doesn't
appear to give me any data), but for now I'll leave most of them in.
We can later decide to offer only some of them.

It might be more fun to be able to pick the provider directly from the map
widget. But for now I kept this in the preferences which seemed to be a
good place for it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-01 23:09:12 -08:00
Robert C. Helling
f7d373bae6 Remember window pane positions
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-01 16:22:29 -08:00
Linus Torvalds
36422d2f9e Fix saving of po2 values
It was very broken, although it just happened to work for the values
dirk had in his own XML file (0 and 0.800 bar).  Because of confusion
with number of digits it would save 1.080 bar as 1.80 bar.

Use our "show_milli()" helper for showing things that are in milli-units
(which is what we tend to use for most of our values: mK, mbar, mm, ml)

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-01 08:02:21 -08:00
Lubomir I. Ivanov
c3b3ab9af7 windows.c: use ANSI for subsurface_unset_conf()
We may not write config variables with UTF-8 characters so the wchar_t
conversation in subsurface_unset_conf() is not needed.

This patch also attempts to improve subsurface_get_conf_bool()
and subsurface_get_conf_int() or better consitentcy with the other OS
files. For both functions return -1 if config key is not found.
Previouosly there was a check for that in  function get_from_registry().

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-01 08:01:31 -08:00
Lubomir I. Ivanov
b2ba7917ab Request a minimal height for the notes in the dive edit dialog
This sould give the notes text box around 8 lines of text.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28 19:57:50 -08:00
Lubomir I. Ivanov
0fc089c669 windows.c: Added support for "int" configuration storage
This patch addes body to the functions subsurface_get_conf_int()
and subsurface_set_conf_int().

It also makes some small changes:
- subsurface_get_conf_bool() now uses subsurface_get_conf_int()
- for retrieving DWORDS we would only need RegQueryValueEx,
thus the wchar_t conversations aren't really needed, unless
we start storing integers in keys with UTF-8 characters in the name.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28 19:56:37 -08:00
Lubomir I. Ivanov
c0c88ba69d Added support for a scrollable area in the dive info dialog
This patch puts the contents of the dive edit dialog inside
a scroll container, with a minimal size equal to the default dialog
size when no equipment is added. If more tanks and weights entries
are added, a scrollbar will appear on the right and the dialog
will become scrollable.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28 16:21:21 -08:00
Henrik Brautaset Aronsen
b24d0f2f60 Add MacOS support to window geometry save/restore
Also make sure the config is flushed to disk.

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28 15:39:49 -08:00
Amit Chaudhuri
d742d7b391 Remember window size
This commit has gone through a few iterations and I trimmed it down to
what I consider the "conservative minimum" - so this only stores window
size, not window position. And in my mind that's the more relevant part,
anyway. Have your window manager position the window at a "smart" spot on
your screen...

Signed-off-by: Amit Chaudhuri <amit.k.chaudhuri@gmail.com>
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28 15:36:27 -08:00
Kévin Raymond
cfdde3ff63 Move translations to transifex.com
Translation management is done through Transifex now for easy translations.
Translators should note that fuzzy strings are not used any more since
Transifex does not handle it (by choice).

In order to pull translations, you need a transifex.com account.

Signed-off-by: Kévin Raymond <shaiton@fedoraproject.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28 15:25:47 -08:00
Dirk Hohndel
381bde5fad Better editing of existing dives
This change makes it possible to edit date and time of a dive from the
normal dive edit dialog (it turns the label at the top of the dialog into
a button and allows the user to change the time from there - this seems
much more obvious than the 'right-click in the divelist' approach).

Additionally, if the dive has only one divecomputer and no samples (which
likely means that the dive was manually entered in Subsurface or imported
from another divelog where it was manually entered) then we allow editing
of duration, max depth and avg depth as well.

This fixes #75  (well, with the exception of water temperature.... we
don't allow editing of that at all... I guess that should become a new
trac item...)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28 15:02:35 -08:00
Sergey Starosek
a186944a64 Update Russian translation
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28 07:51:12 -08:00
Dirk Hohndel
e5f2f3e65f Better Bluetooth device support on Mac
We now show the correct device name for Bluetooth connected dive computers in
the drop down menu in the Download dialog.

This also updates the corresponding chapter in user manual.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28 07:43:31 -08:00
Dirk Hohndel
6855be0f1c OSX: also need to add the CoreServices framework to linker
We had this before - it appears that some versions of OSX need us to explicitly
list the frameworks we are using during the linking stage while others are
perfectly happy without that. But since listing them doesn't appear to hurt
this commit should be safe.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28 05:56:23 -08:00
Amit Chaudhuri
92fbbd4c22 Fix compilation problem with LaunchServices on OSX
You cannot include the LSOpen.h directly on OSX - it is too far down in
the System hierarchy to locate. Instead we include the umbrella header
CoreServices.h which finds it for us.

Signed off by Amit Chaudhuri <amit.k.chaudhuri@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28 05:52:29 -08:00
Dirk Hohndel
11a3f3f7f7 Change layout of dive editing dialog
We had a report that on small screen systems like netbooks with a vertical
screen resolution of only 600 pixels Subsurface has usability issues, as
the dive editing dialog is taller than the screen.

While on some OSs the dialog can at least be moved around so the user can
fill it out and click OK or Cancel, on others (Windows XP) that does not
appear to be the case.

This small change simply takes the equipment part of this dialog and
positions it next to the dive info part instead of below it. This appears
to solve the immediate issue - but by adding the maximum number of tanks
and weight systems the dialog can still grow beyond 600 pixels vertically,
so we may have to add a scroll widget in here as well.

But for now this should be a nice improvement (and I find it reasonably
pleasing on a large display as well).

Fixes #67

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28 05:48:03 -08:00
Eduardo Ramalho
834dc9f5cb Add Portuguese translation
Most of the translated phrases have more characters than in english. But I
verified the Subsurface user interface, and there are no strange side effects.

I had just a doubt about "trip" translation. I used portuguese word
equivalent to "expedition". Some of the diving related words we don't
translate. Even "buddy" is the word used on local diving boats!

Signed-off-by: Eduardo Ramalho <eduardo.ramalho@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28 05:38:41 -08:00
Dirk Hohndel
a12320f145 Revert "Add Portuguese translation"
This reverts commit af9ba96da4.

I had applied this to directory with work-in-progress code that was now
mixed up with Eduardo's translation work. I'll re-apply just his
translation instead.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28 05:36:01 -08:00
Robert C. Helling
026c351b36 Svedish translation glitch
This patch fixes a Unicode mishap in the Svedish localization that breaks
the build process.

Signed-off-by: Robert Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28 05:30:39 -08:00
Jan Schubert
4dc14c9051 Documentation: Add Mac related info to the bluetooth section
Signed-off-by: Jan Schubert <Jan.Schubert@GMX.li>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28 05:25:50 -08:00
Dirk Hohndel
7fd7dba465 README: fix typo
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 15:36:35 -08:00
Fredrik Steen
766d48f047 Spelling fixes for sv_SE
Fixed a spelling error.

Signed-off-by: Fredrik Steen <fredrik@ppo2.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 15:28:32 -08:00
Dirk Hohndel
dcb56a6167 Update the README
We can now build on Debian Squeeze again.
We also point to both the stable version and the latest development
sources in the README file.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 15:25:17 -08:00
Eduardo Ramalho
af9ba96da4 Add Portuguese translation
Most of the translated phrases have more characters than in english. But I
verified the Subsurface user interface, and there are no strange side effects.

I had just a doubt about "trip" translation. I used portuguese word
equivalent to "expedition". Some of the diving related words we don't
translate. Even "buddy" is the word used on local diving boats!

Signed-off-by: Eduardo Ramalho <eduardo.ramalho@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 15:15:34 -08:00
Lubomir I. Ivanov
a31af7419f Added back support for versions of GTK pre 2.24
Some functions in combo_box_with_model_and_entry() are only
available to GTK 2.24 and newer. This patch adds only one #if branch,
but probably adds support to a number of outdated distributions,
such as Debian 6.0.4 and Ubuntu 10.04.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 15:04:06 -08:00
Dirk Hohndel
9e8aaad133 When manually adding a dive allow user to set avg depth as well
So far we only allowed setting the max depth.

This changes the layout of the entry widget and makes our helper function
create_date_time_widget return the hbox in which it positions the time
entry. I plan to reuse this later when allowing to edit the duration as
well as the start date and time under certain circumstances.

This is a small part of a feature request; see #75

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 14:46:47 -08:00
Dirk Hohndel
4c04fe5316 Add all dive computers to the device_info_list
Calling set_dc_nickname() only added a new entry if there was a conflict
with an existing one - which works fine if we are reading a file saved by
Subsurface, as there the device_info_list is populated at parse time, but
fails for data imported from other sources.

Fixes #74

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 13:55:15 -08:00
Amit Chaudhuri
698a6c5345 Preparation for color printing
this patch adds a 3rd column to the media array of rgba so we now have one
each for screen, b/w & color printing. I have defaulted to using the
same color printing & screen, but this can be altered anytime.

I have checked that the application still compiles and prints.  The print
out (colour option selected) shows the deco ceiling steps in pink but
everything else appears grey scale. Further work will be required to apply
the colours to the print out, although I'm not yet sure what that involves.

Signed-off-by: Amit Chaudhuri <amit.k.chaudhuri@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 10:43:08 -08:00
Miika Turkia
438299ff55 Parse ISO 8601 time format
This is an XSLT implementation of a function to parse the ISO 8601
datetime format used in uddf.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 10:39:03 -08:00
Dirk Hohndel
d2f9ee8d45 Planner: don't use the planned dive for relative start time
The existing code has an embarrassing error in its logic. It picked the
last dive in the table and made sure that the relative start time was
either N minutes after 'now' or N minutes after the last dive ends,
whichever is later.

But once the planned dive has been added to the dive list (so once we have
a first depth and time entry, that last dive now is the planned dive. And
every time focus left the start time field the start time would be
recalculated relative to the end of the dive we are currently planning.

With this patch we instead simply remember the number of the last dive
just as we create the dive plan and use that to look up the end time of
previous dive. I could have just stored that end time but I figured maybe
there could be other reasons to go back to the last dive before the
planned dive, so this seemed cleaner.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 10:22:51 -08:00
Lubomir I. Ivanov
97a43003c4 Planner: use time.h and utc_mktime() to retrive the current time (no TZ)
This should do the same as the GTimeZone variant.
Also works on Windows.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 09:58:53 -08:00
Miika Turkia
38036a31d0 Handle one more date/time format for UDDF import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 09:11:56 -08:00
Miika Turkia
cc96860165 MacDive import improvement
MacDive reports non-existent values as zero and in Imperial units it
would be 32F. This patch will try to make an educated guess whether we
have the proper temperature and pressure readings and ignore the zero
fields if it seems that there are no real samples from the dive
computer.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 09:03:17 -08:00
Linus Torvalds
b54dacbeb2 Ensure all strings stored in XML are escaped correctly
This does escaping / quoting for everything I found. Some of it was safe
(the divecomputer model is supplied from libdivecomputer, and none of them
have single quotes _yet_, afaik), but with this there are no '%s' strings
left except for the ones used by the helper functions (for "pre" and
"post" strings).

It also takes some of our existing uses of show_utf8(), and removes
the redundant "check if the string is NULL or empty". show_utf8() does
that internally.

Fixes #73

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 08:27:20 -08:00
Cristian Ionescu-Idbohrn
eb3376d612 Suppress the "/bin/sh: 1: cannot open version.h: No such file" noise.
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 07:44:10 -08:00
Cristian Ionescu-Idbohrn
6a29da800b Add target `all' to avoid "target order is important" confusion.
Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 07:43:57 -08:00
Cristian Ionescu-Idbohrn
1c290ebe5b Unused variable warning when building without libosmgpsmap.
info.c: In function 'dive_info_widget':
info.c:759:48: warning: unused variable 'image' [-Wunused-variable]

Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 07:42:55 -08:00
Cristian Ionescu-Idbohrn
f04d9c5656 Small typo correction.
One 'r' removed.

Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 07:41:40 -08:00
Miika Turkia
ecdb4cd522 Fix MacDive import to convert Imperial temperature
MacDive import needs to convert temperatures to Celcius. However, it
seems that MacDive reports no reading as 32F (and probably 0C when using
Metric). There is no way of knowing whether we have no reading or
the temperature is actually zero, so we use the given temperature
currently as 0C is a valid temperature...

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 06:44:34 -08:00
Dirk Hohndel
4b0d7ac72f Update ReleaseNotes for 3.0.1
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-26 13:29:23 -08:00
Jan Schubert
16d9f3007f Documentation: fixed some typos in bluettoth part of user manual
[Dirk Hohndel: some fixes of the fixes...]

Signed-off-by: Jan Schubert <Jan.Schubert@GMX.li>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-26 13:03:54 -08:00
Dirk Hohndel
fd9a927ded Update versions to 3.0.1
almost forgot

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-26 12:57:59 -08:00
Jan Schubert
bd6a33f4bc Documentation: add pictures for Bluetooth setup
Signed-off-by: Jan Schubert <Jan.Schubert@GMX.li>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-26 12:50:39 -08:00
Dirk Hohndel
ea57927554 Documentation: update formatting
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-26 12:44:41 -08:00
Jan Schubert
e687e81ca4 extend user manual for setting up bluetooth communication.
This extends the user manual for setting up bluetooth communication.

Signed-off-by: Jan Schubert <Jan.Schubert@GMX.li>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-26 12:39:09 -08:00
Kévin Raymond
3c58e7071f French translations update
Signed-off-by: Kévin Raymond <shaiton@fedoraproject.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-26 12:25:13 -08:00
Dirk Hohndel
1fd2091759 Get make to rebuild Subsurface by default again
To quote Linus:

  Move the rule for the new version thing down.

  Plain "make" will try to make the first target in the Makefile.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-26 12:19:01 -08:00
Dirk Hohndel
881baafc26 DivingLog import: keep the dive computer name around
We simply set up the model attribute.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-26 11:51:35 -08:00
Dirk Hohndel
6d69325185 For divecomputers without samples don't lose other data for profile
We create a fake divecomputer in order to draw a reasonable profile, but
when setting that up we used an empty divecomputer instead of starting
with the one that we have. This lost data (e.g., the model name of the
dc).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-26 11:44:24 -08:00