gtk_window_set_modal(GTK_WINDOW(sErrDlg), TRUE);
ErrorHandler(int aErr, const char* aErrMsg){    GtkWidget *okButton, *label;    char msg[256];    char newmsg[256];    char errStr[16];        sprintf(errStr, "%d", aErr);     if (!IsErrFatal(aErr))    {	if(aErr == E_INSTALL)	{	    if (aErrMsg != NULL)	    {		sprintf(newmsg, gCtx->Res(errStr), aErrMsg);		sprintf(msg, gCtx->Res("ERROR"), aErr, newmsg);	    }	}	else	    sprintf(msg, gCtx->Res("ERROR"), aErr, gCtx->Res(errStr));    }    else        sprintf(msg, gCtx->Res("FATAL_ERROR"), aErr, gCtx->Res(errStr));        // lack of gCtx->window indicates we have not yet run RunWizard     // and gtk_init    if (gCtx->opt->mMode == nsXIOptions::MODE_SILENT || !gCtx->window)    {        fprintf (stderr, "%s\n", msg);        return aErr;    }    sErrDlg = gtk_dialog_new();    gtk_window_set_title(GTK_WINDOW(sErrDlg), gCtx->Res("ERROR_TITLE"));    okButton = gtk_button_new_with_label(gCtx->Res("OK_LABEL"));    label = gtk_label_new(msg);    gtk_window_set_position(GTK_WINDOW(sErrDlg), GTK_WIN_POS_CENTER);    gtk_container_add(GTK_CONTAINER(GTK_DIALOG(sErrDlg)->action_area),                       okButton);    gtk_signal_connect(GTK_OBJECT(okButton), "clicked",                       GTK_SIGNAL_FUNC(ErrDlgOK), (void*)aErr);    gtk_container_add(GTK_CONTAINER(GTK_DIALOG(sErrDlg)->vbox), label);        GTK_WIDGET_SET_FLAGS(okButton, GTK_CAN_DEFAULT);    gtk_widget_grab_default(okButton);    gtk_widget_show_all(sErrDlg);    gtk_main();    return aErr;}