1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-12 10:35:45 +01:00

Cleanup some references to "Firefox" in common/*.

This commit is contained in:
Doug Kearns
2009-06-27 22:25:00 +10:00
parent a6fde383c0
commit 776f9bb425
9 changed files with 23 additions and 22 deletions

View File

@@ -615,8 +615,7 @@ function Bookmarks() //{{{
getSearchEngines: function getSearchEngines() getSearchEngines: function getSearchEngines()
{ {
let searchEngines = []; let searchEngines = [];
let firefoxEngines = services.get("browserSearch").getVisibleEngines({}); for (let [,engine] in Iterator(services.get("browserSearch").getVisibleEngines({})))
for (let [,engine] in Iterator(firefoxEngines))
{ {
let alias = engine.alias; let alias = engine.alias;
if (!alias || !/^[a-z0-9_-]+$/.test(alias)) if (!alias || !/^[a-z0-9_-]+$/.test(alias))

View File

@@ -600,7 +600,7 @@ CompletionContext.prototype = {
highlight: function highlight(start, length, type) highlight: function highlight(start, length, type)
{ {
try // Firefox <3.1 doesn't have repaintSelection try // Gecko < 1.9.1 doesn't have repaintSelection
{ {
this.selectionTypes[type] = null; this.selectionTypes[type] = null;
const selType = Ci.nsISelectionController["SELECTION_" + type]; const selType = Ci.nsISelectionController["SELECTION_" + type];

View File

@@ -784,7 +784,7 @@ function Editor() //{{{
// This function will move/select up to given "pos" // This function will move/select up to given "pos"
// Simple setSelectionRange() would be better, but we want to maintain the correct // Simple setSelectionRange() would be better, but we want to maintain the correct
// order of selectionStart/End (a Firefox bug always makes selectionStart <= selectionEnd) // order of selectionStart/End (a Gecko bug always makes selectionStart <= selectionEnd)
// Use only for small movements! // Use only for small movements!
moveToPosition: function (pos, forward, select) moveToPosition: function (pos, forward, select)
{ {

View File

@@ -406,7 +406,7 @@ function Events() //{{{
} }
function exitPopupMode() function exitPopupMode()
{ {
// gContextMenu is set to NULL by Firefox, when a context menu is closed // gContextMenu is set to NULL, when a context menu is closed
if (typeof gContextMenu != "undefined" && gContextMenu == null && !activeMenubar) if (typeof gContextMenu != "undefined" && gContextMenu == null && !activeMenubar)
modes.remove(modes.MENU); modes.remove(modes.MENU);
} }
@@ -463,7 +463,7 @@ function Events() //{{{
key_code[name.toLowerCase()] = v key_code[name.toLowerCase()] = v
} }
// HACK: as firefox does not include an event for <, we must add this in manually. // HACK: as Gecko does not include an event for <, we must add this in manually.
if (!("<" in key_code)) if (!("<" in key_code))
{ {
key_code["<"] = 60; key_code["<"] = 60;
@@ -522,7 +522,7 @@ function Events() //{{{
{ {
// hacky way to get rid of "Transfering data from ..." on sites with frames // hacky way to get rid of "Transfering data from ..." on sites with frames
// when you click on a link inside a frameset, because asyncUpdateUI // when you click on a link inside a frameset, because asyncUpdateUI
// is not triggered there (Firefox bug?) // is not triggered there (Gecko bug?)
setTimeout(statusline.updateUrl, 10); setTimeout(statusline.updateUrl, 10);
return; return;
} }
@@ -1482,7 +1482,7 @@ function Events() //{{{
return; return;
} }
stop = true; // set to false if we should NOT consume this event but let Firefox handle it stop = true; // set to false if we should NOT consume this event but let the host app handle it
// just forward event without checking any mappings when the MOW is open // just forward event without checking any mappings when the MOW is open
if (liberator.mode == modes.COMMAND_LINE && (modes.extended & modes.OUTPUT_MULTILINE)) if (liberator.mode == modes.COMMAND_LINE && (modes.extended & modes.OUTPUT_MULTILINE))
@@ -1491,8 +1491,9 @@ function Events() //{{{
return void killEvent(); return void killEvent();
} }
// XXX: ugly hack for now pass certain keys to Firefox as they are without beeping // XXX: ugly hack for now pass certain keys to the host app as
// also fixes key navigation in combo boxes, submitting forms, etc. // they are without beeping also fixes key navigation in combo
// boxes, submitting forms, etc.
// FIXME: breaks iabbr for now --mst // FIXME: breaks iabbr for now --mst
if (key in config.ignoreKeys && (config.ignoreKeys[key] & liberator.mode)) if (key in config.ignoreKeys && (config.ignoreKeys[key] & liberator.mode))
{ {
@@ -1523,7 +1524,7 @@ function Events() //{{{
return void killEvent(); return void killEvent();
} }
// others are left to generate the 'input' event or handled by Firefox // others are left to generate the 'input' event or handled by the host app
return; return;
} }
} }
@@ -1628,7 +1629,7 @@ function Events() //{{{
if (!isEscapeKey(key)) if (!isEscapeKey(key))
{ {
// allow key to be passed to Firefox if we can't handle it // allow key to be passed to the host app if we can't handle it
stop = false; stop = false;
if (liberator.mode == modes.COMMAND_LINE) if (liberator.mode == modes.COMMAND_LINE)

View File

@@ -569,13 +569,13 @@ function IO() //{{{
expandPath: IO.expandPath, expandPath: IO.expandPath,
// TODO: there seems to be no way, short of a new component, to change // TODO: there seems to be no way, short of a new component, to change
// Firefox's CWD - see // https://bugzilla.mozilla.org/show_bug.cgi?id=280953 // the process's CWD - see // https://bugzilla.mozilla.org/show_bug.cgi?id=280953
/** /**
* Returns the current working directory. * Returns the current working directory.
* *
* It's not possible to change the real CWD of Firefox so this state is * It's not possible to change the real CWD of the process so this
* maintained internally. External commands run via {@link #system} are * state is maintained internally. External commands run via
* executed in this directory. * {@link #system} are executed in this directory.
* *
* @returns {nsIFile} * @returns {nsIFile}
*/ */
@@ -584,7 +584,7 @@ function IO() //{{{
let dir = self.getFile(cwd.path); let dir = self.getFile(cwd.path);
// NOTE: the directory could have been deleted underneath us so // NOTE: the directory could have been deleted underneath us so
// fallback to Firefox's CWD // fallback to the process's CWD
if (dir.exists() && dir.isDirectory()) if (dir.exists() && dir.isDirectory())
return dir; return dir;
else else

