aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-10-08Load translations at run timeGravatar Dirk Hohndel
This doesn't enable translation switching, but at least we try and load the correct translation at startup. We create two global pointers for the currently active translations. This also removes the remainders of the gettext()/glib based translation system. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-08Make a copy of the translated textGravatar Dirk Hohndel
Otherwise the translation will get freed (and often reused) before it makes it to the screen. The problem with this is that it leaks memory for every translation. Reported-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-08Fix ui_%.h building to .uicGravatar Anton Lundin
This rearranges things so that all the ui-generated headers are put in .uic and found by the buildsystem the right way<tm> Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-08main.cpp: remove usage of subsurface_command_line_*Gravatar Lubomir I. Ivanov
subsurface_command_line_* are now redundant as Qt should handle the command line argument parsing on Windows for which these functions where mainly used and where NOP for other OS. main.cpp also receives a couple of small changes to use: QCoreApplication::arguments() to obtain the list of expanded arguments and parse those instead. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-08Fix edit + cancel = absolute zeroGravatar Patrick Valsecchi
If a temperature in Kelvin is 0, I think we can safely assume it is not set. Fixes #207. Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-08Fixed conversion error when downloading salinity from DCGravatar Patrick Valsecchi
libdivecomputer doesn't give the salinity in kg/l, but in g/l and subsurface works with g/10l. So the salinity was too big by a factor of 1000. Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-07Fix some signedness issuesGravatar Dirk Hohndel
I always worry if these are worth following up on - but these seem pretty clear and obvious to me. As far as the planner is concerned, depth is unsigned. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-07Compile without depending on the global MAX macroGravatar Thiago Macieira
There's a C++ way for it. And, for some reason, it wasn't defined on my MinGW build: qt-ui/profilegraphics.cpp:1006:57: error: 'MAX' was not declared in this sscope Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-07Next round of code removal and header cleanupGravatar Dirk Hohndel
None of this is used anywhere Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-07Remove even more code and declarationsGravatar Dirk Hohndel
There's lots more stuff that can go. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-07Minor include file unwindingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-07Remove unused prefs.cGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-07Remove info.c/info.hGravatar Dirk Hohndel
The one remaining helper function in there was moved to maintab.cpp (which was the one remaining user). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-07Allow passing NULL as second argument to ascii_strtodGravatar Dirk Hohndel
We do this in our own sources... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-07Remove feature checkingGravatar Dirk Hohndel
We needed this in Gtk version as we were using a system font to show the stars and that was missing on some ancient Windows versions. With the Qt version we actually draw the stars so this has become obsolete. Suggested-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-07Print: allow optional table on top of profileGravatar Lubomir I. Ivanov
Patch enables the 'Profile on top' / 'Notes on top' functionality in the print options dialog. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-07ascii_strtod that actually does what we needGravatar Linus Torvalds
Dirk's ascii_strtod was blindly copied from other GPL code and didn't do what was the main purpose (i.e. ignore the locale and still accept the numbers we have in our data files). This implementation does *not* care about INF/NaN, and it does *not* try to handle some strange conditions (overflow/underflow), and I do *not* guarantee that it doesn't have rounding issues. That said, for our native format, we never print odd FP numbers anyway (since we use fixed-point integer arithmetic), and while we *do* care about exponents for some of the odder import formats (I remember seeing them in jdivelog output), we don't care about the crazy cases. So rather than worry about getting the edge cases right for the max double exponents (around +-308), it just says "screw you" and gives you something close enough. So what it *does* try to do is handle the actual parsing right, and get the right answer for all the reasonable cases. Works-For-Me(tm). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-07dive.c: fix compile error for missing INT_MAXGravatar Lubomir I. Ivanov
file requires <limits.h> to solve: error: INT_MAX undeclared gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-07Maximum depth of a dive/a series of dives is not show correctlyGravatar Benjamin
After selecting a dive or a series of dives, the "Stats" tab shows the minimum, average and maximum stats for the selected dives. The "Depth" section does not display the correct value for the maximum depth. Signed-off-by: Benjamin Fogel <nystire@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Make Windows cross compile againGravatar Dirk Hohndel
But this is broken as the utf8/utf16 conversions in windows.c are gone without glib. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Delete code and files that are no longer usedGravatar Dirk Hohndel
Most of this is Gtk related, some of it is helpers that we don't need anymore. I love the diffstat. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Remove gtk specific source filesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Amend OSX homebrew instructions: we're on master nowGravatar Henrik Brautaset Aronsen
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Removed target 'uicables', as it isn't used anywhere.Gravatar Cristian Ionescu-Idbohrn
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Distclean might clean the Documentation as well.Gravatar Cristian Ionescu-Idbohrn
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Better clean.Gravatar Cristian Ionescu-Idbohrn
Removing both $(HEADERS_NEEDING_MOC:.h=.moc) and qt-ui/*.moc was a duplication, as all files refered in $(HEADERS_NEEDING_MOC) are located in directory qt-ui/. Generated header files qt-ui/ui_*.h were not removed. Avoid forking `rm' multiple times and regroup file list in a more intuitive order. Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Make is_gas_used work with SAMPLE_EVENT_GASCHANGEGravatar Anton Lundin
SAMPLE_EVENT_GASCHANGE only contains o2 part, and not the he part so when looking at ex the gaslist for dives/test20.xml it got it realy wrong. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Add a guide on how to build Subsurface on MacOSX with Homebrew.Gravatar Henrik Brautaset Aronsen
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Merge branch 'glib-removal-hack'Gravatar Dirk Hohndel
Fix obvious merge issue in Rules.mk Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Remove lots of ifdef'ed out code from GTK/glib versionGravatar Dirk Hohndel
There's still a ton more left, but this is a start. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Remove remainders of glib, gtk, libsoup, osmgpsmap from Configure.mkGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Changes to make the glib-removal-hack branch build on MacOSXGravatar Henrik Brautaset Aronsen
Tested with the Homebrew packaging system Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Trying to switch to Qt translationGravatar Dirk Hohndel
This compiles and looks about right, but it doesn't appear to work, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Parse GPS text in C++ and re-implement GPS changed checkGravatar Dirk Hohndel
This is SO MUCH easier then the convoluted and fragile C / glib code it replaces. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Make Linux compileGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06First steps towards removing glib dependenciesGravatar Dirk Hohndel
- remove the build flags and libraries from the Makefile / Configure.mk - remove the glib types (gboolean, gchar, gint64, gint) - comment out / hack around gettext - replace the glib file helper functions - replace g_ascii_strtod - replace g_build_filename - use environment variables instead of g_get_home_dir() & g_get_user_name() - comment out GPS string parsing (uses glib utf8 macros) This needs massive cleanup, but it's a snapshot of what I have right now, in case people want to look at it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-05Rules.mk: call UIC before everything elseGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-05LIBDCDEVEL=y build seems brokenGravatar Cristian Ionescu-Idbohrn
This unbreaks a LIBDCDEVEL=y build for me. Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-05Mention debian libusb-1.0-0-dev.Gravatar Cristian Ionescu-Idbohrn
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-05Modify the dialog text for the question to make more sense.Gravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-05Don't include headers under extern "C" unless we have to.Gravatar Thiago Macieira
libxml headers include ICU headers and ICU has C++ code. If it detects __cplusplus, it will start declaring C++ templates and whatnot, which aren't allowed under extern "C". Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-04Remove leftovers from GtkGravatar Dirk Hohndel
No need to link against the osmgpsmaps or gconf2 anymore. Also removed the Gtk related junk from linux.c. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-04Install xslt under share on MacGravatar Dirk Hohndel
This is more consistent with Linux and is what's expected with the recent change to how xslt files are found. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-04Use helper function to find xslt folderGravatar Dirk Hohndel
This seems much better than the different hard coded and semi-hard coded paths we had before. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-04Add a helper function to calculate weight display stringGravatar Benjamin
Add a helper function to unify the calculation of the weight display string, instead of having the same calculation in two places in the code. Signed-off-by: Benjamin Fogel <nystire@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-04Merge branch 'bugfixes' of git://github.com/tcanabrava/subsurfaceGravatar Dirk Hohndel
2013-10-04Fix display sane values on subsurface at first time opening.Gravatar Tomaz Canabrava
This patch fixes some unsane values that was being retrieved by the ui-files on first time opening. it creates a basic layout of the application using the current desktop size. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-04Fix showing all columns by default on first run.Gravatar Tomaz Canabrava
Some columns are a nice addition, but not a must have, and thus are hidden-by-default, uncluttering the user interface. This was discussed with a few designers before writting the code, and also discussed with dirk on irc. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-04Fix build: don't recompile all C++ every timeGravatar Thiago Macieira
This was caused by the %.o: %.cpp rule depending on "uicables". Since it's a phony target, the file never exists, so make will always try to rebuild it. Regardless of whether anything got run because of that, the target will then be "newer" than the .o file that was being considered. Therefore, make thought it had to recompile again. Fix it by skipping the intermediate, phony target and telling make that the C++ objects depend directly on the header files. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-04Added the .ssrf extension to the open dialog filter.Gravatar Patrick Valsecchi
Fixes #205 Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>