721a9390a716cb5448126538993dcae82d8fc5fc Merge parents 889acd8 340dfde max Sat May 5 17:10:43 2012 -0700 fixed conflict with chins stylesheet function. A better long-term solution would be to introduce functions like addStylesheet to htmshell and keep a list of stylesheets instead of 3 diff functions diff --cc src/lib/htmshell.c index 7d78e39,8aaeae9..fd08ee8 --- src/lib/htmshell.c +++ src/lib/htmshell.c @@@ -343,55 -343,49 +343,64 @@@ static char *htmlStyle = "\n"; char *htmlStyleUndecoratedLink = /* Style that gets rid of underline of links. */ "\n"; + // optional style set by theme, added after main style and thus + // can overwrite main style settings + static char *htmlStyleTheme = NULL; + void htmlSetStyle(char *style) /* Set document wide style. A favorite style to * use for many purposes is htmlStyleUndecoratedLink * which will remove underlines from links. * Needs to be called before htmlStart or htmShell. */ { htmlStyle = style; } - +static char *htmlStyleSheet = NULL; +void htmlSetStyleSheet(char *styleSheet) +/* Set document wide style sheet by adding css name to HEAD part. + * Needs to be called before htmlStart or htmShell. */ +{ +htmlStyleSheet = styleSheet; +} + +static char *htmlFormClass = NULL; +void htmlSetFormClass(char *formClass) +/* Set class in the BODY part. */ +{ +htmlFormClass = formClass; +} + + void htmlSetStyleTheme(char *style) + /* Set theme style. Needs to be called before htmlStart or htmShell. */ + { + htmlStyleTheme = style; + } + static char *htmlBackground = NULL; void htmlSetBackground(char *imageFile) /* Set background - needs to be called before htmlStart * or htmShell. */ { htmlBackground = imageFile; } static int htmlBgColor = 0xFFFFFF; boolean gotBgColor = FALSE; void htmlSetBgColor(int color) /* Set background color - needs to be called before htmlStart * or htmShell. */ @@@ -442,37 -436,34 +451,40 @@@ #else///ifndef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS char *browserVersion; if (btIE == cgiClientBrowser(&browserVersion, NULL, NULL) && *browserVersion < '8') fputs("\n", f); else fputs("",f); // Strict would be nice since it fixes atleast one IE problem (use of :hover CSS pseudoclass) //fputs("\n",f); #endif///ndef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS } fputs("", f); fprintf(f,"
\n%s