Commit e78a0981 authored by Robert Lancaster's avatar Robert Lancaster Committed by Jasem Mutlaq

Various fixes for OSX and icons

parent 68523926
......@@ -54,7 +54,7 @@ EkosManager::EkosManager(QWidget *parent) : QDialog(parent)
new EkosAdaptor(this);
QDBusConnection::sessionBus().registerObject("/KStars/Ekos", this);
setWindowIcon(QIcon::fromTheme("kstars_ekos", QIcon(":/icons/ekos.png")));
setWindowIcon(QIcon::fromTheme("kstars_ekos", QIcon(":/icons/breeze/default/kstars_ekos.svg")));
nDevices=0;
nConnectedDevices=0;
......@@ -128,7 +128,7 @@ EkosManager::EkosManager(QWidget *parent) : QDialog(parent)
// Set Profile icons
addProfileB->setIcon(QIcon::fromTheme("list-add", QIcon(":/icons/breeze/default/list-add.svg")));
editProfileB->setIcon(QIcon::fromTheme("document-edit", QIcon(":/icons/indi.png")));
editProfileB->setIcon(QIcon::fromTheme("document-edit", QIcon(":/icons/kstars_ekos/document-edit.svg")));
deleteProfileB->setIcon(QIcon::fromTheme("list-remove", QIcon(":/icons/breeze/default/list-remove.svg")));
// Load all drivers
......
......@@ -152,21 +152,17 @@ bool OfflineAstrometryParser::getAstrometryDataDir(QString &dataDir)
QTextStream in(&confFile);
QString line;
QStringList confOptions;
while ( !in.atEnd() )
{
line = in.readLine();
if (line.startsWith("#"))
if (line.isEmpty() || line.startsWith("#"))
continue;
confOptions = line.split(" ");
if (confOptions.size() == 2)
line = line.trimmed();
if (line.startsWith("add_path"))
{
if (confOptions[0] == "add_path")
{
dataDir = confOptions[1];
return true;
}
dataDir = line.mid(9).trimmed();
return true;
}
}
......@@ -178,8 +174,16 @@ bool OfflineAstrometryParser::startSovler(const QString &filename, const QStrin
{
INDI_UNUSED(generated);
#ifdef Q_OS_OSX
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
QStringList envlist = env.toStringList();
envlist.replaceInStrings(QRegularExpression("^(?i)PATH=(.*)"), "PATH=/usr/local/bin:\\1");
solver.setEnvironment(envlist);
#endif
QStringList solverArgs = args;
solverArgs << "-W" << "/tmp/solution.wcs" << filename;
QString solutionFile = QStandardPaths::TempLocation + "/solution.wcs";
solverArgs << "-W" << solutionFile << filename;
connect(&solver, SIGNAL(finished(int)), this, SLOT(solverComplete(int)));
connect(&solver, SIGNAL(readyReadStandardOutput()), this, SLOT(logSolver()));
......@@ -215,7 +219,8 @@ void OfflineAstrometryParser::solverComplete(int exist_status)
solver.disconnect();
// TODO use QTemporaryFile later
QFileInfo solution("/tmp/solution.wcs");
QString solutionFile = QStandardPaths::TempLocation + "/solution.wcs";
QFileInfo solution(solutionFile);
if (exist_status != 0 || solution.exists() == false)
{
......@@ -227,7 +232,7 @@ void OfflineAstrometryParser::solverComplete(int exist_status)
connect(&wcsinfo, SIGNAL(finished(int)), this, SLOT(wcsinfoComplete(int)));
wcsinfo.start(Options::astrometryWCSInfo(), QStringList("/tmp/solution.wcs"));
wcsinfo.start(Options::astrometryWCSInfo(), QStringList(solutionFile));
}
void OfflineAstrometryParser::wcsinfoComplete(int exist_status)
......
......@@ -77,7 +77,7 @@ FITSViewer::FITSViewer (QWidget *parent)
fitsTab->setTabsClosable(true);
setWindowIcon(QIcon::fromTheme("kstars_fitsviewer", QIcon(":/icons/fitsviewer.png")));
setWindowIcon(QIcon::fromTheme("kstars_fitsviewer", QIcon(":/icons/breeze/default/kstars_fitsviewer.svg")));
setCentralWidget(fitsTab);
......
......@@ -64,7 +64,7 @@ GUIManager::GUIManager(QWidget *parent) : QWidget(parent, Qt::Window)
mainLayout->addWidget(mainTabWidget);
setWindowIcon(QIcon::fromTheme("kstars_indi", QIcon(":/icons/indi.png")));
setWindowIcon(QIcon::fromTheme("kstars_indi", QIcon(":/icons/breeze/default/kstars_indi.svg")));
setWindowTitle(i18n("INDI Control Panel"));
setAttribute(Qt::WA_ShowModal, false);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment