bug 454426: prbool fixes for widget/. r+sr=roc

This commit is contained in:
Taras Glek 2008-09-15 17:00:09 -07:00
parent 72b53ae3c7
commit fe6f420b3c
2 changed files with 3 additions and 3 deletions

View File

@ -130,7 +130,7 @@ nsNativeThemeGTK::RefreshWidgetWindow(nsIFrame* aFrame)
}
static PRBool IsWidgetTypeDisabled(PRUint8* aDisabledVector, PRUint8 aWidgetType) {
return aDisabledVector[aWidgetType >> 3] & (1 << (aWidgetType & 7));
return (aDisabledVector[aWidgetType >> 3] & (1 << (aWidgetType & 7))) != 0;
}
static void SetWidgetTypeDisabled(PRUint8* aDisabledVector, PRUint8 aWidgetType) {
@ -153,7 +153,7 @@ static PRBool IsWidgetStateSafe(PRUint8* aSafeVector,
GtkWidgetState *aWidgetState)
{
PRUint8 key = GetWidgetStateKey(aWidgetType, aWidgetState);
return aSafeVector[key >> 3] & (1 << (key & 7));
return (aSafeVector[key >> 3] & (1 << (key & 7))) != 0;
}
static void SetWidgetStateSafe(PRUint8 *aSafeVector,

View File

@ -3587,7 +3587,7 @@ nsWindow::NativeCreate(nsIWidget *aParent,
//check if accessibility enabled/disabled by environment variable
const char *envValue = PR_GetEnv(sAccEnv);
if (envValue) {
sAccessibilityEnabled = atoi(envValue);
sAccessibilityEnabled = atoi(envValue) != 0;
LOG(("Accessibility Env %s=%s\n", sAccEnv, envValue));
}
//check gconf-2 setting