зеркало из https://github.com/mozilla/pjs.git
Bug 151770 Can't associate Mozilla with .XBM images
patch by ask@swva.net r=law sr=alecf a=scc
This commit is contained in:
Родитель
05d49c2ae7
Коммит
82667e9649
|
@ -16,7 +16,8 @@
|
|||
* Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Bill Law <law@netscape.com>
|
||||
* Bill Law <law@netscape.com>
|
||||
* Aaron Kaluszka <ask@swva.net>
|
||||
*/
|
||||
|
||||
// Turn this on to get debug output.
|
||||
|
@ -103,6 +104,7 @@ function Startup() {
|
|||
"isHandlingGIF",
|
||||
"isHandlingPNG",
|
||||
"isHandlingMNG",
|
||||
"isHandlingXBM",
|
||||
"isHandlingBMP",
|
||||
"isHandlingICO",
|
||||
"isHandlingXML",
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Bill Law <law@netscape.com>
|
||||
Bill Law <law@netscape.com>
|
||||
Aaron Kaluszka <ask@swva.net>
|
||||
-->
|
||||
|
||||
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
||||
|
@ -47,6 +48,7 @@
|
|||
<listitem type="checkbox" id="isHandlingGIF" label="&gif.label;" accesskey="&gif.accesskey;"/>
|
||||
<listitem type="checkbox" id="isHandlingPNG" label="&png.label;" accesskey="&png.accesskey;"/>
|
||||
<listitem type="checkbox" id="isHandlingMNG" label="&mng.label;" accesskey="&mng.accesskey;"/>
|
||||
<listitem type="checkbox" id="isHandlingXBM" label="&xbm.label;" accesskey="&xbm.accesskey;"/>
|
||||
<listitem type="checkbox" id="isHandlingBMP" label="&bmp.label;" accesskey="&bmp.accesskey;"/>
|
||||
<listitem type="checkbox" id="isHandlingICO" label="&ico.label;" accesskey="&ico.accesskey;"/>
|
||||
<listitem type="checkbox" id="isHandlingXML" label="&xml.label;" accesskey="&xml.accesskey;"/>
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
<!ENTITY png.accesskey "P">
|
||||
<!ENTITY mng.label "MNG images">
|
||||
<!ENTITY mng.accesskey "M">
|
||||
<!ENTITY xbm.label "XBM images">
|
||||
<!ENTITY xbm.accesskey "A">
|
||||
<!ENTITY bmp.label "BMP images">
|
||||
<!ENTITY bmp.accesskey "B">
|
||||
<!ENTITY ico.label "ICO images">
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Bill Law <law@netscape.com>
|
||||
* Bill Law <law@netscape.com>
|
||||
* Aaron Kaluszka <ask@swva.net>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
@ -133,6 +134,7 @@ interface nsIWindowsHooksSettings : nsISupports {
|
|||
attribute boolean isHandlingGIF;
|
||||
attribute boolean isHandlingPNG;
|
||||
attribute boolean isHandlingMNG;
|
||||
attribute boolean isHandlingXBM;
|
||||
attribute boolean isHandlingBMP;
|
||||
attribute boolean isHandlingICO;
|
||||
attribute boolean isHandlingXML;
|
||||
|
|
|
@ -20,10 +20,11 @@
|
|||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Bill Law <law@netscape.com>
|
||||
* Syd Logan <syd@netscape.com> added turbo mode stuff
|
||||
* Joe Elwell <jelwell@netscape.com>
|
||||
* Håkan Waara <hwaara@chello.se>
|
||||
* Bill Law <law@netscape.com>
|
||||
* Syd Logan <syd@netscape.com> added turbo mode stuff
|
||||
* Joe Elwell <jelwell@netscape.com>
|
||||
* Håkan Waara <hwaara@chello.se>
|
||||
* Aaron Kaluszka <ask@swva.net>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
@ -91,6 +92,7 @@ const char *jpgExts[] = { ".jpg", ".jpeg", ".jfif", ".pjpeg", ".pjp", 0 };
|
|||
const char *gifExts[] = { ".gif", 0 };
|
||||
const char *pngExts[] = { ".png", 0 };
|
||||
const char *mngExts[] = { ".mng", 0 };
|
||||
const char *xbmExts[] = { ".xbm", 0 };
|
||||
const char *bmpExts[] = { ".bmp", 0 };
|
||||
const char *icoExts[] = { ".ico", 0 };
|
||||
const char *xmlExts[] = { ".xml", 0 };
|
||||
|
@ -102,7 +104,8 @@ static FileTypeRegistryEntry
|
|||
jpg( jpgExts, "MozillaJPEG", "JPEG Image", "jpegfile" ),
|
||||
gif( gifExts, "MozillaGIF", "GIF Image", "giffile" ),
|
||||
png( pngExts, "MozillaPNG", "PNG Image", "pngfile" ),
|
||||
mng( mngExts, "MozillaMNG", "MNG Image", ""),
|
||||
mng( mngExts, "MozillaMNG", "MNG Image", "" ),
|
||||
xbm( xbmExts, "MozillaXBM", "XBM Image", "xbmfile" ),
|
||||
bmp( bmpExts, "MozillaBMP", "BMP Image", "" ),
|
||||
ico( icoExts, "MozillaICO", "Icon", "icofile" ),
|
||||
xml( xmlExts, "MozillaXML", "XML Document", "xmlfile" ),
|
||||
|
@ -157,6 +160,7 @@ DEFINE_GETTER_AND_SETTER( IsHandlingJPEG, mHandleJPEG )
|
|||
DEFINE_GETTER_AND_SETTER( IsHandlingGIF, mHandleGIF )
|
||||
DEFINE_GETTER_AND_SETTER( IsHandlingPNG, mHandlePNG )
|
||||
DEFINE_GETTER_AND_SETTER( IsHandlingMNG, mHandleMNG )
|
||||
DEFINE_GETTER_AND_SETTER( IsHandlingXBM, mHandleXBM )
|
||||
DEFINE_GETTER_AND_SETTER( IsHandlingBMP, mHandleBMP )
|
||||
DEFINE_GETTER_AND_SETTER( IsHandlingICO, mHandleICO )
|
||||
DEFINE_GETTER_AND_SETTER( IsHandlingXML, mHandleXML )
|
||||
|
@ -208,6 +212,7 @@ nsWindowsHooks::GetSettings( nsWindowsHooksSettings **result ) {
|
|||
prefs->mHandleGIF = BoolRegistryEntry( "isHandlingGIF" );
|
||||
prefs->mHandlePNG = BoolRegistryEntry( "isHandlingPNG" );
|
||||
prefs->mHandleMNG = BoolRegistryEntry( "isHandlingMNG" );
|
||||
prefs->mHandleXBM = BoolRegistryEntry( "isHandlingXBM" );
|
||||
prefs->mHandleBMP = BoolRegistryEntry( "isHandlingBMP" );
|
||||
prefs->mHandleICO = BoolRegistryEntry( "isHandlingICO" );
|
||||
prefs->mHandleXML = BoolRegistryEntry( "isHandlingXML" );
|
||||
|
@ -319,6 +324,8 @@ nsWindowsHooksSettings::GetRegistryMatches( PRBool *_retval ) {
|
|||
||
|
||||
misMatch( mHandleMNG, mng )
|
||||
||
|
||||
misMatch( mHandleXBM, xbm )
|
||||
||
|
||||
misMatch( mHandleBMP, bmp )
|
||||
||
|
||||
misMatch( mHandleICO, ico )
|
||||
|
@ -372,6 +379,7 @@ nsWindowsHooks::CheckSettings( nsIDOMWindowInternal *aParent,
|
|||
settings->mHandleGIF = PR_TRUE;
|
||||
settings->mHandlePNG = PR_TRUE;
|
||||
settings->mHandleMNG = PR_TRUE;
|
||||
settings->mHandleXBM = PR_TRUE;
|
||||
settings->mHandleBMP = PR_FALSE;
|
||||
settings->mHandleICO = PR_FALSE;
|
||||
settings->mHandleXML = PR_TRUE;
|
||||
|
@ -559,6 +567,7 @@ nsWindowsHooks::SetSettings(nsIWindowsHooksSettings *prefs) {
|
|||
putPRBoolIntoRegistry( "isHandlingGIF", prefs, &nsIWindowsHooksSettings::GetIsHandlingGIF );
|
||||
putPRBoolIntoRegistry( "isHandlingPNG", prefs, &nsIWindowsHooksSettings::GetIsHandlingPNG );
|
||||
putPRBoolIntoRegistry( "isHandlingMNG", prefs, &nsIWindowsHooksSettings::GetIsHandlingMNG );
|
||||
putPRBoolIntoRegistry( "isHandlingXBM", prefs, &nsIWindowsHooksSettings::GetIsHandlingXBM );
|
||||
putPRBoolIntoRegistry( "isHandlingBMP", prefs, &nsIWindowsHooksSettings::GetIsHandlingBMP );
|
||||
putPRBoolIntoRegistry( "isHandlingICO", prefs, &nsIWindowsHooksSettings::GetIsHandlingICO );
|
||||
putPRBoolIntoRegistry( "isHandlingXML", prefs, &nsIWindowsHooksSettings::GetIsHandlingXML );
|
||||
|
@ -610,6 +619,11 @@ nsWindowsHooks::SetRegistry() {
|
|||
} else {
|
||||
(void) mng.reset();
|
||||
}
|
||||
if ( prefs->mHandleXBM ) {
|
||||
(void) xbm.set();
|
||||
} else {
|
||||
(void) xbm.reset();
|
||||
}
|
||||
if ( prefs->mHandleBMP ) {
|
||||
(void) bmp.set();
|
||||
} else {
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Aaron Kaluszka <ask@swva.net>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
@ -84,6 +85,7 @@ private:
|
|||
PRBool mHandleGIF;
|
||||
PRBool mHandlePNG;
|
||||
PRBool mHandleMNG;
|
||||
PRBool mHandleXBM;
|
||||
PRBool mHandleBMP;
|
||||
PRBool mHandleICO;
|
||||
PRBool mHandleXML;
|
||||
|
|
Загрузка…
Ссылка в новой задаче