Commit graph

250 commits

Author SHA1 Message Date
Dirk Hohndel
cdbdf40848 Clear 'force' flag when retrying download
This may seem like an esoteric corner case, but it will actually happen
reliably when re-downloading dives from the Uemis SDA:

If the user selects "Force downloada of all dives" in the "Download from
divecomputer" dialog and if the SDA runs out of space and needs to be
unmounted and remounted, then for the 'Retry' the 'force' flag should be
cleared - or the user will once again start from the first dive which
almost certainly is not what they expect.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-19 16:13:05 -08:00
Dirk Hohndel
a32f3857cb Tweaks to the Uemis debugging code
Make it less verbose to make it easier to follow the progress along.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-19 15:04:59 -08:00
Dirk Hohndel
fb60143d35 Mark divelist changed when downloading from Uemis SDA
This mirrors commit 59929fdb5d2a "Mark divelist changed as we download
dives from a dive computer" which only fixed things for the
libdivecomputer case.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-19 15:04:50 -08:00
Linus Torvalds
4ce0ce153a Add support for zooming using the scroll-wheel
This allows zooming in with the scroll-wheel if you have one (or the
two-finger scrolling on a touchpad).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-12 18:53:01 -08:00
Linus Torvalds
9e2b8edb4d Make the "click-to-zoom" use a 2.5x zoom factor
I think I prefer the 2.5x zoom over the pure doubling.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-11 17:21:37 +01:00
Dirk Hohndel
502e2b0e86 Add more data to our tool-tip display in the profile window
This shows the values for all the graphs that are shown (depth,
temperature, tank pressure, pO2, pN2m pHe), but also correctly doesn't
display them when they are turned off or no data is available (prior to
this commit, tank pressure was always shown, even if no pressure samples
were available for the dive).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-11 17:18:14 +01:00
Dirk Hohndel
96fb31bc01 Zoom with left mouse button
Linus convinced me that I was wrong to modify his commit 24690ce35f81
"Initial not-so-pretty profile zoom support" and so this changes it back
to use the left mouse button for zooming. It turns out that on some
touchpads there's a very nice way to hold down the click with one finger
and then pan with another finger, but that does not work if you do a two
finger click (and use one of those or a third to pan).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-11 14:45:33 +01:00
Linus Torvalds
01e8984d7d Create tool-tip with depth/pressure for the whole profile area
This extends on our current tooltip logic (which shows events when you
mouse over them) to show tooltips for the whole profile area.

If you mouse over an event, that is still shown in the tooltip, but
even in the absense of events, the tooltip will be active, and mousing
over the profile area will show the time, depth and pressure.

This can certainly be improved upon further, but even in this form it is
useful.

Fixes #9

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-11 14:44:10 +01:00
Dirk Hohndel
fe4f13f184 Add special download modes to force updates from the divecomputer
This will hopefully not be something we need often, but if we improve
support for a divecomputer (either in libdivecomputer or in our native
Uemis code or even in the way we handle (and potentially discard) events),
then it is extremely useful to be able to say "re-download things
from the divecomputer and for things that were not edited in Subsurface,
don't try to merge the data (which gives BAD results if for example you
fixed a bug in the depth calculation in libdivecomputer) but instead
simply take the samples, the events and some of the other unedited data
straight from the download".

This commit implements just that - a "force download" checkbox in the
download dialog that makes us reimport all dives from the dive computer,
even the ones we already have, and an "always prefer downloaded dive"
checkbox that then tells Subsurface not to merge but simply to take the
data from the downloaded dive - without overwriting the things we have
already edited in Subsurface (like location, buddy, equipment, etc).

This, as a precaution, refuses to merge dives that don't have identical
start times. So if you have edited the date / time of a dive or if you
have previously merged your dive with a different dive computer (and
therefore modified samples and events) you are out of luck.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-11 14:29:26 +01:00
Linus Torvalds
78ad07c72e Initial not-so-pretty profile zoom support
You can press the left mouse-button on the profile and drag the mouse
around to zoom in on a specific area. Releasing the mouse button unzooms.

Yeah, everybody wants rubber-banding, but I have reached the end of my
willingness to fight gtk for more details. Some day.

[Dirk Hohndel:	changed this to use the right mouse button instead of the
		left which seemed just terribly unnatural]

References ticket 9

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-11 11:55:43 +01:00
Dirk Hohndel
836bbad7a6 Add threshold feature for partial pressure graphs
The tec diving preference pane now allows us to set a partial pressure
threshold for each of the three gases. When the partial pressure surpasses
that value, the graph becomes red.

Fixes #12

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-10 17:58:42 +01:00
Linus Torvalds
3d8c1e50fc Fix default filename handling errors
The default filename handling is broken in two different ways:

 (a) if we start subsurface with a non-existing file, we warn about
the inability to read that file, and then we exit without setting the
default filename.

This is broken because it means that if the user (perhaps by mistake,
by pressing ^S) now saves the file, he will overwrite the default
filename, even though that was *not* the file we read, and *not* the
file that subsurface was started with.

So just set the default filename even for a failed file open.

