summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/schemes/view-source.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/schemes/view-source.c b/src/schemes/view-source.c
index b6cce86..8fa1d63 100644
--- a/src/schemes/view-source.c
+++ b/src/schemes/view-source.c
@@ -36,28 +36,28 @@ typedef struct {
gulong handler_id;
} DataSignalData;
-static const gchar *document =
- "<!doctype html>\n"
- "<html dir=\"%s\">\n"
- "<head>\n"
- "<meta charset=\"utf-8\">\n"
- "<title>Source of %s</title>\n"
- "<link rel=\"stylesheet\" type=\"text/css\" "
- "media=\"all\" "
- "href=\"view-source:resources/prism/"
- "prism.css\">\n"
- "<script src=\"view-source:resources/prism/"
- "prism.js\"></script>\n"
- "</head>\n"
- "<body style=\"margin: 0;\">\n"
- "<pre style=\"overflow: visible; width: 100%; "
- "margin: 0;\">\n"
- "<code class=\"language-markup line-numbers\" "
- "style=\"overflow: visible;\">"
- "%s</code>\n"
- "</pre>\n"
- "</body>\n"
- "</html>\n";
+#define DOCUMENT \
+ "<!doctype html>\n" \
+ "<html dir=\"%s\">\n" \
+ "<head>\n" \
+ "<meta charset=\"utf-8\">\n" \
+ "<title>Source of %s</title>\n" \
+ "<link rel=\"stylesheet\" type=\"text/css\" " \
+ "media=\"all\" " \
+ "href=\"view-source:resources/prism/" \
+ "prism.css\">\n" \
+ "<script src=\"view-source:resources/prism/" \
+ "prism.js\"></script>\n" \
+ "</head>\n" \
+ "<body style=\"margin: 0;\">\n" \
+ "<pre style=\"overflow: visible; width: 100%; " \
+ "margin: 0;\">\n" \
+ "<code class=\"language-markup line-numbers\" "\
+ "style=\"overflow: visible;\">" \
+ "%s</code>\n" \
+ "</pre>\n" \
+ "</body>\n" \
+ "</html>\n"
static void
respond(WebKitURISchemeRequest *request, const gchar *uri, guchar *data,
@@ -69,7 +69,7 @@ respond(WebKitURISchemeRequest *request, const gchar *uri, guchar *data,
escaped_data = g_markup_escape_text((gchar *) data, length);
stream = g_memory_input_stream_new_from_data(
- g_strdup_printf(document,
+ g_strdup_printf(DOCUMENT,
gtk_widget_get_default_direction() ==
GTK_TEXT_DIR_RTL ? "rtl" : "ltr",
uri, escaped_data), -1, g_free);