diff --git a/Docs/ConfigurationDialog1.png b/Docs/ConfigurationDialog1.png index 2d8759e..c284698 100644 Binary files a/Docs/ConfigurationDialog1.png and b/Docs/ConfigurationDialog1.png differ diff --git a/Docs/ConfigurationDialog2.png b/Docs/ConfigurationDialog2.png index 74dbcde..643dfc5 100644 Binary files a/Docs/ConfigurationDialog2.png and b/Docs/ConfigurationDialog2.png differ diff --git a/Docs/ConfigurationDialog3.png b/Docs/ConfigurationDialog3.png index 1ad1644..6530106 100644 Binary files a/Docs/ConfigurationDialog3.png and b/Docs/ConfigurationDialog3.png differ diff --git a/Docs/ConfigurationDialog4.png b/Docs/ConfigurationDialog4.png index 6585a9f..21be334 100644 Binary files a/Docs/ConfigurationDialog4.png and b/Docs/ConfigurationDialog4.png differ diff --git a/Docs/ConfigurationDialog5.png b/Docs/ConfigurationDialog5.png new file mode 100644 index 0000000..c9d855c Binary files /dev/null and b/Docs/ConfigurationDialog5.png differ diff --git a/Docs/releasenotes.md b/Docs/releasenotes.md index ca94104..be22d9a 100644 --- a/Docs/releasenotes.md +++ b/Docs/releasenotes.md @@ -1,6 +1,11 @@ # Release Notes -## v1.6.2 - 2020-01-05 +## v1.6.3 - 2020-01-08 + +- Auto-Save Window Positions on a schedule +- Auto-Save Desktop Icons on a schedule + +## v1.6.2 - 2020-01-07 - Redesigned Configuration dialog to tabbed dialog - Reformatted user options data file to have values in appropriate sections diff --git a/Docs/todo.md b/Docs/todo.md index 99fc2fb..94924b3 100644 --- a/Docs/todo.md +++ b/Docs/todo.md @@ -1,10 +1,8 @@ # To Do -- History list of Saved Window Positions -- History list of Saved Desktop Icon Positions +- Support History of Saved Window Positions +- Support History of Saved Desktop Icon Positions - Add icons to other context menu items -- Auto-Save Window Positions on a schedule -- Auto-Save Desktop Icons on a schedule ## Bugs diff --git a/Lib/DesktopIcons.ahk b/Lib/DesktopIcons.ahk index 3a523b3..bc295be 100644 --- a/Lib/DesktopIcons.ahk +++ b/Lib/DesktopIcons.ahk @@ -155,7 +155,7 @@ HasIconMoved(icon1, icon2) } ;-------------------------------------------------------------------------------- -SaveDesktopIcons() +SaveDesktopIcons(notify) { desktop := new Desktop() if (!desktop.IsValid) @@ -186,13 +186,16 @@ SaveDesktopIcons() LogText("DesktopIcons: " . saveCount . " icons written to " . fileName) - notifyText := "No Desktop Icons saved" - If saveCount > 0 - { - notifyText := saveCount . " Desktop Icons saved" + if (notify) + { + notifyText := "No Desktop Icons saved" + If saveCount > 0 + { + notifyText := saveCount . " Desktop Icons saved" + } + + new PleasantNotify("Desktop Icons", notifyText, 250, 100, "b r") } - - new PleasantNotify("Desktop Icons", notifyText, 250, 100, "b r") } ;-------------------------------------------------------------------------------- diff --git a/Lib/WindowPositions.ahk b/Lib/WindowPositions.ahk index 77cff70..b4663f5 100644 --- a/Lib/WindowPositions.ahk +++ b/Lib/WindowPositions.ahk @@ -110,7 +110,7 @@ HasWindowMoved(window1, window2) ;-------------------------------------------------------------------------------- ; SaveWindowPositions - Save all the current window positions to a file -SaveWindowPositions(includeOffScreenWindows) +SaveWindowPositions(includeOffScreenWindows, notify) { desktopSize := GetDesktopSize() @@ -174,13 +174,16 @@ SaveWindowPositions(includeOffScreenWindows) LogText("WindowPositions: " . saveCount . " windows written to " . fileName) - notifyText := "No Window Positions saved" - If saveCount > 0 + if (notify) { - notifyText := saveCount . " Window Positions saved" - } + notifyText := "No Window Positions saved" + If saveCount > 0 + { + notifyText := saveCount . " Window Positions saved" + } - new PleasantNotify("Window Positions", notifyText, 250, 100, "b r") + new PleasantNotify("Window Positions", notifyText, 250, 100, "b r") + } } ;-------------------------------------------------------------------------------- diff --git a/README.md b/README.md index 8f0f959..2564908 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,8 @@ A Configuration dialog, available from the tray icon, allows controlling some as ![Configuration Dialog Tab 4](Docs/ConfigurationDialog4.png) +![Configuration Dialog Tab 5](Docs/ConfigurationDialog5.png) + ## Features ### Optimum Positioning diff --git a/Setup/WindowMenu_Setup.iss b/Setup/WindowMenu_Setup.iss index 1988916..3789050 100644 --- a/Setup/WindowMenu_Setup.iss +++ b/Setup/WindowMenu_Setup.iss @@ -1,6 +1,6 @@ #define AppName "WindowExtensions" #define AppTitle "Window Extensions" -#define AppVersion "1.6.2" +#define AppVersion "1.6.3" [Setup] AppName={#AppName} diff --git a/WindowExtensions.ahk b/WindowExtensions.ahk index 513bd22..f388ce7 100644 --- a/WindowExtensions.ahk +++ b/WindowExtensions.ahk @@ -15,7 +15,7 @@ AppDescription := "Window Extensions Menu and HotKeys" AppCopyright := "Copyright © 2020 Martin Smith" AppNotes := "Concise and consistent control over Window Positions. Right-click right half of Window Caption bar to invoke, or hit WinKey-W" AppURL := "https://github.com/martinsmith1968/WindowExtensions" -AppVersion := "1.6.2.0" +AppVersion := "1.6.3.0" ;-------------------------------------------------------------------------------- ; Includes @@ -124,4 +124,5 @@ OnUserConfigUpdated() { BuildWindowMenu() BuildTrayMenu() + WindowExtensionsUserConfig_OnConfigUpdated() } diff --git a/WindowExtensionsUserConfig.ahk b/WindowExtensionsUserConfig.ahk index 6719d6f..de1fd82 100644 --- a/WindowExtensionsUserConfig.ahk +++ b/WindowExtensionsUserConfig.ahk @@ -1,3 +1,4 @@ +#Include Lib\Logging.ahk #Include Lib\UserConfig.ahk MenuLocationNone := 0 @@ -9,6 +10,11 @@ MenuLocationItems := [] MenuLocationValues := [] +WindowPositions_TimerEnabled := false +WindowPositions_TimerIntervalMinutes := 0 +DesktopIcons_TimerEnabled := false +DesktopIcons_TimerIntervalMinutes := 0 + ;-------------------------------------------------------------------------------- ; Initialisation WindowExtensionsUserConfig_OnInit() @@ -21,6 +27,11 @@ WindowExtensionsUserConfig_OnInit() global MenuLocationItems global MenuLocationValues + global WindowPositions_TimerEnabled + global WindowPositions_TimerIntervalMinutes + global DesktopIcons_TimerEnabled + global DesktopIcons_TimerIntervalMinutes + MenuLocationNone := 0 MenuLocationWindowMenu := 1 MenuLocationTrayMenu := 2 @@ -38,6 +49,11 @@ WindowExtensionsUserConfig_OnInit() MenuLocationValues.push(MenuLocationTrayMenu) MenuLocationValues.push(MenuLocationAll) + WindowPositions_TimerEnabled := false + WindowPositions_TimerIntervalMinutes := 0 + DesktopIcons_TimerEnabled := false + DesktopIcons_TimerIntervalMinutes := 0 + UserConfig_OnInit() } @@ -55,8 +71,92 @@ WindowExtensionsUserConfig_OnStartup() { RestoreWindowPositions(G_UserConfig.WindowPositions_IncludeOffScreenWindows) } + + WindowExtensionsUserConfig_OnConfigUpdated() +} + +;-------------------------------------------------------------------------------- +; OnConfigUpdated +WindowExtensionsUserConfig_OnConfigUpdated() +{ + global G_UserConfig + + WindowPositionsConfigureTimer(G_UserConfig.WindowPositions_AutoSave, G_UserConfig.WindowPositions_AutoSaveIntervalMinutes) + DesktopIconsConfigureTimer(G_UserConfig.DesktopIcons_AutoSave, G_UserConfig.DesktopIcons_AutoSaveIntervalMinutes) +} + +;-------------------------------------------------------------------------------- +; WindowPositionsConfigureTimer - Configure the timer +WindowPositionsConfigureTimer(enabled, intervalMinutes) +{ + global WindowPositions_TimerEnabled + global WindowPositions_TimerIntervalMinutes + + if (enabled = WindowPositions_TimerEnabled && intervalMinutes = WindowPositions_TimerIntervalMinutes) + { + return + } + + LogText("Deleting WindowPositionsAutoSave_OnTimer") + Try SetTimer, WindowPositionsAutoSave_OnTimer, Delete + + if (enabled) + { + milliseconds := (intervalMinutes * 60) * 1000 + + LogText("Setting WindowPositionsAutoSave_OnTimer for : " . milliseconds) + SetTimer, WindowPositionsAutoSave_OnTimer, %milliseconds% + } } +;-------------------------------------------------------------------------------- +; DesktopIconsConfigureTimer - Configure the timer +DesktopIconsConfigureTimer(enabled, intervalMinutes) +{ + global DesktopIcons_TimerEnabled + global DesktopIcons_TimerIntervalMinutes + + if (enabled = DesktopIcons_TimerEnabled && intervalMinutes = DesktopIcons_TimerIntervalMinutes) + { + return + } + + LogText("Deleting DesktopIconsAutoSave_OnTimer") + Try SetTimer, DesktopIconsAutoSave_OnTimer, Delete + + if (enabled) + { + milliseconds := (intervalMinutes * 60) * 1000 + + LogText("Setting DesktopIconsAutoSave_OnTimer for : " . milliseconds) + SetTimer, DesktopIconsAutoSave_OnTimer, %milliseconds% + } +} + +;-------------------------------------------------------------------------------- +; WindowPositionsAutoSave_OnTimer - Timer execute +WindowPositionsAutoSave_OnTimer() +{ + global G_UserConfig + + LogText("Executing: " . A_ThisFunc) + + SaveWindowPositions(G_UserConfig.WindowPositions_IncludeOffScreenWindows, G_UserConfig.WindowPositions_AutoSaveNotify) +} + +;-------------------------------------------------------------------------------- +; DesktopIconsAutoSave_OnTimer - Timer execute +DesktopIconsAutoSave_OnTimer() +{ + global G_UserConfig + + LogText("Executing: " . A_ThisFunc) + + SaveDesktopIcons(G_UserConfig.DesktopIcons_AutoSaveNotify) +} + +;-------------------------------------------------------------------------------- +; WindowExtensionsUserConfig class class WindowExtensionsUserConfig extends UserConfig { Default_About_Version := "" @@ -69,6 +169,12 @@ Default_Startup_RestoreWindowPositions := false Default_MenuControl_WindowPositionsMenuLocation := 0 Default_MenuControl_DesktopIconsMenuLocation := 0 Default_WindowPositions_IncludeOffScreenWindows := false +Default_WindowPositions_AutoSave := false +Default_WindowPositions_AutoSaveIntervalMinutes := 5 +Default_WindowPositions_AutoSaveNotify := false +Default_DesktopIcons_AutoSave := false +Default_DesktopIcons_AutoSaveIntervalMinutes := 5 +Default_DesktopIcons_AutoSaveNotify := false InitDefaults() { @@ -100,6 +206,12 @@ Default_WindowPositions_IncludeOffScreenWindows := false this.Properties.push("MenuControl_WindowPositionsMenuLocation") this.Properties.push("MenuControl_DesktopIconsMenuLocation") this.Properties.push("WindowPositions_IncludeOffScreenWindows") + this.Properties.push("WindowPositions_AutoSave") + this.Properties.push("WindowPositions_AutoSaveIntervalMinutes") + this.Properties.push("WindowPositions_AutoSaveNotify") + this.Properties.push("DesktopIcons_AutoSave") + this.Properties.push("DesktopIcons_AutoSaveIntervalMinutes") + this.Properties.push("DesktopIcons_AutoSaveNotify") this.ObsoleteProperties.push("General_RestoreDesktopIconsOnStartup") this.ObsoleteProperties.push("General_RestoreWindowPositionsOnStartup") @@ -234,4 +346,76 @@ Default_WindowPositions_IncludeOffScreenWindows := false base.SetValue(base.GetSectionNameFromFunc(A_ThisFunc), base.GetPropertyNameFromFunc(A_ThisFunc), value) } } -} + + WindowPositions_AutoSave + { + get + { + return base.GetValue(base.GetSectionNameFromFunc(A_ThisFunc), base.GetPropertyNameFromFunc(A_ThisFunc), this.Default_WindowPositions_AutoSave, "boolean") + } + set + { + base.SetValue(base.GetSectionNameFromFunc(A_ThisFunc), base.GetPropertyNameFromFunc(A_ThisFunc), value) + } + } + + WindowPositions_AutoSaveIntervalMinutes + { + get + { + return base.GetValue(base.GetSectionNameFromFunc(A_ThisFunc), base.GetPropertyNameFromFunc(A_ThisFunc), this.Default_WindowPositions_AutoSaveIntervalMinutes, "integer") + } + set + { + base.SetValue(base.GetSectionNameFromFunc(A_ThisFunc), base.GetPropertyNameFromFunc(A_ThisFunc), value) + } + } + + WindowPositions_AutoSaveNotify + { + get + { + return base.GetValue(base.GetSectionNameFromFunc(A_ThisFunc), base.GetPropertyNameFromFunc(A_ThisFunc), this.Default_WindowPositions_AutoSaveNotify, "boolean") + } + set + { + base.SetValue(base.GetSectionNameFromFunc(A_ThisFunc), base.GetPropertyNameFromFunc(A_ThisFunc), value) + } + } + + DesktopIcons_AutoSave + { + get + { + return base.GetValue(base.GetSectionNameFromFunc(A_ThisFunc), base.GetPropertyNameFromFunc(A_ThisFunc), this.Default_DesktopIcons_AutoSave, "boolean") + } + set + { + base.SetValue(base.GetSectionNameFromFunc(A_ThisFunc), base.GetPropertyNameFromFunc(A_ThisFunc), value) + } + } + + DesktopIcons_AutoSaveIntervalMinutes + { + get + { + return base.GetValue(base.GetSectionNameFromFunc(A_ThisFunc), base.GetPropertyNameFromFunc(A_ThisFunc), this.Default_DesktopIcons_AutoSaveIntervalMinutes, "integer") + } + set + { + base.SetValue(base.GetSectionNameFromFunc(A_ThisFunc), base.GetPropertyNameFromFunc(A_ThisFunc), value) + } + } + + DesktopIcons_AutoSaveNotify + { + get + { + return base.GetValue(base.GetSectionNameFromFunc(A_ThisFunc), base.GetPropertyNameFromFunc(A_ThisFunc), this.Default_DesktopIcons_AutoSaveNotify, "boolean") + } + set + { + base.SetValue(base.GetSectionNameFromFunc(A_ThisFunc), base.GetPropertyNameFromFunc(A_ThisFunc), value) + } + } +} diff --git a/WindowExtensionsUserConfigGui.ahk b/WindowExtensionsUserConfigGui.ahk index 68d482d..04ff632 100644 --- a/WindowExtensionsUserConfigGui.ahk +++ b/WindowExtensionsUserConfigGui.ahk @@ -16,7 +16,17 @@ menuControl_desktopIconsMenuLocationChoice := 0 menuControl_windowPositionsMenuLocationChoice := 0 windowPositions_NumberOfFilesToKeep := 20 windowPositions_IncludeOffScreenWindows := false -desktopIcons_NumberOfFilesToKeep := 20 +windowPositions_AutoSave := false +windowPositions_AutoSaveIntervalLabel := "" +windowPositions_AutoSaveIntervalEdit := 5 +windowPositions_AutoSaveIntervalMinutes := 5 +windowPositions_AutoSaveNotify := false +desktopIcons_AutoSave := false +desktopIcons_AutoSaveIntervalLabel := "" +desktopIcons_AutoSaveIntervalEdit := 5 +desktopIcons_AutoSaveIntervalMinutes := 5 +desktopIcons_AutoSaveNotify := false +;desktopIcons_NumberOfFilesToKeep := 20 ;-------------------------------------------------------------------------------- ; LoadConfigGuiValues - Populate gui variables with values from User Config @@ -33,6 +43,11 @@ LoadConfigGuiValues(userConfig) global menuControl_desktopIconsMenuLocation global menuControl_desktopIconsMenuLocationChoice global windowPositions_IncludeOffScreenWindows + global windowPositions_AutoSave + global windowPositions_AutoSaveIntervalLabel + global windowPositions_AutoSaveIntervalEdit + global windowPositions_AutoSaveIntervalMinutes + global windowPositions_AutoSaveNotify global MenuLocationValues global MenuLocationItems @@ -50,6 +65,9 @@ LoadConfigGuiValues(userConfig) menuControl_windowPositionsMenuLocationChoice := IndexOf(MenuLocationValues, menuControl_windowPositionsMenuLocation) menuControl_desktopIconsMenuLocation := userConfig.MenuControl_DesktopIconsMenuLocation menuControl_desktopIconsMenuLocationChoice := IndexOf(MenuLocationValues, menuControl_desktopIconsMenuLocation) + windowPositions_AutoSave := userConfig.WindowPositions_AutoSave + windowPositions_AutoSaveIntervalMinutes := userConfig.WindowPositions_AutoSaveIntervalMinutes + windowPositions_AutoSaveNotify := userConfig.WindowPositions_AutoSaveNotify windowPositions_IncludeOffScreenWindows := userConfig.WindowPositions_IncludeOffScreenWindows ? 1 : 0 } @@ -68,6 +86,14 @@ SaveConfigGuiValues(userConfig) global menuControl_desktopIconsMenuLocation global menuControl_desktopIconsMenuLocationChoice global windowPositions_IncludeOffScreenWindows + global windowPositions_AutoSave + global windowPositions_AutoSaveIntervalLabel + global windowPositions_AutoSaveIntervalMinutes + global windowPositions_AutoSaveNotify + global desktopIcons_AutoSave + global desktopIcons_AutoSaveIntervalLabel + global desktopIcons_AutoSaveIntervalMinutes + global desktopIcons_AutoSaveNotify global MenuLocationValues @@ -82,7 +108,13 @@ SaveConfigGuiValues(userConfig) userConfig.Startup_RestoreDesktopIcons := startup_restoreDesktopIcons userConfig.MenuControl_WindowPositionsMenuLocation := MenuLocationValues[menuControl_windowPositionsMenuLocation] userConfig.MenuControl_DesktopIconsMenuLocation := MenuLocationValues[menuControl_desktopIconsMenuLocation] + userConfig.WindowPositions_AutoSave := windowPositions_AutoSave + userConfig.WindowPositions_AutoSaveIntervalMinutes := windowPositions_AutoSaveIntervalMinutes + userConfig.WindowPositions_AutoSaveNotify := windowPositions_AutoSaveNotify userConfig.WindowPositions_IncludeOffScreenWindows := windowPositions_IncludeOffScreenWindows + userConfig.DesktopIcons_AutoSave := desktopIcons_AutoSave + userConfig.DesktopIcons_AutoSaveIntervalMinutes := desktopIcons_AutoSaveIntervalMinutes + userConfig.DesktopIcons_AutoSaveNotify := desktopIcons_AutoSaveNotify userConfig.Save() @@ -107,12 +139,25 @@ BuildConfigGui() global menuControl_desktopIconsMenuLocation global menuControl_desktopIconsMenuLocationChoice global windowPositions_IncludeOffScreenWindows - + global windowPositions_AutoSave + global windowPositions_AutoSaveIntervalLabel + global windowPositions_AutoSaveIntervalEdit + global windowPositions_AutoSaveIntervalMinutes + global windowPositions_AutoSaveNotify + global desktopIcons_AutoSave + global desktopIcons_AutoSaveIntervalLabel + global desktopIcons_AutoSaveIntervalEdit + global desktopIcons_AutoSaveIntervalMinutes + global desktopIcons_AutoSaveNotify + menuLocationItemsText := JoinItems("|", MenuLocationItems) marginSize := 5 + indentSize := 20 col1 := 20 + col1Indent := col1 + indentSize col2 := 220 + col2Indent := col2 + indentSize tabHeight := 40 rowHeight := 30 textOffSet := 3 @@ -130,8 +175,7 @@ BuildConfigGui() ; Start Gui Gui, Config:New, -SysMenu, %AppName% Configuration Gui, Config:Margin, %marginSize%, %marginSize% - ;Gui, Config:Add, Tab3, -Wrap w370 h230, General|Startup|Menu Control|Window Positions|Desktop Icons - Gui, Config:Add, Tab3, -Wrap w370 h230, General|Startup|Menu Control|Window Positions + Gui, Config:Add, Tab3, -Wrap w370 h230, General|Startup|Menu Control|Window Positions|Desktop Icons ; Tab 1 - General Gui, Config:Tab, 1 @@ -171,15 +215,23 @@ BuildConfigGui() ; Tab 4 - Window Positions Gui, Config:Tab, 4 ; Row 1 - ;Gui, Config:Add, Text, x%col1% y%row1t%, Number of saved files to &keep : - ;Gui, Config:Add, Edit, w80 x%col2% y%row1% - ;Gui, Config:Add, UpDown, vwindowPositions_NumberOfFilesToKeep Range0-100, %windowPositions_NumberOfFilesToKeep% - ; Row 2 - Gui, Config:Add, Checkbox, x%col1% y%row1t% vwindowPositions_IncludeOffScreenWindows Checked%windowPositions_IncludeOffScreenWindows%, Include Off-Screen Windows + Gui, Config:Add, Checkbox, x%col1% y%row1t% vwindowPositions_AutoSave gwindowPositions_AutoSave_Checked Checked%windowPositions_AutoSave%, Auto-Save Window Positions ? + Gui, Config:Add, Text, x%col1Indent% y%row2t% vwindowPositions_AutoSaveIntervalLabel, Auto-Save interval (minutes) + Gui, Config:Add, Edit, w80 x%col2% y%row2% vwindowPositions_AutoSaveIntervalEdit + Gui, Config:Add, UpDown, vwindowPositions_AutoSaveIntervalMinutes Range1-360, %windowPositions_AutoSaveIntervalMinutes% + Gui, Config:Add, Checkbox, x%col1Indent% y%row3% vwindowPositions_AutoSaveNotify Checked%windowPositions_AutoSaveNotify%, Notify when Auto-Saving ? + ; Row 4 + Gui, Config:Add, Checkbox, x%col1% y%row4t% vwindowPositions_IncludeOffScreenWindows Checked%windowPositions_IncludeOffScreenWindows%, Include Off-Screen Windows ; Tab 5 - Desktop Icons - ;Gui, Config:Tab, 5 + Gui, Config:Tab, 5 ; Row 1 + Gui, Config:Add, Checkbox, x%col1% y%row1t% vdesktopIcons_AutoSave gdesktopIcons_AutoSave_Checked Checked%desktopIcons_AutoSave%, Auto-Save Desktop Icons ? + Gui, Config:Add, Text, x%col1Indent% y%row2t% vdesktopIcons_AutoSaveIntervalLabel, Auto-Save interval (minutes) + Gui, Config:Add, Edit, w80 x%col2% y%row2% vdesktopIcons_AutoSaveIntervalEdit + Gui, Config:Add, UpDown, vdesktopIcons_AutoSaveIntervalMinutes Range1-360, %desktopIcons_AutoSaveIntervalMinutes% + Gui, Config:Add, Checkbox, x%col1Indent% y%row3% vdesktopIcons_AutoSaveNotify Checked%desktopIcons_AutoSaveNotify%, Notify when Auto-Saving ? + ; Row 4 ;Gui, Config:Add, Text, x%col1% y%row1t%, Number of saved files to &keep : ;Gui, Config:Add, Edit, w80 x%col2% y%row1% ;Gui, Config:Add, UpDown, vdesktopIcons_NumberOfFilesToKeep Range0-100, %desktopIcons_NumberOfFilesToKeep% @@ -188,6 +240,37 @@ BuildConfigGui() Gui, Config:Tab Gui, Config:Add, Button, default x205 y240 w80, OK ; The label ButtonOK (if it exists) will be run when the button is pressed. Gui, Config:Add, Button, x295 y240 w80, Cancel ; The label ButtonCancel (if it exists) will be run when the button is pressed. + + ;-------------------------------------------------------------------------------- + ; Fire Events to ensure control consistency + windowPositions_AutoSave_Checked() + desktopIcons_AutoSave_Checked() +} + +;-------------------------------------------------------------------------------- +; windowPositions_AutoSave_Checked - When Auto-Save is checked +windowPositions_AutoSave_Checked() +{ + GuiControlGet, windowPositions_AutoSave + enabled := windowPositions_AutoSave ? 1 : 0 + + GuiControl, Enable%enabled%, windowPositions_AutoSaveIntervalLabel + GuiControl, Enable%enabled%, windowPositions_AutoSaveIntervalEdit + GuiControl, Enable%enabled%, windowPositions_AutoSaveIntervalMinutes + GuiControl, Enable%enabled%, windowPositions_AutoSaveNotify +} + +;-------------------------------------------------------------------------------- +; desktopIcons_AutoSave_Checked - When Auto-Save is checked +desktopIcons_AutoSave_Checked() +{ + GuiControlGet, desktopIcons_AutoSave + enabled := desktopIcons_AutoSave ? 1 : 0 + + GuiControl, Enable%enabled%, desktopIcons_AutoSaveIntervalLabel + GuiControl, Enable%enabled%, desktopIcons_AutoSaveIntervalEdit + GuiControl, Enable%enabled%, desktopIcons_AutoSaveIntervalMinutes + GuiControl, Enable%enabled%, desktopIcons_AutoSaveNotify } ;-------------------------------------------------------------------------------- diff --git a/WindowMenu.ahk b/WindowMenu.ahk index a2ec729..bde02b2 100644 --- a/WindowMenu.ahk +++ b/WindowMenu.ahk @@ -258,7 +258,7 @@ return ;-------------------------------------------------------------------------------- SaveWindowPositionsHandler: -SaveWindowPositions(G_UserConfig.WindowPositions_IncludeOffScreenWindows) +SaveWindowPositions(G_UserConfig.WindowPositions_IncludeOffScreenWindows, true) return RestoreWindowPositionsHandler: @@ -323,7 +323,7 @@ return ;-------------------------------------------------------------------------------- SaveDesktopIconsHandler: -SaveDesktopIcons() +SaveDesktopIcons(true) return RestoreDesktopIconsHandler: