From e08d26409864487703c60ffed79ee3487fc6f982 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Thu, 21 Apr 2016 09:26:39 +0200 Subject: [PATCH] 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. --- dialogs.c | 4 ++-- menus.c | 9 ++++++++- menus.h | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/dialogs.c b/dialogs.c index 8b53631..56ad841 100644 --- a/dialogs.c +++ b/dialogs.c @@ -1278,11 +1278,11 @@ EditTagsPopUp (char *tags, char **dest) } void -EditEnginePopUp (char *tags, char **dest) +EditAnyPopUp (char *tags, char **dest, char *title) { // wrapper to preserve old name used in back-end TagsPopDown(); resPtr = dest; - NewTagsPopup(tags, NULL, _("Registered Engines")); + NewTagsPopup(tags, NULL, title); } void diff --git a/menus.c b/menus.c index af8e33d..75d56af 100644 --- a/menus.c +++ b/menus.c @@ -387,7 +387,13 @@ DebugProc () void EditEngineProc () { - EditEnginePopUp(firstChessProgramNames, &firstChessProgramNames); + EditAnyPopUp(firstChessProgramNames, &firstChessProgramNames, _("Registered Engines")); +} + +void +EditThemesProc () +{ + EditAnyPopUp(appData.themeNames, &appData.themeNames, _("Predefined Themes")); } void @@ -650,6 +656,7 @@ MenuItem viewMenu[] = { {N_("ICS Input Box"), NULL, "ICSInputBox", IcsInputBoxProc, CHECK}, {N_("ICS/Chat Console"), NULL, "OpenChatWindow", ChatProc, CHECK}, {"----", NULL, NULL, NothingProc}, + {N_("Edit Theme List..."), NULL, "EditThemeList", EditThemesProc}, {N_("Board..."), NULL, "Board", BoardOptionsProc}, {N_("Fonts..."), NULL, "Fonts", FontsProc}, {N_("Game List Tags..."), NULL, "GameListTags", GameListOptionsProc}, diff --git a/menus.h b/menus.h index b088cc7..9478371 100644 --- a/menus.h +++ b/menus.h @@ -186,7 +186,7 @@ void EnableButtonBar P((int state)); char *ModeToWidgetName P((GameMode mode)); void CreateAnimVars P((void)); void CopySomething P((char *s)); -void EditEnginePopUp P((char *tags, char **dest)); +void EditAnyPopUp P((char *tags, char **dest, char *title)); -- 1.7.0.4