The exact same logic is true of a failed parse of an XML file that we
successfully opened. We do *not* want to leave the old default
filename in place just because the XML parsing failed, and possibly
then overwriting some file that was never involved with that failure
in the first place. So just get rid of all the logic to push the
filename saving into the XML parsing layer, it has zero relevance at
that point.

 (b) if we do replace the default filename with a NULL file, we need
to set that even if we cannot do a strdup() on the NULL.

This fixes both errors.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-10 16:02:05 +01:00
Dirk Hohndel
6ad73a8f04 Improve logic handling events
We now throw away redundant events, just as we throw away other redundant
data coming from the dive computer. Events are considered redundant if
they are less than 61 seconds apart and identical.

This also improves the display of the remaining events in the profile as
we now show the value of the event, if it is present (for example for a
deco event we show the duration of the deepest stop).

Finally, for events that define a range (so they set the beginning flag
and assume and end flag some time later) we no loger show the triangle but
assume that some other code handles visualizing them (as happens for the
ceiling events).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-10 11:54:15 +01:00
Dirk Hohndel
ed620a2e83 Merge branch 'po2'
Plotting pO2 / pN2 / PHe
2012-11-06 08:48:51 +01:00
Dirk Hohndel
41930e1edd Fix incorrect variable reuse bug in preferences dialog
This was introduced in commit ee803ef5d85b "Change preferences into a
notebook and add second page for tec settings"

In order to be able to get the new default XML file name back from the
button, we need to keep that variable around and not overwrite it with
more buttons for the tec preferences page.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-05 20:15:45 -08:00
Lubomir I. Ivanov
a9f44a133d Prevent UI errors while the the import thread is running
While the import thread is running it is possible to:
1) click the [x] button of the "download dialog".
To prevent that, we attach a "delete-event" signal to no-op function.

2) to interact with the main window, once the "accept" event is triggered.
To prevent that, we make sure that the window is set back to "modal".

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-05 09:28:17 -08:00
Lubomir I. Ivanov
27f1339079 Trim the device name in the download dialog, if necessary
On Windows, device names can end up being <drive-letter> (<drive-label>).
In such a case we are only interested in the <drive-letter> part, when
passing this value to libdivecomputer.

This patch provides a method to trim all text in parentheses and also
any leading and trailing whitespace.

An important addition is enabling back the user to enter a device
manually even it's absent in the combo box list. This device is
then stored and retrieved as the default device, but not stored
in the device list (dc_device_selector()).

As a side effect this change prevents the download dialog closing,
when a user-entered device is not one of the found devices via
subsurface_fill_device_list().

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-05 09:27:46 -08:00
Dirk Hohndel
bdc6b6ba24 Change preferences into a notebook and add second page for tec settings
Not sure this is the best naming scheme (General Settings / Tec Settings)
but it's a start.

The idea is to have the settings that a recreational diver might care
about on the first page, and all the other stuff on the second one. Let's
see how this works out long term. For now I moved OTU over and added
toggles for the different partial pressure graphs (only the pO2 one is
implemented so far).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-01 11:11:05 -07:00
Dirk Hohndel
072b4f743c Merge branch 'dc-device-selector'
Bring the device selector (when downloading from a dive computer) into
master.
2012-10-31 16:53:05 -07:00
Dirk Hohndel
029db4aae2 Add depth scale to the dive profile
This is intended to be unobtrusive, but add more information for people
who aren't satisfied with the numeric value we put inside the plot to mark
local peaks and troughs.

See ticket #9

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-29 10:56:20 -07:00
Dirk Hohndel
2de6f79635 Improve the dive computer device selection
We try to identify devices that are connected and their matching device
names (and mount paths in the case of the Uemis Zurich). Those are
presented as a drop down menu to choose from. The user can still override
this by simply entering a different device / path name.

On Windows this is not functional. How do I find out which drive letter
corresponds to the USB device named "UEMISSDA"? Similarly we need code
that finds serial ports that are present. For now we once again default
to COM3 (so this isn't a step back, but of course it's far from what we
want).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-27 21:12:14 -07:00
Stéphane Raimbault
ac723ace81 Missing white-space in Select Events title
Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-25 11:40:43 -07:00
Dirk Hohndel
f5ba851c1b Hopefully the last update to the po files before the release
This one breaks with my preference to separate generated changes from
content changes - I wanted to get the new comment next to the
translator-credits text that I added to every .po file. This way the
people who worked on these translations at least get shown in the About
box. But a simple grep on the diff will show you that this is indeed the
only set of changes that I made.

git diff HEAD^ | grep ^+ | grep -v -e^+# -e^+++ -ePOT-Creation

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-21 21:12:51 -07:00
Dirk Hohndel
44eb54ea77 Mark menu entries that open another dialog with "..."
This is a very common standard in desktop programs - if a menu entry
immediately causes an action (like Close or New or Toggle Autogroup) then
it doesn't have the "..."; others that open a secondary dialog (like Open
or Import / Download) are marked with "...".

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-21 00:48:38 -07:00
Dirk Hohndel
c6d713bb4d Improved About dialog
Add a link to the GPL, a link to the homepage, an opportunity for the
translator to be listed (this requires the translations to translate the
phrase "translator-credits" with the names of the translators - kinda
nifty).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-20 22:39:40 -07:00
Lubomir I. Ivanov
55f08bfeab Use subsurface_os_feature_available() to check for unicode stars support
Mainly affecting older Windows (such as XP), which do not have a more
fully featured unicode fonts installed, such as Arial Unicode MS.

