It just puts the subsurface binary in $(HOME)/bin.
.. and then the binary won't find the icon file, so this is really not
enough of an install to get it really working, but whatever.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Remember those useless surface events that we ignore when we import a
dive from a dive computer? Yeah, they exist in the libdivelog xml files
too. So ignore them when we see them there too.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
When merging two identical dives and one of them has lat/long data, pick
it up correctly for the merged dive.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Parse them, save them, take them from libdivecomputer.
This doesn't merge them or show them in the profile yet, though.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ignore surface events - they are meaningless anyway and just add noise.
Print out other events properly, including correct time offset etc.
We still don't actually *save* the events, but now it might be worth
doign so.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
As reported by Mauro Dreissig, the progress bar doesn't work and causes
a SIGSEGV due to a missing allocation. The code broke when Dirk
separated out the GUI from the core code, and I hadn't tried
divecomputer downloads since.
Reported-by: Mauro Dreissig <mukadr@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Update for the current library situation, and notes about
libdivecomputer installation location.
And remove the "we don't interface directly with libdivecomputer", since
that is obviously not true any more.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Just seems to look nicer this way. And actually implements consistent
alignment management for the columns to begin with.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The whole auto-expansion of an entry in the middle thing really doesn't
work very well in gtk. Give up on it.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This is some crazy stuff. Apparently the only sane way to do this is by
hooking into the "realize" callback for the dive list widget.
Whatever. Dirk did the googling to figure this all out.
Suggested-by: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
We should always strive to have a dive selected, so pick the first one
(that was how the dive list logic worked anyway, it just wasn't truly
selected at the tree-view level, so it wasn't *visibly* the selected
dive).
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
It used to be "index 0" which originally was the date string, but not
only has that changed (it's now just the dive index), it's kind of
pointless to search for a date string.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This is left-overs from an earlier age when we did this. But we just do
the "show_all" at the end.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Show "m" or "ft" instead of "max/m" vs "max/ft". The column really
doesn't want to be that wide. The column header is already the widest
part of it even with this short name (due to the sort order arrow
thing).
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'quit-handling' of git://github.com/dirkhh/subsurface:
Use the last (or only) filename on command line as default for saving
Show the "save changes" dialog before the main window is destroyed
Check for changes at regular 'quit' events as well
Catch changes to the info of the current dive when quitting
Tracking changes to tanks is trivial
Simplistic first attempt to get changes saved when quitting subsurface
It's getting to the point where I'm happy with this. This just makes
the spacing between the location and the notes a bit bigger to visually
separate them more, and adds units ("min") to the dive duration (and
removes the seconds, that really didn't make any sense at an overview
level).
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
For really long dive locations, we now limit the width to the same size
as the date and time, and force it to a single line - with an ellipsis
if it ends up being too big.
Also, since we no longer use any markup anywhere, we migth as well show
the dive buddy information too, as we don't need no stinking quoting.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
By using the delete-event callback instead of the destroy callback we are
able to display our dialog (and the file-save dialog) while the program
window is still being displayed. Much nicer this way.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
As the application shuts down we do one more check to see if the dive that
is currently being displayed has been modified (we previously just checked
as we switch dives)
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Track whether things changed in the global dive_list
So far this actually works if changing dive info (but only if dive
selected was changed after the dive info was changed).
We are not tracking changes to the cylinder information, yet.
also remove the duplicate static dive_list
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This way we can avoid the need for quoting, since we can just use text
rendering instead of markup for the free-form fields. And we will want
to make the pango layout width different for the date and location,
since we want to fit the depth/duration to the right of them.
I still haven't set the different width for the date/location, but this
at least is going in the rigth direction.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The default cairo font seems to be sans, but the default pango font is
serif. Maybe it has something to do with my system font settings, but I
doubt it: my desktop font settings are all sans-serif. So I think pango
is just showing bad taste.
Anyway, this just hardcodes the font to "Sans". Maybe somebody wants to
make this all part of preferences some day, or pick it from their
desktop font preferences. In the meantime, just fix the pango brain-damage.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This makes things slightly prettier and adds back the depth and duration
details to the printout.
Still a few known problems: font choice, and the depth/duration thing
can end up overlapping with a long location name. But it looks pretty
good on the whole.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The plot_info was never freed, so every time you'd plot something, we'd
leak memory.
I'm running valgrind to see if there's anything bad going on. So far it
all looks fairly benign.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This gets us text wrapping etc. I think I have some serious memory leak
somewhere, though, because if I print out all my dives it eventually
ends up with broken dives and doesn't complete. But I am going to
commit this as a "it kind of works" point.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The layout is crap, the handling of long lines in notes (or location) is
wrong, the dive number handling is wrong.
The thing is just a toy.
But it's a toy that kind of works, and gives a much better idea of what
a real dive log printout might look like. With the right kind of dive
notes, it looks fine.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ok, so this may be too much, but I'm just playing around with layout.
It could be a runtime choice too, of course.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Use the actual degree sign for temperatures (°F and °C), and make sure
everything uses the proper "set_source_rgb[a]()" wrappers to set the
colors.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dirk wrote this before we have the 'plot_info' structure with the
cleaned-up dive info. No need to maintain that separate array of depths
and seconds.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Four dives per page sounds good. Maybe even six? But dangit, the
default font choice for cairo printing sucks. And I need to learn about
pango for actually printing the dive info.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org
That was stupid. The divelist column generation cleanup (commit
d3feb78df5: "Make helper function for creating TreeView columns in the
dive list") had a but too much copy-paste going on, and didn't always
have the right column indexes.. t still *looked* right, but sorting
didn't work at all.
Reported-by: Chris Lewis <chrislewis915@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The following are UI toolkit specific:
gtk-gui.c - overall layout, main window of the UI
divelist.c - list of dives subsurface maintains
equipment.c - equipment / tank information for each dive
info.c - detailed dive info
print.c - printing
The rest is independent of the UI:
main.c i - program frame
dive.c i - creates and maintaines the internal dive list structure
libdivecomputer.c
uemis.c
parse-xml.c
save-xml.c - interface with dive computers and the XML files
profile.c - creates the data for the profile and draws it using cairo
This commit should contain NO functional changes, just moving code around
and a couple of minor abstractions.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of the hardcoding to "Sans 8", allow people to set it in the
preferences.
Also, make the unit choice be a frame in the preferences dialog instead.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* git://github.com/sirowain/subsurface:
Fix Segmentation fault when trying to print an empty plot.
Provide an icon for subsurface.
Added a comment about libusb dependency in Makefile.