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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Mon Mar 28 12:28:09 UTC 2011


Revision: 3499
          http://rkward.svn.sourceforge.net/rkward/?rev=3499&view=rev
Author:   tfry
Date:     2011-03-28 12:28:09 +0000 (Mon, 28 Mar 2011)

Log Message:
-----------
Fix saving workplace layout during exit.

Modified Paths:
--------------
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/public.R
    trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.workplace.Rd
    trunk/rkward/rkward/windows/rkworkplace.cpp

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/public.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/public.R	2011-03-25 13:02:04 UTC (rev 3498)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/public.R	2011-03-28 12:28:09 UTC (rev 3499)
@@ -133,13 +133,14 @@
 	.rk.do.call ("set.output.file", x);
 }
 
-"rk.save.workplace" <- function (file=NULL) {
+"rk.save.workplace" <- function (file=NULL, description=NULL) {
 	if (is.null (file)) {
 		file <- rk.get.workspace.url ()
 		if (is.null (file)) file <- rk.get.tempfile.name (prefix="unsaved", extension=".RData")
 		file <- paste (file, "rkworkplace", sep=".")
 	}
-	lines <- .rk.do.call ("workplace.layout", "get")
+	if (is.null (description)) lines <- .rk.do.call ("workplace.layout", "get")
+	else lines <- description
 	writeLines (lines, file)
 }
 

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.workplace.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.workplace.Rd	2011-03-25 13:02:04 UTC (rev 3498)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.workplace.Rd	2011-03-28 12:28:09 UTC (rev 3499)
@@ -8,12 +8,13 @@
 }
 
 \usage{
-rk.save.workplace(file=NULL)
+rk.save.workplace(file=NULL, description=NULL)
 rk.restore.workplace(file=NULL, close.windows=TRUE)
 }
 
 \arguments{
 \item{file}{a character string giving the url of the file to save to, or NULL for automatic selection of a suitable file (see Details).}
+\item{description}{For internal use, only. A character string describing the workplace status to save. Generally, you should leave this as the default value (\code{NULL]).}
 \item{close.windows}{a logical; whether current windows should be closed before restoring.}
 }
 

Modified: trunk/rkward/rkward/windows/rkworkplace.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkworkplace.cpp	2011-03-25 13:02:04 UTC (rev 3498)
+++ trunk/rkward/rkward/windows/rkworkplace.cpp	2011-03-28 12:28:09 UTC (rev 3499)
@@ -530,7 +530,7 @@
 	RK_TRACE (APP);
 	if (RKSettingsModuleGeneral::workplaceSaveMode () != RKSettingsModuleGeneral::SaveWorkplaceWithWorkspace) return;
 
-	RKGlobals::rInterface ()->issueCommand ("rk.save.workplace()", RCommand::App, i18n ("Save Workplace layout"), 0, 0, chain);
+	RKGlobals::rInterface ()->issueCommand ("rk.save.workplace(description=" + RObject::rQuote (makeWorkplaceDescription().join ("\n")) + ")", RCommand::App, i18n ("Save Workplace layout"), 0, 0, chain);
 }
 
 void RKWorkplace::restoreWorkplace (RCommandChain *chain) {


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