From e68de0fcdacdaf8ac7046b076ae92fc055d9e727 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Mon, 9 Jan 2006 19:49:33 +0000 Subject: [PATCH] Implemented "Fonts = " option SVN revision: 1593 --- doc/config.html | 10 ++++++++++ src/elogd.c | 14 ++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/doc/config.html b/doc/config.html index b38ab02f..9a1ce0b5 100755 --- a/doc/config.html +++ b/doc/config.html @@ -749,6 +749,16 @@ of attachments can be restricted. The server will then refuse to accept larger attachments. The default is 10485760 (= 10 MB). This option has to be placed into the [global] section and the elogd server has to be restarted after a change.

+

  • Fonts = <list> +
    +List of fonts (comma separated) to be shown in the font drop-down box of the entry edit +form. Default is
    +
    Fonts = Arial, Comic Sans MS, Courier New, Tahoma, Times New Roman, Verdana +

    +On Unix systems some of these fonts might not be installed, in which case they can +be replaced by others like Serif, Sans-serif, Helvetica. +

    +


    diff --git a/src/elogd.c b/src/elogd.c index c42ea226..e2921184 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -9128,12 +9128,14 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL rsprintf("onchange=\"elcode(document.form1.Text,'FONT',this.options[this.selectedIndex].value);"); rsprintf("this.selectedIndex=0;\">\n"); rsprintf("\n", loc("FONT")); - rsprintf("\n"); - rsprintf("\n"); - rsprintf("\n"); - rsprintf("\n"); - rsprintf("\n"); - rsprintf("\n"); + + if (!getcfg(lbs->name, "Fonts", str, sizeof(str))) + strcpy(str, "Arial, Comic Sans MS, Courier New, Tahoma, Times New Roman, Verdana"); + + n = strbreak(str, list, MAX_N_ATTR, ","); + for (i=0 ; i%s\n", list[i], list[i]); + rsprintf("\n"); rsprintf("