[rkward-cvs] rkward/rkward rkconsole.cpp,1.16,1.17 rkconsole.h,1.11,1.12

Thomas Friedrichsmeier tfry at users.sourceforge.net
Sun Oct 16 22:01:50 UTC 2005


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

Modified Files:
	rkconsole.cpp rkconsole.h 
Log Message:
small fix to pasting in RKConsole

Index: rkconsole.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkconsole.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** rkconsole.cpp	16 Oct 2005 21:40:55 -0000	1.16
--- rkconsole.cpp	16 Oct 2005 22:01:48 -0000	1.17
***************
*** 207,216 ****
  	// TODO: hack something so we can have empty entries.
  	commands_batch = QStringList::split ("\n", batch, true);
! 	tryNextInBatch ();
  }
  
! void RKConsole::tryNextInBatch () {
! 	append (prefix);
! 	cursorAtTheEnd ();
  
  	if (!commands_batch.isEmpty()) {
--- 207,218 ----
  	// TODO: hack something so we can have empty entries.
  	commands_batch = QStringList::split ("\n", batch, true);
! 	tryNextInBatch (false);
  }
  
! void RKConsole::tryNextInBatch (bool add_new_line) {
! 	if (add_new_line) {	
! 		append (prefix);
! 		cursorAtTheEnd ();
! 	}
  
  	if (!commands_batch.isEmpty()) {
***************
*** 281,286 ****
  	interrupt_command->setShortcut ("Ctrl+C");
  
! 	copy = new KAction (i18n ("Copy selection"), 0, console, SLOT (copy ()), actionCollection ());
! 	paste = new KAction (i18n ("Paste"), KShortcut ("Ctrl+V"), console, SLOT (paste ()), actionCollection ());
  
  	connect (console, SIGNAL (fetchPopupMenu (QPopupMenu**)), this, SLOT (makePopupMenu (QPopupMenu**)));
--- 283,288 ----
  	interrupt_command->setShortcut ("Ctrl+C");
  
! 	copy = new KAction (i18n ("Copy selection"), 0, console, SLOT (copy ()), actionCollection (), "rkconsole_copy");
! 	paste = new KAction (i18n ("Paste"), KShortcut ("Ctrl+V"), console, SLOT (paste ()), actionCollection (), "rkconsole_paste");
  
  	connect (console, SIGNAL (fetchPopupMenu (QPopupMenu**)), this, SLOT (makePopupMenu (QPopupMenu**)));

Index: rkconsole.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkconsole.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** rkconsole.h	16 Oct 2005 20:44:16 -0000	1.11
--- rkconsole.h	16 Oct 2005 22:01:48 -0000	1.12
***************
*** 92,96 ****
  	void setCurrentCommand (QString command);
  /** Add a new line, and try to submit the next item in a batch of (pasted) commands. If there is no batch, only add the new line. */
! 	void tryNextInBatch ();
  /** Add given command to command history. Also checks, wether the history is longer than max length, and chops it if so. */
  	void addCommandToHistory (const QString &command);
--- 92,96 ----
  	void setCurrentCommand (QString command);
  /** Add a new line, and try to submit the next item in a batch of (pasted) commands. If there is no batch, only add the new line. */
! 	void tryNextInBatch (bool add_new_line = true);
  /** Add given command to command history. Also checks, wether the history is longer than max length, and chops it if so. */
  	void addCommandToHistory (const QString &command);





More information about the rkward-tracker mailing list