mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
No bug - fix some tabs that were really bugging me
This commit is contained in:
parent
d9feb2b78e
commit
0423200d57
@ -77,8 +77,8 @@ NS_IMETHODIMP nsOSHelperAppService::LaunchAppWithTempFile(nsIMIMEInfo * aMIMEInf
|
|||||||
LONG r = (LONG) ::ShellExecute( NULL, "open", (const char *) path, NULL, NULL, SW_SHOWNORMAL);
|
LONG r = (LONG) ::ShellExecute( NULL, "open", (const char *) path, NULL, NULL, SW_SHOWNORMAL);
|
||||||
if (r < 32)
|
if (r < 32)
|
||||||
rv = NS_ERROR_FAILURE;
|
rv = NS_ERROR_FAILURE;
|
||||||
else
|
else
|
||||||
rv = NS_OK;
|
rv = NS_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,26 +151,26 @@ nsresult GetExtensionFrom4xRegistryInfo(const char * aMimeType, nsCString& aFile
|
|||||||
|
|
||||||
static BYTE * GetValueBytes( HKEY hKey, const char *pValueName, DWORD *pLen)
|
static BYTE * GetValueBytes( HKEY hKey, const char *pValueName, DWORD *pLen)
|
||||||
{
|
{
|
||||||
LONG err;
|
LONG err;
|
||||||
DWORD bufSz;
|
DWORD bufSz;
|
||||||
LPBYTE pBytes = NULL;
|
LPBYTE pBytes = NULL;
|
||||||
|
|
||||||
err = ::RegQueryValueEx( hKey, pValueName, NULL, NULL, NULL, &bufSz);
|
err = ::RegQueryValueEx( hKey, pValueName, NULL, NULL, NULL, &bufSz);
|
||||||
if (err == ERROR_SUCCESS) {
|
if (err == ERROR_SUCCESS) {
|
||||||
pBytes = new BYTE[bufSz];
|
pBytes = new BYTE[bufSz];
|
||||||
err = ::RegQueryValueEx( hKey, pValueName, NULL, NULL, pBytes, &bufSz);
|
err = ::RegQueryValueEx( hKey, pValueName, NULL, NULL, pBytes, &bufSz);
|
||||||
if (err != ERROR_SUCCESS) {
|
if (err != ERROR_SUCCESS) {
|
||||||
delete [] pBytes;
|
delete [] pBytes;
|
||||||
pBytes = NULL;
|
pBytes = NULL;
|
||||||
} else {
|
} else {
|
||||||
// Return length if caller wanted it.
|
// Return length if caller wanted it.
|
||||||
if ( pLen ) {
|
if ( pLen ) {
|
||||||
*pLen = bufSz;
|
*pLen = bufSz;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return( pBytes);
|
return( pBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsOSHelperAppService::ExternalProtocolHandlerExists(const char * aProtocolScheme, PRBool * aHandlerExists)
|
NS_IMETHODIMP nsOSHelperAppService::ExternalProtocolHandlerExists(const char * aProtocolScheme, PRBool * aHandlerExists)
|
||||||
@ -196,14 +196,14 @@ NS_IMETHODIMP nsOSHelperAppService::ExternalProtocolHandlerExists(const char * a
|
|||||||
|
|
||||||
NS_IMETHODIMP nsOSHelperAppService::LoadUrl(nsIURI * aURL)
|
NS_IMETHODIMP nsOSHelperAppService::LoadUrl(nsIURI * aURL)
|
||||||
{
|
{
|
||||||
nsresult rv = NS_OK;
|
nsresult rv = NS_OK;
|
||||||
|
|
||||||
// 1. Find the default app for this protocol
|
// 1. Find the default app for this protocol
|
||||||
// 2. Set up the command line
|
// 2. Set up the command line
|
||||||
// 3. Launch the app.
|
// 3. Launch the app.
|
||||||
|
|
||||||
// For now, we'll just cheat essentially, check for the command line
|
// For now, we'll just cheat essentially, check for the command line
|
||||||
// then just call ShellExecute()!
|
// then just call ShellExecute()!
|
||||||
|
|
||||||
if (aURL)
|
if (aURL)
|
||||||
{
|
{
|
||||||
@ -211,9 +211,9 @@ NS_IMETHODIMP nsOSHelperAppService::LoadUrl(nsIURI * aURL)
|
|||||||
nsXPIDLCString urlSpec;
|
nsXPIDLCString urlSpec;
|
||||||
aURL->GetSpec(getter_Copies(urlSpec));
|
aURL->GetSpec(getter_Copies(urlSpec));
|
||||||
|
|
||||||
LONG r = (LONG) ::ShellExecute( NULL, "open", (const char *) urlSpec, NULL, NULL, SW_SHOWNORMAL);
|
LONG r = (LONG) ::ShellExecute( NULL, "open", (const char *) urlSpec, NULL, NULL, SW_SHOWNORMAL);
|
||||||
if (r < 32)
|
if (r < 32)
|
||||||
rv = NS_ERROR_FAILURE;
|
rv = NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
|
Loading…
Reference in New Issue
Block a user