summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-25 08:28:35 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-25 08:58:37 -0700
commit92ee374494b83c47115f6f479530e7e9678ad562 (patch)
tree8455b81d5f1cbe26492331f6716693e66c574ad2
parentdbb84188c2d323365e100a47cdddd6e793d5e068 (diff)
downloadsubsurface-92ee374494b83c47115f6f479530e7e9678ad562.tar.gz
Find Google maps in Subsurface's source tree
This way the user doesn't need to move the two folders googlemaps and googlesat around in the filesystem. This only works if Subsurface is started from the build directory - it doesn't work when Subsurface is installed (and it doesn't at all address the need to install these files and bundle them as well). I'd consider this a hack to show how the real solution should work. There is one more part of this that is a hack: Marble no longer searches its default data directory; the path we set replaces the Marble system search path. Sadly, Marble doesn't support paths the way Unix thinks of them with multiple directories, separated by ':'. So this means that Marble no longer finds any of its default icons. For most of them that seems fine as I don't think lacking the icons for "manned_landing", "robotic_rover", "unmanned_hard_landing" or the various types of places of worship that Marble supports is necessarily a big issues for Subsurface, but at least the default_location icon seemed important. And since we now need to carry our own, I replaced the boring circle with a tiny dive flag. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--marbledata/bitmaps/default_location.pngbin0 -> 400 bytes
-rw-r--r--marbledata/maps/earth/googlemaps/0/0/0.png (renamed from googlemaps/0/0/0.png)bin159 -> 159 bytes
-rw-r--r--marbledata/maps/earth/googlemaps/googlemaps.dgml (renamed from googlemaps/googlemaps.dgml)0
-rw-r--r--marbledata/maps/earth/googlemaps/preview.png (renamed from googlemaps/preview.png)bin22138 -> 22138 bytes
-rw-r--r--marbledata/maps/earth/googlesat/0/0/0.jpg (renamed from googlesat/0/0/0.jpg)bin10036 -> 10036 bytes
-rw-r--r--marbledata/maps/earth/googlesat/bicycle/0/0/0.png (renamed from googlesat/bicycle/0/0/0.png)bin191 -> 191 bytes
-rw-r--r--marbledata/maps/earth/googlesat/googlesat.dgml (renamed from googlesat/googlesat.dgml)0
-rw-r--r--marbledata/maps/earth/googlesat/preview.png (renamed from googlesat/preview.png)bin28358 -> 28358 bytes
-rw-r--r--marbledata/maps/earth/googlesat/streets/0/0/0.png (renamed from googlesat/streets/0/0/0.png)bin191 -> 191 bytes
-rw-r--r--qt-ui/globe.cpp4
10 files changed, 4 insertions, 0 deletions
diff --git a/marbledata/bitmaps/default_location.png b/marbledata/bitmaps/default_location.png
new file mode 100644
index 000000000..3d4f3b5c3
--- /dev/null
+++ b/marbledata/bitmaps/default_location.png
Binary files differ
diff --git a/googlemaps/0/0/0.png b/marbledata/maps/earth/googlemaps/0/0/0.png
index f7ab669ca..f7ab669ca 100644
--- a/googlemaps/0/0/0.png
+++ b/marbledata/maps/earth/googlemaps/0/0/0.png
Binary files differ
diff --git a/googlemaps/googlemaps.dgml b/marbledata/maps/earth/googlemaps/googlemaps.dgml
index 01a63864b..01a63864b 100644
--- a/googlemaps/googlemaps.dgml
+++ b/marbledata/maps/earth/googlemaps/googlemaps.dgml
diff --git a/googlemaps/preview.png b/marbledata/maps/earth/googlemaps/preview.png
index aa3181d29..aa3181d29 100644
--- a/googlemaps/preview.png
+++ b/marbledata/maps/earth/googlemaps/preview.png
Binary files differ
diff --git a/googlesat/0/0/0.jpg b/marbledata/maps/earth/googlesat/0/0/0.jpg
index 4b9b73295..4b9b73295 100644
--- a/googlesat/0/0/0.jpg
+++ b/marbledata/maps/earth/googlesat/0/0/0.jpg
Binary files differ
diff --git a/googlesat/bicycle/0/0/0.png b/marbledata/maps/earth/googlesat/bicycle/0/0/0.png
index febf01a9c..febf01a9c 100644
--- a/googlesat/bicycle/0/0/0.png
+++ b/marbledata/maps/earth/googlesat/bicycle/0/0/0.png
Binary files differ
diff --git a/googlesat/googlesat.dgml b/marbledata/maps/earth/googlesat/googlesat.dgml
index 0b70f14da..0b70f14da 100644
--- a/googlesat/googlesat.dgml
+++ b/marbledata/maps/earth/googlesat/googlesat.dgml
diff --git a/googlesat/preview.png b/marbledata/maps/earth/googlesat/preview.png
index 5048d0a0f..5048d0a0f 100644
--- a/googlesat/preview.png
+++ b/marbledata/maps/earth/googlesat/preview.png
Binary files differ
diff --git a/googlesat/streets/0/0/0.png b/marbledata/maps/earth/googlesat/streets/0/0/0.png
index febf01a9c..febf01a9c 100644
--- a/googlesat/streets/0/0/0.png
+++ b/marbledata/maps/earth/googlesat/streets/0/0/0.png
Binary files differ
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp
index 0bd8f3d83..014a84a09 100644
--- a/qt-ui/globe.cpp
+++ b/qt-ui/globe.cpp
@@ -8,6 +8,7 @@
#include <marble/GeoDataPlacemark.h>
#include <marble/GeoDataDocument.h>
#include <marble/MarbleModel.h>
+#include <marble/MarbleDirs.h>
#if INCOMPLETE_MARBLE
#include "marble/GeoDataTreeModel.h"
#else
@@ -18,6 +19,9 @@
GlobeGPS::GlobeGPS(QWidget* parent) : MarbleWidget(parent), loadedDives(0)
{
+ // this will find the Google maps when running from your build directory
+ // TODO: all the magic to find the install path (and actually install/bundle these files)
+ MarbleDirs::setMarbleDataPath(QDir("./marbledata").absolutePath());
messageWidget = new KMessageWidget(this);
messageWidget->setCloseButtonVisible(false);
messageWidget->setHidden(true);