[Sciviews-commits] r557 - in pkg: SciViews SciViews/R svDialogs svDialogs/inst svDialogs/man svDoc svDoc/R svDoc/man svHttp svHttp/R svHttp/inst svHttp/man svKomodo svKomodo/R svKomodo/inst svKomodo/man svMisc/R tcltk2 tcltk2/R tcltk2/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Feb 5 13:39:03 CET 2015


Author: phgrosjean
Date: 2015-02-05 13:39:02 +0100 (Thu, 05 Feb 2015)
New Revision: 557

Modified:
   pkg/SciViews/NAMESPACE
   pkg/SciViews/R/graphics.R
   pkg/SciViews/R/misc.R
   pkg/svDialogs/DESCRIPTION
   pkg/svDialogs/NEWS
   pkg/svDialogs/inst/NEWS.Rd
   pkg/svDialogs/man/svDialogs-package.Rd
   pkg/svDoc/DESCRIPTION
   pkg/svDoc/NEWS
   pkg/svDoc/R/asciidoc.R
   pkg/svDoc/TODO
   pkg/svDoc/man/svDoc-package.Rd
   pkg/svHttp/DESCRIPTION
   pkg/svHttp/NEWS
   pkg/svHttp/R/httpServer.R
   pkg/svHttp/inst/NEWS.Rd
   pkg/svHttp/man/svHttp-package.Rd
   pkg/svKomodo/DESCRIPTION
   pkg/svKomodo/NEWS
   pkg/svKomodo/R/svKomodo-internal.R
   pkg/svKomodo/inst/NEWS.Rd
   pkg/svKomodo/man/svKomodo-package.Rd
   pkg/svMisc/R/listMethods.R
   pkg/tcltk2/DESCRIPTION
   pkg/tcltk2/NEWS
   pkg/tcltk2/R/tk2widgets.R
   pkg/tcltk2/man/tcltk2-package.Rd
   pkg/tcltk2/man/tk2widgets.Rd
Log:
Various package updates

Modified: pkg/SciViews/NAMESPACE
===================================================================
--- pkg/SciViews/NAMESPACE	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/SciViews/NAMESPACE	2015-02-05 12:39:02 UTC (rev 557)
@@ -100,9 +100,6 @@
 	   "!",
 	   "@",
 	   "@<-",
-	   "@:=",
-	   ":=",
-	   "=",
 	   "%:%",
 	   "%else%",
 	   isEmpty,

Modified: pkg/SciViews/R/graphics.R
===================================================================
--- pkg/SciViews/R/graphics.R	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/SciViews/R/graphics.R	2015-02-05 12:39:02 UTC (rev 557)
@@ -323,6 +323,7 @@
 ## Color management
 #palette() # get or set the color palette
 #colors() and colours() for a list of color names
+## TODO: wrong name? colorToRgb?
 color2rgb <- .Recode(grDevices::col2rgb) # convert colors to rgb
 #rgb()
 #rgb2hsv()
@@ -404,7 +405,7 @@
 #n2mfrow() computes sensible mfrow from number of graphs
 # + .ps.prolog
 
-## Dynamite plot by Samule Brown
+## Dynamite plot by Samuel Brown
 ## http://www.r-bloggers.com/dynamite-plots-in-r/
 ## Much critisize! See http://emdbolker.wikidot.com/blog%3Adynamite
 ## http://pablomarin-garcia.blogspot.co.nz/2010/02/why-dynamite-plots-are-bad.html

Modified: pkg/SciViews/R/misc.R
===================================================================
--- pkg/SciViews/R/misc.R	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/SciViews/R/misc.R	2015-02-05 12:39:02 UTC (rev 557)
@@ -42,18 +42,18 @@
 
 ## Warn when using = instead of <- for assignation...
 ## if option warnAssignWithEqualSign is TRUE
-`=` <- function(x, value)
-{
-	if (isTRUE(getOption("warnAssignWithEqualSign")))
-		warning("Use <- instead of = for assignation, or use == for equalty test")
-	assign(deparse(substitute(x)), value, envir = parent.frame())
-}
+## NOTE: names(x) <- "a" assigns "a" to `names(x)` => this is wrong!
+#`=` <- function(x, value)
+#{
+#	if (isTRUE(getOption("warnAssignWithEqualSign")))
+#		warning("Use <- instead of = for assignation, or use == for equality test")
+#	assign(deparse(substitute(x)), value, envir = parent.frame())
+#}
 
 # is.wholenumber(), see ?as.integer => define isWholeInt?
 
