Skip to content
Browse files

Changed version numbers across the board to reflect new release

Change default icon to belvedere picture in installer
Added global DeleteApproach variable
Added RBEnable to default ini creation
Added second tab for Recycle Bin management functions (only GUI, no functionality yet)
Added logic to enable, disable, and save RB settings
  • Loading branch information...
1 parent aba35f9 commit c412f18ed51eb845ce449c9a0bf01585718b096e @mshorts mshorts committed Apr 16, 2009
Showing with 144 additions and 3 deletions.
  1. +3 −1 Belvedere.ahk
  2. +141 −2 includes/Main_GUI.ahk
View
4 Belvedere.ahk
@@ -309,7 +309,7 @@ Loop
SetVars:
APPNAME = Belvedere
- Version = 0.3
+ Version = 0.4
AllSubjects = Name||Extension|Size|Date last modified|Date last opened|Date created|
NoDefaultSubject = Name|Extension|Size|Date last modified|Date last opened|Date created|
NameVerbs = is||is not|matches one of|does not match one of|contains|does not contain|
@@ -325,6 +325,7 @@ SetVars:
DateUnits = minutes||hours|days|weeks
NoDefaultDateUnits = minutes|hours|days|weeks|
MatchList = ALL|ANY|
+ DeleteApproach = Oldest First|Youngest First|Largest First|Smallest First
IfNotExist,resources
{
FileCreateDir,resources
@@ -342,6 +343,7 @@ BuildINI:
IniWrite,%A_Space%,rules.ini, Folders, Folders
IniWrite,%A_Space%,rules.ini, Rules, AllRuleNames
IniWrite,300000,rules.ini, Preferences, Sleeptime
+ IniWrite,0,rules.ini, Preferences, RBEnable
}
return
View
143 includes/Main_GUI.ahk
@@ -1,6 +1,6 @@
MANAGE:
Gui, 1: Destroy
- Gui, Add, Tab2, w700 h425 vTabs , Folders|Preferences
+ Gui, Add, Tab2, w700 h425 vTabs , Folders|Recycle Bin|Preferences
Gui, 1: Menu, MenuBar
;Items found of First Tab
@@ -28,8 +28,42 @@ MANAGE:
; Generated using SmartGUI Creator 4.0
;Items found on Second Tab
- IniRead, Sleep, rules.ini, Preferences, Sleeptime
+ IniRead, RBEnable, rules.ini, Preferences, RBEnable
+ IniRead, RBManageAge, rules.ini, RecycleBin, RBManageAge
+ IniRead, RBTimeValue, rules.ini, RecycleBin, RBTimeValue, %A_Space%
+ IniRead, RBTimeLength, rules.ini, RecycleBin, RBTimeLength
+ StringReplace, thisTimeLength, NoDefaultDateUnits, %RBTimeLength%, %RBTimeLength%|
+ IniRead, RBManageSize, rules.ini, RecycleBin, RBManageSize
+ IniRead, RBSize, rules.ini, RecycleBin, RBSize, %A_Space%
+ IniRead, RBSizeUnits, rules.ini, RecycleBin, RBSizeUnits
+ StringReplace, thisSizeUnits, NoDefaultSizeUnits, %RBSizeUnits%, %RBSizeUnits%|
+ IniRead, RBDelAppChoice, rules.ini, RecycleBin, RBDelAppChoice
+ StringReplace, thisDelAppChoice, DeleteApproach, %RBDelAppChoice%, %RBDelAppChoice%|
+ IniRead, RBEmpty, rules.ini, RecycleBin, RBEmpty
+ IniRead, RBEmptyTimeValue, rules.ini, RecycleBin, RBEmptyTimeValue, %A_Space%
+ IniRead, RBEmptyTimeLength, rules.ini, RecycleBin, RBEmptyTimeLength
+ StringReplace, thisEmptyTimeLength, NoDefaultDateUnits, %RBEmptyTimeLength%, %RBEmptyTimeLength%|
+
Gui, Tab, 2
+ Gui, 1: Add, Checkbox, x62 y52 w585 vRBEnable gRBEnable Checked%RBEnable%, Allow %APPNAME% to manage my Recycle Bin
+ Gui, 1: Add, Checkbox, x100 y100 vRBManageAge Checked%RBManageAge%, Remove files in my Recycle Bin older than
+ Gui, 1: Add, Edit, x325 y100 w70 h20 vRBTimeValue Number, %RBTimeValue%
+ Gui, 1: Add, DropDownList, x395 y100 w60 vRBTimeLength, %thisTimeLength%
+ Gui, 1: Add, Checkbox, x100 y130 vRBManageSize Checked%RBManageSize%, Keep my Recycle Bin under
+ Gui, 1: Add, Edit, x255 y130 w70 h20 vRBSize Number, %RBSize%
+ Gui, 1: Add, DropDownList, x325 y130 w60 vRBSizeUnits, %thisSizeUnits%
+ Gui, 1: Add, Text, x150 y160 vRBDelAppText, Deletion Approach:
+ Gui, 1: Add, DropDownList, x255 y160 w130 vRBDelAppChoice, %thisDelAppChoice%
+ Gui, 1: Add, Checkbox, x100 y190 vRBEmpty Checked%RBEmpty%, Empty my Recycle Bin every
+ Gui, 1: Add, Edit, x255 y190 w70 vRBEmptyTimeValue Number, %RBEmptyTimeValue%
+ Gui, 1: Add, DropDownList, x325 y190 w60 vRBEmptyTimeLength, %thisEmptyTimeLength%
+ Gui, 1: Add, Button, x62 y382 h30 vRBSavePrefs gRBSavePrefs, Save Preferences
+
+ GoSub, RBEnable ;Need to Enable/Disable the controls based on first checkbox
+
+ ;Items found on Third Tab
+ IniRead, Sleep, rules.ini, Preferences, Sleeptime
+ Gui, Tab, 3
Gui, 1: Add, Text, x62 y62 w60 h20 , Sleeptime:
Gui, 1: Add, Edit, x120 y60 w100 h20 Number vSleep, %Sleep%
Gui, 1: Add, Text, x225 y62, (Time in milliseconds)
@@ -964,6 +998,111 @@ SavePrefs:
MsgBox,,Saved Settings, Your settings have been saved.
return
+RBSavePrefs:
+ Gui, 1: Submit, NoHide
+ IniWrite, %RBEnable%, rules.ini, Preferences, RBEnable
+
+ ;Check to see if all boxes are filled properly
+ if( RBEnable = 1 )
+ {
+ ;Check time values are chosen if this section is enabled
+ if (RBManageAge = 1)
+ {
+ if( RBTimeValue = "")
+ {
+ MsgBox,,Missing Time Value, Please insert time value
+ return
+ }
+ else if (RBTimeLength = "")
+ {
+ MsgBox,,Missing Time Length, Please select a time length
+ return
+ }
+ }
+
+ ;Check size values are chosen if this section is enabled
+ if (RBManageSize = 1)
+ {
+ if (RBSize = "")
+ {
+ MsgBox,,Missing File Size, Please insert a file size
+ return
+ }
+ else if (RBSizeUnits = "")
+ {
+ MsgBox,,Missing File Size Type, Please select a file size unit type
+ return
+ }
+ else if (RBDelAppChoice = "")
+ {
+ MsgBox,,Missing Deletion Approach, Please select a deletion approach
+ return
+ }
+ }
+
+ ;Check Recycle Bin Empty values are chosen if section is enabled
+ if (RBEmpty = 1)
+ {
+ if (RBEmptyTimeValue = "")
+ {
+ MsgBox,,Missing Empty Time, Please insert a time value to empty the Recycle Bin
+ return
+ }
+ else if (RBEmptyTimeLength = "")
+ {
+ MsgBox,,Missing Empty Time Length, Please select a time value length to empty the Recycle Bin
+ return
+ }
+ }
+ }
+
+ IniWrite, %RBManageAge%, rules.ini, RecycleBin, RBManageAge
+ IniWrite, %RBTimeValue%, rules.ini, RecycleBin, RBTimeValue
+ IniWrite, %RBTimeLength%, rules.ini, RecycleBin, RBTimeLength
+ IniWrite, %RBManageSize%, rules.ini, RecycleBin, RBManageSize
+ IniWrite, %RBSize%, rules.ini, RecycleBin, RBSize
+ IniWrite, %RBSizeUnits%, rules.ini, RecycleBin, RBSizeUnits
+ IniWrite, %RBDelAppChoice%, rules.ini, RecycleBin, RBDelAppChoice
+ IniWrite, %RBEmpty%, rules.ini, RecycleBin, RBEmpty
+ IniWrite, %RBEmptyTimeValue%, rules.ini, RecycleBin, RBEmptyTimeValue
+ IniWrite, %RBEmptyTimeLength%, rules.ini, RecycleBin, RBEmptyTimeLength
+
+ MsgBox,,Saved Settings, Your settings have been saved.
+return
+
+RBEnable:
+ Gui, 1: Submit, NoHide
+
+ if (RBEnable = 1)
+ {
+ GuiControl, 1: Enable, RBManageAge
+ GuiControl, 1: Enable, RBTimeValue
+ GuiControl, 1: Enable, RBTimeLength
+ GuiControl, 1: Enable, RBManageSize
+ GuiControl, 1: Enable, RBSize
+ GuiControl, 1: Enable, RBSizeUnits
+ GuiControl, 1: Enable, RBDelAppText
+ GuiControl, 1: Enable, RBDelAppChoice
+ GuiControl, 1: Enable, RBEmpty
+ GuiControl, 1: Enable, RBEmptyTimeValue
+ GuiControl, 1: Enable, RBEmptyTimeLength
+ }
+ else
+ {
+ GuiControl, 1: Disable, RBManageAge
+ GuiControl, 1: Disable, RBTimeValue
+ GuiControl, 1: Disable, RBTimeLength
+ GuiControl, 1: Disable, RBManageSize
+ GuiControl, 1: Disable, RBSize
+ GuiControl, 1: Disable, RBSizeUnits
+ GuiControl, 1: Disable, RBDelAppText
+ GuiControl, 1: Disable, RBDelAppChoice
+ GuiControl, 1: Disable, RBEmpty
+ GuiControl, 1: Disable, RBEmptyTimeValue
+ GuiControl, 1: Disable, RBEmptyTimeLength
+ }
+return
+
#IfWinActive, Belvedere Rules
~LButton::
MouseGetPos,,,,ClickedControl

0 comments on commit c412f18

Please sign in to comment.
Something went wrong with that request. Please try again.