From 711d00943c8dc11eb3dede32695182defbb96c1f Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Fri, 1 Apr 2016 10:19:29 +0200 Subject: [PATCH] Fix Xaw for font damage A dummy for ApplyFont is added in the Xaw front end to allow compiling it, and the Fonts dialog refuses to pop up when it recognizes an X-font setting for the message font, with an apology. --- dialogs.c | 5 +++-- xaw/xoptions.c | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dialogs.c b/dialogs.c index 11a3be3..fddc8fd 100644 --- a/dialogs.c +++ b/dialogs.c @@ -1644,7 +1644,7 @@ FontsOK (int n) } static Option fontOptions[] = { - { 0, 60, 200, NULL, (void*) &appData.clockFont, NULL, NULL, TextBox, N_("Clocks:") }, + { 0, 60, 200, NULL, (void*) &appData.clockFont, NULL, NULL, TextBox, N_("Clocks (requires restart):") }, { 1, SAME_ROW, 0, NULL, (void*) &AdjustFont, NULL, NULL, Button, N_("+") }, { 2, SAME_ROW, 0, NULL, (void*) &AdjustFont, NULL, NULL, Button, N_("-") }, { 3, SAME_ROW, 0, NULL, (void*) &AdjustFont, NULL, NULL, Button, N_("B") }, @@ -1679,7 +1679,7 @@ static Option fontOptions[] = { { 2, SAME_ROW, 0, NULL, (void*) &AdjustFont, NULL, NULL, Button, N_("-") }, { 3, SAME_ROW, 0, NULL, (void*) &AdjustFont, NULL, NULL, Button, N_("B") }, { 4, SAME_ROW, 0, NULL, (void*) &AdjustFont, NULL, NULL, Button, N_("I") }, - { 0, 0, 0, NULL, NULL, NULL, NULL, Label, N_("Generic type-face names are Sans, Monospace and Serif") }, + { 0, 0, 0, NULL, NULL, NULL, NULL, Label, N_("\nGeneric type-face names are Sans, Monospace and Serif") }, { 0, 0, 0, NULL, (void*) &FontsOK, "", NULL, EndMark , "" } }; @@ -1732,6 +1732,7 @@ void FontsProc () { int i; + if(strstr(appData.font, "-*-")) { DisplayNote(_("This only works in the GTK build")); return; } GenericPopUp(fontOptions, _("Fonts"), TransientDlg, BoardWindow, MODAL, 0); for(i=0; i<6; i++) ApplyFont(&fontOptions[5*i], *(char**)fontOptions[5*i].target); } diff --git a/xaw/xoptions.c b/xaw/xoptions.c index 1c517ac..5feb56a 100644 --- a/xaw/xoptions.c +++ b/xaw/xoptions.c @@ -289,6 +289,11 @@ AppendColorized (Option *opt, char *message, int count) } void +ApplyFont (Option *opt, char *font) +{ // dummy +} + +void Show (Option *opt, int hide) { static Dimension h; -- 1.7.0.4