snav.enabled doesn't seam to work. directly using pref. moving from xpcom- to app- startup. NPODB

git-svn-id: svn://10.0.0.236/trunk@181270 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dougt%meer.net
2005-09-30 03:33:17 +00:00
parent b4a5294710
commit 892332a428
2 changed files with 8 additions and 6 deletions

View File

@@ -84,6 +84,11 @@ nsSpatialNavigation::KeyUp(nsIDOMEvent* aEvent)
NS_IMETHODIMP
nsSpatialNavigation::KeyPress(nsIDOMEvent* aEvent)
{
nsCOMPtr<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID);
PRBool enabled;
prefBranch->GetBoolPref("snav.enabled", &enabled);
if (!enabled) // this doesn't work. wtf? if (!mService->mEnabled)
return NS_OK;
PRInt32 formControlType = -1;
// check to see if we are in a text field.
@@ -517,9 +522,6 @@ nsSpatialNavigation::handleMove(int direction)
{
PRUint32 type = FOCUS;
if (!mService->mEnabled)
return NS_OK;
nsCOMPtr<nsIContent> focusedContent;
getFocusedContent(direction, getter_AddRefs(focusedContent));