View File

@@ -1276,7 +1276,7 @@ const liberator = (function () //{{{
}, },
/** /**
* Restart the liberator host application. * Restart the Liberator host application.
*/ */
restart: function () restart: function ()
{ {

View File

@@ -715,10 +715,11 @@ function Options() //{{{
} }
// //
// Firefox preferences which need to be changed to work well with Vimperator // Host application preferences which need to be changed to work well with
// Liberator
// //
// work around Firefox popup blocker // work around the popup blocker
// TODO: Make this work like safeSetPref // TODO: Make this work like safeSetPref
var popupAllowedEvents = loadPreference("dom.popup_allowed_events", "change click dblclick mouseup reset submit"); var popupAllowedEvents = loadPreference("dom.popup_allowed_events", "change click dblclick mouseup reset submit");
if (!/keypress/.test(popupAllowedEvents)) if (!/keypress/.test(popupAllowedEvents))

View File

@@ -1370,7 +1370,7 @@ function CommandLine() //{{{
{ {
//this.resetCompletions(); //this.resetCompletions();
} }
return true; // allow this event to be handled by Firefox return true; // allow this event to be handled by the host app
} }
else if (event.type == "keyup") else if (event.type == "keyup")
{ {

View File

@@ -662,7 +662,7 @@ const util = { //{{{
if (searchURL) if (searchURL)
return searchURL; return searchURL;
// Hmm. No defsearch? Let Firefox deal with it, then. // Hmm. No defsearch? Let the host app deal with it, then.
return url; return url;
}); });
}, },