Commit graph

9 commits

Author SHA1 Message Date
Dirk Hohndel
7be962bfc2 Move subsurface-core to core and qt-mobile to mobile-widgets
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>
2016-04-04 22:33:58 -07:00
Robert C. Helling
e216f91ebc Prevent unintentionally running as root
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>
2016-03-26 20:08:08 -07:00
Dirk Hohndel
c63f14eefc Remove unused function
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:47:25 -08:00
Tomaz Canabrava
39313c5b33 Clean up handling of various include file
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>
2016-03-06 11:03:00 -08:00
Lubomir I. Ivanov
84b7a37869 subsurfacestartup.c: leave free_prefs() empty
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>
2015-11-15 10:29:36 -08:00
Dirk Hohndel
76d0763527 Location service: make distance and time threshold configurable
Right now the distance is always in meters, the mobile app doesn't deal
with units at all, anyway.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-14 09:10:06 -08:00
Lubomir I. Ivanov
048c5e01b1 subsurfacestartup.c: don't double free 'default_filename'
'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>
2015-11-03 07:44:56 -08:00
Dirk Hohndel
f85883c707 Create date and time formats preferences
Now we can actually change them in preferences instead of just deriving
them from the language set.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-02 12:51:31 -08:00
Tomaz Canabrava
4c0156e3d5 Move all core-functionality to subsurface-core
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>
2015-10-30 10:36:48 -07:00
Renamed from subsurfacestartup.c (Browse further)