summaryrefslogtreecommitdiffstats
path: root/print.c
AgeCommit message (Collapse)Author
2011-09-21Fix up printing some moreGravatar Linus Torvalds
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>
2011-09-20Printing: use pango markup for text generationGravatar Linus Torvalds
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>
2011-09-20Add completely BS dive text printingGravatar Linus Torvalds
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>
2011-09-20Try printing six dives per pageGravatar Linus Torvalds
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>
2011-09-20Print out only simplified depth profileGravatar Linus Torvalds
None of the colors, nothing like that. Just a gray fill and a plain black depth line. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-20Start fleshing out the dive printing a bit moreGravatar Linus Torvalds
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
2011-09-20Separate out the UI from the program logicGravatar Dirk Hohndel
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>
2011-09-20Fix Segmentation fault when trying to print an empty plot.Gravatar Riccardo Albertini
When printing an empty plot, the function was missing nullability check for 'current_dive'. Now the print of an empty plot results with an empty blank page. A better solution could be making unsensitive the Print entry in the menu, until a plot is loaded. Signed-off-by: Riccardo Albertini <ssirowain@gmail.com>
2011-09-13Make the printout look differentGravatar Linus Torvalds
Not *better* mint you. Just different. I suck at graphs. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-13Add the capability to print a dive profileGravatar Linus Torvalds
Ok, this is the ugliest f*&$ing printout I have ever seen in my life, but think of it as a "the concept of printing works" commit, and you'll be able to hold your lunch down and not gouge out your eyeballs with a spoon. Maybe. I'm just doing the cairo display as-is for the printout, which is a seriously bad idea. I need to not try to do colors etc, and instead of having white lines on a black background I just need to make thelines be black on white paper. But that would involve actually changing the current "plot()" routine, which is against the point of the exercise right now. This really is just a demonstration of how to add printing capabilities. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>