With this patch we do a runtime check of the OS version in a couple of
places and if the OS is old, we use the asterix character and spaces instead
of the unicode star characters.

Linux and OSX should be unaffected by this change unless
subsurface_os_feature_available() returns FALSE for UTF8_FONT_WITH_STARS
at some point.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-19 21:14:15 -07:00
Dirk Hohndel
0e7246b0b4 Fix another bug where we make assumptions about the length of a string
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-16 09:01:04 -07:00
Dirk Hohndel
45e84618f5 Make translations of menu entries explicit
It appears that at least for Norwegian the translations of the stock menu
entries was missing. This patch adds those as explicit strings and merges
those new strings into the .po files.

The translations need to be updated in separate commits.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-11 23:08:45 +09:00
Dirk Hohndel
99846da77f Conversion to gettext to allow localization
This is just the first step - convert the string literals, try to catch
all the places where this isn't possible and the program needs to convert
string constants at runtime (those are the N_ macros).

Add a very rough first German localization so I can at least test what I
have done. Seriously, I have never used a localized OS, so I am certain
that I have many of the 'standard' translations wrong. Someone please take
over :-)

Major issues with this:

- right now it hardcodes the search path for the message catalog to be
  ./locale - that's of course bogus, but it works well while doing initial
  testing. Once the tooling support is there we just should use the OS
  default.

- even though de_DE defaults to ISO-8859-15 (or ISO-8859-1 - the internets
  can't seem to agree) I went with UTF-8 as that is what Gtk appears to
  want to use internally. ISO-8859-15 encoded .mo files create funny
  looking artefacts instead of Umlaute.

- no support at all in the Makefile - I was hoping someone with more
  experience in how to best set this up would contribute a good set of
  Makefile rules - likely this will help fix the first issue in that it
  will also install the .mo file(s) in the correct place(s)

  For now simply run

  msgfmt -c -o subsurface.mo deutsch.po

  to create the subsurface.mo file and then move it to
  ./locale/de_DE.UTF-8/LC_MESSAGES/subsurface.mo

  If you make changes to the sources and need to add new strings to be
  translated, this is what seems to work (again, should be tooled through
  the Makefile):

  xgettext -o subsurface-new.pot -s -k_ -kN_ --add-comments="++GETTEXT" *.c
  msgmerge -s -U po/deutsch.po subsurface-new.pot

  If you do this PLEASE do one commit that just has the new msgid as
  changes in line numbers create a TON of diff-noise. Do changes to
  translations in a SEPARATE commit.

- no testing at all on Windows or Mac
  It builds on Windows :-)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-11 10:03:03 +09:00
Dirk Hohndel
a2afe41280 A file that we import should never become the default file we save to
Only files that are opened should be considered r/w. Files that are
imported should be treated as if they were r/o.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-09 21:50:16 +09:00
Dirk Hohndel
b4c11a7ed3 Turn menu and button images on regardless of OS settings.
Right now the menu and button images are a distribution choice - some
have them on, some have them off. I kinda like them and think that even on
OSs that have them off by default this doesn't look out of place (as other
apps clearly do the same).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-06 05:26:55 +09:00
Lubomir I. Ivanov
b272fb8c3b Fixed some memory leaks related to string configuration entries
Each time we retrieve a string configuration entry via
subsurface_get_conf(), all the multiplatform methods in linux.c,
macos.c, windows.c allocate memory for the returned value.

In gtk-gui.c, lets try to release the memory at:
default_dive_computer_vendor, default_dive_computer_product, divelist_font
before assigning a new address to these pointers.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-05 23:44:37 +09:00
Henrik Brautaset Aronsen
fec749c1b4 Rename Import XML File menu entry
Renamed to "Import XML File(s)", since we can import more than one file.

H

From 8f9b11d940d903316dcf4d023e327f365e4f4ccb Mon Sep 17 00:00:00 2001
From: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Date: Tue, 2 Oct 2012 11:38:56 +0200
Subject: [PATCH] Rename Import XML File menu entry

Renamed to "Import XML File(s)", since we can import more than one file.

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-02 11:11:21 -07:00
Lubomir I. Ivanov
fa5afc697e Fix memory leaks related to dive_trip->location
When creating a new dive_trip from a dive, we should probably
always copy the location via strdup(). However we then have to take
care of the de-allocation in divelist.c:delete_trip()
and gtk-gui.c:file_close().

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-01 20:56:17 -07:00
Lubomir I. Ivanov
cfefa0206d Destroy the divelist (tree) before calling gtk_main_quit()
Added new function dive_list_destroy() in divelist.c

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-01 20:55:28 -07:00
Lubomir I. Ivanov
0559a6a783 Fixed some small memory leaks
Looks like a GtkEntryCompletion object created with
gtk_entry_completion_new() should be unreferenced after usage
(e.g. post gtk_entry_set_completion())

