X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.c;h=5a904e56b13cb824fda693612062e85c3ee89bcb;hb=f1549d478be5058606811dac414d79492d1ebe5c;hp=0e15c595136ae03675d405e00a74478567524aac;hpb=d6fdb1cf4c1fa20af2648cfcde215e69ec23029a;p=xboard.git diff --git a/dialogs.c b/dialogs.c index 0e15c59..5a904e5 100644 --- a/dialogs.c +++ b/dialogs.c @@ -1171,6 +1171,8 @@ EditCommentProc () static void changeTags P((int n)); static char *tagsText, **resPtr; +static int TagsClick P((Option *opt, int n, int x, int y, char *val, int index)); + static int NewTagsCallback (int n) { @@ -1182,11 +1184,18 @@ NewTagsCallback (int n) static Option tagsOptions[] = { { 0, 0, 0, NULL, NULL, NULL, NULL, Label, NULL }, -{ 200, T_VSCRL | T_FILL | T_WRAP | T_TOP, 200, NULL, (void*) &tagsText, "", NULL, TextBox, "" }, +{ 200, T_VSCRL | T_FILL | T_WRAP | T_TOP, 200, NULL, (void*) &tagsText, "", (char **) &TagsClick, TextBox, "" }, { 0, 0, 100, NULL, (void*) &changeTags, NULL, NULL, Button, N_("save changes") }, { 0,SAME_ROW, 0, NULL, (void*) &NewTagsCallback, "", NULL, EndMark , "" } }; +static int TagsClick (Option *opt, int n, int x, int y, char *val, int index) +{ + if(!bookUp || n != 3) return FALSE; // only button-3 press in Edit Book is of interest + PlayBookMove(val, index); + return TRUE; +} + static void changeTags (int n) {