Skip to content

Commit

Permalink
Updates for 0.8.6
Browse files Browse the repository at this point in the history
  • Loading branch information
user-none committed Apr 12, 2015
1 parent 9c81cf1 commit 04c7ab1
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake_e

set( SIGIL_MAJOR_VERSION 0 )
set( SIGIL_MINOR_VERSION 8 )
set( SIGIL_REVISION_VERSION 5 )
set( SIGIL_REVISION_VERSION 6 )
set( SIGIL_FULL_VERSION ${SIGIL_MAJOR_VERSION}.${SIGIL_MINOR_VERSION}.${SIGIL_REVISION_VERSION} )

# Apple users building with XCode notes:
Expand Down
8 changes: 8 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Sigil 0.8.6 2015.04.12
- Fix for crash during merging xhtml files.
- Changed fix for "Create TOC crash in Sigil 0.8.5" to reduce the degree
of disconnecting to prevent lost signals on html resources.
- Fix for missing audio and video mime types in OPFResource and
FolderKeeper.
- Attempt to prevent Tidy from simply deleting all mathml during cleaning.

Sigil 0.8.5 2015.03.29
- Fix text resource not alwalys saving to disk.
- Fix bug in missing CSS.
Expand Down
3 changes: 3 additions & 0 deletions src/Sigil/BookManipulation/Book.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,9 @@ Resource *Book::MergeResources(QList<Resource *> resources)
sink_html_resource.SetText(XhtmlDoc::GetDomDocumentAsString(sink_dom));
// Now safe to do the delete
foreach(Resource * source_resource, resources) {
// Need to alert FolderKeeper that these are going away to properly update its
// m_Resources hash to prevent stale values from deleted resources hanging around
m_Mainfolder.RemoveResource(*source_resource);
source_resource->Delete();
}
}
Expand Down
8 changes: 7 additions & 1 deletion src/Sigil/BookManipulation/CleanSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,15 @@ static QString HTML5_BLOCK_ELEMENTS = "article,aside,audio,canvas,datagrid
static QString HTML5_INLINE_ELEMENTS = "command,mark,meter,progress,rp,rt,ruby,time";
static QString HTML5_EMPTY_ELEMENTS = "";

static QString MATHML_INLINE_ELEMENTS = "math,maction,maligngroup,malignmark,menclose,merror,mfenced"
",mfrac,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mroot"
",mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msup,msubsup"
",mtable,mtd,mtext,mtr,munder,munderover,semantics,annotation,annotation-xml";


// Don't mix inline with block but inline can be duplicated with empty according to tidy docs
static QString BLOCK_ELEMENTS = HTML5_BLOCK_ELEMENTS + "," + SVG_BLOCK_ELEMENTS;
static QString INLINE_ELEMENTS = HTML5_INLINE_ELEMENTS + "," + SVG_INLINE_ELEMENTS;;
static QString INLINE_ELEMENTS = HTML5_INLINE_ELEMENTS + "," + SVG_INLINE_ELEMENTS + "," + MATHML_INLINE_ELEMENTS;
static QString EMPTY_ELEMENTS = HTML5_EMPTY_ELEMENTS + "," + SVG_EMPTY_ELEMENTS;

// Performs general cleaning (and improving)
Expand Down
4 changes: 2 additions & 2 deletions src/Sigil/BookManipulation/FolderKeeper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ const QStringList MISC_TEXT_EXTENSIONS = QStringList() << "txt" << "js" << "xp
const QStringList FONT_EXTENSIONS = QStringList() << "ttf" << "ttc" << "otf";
const QStringList TEXT_EXTENSIONS = QStringList() << "xhtml" << "html" << "htm" << "xml";
const QStringList STYLE_EXTENSIONS = QStringList() << "css";
const QStringList AUDIO_EXTENSIONS = QStringList() << "aac" << "m4a" << "mp3" << "mpeg" << "mpg";
const QStringList VIDEO_EXTENSIONS = QStringList() << "m4v" << "mp4" << "mov" << "ogg" << "webm";
const QStringList AUDIO_EXTENSIONS = QStringList() << "aac" << "m4a" << "mp3" << "mpeg" << "mpg" << "oga" << "ogg";
const QStringList VIDEO_EXTENSIONS = QStringList() << "m4v" << "mp4" << "mov" << "ogv" << "webm";

const QString IMAGE_FOLDER_NAME = "Images";
const QString FONT_FOLDER_NAME = "Fonts";
Expand Down
8 changes: 8 additions & 0 deletions src/Sigil/ResourceObjects/OPFResource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1482,11 +1482,19 @@ void OPFResource::CreateMimetypes()
m_Mimetypes[ "html" ] = "application/xhtml+xml";
m_Mimetypes[ "htm" ] = "application/xhtml+xml";
m_Mimetypes[ "css" ] = "text/css";
// Multimedia files
m_Mimetypes[ "mp3" ] = "audio/mpeg";
m_Mimetypes[ "oga" ] = "audio/ogg";
m_Mimetypes[ "ogg" ] = "audio/ogg";
m_Mimetypes[ "mp4" ] = "video/mp4";
m_Mimetypes[ "ogv" ] = "video/ogg";
m_Mimetypes[ "webm" ] = "video/webm";
// Until the standards gods grace us with font mimetypes,
// these will have to do
m_Mimetypes[ "otf" ] = "application/vnd.ms-opentype";
m_Mimetypes[ "ttf" ] = "application/x-font-ttf";
m_Mimetypes[ "ttc" ] = "application/x-font-truetype-collection";
m_Mimetypes[ "woff" ] = "application/font-woff";
}


Expand Down
8 changes: 1 addition & 7 deletions src/Sigil/Tabs/FlowTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,8 @@ FlowTab::~FlowTab()
// Explicitly disconnect signals because Modified is causing the ResourceModified
// function to be called after we delete BV and PV later in this destructor.
// No idea how that's possible but this prevents a segfault...
disconnect(&m_HTMLResource, 0, 0, 0);
disconnect(&m_HTMLResource, SIGNAL(Modified()), this, SLOT(ResourceModified()));
disconnect(this, 0, 0, 0);
if (m_wBookView) {
disconnect(m_wBookView, 0, 0, 0);
}
if (m_wCodeView) {
disconnect(m_wCodeView, 0, 0, 0);
}
m_WellFormedCheckComponent.deleteLater();

if (m_wBookView) {
Expand Down
2 changes: 2 additions & 0 deletions src/Sigil/ViewEditors/BookViewPreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ BookViewPreview::BookViewPreview(QWidget *parent)
// Enable our link filter.
page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
page()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
// This should not be needed on Windows if we simply include the correct qt plugins
// page()->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
CreateContextMenuActions();
ConnectSignalsToSlots();
}
Expand Down
2 changes: 1 addition & 1 deletion version.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<information>
<current-version>0.8.4</current-version>
<current-version>0.8.6</current-version>
</information>

0 comments on commit 04c7ab1

Please sign in to comment.