[rkward-cvs] rkward/rkward rkconsole.cpp,1.15,1.16 rkward.cpp,1.107,1.108 rkward.h,1.49,1.50 rkwatch.cpp,1.38,1.39 rkwatch.h,1.17,1.18

Thomas Friedrichsmeier tfry at users.sourceforge.net
Sun Oct 16 21:40:57 UTC 2005


Update of /cvsroot/rkward/rkward/rkward
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30521/rkward

Modified Files:
	rkconsole.cpp rkward.cpp rkward.h rkwatch.cpp rkwatch.h 
Log Message:
Command Log->show/raise option working again.

Index: rkconsole.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkconsole.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** rkconsole.cpp	16 Oct 2005 20:44:16 -0000	1.15
--- rkconsole.cpp	16 Oct 2005 21:40:55 -0000	1.16
***************
*** 16,20 ****
   ***************************************************************************/
  #include "rkconsole.h"
!  
  #include <qfont.h>
  #include <qstringlist.h>
--- 16,20 ----
   ***************************************************************************/
  #include "rkconsole.h"
! 
  #include <qfont.h>
  #include <qstringlist.h>
***************
*** 141,145 ****
  
  	if (!currentCommand ().isEmpty ()) {
! 		current_command = new RCommand (c, RCommand::User, QString::null, this);
  		RKGlobals::rInterface ()->issueCommand (current_command);
  		emit (doingCommand (true));
--- 141,145 ----
  
  	if (!currentCommand ().isEmpty ()) {
! 		current_command = new RCommand (c, RCommand::User | RCommand::Console, QString::null, this);
  		RKGlobals::rInterface ()->issueCommand (current_command);
  		emit (doingCommand (true));

Index: rkwatch.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkwatch.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** rkwatch.h	25 Sep 2005 18:45:44 -0000	1.17
--- rkwatch.h	16 Oct 2005 21:40:55 -0000	1.18
***************
*** 20,24 ****
  
  #include <qstring.h>
! #include <qwidget.h>
  
  class RCommand;
--- 20,24 ----
  
  #include <qstring.h>
! #include <kmdichildview.h>
  
  class RCommand;
***************
*** 33,45 ****
  */
  
! class RKwatch : public QWidget {
  	Q_OBJECT
  public: 
  	RKwatch ();
! 	~RKwatch();
  /** Adds input to the watch-window (i.e. commands issued) */
  	void addInput (RCommand *command);
  /** Adds output to the watch-window (i.e. replies received) */
  	void addOutput (RCommand *command);
  public slots:
  /** configures the watch-window */
--- 33,48 ----
  */
  
! class RKwatch : public KMdiChildView {
  	Q_OBJECT
  public: 
  	RKwatch ();
! 	~RKwatch ();
  /** Adds input to the watch-window (i.e. commands issued) */
  	void addInput (RCommand *command);
  /** Adds output to the watch-window (i.e. replies received) */
  	void addOutput (RCommand *command);
+ signals:
+ /** the watch emits this, when it should be raised (apparently this can only be done from the main frame) */
+ 	void raiseWatch ();
  public slots:
  /** configures the watch-window */

Index: rkwatch.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkwatch.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** rkwatch.cpp	2 Oct 2005 17:19:02 -0000	1.38
--- rkwatch.cpp	16 Oct 2005 21:40:55 -0000	1.39
***************
*** 38,42 ****
  #include "debug.h"
  
! RKwatch::RKwatch () : QWidget () {
  	RK_TRACE (APP);
  	
--- 38,42 ----
  #include "debug.h"
  
! RKwatch::RKwatch () : KMdiChildView () {
  	RK_TRACE (APP);
  	
***************
*** 62,65 ****
--- 62,68 ----
  	if (!RKSettingsModuleWatch::shouldShowInput (command)) return;
  
+ // commands submitted via the console are often incomplete. We delay showing the input, until the command is finished.
+ 	if (command->type () & RCommand::Console) return;
+ 
  	addInputNoCheck (command);
  }
***************
*** 85,90 ****
  	
  	if (RKSettingsModuleWatch::shouldRaiseWindow (command)) {
! 		show ();
! 		raise ();
  	}
  	RK_TRACE (APP);
--- 88,94 ----
  	
  	if (RKSettingsModuleWatch::shouldRaiseWindow (command)) {
! 		if (!(command->type () & RCommand::Console)) {
! 			emit (raiseWatch ());
! 		}
  	}
  	RK_TRACE (APP);
***************
*** 94,97 ****
--- 98,106 ----
  	RK_TRACE (APP);
  
+ 	if (command->type () & RCommand::Console) {
+ 		if (command->errorIncomplete ()) return;
+ 		if (RKSettingsModuleWatch::shouldShowInput (command)) addInputNoCheck (command);
+ 	}
+ 
  	if (!RKSettingsModuleWatch::shouldShowOutput (command)) {
  		if (!command->failed ()) {

Index: rkward.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkward.cpp,v
retrieving revision 1.107
retrieving revision 1.108
diff -C2 -d -r1.107 -r1.108
*** rkward.cpp	16 Oct 2005 18:48:34 -0000	1.107
--- rkward.cpp	16 Oct 2005 21:40:55 -0000	1.108
***************
*** 189,193 ****
  	RKGlobals::rInterface ()->watch->setName ("Command log");
  	RKGlobals::rInterface ()->watch->setIcon (SmallIcon ("text_block"));
! 	addToolWindow(RKGlobals::rInterface ()->watch, KDockWidget::DockBottom, getMainDockWidget (), 10);
  
  	RControlWindowPart *rcpart = new RControlWindowPart ();
--- 189,194 ----
  	RKGlobals::rInterface ()->watch->setName ("Command log");
  	RKGlobals::rInterface ()->watch->setIcon (SmallIcon ("text_block"));
! 	watch_view = addToolWindow (RKGlobals::rInterface ()->watch, KDockWidget::DockBottom, getMainDockWidget (), 10);
! 	connect (RKGlobals::rInterface ()->watch, SIGNAL (raiseWatch ()), this, SLOT (raiseWatch ()));
  
  	RControlWindowPart *rcpart = new RControlWindowPart ();
***************
*** 473,483 ****
  }
  
! bool RKwardApp::queryExit()
! {
  	RK_TRACE (APP);
! 	saveOptions();
  	return true;
  }
  
  /////////////////////////////////////////////////////////////////////
  // SLOT IMPLEMENTATION
--- 474,489 ----
  }
  
! bool RKwardApp::queryExit () {
  	RK_TRACE (APP);
! 	saveOptions ();
  	return true;
  }
  
+ void RKwardApp::raiseWatch () {
+ 	RK_TRACE (APP);
+ 
+ 	watch_view->show ();
+ }
+ 
  /////////////////////////////////////////////////////////////////////
  // SLOT IMPLEMENTATION

Index: rkward.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkward.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** rkward.h	16 Oct 2005 18:48:34 -0000	1.49
--- rkward.h	16 Oct 2005 21:40:55 -0000	1.50
***************
*** 56,59 ****
--- 56,60 ----
  class RKMenuList;
  class RKCommandEditorWindow;
+ class KMdiToolViewAccessor;
  
  /**
***************
*** 147,150 ****
--- 148,153 ----
  
  public slots:
+ 	/** raises the watch window */
+ 	void raiseWatch ();
  	/** creates a new (empty) data.frame */
  	void slotNewDataFrame ();
***************
*** 234,237 ****
--- 237,242 ----
  	
  	KAction* configure;
+ 
+ 	KMdiToolViewAccessor *watch_view;
  	
  	friend class RKSettingsModule;





More information about the rkward-tracker mailing list