[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r3060: Uncheck the Torbutton options by default if Firefox is not i (vidalia/trunk/pkg/win32)



Author: edmanm
Date: 2008-09-11 23:39:37 -0400 (Thu, 11 Sep 2008)
New Revision: 3060

Modified:
   vidalia/trunk/pkg/win32/vidalia-bundle.nsi.in
Log:
Uncheck the Torbutton options by default if Firefox is not installed. Fixes
half of ticket #421. Still need to add the custom installer page to warn the
user that they really do want Firefox, and then figure out how to cram that
into Pootle. Which will suck. Big time. (NSIS makes me hate life.)


Modified: vidalia/trunk/pkg/win32/vidalia-bundle.nsi.in
===================================================================
--- vidalia/trunk/pkg/win32/vidalia-bundle.nsi.in	2008-09-12 01:45:48 UTC (rev 3059)
+++ vidalia/trunk/pkg/win32/vidalia-bundle.nsi.in	2008-09-12 03:39:37 UTC (rev 3060)
@@ -424,6 +424,21 @@
 ; Functions
 Function .onInit
   !insertmacro MUI_LANGDLL_DISPLAY
+
+  ReadRegStr $1 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe" ""
+  StrCmp $1 "" FirefoxNotFound FirefoxFound
+
+  FirefoxNotFound:
+    ; Uncheck the Torbutton options
+    SectionGetFlags ${Torbutton} $0
+    IntOp $0 $0 & ${SECTION_OFF}
+    SectionSetFlags ${Torbutton} $0
+
+    SectionGetFlags ${TorbuttonAddToFirefox} $0
+    IntOp $0 $0 & ${SECTION_OFF}
+    SectionSetFlags ${TorbuttonAddToFirefox} $0
+ 
+  FirefoxFound:
 FunctionEnd
 
 Function .onSelChange