In info.c:get_combo_box_entry_text(), moved the free(..) line outside,
so that we can free regardless.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-01 14:06:46 -07:00
Dirk Hohndel
946d9c7166 ENOTENOUGHCOFFEE
Third attempt to get this trivial memory leak fix right.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-30 09:12:53 -07:00
Dirk Hohndel
02bfd2d9ea Better fix for one of the memory leaks
The return value of subsurface_get_conf is a const void * - so we shouldn't
just assign it to a variable where we know it will be changed. Instead we
duplicate the string and free the original one. A little less efficient but
cleaner.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-30 09:01:15 -07:00
Dirk Hohndel
24c6197c10 Fix a number of obvious memory leaks
Just the result of cppcheck and valgrind...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-29 20:58:26 -07:00
Dirk Hohndel
12ca6112e5 Counting is hard
When updating the "You have usnaved change..." string I didn't pay
attention and missed the fact that we used it's hard coded length above to
allocate a large enough buffer.

Thanks you, Valgrind.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-29 20:17:08 -07:00
Lubomir I. Ivanov
45d6d6ac71 Keep the "Add/Edit Cylinder & Weight" dialogs on top
This is the same issue as 882cb159a4 (although now we
don't have "Import XML Files" within a dialog). It applies when
in the "Dive info" dialog.

There is some sort of a GTK bug on Ubuntu 12.04 with GTK 2.24.10 that
prevents us from using the gtk_window_set_accept_focus() and similar
API to make the window behind fully inactive.

The proposed portable solution is to completely disable the background
window (NOTE: unless its the main window), disabling child controls
(gtk_widget_set_sensitive) and making the top window "transient for" or
putting it on top (gtk_window_set_transient_for).

Still we do not want to hide the background window titlebar with
gtk_window_set_decorated(), which makes it still clickable.
Make this change to older code in gtk-gui.c as well.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2012-09-30 03:47:10 +03:00
Dirk Hohndel
bd3df859bc Restructure the Uemis native download buffer code
Running under Valgrind showed a couple of silly bugs.

Worse, intentionally running into various error scenarios showed that we
could get the buffer handling in the raw parsing code to break down - we
would fail to process the correctly downloaded files.

To make it easier to get this right I restructured the code to collect the
XML buffer in a different way - this works much better and has stood up
well under testing so far.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-27 00:29:31 -07:00
Dirk Hohndel
49fbccd61a Much improved handling of out of memory errors in the Uemis downloader
Instead of trying to figure out in the GUI code whether to call the
downloader again, the logic was moved into the downloader itself. It now
attempts to deal cleverly with running out of space on the dive computer
filesystem - and in return is able to process the maximum number of dives
(instead of just ten or so at a time).

Even on partial reads before a failure we are able to collect the data
that was completely transferred and report those dives.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-26 20:39:51 -07:00
Dirk Hohndel
85925afe43 Merge branch 'uemis-native'
This brings in the code to download dive information directly from a Uemis
Zurich dive computer.

The implementation contains a major hack that hooks the uemis code into
the same data structures used to setup libdivecomputer. This gives the
best result for the user, but is not something that I like as a long term
solution as it relies on internal libdivecomputer data structures.
2012-09-26 11:04:50 -07:00
Dirk Hohndel
43f122f9ff First implementation of native Uemis downloader
This includes one major hack that uses a private data structure from
libdivecomputer to allow us to show the Uemis Zurich as one computer the
user can import from.

Once the user has chosen the Uemis we don't use libdivecomputer but our
own downloader. Just like in the libdicecomputer case this runs in its own
thread and updates the import dialog with progress information.

The code also keeps track of the last dive that has been downloaded from a
Uemis computer so we only import new dives on subsequent downloads. And
since the Uemis Zurich gives us its device id, we make this a "per
divecomputer" property for people who dive with multiple Uemis Zurich
computers.

This uses the debugfile infrastructure to allow easily collecting
debugging output - especially on Windows where by default console output
is lost.

Known limitations: when the Uemis runs out of space (it uses its
filesystem for communication with the host computer) we have no graceful
way to reset things. This is why the code doesn't try to download ALL
dives on the computer but instead download them in increments of ten
dives. This clearly needs to be addressed once I understand how to reset
the device.

The Cancel button of the import dialog isn't correctly hooked up, yet.
I still need to figure out how to gracefully shut down a download without
potentially hanging the device.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-26 10:58:15 -07:00
Lubomir I. Ivanov
37760d830f Prevent a warning when showing the "About" dialog
gtk-gui.c:about_dialog():
Before assigning a pixel buffer to "logo" check if "image"
has a GTK_IMAGE_PIXBUF storage type.

Prevents the following message if the icon file is missing:
Gtk-CRITICAL **: gtk_image_get_pixbuf: assertion

The message that the file is missing is still shown.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2012-09-23 17:15:04 +03:00
Lubomir I. Ivanov
1358f9e6a8 Use the name "Subsurface" in the "About" dialog
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2012-09-23 17:14:57 +03:00
Lubomir I. Ivanov
921bc51c87 Make sure memory for default_dive_computer_device is allocated
When calling gtk-gui.c:set_default_dive_computer_device(), first
free memory at default_dive_computer_device and then use strdup().

This fixed a case, where after selecting a device for the first time
in the "Download" dialog, then pressing "OK" followed by "Cancel"
(after a device error) the device text is garbled the next time the
dialog is opened.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2012-09-23 17:14:53 +03:00
Lubomir I. Ivanov
26f550403d Activate the new separate "Import XML File" functionality
Renamed the function pick_import_files() to import_files()
and added a declaration in "display-gtk.h". The declaration is "extern"
for consistency with download_dialog().

Since the new dialog is a real child off "main_window", we no longer need
some of the calls to gtk_widget_set_sensitive(), gtk_window_set_decorated()
to disable the parent, which previously was the old "Import" combined dialog.

Once the file list is retrieved, attempt to import each file and update
the list via report_dives().

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>

Minor changes to file select box title

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-21 20:55:33 -07:00
Lubomir I. Ivanov
faab2981a9 Remove the XML file selection from the DC download dialog
Renamed "import_dialog" to "download_dialog" and also focused the download
dialog strictly on dive computer functionality. Removed the file button
and "filenames" checks from "download_dialog".

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2012-09-21 20:55:33 -07:00
Lubomir I. Ivanov
ff67ca92ed Separate the "Import" menu entry into two menu entries in "File" and "Log"
New entries with icons and shortcut keys in the menus.

"Import XML File" is now using CTRL + I.
Reserve CTRL + E for "Export XML File" if possible.

"Download From Dive Computer" is using CTRL + D and
a GTK_STOCK_GO_DOWN icon.
Added separator below this entry in the "Log" menu.

Note: menu entry callbacks are NULL at this stage.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2012-09-21 20:55:33 -07:00
Lubomir I. Ivanov
882cb159a4 Make sure windows behind forward dialogs are truly inactive
There are possible bugs when targeting GTK 2.24.10.

When opening the "import XML files" file selector from the "import" dialog
on Ubuntu 12.04, even with gtk_window_set_accept_focus() setting FALSE
to the parent ("import"), it is still possible to click the title bar
and buttons, causing actions. This can trigger undefined behaviour -
e.g. opening multiple "import XML files" dialogs.

While on Windows the situation is more acceptable, on Ubuntu it is also
possible to click the [x] button on the title bar of the parent window,
which will close the parent dialog _with_ the current forward dialog.

Multiple proposed methods in the GTK documentation seem not to function
as expected, such as: gtk_window_set_modal() and gtk_window_set_accept_focus().
Passing the correct parent on dialog creation doesn't seems to help either.

The same problem occurs when selecting a default file from the preferences
dialog.

The proposed portable solution in this patch is to completely disable
the background windows by hiding the titlebar (gtk_window_set_decorated),
disabling child controls (gtk_widget_set_sensitive) and making the window
"transient for" or putting it on top (gtk_window_set_transient_for).

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2012-09-21 20:55:33 -07:00
Lubomir I. Ivanov
2ddb50c5a5 More cosmetic changes in the "Import" dialog
Renamed the XML button and titles slightly.
Generalized the dialog topmost text to "Choose what to import:".

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2012-09-21 20:55:33 -07:00
Lubomir I. Ivanov
789cb0c710 Keep the "OK" button in "Import" disabled until a DC is selected
Only call report_dives() for GTK_RESPONSE_ACCEPT in the same dialog.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2012-09-21 20:55:33 -07:00
Dirk Hohndel
d14932058f Fix some of the problems reported by cppcheck
Thanks to Christian for running the static code analysis tool against
subsurface...

There were some false positives, a few style issues that I'll ignore for
now, and two actual potential bugs.

First: Don't check unsigned variables for < 0

This has been around for a while and we are lucky that while technically a
bug it still works as expected. Passing a negative idx simply turns it
into a very large unsigned integer which then fails the > dive_table.nr
test. So it still gets a NULL returned. A bug? Yes. Critical? No.

Mismatched allocation and free

This is an actual bug that potentially could cause issues. We allocate
memory with malloc and free it with g_free. Not good.

Reported-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-18 20:25:45 -04:00
Lubomir I. Ivanov
914488b796 Fixed a couple of memleaks in gtk-gui.c and info.c
Related to subsurface_default_filename() and g_path_get_basename().
Against 3835faa8fb.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-18 07:29:33 -04:00
Lubomir I. Ivanov
16bff5265e Added an entry "New" in the "File" menu
Currently doubles the functionality of "Close" (file_close).

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-18 07:20:13 -04:00
Dirk Hohndel
fc250493ca Fix crash when simply clicking OK in import dialog
Since the GSList is now only created if the user enters the file selection
dialog, opening the import dialog and then clicking OK without selecting
either a dive computer or a file would cause a crash.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-18 07:17:55 -04:00
Lubomir I. Ivanov
ac06d1f693 Generalized the "Import" dialog title
Renamed the title of the "Import" dialog to "Import", as there
are a couple of supported operations.

Removed the "Import:" text in the dialog body.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-18 07:12:33 -04:00
Lubomir I. Ivanov
21a8f3f325 Moved "Import" in a separate section in the "File" menu
Moved the entry bellow the standard file operations and above "Print".
Also placed it between separators and added the GTK_STOCK_GO_BACK icon.

Later on "Export" can be placed below "Import" using GTK_STOCK_GO_FORWARD.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-18 07:12:21 -04:00
Dirk Hohndel
3835faa8fb Merge branch 'defaultfile'
By now the default file code seems quite matured, so in preparation for
2.0 we'll bring it back into master.

I made a few small clean-ups during the merge, but the merge itself is
very much straight forward.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-17 21:44:28 -04:00
Dirk Hohndel
2cadc70e3d Simplify code in file_open as we now only open one file
This doesn't change functionality - it's just pointless to loop over a
list that is known to have only one element.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-17 21:03:30 -04:00
Dirk Hohndel
46d91acdff Don't close existing data file in file_open if user cancels
This logic seems to make much more sense - if the user hits 'OK' then the
old file is closed and the new one openened. Otherwise, leave things
unchanged.

Reported-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-17 21:03:30 -04:00
Dirk Hohndel
7148dea827 Once again improve existing filename handling
Several potential problems.
- we could end up dereferencing exiting_filename when it was NULL
- we could free the default_filename by mistake -
  subsurface_default_filename always needs to return a copy of it
- closing the existing file before opening a new one repopulated the
  existing_filename with the default filename - preventing the opened
  file to become the new existing filename

Also, make existing filename a const char * and make file_open have the
same sensible default folder behavior as the other file related functions.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-17 21:03:30 -04:00
Dirk Hohndel
cc42debb88 Mark divelist unchanged after closing the datafile
This seems rather obvious - I'm surprised I didn't notice it earlier.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-17 21:03:30 -04:00
Dirk Hohndel
eddea0e5e3 Put creation of the file selector box filter into helper function
This avoids duplication of code.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-17 21:03:29 -04:00
Dirk Hohndel
ca696dd0cd Reimplement the GtkFileChooserButton for import
One of the limitations of GtkFileChooserButton is that it only allows one
file to be chosen (so that it can display that file name in the button
after the file chooser dialog finishes). Since in the import dialog we
never want to show the button with the filename(s) filled in but want to
directly execute the import once files have been selected, I reimplemented
the button to simply open a multi file chooser when clicked and to then
run the import function if one or more file names were selected.

This does appear to require some more code but gets us a much more useful
and consistent implementation.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-17 21:03:29 -04:00
Dirk Hohndel
dea8d47b69 The Open menu entry should open just one file
The single file that is our new data file (and the file that we'll change
if it was modified).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-17 21:03:29 -04:00
Dirk Hohndel
b2727ecfda Move Import menu entry back to File menu
This should make things more consistent, especially now that "Open"
actually does just that and no longer behaves almost like "Import".

The downside is that the import from a dive computer is now in the File
menu as well and no longer in the Log menu, where Linus originally had
moved it to in commit 3cace090989b.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-17 21:03:29 -04:00
Dirk Hohndel
d3bf8af7fe File Open now closes the previous file, first
This is a pretty significant semantic change - Open used to act more like
Import; you added more dives to the divelist. With this change it instead
acts more like the traditional File->Open in that it closes the previous
file, first.

The diff hides the minimalistic nature of the change - it seemed cleaner to
move the file_open function around than to do a forward declaration of
file_close.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-17 21:03:09 -04:00
Dirk Hohndel
65d9d48845 Display current filename in windows title
This seems to make sense since we have a pretty strong concept of the "active
file" that we are working on.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-17 21:03:03 -04:00
Dirk Hohndel
9f5d9bd94f Use glib file and pathname functions
My silly reimplementation of these functions was broken on Windows,
anyway. This is much cleaner.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-13 11:22:09 -07:00
Dirk Hohndel
3d4be85f35 Prevent the preferences dialog from getting focus with file selector open
The idea is based on Lubomir's code but the implementation is radically
different. Instead of having the preferences dialog be referenced by a
global variable we simply look up the appropriate ancestor of the current
widget.

Inspired-by: "Lubomir I. Ivanov" <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-13 10:53:30 -07:00
Dirk Hohndel
c74f58786d Fix memory leaks and one potential NULL dereference
Always make sure to clear the memory allocated at the "existing_filename"
pointer when setting it to a new address or NULL.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>

Lifted these changes from a larger commit. The other changes I'll
reimplement in the next commit.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-13 10:46:09 -07:00
Lubomir I. Ivanov
5dbf10a6d6 various small fixes to the defaultfile model
1) For safety reasons we no longer remove the default directory after
creating it. This prevents an access error (on windows) and also a couple
of small exploits that could have been possible, resulting in undefined
behaviour.

