Commit 7aa593ca authored by Jasem Mutlaq's avatar Jasem Mutlaq

More work to migrate KStars to Windows. Ekos is now working in remote mode. Needs more testing

parent 319cd64b
......@@ -100,8 +100,13 @@ bool KSUserDB::Initialize() {
//qDebug() << query.lastError();
// Add sample profile
#ifdef Q_OS_WIN
if (!query.exec("INSERT INTO profile (name, host, port) VALUES ('Simulators', 'localhost', 7624)"))
qDebug() << query.lastError();
#else
if (!query.exec("INSERT INTO profile (name) VALUES ('Simulators')"))
qDebug() << query.lastError();
#endif
// Add sample profile drivers
if (!query.exec("INSERT INTO driver (label, role, profile) VALUES ('Telescope Simulator', 'Mount', 1)"))
......@@ -225,7 +230,13 @@ bool KSUserDB::RebuildDB() {
tables.append("CREATE TABLE profile (id INTEGER DEFAULT NULL PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, host TEXT, port INTEGER, city TEXT, province TEXT, country TEXT, indiwebmanagerport INTEGER DEFAULT NULL)");
tables.append("CREATE TABLE driver (id INTEGER DEFAULT NULL PRIMARY KEY AUTOINCREMENT, label TEXT NOT NULL, role TEXT NOT NULL, profile INTEGER NOT NULL, FOREIGN KEY(profile) REFERENCES profile(id))");
//tables.append("CREATE TABLE custom_driver (id INTEGER DEFAULT NULL PRIMARY KEY AUTOINCREMENT, drivers TEXT NOT NULL, profile INTEGER NOT NULL, FOREIGN KEY(profile) REFERENCES profile(id))");
#ifdef Q_OS_WIN
tables.append("INSERT INTO profile (name, host, port) VALUES ('Simulators', 'localhost', 7624)");
#else
tables.append("INSERT INTO profile (name) VALUES ('Simulators')");
#endif
tables.append("INSERT INTO driver (label, role, profile) VALUES ('Telescope Simulator', 'Mount', 1)");
tables.append("INSERT INTO driver (label, role, profile) VALUES ('CCD Simulator', 'CCD', 1)");
tables.append("INSERT INTO driver (label, role, profile) VALUES ('Focuser Simulator', 'Focuser', 1)");
......
......@@ -109,7 +109,7 @@ Capture::Capture()
progressLayout->addWidget(pi, 0, 4, 1, 1);
seqFileCount = 0;
seqWatcher = new KDirWatch();
//seqWatcher = new KDirWatch();
seqTimer = new QTimer(this);
connect(startB, SIGNAL(clicked()), this, SLOT(start()));
connect(stopB, SIGNAL(clicked()), this, SLOT(abort()));
......@@ -125,7 +125,7 @@ Capture::Capture()
connect(previewB, SIGNAL(clicked()), this, SLOT(captureOne()));
connect( seqWatcher, SIGNAL(dirty(QString)), this, SLOT(checkSeqFile(QString)));
//connect( seqWatcher, SIGNAL(dirty(QString)), this, SLOT(checkSeqFile(QString)));
connect(addToQueueB, SIGNAL(clicked()), this, SLOT(addJob()));
connect(removeFromQueueB, SIGNAL(clicked()), this, SLOT(removeJob()));
......@@ -1002,6 +1002,8 @@ void Capture::captureImage()
}
}
checkSeqBoundary(activeJob->getFITSDir());
rc = activeJob->capture(isDark);
switch (rc)
......@@ -1059,24 +1061,24 @@ void Capture::resumeCapture()
/*******************************************************************************/
void Capture::updateSequencePrefix( const QString &newPrefix, const QString &dir)
{
static QString lastDir=QDir::homePath();
//static QString lastDir=QDir::homePath();
seqPrefix = newPrefix;
// If it doesn't exist, create it
QDir().mkpath(dir);
if (dir != lastDir)
/*if (dir != lastDir)
{
seqWatcher->removeDir(lastDir);
lastDir = dir;
}
seqWatcher->addDir(dir, KDirWatch::WatchFiles);
seqWatcher->addDir(dir, KDirWatch::WatchFiles);*/
nextSequenceID = 1;
checkSeqBoundary(dir);
//checkSeqBoundary(dir);
}
void Capture::checkSeqFile(const QString &path)
......@@ -1098,33 +1100,33 @@ void Capture::checkSeqBoundary(const QString &path)
if (meridianFlipStage >= MF_ALIGNING)
return;
//KFileItemList::const_iterator it = items.begin();
//const KFileItemList::const_iterator end = items.end();
QDirIterator it(path, QDir::Files);
while (it.hasNext())
{
tempName = it.next();
tempName.remove(path + QDir::separator());
{
tempName = it.next();
QFileInfo info(tempName);
tempName = info.baseName();
// find the prefix first
//if (tempName.startsWith(seqPrefix) == false || tempName.endsWith(".fits") == false)
if (seqPrefix.isEmpty() || tempName.startsWith(seqPrefix) == false)
continue;
// find the prefix first
if (seqPrefix.isEmpty() || tempName.startsWith(seqPrefix) == false)
continue;
seqFileCount++;
seqFileCount++;
tempName = tempName.remove(seqPrefix);
if (tempName.startsWith("_"))
tempName = tempName.remove(0, 1);
tempName = tempName.remove(seqPrefix);
bool indexOK = false;
newFileIndex = tempName.mid(0, 3).toInt(&indexOK);
if (indexOK && newFileIndex >= nextSequenceID)
nextSequenceID = newFileIndex + 1;
}
if (tempName.startsWith("_"))
tempName = tempName.remove(0, 1);
currentCCD->setNextSequenceID(nextSequenceID);
bool indexOK = false;
newFileIndex = tempName.mid(0, 3).toInt(&indexOK);
if (indexOK && newFileIndex >= nextSequenceID)
nextSequenceID = newFileIndex + 1;
}
currentCCD->setNextSequenceID(nextSequenceID);
}
void Capture::appendLogText(const QString &text)
......@@ -1161,6 +1163,7 @@ void Capture::updateCaptureProgress(ISD::CCDChip * tChip, double value, IPState
activeJob->setCaptureRetires(retries);
appendLogText(i18n("Capture failed."));
if (retries == 3)
{
abort();
......@@ -1168,6 +1171,9 @@ void Capture::updateCaptureProgress(ISD::CCDChip * tChip, double value, IPState
}
appendLogText(i18n("Restarting capture attempt #%1", retries));
nextSequenceID = 1;
captureImage();
return;
}
......@@ -1294,9 +1300,11 @@ void Capture::addJob(bool preview)
if (preview)
return;
QString finalFITSDir = fitsDir->text() + QDir::separator() + frameTypeCombo->currentText();
//QString finalFITSDir = fitsDir->text() + QDir::separator() + frameTypeCombo->currentText();
QString finalFITSDir = fitsDir->text() + QLatin1Literal("/") + frameTypeCombo->currentText();
if ( (job->getFrameType() == FRAME_LIGHT || job->getFrameType() == FRAME_FLAT) && job->getFilterName().isEmpty() == false)
finalFITSDir += QDir::separator() + job->getFilterName();
//finalFITSDir += QDir::separator() + job->getFilterName();
finalFITSDir += QLatin1Literal("/") + job->getFilterName();
job->setFITSDir(finalFITSDir);
}
......@@ -1645,7 +1653,6 @@ void Capture::executeJob()
syncGUIToJob(activeJob);
captureImage();
}
......
......@@ -429,7 +429,7 @@ private:
double getCurrentHA();
/* Capture */
KDirWatch *seqWatcher;
//KDirWatch *seqWatcher;
double seqExpose;
int seqTotalCount;
int seqCurrentCount;
......
......@@ -75,9 +75,6 @@ EkosManager::EkosManager()
ekosOption = NULL;
//kcfg_localMode->setChecked(Options::localMode());
//kcfg_remoteMode->setChecked(Options::remoteMode());
toolsWidget->setIconSize(QSize(64,64));
connect(toolsWidget, SIGNAL(currentChanged(int)), this, SLOT(processTabChange()));
......@@ -109,15 +106,6 @@ EkosManager::EkosManager()
editProfileB->setIcon(QIcon::fromTheme("edit-entry"));
deleteProfileB->setIcon(QIcon::fromTheme("list-remove"));
//connect(profileCombo, SIGNAL(activated(int)), this, SLOT(processINDIModeChange()));
/*localMode = Options::localMode();
if (localMode)
initLocalDrivers();
else
initRemoteDrivers();*/
// Load all drivers
loadDrivers();
......@@ -278,10 +266,10 @@ void EkosManager::reset()
nConnectedDevices=0;
nRemoteDevices=0;
useGuideHead = false;
useST4 = false;
useGuideHead = false;
useST4 = false;
removeTabs();
removeTabs();
genericDevices.clear();
managedDevices.clear();
......@@ -300,7 +288,7 @@ void EkosManager::reset()
connectB->setEnabled(false);
disconnectB->setEnabled(false);
controlPanelB->setEnabled(false);
controlPanelB->setEnabled(false);
processINDIB->setEnabled(true);
processINDIB->setText(i18n("Start INDI"));
......@@ -318,7 +306,7 @@ void EkosManager::processINDI()
bool EkosManager::stop()
{
cleanDevices();
cleanDevices();
profileGroup->setEnabled(true);
......@@ -343,7 +331,7 @@ bool EkosManager::start()
if (localMode)
{
DriverInfo *drv = NULL;
DriverInfo *drv = NULL;
drv = driversList.value(currentProfile->mount());
if (drv != NULL)
......@@ -462,10 +450,10 @@ bool EkosManager::start()
connect(INDIListener::Instance(), SIGNAL(newDustCap(ISD::GDInterface*)), this, SLOT(setDustCap(ISD::GDInterface*)));
connect(INDIListener::Instance(), SIGNAL(newLightBox(ISD::GDInterface*)), this, SLOT(setLightBox(ISD::GDInterface*)));
connect(INDIListener::Instance(), SIGNAL(newST4(ISD::ST4*)), this, SLOT(setST4(ISD::ST4*)));
connect(INDIListener::Instance(), SIGNAL(deviceRemoved(ISD::GDInterface*)), this, SLOT(removeDevice(ISD::GDInterface*)), Qt::DirectConnection);
connect(INDIListener::Instance(), SIGNAL(deviceRemoved(ISD::GDInterface*)), this, SLOT(removeDevice(ISD::GDInterface*)), Qt::DirectConnection);
if (localMode)
{
{
if (isRunning("indiserver"))
{
if (KMessageBox::Yes == (KMessageBox::questionYesNo(0, i18n("Ekos detected an instance of INDI server running. Do you wish to shut down the existing instance before starting a new one?"),
......@@ -485,7 +473,7 @@ bool EkosManager::start()
INDIListener::Instance()->disconnect(this);
qDeleteAll(managedDrivers);
managedDrivers.clear();
ekosStartingStatus = EKOS_STATUS_ERROR;
ekosStartingStatus = EKOS_STATUS_ERROR;
return false;
}
......@@ -644,7 +632,7 @@ void EkosManager::connectDevices()
connectB->setEnabled(false);
disconnectB->setEnabled(true);
appendLogText(i18n("Connecting INDI devices..."));
appendLogText(i18n("Connecting INDI devices..."));
}
void EkosManager::disconnectDevices()
......@@ -652,7 +640,7 @@ void EkosManager::disconnectDevices()
foreach(ISD::GDInterface *device, genericDevices)
device->Disconnect();
appendLogText(i18n("Disconnecting INDI devices..."));
appendLogText(i18n("Disconnecting INDI devices..."));
}
......@@ -704,7 +692,7 @@ void EkosManager::cleanDevices(bool stopDrivers)
controlPanelB->setEnabled(false);
profileGroup->setEnabled(true);
appendLogText(i18n("INDI services stopped."));
appendLogText(i18n("INDI services stopped."));
}
void EkosManager::processNewDevice(ISD::GDInterface *devInterface)
......@@ -753,7 +741,7 @@ void EkosManager::deviceConnected()
ProfileInfo *pi = getCurrentProfile();
//if (nConnectedDevices == managedDrivers.count() || (nDevices <=0 && nConnectedDevices == nRemoteDevices))
if (nConnectedDevices >= pi->drivers.count())
indiConnectionStatus = EKOS_STATUS_SUCCESS;
indiConnectionStatus = EKOS_STATUS_SUCCESS;
ISD::GDInterface *dev = static_cast<ISD::GDInterface *> (sender());
......@@ -873,7 +861,7 @@ void EkosManager::setTelescope(ISD::GDInterface *scopeDevice)
}
void EkosManager::setCCD(ISD::GDInterface *ccdDevice)
{
{
managedDevices.insertMulti(KSTARS_CCD, ccdDevice);
initCapture();
......@@ -900,7 +888,7 @@ void EkosManager::setCCD(ISD::GDInterface *ccdDevice)
if (Options::defaultCaptureCCD().isEmpty() == false)
rc = captureProcess->setCCD(Options::defaultCaptureCCD());
if (rc == false && primaryCCD.isEmpty() == false)
captureProcess->setCCD(primaryCCD);
captureProcess->setCCD(primaryCCD);
initFocus();
......@@ -921,7 +909,7 @@ void EkosManager::setCCD(ISD::GDInterface *ccdDevice)
if (Options::defaultAlignCCD().isEmpty() == false)
rc = alignProcess->setCCD(Options::defaultAlignCCD());
if (rc == false && primaryCCD.isEmpty() == false)
alignProcess->setCCD(primaryCCD);
alignProcess->setCCD(primaryCCD);
initGuide();
......@@ -982,7 +970,7 @@ void EkosManager::setDome(ISD::GDInterface *domeDevice)
{
managedDevices[KSTARS_DOME] = domeDevice;
initDome();
initDome();
domeProcess->setDome(domeDevice);
......@@ -1023,7 +1011,7 @@ void EkosManager::setLightBox(ISD::GDInterface *lightBoxDevice)
}
void EkosManager::removeDevice(ISD::GDInterface* devInterface)
{
{
switch (devInterface->getType())
{
case KSTARS_CCD:
......@@ -1142,7 +1130,7 @@ void EkosManager::processNewProperty(INDI::Property* prop)
}
if (!strcmp(prop->getName(), "GUIDER_EXPOSURE"))
{
{
foreach(ISD::GDInterface *device, findDevices(KSTARS_CCD))
{
if (!strcmp(device->getDeviceName(), prop->getDeviceName()))
......@@ -1322,7 +1310,6 @@ void EkosManager::initCapture()
return;
captureProcess = new Ekos::Capture();
//toolsWidget->addTab( captureProcess, i18n("CCD"));
int index = toolsWidget->addTab( captureProcess, QIcon::fromTheme("kstars_ekos_ccd"), "");
toolsWidget->tabBar()->setTabToolTip(index, i18nc("Charge-Coupled Device", "CCD"));
connect(captureProcess, SIGNAL(newLog()), this, SLOT(updateLog()));
......@@ -1372,7 +1359,6 @@ void EkosManager::initAlign()
return;
alignProcess = new Ekos::Align();
//toolsWidget->addTab( alignProcess, i18n("Alignment"));
int index = toolsWidget->addTab( alignProcess, QIcon::fromTheme("kstars_ekos_align"), "");
toolsWidget->tabBar()->setTabToolTip(index, i18n("Align"));
connect(alignProcess, SIGNAL(newLog()), this, SLOT(updateLog()));
......@@ -1402,7 +1388,6 @@ void EkosManager::initFocus()
return;
focusProcess = new Ekos::Focus();
//toolsWidget->addTab( focusProcess, i18n("Focus"));
int index = toolsWidget->addTab( focusProcess, QIcon::fromTheme("kstars_ekos_focus"), "");
toolsWidget->tabBar()->setTabToolTip(index, i18n("Focus"));
connect(focusProcess, SIGNAL(newLog()), this, SLOT(updateLog()));
......@@ -1410,7 +1395,7 @@ void EkosManager::initFocus()
if (captureProcess)
{
// Autofocus
connect(captureProcess, SIGNAL(checkFocus(double)), focusProcess, SLOT(checkFocus(double)), Qt::UniqueConnection);
connect(captureProcess, SIGNAL(checkFocus(double)), focusProcess, SLOT(checkFocus(double)), Qt::UniqueConnection);
connect(focusProcess, SIGNAL(autoFocusFinished(bool, double)), captureProcess, SLOT(updateAutofocusStatus(bool, double)), Qt::UniqueConnection);
connect(focusProcess, SIGNAL(statusUpdated(bool)), captureProcess, SLOT(updateFocusStatus(bool)), Qt::UniqueConnection);
......@@ -1439,7 +1424,6 @@ void EkosManager::initMount()
return;
mountProcess = new Ekos::Mount();
//toolsWidget->addTab(mountProcess, i18n("Mount"));
int index = toolsWidget->addTab(mountProcess, QIcon::fromTheme("kstars_ekos_mount"), "");
toolsWidget->tabBar()->setTabToolTip(index, i18n("Mount"));
connect(mountProcess, SIGNAL(newLog()), this, SLOT(updateLog()));
......@@ -1454,7 +1438,7 @@ void EkosManager::initMount()
}
void EkosManager::initGuide()
{
{
if (guideProcess == NULL)
guideProcess = new Ekos::Guide();
......@@ -1466,7 +1450,6 @@ void EkosManager::initGuide()
if (managedDevices.contains(KSTARS_TELESCOPE) && managedDevices[KSTARS_TELESCOPE]->isConnected())
guideProcess->setTelescope(managedDevices[KSTARS_TELESCOPE]);
//toolsWidget->addTab( guideProcess, i18n("Guide"));
int index = toolsWidget->addTab( guideProcess, QIcon::fromTheme("kstars_ekos_guide"), "");
toolsWidget->tabBar()->setTabToolTip(index, i18n("Guide"));
connect(guideProcess, SIGNAL(newLog()), this, SLOT(updateLog()));
......@@ -1485,7 +1468,7 @@ void EkosManager::initGuide()
connect(guideProcess, SIGNAL(autoGuidingToggled(bool)), captureProcess, SLOT(setAutoguiding(bool)));
connect(guideProcess, SIGNAL(ditherComplete()), captureProcess, SLOT(resumeCapture()));
connect(guideProcess, SIGNAL(ditherFailed()), captureProcess, SLOT(abort()));
connect(guideProcess, SIGNAL(ditherToggled(bool)), captureProcess, SLOT(setGuideDither(bool)));
connect(guideProcess, SIGNAL(ditherToggled(bool)), captureProcess, SLOT(setGuideDither(bool)));
connect(captureProcess, SIGNAL(exposureComplete()), guideProcess, SLOT(dither()));
// Parking
......
......@@ -48,6 +48,10 @@ ProfileEditor::ProfileEditor(QWidget *w ) : QDialog( w )
connect(ui->remoteMode, SIGNAL(toggled(bool)), this, SLOT(setRemoteMode(bool)));
#ifdef Q_OS_WIN
setRemoteMode(true);
#endif
// Load all drivers
loadDrivers();
}
......
......@@ -116,7 +116,6 @@ bool FITSData::loadFITS (const QString &inFilename, bool silent)
if (fptr)
{
fits_close_file(fptr, &status);
if (tempFile)
......@@ -125,14 +124,11 @@ bool FITSData::loadFITS (const QString &inFilename, bool silent)
filename = inFilename;
if (filename.contains("/tmp/"))
if (filename.startsWith("/tmp/") || filename.contains("/Temp"))
tempFile = true;
else
tempFile = false;
filename.remove("file://");
if (fits_open_image(&fptr, filename.toLatin1(), READONLY, &status))
{
fits_report_error(stderr, status);
......
......@@ -122,29 +122,18 @@ DriverManager::DriverManager()
QObject::connect(ui->clientTreeWidget, SIGNAL(itemClicked(QTreeWidgetItem *, int)), this, SLOT(updateClientTab()));
QObject::connect(ui->localTreeWidget, SIGNAL(expanded(const QModelIndex &)), this, SLOT(resizeDeviceColumn()));
if (Options::indiDriversDir().isEmpty())
Options::setIndiDriversDir(QStandardPaths::locate(QStandardPaths::GenericDataLocation, "indi", QStandardPaths::LocateDirectory));
readXMLDrivers();
readINDIHosts();
updateCustomDrivers();
}
void DriverManager::closeEvent(QCloseEvent * /*event*/)
{
QAction *a = KStars::Instance()->actionCollection()->action( "show_device_manager" );
a->setChecked(false);
}
void DriverManager::hideEvent(QHideEvent * /*event*/)
{
QAction *a = KStars::Instance()->actionCollection()->action( "show_device_manager" );
a->setChecked(false);
}
void DriverManager::showEvent(QShowEvent * /*event*/)
{
QAction *a = KStars::Instance()->actionCollection()->action( "show_device_manager" );
a->setChecked(true);
#ifdef Q_OS_WIN
ui->localTreeWidget->setEnabled(false);
#endif
}
void DriverManager::processDeviceStatus(DriverInfo *dv)
......
......@@ -122,11 +122,6 @@ public:
void clearServers();
protected:
void closeEvent(QCloseEvent *);
void hideEvent(QHideEvent *);
void showEvent(QShowEvent *);
private:
DriverManager();
......
......@@ -45,9 +45,9 @@ OpsINDI::OpsINDI()
connect(selectFITSDirB, SIGNAL(clicked()), this, SLOT(saveFITSDirectory()));
connect(selectDriversDirB, SIGNAL(clicked()), this, SLOT(saveDriversDirectory()));
//connect( m_ConfigDialog->button(QDialogButtonBox::Apply), SIGNAL( clicked() ), m_ConfigDialog, SLOT( slotApply() ) );
//connect( m_ConfigDialog->button(QDialogButtonBox::Ok), SIGNAL( clicked() ), m_ConfigDialog, SLOT( slotApply() ) );
//connect( m_ConfigDialog->button(QDialogButtonBox::Cancel), SIGNAL( clicked() ), m_ConfigDialog, SLOT( slotCancel() ) );
#ifdef Q_OS_WIN
kcfg_indiServer->setEnabled(false);
#endif
}
......
......@@ -79,6 +79,14 @@ KStars::KStars( bool doSplash, bool clockrun, const QString &startdate )
new KstarsAdaptor(this); // NOTE the weird case convention, which cannot be changed as the file is generated by the moc.
// NOTE: Temporary fix since Qt search paths does not include bin/data/icons
#ifdef Q_OS_WIN
QStringList searchPaths = QIcon::themeSearchPaths();
foreach(QString path, QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation))
searchPaths << QString("%1/%2").arg(path).arg("icons");
QIcon::setThemeSearchPaths(searchPaths);
#endif
QDBusConnection::sessionBus().registerObject("/KStars", this);
QDBusConnection::sessionBus().registerService("org.kde.kstars");
......
......@@ -179,7 +179,6 @@
<entry name="indiDriversDir" type="String">
<label>PATH to indi drivers directory</label>
<whatsthis>PATH to indi drivers directory</whatsthis>
<default>/usr/share/indi</default>
</entry>
</group>
......
......@@ -527,11 +527,13 @@ void KStars::slotFlagManager() {
void KStars::slotTelescopeWizard()
{
#ifdef HAVE_INDI
#ifndef Q_OS_WIN
if (QStandardPaths::findExecutable("indiserver").isEmpty())
{
KMessageBox::error(NULL, i18n("Unable to find INDI server. Please make sure the package that provides the 'indiserver' binary is installed."));
return;
}
#endif
QPointer<telescopeWizardProcess> twiz = new telescopeWizardProcess(this);
twiz->exec();
......@@ -542,11 +544,13 @@ void KStars::slotTelescopeWizard()
void KStars::slotINDIPanel()
{
#ifdef HAVE_INDI
#ifndef Q_OS_WIN
if (QStandardPaths::findExecutable("indiserver").isEmpty())
{
KMessageBox::error(NULL, i18n("Unable to find INDI server. Please make sure the package that provides the 'indiserver' binary is installed."));
return;
}
#endif
GUIManager::Instance()->updateStatus();
#endif
}
......@@ -554,11 +558,13 @@ void KStars::slotINDIPanel()
void KStars::slotINDIDriver()
{
#ifdef HAVE_INDI
#ifndef Q_OS_WIN
if (QStandardPaths::findExecutable("indiserver").isEmpty())
{
KMessageBox::error(NULL, i18n("Unable to find INDI server. Please make sure the package that provides the 'indiserver' binary is installed."));
return;
}
#endif
DriverManager::Instance()->raise();
DriverManager::Instance()->activateWindow();
......@@ -572,11 +578,13 @@ void KStars::slotEkos()
#ifdef HAVE_CFITSIO
#ifdef HAVE_INDI
#ifndef Q_OS_WIN
if (QStandardPaths::findExecutable("indiserver").isEmpty())
{
KMessageBox::error(NULL, i18n("Unable to find INDI server. Please make sure the package that provides the 'indiserver' binary is installed."));
return;
}
#endif
ekosManager()->raise();
ekosManager()->activateWindow();
......
......@@ -402,12 +402,10 @@ void KStars::initActions() {
<< i18n("Sky Calendar");
#ifdef HAVE_INDI
#ifndef Q_WS_WIN
actionCollection()->addAction("ekos", this, SLOT( slotEkos() ) )
<< i18n("Ekos")
<< QKeySequence(Qt::CTRL+Qt::Key_K );
#endif
#endif
//FIXME: implement glossary
// ka = actionCollection()->addAction("glossary");
......@@ -445,12 +443,11 @@ void KStars::initActions() {
// ==== devices Menu ================
#ifdef HAVE_INDI
#ifndef Q_WS_WIN
#ifndef Q_OS_WIN
actionCollection()->addAction("telescope_wizard", this, SLOT( slotTelescopeWizard() ) )
<< i18n("Telescope Wizard...")
<< QIcon::fromTheme("tools-wizard" );
#endif
actionCollection()->addAction("device_manager", this, SLOT( slotINDIDriver() ) )
<< i18n("Device Manager...")
<< QIcon::fromTheme("network-server" )
......@@ -458,9 +455,6 @@ void KStars::initActions() {
ka = actionCollection()->addAction("indi_cpl", this, SLOT( slotINDIPanel() ) )
<< i18n("INDI Control Panel...");
ka->setEnabled(false);
#endif
#endif
//Help Menu:
......@@ -554,10 +548,10 @@ void KStars::initActions() {
<< QIcon::fromTheme("kstars_fitsviewer" )
<< ToolTip( i18n("Toggle FITS Viewer") );
ka->setEnabled(false);
actionCollection()->add<KToggleAction>("show_device_manager", this, SLOT( slotINDIToolBar() ) )
/*actionCollection()->add<KToggleAction>("show_device_manager", this, SLOT( slotINDIToolBar() ) )
<< i18nc("Toggle the device manager in the display", "Device Manager" )
<< QIcon::fromTheme("computer" )
<< ToolTip( i18n("Toggle Device Manager") );
<< ToolTip( i18n("Toggle Device Manager") );*/
#endif