summaryrefslogtreecommitdiff
path: root/content/fetchers/about/about.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2020-09-29 22:48:16 +0100
committerVincent Sanders <vince@kyllikki.org>2020-09-29 22:50:08 +0100
commit44225f1b34eb1d393a74cc44dcfc32d102205ef6 (patch)
treea4a9acbb8baa59febd6ceeed6573fac852447abb /content/fetchers/about/about.c
parent7e459699931f39739348c75f743b5627e01338b0 (diff)
downloadnetsurf-44225f1b34eb1d393a74cc44dcfc32d102205ef6.tar.gz
netsurf-44225f1b34eb1d393a74cc44dcfc32d102205ef6.tar.bz2
split out about scheme handler for nscolours css
Diffstat (limited to 'content/fetchers/about/about.c')
-rw-r--r--content/fetchers/about/about.c63
1 files changed, 8 insertions, 55 deletions
diff --git a/content/fetchers/about/about.c b/content/fetchers/about/about.c
index bb9d68273..fe9eba7a4 100644
--- a/content/fetchers/about/about.c
+++ b/content/fetchers/about/about.c
@@ -26,27 +26,24 @@
* information from the browser from a known, fixed URL.
*/
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
+#include <stdbool.h>
+#include <stddef.h>
#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
#include "netsurf/inttypes.h"
-#include "netsurf/plot_style.h"
-#include "utils/log.h"
+#include "utils/errors.h"
+#include "utils/nsurl.h"
#include "utils/corestrings.h"
-#include "utils/nscolour.h"
-#include "utils/nsoption.h"
#include "utils/utils.h"
-#include "utils/messages.h"
#include "utils/ring.h"
#include "content/fetch.h"
#include "content/fetchers.h"
-#include "desktop/system_colour.h"
-
#include "private.h"
#include "about.h"
#include "blank.h"
@@ -54,6 +51,7 @@
#include "config.h"
#include "choices.h"
#include "imagecache.h"
+#include "nscolours.h"
#include "query.h"
#include "query_auth.h"
#include "query_fetcherror.h"
@@ -299,51 +297,6 @@ static bool fetch_about_licence_handler(struct fetch_about_context *ctx)
/**
- * Handler to generate the nscolours stylesheet
- *
- * \param ctx The fetcher context.
- * \return true if handled false if aborted.
- */
-static bool fetch_about_nscolours_handler(struct fetch_about_context *ctx)
-{
- nserror res;
- const char *stylesheet;
-
- /* content is going to return ok */
- fetch_set_http_code(ctx->fetchh, 200);
-
- /* content type */
- if (fetch_about_send_header(ctx, "Content-Type: text/css; charset=utf-8")) {
- goto aborted;
- }
-
- res = nscolour_get_stylesheet(&stylesheet);
- if (res != NSERROR_OK) {
- goto aborted;
- }
-
- res = fetch_about_ssenddataf(ctx,
- "html {\n"
- "\tbackground-color: #%06x;\n"
- "}\n"
- "%s",
- colour_rb_swap(nscolours[NSCOLOUR_WIN_ODD_BG]),
- stylesheet);
- if (res != NSERROR_OK) {
- goto aborted;
- }
-
- fetch_about_send_finished(ctx);
-
- return true;
-
-aborted:
-
- return false;
-}
-
-
-/**
* Handler to generate about scheme logo page
*
* \param ctx The fetcher context.