Skip to content

Commit

Permalink
XHTML filter n=X render support. #ifdef for un-updated Sword. disable…
Browse files Browse the repository at this point in the history
… website access in about boxes for win32 (gtk drops core).

git-svn-id: http://svn.code.sf.net/p/gnomesword/code/branches/webkit@4372 da23c209-522a-4b7c-92e9-24af42be4764
  • Loading branch information
karlkleinpaste committed Feb 19, 2012
1 parent 5b42e42 commit 5914f34
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2012-02-18 karl <charcoal@users.sf.net>

* remove wscript's svn version. temp-hack makeDistro.sh configuration.
* add code to handle *XHTML filters, and to restore post-process n=X
if Sword has not been updated.

2012-02-14 karl <charcoal@users.sf.net>

* big code simplification to avoid overuse of #ifdef USE_GTKBUILDER.
Expand Down
2 changes: 2 additions & 0 deletions src/gnome2/about_sword.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,12 @@ Books can be downloaded from the SWORD Project.");
(GTK_ABOUT_DIALOG (about1), (gchar *)main_get_sword_version());
gtk_about_dialog_set_comments
(GTK_ABOUT_DIALOG (about1), about);
#ifndef WIN32
gtk_about_dialog_set_website
(GTK_ABOUT_DIALOG (about1), "http://www.crosswire.org/sword");
gtk_about_dialog_set_website_label
(GTK_ABOUT_DIALOG (about1), _("The SWORD Project"));
#endif
gtk_about_dialog_set_logo
(GTK_ABOUT_DIALOG (about1), about1_logo_pixbuf);

Expand Down
2 changes: 2 additions & 0 deletions src/gnome2/about_xiphos.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,10 @@ gui_create_about_xiphos(void)
gtk_about_dialog_set_comments
(GTK_ABOUT_DIALOG (about1),
_("(formerly known as GnomeSword)\n\nPowered by The SWORD Project.\nWe would like to thank Troy Griffitts and all the other folks who have given us The SWORD Project."));
#ifndef WIN32
gtk_about_dialog_set_website
(GTK_ABOUT_DIALOG (about1), "http://xiphos.org/");
#endif
gtk_about_dialog_set_authors
(GTK_ABOUT_DIALOG (about1), authors);
gtk_about_dialog_set_documenters
Expand Down
18 changes: 16 additions & 2 deletions src/main/display.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
#include <thmlhtmlhref.h>
#include <gbfhtmlhref.h>
#include <teihtmlhref.h>
#include <osisxhtml.h>
#include <thmlxhtml.h>
#include <gbfxhtml.h>

#include <osisvariants.h>
#include <thmlvariants.h>
Expand Down Expand Up @@ -644,7 +647,7 @@ CleanupContent(GString *text,
if ((reported = backend->get_entry_attribute("Footnote", "1", "n", false))) {
g_free(reported); // dispose of test junk.

#if 0
#ifdef NO_SWORD_SET_RENDER_NOTE_NUMBERS
//
// with recent engine change to auto-render
// note/xref markers, this is unneeded.
Expand Down Expand Up @@ -683,7 +686,7 @@ CleanupContent(GString *text,
// naïveté: if any verse uses 'n=', all do: reset for next verse.
if (reset)
footnote = 0;
#endif /* !0 */
#endif /* NO_SWORD_SET_RENDER_NOTE_NUMBERS */
}

// otherwise we simply count notes & xrefs through the verse.
Expand Down Expand Up @@ -756,6 +759,7 @@ set_morph_order(SWModule& imodule)
}
}

#ifndef NO_SWORD_SET_RENDER_NOTE_NUMBERS
void
set_render_numbers(SWModule& imodule, GLOBAL_OPS *ops)
{
Expand All @@ -775,8 +779,18 @@ set_render_numbers(SWModule& imodule, GLOBAL_OPS *ops)
TEIHTMLHREF *f4 = dynamic_cast<TEIHTMLHREF *>(*it);
if (f4)
f4->setRenderNoteNumbers((ops->xrefnotenumbers != 0));
OSISXHTML *f5 = dynamic_cast<OSISXHTML *>(*it);
if (f5)
f5->setRenderNoteNumbers((ops->xrefnotenumbers != 0));
ThMLXHTML *f6 = dynamic_cast<ThMLXHTML *>(*it);
if (f6)
f6->setRenderNoteNumbers((ops->xrefnotenumbers != 0));
GBFXHTML *f7 = dynamic_cast<GBFXHTML *>(*it);
if (f7)
f7->setRenderNoteNumbers((ops->xrefnotenumbers != 0));
}
}
#endif /* !NO_SWORD_SET_RENDER_NOTE_NUMBERS */

//
// display of commentary by chapter.
Expand Down

0 comments on commit 5914f34

Please sign in to comment.