-## A convenient starting object for holding items: . == .GlobalEnv
-## TODO: take care there is no clash with proto objects!
-#. <- base::.GlobalEnv
+## A convenient starting object for holding items: .. == .GlobalEnv
+#.. <- base::.GlobalEnv
 
 ## Testing is.null(obj) is not enough to decide if an object is empty, because
 ## there may be like numeric(0), character(0), etc. The right way to do so is
@@ -239,6 +239,7 @@
 
 ## Reuse `@<-` to set attribute from a non S4 object
 ## TODO: also use it for S4 object, in the case a slot is not defined
+## TODO: reduce the number of copies done here!
 `@<-` <- function (x, which, value)
 {
 	arg <- substitute(which)
@@ -255,19 +256,20 @@
 ## TODO: we need also something like that for S4 slots!
 ## Since they really are attributes with checking, check first, and then,
 ## use setattr(), and it is done!
-`@:=` <- function (x, which, value)
-{
-	arg <- substitute(which)
-    if (is.name(arg)) which <- as.character(arg)
-	if (isS4(x)) {
-		## TODO: we need an assign by reference function for S4 slots here
-		`slot<-`(x, which, TRUE, value)
-	} else {
-		## TODO: use setattr() from data.table, but we don't want to depend on all this stuff!!!
-		#setattr(x, which, value)
-		`attr<-`(x, which, value)
-	}
-}
+## This does not quite work yet, nor :=
+#`@:=` <- function (x, which, value)
+#{
+#	arg <- substitute(which)
+#    if (is.name(arg)) which <- as.character(arg)
+#	if (isS4(x)) {
+#		## TODO: we need an assign by reference function for S4 slots here
+#		`slot<-`(x, which, TRUE, value)
+#	} else {
+#		## TODO: use setattr() from data.table, but we don't want to depend on all this stuff!!!
+#		#setattr(x, which, value)
+#		`attr<-`(x, which, value)
+#	}
+#}
 
 ## TODO: `[:=`, `$:=` and `[[:=`
 ## This does not work...
@@ -279,51 +281,60 @@
 ## like fun(x) <- value calls `fun<-`
 ## TODO: a validation mechanism for the value passed to the function?
 ## TODO: use alist() instead of list()!!!
-`:=` <- function (x, value) {
-	call <- match.call()
-	X <- substitute(x)
-	## pairlist() because NULL would be lost using list()
-	value <- pairlist(value = value)
-	## In case single name, do the same as x[] <- value, i.e., keeping size
-	## and attributes of x ("replacement inside x")
-	if (length(X) == 1) {
-#		tryCatch(do.call("[<-", c(list(x = X), value), envir = parent.frame(1)),
-#			error = function (e) {
-#				## Construct a call that is closer to the actual syntax!
-#				e$call <- paste(deparse(call[[2]]), ":=", deparse(call[[3]]))
-#				stop(e)
-#			})
-		stop(":= cannot be used directly on an object")
-	}
-	## If a more complex call is provided, try to run `fun:=` instead
-	X <- as.pairlist(substitute(X))
-	## To emulate `fun<-`, but using `fun:=`
-	fun <- paste(deparse(X[[1]]), ":=", sep = "")
-	X[[1]] <- NULL
-	## Use tryCatch() to ensure a better error message is issued
-	tryCatch(do.call(fun, c(X, value), envir = parent.frame(1)),
-		error = function (e) {
-			## Construct a call that is closer to the actual syntax!
-			e$call <- paste(deparse(call[[2]]), ":=", deparse(call[[3]]))
-			stop(e)
-		})
-	## Like for `fun<-`, value is returned invisibly, probably to allow
-	## something like x <- y[2] <- value
-	return(invisible(value))
-}
+## TODO: this does not work as expected!
+#`:=` <- function (x, value) {
+#	call <- match.call()
+#	X <- substitute(x)
+#	## pairlist() because NULL would be lost using list()
+#	value <- pairlist(value = value)
+#	## In case single name, do the same as x[] <- value, i.e., keeping size
+#	## and attributes of x ("replacement inside x")
+#	if (length(X) == 1) {
+##		tryCatch(do.call("[<-", c(list(x = X), value), envir = parent.frame(1)),
+##			error = function (e) {
+##				## Construct a call that is closer to the actual syntax!
+##				e$call <- paste(deparse(call[[2]]), ":=", deparse(call[[3]]))
+##				stop(e)
+##			})
+#		stop(":= cannot be used directly on an object")
+#	}
+#	## If a more complex call is provided, try to run `fun:=` instead
+#	X <- as.pairlist(substitute(X))
+#	## To emulate `fun<-`, but using `fun:=`
+#	fun <- paste(deparse(X[[1]]), ":=", sep = "")
+#	X[[1]] <- NULL
+#	## Use tryCatch() to ensure a better error message is issued
+#	tryCatch(assign(deparse(X[[1]]), do.call(fun, c(X, value),
+#		envir = parent.frame(1))),
+#		error = function (e) {
+#			## Construct a call that is closer to the actual syntax!
+#			e$call <- paste(deparse(call[[2]]), ":=", deparse(call[[3]]))
+#			stop(e)
+#		})
+#	## Like for `fun<-`, value is returned invisibly, probably to allow
+#	## something like x <- y[2] <- value
+#	invisible(value)
+#}
 
 ## I don't like much system.time(), first because it returns 3 numbers where
 ## we want most of the time only one, and second because it creates a new
 ## object proc_time, where a difftime object should be perfectly suitable
-## => new function elapsed()
+## => new function timing(). It also replaces the synonym unix.time() and
+## the other function proc.time() when called without an expression.
 timing <- function (expr, gc.first = TRUE)
 {
-	res <- system.time(expr, gcFirst = gc.first)
+	if (missing(expr)) {
+		res <- proc.time()
+	} else {
+		res <- system.time(expr, gcFirst = gc.first)
+	}
 	## Results split into result and details
-	details <- as.difftime(res[c("user.self", "sys.self")], units = "secs")
-	details at names := c("user", "system")
-	res <- as.difftime(res["elapsed"], units = "secs")
-	res at details := details
+	#details <- as.difftime(res[c("user.self", "sys.self")], units = "secs")
+	#details at names <- c("user", "system")
+	details <- as.difftime(res, units = "secs")
+	#res <- as.difftime(res["elapsed"], units = "secs")
+	res <- details["elapsed"]
+	res at details <- details
 	return(res)
 }
 ## Test...

Modified: pkg/svDialogs/DESCRIPTION
===================================================================
--- pkg/svDialogs/DESCRIPTION	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svDialogs/DESCRIPTION	2015-02-05 12:39:02 UTC (rev 557)
@@ -1,14 +1,14 @@
 Package: svDialogs
 Type: Package
-Version: 0.9-56
-Date: 2014-10-03
+Version: 0.9-57
+Date: 2014-12-19
 Title: SciViews GUI API - Dialog boxes
 Author: Philippe Grosjean [aut, cre]
 Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"),
   email = "phgrosjean at sciviews.org"))
 Maintainer: Philippe Grosjean <phgrosjean at sciviews.org>
 Depends: R (>= 2.6.0), svGUI (>= 0.9-52)
