[rkward-cvs] SF.net SVN: rkward:[4368] trunk/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Mon Oct 15 11:31:43 UTC 2012

Revision: 4368
Author:   tfry
Date:     2012-10-15 11:31:42 +0000 (Mon, 15 Oct 2012)
Log Message:
Add parameter for addition of custom content to HTML header.

Modified Paths:

Modified: trunk/rkward/ChangeLog
--- trunk/rkward/ChangeLog	2012-10-15 10:58:42 UTC (rev 4367)
+++ trunk/rkward/ChangeLog	2012-10-15 11:31:42 UTC (rev 4368)
@@ -1,7 +1,11 @@
+- rk.set.output.html.file() gains argument to allow addition of custom content to the html header
+--- Version 0.6.0 - Oct-XX-2012
+- Fixed: Entering "0" as propabilities (quantiles) vector in distribution plugins would cause error message
 - Preview device windows will display some status information (most importantly, warnings or errors)
 - Most plot plugins gain options to control margins and tick label orientation
 - Added option for installing packages from source (implicitly enabled on Unixoid platforms)
-- Fixed: Wrong handling of carriage returns ('\r') in the console window				TODO: also fix for the command log and other places
+- Fixed: Wrong handling of carriage returns ('\r') in the console window
 - Fixed: Spinboxes had wrong initial values
 - Omit comments on missing function calls in dialog code windows (e.g., if prepare() is unused, there's no "## Prepare" in the output either)
 - Output markup is now more XHTML compliant and easier to parse
@@ -37,7 +41,7 @@
 - Fixed: On Windows, detached windows would sometimes be positioned with the menubar outside the upper screen edge
 - Added GUI support for inspecting the call stack during debugging
 - The backend executable is no longer linked against KDE libraries
-- Objects, which are not acceptable in a varslot, will still be shown, there, with a warning		TODO: add a UI to override
+- Objects, which are not acceptable in a varslot, will still be shown, there, with a warning
 --- Version 0.5.7 - Oct-23-2011
 - Fixed: Would not system-defined text color for argument hints

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.filename-functions.R
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.filename-functions.R	2012-10-15 10:58:42 UTC (rev 4367)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.filename-functions.R	2012-10-15 11:31:42 UTC (rev 4368)
@@ -25,6 +25,9 @@
 #' @param extension a string, used as a filename extension when saving images
 #'   to the output file
 #' @param x a string, giving the filename of the of the output file
+#' @param additional.header.contents NULL or an additional string to add to the HTML header section.
+#'        This could be scripts or additional CSS definitions, for example. Note that
+#'        @em nothing will be added to the header, if the file already exists.
 #' @return \code{rk.get.tempfile.name}, \code{rk.get.output.html.file}, and
 #'   \code{rk.get.workspace.url} return a string while
 #'   \code{rk.set.output.html.file} returns \code{NULL}.
@@ -70,7 +73,7 @@
 #' @export
 #' @rdname rk.get.tempfile.name
-"rk.set.output.html.file" <- function (x) {
+"rk.set.output.html.file" <- function (x, additional.header.contents = getOption ("rk.html.header.additions")) {
 	stopifnot (is.character (x))
 	assign (".rk.output.html.file", x, .rk.variables)
@@ -129,7 +132,9 @@
 		// -->\n\t</script>\n", sep=""))
 		# positioning of the TOC is done by CSS, default state is hidden
 		# see $SRC/rkward/pages/rkward_output.css
-		.rk.cat.output (paste ("</head>\n<body>\n", sep=""))
+		if (!is.null (additional.header.contents)) .rk.cat.output (as.character (additional.header.contents))
+		.rk.cat.output ("</head>\n<body>\n")
 		# This initial output mostly to indicate the output is really there, just empty for now
 		.rk.cat.output (paste ("<a name=\"top\"></a>\n<pre>RKWard output initialized on", .rk.date (), "</pre>\n"))
 		# an empty <div> where the TOC menu gets added to dynamically, and a second one to toggle show/hide

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

More information about the rkward-tracker mailing list