[Konsole-devel] [Bug 156919] Embedded terminal should notify the host about changes in current working directory

Robert Knight robertknight at gmail.com
Thu Sep 11 09:58:15 UTC 2008


http://bugs.kde.org/show_bug.cgi?id=156919





--- Comment #5 from Robert Knight <robertknight gmail com>  2008-09-11 11:58:14 ---
> b) implement the same functionality as in Konsole::SessionController
> Use a one-shot, 2 second QTimer that is armed at the end of 
> Konsole::Part::sendInput(). The timeout() signal will be connected to a
> new slot that sends the Konsole::Part::directoryChanged() signal
> when necessary. 

The best place for this is the ViewProperties class which provides an interface
that the ViewContainer classes (the tab widgets) use to get the text, icon and
state of a tab.  SessionController inherits from ViewProperties and checks for
changes in the current directory/program etc. of a session in the
SessionController::snapshot() method which then updates the session's title. 
The snapshot() method is called, with a short delay, after any input to the
terminal.  

So, you could add a new signal currentDirChanged(QString) to ViewProperties and
emit that from SessionController::snapshot()

In Konsole::Part you can listen for this signal by connecting to it in
Part::activeViewChanged(SessionController*) - the same as for the
titleChanged() signal.


-- 
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the konsole-devel mailing list