X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xaw%2Fxoptions.c;h=77d7358214ae4743493e76f2b447eba4ab7ba029;hb=b766f10fe10fc786b5793a010d777bacc4349820;hp=21281d2d3376129622d187ec6c32567d6ad45b53;hpb=50a32a757cb007d962a7179ff29bbc27e22a8388;p=xboard.git diff --git a/xaw/xoptions.c b/xaw/xoptions.c index 21281d2..77d7358 100644 --- a/xaw/xoptions.c +++ b/xaw/xoptions.c @@ -197,7 +197,7 @@ SetDialogTitle (DialogClass dlg, char *title) } void -LoadListBox (Option *opt, char *emptyText) +LoadListBox (Option *opt, char *emptyText, int n1, int n2) { static char *dummyList[2]; dummyList[0] = emptyText; // empty listboxes tend to crash X, so display user-supplied warning string instead @@ -267,6 +267,10 @@ SelectedListBoxItem (Option *opt) void HighlightText (Option *opt, int start, int end, Boolean on) { + if(on) + XawTextSetSelection( opt->handle, start, end ); // for lack of a better method, use selection for highighting + else + XawTextSetSelection( opt->handle, 0, 0 ); } void @@ -791,7 +795,6 @@ GenericPopUp (Option *option, char *title, DialogClass dlgNr, DialogClass parent if(engineDlg) { // Settings popup for engine: format through heuristic int n = currentCps->nrOptions; - if(!n) { DisplayNote(_("Engine has no options")); currentCps = NULL; return 0; } if(n > 50) width = 4; else if(n>24) width = 2; else width = 1; height = n / width + 1; if(n && (currentOption[n-1].type == Button || currentOption[n-1].type == SaveButton)) currentOption[n].min = SAME_ROW; // OK on same line