EditTagsEvent()
{
char *tags = PGNTags(&gameInfo);
- EditTagsPopUp(tags);
+ EditTagsPopUp(tags, NULL);
free(tags);
}
void GameListDestroy P((void));
/* these are in wedittags.c */
-void EditTagsPopUp P((char *tags));
+void EditTagsPopUp P((char *tags, char **dest));
void TagsPopUp P((char *tags, char *msg));
void TagsPopDown P((void));
#define IDM_ReloadCMailMsg 165\r
#define IDM_Book 166\r
#define IDM_AboutGame 167\r
+#define IDM_EditServers 169\r
#define IDM_ShowGameList 170\r
#define IDM_EditTags 171\r
#define IDM_Tags 172\r
#define IDM_Comment 173\r
#define IDM_Debug 174\r
+#define IDM_EditProgs1 175\r
+#define IDM_EditProgs2 176\r
#define IDM_AnalysisMode 177\r
#define IDM_AnalyzeFile 178\r
#define IDM_Annotate 179\r
#define _(s) T_(s)\r
\r
/* Module globals */\r
-static char *editTagsText;\r
+static char *editTagsText, **resPtr;\r
BOOL editTagsUp = FALSE;\r
BOOL canEditTags = FALSE;\r
\r
GetWindowText(hwndText, str, len + 1);\r
p = q = str;\r
while (*q) {\r
- if (*q == '\r'|| *q == '\n')\r
+ if (*q == '\r')\r
q++;\r
else\r
*p++ = *q++;\r
}\r
*p = NULLCHAR;\r
+ if(resPtr) *resPtr = strdup(str), err = 0; else\r
err = ReplaceTags(str, &gameInfo);\r
if (err) DisplayError(_("Error replacing tags."), err);\r
\r
SetActiveWindow(hwnd);\r
}\r
\r
-VOID EditTagsPopUp(char *tags)\r
+VOID EditTagsPopUp(char *tags, char **dest)\r
{\r
+ resPtr = dest;\r
EitherTagsPopUp(tags, "", TRUE);\r
}\r
\r
ShowGameListProc();\r
break;\r
\r
+ case IDM_EditProgs1:\r
+ EditTagsPopUp(firstChessProgramNames, &firstChessProgramNames);\r
+ break;\r
+\r
+ case IDM_EditProgs2:\r
+ EditTagsPopUp(secondChessProgramNames, &secondChessProgramNames);\r
+ break;\r
+\r
+ case IDM_EditServers:\r
+ EditTagsPopUp(icsNames, &icsNames);\r
+ break;\r
+\r
case IDM_EditTags:\r
case IDM_Tags:\r
EditTagsProc();\r
END\r
POPUP "E&ngine"\r
BEGIN\r
+ MENUITEM "Install 1st...", IDM_EditProgs1\r
+ MENUITEM "Install 2nd...", IDM_EditProgs2\r
MENUITEM SEPARATOR\r
MENUITEM "Engine #&1 Settings...", IDM_Engine1Options\r
MENUITEM "Engine #&2 Settings...", IDM_Engine2Options\r
MENUITEM SEPARATOR\r
MENUITEM "Soun&ds...", IDM_Sounds\r
MENUITEM "&ICS...", IDM_IcsOptions, GRAYED\r
+ MENUITEM "Add ICS...", IDM_EditServers\r
MENUITEM "Comm&unications...", IDM_CommPort\r
MENUITEM SEPARATOR\r
MENUITEM "Save Settings &Now", IDM_SaveSettings\r
}
-void EditTagsPopUp(tags)
+void EditTagsPopUp(tags, dest)
char *tags;
+ char **dest;
{
Widget textw;
Arg args[16];