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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Feb 22 01:10:26 CET 2012


Author: prezez
Date: 2012-02-22 01:10:25 +0100 (Wed, 22 Feb 2012)
New Revision: 440

Modified:
   komodo/SciViews-K-dev/content/js/commands.js
   komodo/SciViews-K-dev/content/js/pref-R.js
   komodo/SciViews-K-dev/sciviewsk-1.1.3dev-ko.xpi
Log:
starting R on linux now is in default terminal emulator (x-terminal-emulator)


Modified: komodo/SciViews-K-dev/content/js/commands.js
===================================================================
--- komodo/SciViews-K-dev/content/js/commands.js	2012-02-21 13:27:42 UTC (rev 439)
+++ komodo/SciViews-K-dev/content/js/commands.js	2012-02-22 00:10:25 UTC (rev 440)
@@ -146,6 +146,8 @@
 		var cmd = sv.pref.getPref("svRCommand");
 		var runInConsole = false;
 
+		// sv.tools.file.whereIs("x-terminal-emulator")
+
 		var isWin = navigator.platform.indexOf("Win") === 0;
 		var id = sv.pref.getPref("svRApplication",
 			isWin? "r-gui" : "r-terminal");
@@ -159,14 +161,14 @@
 				if (!XEnv.has("DISPLAY"))	env.push("DISPLAY=:0");
 				delete(XEnv);
 			break;
-			case "r-terminal":
+			//case "r-terminal":
 				//runIn = "new-console";
-				runInConsole = true;
+				//runInConsole = true;
 			break;
 			default:
 		}
+		//alert(cmd);
 
-
 		var runSvc = Components.classes['@activestate.com/koRunService;1']
 			.getService(Components.interfaces.koIRunService);
 
@@ -533,7 +535,9 @@
 
 	loadSelection: function sv_loadPlacesSelection() {
 		var files = ko.places.manager.getSelectedItems()
-			.filter(function(x) (x.file.isLocal && x.file.ext.toLowerCase() == ".rdata"))
+			.filter(function(x) (x.file.isLocal &&
+				// for '.RData', .ext is ''
+				(x.file.ext || x.file.leafName).toLowerCase() == ".rdata"))
 			.map(function(x) x.file.path);
 		if (!files.length) return;
 		var cmd = files.map(function(x) "load('" +
@@ -543,7 +547,8 @@
 
 	get anyRDataFilesSelected()
 		ko.places.manager.getSelectedItems().some(
-			function(x) x.file.isLocal && x.file.ext.toLowerCase() == ".rdata")
+			function(x) x.file.isLocal &&
+			(x.file.ext || x.file.leafName).toLowerCase() == ".rdata")
 
 }
 

Modified: komodo/SciViews-K-dev/content/js/pref-R.js
===================================================================
--- komodo/SciViews-K-dev/content/js/pref-R.js	2012-02-21 13:27:42 UTC (rev 439)
+++ komodo/SciViews-K-dev/content/js/pref-R.js	2012-02-22 00:10:25 UTC (rev 440)
@@ -102,7 +102,7 @@
 
 var apps = [
 new _App("", "Choose...", "", "", "", "Lin,Mac,Win"),
-new _App("r-terminal", "in default terminal", "\"%Path%\" %args%", "R", "R", "Lin,Mac"),
+new _App("r-terminal", "in default terminal", "x-terminal-emulator -e '%Path% %args%'", "R", "x-terminal-emulator,R", "Lin,Mac"),
 new _App("r-terminal", "in console window", "\"%Path%\" %args%", "R.exe", "R", "Win"),
 new _App("r-gnome-term", "in Gnome terminal", "gnome-terminal --hide-menubar --working-directory='%cwd%' -t '%title%' -x '%Path%' %args%", "R", "gnome-terminal,R", "Lin"),
 new _App("r-kde-term", "in Konsole", "konsole --workdir '%cwd%' --title %title% -e \"%Path%\" %args%", "R", "konsole,R", "Lin"),

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



More information about the Sciviews-commits mailing list