global_translations = fe_globalData.global_translations; secondary_translations = 0;
global_translations    = fe_globalData.global_translations; secondary_translations = fe_globalData.browser_global_translations;
fe_HackTranslations (MWContext *context, Widget widget){  XtTranslations global_translations = 0;  XtTranslations secondary_translations = 0;  XP_Bool has_display_area = FALSE;  if (XmIsGadget (widget))    return; /* To prevent focus problems, dont enable translations on the menubar    and its children. The problem was that when we had the translations    in the menubar too, we could do a translation and popup a modal    dialog when one of the menu's from the menubar was pulleddown. Now    motif gets too confused about who holds pointer and keyboard focus. */  if (XmIsRowColumn(widget)) {    unsigned char type;    XtVaGetValues(widget, XmNrowColumnType, &type, 0);    if (type == XmMENU_BAR)      return;  }  switch (context->type)    {#ifdef EDITOR    case MWContextEditor:      has_display_area = FALSE;      global_translations = fe_globalData.global_translations;      secondary_translations = fe_globalData.editor_global_translations;      break;#endif /*EDITOR*/    case MWContextBrowser:      has_display_area = TRUE;      global_translations = fe_globalData.global_translations;      secondary_translations = 0;      break;    case MWContextMail:    case MWContextNews:      has_display_area = TRUE;      global_translations = fe_globalData.global_translations;      secondary_translations = fe_globalData.mailnews_global_translations;      break;    case MWContextMailMsg:      has_display_area = TRUE;      global_translations = fe_globalData.global_translations;      secondary_translations = fe_globalData.messagewin_global_translations;      break;    case MWContextMessageComposition:      has_display_area = FALSE;      global_translations = 0;      secondary_translations = fe_globalData.mailcompose_global_translations;      break;    case MWContextBookmarks:      has_display_area = FALSE;      global_translations = 0;      secondary_translations = fe_globalData.bm_global_translations;      break;        case MWContextHistory:      has_display_area = FALSE;      global_translations = 0;      secondary_translations = fe_globalData.gh_global_translations;      break;        case MWContextAddressBook:      has_display_area = FALSE;      global_translations = 0;      secondary_translations = fe_globalData.ab_global_translations;      break;    case MWContextDialog:      has_display_area = TRUE;      global_translations = 0;      secondary_translations = fe_globalData.dialog_global_translations;      break;    default:      break;  }  if (global_translations)    XtOverrideTranslations (widget, global_translations);  if (secondary_translations)    XtOverrideTranslations (widget, secondary_translations);  if (XmIsTextField (widget) || XmIsText (widget) || XmIsList(widget))    {      /* Set up the editing translations (all text fields, everywhere.) */      if (XmIsTextField (widget) || XmIsText (widget))	fe_HackTextTranslations (widget);      /* Install globalTextFieldTranslations on single-line text fields in	 windows which have an HTML display area (browser, mail, news) but	 not in windows which don't have one (compose, download, bookmarks,	 address book...)       */      if (has_display_area &&	  XmIsTextField (widget) &&	  fe_globalData.global_text_field_translations)	XtOverrideTranslations (widget,				fe_globalData.global_text_field_translations);   }  else   {       Widget *kids = 0;       Cardinal nkids = 0;      /* Not a Text or TextField.       */      /* Install globalNonTextTranslations on non-text widgets in windows which	 have an HTML display area (browser, mail, news, view source) but not	 in windows which don't have one (compose, download, bookmarks,	 address book...)       */      if (has_display_area &&	  fe_globalData.global_nontext_translations)	XtOverrideTranslations (widget,				fe_globalData.global_nontext_translations);      /* Now recurse on the children.       */      XtVaGetValues (widget, XmNchildren, &kids, XmNnumChildren, &nkids, 0);      while (nkids--)	  fe_HackTranslations (context, kids [nkids]);    }}