Win32 only - Bug 372236: Internet Shortcut (.url) icons are now icons of Firefox instead of a page with a Firefox icon on it. patch=Thomas Bertels tbertels@gmail.com, r=rob_strong

This commit is contained in:
rob_strong@exchangecode.com 2007-04-24 14:33:13 -07:00
Родитель 8585656b7d
Коммит ca18fe1473
2 изменённых файлов: 18 добавлений и 19 удалений

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

@ -162,7 +162,7 @@ OpenKeyForWriting(HKEY aStartKey, const char* aKeyName, HKEY* aKey,
// HKCU\SOFTWARE\Classes\FirefoxURL\ (default) REG_SZ <appname> URL
// EditFlags REG_DWORD 2
// FriendlyTypeName REG_SZ <appname> URL
// DefaultIcon (default) REG_SZ <apppath>,0
// DefaultIcon (default) REG_SZ <apppath>,1
// shell\open\command (default) REG_SZ <apppath> -url "%1" -requestPending
// shell\open\ddeexec (default) REG_SZ "%1",,0,0,,,,
// shell\open\ddeexec NoActivateHandler REG_SZ
@ -176,7 +176,7 @@ OpenKeyForWriting(HKEY aStartKey, const char* aKeyName, HKEY* aKey,
// are mapped like so:
//
// HKCU\SOFTWARE\Classes\<protocol>\
// DefaultIcon (default) REG_SZ <apppath>,0
// DefaultIcon (default) REG_SZ <apppath>,1
// shell\open\command (default) REG_SZ <apppath> -url "%1" -requestPending
// shell\open\ddeexec (default) REG_SZ "%1",,0,0,,,,
// shell\open\ddeexec NoActivateHandler REG_SZ
@ -231,7 +231,6 @@ typedef struct {
#define CLS_HTML "FirefoxHTML"
#define CLS_URL "FirefoxURL"
#define VAL_URL_ICON "%APPPATH%,0"
#define VAL_FILE_ICON "%APPPATH%,1"
#define VAL_OPEN "\"%APPPATH%\" -url \"%1\" -requestPending"
@ -264,17 +263,17 @@ static SETTING gSettings[] = {
{ MAKE_KEY_NAME2(CLS, CLS_HTML, SOP), "", VAL_OPEN, APP_PATH_SUBSTITUTION },
// Protocol Handler Class - for Vista and above
{ MAKE_KEY_NAME2(CLS, CLS_URL, DI), "", VAL_URL_ICON, APP_PATH_SUBSTITUTION | NON_ESSENTIAL },
{ MAKE_KEY_NAME2(CLS, CLS_URL, DI), "", VAL_FILE_ICON, APP_PATH_SUBSTITUTION | NON_ESSENTIAL },
{ MAKE_KEY_NAME2(CLS, CLS_URL, SOP), "", VAL_OPEN, APP_PATH_SUBSTITUTION },
// Protocol Handlers
{ MAKE_KEY_NAME2(CLS, "HTTP", DI), "", VAL_URL_ICON, APP_PATH_SUBSTITUTION },
{ MAKE_KEY_NAME2(CLS, "HTTP", DI), "", VAL_FILE_ICON, APP_PATH_SUBSTITUTION },
{ MAKE_KEY_NAME2(CLS, "HTTP", SOP), "", VAL_OPEN, APP_PATH_SUBSTITUTION },
{ MAKE_KEY_NAME2(CLS, "HTTPS", DI), "", VAL_URL_ICON, APP_PATH_SUBSTITUTION },
{ MAKE_KEY_NAME2(CLS, "HTTPS", DI), "", VAL_FILE_ICON, APP_PATH_SUBSTITUTION },
{ MAKE_KEY_NAME2(CLS, "HTTPS", SOP), "", VAL_OPEN, APP_PATH_SUBSTITUTION },
{ MAKE_KEY_NAME2(CLS, "FTP", DI), "", VAL_URL_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, "GOPHER", DI), "", VAL_URL_ICON, 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

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

@ -149,15 +149,15 @@
; protocol handler
${AddHandlerValues} "$0\FirefoxHTML" "$2" "$8,1" "${AppRegName} Document" "" "true"
${AddHandlerValues} "$0\FirefoxURL" "$2" "$8,0" "${AppRegName} URL" "true" "true"
${AddHandlerValues} "$0\gopher" "$2" "$8,0" "URL:Gopher Protocol" "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
; protocol handlers already have a display name and additional keys required
; for a protocol handler.
${AddHandlerValues} "$0\ftp" "$2" "$8,0" "" "" "true"
${AddHandlerValues} "$0\http" "$2" "$8,0" "" "" "true"
${AddHandlerValues} "$0\https" "$2" "$8,0" "" "" "true"
${AddHandlerValues} "$0\ftp" "$2" "$8,1" "" "" "true"
${AddHandlerValues} "$0\http" "$2" "$8,1" "" "" "true"
${AddHandlerValues} "$0\https" "$2" "$8,1" "" "" "true"
!macroend
!define SetHandlers "!insertmacro SetHandlers"
@ -369,7 +369,7 @@
; Always set the file and protocol handlers since they may specify a
; different path and the path is used by Vista when setting associations.
${AddHandlerValues} "$0\FirefoxURL" "$1" "$8,0" "${AppRegName} URL" "true" "true"
${AddHandlerValues} "$0\FirefoxURL" "$1" "$8,1" "${AppRegName} URL" "true" "true"
; An empty string is used for the 5th param because FirefoxHTML is not a
; protocol handler
@ -379,33 +379,33 @@
ClearErrors
${WordFind} "$2" "${FileMainEXE}" "E+1{" $R1
${Unless} ${Errors}
${AddHandlerValues} "$0\http" "$1" "$8,0" "" "" "true"
${AddHandlerValues} "$0\http" "$1" "$8,1" "" "" "true"
${EndUnless}
ReadRegStr $2 SHCTX "$0\https\shell\open\command" ""
ClearErrors
${WordFind} "$2" "${FileMainEXE}" "E+1{" $R1
${Unless} ${Errors}
${AddHandlerValues} "$0\https" "$1" "$8,0" "" "" "true"
${AddHandlerValues} "$0\https" "$1" "$8,1" "" "" "true"
${EndUnless}
ReadRegStr $2 SHCTX "$0\ftp\shell\open\command" ""
ClearErrors
${WordFind} "$2" "${FileMainEXE}" "E+1{" $R1
${Unless} ${Errors}
${AddHandlerValues} "$0\ftp" "$1" "$8,0" "" "" "true"
${AddHandlerValues} "$0\ftp" "$1" "$8,1" "" "" "true"
${EndUnless}
; Only set the gopher key if it doesn't already exist with a default value
ReadRegStr $2 SHCTX "$0\gopher" ""
${If} $2 == ""
${AddHandlerValues} "$0\gopher" "$1" "$8,0" "URL:Gopher Protocol" "true" "true"
${AddHandlerValues} "$0\gopher" "$1" "$8,1" "URL:Gopher Protocol" "true" "true"
${Else}
ReadRegStr $2 SHCTX "$0\gopher\shell\open\command" ""
ClearErrors
${WordFind} "$2" "${FileMainEXE}" "E+1{" $R1
${Unless} ${Errors}
${AddHandlerValues} "$0\gopher" "$1" "$8,0" "URL:Gopher Protocol" "true" "true"
${AddHandlerValues} "$0\gopher" "$1" "$8,1" "URL:Gopher Protocol" "true" "true"
${EndUnless}
${EndIf}
!macroend