2) Once "default_filename" is allocated keep it until the value has to change.
The value is finaly released once the program is ready to close.

3) When picking a new default file, grab the new string directly from the
GSList.

4) When storing the new default file from the preferences dialog, make sure
we also update "existing_filename" if needed.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>

Fixed some whitespace issues, made commit message and one of the comments
in the code somewhat clearer.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-12 15:13:09 -07:00
Dirk Hohndel
1ae4b80027 Make sure Subsurface receives Quit / Command-Q callback on Mac
As usual, things work slightly different on Mac. Quartz delivers some (but not
all) accelerator notifications differently. Command-Q and Subsurface->Quit now
work on Mac as well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-12 09:18:56 -07:00
Lubomir I. Ivanov
be941e00b2 Inline g_list_free_full for better compatibility
Replaced g_list_free_full with the inlined alternave:
g_list_foreach(dive_trip_list, (GFunc)free, NULL);
g_list_free(dive_trip_list);

once again my version on debian 6.0.x has libraries up-to-date yet outdated.
i guess i have to suggest against API which has the "Since <some ver>"
text and <some ver> is fairly recent on documentation webpages.

Signed-off-by: "Lubomir I. Ivanov" <neolit123@gmail.com>

I took only one hunk from the patch that Lubomir sent - the rest I
implemented differently in the previous commit.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-11 12:08:39 -07:00
Dirk Hohndel
2a9679dac6 Use glibio functions for mkdir
Suggested-by: Jef Driesen <jefdriesen@telenet.be>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-11 12:08:07 -07:00
Lubomir I. Ivanov
0fceb1c907 Better compatibility with older GTK and Cairo
divelist.c:
Replaced "gtk_tree_path_get_indices_with_depth()" with the coupled alternative:
	int depth = gtk_tree_path_get_depth(path);
	int *indices = gtk_tree_path_get_indices(path);
