mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-01-22 21:28:32 -05:00
UI: Add File Integrity Check
This commit is contained in:
@@ -2025,9 +2025,11 @@ void OBSBasic::OBSInit()
|
||||
delete ui->actionShowCrashLogs;
|
||||
delete ui->actionUploadLastCrashLog;
|
||||
delete ui->menuCrashLogs;
|
||||
delete ui->actionRepair;
|
||||
ui->actionShowCrashLogs = nullptr;
|
||||
ui->actionUploadLastCrashLog = nullptr;
|
||||
ui->menuCrashLogs = nullptr;
|
||||
ui->actionRepair = nullptr;
|
||||
#if !defined(__APPLE__)
|
||||
delete ui->actionCheckForUpdates;
|
||||
ui->actionCheckForUpdates = nullptr;
|
||||
@@ -2041,8 +2043,12 @@ void OBSBasic::OBSInit()
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
if (App()->IsUpdaterDisabled())
|
||||
if (App()->IsUpdaterDisabled()) {
|
||||
ui->actionCheckForUpdates->setEnabled(false);
|
||||
#if defined(_WIN32)
|
||||
ui->actionRepair->setEnabled(false);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
OnFirstLoad();
|
||||
@@ -3666,6 +3672,7 @@ void OBSBasic::CheckForUpdates(bool manualUpdate)
|
||||
trigger_sparkle_update();
|
||||
#elif _WIN32
|
||||
ui->actionCheckForUpdates->setEnabled(false);
|
||||
ui->actionRepair->setEnabled(false);
|
||||
|
||||
if (updateCheckThread && updateCheckThread->isRunning())
|
||||
return;
|
||||
@@ -3680,6 +3687,7 @@ void OBSBasic::CheckForUpdates(bool manualUpdate)
|
||||
void OBSBasic::updateCheckFinished()
|
||||
{
|
||||
ui->actionCheckForUpdates->setEnabled(true);
|
||||
ui->actionRepair->setEnabled(true);
|
||||
}
|
||||
|
||||
void OBSBasic::DuplicateSelectedScene()
|
||||
@@ -6112,6 +6120,20 @@ void OBSBasic::on_actionCheckForUpdates_triggered()
|
||||
CheckForUpdates(true);
|
||||
}
|
||||
|
||||
void OBSBasic::on_actionRepair_triggered()
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
ui->actionCheckForUpdates->setEnabled(false);
|
||||
ui->actionRepair->setEnabled(false);
|
||||
|
||||
if (updateCheckThread && updateCheckThread->isRunning())
|
||||
return;
|
||||
|
||||
updateCheckThread.reset(new AutoUpdateThread(false, true));
|
||||
updateCheckThread->start();
|
||||
#endif
|
||||
}
|
||||
|
||||
void OBSBasic::logUploadFinished(const QString &text, const QString &error)
|
||||
{
|
||||
ui->menuLogFiles->setEnabled(true);
|
||||
|
||||
Reference in New Issue
Block a user