[Sciviews-commits] r371 - komodo/SciViews-K-dev/content/js

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Mar 28 19:49:13 CEST 2011


Author: prezez
Date: 2011-03-28 19:49:13 +0200 (Mon, 28 Mar 2011)
New Revision: 371

Modified:
   komodo/SciViews-K-dev/content/js/pref-R.js
   komodo/SciViews-K-dev/content/js/rconnection.js
Log:
Preferences: selection of R application modified
removed excessive 'onload' handler

Modified: komodo/SciViews-K-dev/content/js/pref-R.js
===================================================================
--- komodo/SciViews-K-dev/content/js/pref-R.js	2011-03-27 22:05:49 UTC (rev 370)
+++ komodo/SciViews-K-dev/content/js/pref-R.js	2011-03-28 17:49:13 UTC (rev 371)
@@ -133,10 +133,22 @@
 	for (var i in apps) tmp[apps[i].id] = apps[i];
 	apps = tmp;
 
+	var prefset = parent.hPrefWindow.prefset;
     var menu = document.getElementById("svRApplication");
     menu.removeAllItems();
     for (var i in apps) menu.appendItem(apps[i].name, i, null);
+	// Remove the 'Choose...' option on first showing
+	if(!prefset.getStringPref("svRApplication")) {
+		menu.addEventListener("popupshowing", function(event) {
+			if (menu.getItemAtIndex(0).value == '') menu.removeItemAt(0);
+		}, false);
+	} else {
+		menu.removeItemAt(0);
+	}
 
+
+
+
     // update cran mirror list (first local, then tries remote at CRAN)
 	if (!PrefR_UpdateCranMirrors(true)) PrefR_UpdateCranMirrors(false);
 

Modified: komodo/SciViews-K-dev/content/js/rconnection.js
===================================================================
--- komodo/SciViews-K-dev/content/js/rconnection.js	2011-03-27 22:05:49 UTC (rev 370)
+++ komodo/SciViews-K-dev/content/js/rconnection.js	2011-03-28 17:49:13 UTC (rev 371)
@@ -302,13 +302,6 @@
 }
 
 _updateSocketInfo();
-addEventListener("load", function() {
-	sv.command.updateRStatus(_this.testRAvailability(false));
-	_this.startSocketServer();
-}, false);
-
-
-
 this.cleanUp = function sv_conn_debugCleanup() {
 	["r-command-sent", "r-command-executed", "r-command-chunk",
 	 'r-server-stopped'].forEach(function(notification) {



More information about the Sciviews-commits mailing list