[rkward-cvs] rkward/rkward rkconsole.h,1.15,1.16 rkconsole.cpp,1.21,1.22

Pierre ecoch at users.sourceforge.net
Wed Apr 12 08:48:03 UTC 2006


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

Modified Files:
	rkconsole.h rkconsole.cpp 
Log Message:
Fix left arrow and focus in console.


Index: rkconsole.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkconsole.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** rkconsole.cpp	11 Apr 2006 13:54:13 -0000	1.21
--- rkconsole.cpp	12 Apr 2006 08:48:01 -0000	1.22
***************
*** 27,30 ****
--- 27,31 ----
  #include <kaction.h>
  #include <kactioncollection.h>
+ #include <kconfig.h>
  
  
***************
*** 59,63 ****
--- 60,66 ----
  		
  	view->setDynWordWrap (false);
+ 
  	
+ 	setFocusProxy(view);
  	setFocusPolicy(QWidget::WheelFocus);
  	
***************
*** 242,246 ****
  		} else {
  			view->cursorLeft();
! 			return FALSE;
  		}
  	}
--- 245,249 ----
  		} else {
  			view->cursorLeft();
! 			return TRUE;
  		}
  	}
***************
*** 517,520 ****
--- 520,527 ----
  }
  
+ int RKConsole::currentCursorPositionInCommand(){
+ 	return(currentCursorPosition() - prefix.length());
+ }
+ 
  
  ///################### END RKConsole ########################
***************
*** 552,556 ****
  void RKConsolePart::showContextHelp () {
  	RK_TRACE (APP);
! 	RKGlobals::helpDialog ()->getContextHelp (console->currentCommand (), console->currentCursorPosition());
  }
  
--- 559,563 ----
  void RKConsolePart::showContextHelp () {
  	RK_TRACE (APP);
! 	RKGlobals::helpDialog ()->getContextHelp (console->currentCommand (), console->currentCursorPositionInCommand() );
  }
  

Index: rkconsole.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkconsole.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** rkconsole.h	11 Apr 2006 13:54:13 -0000	1.15
--- rkconsole.h	12 Apr 2006 08:48:01 -0000	1.16
***************
*** 56,59 ****
--- 56,61 ----
  /** Returns the current cursor position. Returns the column on which is the cursor.  */
  	int currentCursorPosition();
+ /** Returns the current cursor position, within the current command (without taking into account the prefix).*/
+ 	int currentCursorPositionInCommand();
  /** Returns TRUE if some text is selected; otherwise returns FALSE.  */
  	bool hasSelectedText();





More information about the rkward-tracker mailing list