summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/epub/epub-document.c23
-rw-r--r--shell/Makefile.am4
2 files changed, 20 insertions, 7 deletions
diff --git a/backend/epub/epub-document.c b/backend/epub/epub-document.c
index 9caa8432..da1a844e 100644
--- a/backend/epub/epub-document.c
+++ b/backend/epub/epub-document.c
@@ -1274,13 +1274,16 @@ change_to_night_sheet(contentListNode *nodedata,gpointer user_data)
open_xml_document(filename);
set_xml_root_node(NULL);
xmlNodePtr head =xml_get_pointer_to_node((xmlChar*)"head",NULL,NULL);
-
+ gchar *class = NULL;
xmlretval = NULL;
xml_parse_children_of_node(head,(xmlChar*)"link",(xmlChar*)"rel",(xmlChar*)"stylesheet");
xmlNodePtr day = xmlretval;
+ if ( (class = (gchar*)xml_get_data_from_node(day,XML_ATTRIBUTE,(xmlChar*)"class")) == NULL) {
+ xmlSetProp(day,(xmlChar*)"class",(xmlChar*)"day");
+ }
+ g_free(class);
xmlSetProp(day,(xmlChar*)"rel",(xmlChar*)"alternate stylesheet");
-
xmlretval = NULL;
xml_parse_children_of_node(head,(xmlChar*)"link",(xmlChar*)"class",(xmlChar*)"night");
xmlSetProp(xmlretval,(xmlChar*)"rel",(xmlChar*)"stylesheet");
@@ -1367,8 +1370,20 @@ epub_document_check_add_night_sheet(EvDocument *document)
gchar* stylesheetfilename = epub_document_get_alternate_stylesheet((gchar*)node->value) ;
if (stylesheetfilename == NULL) {
- gchar *style = "body {color:rgb(255,255,255);background-color:rgb(0,0,0);text-align:justify;line-spacing:1.8; margin-top:0px;margin-bottom:4px;margin-right:50px;\
- margin-left:50px;text-indent:3em;";
+ gchar *style = "body {color:rgb(255,255,255);\
+ background-color:rgb(0,0,0);\
+ text-align:justify;\
+ line-spacing:1.8;\
+ margin-top:0px;\
+ margin-bottom:4px;\
+ margin-right:50px;\
+ margin-left:50px;\
+ text-indent:3em;}\
+ h1, h2, h3, h4, h5, h6\
+ {color:white;\
+ text-align:center;\
+ font-style:italic;\
+ font-weight:bold;}";
gchar *csspath = g_strdup_printf("%s/atrilnightstyle.css",epub_document->documentdir);
diff --git a/shell/Makefile.am b/shell/Makefile.am
index aff9fde0..cd123aad 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -20,7 +20,6 @@ AM_CPPFLAGS= \
-DATRIL_COMPILATION \
$(SHELL_CFLAGS) \
$(WARN_CFLAGS) \
- $(WEBKIT_CFLAGS) \
$(DISABLE_DEPRECATED)
bin_PROGRAMS=atril
@@ -110,8 +109,7 @@ atril_LDADD= \
$(top_builddir)/libdocument/libatrildocument.la \
$(top_builddir)/libview/libatrilview.la \
$(top_builddir)/libmisc/libevmisc.la \
- $(SHELL_LIBS) \
- $(WEBKIT_LIBS)
+ $(SHELL_LIBS)
if PLATFORM_WIN32
atril_LDADD += atril-icon.o