mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-21 19:35:49 +08:00
fix: improve service availability checks
This commit is contained in:
@@ -156,14 +156,13 @@ AirPlayWidget::AirPlayWidget(QWidget *parent)
|
||||
setMinimumSize(0, 0);
|
||||
});
|
||||
|
||||
/* FIXME: this can be handled better, add linux support */
|
||||
/* FIXME: this can be handled better, also check for linux */
|
||||
#ifdef WIN32
|
||||
bool bonjour = IsBonjourServiceInstalled();
|
||||
bool bonjour = IsBonjourServiceInstalled() == SERVICE_AVAILABLE;
|
||||
if (!bonjour) {
|
||||
QMessageBox::warning(
|
||||
this, "Bonjour Service Not Installed",
|
||||
"Bonjour service is not installed on your system. Please install "
|
||||
"it to enable AirPlay functionality.");
|
||||
"Bonjour service is not available on your system.");
|
||||
|
||||
DiagnoseDialog *diagnoseDialog = new DiagnoseDialog();
|
||||
diagnoseDialog->show();
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "iDescriptor-ui.h"
|
||||
#include "qprocessindicator.h"
|
||||
#include "service.h"
|
||||
#include <QCheckBox>
|
||||
#include <QCloseEvent>
|
||||
#include <QComboBox>
|
||||
|
||||
+7
-1
@@ -130,8 +130,9 @@ void iFuseWidget::setupUI()
|
||||
QString defaultMountPath = QDir(homeDir).absoluteFilePath(productType);
|
||||
m_mountPathLabel->setText(defaultMountPath);
|
||||
|
||||
/* FIXME: this can be handled better, also check for linux */
|
||||
#ifdef WIN32
|
||||
if (!IsWinFspInstalled()) {
|
||||
if (IsWinFspInstalled() != SERVICE_AVAILABLE) {
|
||||
DiagnoseDialog *diagnoseDialog = new DiagnoseDialog(this);
|
||||
diagnoseDialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
diagnoseDialog->show();
|
||||
@@ -150,6 +151,11 @@ void iFuseWidget::updateDeviceComboBox()
|
||||
m_mountButton->setEnabled(true);
|
||||
|
||||
for (std::shared_ptr<iDescriptorDevice> device : devices) {
|
||||
|
||||
if (device->deviceInfo.isWireless) {
|
||||
continue; // Skip wireless devices since ifuse only works with USB
|
||||
}
|
||||
|
||||
QString displayText =
|
||||
QString::fromStdString(device->deviceInfo.productType) + " / " +
|
||||
device->udid;
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "appcontext.h"
|
||||
#include "iDescriptor-ui.h"
|
||||
#include "iDescriptor.h"
|
||||
#include "service.h"
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QDesktopServices>
|
||||
|
||||
Reference in New Issue
Block a user