-SystemRequirements: TODO!!!
+SystemRequirements: zenity
 Description: Rapidly construct dialog boxes for your GUI, including an automatic
   function assistant
 License: GPL-2

Modified: pkg/svDialogs/NEWS
===================================================================
--- pkg/svDialogs/NEWS	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svDialogs/NEWS	2015-02-05 12:39:02 UTC (rev 557)
@@ -1,5 +1,10 @@
 = svDialogs News
 
+== Changes in svDialogs 0.9-57
+
+* Added requirements (zenity) in the DESCRIPTION file.
+  
+
 == Changes in svDialogs 0.9-56
 
 * The native Mac dialogs did not work any more, solved for 10.5 Leopard and

Modified: pkg/svDialogs/inst/NEWS.Rd
===================================================================
--- pkg/svDialogs/inst/NEWS.Rd	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svDialogs/inst/NEWS.Rd	2015-02-05 12:39:02 UTC (rev 557)
@@ -1,6 +1,12 @@
 \name{NEWS}
 \title{NEWS file for the svDialogs package}
 
+\section{Changes in version 0.9-57}{
+	\itemize{
+		\item{ Added requirements (zenity) in the DESCRIPTION file. }
+	}
+}
+
 \section{Changes in version 0.9-56}{
 	\itemize{
 		\item{ The native Mac dialogs did not work any more, solved for 10.5

Modified: pkg/svDialogs/man/svDialogs-package.Rd
===================================================================
--- pkg/svDialogs/man/svDialogs-package.Rd	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svDialogs/man/svDialogs-package.Rd	2015-02-05 12:39:02 UTC (rev 557)
@@ -12,8 +12,8 @@
   \tabular{ll}{
     Package: \tab svDialogs\cr
     Type: \tab Package\cr
-    Version: \tab 0.9-56\cr
-    Date: \tab 2014-10-03\cr
+    Version: \tab 0.9-57\cr
+    Date: \tab 2014-12-19\cr
     License: \tab GPL 2 or above, at your convenience\cr
   }
   % TODO: add description of main functions here. Also add examples

Modified: pkg/svDoc/DESCRIPTION
===================================================================
--- pkg/svDoc/DESCRIPTION	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svDoc/DESCRIPTION	2015-02-05 12:39:02 UTC (rev 557)
@@ -1,7 +1,7 @@
 Package: svDoc
 Type: Package
-Version: 0.9-10
-Date: 2014-03-03
+Version: 0.9-11
+Date: 2014-12-10
 Title: SciViews GUI API - svDoc functions
 Author: Philippe Grosjean [aut, cre]
 Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"),

Modified: pkg/svDoc/NEWS
===================================================================
--- pkg/svDoc/NEWS	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svDoc/NEWS	2015-02-05 12:39:02 UTC (rev 557)
@@ -1,5 +1,12 @@
 = svDoc News
 
+== Changes in svDoc 0.9-11
+
+* Added Asciidoc backend for producing a flat ODT documents, readable by
+  OpenOffice 3 or higher (but with a .odt extension).
+
+
+
 == Changes in svDoc 0.9-10
 
 * AsciiDoc updates to version 8.6.9 (november 2013)

Modified: pkg/svDoc/R/asciidoc.R
===================================================================
--- pkg/svDoc/R/asciidoc.R	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svDoc/R/asciidoc.R	2015-02-05 12:39:02 UTC (rev 557)
@@ -277,8 +277,9 @@
 		docbook = "xml",
 		docbook45 = "xml",
 		latex = "tex",
+		odt = "odt",
 		stop("Unknown format,",
-			" use html/html4/html5/slidy/slidy2/wordpress/docbook/latex")
+			" use html/html4/html5/slidy/slidy2/wordpress/docbook/latex/odt")
 		)
 	EndFile <- .fileExt(TxtFile, EndExt)
 		
@@ -389,6 +390,13 @@
 	## Use AsciiDoc to convert the .txt file into an .html file
 	cat("Running asciidoc to create ", basename(EndFile), "\n", sep = "")
 	system(paste('"', python, '" "', asciidoc, opts, TxtFile, '"', sep = ""))
+	
+	## Special case for 'odt': the file created has .fodt extension
+	## and we want to rename it with an .odt extension
+	if (format == "odt") {
+		TempFile <- sub("\\.fodt$", ".odt", EndFile)
+		if (file.exists(TempFile)) file.rename(TempFile, EndFile)
+	}
 		
 	## If there is a finalize code for this theme, run it now
 	## TODO...

Modified: pkg/svDoc/TODO
===================================================================
--- pkg/svDoc/TODO	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svDoc/TODO	2015-02-05 12:39:02 UTC (rev 557)
@@ -1,5 +1,7 @@
 = svDoc - To do list
 
+* Other styles than sciviews for ODT export
+
 * Add and support a syntax for line break (and page break?)
 
 * Check styles for paragraphs

Modified: pkg/svDoc/man/svDoc-package.Rd
===================================================================
--- pkg/svDoc/man/svDoc-package.Rd	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svDoc/man/svDoc-package.Rd	2015-02-05 12:39:02 UTC (rev 557)
@@ -12,8 +12,8 @@
   \tabular{ll}{
     Package: \tab svDoc\cr
     Type: \tab Package\cr
-    Version: \tab 0.9-10\cr
-    Date: \tab 2014-03-03\cr
+    Version: \tab 0.9-11\cr
+    Date: \tab 2014-12-10\cr
     License: \tab GPL 2 or above, at your convenience\cr
   }
   % TODO: add description of main functions here. Also add examples

Modified: pkg/svHttp/DESCRIPTION
===================================================================
--- pkg/svHttp/DESCRIPTION	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svHttp/DESCRIPTION	2015-02-05 12:39:02 UTC (rev 557)
@@ -1,7 +1,7 @@
 Package: svHttp
 Type: Package
-Version: 0.9-55
-Date: 2014-03-01
+Version: 0.9-56
+Date: 2015-02-05
 Title: SciViews GUI API - R HTTP server
 Author: Philippe Grosjean [aut, cre]
 Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"),

Modified: pkg/svHttp/NEWS
===================================================================
--- pkg/svHttp/NEWS	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svHttp/NEWS	2015-02-05 12:39:02 UTC (rev 557)
@@ -1,7 +1,13 @@
 = svHttp News
 
-== Changes in svHttp 0.9-54
+== Changes in svHttp 0.9-56
 
+* Starting from R revision >= 67550, the HTML help port is now retrieved using
+  tools::startDynamicHelp(NA).
+  
+
+== Changes in svHttp 0.9-55
+
 * LICENSE file eliminated.
 
 * No more use of ::: (not allowed by CRAN).

Modified: pkg/svHttp/R/httpServer.R
===================================================================
--- pkg/svHttp/R/httpServer.R	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svHttp/R/httpServer.R	2015-02-05 12:39:02 UTC (rev 557)
@@ -21,7 +21,11 @@
 		## This port is stored in 'ko.serve' option
 		options(ko.serve = port)
 		## If the server is running on another port, restart it now
-		curport <- getNamespace("tools")$httpdPort
+		if (R.Version()$`svn rev` >= 67550) {
+			curport <- tools::startDynamicHelp(NA)
+		} else {
+			curport <- getNamespace("tools")$httpdPort
+		}
 		if (curport > 0 && curport != port) startHttpServer(port = port)
 		return(port)
 	} else {  # Get the server port
@@ -132,27 +136,48 @@
 		stop("'port' must be a positive integer!")
 	port <- as.integer(round(port[1]))
 	## The port on which the server currently runs
-	curport <- getNamespace("tools")$httpdPort
-	
-	## Can we run the server?
-	if (curport == -1L || nzchar(Sys.getenv("R_DISABLE_HTTPD")))
-		stop("R http server is disabled or cannot start")
-	
-	## If it is currently running, stop it now
-	if (curport != 0L) {
-		if (curport != port)
-			warning("R http server currently running on port ", curport,
-				" and is restarted on port ", port, immediate. = TRUE)
-		curport <- stopHttpServer()
-	}
-	
-	## Start the http server on the right port
-	if (curport == 0L) {
+	if (R.Version()$`svn rev` >= 67550) {
 		oports <- getOption("help.ports")
 		(on.exit(options(help.ports = oports)))
 		options(help.ports = port)
-		curport <- tools::startDynamicHelp()
-	} else stop("Unable to start the http server")
+		curport <- tools::startDynamicHelp(NA)
+		
+		## Can we run the server?
+		if (curport == -1L || nzchar(Sys.getenv("R_DISABLE_HTTPD")))
+			stop("R http server is disabled or cannot start")
+		
+		## If curport is not the right one, try restarting
+		if (curport != 0L) {
+			if (curport != port)
+				warning("R http server currently running on port ", curport,
+					" and is restarted on port ", port, immediate. = TRUE)
+			stopHttpServer()
+			curport <- tools::startDynamicHelp(TRUE)
+		}
+		
+	} else { # Old code before startDynamicHelp(NA)
+		curport <- getNamespace("tools")$httpdPort
+		
+		## Can we run the server?
+		if (curport == -1L || nzchar(Sys.getenv("R_DISABLE_HTTPD")))
+			stop("R http server is disabled or cannot start")
+		
+		## If it is currently running, stop it now
+		if (curport != 0L) {
+			if (curport != port)
+				warning("R http server currently running on port ", curport,
+					" and is restarted on port ", port, immediate. = TRUE)
+			curport <- stopHttpServer()
+		}
+		
+		## Start the http server on the right port
+		if (curport == 0L) {
+			oports <- getOption("help.ports")
+			(on.exit(options(help.ports = oports)))
+			options(help.ports = port)
+			curport <- tools::startDynamicHelp()
+		} else stop("Unable to start the http server")
+	}
 	
 	## Is the HTTP server running on the right port now?
 	if (curport == port) {

Modified: pkg/svHttp/inst/NEWS.Rd
===================================================================
--- pkg/svHttp/inst/NEWS.Rd	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svHttp/inst/NEWS.Rd	2015-02-05 12:39:02 UTC (rev 557)
@@ -1,11 +1,25 @@
 \name{NEWS}
 \title{NEWS file for the svHttp package}
 
+\section{Changes in version 0.9-56}{
+	\itemize{
+    \item{ Starting from R revision >= 67550, the HTML help port is now
+		retrieved using \code{tools::startDynamicHelp(NA)}. }
+  }
+}
+
+\section{Changes in version 0.9-55}{
+	\itemize{
+    \item{ LICENSE file eliminated. }
+	\item{ No more use of ::: (not allowed by CRAN). }
+  }
+}
+
 \section{Changes in version 0.9-54}{
 	\itemize{
     \item{ NEWS file reworked to use the new Rd format. }
 	\item{ Temporary data are now saved in SciViews:TempEnv environment
-	  (was TempEnv), and one thus needs     s svMisc >= 0.9-68. }
+	  (was TempEnv), and one thus needs svMisc >= 0.9-68. }
   }
 }
 

Modified: pkg/svHttp/man/svHttp-package.Rd
===================================================================
--- pkg/svHttp/man/svHttp-package.Rd	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svHttp/man/svHttp-package.Rd	2015-02-05 12:39:02 UTC (rev 557)
@@ -14,8 +14,8 @@
   \tabular{ll}{
     Package: \tab svHttp\cr
     Type: \tab Package\cr
-    Version: \tab 0.9-55\cr
-    Date: \tab 2012-03-01\cr
+    Version: \tab 0.9-56\cr
+    Date: \tab 2015-02-05\cr
     License: \tab GPL 2 or above, at your convenience\cr
   }
   % TODO: add description of main functions here. Also add examples

Modified: pkg/svKomodo/DESCRIPTION
===================================================================
--- pkg/svKomodo/DESCRIPTION	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svKomodo/DESCRIPTION	2015-02-05 12:39:02 UTC (rev 557)
@@ -1,7 +1,7 @@
 Package: svKomodo
 Type: Package
-Version: 0.9-62
-Date: 2014-03-01
+Version: 0.9-63
+Date: 2015-02-05
 Title: SciViews GUI API - Functions to interface with Komodo Edit/IDE
 Author: Philippe Grosjean [aut, cre]
 Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"),

Modified: pkg/svKomodo/NEWS
===================================================================
--- pkg/svKomodo/NEWS	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svKomodo/NEWS	2015-02-05 12:39:02 UTC (rev 557)
@@ -1,5 +1,11 @@
 = svKomodo News
 
+== Changes in svKomodo 0.9-63
+
+* Starting from R revision >= 67550, the HTML help port is now retrieved using
+  tools::startDynamicHelp(NA).
+
+
 == Changes in svKomodo 0.9-62
 
 * Author field rebuild in DESCRIPTION file

Modified: pkg/svKomodo/R/svKomodo-internal.R
===================================================================
--- pkg/svKomodo/R/svKomodo-internal.R	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svKomodo/R/svKomodo-internal.R	2015-02-05 12:39:02 UTC (rev 557)
@@ -141,10 +141,10 @@
 	req <- require
 	if (type == "http") {
 		req("svHttp", character.only = TRUE, lib.loc = lib)
-		if (interactive()) try(startHttpServer())
+		if (interactive()) try(svHttp::startHttpServer())
 	} else {
 		req("svSocket", character.only = TRUE, lib.loc = lib)
-		if (interactive()) try(startSocketServer())
+		if (interactive()) try(svSocket::startSocketServer())
 	}
 		
 	## This comes from svStart... and should really be placed here indeed!
@@ -276,7 +276,11 @@
 	port <- try(tools::startDynamicHelp(), silent = TRUE)
 	if (inherits(port, "try-error")) {
 		## Dynamic help is already started
-		port <- getNamespace("tools")$httpdPort
+		if (R.Version()$`svn rev` >= 67550) {
+			port <- tools::startDynamicHelp(NA)
+		} else {
+			port <- getNamespace("tools")$httpdPort
+		}
 	}
 	## Record the home page for the help server in an option
 	options(helphome = paste("http://127.0.0.1:", port,
@@ -289,14 +293,20 @@
 		if (length(file) == 0) return("")
 		## Extension ".html" may be missing
 		htmlfile <- basename(file)
+		## Get the HTML help server port
+		if (R.Version()$`svn rev` >= 67550) {
+			port <- tools::startDynamicHelp(NA)
+		} else {
+			port <- getNamespace("tools")$httpdPort
+		}
 		if (length(file) > 1) {
 			## If more then one topic is found
-			paste("http://127.0.0.1:", getNamespace("tools")$httpdPort,
+			paste("http://127.0.0.1:", port,
 				"/library/NULL/help/", attr(x,"topic"), sep = "")
 		} else {
 			if(substring(htmlfile, nchar(htmlfile) -4) != ".html")
 				htmlfile <- paste(htmlfile, ".html", sep="")
-			paste("http://127.0.0.1:", getNamespace("tools")$httpdPort,
+			paste("http://127.0.0.1:", port,
 			"/library/", basename(dirname(dirname(file))),
 			"/html/", htmlfile, sep = "")
 		}

Modified: pkg/svKomodo/inst/NEWS.Rd
===================================================================
--- pkg/svKomodo/inst/NEWS.Rd	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svKomodo/inst/NEWS.Rd	2015-02-05 12:39:02 UTC (rev 557)
@@ -3,6 +3,13 @@
 
 \section{Changes in version 0.9-62}{
   \itemize{
+    \item{ Starting from R revision >= 67550, the HTML help port is now retrieved using
+      tools::startDynamicHelp(NA). }
+  }
+}
+
+\section{Changes in version 0.9-62}{
+  \itemize{
     \item{ Author field rebuild in DESCRIPTION file }
     \item{ \code{.onAttach()} reworked to eliminate \code{:::} (not allowed by CRAN) }
 	\item{ \code{utils::rc.settings} are adjusted in \code{.onAttach()} and
@@ -10,7 +17,6 @@
   }
 }
 
-
 \section{Changes in version 0.9-61}{
   \itemize{
     \item{ Simplification of internal code to get Komodo location. It does not require

Modified: pkg/svKomodo/man/svKomodo-package.Rd
===================================================================
--- pkg/svKomodo/man/svKomodo-package.Rd	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svKomodo/man/svKomodo-package.Rd	2015-02-05 12:39:02 UTC (rev 557)
@@ -13,8 +13,8 @@
   \tabular{ll}{
     Package: \tab svKomodo\cr
     Type: \tab Package\cr
-    Version: \tab 0.9-62\cr
-    Date: \tab 2014-03-01\cr
+    Version: \tab 0.9-63\cr
+    Date: \tab 2015-02-05\cr
     License: \tab GPL 2 or above, at your convenience\cr
   }
   % TODO: add description of main functions here. Also add examples

Modified: pkg/svMisc/R/listMethods.R
===================================================================
--- pkg/svMisc/R/listMethods.R	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/svMisc/R/listMethods.R	2015-02-05 12:39:02 UTC (rev 557)
@@ -6,7 +6,7 @@
 
 	## Check argument
 	if (!inherits(f, "character"))
-		stop("'f' must ba a character string!")
+		stop("'f' must be a character string!")
 
 	## List methods for a given class
 	if (!is.null(class)) {

Modified: pkg/tcltk2/DESCRIPTION
===================================================================
--- pkg/tcltk2/DESCRIPTION	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/tcltk2/DESCRIPTION	2015-02-05 12:39:02 UTC (rev 557)
@@ -1,7 +1,7 @@
 Package: tcltk2
 Type: Package
-Version: 1.2-10
-Date: 2014-03-02
+Version: 1.2-11
+Date: 2014-12-19
 Title: Tcl/Tk Additions
 Author: Philippe Grosjean [aut, cre]
 Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"),

Modified: pkg/tcltk2/NEWS
===================================================================
--- pkg/tcltk2/NEWS	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/tcltk2/NEWS	2015-02-05 12:39:02 UTC (rev 557)
@@ -1,5 +1,17 @@
 = tcltk2 news
 
+== Version 1.2-11
+
+* After a problem for active menu items not displayed in a contrasted color on
+  some platforms, tk2menu() function receives two new arguments:
+  activebackground and activeforeground, but reasonable colors are used in case
+  these are not provided, with a fallback to white on darkblue in case it is not
+  possible to determine the color used for the current theme. That color is
+  *not* change when the theme is changed of existing menu items (but it is for
+  future menu items). This is due to the fact that Tk menus do not follow the
+  ttk styling scheme.
+  
+
 == Version 1.2-10
 
 * Reworked Author field in the DESCRIPTION file.

Modified: pkg/tcltk2/R/tk2widgets.R
===================================================================
--- pkg/tcltk2/R/tk2widgets.R	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/tcltk2/R/tk2widgets.R	2015-02-05 12:39:02 UTC (rev 557)
@@ -255,14 +255,31 @@
 	return(w)
 }
 
-tk2menu <- function (parent, ...)
+#tk2menu <- function (parent, ...)
+#{
+#	if (!is.ttk()) stop("Tcl/Tk >= 8.5 is required")
+#	w <- tkwidget(parent, "menu", ...)
+#	class(w) <- c("tk2menu", "tk2widget", class(w))
+#	return(w)
+#}
+
+tk2menu <- function (parent, activebackground, activeforeground, ...) 
 {
-	if (!is.ttk()) stop("Tcl/Tk >= 8.5 is required")
-	w <- tkwidget(parent, "menu", ...)
-	class(w) <- c("tk2menu", "tk2widget", class(w))
-	return(w)
+    if (!is.ttk()) stop("Tcl/Tk >= 8.5 is required")
+    w <- tkwidget(parent, "menu", ...)
+    if (missing(activebackground))
+		activebackground <- tk2style("tk2button", "selectbackground")
+    if (activebackground == "") activebackground = "darkblue" # Default value
+    if (missing(activeforeground))
+		activeforeground <- tk2style("tk2button", "selectforeground")
+    if (activeforeground == "") activeforeground = "white" # Default value
+    tkconfigure(w, activebackground = activebackground,
+		activeforeground = activeforeground)
+    class(w) <- c("tk2menu", "tk2widget", class(w))
+    return(w)
 }
 
+
 tk2menubutton <- function (parent, tip = "", ...)
 {
 	if (!is.ttk()) stop("Tcl/Tk >= 8.5 is required")

Modified: pkg/tcltk2/man/tcltk2-package.Rd
===================================================================
--- pkg/tcltk2/man/tcltk2-package.Rd	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/tcltk2/man/tcltk2-package.Rd	2015-02-05 12:39:02 UTC (rev 557)
@@ -16,8 +16,8 @@
 \tabular{ll}{
 Package: \tab tcltk2\cr
 Type: \tab Package\cr
-Version: \tab 1.2-10\cr
-Date: \tab 2014-03-02\cr
+Version: \tab 1.2-11\cr
+Date: \tab 2014-12-19\cr
 License: \tab LGPL-3 plus see LICENSE file\cr
 LazyLoad: \tab yes\cr
 }

Modified: pkg/tcltk2/man/tk2widgets.Rd
===================================================================
--- pkg/tcltk2/man/tk2widgets.Rd	2015-02-05 12:38:12 UTC (rev 556)
+++ pkg/tcltk2/man/tk2widgets.Rd	2015-02-05 12:39:02 UTC (rev 557)
@@ -44,7 +44,7 @@
     "browse", "multiple"), height = 5, tip = "", scroll = "both",
     autoscroll = "x", enabled = TRUE, \dots)
 tk2mclistbox(parent, tip ="", \dots)
-tk2menu(parent, \dots)
+tk2menu(parent, activebackground, activeforeground, \dots)
 tk2menubutton(parent, tip = "", \dots)
 tk2message(parent, text = "", justify = c("left", "center", "right"),
     width = -1, aspect = 150, tip = "", \dots)
@@ -91,6 +91,10 @@
   \item{aspect}{ sets the aspect ratio of the widget (100 = square, 200 = twice as large,
     50 = twice as tall). Only used if \code{width} is negative. }
   \item{orientation}{ either \code{"horizontal"} or \code{"vertical"}. }
+  \item{activebackground}{ color to use for active background of menu items (if
+    not provided, a reasonable default value is used). }
+  \item{activeforeground}{ color to use for active foreground of menu items (if
+    not provided, a reasonable default value is used). }
   \item{\dots}{ further arguments passed to the widget. }
 }
 



More information about the Sciviews-commits mailing list