diff --git a/xpfe/components/winhooks/nsWindowsHooks.cpp b/xpfe/components/winhooks/nsWindowsHooks.cpp index 7a09616a9ad..0a4e6f3074a 100644 --- a/xpfe/components/winhooks/nsWindowsHooks.cpp +++ b/xpfe/components/winhooks/nsWindowsHooks.cpp @@ -101,7 +101,7 @@ static FileTypeRegistryEntry mng( mngExts, "MozillaMNG", "MNG Image", "", "image-file.ico"), xbm( xbmExts, "MozillaXBM", "XBM Image", "xbmfile", "image-file.ico"), bmp( bmpExts, "MozillaBMP", "BMP Image", "", "image-file.ico"), - ico( icoExts, "MozillaICO", "Icon", "icofile", "image-file.ico"), + ico( icoExts, "MozillaICO", "Icon", "icofile", "%1"), xml( xmlExts, "MozillaXML", "XML Document", "xmlfile", "doc-file.ico"), xhtml( xhtmExts, "MozillaXHTML", "XHTML Document", "", "doc-file.ico"), xul( xulExts, "MozillaXUL", "Mozilla XUL Document", "", "doc-file.ico"); diff --git a/xpfe/components/winhooks/nsWindowsHooksUtil.cpp b/xpfe/components/winhooks/nsWindowsHooksUtil.cpp index d1de8318967..73d98ce390b 100644 --- a/xpfe/components/winhooks/nsWindowsHooksUtil.cpp +++ b/xpfe/components/winhooks/nsWindowsHooksUtil.cpp @@ -717,7 +717,7 @@ nsresult FileTypeRegistryEntry::set() { // If we just created this file type entry, set description and default icon. if ( NS_SUCCEEDED( rv ) ) { - nsCAutoString iconFileToUse; + nsCAutoString iconFileToUse( "%1" ); nsCAutoString descKey( "Software\\Classes\\" ); descKey += protocol; RegistryEntry descEntry( HKEY_LOCAL_MACHINE, descKey.get(), NULL, "" ); @@ -735,6 +735,7 @@ nsresult FileTypeRegistryEntry::set() { iconKey += protocol; iconKey += "\\DefaultIcon"; + if ( !iconFile.Equals(iconFileToUse) ) { iconFileToUse = thisApplication() + NS_LITERAL_CSTRING( ",0" ); // Check to see if there's an icon file name associated with this extension. @@ -769,7 +770,7 @@ nsresult FileTypeRegistryEntry::set() { iconFileToUse.Assign( buffer ); iconFileToUse.Append( NS_LITERAL_CSTRING( ",0" ) ); } - + } } } }