X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xaw%2Fxoptions.c;h=1eb4965aef6fb4dcb679574d94e6d2f37eb641ee;hb=31806343176bad28a8ac91ab33bc15a4db8bed7f;hp=38c6c5ed8b42ab76c0e08108ea5f3f8cf36be58a;hpb=53160aadadca6a23463efdeb9f6e0953de4eb380;p=xboard.git diff --git a/xaw/xoptions.c b/xaw/xoptions.c index 38c6c5e..1eb4965 100644 --- a/xaw/xoptions.c +++ b/xaw/xoptions.c @@ -266,6 +266,22 @@ SelectedListBoxItem (Option *opt) } void +SetTextColor (char **cnames, int fg, int bg, int attr) +{ // this is not possible in Xaw +} + +void +AppendColorized (Option *opt, char *message, int count) +{ + AppendText(opt, message); +} + +void +Show (Option *opt, int hide) +{ +} + +void HighlightText (Option *opt, int start, int end, Boolean on) { if(on) @@ -1190,6 +1206,7 @@ GenericPopUp (Option *option, char *title, DialogClass dlgNr, DialogClass parent last = form; lastrow = oldLastRow; form = oldForm; forelast = oldForeLast; break; case Break: + if(c) break; width++; height = i+1; stack = !(option[i].min & SAME_ROW); @@ -1344,6 +1361,11 @@ void SetInsertPos (Option *opt, int pos) { Arg args[16]; + if(pos == 999999) { // this kludge to indicate end in GTK is fatal in Xaw + char *s; + GetWidgetText(opt, &s); + pos = strlen(s) - 1; + } XtSetArg(args[0], XtNinsertPosition, pos); XtSetValues(opt->handle, args, 1); // SetFocus(opt->handle, shells[InputBoxDlg], NULL, False); // No idea why this does not work, and the following is needed: @@ -1355,6 +1377,8 @@ TypeInProc (Widget w, XEvent *event, String *prms, Cardinal *nprms) { // can be used as handler for any text edit in any dialog (from GenericPopUp, that is) int n = prms[0][0] - '0'; Widget sh = XtParent(XtParent(XtParent(w))); // popup shell + extern int hidden; + hidden = 0; if(n<2) { // Enter or Esc typed from primed text widget: treat as if dialog OK or cancel button hit. int dlgNr; // figure out what the dialog number is by comparing shells (because we must pass it :( ) @@ -1364,7 +1388,7 @@ TypeInProc (Widget w, XEvent *event, String *prms, Cardinal *nprms) } void -HardSetFocus (Option *opt) +HardSetFocus (Option *opt, DialogClass dlg) { XSetInputFocus(xDisplay, XtWindow(opt->handle), RevertToPointerRoot, CurrentTime); }