Package: firefox Version: 1.5.dfsg+1.5.0.1-3 Tags: patch Severity: wishlist
Patch from Ian Jackson to stop downloads from prompting when you download a file. -- Eric Dorland <[EMAIL PROTECTED]> ICQ: #61138586, Jabber: [EMAIL PROTECTED] 1024D/16D970C6 097C 4861 9934 27A0 8E1C 2B0A 61E9 8ECF 16D9 70C6 -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GCS d- s++: a-- C+++ UL+++ P++ L++ E++ W++ N+ o K- w+ O? M++ V-- PS+ PE Y+ PGP++ t++ 5++ X+ R tv++ b+++ DI+ D+ G e h! r- y+ ------END GEEK CODE BLOCK------
--- Begin Message ---Ian Jackson writes ("Re: Ubuntu and Debian cooperation over firefox"): > > > > > - Patch imported from RH to make firefox use Gnome mime > > > > > database. ... FYI, I've invented another patch which goes reasonably well with this one: it (configurably) disables the `you have chosen to open ...' dialogue and just takes the default. This does seem to be quite an improvement in the common case - and of course if it's not what you want you can context menu / save as. --- ../1u3/firefox-1.5.dfsg+1.5.0.1/uriloader/exthandler/nsExternalHelperAppService.cpp 2005-08-24 22:53:37.000000000 +0100 +++ uriloader/exthandler/nsExternalHelperAppService.cpp 2006-02-22 15:04:13.000000000 +0000 @@ -123,6 +123,7 @@ static const char NEVER_ASK_PREF_BRANCH[] = "browser.helperApps.neverAsk."; static const char NEVER_ASK_FOR_SAVE_TO_DISK_PREF[] = "saveToDisk"; static const char NEVER_ASK_FOR_OPEN_FILE_PREF[] = "openFile"; +static const char DEFAULT_NOASK_PREF_BRANCH[] = "browser.helperApps.defaultNoAsk."; static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); static NS_DEFINE_CID(kPluginManagerCID, NS_PLUGINMANAGER_CID); @@ -2488,6 +2489,8 @@ } PRBool nsExternalAppHandler::GetNeverAskFlagFromPref(const char * prefName, const char * aContentType) + // Note that we return TRUE if we _should_ ask and FALSE if we + // should _not_, contrary to the name of the function ! { // Search the obsolete pref strings. nsresult rv; @@ -2510,8 +2513,22 @@ return PR_FALSE; } } - // Default is true, if not found in the pref string. - return PR_TRUE; + + // Default, if not found in the pref string: + // Adjustable default, defaults to TRUE if we can't find it. + + if (!prefs) return PR_TRUE; + + nsCOMPtr<nsIPrefBranch> defPrefBranch; + rv = prefs->GetBranch(DEFAULT_NOASK_PREF_BRANCH, + getter_AddRefs(defPrefBranch)); + if (!(NS_SUCCEEDED(rv) && defPrefBranch)) return PR_TRUE; + + PRBool defNoAsk = PR_TRUE; + rv = defPrefBranch->GetBoolPref(prefName, &defNoAsk); + if (!(NS_SUCCEEDED(rv))) return PR_TRUE; + + return !defNoAsk; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////// --- ../1u3/firefox-1.5.dfsg+1.5.0.1/debian/firefox.js 2006-02-22 11:04:14.000000000 +0000 +++ debian/firefox.js 2006-02-22 15:12:25.000000000 +0000 @@ -14,3 +14,7 @@ // Disable default browser checking. pref("browser.shell.checkDefaultBrowser", false); + +// Turn on automatic opening of files which need helper applications, +// without asking. +pref("browser.helperApps.defaultNoAsk.openFile", true);
--- End Message ---
signature.asc
Description: Digital signature