for compatibility GTK+ < 2.22

*:
Replaced all usage of "cairo_rectangle_int_t" with "cairo_rectangle_t"
for compatibility with Cairo < 1.10.

Both modification make building Subsurface possible on a fairly recent Debian
distribution, which reports to have the version of the abovementioned
libraries "up-to-date", yet they are slightly outdated.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-11 07:59:53 -07:00
Miika Turkia
ae33b5ef52 Display yearly/monthly statistics
Display yearly statistics in a statistics window with option to expand
the viewing on monthly level. The amount of dives along with basic
information like duration, depth, water temperature and air consumption
is displayed in yearly and monthly level. Thus you are able to compare
e.g. development of air consumption or diving activity from year to
year.

Using already existing macro for splitting seconds into minutes:seconds.
Moving repetitive code to a function (couldn't think of the suggested
clever macro, but this should pretty much do the trick).
Now the statistics are updated every time the process_all_dives function
is called. It might make sense to actually verify the structures need to
be re-allocated, but such optimization is currently not implemented.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>

Combined two commits.
Minor cleanups for white space and boolean values.
Significant changes to use the correct units for volumes vs. depths and to
avoid unneccesary lookups of the model storage based on the tree.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-11 07:29:06 -07:00
Lubomir I. Ivanov
50eac41129 Use GTK_UNIT_INCH when printing to provide consistency across OS
Tests have shown that the most multi-platform way to do printing with GTK is
to use GTK_UNIT_INCH (or GTK_UNIT_MM) with GtkPrintOperation. Tested on
Linux, OSX, Windows.

