Code: Select all
"C:\PROGRA~1\MOZILLA\THUNDE~1.0\THUNDE~1.EXE" "http://www.yoursite.com/rss"
Anyway, I've put together some code to fix this. In the Fx install directory \components, this code in Feedconverter.js starting at line 313
Code: Select all
case "client":
var clientApp =
prefs.getComplexValue(PREF_SELECTED_APP, Ci.nsILocalFile);
//@line 373 "/cygdrive/c/builds/tinderbox/Fx-Mozilla1.8-release/WINNT_5.2_Depend/mozilla/browser/components/feeds/src/FeedConverter.js"
var ss =
Cc["@mozilla.org/browser/shell-service;1"].
getService(Ci.nsIShellService_MOZILLA_1_8_BRANCH);
ss.openApplicationWithURI(clientApp, spec);
break;
can be replaced with: (the const vars can go up top with the rest)
[edit: updated 30-Dec-2006]
Code: Select all
case "client":
const PREF_SELECTED_APP_ARGS = "browser.feeds.handlers.application.args";
const PREF_SELECTED_APP_URIPREFIX = "browser.feeds.handlers.application.uriPrefix";
var clientApp = prefs.getComplexValue(PREF_SELECTED_APP, Ci.nsILocalFile);
var feedhandlerArgs = safeGetCharPref(PREF_SELECTED_APP_ARGS).split(" "); //get all args words delimitted by space into array
var uriPrefix = safeGetCharPref(PREF_SELECTED_APP_URIPREFIX);
var file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
file.initWithPath(clientApp.persistentDescriptor);
var process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
process.init(file);
if (uriPrefix) spec = uriPrefix + spec;
if (feedhandlerArgs) {
var args = feedhandlerArgs;
args[args.length] = spec; // add uri as last arg at the end
}
else
var args = [spec];
process.run(false, args, args.length);
// debug("FeedConverter.js: ", (clientApp.persistentDescriptor + " " + args));
break;
The following prefs are used to accept arguments, and a uri prefix, as required by the external app. The example below is the Tb requirement, for both a new instance of Tb as well as adding a feed to an already running instance. The prefs can be added to pref.js or (better) user.js or as strings in about:config (easiest).
Code: Select all
user_pref("browser.feeds.handlers.application.args","-mail");
user_pref("browser.feeds.handlers.application.uriPrefix","feed:");
For GreatNews, eg.
Code: Select all
user_pref("browser.feeds.handlers.application.uriPrefix","/feed:");
Comments on the code accepted gladly, but it WFM (winxp, haven't booted into Suse yet) and should not cause console errors. Note that if Fx is running with -no-remote, you can't communicate with a running Tb; it will always give an 'already running' message.