aboutsummaryrefslogtreecommitdiffstats
path: root/worldmap-save.c
AgeCommit message (Collapse)Author
2014-11-25Consitent punctuation of shortened wordsGravatar Tim Wootton
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-18Futher capitalisation standardisationGravatar Tim Wootton
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-15Fix segfault in world map exportGravatar Sergey Starosek
Attempting to export to write-protected file/directory results in NULL file reference and leads to segfault when writing/closing it. Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29Don't translate HTML tagsGravatar Henrik Brautaset Aronsen
We were sending HTML tags to translate() in worldmap-save.c Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-15HTML: Report saving to file errors.Gravatar Gehad elrobey
Use subsurface report_error function in save-html and worldmap-save instead of the ridiculous print to standard output. Also use subsurface_fopen for the sake of different platforms. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-06HTML: Better quoting to the export stringsGravatar Gehad elrobey
Move the quote function to membuffer.c and adding wrappers that call it from both xml and html exporters to get rid of redundancy. Quote the location, buddy, suit, tags and notes This prevents js code from crashing. [Miika Turkia: minor whitespace and code fix] Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-29Small whitespace fixesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-29HTML list exporterGravatar Gehad elrobey
Exporting the raw dive list into JSON format for later viewing with html and js files. Also some worldmap code organizations. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-25Localize worldmap exportGravatar Miika Turkia
Call the translation functions for text strings when exporting the worldmap to allow localized exports. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-25Use user preferred units on worldmap exportGravatar Miika Turkia
We should use the temperature units preferred by the user when exporting dive info on Worldmap. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-25Location must be quoted on worldmap exportGravatar Miika Turkia
User supplied text fields must be quoted on worldmap export. Without quoting the HTML is broken e.g. with location "Angel's Window" Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-24Add location and max depth to world map exportGravatar Rick Walsh
From fdf157bb4db042e63f215607b284663f606bd98c Mon Sep 17 00:00:00 2001 From: Rick Walsh <rickmwalsh@gmail.com> Date: Sun, 25 May 2014 14:57:36 +1200 Subject: [PATCH] Add location and max depth to world map export Adds location name and maximum depth to the exported world map html file. Minor formatting changes to exported text for consistency and clarity. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> From fdf157bb4db042e63f215607b284663f606bd98c Mon Sep 17 00:00:00 2001 From: Rick Walsh <rickmwalsh@gmail.com> Date: Sun, 25 May 2014 14:57:36 +1200 Subject: [PATCH] Add location and max depth to world map export Adds location name and maximum depth to the exported world map html file. Minor formatting changes to exported text for consistency and clarity. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-21Add ability to export only selected dives in worldmap exporterGravatar Gehad elrobey
This patch adds the ability to export selected dives only in the worldmap exporter. After Miika added the export dialog in commit 7dc642860def ("Implementing export dialog") and exporting only selected dives became a choice while exporting. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-06Fix HTML errorsGravatar Miika Turkia
- There needs to be a space between HTML attributes. - Ampersand must be encoded on URL addresses - Div element is non-void, so it cannot be self closed Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-05Use helper function to write decimal numbersGravatar Gehad
Never ever use '%f' to write floating point data to a file. The stupid locale handling creates useless comma-infested output in some locales. Instead use one of our clever helper functions to do the right thing. Original patch by Gehad, modified by Linus to be a little more generic. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-05Set the world-map HTML charset to UTF-8Gravatar Gehad
The exported HTML was missing the UTF-8 encoding, so non ascii characters weren't displayed correctly, This patch makes the exporter support all the unicode characters. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-04Javascript exported code throws errors when dives are missingGravatar Gehad
The world map exported Javascript sometimes fail because dives with no coarinates are neglected during exporting which leaves some array indexes missing and corrupt the javascript. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-03Random small whitespace cleanupsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-03Fixing dive notes escape characters in worldmap exporterGravatar Gehad
Replacing the newlines in the string with <br> and changing the single quote to its HTML number. Also minor coding style updates to previous commit. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-30Exporting a World-MapGravatar Gehad
This patch adds the world map exporter. - add worldmap-save.c that writes the html to the file - use Google maps v3 API to put the place marks on the map - add worldmap-options.h to contain some settings for the JS which will make it easier for those to be changed - add save HTML action in the mainwindow user interface Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>