However this requires the appropriate scaling for Pango and Cairo to be done,
with separate plotting logic for printing and drawing on the screen. To achieve
that, profile.c:plot() now accepts a scaling parameter from type
"scale_mode_t" defined in "display.h".

Also due to new scale, small decimal numbers (such as 6.12345) cannot be well
stored in "cairo_rectangle_int_t" therefore it is replaced with
"cairo_rectangle_t", which uses doubles to provide Cairo with a drawing
area.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>

Minor whitespace cleanup.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-11 07:26:38 -07:00
Dirk Hohndel
3b907d8479 Fix silly folder permission bug
I forgot to give the user execute permission on the folder that subsurface
might create to store the datafile in.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-10 14:39:07 -07:00
Dirk Hohndel
a8fd77865c Implement Close menu option that allows closing the data file
This requires some helper routines that allow us to clear out all the
widgets.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-10 14:32:55 -07:00
Dirk Hohndel
78c5aa9f07 Change behavior for the existing filename
Previously we always picked the last file that was openend as the file
name to save to. That seems counterintuitive when importing files or when
opening multiple files. Especially if Subsurface was executed without a
file on the command line and we are using the default file.

Now we only remember a file name if it was the first one to ever be
openend or if it was used in save-as.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-10 12:27:00 -07:00
Dirk Hohndel
b73f29fea3 First cut of adding a default file name
The default file name is OS specific and tries to follow the customs on
each of the OSs. It can be configured through the preferences dialog.

On MacOS we get a strange warning which appears to be a well documented
Gtk bug on MacOS.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-09 17:38:01 -07:00
Dirk Hohndel
109dab56eb Set default path for file import to the last path opened
This may not be the path the import files are in, but it's better than the
current default of 'nothing'.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-06 14:31:38 -07:00
Dirk Hohndel
8c7c11c644 Update the About screen
Add the current year and the second main author, err, me.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-06 14:27:34 -07:00
Dirk Hohndel
8b021de8d9 Correctly initialize the toggle state of the autogroup menu entry
If we move to Linus' tri-state variable we need to separate those two
items, anyway. But for now this fixes the obvious bug.

Reported-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-03 08:09:56 -07:00
Dirk Hohndel
f6e8903a52 Add autogen menu command
This adds the ability to auto create trips from the menu. It's a toggle
entry (and while at it, we made the zoom toggle a toggle entry as well).
We can therfore switch back and forth between auto generated trips.

