mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-22 03:45:51 +08:00
integrate ZUpdater & refactor device management and UI components
- Integrated ZUpdater to handle auto updating - Updated DeviceManagerWidget to improve device selection logic and ensure current device is set correctly when devices are added or removed. - Enhanced FileExplorerWidget to reset the view when sidebar items are clicked. - Changed ZIconWidget to inherit from QAbstractButton for better button behavior and removed unnecessary mouse event handling. - Updated iDescriptor to include device version parsing and improved device version retrieval logic. - Refactored iFuseDiskUnmountButton and iFuseDiskUnmountButton to use ZIconWidget for a consistent UI. - Improved iFuseWidget to handle device selection more robustly and update UI accordingly. - Added SponsorAppCard and SponsorWidget to promote sponsorship within the app. - Updated ToolboxWidget to streamline device selection and toolbox functionality. - General code cleanup and comments for better maintainability.
This commit is contained in:
+8
-1
@@ -112,6 +112,7 @@ void iFuseWidget::updateDeviceComboBox()
|
||||
QList<iDescriptorDevice *> devices =
|
||||
AppContext::sharedInstance()->getAllDevices();
|
||||
|
||||
m_deviceComboBox->blockSignals(true);
|
||||
m_deviceComboBox->clear();
|
||||
m_deviceComboBox->setEnabled(true);
|
||||
m_mountButton->setEnabled(true);
|
||||
@@ -123,6 +124,7 @@ void iFuseWidget::updateDeviceComboBox()
|
||||
m_deviceComboBox->addItem(displayText,
|
||||
QString::fromStdString(device->udid));
|
||||
}
|
||||
m_deviceComboBox->blockSignals(false);
|
||||
|
||||
// Try to find and select the device passed to the widget
|
||||
int deviceIndex = -1;
|
||||
@@ -404,7 +406,12 @@ void iFuseWidget::updateUI()
|
||||
AppContext::sharedInstance()->getAllDevices();
|
||||
|
||||
if (devices.isEmpty()) {
|
||||
close();
|
||||
m_device = nullptr;
|
||||
m_deviceComboBox->clear();
|
||||
m_deviceComboBox->setEnabled(false);
|
||||
m_mountButton->setEnabled(false);
|
||||
m_mountPathLabel->setText("No device connected.");
|
||||
deleteLater();
|
||||
return;
|
||||
}
|
||||
updateDeviceComboBox();
|
||||
|
||||
Reference in New Issue
Block a user