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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Fri Sep 3 14:02:49 UTC 2010


Revision: 2989
          http://rkward.svn.sourceforge.net/rkward/?rev=2989&view=rev
Author:   tfry
Date:     2010-09-03 14:02:49 +0000 (Fri, 03 Sep 2010)

Log Message:
-----------
Add option to disable argument hinting

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/settings/rksettingsmodulecommandeditor.cpp
    trunk/rkward/rkward/settings/rksettingsmodulecommandeditor.h
    trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2010-09-02 17:02:26 UTC (rev 2988)
+++ trunk/rkward/ChangeLog	2010-09-03 14:02:49 UTC (rev 2989)
@@ -1,5 +1,6 @@
 TODO: Do not use SmartInterface for KDE 4.5 and above
 
+- Add option to disable function argument hinting
 - New functions rk.show.message() and rk.show.question() for user interaction from R code
 - New options for scripting GUI logic in plugins		TODO: document, merge common functionality of common.js and rkcomponentscriptiong.js, error handling
 - The current object of an active data editor can be referenced in plugins		TODO: document

Modified: trunk/rkward/rkward/settings/rksettingsmodulecommandeditor.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmodulecommandeditor.cpp	2010-09-02 17:02:26 UTC (rev 2988)
+++ trunk/rkward/rkward/settings/rksettingsmodulecommandeditor.cpp	2010-09-03 14:02:49 UTC (rev 2989)
@@ -35,6 +35,7 @@
 int RKSettingsModuleCommandEditor::completion_min_chars;
 int RKSettingsModuleCommandEditor::completion_timeout;
 bool RKSettingsModuleCommandEditor::completion_enabled;
+bool RKSettingsModuleCommandEditor::arghinting_enabled;
 bool RKSettingsModuleCommandEditor::autosave_enabled;
 bool RKSettingsModuleCommandEditor::autosave_keep;
 int RKSettingsModuleCommandEditor::autosave_interval;
@@ -77,6 +78,11 @@
 
 	main_vbox->addWidget (group);
 
+	arghinting_enabled_box = new QCheckBox (i18n ("Enable function argument hinting"), group);
+	arghinting_enabled_box->setChecked (arghinting_enabled);
+	connect (arghinting_enabled_box, SIGNAL (stateChanged(int)), this, SLOT (settingChanged()));
+	main_vbox->addWidget (arghinting_enabled_box);
+
 	main_vbox->addSpacing (2 * RKGlobals::spacingHint ());
 
 	group = autosave_enabled_box = new QGroupBox (i18n ("Autosaves"), this);
@@ -138,6 +144,7 @@
 	completion_enabled = completion_enabled_box->isChecked ();
 	completion_min_chars = completion_min_chars_box->intValue ();
 	completion_timeout = completion_timeout_box->intValue ();
+	arghinting_enabled = arghinting_enabled_box->isChecked ();
 
 	autosave_enabled = autosave_enabled_box->isChecked ();
 	autosave_keep = autosave_keep_box->isChecked ();
@@ -159,6 +166,7 @@
 	cg.writeEntry ("Completion enabled", completion_enabled);
 	cg.writeEntry ("Completion min chars", completion_min_chars);
 	cg.writeEntry ("Completion timeout", completion_timeout);
+	cg.writeEntry ("Argument hinting enabled", arghinting_enabled);
 
 	cg.writeEntry ("Autosave enabled", autosave_enabled);
 	cg.writeEntry ("Autosave keep saves", autosave_keep);
@@ -173,6 +181,7 @@
 	completion_enabled = cg.readEntry ("Completion enabled", true);
 	completion_min_chars = cg.readEntry ("Completion min chars", 2);
 	completion_timeout = cg.readEntry ("Completion timeout", 500);
+	arghinting_enabled = cg.readEntry ("Argument hinting enabled", true);
 
 	autosave_enabled = cg.readEntry ("Autosave enabled", true);
 	autosave_keep = cg.readEntry ("Autosave keep saves", false);

Modified: trunk/rkward/rkward/settings/rksettingsmodulecommandeditor.h
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmodulecommandeditor.h	2010-09-02 17:02:26 UTC (rev 2988)
+++ trunk/rkward/rkward/settings/rksettingsmodulecommandeditor.h	2010-09-03 14:02:49 UTC (rev 2989)
@@ -49,6 +49,7 @@
 	static int completionMinChars () { return completion_min_chars; };
 	static int completionTimeout () { return completion_timeout; };
 	static bool completionEnabled () { return completion_enabled; };
+	static bool argHintingEnabled () { return arghinting_enabled; };
 
 	static bool autosaveEnabled () { return autosave_enabled; };
 	static bool autosaveKeep () { return autosave_keep; };
@@ -60,10 +61,12 @@
 	static int completion_min_chars;
 	static int completion_timeout;
 	static bool completion_enabled;
+	static bool arghinting_enabled;
 
 	RKSpinBox* completion_min_chars_box;
 	RKSpinBox* completion_timeout_box;
 	QCheckBox* completion_enabled_box;
+	QCheckBox* arghinting_enabled_box;
 
 	static bool autosave_enabled;
 	static bool autosave_keep;

Modified: trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp	2010-09-02 17:02:26 UTC (rev 2988)
+++ trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp	2010-09-03 14:02:49 UTC (rev 2989)
@@ -751,6 +751,8 @@
 void RKFunctionArgHinter::tryArgHint () {
 	RK_TRACE (COMMANDEDITOR);
 
+	if (!RKSettingsModuleCommandEditor::argHintingEnabled ()) return;
+
 	// do this in the next event cycle to make sure any inserted characters have truly been inserted
 	QTimer::singleShot (0, this, SLOT (tryArgHintNow ()));
 }


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