Fix the first load of Subsurface - "File not found" error.

The first time the user loads subsurface, the default_filename
is not configured yet, but yet the software tries to load "",
sending an error message that this file doesn't exists.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Taiane Ramos <exhora.tat@gmail.com>
Fixed First run of subsurface - Start on Fullscreen.

For a new installation, subsurface will now start on fullscreen,
this fixes the bug where subsurface would start using the interface
file ( mainwindow.ui ) configured size, and that silly monster
always changes when editing something.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Code Cleanup - Uneeded preferences stored at the old prefs setting

Those preferences removed ( basically the ones about visibility of
the List View of the Table ) are now managed by the Qt Settings
system, and thus there's no need to have them there. wich gave us
a pretty good cleanup.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Fix build: don't recompile all C++ every time

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>
Fix showing all columns by default on first run.

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>
Fix display sane values on subsurface at first time opening.

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>
Merge branch 'bugfixes' of git://github.com/tcanabrava/subsurface
Add a helper function to calculate weight display string

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>
Use helper function to find xslt folder

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>
Install xslt under share on Mac

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>
Remove leftovers from Gtk

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>
Don't include headers under extern "C" unless we have to.

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>
Modify the dialog text for the question to make more sense.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Mention debian libusb-1.0-0-dev.

Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
LIBDCDEVEL=y build seems broken

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>
Rules.mk: call UIC before everything else

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
First steps towards removing glib dependencies

- 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>
Make Linux compile

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Parse GPS text in C++ and re-implement GPS changed check

This is SO MUCH easier then the convoluted and fragile C / glib code it
replaces.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Trying to switch to Qt translation

This compiles and looks about right, but it doesn't appear to work, yet.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>