X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.c;h=e69567ee706c703eaf9924150a5fa7eef0f7a1cd;hb=6901aa93e574b65bb1d823ade42fbd23c89dd6cd;hp=59b8e04cc6c266cef033dd61e27be3d0530bfaba;hpb=f1af1dfc236cea66f9a27d2a2e4b40dbecbfad71;p=xboard.git diff --git a/dialogs.c b/dialogs.c index 59b8e04..e69567e 100644 --- a/dialogs.c +++ b/dialogs.c @@ -1109,12 +1109,14 @@ EditCommentProc () //------------------------------------------------------ Edit Tags ---------------------------------- static void changeTags P((int n)); -static char *tagsText; +static char *tagsText, **resPtr; static int NewTagsCallback (int n) { - if(!bookUp) ReplaceTags(tagsText, &gameInfo); + if(bookUp) SaveToBook(tagsText), DisplayBook(currentMove); else + if(resPtr) { ASSIGN(*resPtr, tagsText); } else + ReplaceTags(tagsText, &gameInfo); return 1; } @@ -1130,6 +1132,7 @@ changeTags (int n) { GenericReadout(tagsOptions, 1); if(bookUp) SaveToBook(tagsText), DisplayBook(currentMove); else + if(resPtr) { ASSIGN(*resPtr, tagsText); } else ReplaceTags(tagsText, &gameInfo); } @@ -1157,6 +1160,7 @@ TagsPopUp (char *tags, char *msg) void EditTagsPopUp (char *tags, char **dest) { // wrapper to preserve old name used in back-end + resPtr = dest; NewTagsPopup(tags, NULL); }