X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwedittags.c;h=b3cf334f722ac0060405a58a7b2f7b81603d562b;hb=e6e38912837a4fe2464356408d10dee950b3121c;hp=2ec157d1dbb14ec10f92a2fe390c5a71a09724ee;hpb=6445f59125a3dff0cbb9426a0c0bd300a31075d1;p=xboard.git diff --git a/winboard/wedittags.c b/winboard/wedittags.c index 2ec157d..b3cf334 100644 --- a/winboard/wedittags.c +++ b/winboard/wedittags.c @@ -1,7 +1,7 @@ /* * wedittags.c -- EditTags window for WinBoard * - * Copyright 1995, 2009, 2010, 2011 Free Software Foundation, Inc. + * Copyright 1995, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. * * Enhancements Copyright 2005 Alessandro Scotti * @@ -118,6 +118,7 @@ EditTagsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: + case OPT_TagsSave: if (canEditTags) { char *p, *q; /* Read changed options from the dialog box */ @@ -133,13 +134,13 @@ EditTagsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) } *p = NULLCHAR; err = 0; if(resPtr) *resPtr = strdup(str); else - if(bookUp) SaveToBook(str); else + if(bookUp) SaveToBook(str), DisplayBook(currentMove); else err = ReplaceTags(str, &gameInfo); if (err) DisplayError(_("Error replacing tags."), err); free(str); } - TagsPopDown(); + if(LOWORD(wParam) == IDOK) TagsPopDown(); return TRUE; case IDCANCEL: @@ -211,6 +212,7 @@ VOID EitherTagsPopUp(char *tags, char *msg, BOOLEAN edit) if (editTagsDialog) { SendMessage(editTagsDialog, WM_INITDIALOG, 0, 0); ShowWindow(editTagsDialog, SW_SHOW); + if(bookUp) SetFocus(hwndMain); } else { lpProc = MakeProcInstance((FARPROC)EditTagsDialog, hInst); CreateDialog(hInst, MAKEINTRESOURCE(DLG_EditTags),