Bug 388192 - Remove gopher OS integration support. r=sspitzer

This commit is contained in:
rob_strong%exchangecode.com 2007-07-17 18:23:26 +00:00
Родитель 8c33764316
Коммит da6fd78e78
2 изменённых файлов: 30 добавлений и 22 удалений

Просмотреть файл

@ -172,7 +172,7 @@ OpenKeyForWriting(HKEY aStartKey, const char* aKeyName, HKEY* aKey,
// - Protocol Mappings // - Protocol Mappings
// ----------------- // -----------------
// The following protocols: // The following protocols:
// HTTP, HTTPS, FTP, GOPHER // HTTP, HTTPS, FTP
// are mapped like so: // are mapped like so:
// //
// HKCU\SOFTWARE\Classes\<protocol>\ // HKCU\SOFTWARE\Classes\<protocol>\
@ -273,8 +273,6 @@ static SETTING gSettings[] = {
{ MAKE_KEY_NAME2(CLS, "HTTPS", SOP), "", VAL_OPEN, APP_PATH_SUBSTITUTION }, { MAKE_KEY_NAME2(CLS, "HTTPS", SOP), "", VAL_OPEN, APP_PATH_SUBSTITUTION },
{ MAKE_KEY_NAME2(CLS, "FTP", DI), "", VAL_FILE_ICON, APP_PATH_SUBSTITUTION | NON_ESSENTIAL }, { MAKE_KEY_NAME2(CLS, "FTP", DI), "", VAL_FILE_ICON, APP_PATH_SUBSTITUTION | NON_ESSENTIAL },
{ MAKE_KEY_NAME2(CLS, "FTP", SOP), "", VAL_OPEN, APP_PATH_SUBSTITUTION | NON_ESSENTIAL }, { MAKE_KEY_NAME2(CLS, "FTP", SOP), "", VAL_OPEN, APP_PATH_SUBSTITUTION | NON_ESSENTIAL },
{ MAKE_KEY_NAME2(CLS, "GOPHER", DI), "", VAL_FILE_ICON, APP_PATH_SUBSTITUTION | NON_ESSENTIAL },
{ MAKE_KEY_NAME2(CLS, "GOPHER", SOP), "", VAL_OPEN, APP_PATH_SUBSTITUTION | NON_ESSENTIAL },
// DDE settings // DDE settings
{ MAKE_KEY_NAME2(CLS, CLS_HTML, DDE), "", DDE_COMMAND, NO_SUBSTITUTION | NON_ESSENTIAL }, { MAKE_KEY_NAME2(CLS, CLS_HTML, DDE), "", DDE_COMMAND, NO_SUBSTITUTION | NON_ESSENTIAL },
@ -292,9 +290,6 @@ static SETTING gSettings[] = {
{ MAKE_KEY_NAME2(CLS, "FTP", DDE), "", DDE_COMMAND, NO_SUBSTITUTION | NON_ESSENTIAL }, { MAKE_KEY_NAME2(CLS, "FTP", DDE), "", DDE_COMMAND, NO_SUBSTITUTION | NON_ESSENTIAL },
{ MAKE_KEY_NAME3(CLS, "FTP", DDE, "Application"), "", DDE_NAME, NO_SUBSTITUTION | NON_ESSENTIAL }, { MAKE_KEY_NAME3(CLS, "FTP", DDE, "Application"), "", DDE_NAME, NO_SUBSTITUTION | NON_ESSENTIAL },
{ MAKE_KEY_NAME3(CLS, "FTP", DDE, "Topic"), "", "WWW_OpenURL", NO_SUBSTITUTION | NON_ESSENTIAL }, { MAKE_KEY_NAME3(CLS, "FTP", DDE, "Topic"), "", "WWW_OpenURL", NO_SUBSTITUTION | NON_ESSENTIAL },
{ MAKE_KEY_NAME2(CLS, "GOPHER", DDE), "", DDE_COMMAND, NO_SUBSTITUTION | NON_ESSENTIAL },
{ MAKE_KEY_NAME3(CLS, "GOPHER", DDE, "Application"), "", DDE_NAME, NO_SUBSTITUTION | NON_ESSENTIAL },
{ MAKE_KEY_NAME3(CLS, "GOPHER", DDE, "Topic"), "", "WWW_OpenURL", NO_SUBSTITUTION | NON_ESSENTIAL },
// Windows XP Start Menu // Windows XP Start Menu
{ MAKE_KEY_NAME2(SMI, "%APPEXE%", DI), { MAKE_KEY_NAME2(SMI, "%APPEXE%", DI),
@ -548,8 +543,6 @@ nsWindowsShellService::SetDefaultBrowser(PRBool aClaimAllTypes, PRBool aForAllUs
(void)DeleteRegKey(HKEY_CURRENT_USER, "Software\\Classes\\https\\DefaultIcon"); (void)DeleteRegKey(HKEY_CURRENT_USER, "Software\\Classes\\https\\DefaultIcon");
(void)DeleteRegKey(HKEY_CURRENT_USER, "Software\\Classes\\ftp\\shell\\open"); (void)DeleteRegKey(HKEY_CURRENT_USER, "Software\\Classes\\ftp\\shell\\open");
(void)DeleteRegKey(HKEY_CURRENT_USER, "Software\\Classes\\ftp\\DefaultIcon"); (void)DeleteRegKey(HKEY_CURRENT_USER, "Software\\Classes\\ftp\\DefaultIcon");
(void)DeleteRegKey(HKEY_CURRENT_USER, "Software\\Classes\\gopher\\shell\\open");
(void)DeleteRegKey(HKEY_CURRENT_USER, "Software\\Classes\\gopher\\DefaultIcon");
(void)DeleteRegKey(HKEY_CURRENT_USER, "Software\\Classes\\FirefoxURL"); (void)DeleteRegKey(HKEY_CURRENT_USER, "Software\\Classes\\FirefoxURL");
(void)DeleteRegKey(HKEY_CURRENT_USER, "Software\\Classes\\FirefoxHTML"); (void)DeleteRegKey(HKEY_CURRENT_USER, "Software\\Classes\\FirefoxHTML");

Просмотреть файл

@ -154,7 +154,6 @@
${AddHandlerValues} "$0\FirefoxHTML" "$2" "$8,1" "${AppRegName} Document" "" "true" ${AddHandlerValues} "$0\FirefoxHTML" "$2" "$8,1" "${AppRegName} Document" "" "true"
${AddHandlerValues} "$0\FirefoxURL" "$2" "$8,1" "${AppRegName} URL" "true" "true" ${AddHandlerValues} "$0\FirefoxURL" "$2" "$8,1" "${AppRegName} URL" "true" "true"
${AddHandlerValues} "$0\gopher" "$2" "$8,1" "URL:Gopher Protocol" "true" "true"
; An empty string is used for the 4th & 5th params because the following ; An empty string is used for the 4th & 5th params because the following
; protocol handlers already have a display name and additional keys required ; protocol handlers already have a display name and additional keys required
@ -207,10 +206,22 @@
WriteRegStr HKLM "$0\Capabilities\StartMenu" "StartMenuInternet" "$R9" WriteRegStr HKLM "$0\Capabilities\StartMenu" "StartMenuInternet" "$R9"
WriteRegStr HKLM "$0\Capabilities\URLAssociations" "ftp" "FirefoxURL" WriteRegStr HKLM "$0\Capabilities\URLAssociations" "ftp" "FirefoxURL"
WriteRegStr HKLM "$0\Capabilities\URLAssociations" "gopher" "FirefoxURL"
WriteRegStr HKLM "$0\Capabilities\URLAssociations" "http" "FirefoxURL" WriteRegStr HKLM "$0\Capabilities\URLAssociations" "http" "FirefoxURL"
WriteRegStr HKLM "$0\Capabilities\URLAssociations" "https" "FirefoxURL" WriteRegStr HKLM "$0\Capabilities\URLAssociations" "https" "FirefoxURL"
; Delete gopher from Capabilities\URLAssociations if it is present.
ClearErrors
ReadRegStr $2 HKLM "$0\Capabilities\URLAssociations" "gopher"
${Unless} ${Errors}
DeleteRegValue HKLM "$0\Capabilities\URLAssociations" "gopher"
${EndUnless}
; Delete gopher from the user's UrlAssociations if it points to FirefoxURL.
ReadRegStr $2 HKCU "Software\Microsoft\Windows\Shell\Associations\UrlAssociations\gopher\UserChoice" "Progid"
${If} $2 == "FirefoxURL"
DeleteRegKey HKCU "Software\Microsoft\Windows\Shell\Associations\UrlAssociations\gopher"
${EndIf}
; Vista Registered Application ; Vista Registered Application
WriteRegStr HKLM "Software\RegisteredApplications" "${AppRegName}" "$0\Capabilities" WriteRegStr HKLM "Software\RegisteredApplications" "${AppRegName}" "$0\Capabilities"
@ -366,6 +377,15 @@
DeleteRegKey SHCTX "$0\chrome" DeleteRegKey SHCTX "$0\chrome"
${EndUnless} ${EndUnless}
; Remove support for launching gopher urls from the shell during install or
; update if the DefaultIcon is from firefox.exe.
ReadRegStr $2 SHCTX "$0\gopher\DefaultIcon" ""
ClearErrors
${WordFind} "$2" "${FileMainEXE}" "E+1{" $R1
${Unless} ${Errors}
DeleteRegKey SHCTX "$0\gopher"
${EndUnless}
; Store the command to open the app with an url in a register for easy access. ; Store the command to open the app with an url in a register for easy access.
GetFullPathName $8 "$INSTDIR\${FileMainEXE}" GetFullPathName $8 "$INSTDIR\${FileMainEXE}"
StrCpy $1 "$\"$8$\" -requestPending -osint -url $\"%1$\"" StrCpy $1 "$\"$8$\" -requestPending -osint -url $\"%1$\""
@ -399,17 +419,12 @@
${AddHandlerValues} "$0\ftp" "$1" "$8,1" "" "" "true" ${AddHandlerValues} "$0\ftp" "$1" "$8,1" "" "" "true"
${EndUnless} ${EndUnless}
; Only set the gopher key if it doesn't already exist with a default value ; Remove the gopher key if the DefaultIcon is from firefox.exe.
ReadRegStr $2 SHCTX "$0\gopher" "" ReadRegStr $2 SHCTX "$0\gopher\DefaultIcon" ""
${If} $2 == "" ClearErrors
${AddHandlerValues} "$0\gopher" "$1" "$8,1" "URL:Gopher Protocol" "true" "true" ${WordFind} "$2" "${FileMainEXE}" "E+1{" $R1
${Else} ${Unless} ${Errors}
ReadRegStr $2 SHCTX "$0\gopher\shell\open\command" "" DeleteRegKey SHCTX "$0\gopher"
ClearErrors ${EndUnless}
${WordFind} "$2" "${FileMainEXE}" "E+1{" $R1
${Unless} ${Errors}
${AddHandlerValues} "$0\gopher" "$1" "$8,1" "URL:Gopher Protocol" "true" "true"
${EndUnless}
${EndIf}
!macroend !macroend
!define FixClassKeys "!insertmacro FixClassKeys" !define FixClassKeys "!insertmacro FixClassKeys"