Skip to content

Commit

Permalink
added icon to growlnotify messages
Browse files Browse the repository at this point in the history
added defaults to ini if it doesn't exist
added note to GfW in help text
added growlnotify executable for GfW functionality
fixed logging disabled notification bug
changed version across the board
  • Loading branch information
mshorts committed Jul 29, 2010
1 parent 1c4213a commit 85ee4f3
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 27 deletions.
29 changes: 19 additions & 10 deletions Belvedere.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ IniRead, ConfirmExit, rules.ini, Preferences, ConfirmExit, 1

;Register Belvedere with the Growl for Windows Application
if GrowlEnabled = 1
RunWait, %A_ScriptDir%\resources\growlnotify.exe /a:"Belvedere" /r:"Action"`,"System"`,"Error" "Belvedere has been registered"
RunWait, %A_ScriptDir%\resources\growlnotify.exe /a:"Belvedere" /r:"Action"`,"System"`,"Error" /ai:"%A_ScriptDir%\resources\both.png" "Belvedere has been registered"

Log("Starting " . APPNAME . " " . Version, "System")
Notify("Starting " . APPNAME . " " . Version, "System")
Expand Down Expand Up @@ -547,7 +547,7 @@ return
;Here we are creating all the variables for usage as well as the resource files
SetVars:
APPNAME = Belvedere
Version = 0.5
Version = 0.6
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|contains one of|RegEx|
Expand Down Expand Up @@ -581,14 +581,23 @@ return
BuildINI:
IfNotExist, rules.ini
{
IniWrite,%A_Space%,rules.ini, Folders, Folders
IniWrite,%A_Space%,rules.ini, Rules, AllRuleNames
IniWrite,3,rules.ini, Preferences, Sleeptime
IniWrite,minutes,rules.ini, Preferences, SleeptimeLength
IniWrite,0,rules.ini, Preferences, RBEnable
IniWrite,0,rules.ini, Preferences, EnableLogging
IniWrite,%A_Space%,rules.ini, Preferences, LogType
IniWrite,%A_Desktop%,rules.ini, Preferences, LastFolder
IniWrite, %A_Space%, rules.ini, Folders, Folders
IniWrite, %A_Space%, rules.ini, Rules, AllRuleNames
IniWrite, 3, rules.ini, Preferences, Sleeptime
IniWrite, minutes, rules.ini, Preferences, SleeptimeLength
IniWrite, 0, rules.ini, Preferences, RBEnable
IniWrite, 0, rules.ini, Preferences, EnableLogging
IniWrite, %A_Space%, rules.ini, Preferences, LogType
IniWrite, %A_Desktop%, rules.ini, Preferences, LastFolder
IniWrite, 0, rules.ini, Preferences, GrowlEnabled
IniWrite, 0, rules.ini, Preferences, TrayTipEnabled
IniWrite, 1, rules.ini, Preferences, ConfirmExit
IniWrite, 0, rules.ini, Preferences, Default_Enabled
IniWrite, 0, rules.ini, Preferences, Default_ConfirmAction
IniWrite, 0, rules.ini, Preferences, Default_Recursive
IniWrite, 0, rules.ini, RecycleBin, RBEmpty
IniWrite, %A_Space%, rules.ini, RecycleBin, RBEmptyTimeValue
IniWrite, %A_Space%, rules.ini, RecycleBin, RBEmptyTimeLength
}
return

Expand Down
1 change: 1 addition & 0 deletions help/tab-preferences.htm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ <h3>Growl for Windows</h3>
<li><strong> System </strong>- This type of alert is triggered when the user changes a system setting or configuration option.</li>
<li><strong> Error </strong>- This type of alert is triggered when an action is taken by Belvedere by was unable to complete successfully.</li>
</ul>
<p>Please note that Growl for Windows must be installed separately in order for this functionality to work.</p>
<h3>Windows Tray Tips</h3>
<p>Belvedere has the ability to send alerts to the Windows Tray to alert users of actions as they occur. If checked, Belvedere will begin sending alerts to the Windows Tray. A restart is required if this setting is changed. The following types of alerts are currently supported:</p>
<ul>
Expand Down
32 changes: 18 additions & 14 deletions includes/Main_GUI.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ SavePrefs:
SleeptimeLength := SleeptimeLength

