Skip to content

Commit f0eb37e

Browse files
committed
FrmQuickSetup: disable setting ShouldUseExplorerSortOrder for Standard user profile
1 parent 2be20e5 commit f0eb37e

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

Source/Components/ImageGlass.Settings/WebUI/FrmQuickSetup.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ <h2 lang-html="FrmQuickSetup._StepInfo">[Step <span id="LblStepInfo">1/3</span>]
6161
<div lang-text="FrmSettings._ColorManagement">[Color management]</div>
6262
</label>
6363
</div>
64+
<div class="mb-2">
65+
<label class="ig-checkbox">
66+
<input id="ChkShouldUseExplorerSortOrder" type="checkbox" disabled />
67+
<div lang-text="FrmSettings._ShouldUseExplorerSortOrder">[ShouldUseExplorerSortOrder]</div>
68+
</label>
69+
</div>
6470
<div class="mb-3">
6571
<label class="ig-checkbox">
6672
<input id="ChkUseEmbeddedThumbnailRawFormats" type="checkbox" disabled checked />

Source/Components/ImageGlass.Settings/WebUI/FrmSettings.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,12 +316,6 @@
316316
<div lang-text="FrmSettings._ShowImagePreview">[ShowImagePreview]</div>
317317
</label>
318318
</div>
319-
<div class="mb-2">
320-
<label class="ig-checkbox">
321-
<input type="checkbox" name="EnableImageTransition" />
322-
<div lang-text="FrmSettings._EnableImageTransition">[EnableImageTransition]</div>
323-
</label>
324-
</div>
325319
<div class="mb-2">
326320
<label class="ig-checkbox">
327321
<input type="checkbox" name="EnableImageAsyncLoading" />

Source/Components/ImageGlass.Settings/WebUI/src/FrmQuickSetup.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@ queryAll<HTMLInputElement>('[name="_SettingProfile"]').forEach(el => {
8585
const profileName = query<HTMLInputElement>('[name="_SettingProfile"]:checked').value;
8686
const isProfessional = profileName === 'professional';
8787

88-
query<HTMLInputElement>('#ChkUseEmbeddedThumbnailRawFormats').checked = !isProfessional;
8988
query<HTMLInputElement>('#ChkColorProfile').checked = isProfessional;
89+
query<HTMLInputElement>('#ChkShouldUseExplorerSortOrder').checked = isProfessional;
90+
query<HTMLInputElement>('#ChkUseEmbeddedThumbnailRawFormats').checked = !isProfessional;
9091
});
9192
});
9293

@@ -111,11 +112,13 @@ query('#BtnBack').addEventListener('click', () => {
111112
query('#BtnNext').addEventListener('click', () => {
112113
if (_currentStep >= _stepCount) {
113114
const enableColorProfile = query<HTMLInputElement>('#ChkColorProfile').checked;
115+
const shouldUseExplorerSortOrder = query<HTMLInputElement>('#ChkShouldUseExplorerSortOrder').checked;
114116
const useThumbnailRawFormats = query<HTMLInputElement>('#ChkUseEmbeddedThumbnailRawFormats').checked;
115117

116118
post('APPLY_SETTINGS', {
117119
Language: _currentLang,
118120
ColorProfile: enableColorProfile,
121+
ShouldUseExplorerSortOrder: shouldUseExplorerSortOrder,
119122
UseEmbeddedThumbnailRawFormats: useThumbnailRawFormats,
120123
}, true);
121124
}

Source/Components/ImageGlass.Settings/WebUI/src/FrmSettings/TabAppearance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default class TabAppearance {
1414
* Loads settings for tab Appearance.
1515
*/
1616
static loadSettings() {
17-
if (!_page.isWindows10) {
17+
if (_page.isWindows10) {
1818
query(`[name="WindowBackdrop"]`).setAttribute('disabled', 'true');
1919
}
2020

Source/igcmd/Tools/FrmQuickSetup.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,13 @@ private async Task ApplySettingsAsync(string settingJson)
201201
: nameof(ColorProfileOption.None);
202202
}
203203

204+
if (dict.TryGetValue(nameof(Config.ShouldUseExplorerSortOrder), out var useExplorerSortOrder))
205+
{
206+
Config.ShouldUseExplorerSortOrder = useExplorerSortOrder
207+
?.ToString()
208+
.Equals("true", StringComparison.InvariantCultureIgnoreCase) ?? true;
209+
}
210+
204211
if (dict.TryGetValue(nameof(Config.UseEmbeddedThumbnailRawFormats), out var useThumbnailRawFormatsObj))
205212
{
206213
Config.UseEmbeddedThumbnailRawFormats = useThumbnailRawFormatsObj

0 commit comments

Comments
 (0)