Skip to content

Commit c133ccd

Browse files
author
H.G.Muller
committed
Add Edit Themes List menu item XB
The Edit Tags dialog is now also used for editing the -themeName list, with a menu item in the View menu to pop it up.
1 parent 3adea30 commit c133ccd

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

dialogs.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1278,11 +1278,11 @@ EditTagsPopUp (char *tags, char **dest)
12781278
}
12791279

12801280
void
1281-
EditEnginePopUp (char *tags, char **dest)
1281+
EditAnyPopUp (char *tags, char **dest, char *title)
12821282
{ // wrapper to preserve old name used in back-end
12831283
TagsPopDown();
12841284
resPtr = dest;
1285-
NewTagsPopup(tags, NULL, _("Registered Engines"));
1285+
NewTagsPopup(tags, NULL, title);
12861286
}
12871287

12881288
void

menus.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,13 @@ DebugProc ()
387387
void
388388
EditEngineProc ()
389389
{
390-
EditEnginePopUp(firstChessProgramNames, &firstChessProgramNames);
390+
EditAnyPopUp(firstChessProgramNames, &firstChessProgramNames, _("Registered Engines"));
391+
}
392+
393+
void
394+
EditThemesProc ()
395+
{
396+
EditAnyPopUp(appData.themeNames, &appData.themeNames, _("Predefined Themes"));
391397
}
392398

393399
void
@@ -650,6 +656,7 @@ MenuItem viewMenu[] = {
650656
{N_("ICS Input Box"), NULL, "ICSInputBox", IcsInputBoxProc, CHECK},
651657
{N_("ICS/Chat Console"), NULL, "OpenChatWindow", ChatProc, CHECK},
652658
{"----", NULL, NULL, NothingProc},
659+
{N_("Edit Theme List..."), NULL, "EditThemeList", EditThemesProc},
653660
{N_("Board..."), NULL, "Board", BoardOptionsProc},
654661
{N_("Fonts..."), NULL, "Fonts", FontsProc},
655662
{N_("Game List Tags..."), NULL, "GameListTags", GameListOptionsProc},

menus.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ void EnableButtonBar P((int state));
186186
char *ModeToWidgetName P((GameMode mode));
187187
void CreateAnimVars P((void));
188188
void CopySomething P((char *s));
189-
void EditEnginePopUp P((char *tags, char **dest));
189+
void EditAnyPopUp P((char *tags, char **dest, char *title));
190190

191191

192192

0 commit comments

Comments
 (0)