[Sciviews-commits] r442 - in komodo/SciViews-K-dev: . content/js

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Feb 22 13:52:40 CET 2012


Author: prezez
Date: 2012-02-22 13:52:40 +0100 (Wed, 22 Feb 2012)
New Revision: 442

Modified:
   komodo/SciViews-K-dev/content/js/commands.js
   komodo/SciViews-K-dev/content/js/sciviews.js
   komodo/SciViews-K-dev/sciviewsk-1.1.3dev-ko.xpi
Log:
Typo in rserver.R corrected.
Display of options "load/source into R" in Places made conditional on sv.r.running == true.

Modified: komodo/SciViews-K-dev/content/js/commands.js
===================================================================
--- komodo/SciViews-K-dev/content/js/commands.js	2012-02-22 12:32:43 UTC (rev 441)
+++ komodo/SciViews-K-dev/content/js/commands.js	2012-02-22 12:52:40 UTC (rev 442)
@@ -519,21 +519,26 @@
 
 this.places = {
 	sourceSelection: function sv_sourcePlacesSelection() {
+		if(!sv.r.running) return;
 		var files = ko.places.manager.getSelectedItems()
 			.filter(function(x) (x.file.isLocal && x.file.ext.toLowerCase() == ".r"))
 			.map(function(x) x.file.path);
 		if (!files.length) return;
 		var cmd = files.map(function(x) "source('" +
 			sv.tools.string.addslashes(x) +"')" ).join("\n");
-		sv.rconn.eval(cmd, null, false);
+		sv.rconn.eval(cmd, function(z) {
+			sv.rbrowser.smartRefresh(true);
+			}, false);
 	},
 
 	get anyRFilesSelected()
+		sv.r.running &&
 		ko.places.manager.getSelectedItems().some(function(x)
 			x.file.isLocal &&
 			x.file.ext.toLowerCase() == ".r"),
 
 	loadSelection: function sv_loadPlacesSelection() {
+		if(!sv.r.running) return;
 		var files = ko.places.manager.getSelectedItems()
 			.filter(function(x) (x.file.isLocal &&
 				// for '.RData', .ext is ''
@@ -542,10 +547,13 @@
 		if (!files.length) return;
 		var cmd = files.map(function(x) "load('" +
 			sv.tools.string.addslashes(x) +"')" ).join("\n");
-		sv.rconn.eval(cmd, null, false);
+		sv.rconn.eval(cmd, function(z) {
+			sv.rbrowser.smartRefresh(true);
+			}, false);
 	},
 
 	get anyRDataFilesSelected()
+		sv.r.running &&
 		ko.places.manager.getSelectedItems().some(
 			function(x) x.file.isLocal &&
 			(x.file.ext || x.file.leafName).toLowerCase() == ".rdata")

Modified: komodo/SciViews-K-dev/content/js/sciviews.js
===================================================================
--- komodo/SciViews-K-dev/content/js/sciviews.js	2012-02-22 12:32:43 UTC (rev 441)
+++ komodo/SciViews-K-dev/content/js/sciviews.js	2012-02-22 12:52:40 UTC (rev 442)
@@ -84,9 +84,6 @@
 	Components.utils.import("resource://gre/modules/AddonManager.jsm");
 	AddonManager.getAddonByID("sciviewsk at sciviews.org", function(addon) {
 		sv._version = addon.version; });
-
-
-
 } catch(e) {
 	sv._version = Components.classes["@mozilla.org/extensions/manager;1"]
 	.getService(Components.interfaces.nsIExtensionManager)

Modified: komodo/SciViews-K-dev/sciviewsk-1.1.3dev-ko.xpi
===================================================================
(Binary files differ)



More information about the Sciviews-commits mailing list