Skip to content

Commit

Permalink
fix: [burn] dvd+rw cannot be closed.
Browse files Browse the repository at this point in the history
hide the "allow append" checkbox.

Log: as above.

Bug: https://pms.uniontech.com/bug-view-265293.html
  • Loading branch information
itsXuSt committed Sep 26, 2024
1 parent 0ddf6b9 commit b46841c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/plugins/common/dfmplugin-burn/dialogs/burnoptdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ void BurnOptDialog::setWriteSpeedInfo(const QStringList &writespeed)
}
}

void BurnOptDialog::setMediaType(DFMBURN::MediaType media)
{
if (media == DFMBURN::MediaType::kDVD_PLUS_RW)
donotcloseComb->hide(); // DVD+RW can not be closed.
}

void BurnOptDialog::initializeUi()
{
if (WindowUtils::isWayLand()) {
Expand Down
1 change: 1 addition & 0 deletions src/plugins/common/dfmplugin-burn/dialogs/burnoptdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class BurnOptDialog : public DTK_WIDGET_NAMESPACE::DDialog
void setISOImage(const QUrl &image);
void setDefaultVolName(const QString &volName);
void setWriteSpeedInfo(const QStringList &writespeed);
void setMediaType(DFMBURN::MediaType media);

private:
void initializeUi();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ void BurnEventReceiver::handleShowBurnDlg(const QString &dev, bool isSupportedUD
dlg->setDefaultVolName(defaultDiscName);
dlg->setUDFSupported(isSupportedUDF, disableISOOpts);
dlg->setWriteSpeedInfo(speed);
dlg->setMediaType(static_cast<DFMBURN::MediaType>(map[DeviceProperty::kOpticalMediaType].toInt()));
dlg->exec();
}

Expand Down

0 comments on commit b46841c

Please sign in to comment.