diff --git a/Setup/Assets/Language/Chinese Simplified.iglang.json b/Setup/Assets/Language/Chinese Simplified.iglang.json index 2f7435aeb..05c506b0b 100644 --- a/Setup/Assets/Language/Chinese Simplified.iglang.json +++ b/Setup/Assets/Language/Chinese Simplified.iglang.json @@ -1,4 +1,4 @@ -{ +{ "_Metadata": { "Code": "zh-CN", "EnglishName": "Chinese (Simplified)", @@ -499,6 +499,9 @@ "FrmMain.MnuLayout": "布局", "_._Website": "网站", "FrmMain.MnuPasteImage": "粘贴图像", - "FrmSettings._ShowGalleryScrollbars": "显示相册滚动条" + "FrmSettings._ShowGalleryScrollbars": "显示相册滚动条", + "FrmSettings._EnableAutoSwitchSiblingDir": "当前目录图片加载完毕后自动切换到下/上一个目录", + "FrmMain._SwitchedToNextDirectory": "已切换到下一个目录:{0}", + "FrmMain._SwitchedToPrevDirectory": "已切换到上一个目录:{0}" } } \ No newline at end of file diff --git a/Source/Components/ImageGlass.Base/Language/IgLang.cs b/Source/Components/ImageGlass.Base/Language/IgLang.cs index 5d2cd2fd3..9b7d82a00 100644 --- a/Source/Components/ImageGlass.Base/Language/IgLang.cs +++ b/Source/Components/ImageGlass.Base/Language/IgLang.cs @@ -1,4 +1,4 @@ -/* +/* ImageGlass Project - Image viewer for Windows Copyright (C) 2010 - 2026 DUONG DIEU PHAP Project homepage: https://imageglass.org @@ -555,6 +555,8 @@ public Dictionary InitDefaultLanguage() { "FrmMain._OpenWith", "Open with {0}" }, //v9.0 { "FrmMain._ReachedFirstImage", "Reached the first image" }, // v4.0 { "FrmMain._ReachedLastLast", "Reached the last image" }, // v4.0 + { "FrmMain._SwitchedToNextDirectory", "Switched to next folder: {0}" }, + { "FrmMain._SwitchedToPrevDirectory", "Switched to previous folder: {0}" }, { "FrmMain._ClipboardImage", "Clipboard image" }, //v9.0 #endregion @@ -648,6 +650,7 @@ public Dictionary InitDefaultLanguage() { "FrmSettings._ShouldGroupImagesByDirectory", "Group images by directory" }, { "FrmSettings._ShouldLoadHiddenImages", "Load hidden images" }, { "FrmSettings._EnableLoopBackNavigation", "Loop back to the first image when reaching the end of the image list" }, + { "FrmSettings._EnableAutoSwitchSiblingDir", "Automatically switch to the next/previous sibling directory when reaching the end of the image list" }, { "FrmSettings._ShowImagePreview", "Display image preview while it's being loaded" }, { "FrmSettings._EnableImageAsyncLoading", "Enable image asynchronous loading" }, diff --git a/Source/Components/ImageGlass.Settings/Config.cs b/Source/Components/ImageGlass.Settings/Config.cs index 331d6a2a3..8175c376d 100644 --- a/Source/Components/ImageGlass.Settings/Config.cs +++ b/Source/Components/ImageGlass.Settings/Config.cs @@ -1,4 +1,4 @@ -/* +/* ImageGlass Project - Image viewer for Windows Copyright (C) 2010 - 2026 DUONG DIEU PHAP Project homepage: https://imageglass.org @@ -193,6 +193,13 @@ public static class Config /// public static bool EnableLoopBackNavigation { get; set; } = true; + /// + /// Gets, sets value indicating that ImageGlass will automatically switch + /// to the next or previous sibling directory when reaching the boundary + /// of the current image list. + /// + public static bool EnableAutoSwitchSiblingDir { get; set; } = false; + /// /// Gets, sets value indicating that checker board is shown or not /// @@ -708,6 +715,7 @@ public static void Load(IConfigurationRoot? items = null) ShowFrameNavTool = items.GetValueEx(nameof(ShowFrameNavTool), ShowFrameNavTool); ShowAppIcon = items.GetValueEx(nameof(ShowAppIcon), ShowAppIcon); EnableLoopBackNavigation = items.GetValueEx(nameof(EnableLoopBackNavigation), EnableLoopBackNavigation); + EnableAutoSwitchSiblingDir = items.GetValueEx(nameof(EnableAutoSwitchSiblingDir), EnableAutoSwitchSiblingDir); ShowCheckerboard = items.GetValueEx(nameof(ShowCheckerboard), ShowCheckerboard); ShowCheckerboardOnlyImageRegion = items.GetValueEx(nameof(ShowCheckerboardOnlyImageRegion), ShowCheckerboardOnlyImageRegion); EnableMultiInstances = items.GetValueEx(nameof(EnableMultiInstances), EnableMultiInstances); @@ -1080,6 +1088,7 @@ public static ExpandoObject PrepareJsonSettingsObject(bool useAbsoluteFileUrl = _ = settings.TryAdd(nameof(ShowFrameNavTool), ShowFrameNavTool); _ = settings.TryAdd(nameof(ShowAppIcon), ShowAppIcon); _ = settings.TryAdd(nameof(EnableLoopBackNavigation), EnableLoopBackNavigation); + _ = settings.TryAdd(nameof(EnableAutoSwitchSiblingDir), EnableAutoSwitchSiblingDir); _ = settings.TryAdd(nameof(ShowCheckerboard), ShowCheckerboard); _ = settings.TryAdd(nameof(ShowCheckerboardOnlyImageRegion), ShowCheckerboardOnlyImageRegion); _ = settings.TryAdd(nameof(EnableMultiInstances), EnableMultiInstances); diff --git a/Source/Components/ImageGlass.Settings/WebUI/FrmSettings.html b/Source/Components/ImageGlass.Settings/WebUI/FrmSettings.html index 205eda51e..ad7cb438a 100644 --- a/Source/Components/ImageGlass.Settings/WebUI/FrmSettings.html +++ b/Source/Components/ImageGlass.Settings/WebUI/FrmSettings.html @@ -310,6 +310,12 @@
[EnableLoopBackNavigation]
+
+ +