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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Mar 14 12:38:17 UTC 2007


Revision: 1576
          http://svn.sourceforge.net/rkward/?rev=1576&view=rev
Author:   tfry
Date:     2007-03-14 05:38:17 -0700 (Wed, 14 Mar 2007)

Log Message:
-----------
When an incomplete command is piped into the console, the console does not become blocked for piping.
Only when a key is pressed in the console, it becomes blocked

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/rkconsole.cpp
    trunk/rkward/rkward/rkconsole.h

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2007-03-14 12:37:17 UTC (rev 1575)
+++ trunk/rkward/ChangeLog	2007-03-14 12:38:17 UTC (rev 1576)
@@ -1,3 +1,5 @@
+- if an incomplete command was piped through the console, the console does not become blocked for piping
+- make "run current line" advance the cursor to next line after running
 - warnings and errors are highlighted in command log / console (warnings only for R >= 2.5.x)
 - plugin generated commands are run in a local() environment, allowing for more consise code		TODO: document, adjust examples, adjust plugins, etc.
 - also support filename completion in the console (mode of completion is determined by heuristic means)
@@ -6,7 +8,7 @@
 - the currently active window is now highlighted using a thin red border
 - fixed: changing the type of a column in the data editor was broken
 - fixed: quitting while a plugin was still active would sometimes crash rkward
-- new shortcuts for window navigations: next/previous window, activate console, activate command log, etc.
+- new shortcuts for window navigation: next/previous window, activate console, activate command log, etc.
 - new functions rk.describe.alternative () and rk.print.literal () for use in plugins
 - new plugin: Phillips-Perron test
 - new plugin: Mood test

Modified: trunk/rkward/rkward/rkconsole.cpp
===================================================================
--- trunk/rkward/rkward/rkconsole.cpp	2007-03-14 12:37:17 UTC (rev 1575)
+++ trunk/rkward/rkward/rkconsole.cpp	2007-03-14 12:38:17 UTC (rev 1576)
@@ -147,6 +147,7 @@
 
 	current_command = 0;
 	tab_key_pressed_before = false;
+	command_was_piped = false;
 }
 
 RKConsole::~RKConsole () {
@@ -181,6 +182,7 @@
 
 	uint para=0; uint pos=0;
 	view->cursorPosition (&para, &pos);
+	command_was_piped = false;
 
 	if (para < doc->numLines() - 1 || pos < prefix.length ()) {	// not inside the last line?
 		int t = (int) pos;					// adjust position before interpreting keystroke
@@ -767,7 +769,7 @@
 	RK_TRACE (APP);
 
 	activate (false);
-	if (isBusy () || (!currentCommand ().isEmpty ())) {
+	if ((!command_was_piped) && (isBusy () || (!currentCommand ().isEmpty ()))) {
 		int res = KMessageBox::questionYesNo (this, i18n ("You have configured RKWrad to run script commands through the console. However, the console is currently busy (either a command is running, or you have started to enter text in the console). Do you want to bypass the console this one time, or do you want to try again later?"), i18n ("Console is busy"), KGuiItem (i18n ("Bypass console")), KGuiItem (i18n ("Cancel")));
 		if (res == KMessageBox::Yes) {
 			RKGlobals::rInterface ()->issueCommand (command);
@@ -779,6 +781,7 @@
 		command->addReceiver (this);
 		command->addTypeFlag (RCommand::Console);
 		current_command = command;
+		command_was_piped = true;
 		RKGlobals::rInterface ()->issueCommand (command);
 	}
 }

Modified: trunk/rkward/rkward/rkconsole.h
===================================================================
--- trunk/rkward/rkward/rkconsole.h	2007-03-14 12:37:17 UTC (rev 1575)
+++ trunk/rkward/rkward/rkconsole.h	2007-03-14 12:38:17 UTC (rev 1576)
@@ -156,6 +156,7 @@
 
 	void initializeActions (KActionCollection *ac);
 	void pipeCommandThroughConsoleLocal (RCommand *command);
+	bool command_was_piped;
 
 	RKConsolePart *console_part;
 


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