X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xaw%2Fxoptions.c;h=4770f5378a6bb7064c483cd54c6eed6d87567e60;hb=50ffaff1de1b05f1bf76dd842e734eff2974afd4;hp=7bbff9becd8e75879b93e7524c415e9e8864e954;hpb=c82483e9f02cc7e6efb6ee7c8140d8dd2fbd5573;p=xboard.git diff --git a/xaw/xoptions.c b/xaw/xoptions.c index 7bbff9b..4770f53 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 @@ -409,7 +413,7 @@ char *translationTable[] = { // beware: order is essential! }; void -AddHandler (Option *opt, int nr) +AddHandler (Option *opt, DialogClass dlg, int nr) { XtOverrideTranslations(opt->handle, XtParseTranslationTable(translationTable[nr])); }