add setting to disable auto updates

fixes #1386
also #1418
pull/1255/head
Mikael Finstad 4 years ago
parent 16cd41f287
commit d7922b9465
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26

@ -117,6 +117,7 @@ const defaults = {
captureFrameQuality: 0.95,
captureFrameFileNameFormat: 'timestamp',
enableNativeHevc: true,
enableUpdateCheck: true,
};
// For portable app: https://github.com/mifi/lossless-cut/issues/645

@ -202,7 +202,9 @@ if (!argv.allowMultipleInstances && !safeRequestSingleInstanceLock({ argv: proce
createWindow();
updateMenu();
if (!process.windowsStore && !process.mas) {
const enableUpdateCheck = configStore.get('enableUpdateCheck');
if (enableUpdateCheck && !process.windowsStore && !process.mas) {
newVersion = await checkNewVersion();
// newVersion = '1.2.3';
if (newVersion) updateMenu();

@ -7,7 +7,7 @@ import CaptureFormatButton from './components/CaptureFormatButton';
import AutoExportToggler from './components/AutoExportToggler';
import useUserSettings from './hooks/useUserSettings';
import { askForFfPath } from './dialogs';
import { isMasBuild } from './util';
import { isMasBuild, isStoreBuild } from './util';
import { langNames } from './util/constants';
import { keyMap } from './hooks/useTimelineScroll';
@ -31,7 +31,7 @@ const Settings = memo(({
}) => {
const { t } = useTranslation();
const { customOutDir, changeOutDir, keyframeCut, toggleKeyframeCut, timecodeFormat, setTimecodeFormat, invertCutSegments, setInvertCutSegments, askBeforeClose, setAskBeforeClose, enableAskForImportChapters, setEnableAskForImportChapters, enableAskForFileOpenAction, setEnableAskForFileOpenAction, autoSaveProjectFile, setAutoSaveProjectFile, invertTimelineScroll, setInvertTimelineScroll, language, setLanguage, ffmpegExperimental, setFfmpegExperimental, hideNotifications, setHideNotifications, autoLoadTimecode, setAutoLoadTimecode, enableTransferTimestamps, setEnableTransferTimestamps, enableAutoHtml5ify, setEnableAutoHtml5ify, customFfPath, setCustomFfPath, storeProjectInWorkingDir, setStoreProjectInWorkingDir, enableOverwriteOutput, setEnableOverwriteOutput, mouseWheelZoomModifierKey, setMouseWheelZoomModifierKey, captureFrameMethod, setCaptureFrameMethod, captureFrameQuality, setCaptureFrameQuality, captureFrameFileNameFormat, setCaptureFrameFileNameFormat, enableNativeHevc, setEnableNativeHevc } = useUserSettings();
const { customOutDir, changeOutDir, keyframeCut, toggleKeyframeCut, timecodeFormat, setTimecodeFormat, invertCutSegments, setInvertCutSegments, askBeforeClose, setAskBeforeClose, enableAskForImportChapters, setEnableAskForImportChapters, enableAskForFileOpenAction, setEnableAskForFileOpenAction, autoSaveProjectFile, setAutoSaveProjectFile, invertTimelineScroll, setInvertTimelineScroll, language, setLanguage, ffmpegExperimental, setFfmpegExperimental, hideNotifications, setHideNotifications, autoLoadTimecode, setAutoLoadTimecode, enableTransferTimestamps, setEnableTransferTimestamps, enableAutoHtml5ify, setEnableAutoHtml5ify, customFfPath, setCustomFfPath, storeProjectInWorkingDir, setStoreProjectInWorkingDir, enableOverwriteOutput, setEnableOverwriteOutput, mouseWheelZoomModifierKey, setMouseWheelZoomModifierKey, captureFrameMethod, setCaptureFrameMethod, captureFrameQuality, setCaptureFrameQuality, captureFrameFileNameFormat, setCaptureFrameFileNameFormat, enableNativeHevc, setEnableNativeHevc, enableUpdateCheck, setEnableUpdateCheck } = useUserSettings();
const onLangChange = useCallback((e) => {
const { value } = e.target;
@ -314,6 +314,19 @@ const Settings = memo(({
</Row>
)}
{!isStoreBuild && (
<Row>
<KeyCell>{t('Check for updates on startup?')}</KeyCell>
<Table.TextCell>
<Checkbox
label={t('Check for updates')}
checked={enableUpdateCheck}
onChange={e => setEnableUpdateCheck(e.target.checked)}
/>
</Table.TextCell>
</Row>
)}
<Row>
<KeyCell>{t('Enable HEVC / H265 hardware decoding (you may need to turn this off if you have problems with HEVC files)')}</KeyCell>
<Table.TextCell>

@ -127,6 +127,9 @@ export default () => {
useEffect(() => safeSetConfig({ captureFrameFileNameFormat }), [captureFrameFileNameFormat]);
const [enableNativeHevc, setEnableNativeHevc] = useState(safeGetConfigInitial('enableNativeHevc'));
useEffect(() => safeSetConfig({ enableNativeHevc }), [enableNativeHevc]);
const [enableUpdateCheck, setEnableUpdateCheck] = useState(safeGetConfigInitial('enableUpdateCheck'));
useEffect(() => safeSetConfig({ enableUpdateCheck }), [enableUpdateCheck]);
const resetKeyBindings = useCallback(() => {
configStore.reset('keyBindings');
@ -231,5 +234,7 @@ export default () => {
setCaptureFrameFileNameFormat,
enableNativeHevc,
setEnableNativeHevc,
enableUpdateCheck,
setEnableUpdateCheck,
};
};

Loading…
Cancel
Save