;Getting old values for enhanced logging prior to writing new ones
IniRead, Old_EnableLogging, rules.ini, Preferences, EnableLogging
IniRead, Old_Sleeptime, rules.ini, Preferences, Sleeptime
IniRead, Old_SleeptimeLength, rules.ini, Preferences, SleeptimeLength
IniRead, Old_GrowlEnabled, rules.ini, Preferences, GrowlEnabled
Expand All @@ -515,23 +516,26 @@ SavePrefs:
IniWrite, %Default_ConfirmAction%, rules.ini, Preferences, Default_ConfirmAction
IniWrite, %Default_Recursive%, rules.ini, Preferences, Default_Recursive

if (EnableLogging = 1)
if (EnableLogging <> Old_EnableLogging)
{
if(LogType = "")
if (EnableLogging = 1)
{
MsgBox,,Missing Logging Type, Please select a logging type
return
if(LogType = "")
{
MsgBox,,Missing Logging Type, Please select a logging type
return
}

Log("Logging has been enabled with type: " . LogType, "System")
Notify("Logging has been enabled with type: " . LogType, "System")
WinNotify("Logging has been enabled with type: " . LogType, "System")
}
else if (EnableLogging = 0)
{
Log("Logging has been disabled", "System")
Notify("Logging has been disabled", "System")
WinNotify("Logging has been disabled", "System")
}

Log("Logging has been enabled with type: " . LogType, "System")
Notify("Logging has been enabled with type: " . LogType, "System")
WinNotify("Logging has been enabled with type: " . LogType, "System")
}
else if (EnableLogging = 0)
{
Log("Logging has been disabled", "System")
Notify("Logging has been disabled", "System")
WinNotify("Logging has been disabled", "System")
}

Log("Preferences have been saved", "System")
Expand Down
2 changes: 1 addition & 1 deletion includes/log.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Notify(String, Type)
if (GrowlEnabled = 1)
{
Title = Belvedere %Type% Message
RunWait, %A_ScriptDir%\resources\growlnotify.exe /a:"Belvedere" /n:%Type% /t:"%Title%" "%String%"
RunWait, %A_ScriptDir%\resources\growlnotify.exe /i:"%A_ScriptDir%\resources\both.png" /a:"Belvedere" /n:%Type% /t:"%Title%" "%String%"
}
}

Expand Down
Binary file added installer/growlnotify.exe
Binary file not shown.
6 changes: 4 additions & 2 deletions installer/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

;General Application defines
!define PRODUCT_NAME "Belvedere"
!define PRODUCT_VERSION "0.5"
!define PRODUCT_VERSION "0.6"
!define PRODUCT_PUBLISHER "Lifehacker"
!define PRODUCT_WEB_SITE "http://lifehacker.com/341950/belvedere-automates-your-self+cleaning-pc"
!define PRODUCT_HELP_TEXT "Belvedere Help.chm"
Expand All @@ -24,7 +24,7 @@
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"

;Finish Page Defines
!define MUI_FINISHPAGE_TEXT "Thank you for installing ${PRODUCT_NAME}, we hope you enjoy using this application. Please run 'Verify Configuration' on the Preferences if you have just completed an upgrade."
!define MUI_FINISHPAGE_TEXT "Thank you for installing ${PRODUCT_NAME}.\r\n\r\nPlease run 'Verify Configuration' on the Preferences tab if you have just completed an upgrade."
!define MUI_FINISHPAGE_RUN "$INSTDIR\${PRODUCT_NAME}.exe"
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\resources\${PRODUCT_HELP_TEXT}"
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Show Help Text"
Expand Down Expand Up @@ -84,6 +84,7 @@ Section "Installation" secApp
SetOutPath "$INSTDIR\resources"
File "${PRODUCT_HELP_TEXT}"
File 7za.exe
File growlnotify.exe
SetShellVarContext all
CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}"
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\Belvedere.exe"
Expand Down Expand Up @@ -173,6 +174,7 @@ Section Uninstall
Delete "$INSTDIR\resources\belvedere-paused.ico"
Delete "$INSTDIR\resources\${PRODUCT_HELP_TEXT}"
Delete "$INSTDIR\resources\7za.exe"
Delete "$INSTDIR\resources\growlnotify.exe"

SetShellVarContext all
Delete "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk"
Expand Down

0 comments on commit 85ee4f3

Please sign in to comment.