Having subsurface-core as a directory name really messes with
autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an
autocomplete conflict and also was inconsistent with the desktop-widget
name for the directory containing the "other" UI.
And while cleaning up the resulting change in the path name for include
files, I decided to clean up those even more to make them consistent
overall.
This could have been handled in more commits, but since this requires a
make clean before the build, it seemed more sensible to do it all in one.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Some users try to run Subsurface as root for example to get around
permission problems with dive computer devices. This is a bad idea
since config files get touched as root and then cannot be read
as normal user anymore.
This patch allows running as root only with verbose option on. We can
assume if somebody manages to start subsurface as root this happens
from the command line.
For some reason, I couldn't get translation working at this stage.
Windows version is a stub.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is in the context of the iOS port and shouldn't impact any of the
other builds.
[Dirk Hohndel: refactored the iOS patches]
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
There is a bug on OSX where free() is called on non-allocated
memory in free_prefs(). Most of the preferences are not freed
in free_prefs() while copy_string() is used on them, so let's
not free() any pointers in free_prefs() and leave them
as one-time leaks.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
'default_filename' is obtained from system_default_filename()
but system_default_filename() returns a static pointer
the HEAP memory of which is handled in main().
Remove the free() for 'default_filename' free_prefs()
to prevent a double free().
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
And adapt a new CMakeLists.txt file for it. On the way I've also
found out that we where double-compilling a few files. I've also
set the subsurface-core as a include_path but that was just to
reduce the noise on this commit, since I plan to remove it from
the include path to make it obligatory to specify something like
include "subsurface-core/dive.h"
for the header files. Since the app is growing quite a bit we ended
up having a few different files with almost same name that did
similar things, I want to kill that (for instance Dive.h, dive.h,
PrintDive.h and such).
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>