summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/utils/resources.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/utils/resources.c b/src/utils/resources.c
index 7272cec..20291a8 100644
--- a/src/utils/resources.c
+++ b/src/utils/resources.c
@@ -26,19 +26,19 @@
#include "../application.h"
-static const gchar *error_document =
- "<!doctype html>\n"
- "<html dir=\"%s\">\n"
- "<head>\n"
- "<meta charset=\"utf-8\">\n"
- "<title>Resource Error</title>\n"
- "</head>\n"
- "<body>\n"
- "<h1>Resource Error</h1>\n"
- "<p>Failed to load resource &ldquo;%s&rdquo;</p>\n"
- "<p>%s</p>\n"
- "</body>\n"
- "</html>\n";
+#define ERROR_DOCUMENT \
+ "<!doctype html>\n" \
+ "<html dir=\"%s\">\n" \
+ "<head>\n" \
+ "<meta charset=\"utf-8\">\n" \
+ "<title>Resource Error</title>\n" \
+ "</head>\n" \
+ "<body>\n" \
+ "<h1>Resource Error</h1>\n" \
+ "<p>Failed to load resource &ldquo;%s&rdquo;</p>\n" \
+ "<p>%s</p>\n" \
+ "</body>\n" \
+ "</html>\n"
void
mq_resource_response(MqApplication *application, const gchar *path,
@@ -58,7 +58,7 @@ mq_resource_response(MqApplication *application, const gchar *path,
stream = G_INPUT_STREAM(g_file_read(file, NULL, &error));
if (!stream) {
stream = g_memory_input_stream_new_from_data(
- g_strdup_printf(error_document,
+ g_strdup_printf(ERROR_DOCUMENT,
gtk_widget_get_default_direction() ==
GTK_TEXT_DIR_RTL ? "rtl" : "ltr",
path, error->message), -1, g_free);