X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xoptions.c;h=f87176e314540c93c3b486a01062c11c36f6522c;hb=dcb381e902c84b25e2a7301c5ba1d9f437503b5b;hp=99ca568792f341458fb1375ae8284ba6366256b5;hpb=fa8cdd39eca80f4bdbf6e8e8a290fa1b8979224e;p=xboard.git diff --git a/xoptions.c b/xoptions.c index 99ca568..f87176e 100644 --- a/xoptions.c +++ b/xoptions.c @@ -387,11 +387,12 @@ char moveTypeInTranslations[] = "Escape: TypeInProc(0) \n"; extern char filterTranslations[]; extern char gameListTranslations[]; +extern char memoTranslations[]; -char *translationTable[] = { +char *translationTable[] = { // beware: order is essential! historyTranslations, commentTranslations, moveTypeInTranslations, ICSInputTranslations, - filterTranslations, gameListTranslations, + filterTranslations, gameListTranslations, memoTranslations }; void @@ -676,13 +677,19 @@ SetPositionAndSize (Arg *args, Widget leftNeigbor, Widget topNeigbor, int b, int // set size (if given) if(w) XtSetArg(args[j], XtNwidth, w), j++; if(h) XtSetArg(args[j], XtNheight, h), j++; + // color + if(!appData.monoMode) { + if(!b && appData.dialogColor[0]) XtSetArg(args[j], XtNbackground, dialogColor), j++; + if(b == 3 && appData.buttonColor[0]) XtSetArg(args[j], XtNbackground, buttonColor), j++; + if(b == 3) b = 1; + } // border XtSetArg(args[j], XtNborderWidth, b); j++; return j; } int -GenericPopUp (Option *option, char *title, DialogClass dlgNr, DialogClass parent, int modal) +GenericPopUp (Option *option, char *title, DialogClass dlgNr, DialogClass parent, int modal, int top) { Arg args[24]; Widget popup, layout, dialog=NULL, edit=NULL, form, last, b_ok, b_cancel, previousPane = NULL, textField = NULL, oldForm, oldLastRow, oldForeLast; @@ -720,16 +727,15 @@ GenericPopUp (Option *option, char *title, DialogClass dlgNr, DialogClass parent shells[BoardWindow] = shellWidget; parents[dlgNr] = parent; popup = shells[dlgNr] = -#if TOPLEVEL - XtCreatePopupShell(title, modal ? transientShellWidgetClass : topLevelShellWidgetClass, -#else - XtCreatePopupShell(title, transientShellWidgetClass, -#endif + XtCreatePopupShell(title, !top || !appData.topLevel ? transientShellWidgetClass : topLevelShellWidgetClass, shells[parent], args, i); layout = XtCreateManagedWidget(layoutName, formWidgetClass, popup, layoutArgs, XtNumber(layoutArgs)); + if(!appData.monoMode && appData.dialogColor[0]) XtSetArg(args[0], XtNbackground, dialogColor); + XtSetValues(layout, args, 1); + for(c=0; c