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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Thu Nov 29 12:57:44 UTC 2012


Revision: 4471
          http://rkward.svn.sourceforge.net/rkward/?rev=4471&view=rev
Author:   tfry
Date:     2012-11-29 12:57:44 +0000 (Thu, 29 Nov 2012)
Log Message:
-----------
Add internet2-option (Windows, only)

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/settings/rksettingsmoduler.cpp
    trunk/rkward/rkward/settings/rksettingsmoduler.h

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2012-11-29 11:20:00 UTC (rev 4470)
+++ trunk/rkward/ChangeLog	2012-11-29 12:57:44 UTC (rev 4471)
@@ -1,3 +1,4 @@
+- Windows only: Add UI-checkbox for R's "internet2"-option
 - New functions getString(), getList() and getBoolean() for fetching data in plugin scripts		TODO: more testing, convert at least some plugins
 - Boolean properties now return a numeric, not labelled representation of their value, by default. <checkbox>es should be unaffected.	TODO: when announcing release, link to explanation mail.
 - Added GUI element for entering a set of options for an arbitrary number of items		TODO: document

Modified: trunk/rkward/rkward/settings/rksettingsmoduler.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduler.cpp	2012-11-29 11:20:00 UTC (rev 4470)
+++ trunk/rkward/rkward/settings/rksettingsmoduler.cpp	2012-11-29 12:57:44 UTC (rev 4471)
@@ -36,6 +36,7 @@
 #include "../core/robject.h"
 #include "../misc/multistringselector.h"
 #include "../misc/rkprogresscontrol.h"
+#include "../misc/rkcommonfunctions.h"
 #include "../rbackend/rinterface.h"
 #include "../rkglobals.h"
 #include "../debug.h"
@@ -54,6 +55,7 @@
 QString RKSettingsModuleR::options_editor;
 QString RKSettingsModuleR::options_pager;
 QString RKSettingsModuleR::options_further;
+bool RKSettingsModuleR::options_internet2;
 // static constants
 QString RKSettingsModuleR::builtin_editor = "<rkward>";
 // session constants
@@ -175,6 +177,17 @@
 	connect (pager_input, SIGNAL (editTextChanged (const QString &)), this, SLOT (settingChanged()));
 	grid->addWidget (pager_input, row, 1);
 
+#ifdef Q_WS_WIN
+	grid->addWidget (label = new QLabel (i18n ("Use Internet Explorer functions for internet access"), this), ++row, 0);
+	internet2_input = new QCheckBox (this);
+	internet2_input->setChecked (options_internet2);
+	connect (internet2_input, SIGNAL (stateChanged(int)), this, SLOT (settingChanged()));
+	grid->addWidget (internet2_input, row, 1);
+	RKCommonFunctions::setTips (i18n ("<p>Use Internet Explorer functions for accessing the internet from R. "
+									"Enabling this option may help in case of problems with accessing the internet from R (e.g. for "
+									"installing packages).</p>"), internet2_input, label);
+#endif
+
 	grid->addWidget (new QLabel (i18n ("Further (option) commands to run in each session"), this), ++row, 0, 1, 2);
 	further_input = new QTextEdit (this);
 	further_input->setWordWrapMode (QTextOption::NoWrap);
@@ -221,6 +234,9 @@
 	options_editor = editor_input->currentText ();
 	options_pager = pager_input->currentText ();
 	options_further = further_input->toPlainText ();
+#ifdef Q_WS_WIN
+	options_internet2 = internet2_input->isChecked ();
+#endif
 
 // apply run time options in R
 	QStringList commands = makeRRunTimeOptionCommands ();
@@ -252,6 +268,9 @@
 	if (options_pager == builtin_editor) list.append ("options (pager=rk.show.files)\n");
 	else list.append ("options (pager=\"" + options_pager + "\")\n");
 	if (!options_further.isEmpty ()) list.append (options_further + "\n");
+#ifdef Q_WS_WIN
+	list.append (QString ("setInternet2 (") + (options_internet2 ? "TRUE)\n" : "FALSE)\n"));
+#endif
 
 #warning TODO make the following options configurable
 	list.append ("options (device=\"rk.screen.device\")\n");
@@ -287,6 +306,9 @@
 	cg.writeEntry ("editor", options_editor);
 	cg.writeEntry ("pager", options_pager);
 	cg.writeEntry ("further init commands", options_further);
+#ifdef Q_WS_WIN
+	cg.writeEntry ("internet2", options_internet2);
+#endif
 }
 
 void RKSettingsModuleR::loadSettings (KConfig *config) {
@@ -306,6 +328,9 @@
 	options_editor = cg.readEntry ("editor", builtin_editor);
 	options_pager = cg.readEntry ("pager", builtin_editor);
 	options_further = cg.readEntry ("further init commands", QString ());
+#ifdef Q_WS_WIN
+	options_internet2 = cg.readEntry ("internet2", false);
+#endif
 }
 
 //#################################################

Modified: trunk/rkward/rkward/settings/rksettingsmoduler.h
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduler.h	2012-11-29 11:20:00 UTC (rev 4470)
+++ trunk/rkward/rkward/settings/rksettingsmoduler.h	2012-11-29 12:57:44 UTC (rev 4471)
@@ -73,6 +73,7 @@
 	QComboBox *editor_input;
 	QComboBox *pager_input;
 	QTextEdit *further_input;
+	QCheckBox *internet2_input;
 
 	static QString options_outdec;
 	static int options_width;
@@ -87,6 +88,7 @@
 	static QString options_editor;
 	static QString options_pager;
 	static QString options_further;
+	static bool options_internet2;
 
 // constants
 	static QString builtin_editor;

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