There is one bug. Assume you have no trips. You manually create a trip
from some dives out of a group of trips that autogen would turn into a
trip. Now you turn on autogen and this trip gets expanded with all the
dives that would normally be grouped together. If you turn off autogen
again, all those dives are still part of the remaining (initially manually
created) trip. Working around this issue seemed a lot more work than the
likelihood of anyone running into it seemed worth.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-02 21:50:43 -07:00
Linus Torvalds
9d46581913 Merge branch 'freediving-tweaks' of git://github.com/mguentner/subsurface
Merge freediving tweaks (zoom in on short dives etc) from Maximilian
Güntner.

Trivial conflicts in display.h due to unrelated printing stuff just
happening to be added nearby.

* 'freediving-tweaks' of git://github.com/mguentner/subsurface:
  moved zoomed_plot to display.h
  plot the time with a fixed padding (leading zero)
  updated/corrected comment
  added "Zoom" button and improved scaling
  fixed indentation
  use increments that make sense for 600 seconds
  Plot shorter (apnea) dives with a reasonable scale
2012-08-28 13:20:23 -07:00
Linus Torvalds
e4955f9be1 Merge git://git.tdb.fi/ext/subsurface
Pull a few buglet fixes from Mikko Rasa.

Some trivial conflicts due to changes in the dive selection logic, and
using the new "for_each_dive()" helper.

* git://git.tdb.fi/ext/subsurface:
  Check if multi-dive editing is actually needed
  Fix an off-by-one error in buffer allocation
2012-08-28 13:16:57 -07:00
Linus Torvalds
c89f88378a Merge branch 'trips' of git://git.hohndel.org/subsurface
Merge the initial 'track trips explicitly' code from Dirk Hohndel.

Fix up trivial conflicts in save-xml.c due to the new 'is_attribute'
flag.

* 'trips' of git://git.hohndel.org/subsurface:
  Fix an issue with trips that have dives from multiple input files
  Some simple test dives for the trips code
  First cut of explicit trip tracking
2012-08-27 15:36:27 -07:00
Dirk Hohndel
e315abf645 First cut of explicit trip tracking
This code establishes the explicit trip data structures and loads and
saves them in the XML data. No attempts are made to edit / modify the
trips, yet.

Loading XML files without trip data creates the trips based on timing as
before. Saving out the same, unmodified data will create 'trip' entries in
the XML file with a 'number' that reflects the number of dives in that
trip. The trip tag also stores the beginning time of the first dive in the
trip and the location of the trip (which we display in the summary entries
in the UI).

The logic allows for dives that aren't part of a dive trip. All other
dives simply belong to the "previous" dive trip - i.e. the dive trip with
the latest start time that is earlier or equal to the start time of this
dive.

This logic significantly simplifies the tracking of trips compared to
other approaches that I have tried.

The automatic grouping into trips now is an option that defaults to off
(as it makes changes to the XML file - and people who don't want this
feature shouldn't have trips added to their XML files that they then need
to manually remove).

For now you have to select this option, then exit the program and start it
again. Still to do is to trigger the trip generation at run time.

We also need a way to mark dives as not part of trips and to allow options
to combine trips, split trips, edit trip location data, etc.

The code has only had some limited testing when opening multiple files.

The code is known to fail if a location name contains unquoted special
characters like an "'".

This commit also fixes a visual inconsistency in the preferences dialog
where the font selector button didn't have a frame around it that told you
what this option was about.

Inspired-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-08-27 14:32:24 -07:00
Dirk Hohndel
b693bb3fb9 Might as well free current_file
In commit fd2debc1e730 ("replaced stdndup() with the inlined equivalent")
Lubomir freed the memory from one of my two strdups but not the other.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-08-26 15:36:40 -07:00
Linus Torvalds
9380f78c82 Do some whitespace cleanup
The previous commit was a patch from Lubomir, which also had some
whitespace fixes (to go with some new whitespace bugs to replace them)
in it.

I removed the whitespace changes from that patch (don't mix whitespace
fixes with other fixes, unless they are on the same lines!) but decided
to look for other whitespace issues, and this is the result.

I left the non-C files alone, some of the spec and script files also
have whitespace at the end of lines etc.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-08-26 14:41:05 -07:00
Lubomir I. Ivanov
9d10574694 replaced stdndup() with the inlined equivalent
don't kill the OS incompatibility messenger.

1)
http://stackoverflow.com/questions/6062822/whats-wrong-with-strndup
stdndup() is POSIX 2008, but apparently not available on OSX and Windows
it could be made potentially application global (e.g. a local "stdndup.h")

2)
free() memory at pointer "current_dir", once we are done.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-08-26 14:37:28 -07:00
Dirk Hohndel
415383d65e Fix broken default filename for save-as
The existing code set the filename to the full path of the last input file
and didn't set the path at all. Instead we now split the existing filename
into its path and file component and set up the choser accordingly.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-08-26 12:51:18 -07:00
Maximilian Güntner
03eb488dd2 moved zoomed_plot to display.h
Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
2012-08-22 02:34:29 +02:00
Maximilian Güntner
0c0ec7e4f6 Merge branch 'master' into freediving-tweaks
Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
2012-08-22 01:15:41 +02:00
Mikko Rasa
c6be2404da Fix an off-by-one error in buffer allocation
Signed-off-by: Mikko Rasa <tdb@tdb.fi>
2012-08-22 00:43:52 +03:00