static int
NewTagsCallback (int n)
{
- ReplaceTags(tagsText, &gameInfo);
+ if(!bookUp) ReplaceTags(tagsText, &gameInfo);
return 1;
}
changeTags (int n)
{
GenericReadout(tagsOptions, 1);
- if(bookUp) SaveToBook(tagsText); else
+ if(bookUp) SaveToBook(tagsText), DisplayBook(currentMove); else
ReplaceTags(tagsText, &gameInfo);
}
#define IDC_NFG_Edit 1023\r
#define IDC_EpDrawMoveCount 1023\r
#define IDC_PolyglotDir 1023\r
+#define OPT_TagsSave 1023\r
#define OPT_ConsoleText 1024\r
#define OPT_LightSquareColor 1024\r
#define OPT_CommandInput 1025\r
case WM_COMMAND:\r
switch (LOWORD(wParam)) {\r
case IDOK:\r
+ case OPT_TagsSave:\r
if (canEditTags) {\r
char *p, *q;\r
/* Read changed options from the dialog box */\r
}\r
*p = NULLCHAR; err = 0;\r
if(resPtr) *resPtr = strdup(str); else\r
- if(bookUp) SaveToBook(str); else\r
+ if(bookUp) SaveToBook(str), DisplayBook(currentMove); else\r
err = ReplaceTags(str, &gameInfo);\r
if (err) DisplayError(_("Error replacing tags."), err);\r
\r
free(str);\r
}\r
- TagsPopDown();\r
+ if(LOWORD(wParam) == IDOK) TagsPopDown();\r
return TRUE;\r
\r
case IDCANCEL:\r
EDITTEXT IDC_GameListFilter,201,136,78,14,ES_AUTOHSCROLL\r
END\r
\r
-DLG_EditTags DIALOG DISCARDABLE 6, 18, 167, 140\r
+DLG_EditTags DIALOG DISCARDABLE 6, 18, 223, 140\r
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME\r
CAPTION "Edit Tags"\r
FONT 8, "MS Sans Serif"\r
BEGIN\r
- PUSHBUTTON "OK",IDOK,58,122,50,14\r
- PUSHBUTTON "Cancel",OPT_TagsCancel,114,122,50,14\r
+ PUSHBUTTON "OK",IDOK,114,122,50,14\r
+ PUSHBUTTON "Cancel",OPT_TagsCancel,170,122,50,14\r
+ PUSHBUTTON "Save",OPT_TagsSave,58,122,50,14\r
CONTROL "",OPT_TagsText,"RICHEDIT",ES_MULTILINE | ES_AUTOVSCROLL | \r
ES_AUTOHSCROLL | ES_WANTRETURN | WS_BORDER | WS_VSCROLL | \r
- WS_HSCROLL | WS_TABSTOP,2,2,162,115\r
+ WS_HSCROLL | WS_TABSTOP,2,2,218,115\r
PUSHBUTTON "&Edit",OPT_EditTags,2,122,50,14\r
END\r
\r