[rkward-cvs] rkward/rkward/rbackend rinterface.cpp, 1.53, 1.54 rinterface.h, 1.25, 1.26

Thomas Friedrichsmeier tfry at users.sourceforge.net
Fri Sep 15 17:23:14 UTC 2006


Update of /cvsroot/rkward/rkward/rkward/rbackend
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv31419/rkward/rbackend

Modified Files:
	rinterface.cpp rinterface.h 
Log Message:
Show output context for readline() calls

Index: rinterface.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rbackend/rinterface.cpp,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** rinterface.cpp	15 Sep 2006 10:50:48 -0000	1.53
--- rinterface.cpp	15 Sep 2006 17:23:12 -0000	1.54
***************
*** 27,30 ****
--- 27,31 ----
  #include "../core/rkmodificationtracker.h"
  #include "../dialogs/rkloadlibsdialog.h"
+ #include "../dialogs/rkreadlinedialog.h"
  #include "../agents/showedittextfileagent.h"
  #include "../windows/rcontrolwindow.h"
***************
*** 40,44 ****
  
  #include <kmessagebox.h>
- #include <kinputdialog.h>
  #include <kfiledialog.h>
  #include <klocale.h>
--- 41,44 ----
***************
*** 337,348 ****
  		KMessageBox::information (0, QString (*(args->chars_a)), i18n ("Message from the R backend"));
  	} else if (type == RCallbackArgs::RReadConsole) {
! 		QString question = *(args->chars_a);
  
! 		bool ok;
! 		QRegExpValidator *dummy = new QRegExpValidator (QRegExp (".*"), 0);		// needed to allow empty strings in KInputDialog::getText
! 		QString res = KInputDialog::getText (i18n ("R backend requests information"), question, QString::null, &ok, 0, 0, dummy);
! 		delete dummy;
! 		res = res.left (args->int_a - 2) + "\n";
! 		qstrcpy (*(args->chars_b), res.latin1 ());
  
  		if (!ok) {
--- 337,346 ----
  		KMessageBox::information (0, QString (*(args->chars_a)), i18n ("Message from the R backend"));
  	} else if (type == RCallbackArgs::RReadConsole) {
! 		QString result;
  
! 		bool ok = RKReadLineDialog::readLine (0, i18n ("R backend requests information"), *(args->chars_a), runningCommand (), &result);
! 
! 		result = result.left (args->int_a - 2) + "\n";
! 		qstrcpy (*(args->chars_b), result.latin1 ());
  
  		if (!ok) {

Index: rinterface.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rbackend/rinterface.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** rinterface.h	15 Sep 2006 10:50:48 -0000	1.25
--- rinterface.h	15 Sep 2006 17:23:12 -0000	1.26
***************
*** 24,28 ****
  #include "rcommand.h"
  
! #define DEBUG_MUTEX
  #ifdef DEBUG_MUTEX
  #define MUTEX_LOCK qDebug ("mutex locks: %d, locked in %s, %s, %d", ++RInterface::mutex_counter, __FILE__, __FUNCTION__, __LINE__); RInterface::mutex.lock ();
--- 24,28 ----
  #include "rcommand.h"
  
! //#define DEBUG_MUTEX
  #ifdef DEBUG_MUTEX
  #define MUTEX_LOCK qDebug ("mutex locks: %d, locked in %s, %s, %d", ++RInterface::mutex_counter, __FILE__, __FUNCTION__, __LINE__); RInterface::mutex.lock ();





More information about the rkward-tracker mailing list