[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kstars] kstars: Support for xplanet on Windows
From:       Jasem Mutlaq <null () kde ! org>
Date:       2018-08-31 8:43:51
Message-ID: E1fvf1z-00027O-40 () code ! kde ! org
[Download RAW message or body]

Git commit f3705f1c99f3725c3f8d1cccd7270f9238cfd592 by Jasem Mutlaq, on behalf of Robert Lancaster.
Committed on 31/08/2018 at 08:43.
Pushed by mutlaqja into branch 'master'.

Support for xplanet on Windows

M  +5    -0    kstars/auxiliary/xplanetimageviewer.cpp
M  +6    -0    kstars/xplanet/opsxplanet.cpp

https://commits.kde.org/kstars/f3705f1c99f3725c3f8d1cccd7270f9238cfd592

diff --git a/kstars/auxiliary/xplanetimageviewer.cpp b/kstars/auxiliary/xplanetimageviewer.cpp
index b196e83ea..adb9d590d 100644
--- a/kstars/auxiliary/xplanetimageviewer.cpp
+++ b/kstars/auxiliary/xplanetimageviewer.cpp
@@ -693,6 +693,11 @@ void XPlanetImageViewer::startXplanet()
     }
 #endif
 
+#ifdef Q_OS_WIN
+        QString searchDir = xPlanetLocationInfo.dir().absolutePath() + QDir::separator() + "xplanet";
+        args << "-searchdir" << searchDir;
+#endif
+
     //This prevents it from running forever.
     args << "-num_times" << "1";
 
diff --git a/kstars/xplanet/opsxplanet.cpp b/kstars/xplanet/opsxplanet.cpp
index 525469dc5..c702c80b6 100644
--- a/kstars/xplanet/opsxplanet.cpp
+++ b/kstars/xplanet/opsxplanet.cpp
@@ -113,6 +113,12 @@ void OpsXplanet::showXPlanetMapsDirectory()
         xplanetMapsDir = QCoreApplication::applicationDirPath() + "/xplanet/share/xplanet/images";
     else
         xplanetMapsDir = Options::xplanetPath() + "../share/xplanet/images";
+
+    #ifdef Q_OS_WIN
+        const QFileInfo xPlanetLocationInfo(Options::xplanetPath());
+        xplanetMapsDir = xPlanetLocationInfo.dir().absolutePath() + QDir::separator() + "xplanet" + \
QDir::separator() + "images"; +    #endif
+
     QUrl path = QUrl::fromLocalFile(xplanetMapsDir);
     QDesktopServices::openUrl(path);
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic