rpms/xiphos/devel xiphos-jump-to-anchor-fix.patch, NONE, 1.1 xiphos.spec, 1.10, 1.11

Deji Akingunola deji at fedoraproject.org
Fri May 28 14:07:14 UTC 2010


Author: deji

Update of /cvs/pkgs/rpms/xiphos/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv6147

Modified Files:
	xiphos.spec 
Added Files:
	xiphos-jump-to-anchor-fix.patch 
Log Message:
* Fri May 28 2010 Deji Akingunola <dakingun at gmail.com> - 3.1.3-2
- Apply Karl Kleinpaste patch to fix the jump-to-anchor failure.


xiphos-jump-to-anchor-fix.patch:
 gnome2/utilities.c     |   27 +++++++++++++++++++++++++++
 main/export_passage.cc |    2 +-
 2 files changed, 28 insertions(+), 1 deletion(-)

--- NEW FILE xiphos-jump-to-anchor-fix.patch ---
--- src/main/export_passage.cc	2010-03-13 21:59:08.000000000 -0500
+++ src/main/export_passage.cc.new	2010-05-28 08:07:57.948935601 -0400
@@ -37,7 +37,7 @@
 #include "main/sword.h"
 
 
-#define HTML_START "<HTML><HEAD><META HTTP-EQUIV=\"content-type\" CONTENT=\"text/html; CHARSET=utf-8\"><STYLE TYPE=\"text/css\"><!-- A { text-decoration:none } %s --></STYLE></HEAD><BODY>"
+#define HTML_START "<html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"><style type=\"text/css\"><!-- A { text-decoration:none } %s --></style></head><body>"
 
 enum {
         TARGET_HTML,
--- src/gnome2/utilities.c	2010-03-19 13:01:57.000000000 -0400
+++ src/gnome2/utilities.c.new	2010-05-28 08:09:54.786105038 -0400
@@ -1202,6 +1202,33 @@
 		gtk_html_set_editable(html, FALSE);
 #endif
 
+#ifdef USE_GTKMOZEMBED
+	// EVIL EVIL EVIL EVIL.
+	// crazy nonsense with xulrunner 1.9.2.3, failure to jump to anchor.
+	// force the issue by stuffing a javascript snippet inside <head></head>.
+	// there are forms of evil so dark that they should not be contemplated.
+	if (anchor || settings.special_anchor) {
+		gchar *buf;
+
+		// first, scribble out everything up to the closing </head>.
+		buf = strstr(text, "</head>");	// yes, lowercase.
+		assert(buf != NULL);	// don't be so stupid as not to include <head></head>.
+		offset = buf - text;
+		gecko_html_write(html, text, offset);
+		len -= offset;
+
+		// now write the javascript snippet.
+		buf = g_strdup_printf(
+		    "<script type=\"text/javascript\" language=\"javascript\">"
+		    " window.onload = function () { window.location.hash = \"%s\"; }"
+		    " </script>", (settings.special_anchor
+				   ? settings.special_anchor
+				   : anchor));
+		gecko_html_write(html, buf, strlen(buf));
+		g_free(buf);
+	}
+#endif /* USE_GTKMOZEMBED */
+
 	// html widgets are uptight about being handed
 	// huge quantities of text -- producer/consumer problem,
 	// and we mustn't overload the receiver.  10k chunks.


Index: xiphos.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xiphos/devel/xiphos.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- xiphos.spec	25 Mar 2010 14:55:38 -0000	1.10
+++ xiphos.spec	28 May 2010 14:07:14 -0000	1.11
@@ -1,12 +1,13 @@
 Name:		xiphos 
 Version:	3.1.3
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	Bible study and research tool
 
 Group:		Applications/Text
 License:	GPLv2+
 URL:		http://xiphos.sourceforge.net/
 Source0:	http://downloads.sourceforge.net/gnomesword/xiphos-%{version}.tar.gz
+Patch0:		xiphos-jump-to-anchor-fix.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	sword-devel >= 1.5.11
@@ -33,6 +34,7 @@ Project and elsewhere.
 
 %prep
 %setup -q
+%patch0 -p0
 
 %build
 %configure
@@ -82,6 +84,9 @@ gtk-update-icon-cache %{_datadir}/icons/
 %_datadir/gnome/help/xiphos
 
 %changelog
+* Fri May 28 2010 Deji Akingunola <dakingun at gmail.com> - 3.1.3-2
+- Apply Karl Kleinpaste patch to fix the jump-to-anchor failure.
+
 * Tue Mar 23 2010 Deji Akingunola <dakingun at gmail.com> - 3.1.3-1
 - New upstream version
 



More information about the scm-commits mailing list