Make sure Subsurface will find Marble theme when installed on Linux

We need the marble data to go into a subdirectory of /usr/share/subsurface
and we need to search for both data and marbledata when trying to find the
theme.

Fixes #310

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-11-29 11:46:41 -08:00
parent 766b6b3e52
commit d936c55a01
2 changed files with 7 additions and 3 deletions

View file

@ -38,9 +38,13 @@ GlobeGPS::GlobeGPS(QWidget* parent) : MarbleWidget(parent), loadedDives(0)
foundGoogleMap = true;
if (!foundGoogleMap) {
subsurfaceDataPath = getSubsurfaceDataPath("marbledata");
qDebug() << subsurfaceDataPath;
if (subsurfaceDataPath != "")
if (subsurfaceDataPath != "") {
MarbleDirs::setMarbleDataPath(subsurfaceDataPath);
} else {
subsurfaceDataPath = getSubsurfaceDataPath("data");
if (subsurfaceDataPath != "")
MarbleDirs::setMarbleDataPath(subsurfaceDataPath);
}
}
messageWidget = new KMessageWidget(this);
messageWidget->setCloseButtonVisible(false);

View file

@ -141,7 +141,7 @@ XSLTDIR = $(DATADIR)/subsurface
icon.files = $$ICON
xslt.path = /$(XSLTDIR)
marbledir.path = /$(DATADIR)/subsurface
marbledir.path = /$(DATADIR)/subsurface/data
doc.path = /$(DOCDIR)
doc.CONFIG += no_check_exist