Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 132f39c406eb4b7747af2b70ef610e1d > files > 2

gpsbabel-1.4.4-2.mga3.src.rpm

diff --git a/gui/map.cpp b/gui/map.cpp
index 21e4c23..e6e855c 100755
--- a/gui/map.cpp
+++ b/gui/map.cpp
@@ -34,6 +34,10 @@
 #include "appname.h"
 #include "dpencode.h"
 
+#ifndef PKGDATADIR
+#define PKGDATADIR "/usr/share/gpsbabel"
+#endif
+
 //------------------------------------------------------------------------
 static QString stripDoubleQuotes(const QString s) {
   QString out;
@@ -60,7 +64,8 @@ Map::Map(QWidget *parent,
   connect(this,SIGNAL(loadFinished(bool)),
 	  this,SLOT(loadFinishedX(bool)));
   this->logTimeX("Start map constuctor");
-  QString baseFile =  QApplication::applicationDirPath() + "/gmapbase.html";
+  QString baseFile =  PKGDATADIR;
+  baseFile += "/gmapbase.html";
   if (!QFile(baseFile).exists()) {
     QMessageBox::critical(0, appName,
 			  tr("Missing \"gmapbase.html\" file.  Check installation"));