[Konsole-devel] Review Request: Upgrade TerminalInterface to V2 and add two more functions that needed by dolphin. 1. Apps can query if a sub process is running in terminal. 2. Apps can query if there is any input text on command prompt that waits for a RETURN key.

Robert Knight robertknight at gmail.com
Sun Mar 29 13:24:22 UTC 2009



> On 2009-03-29 04:25:07, Robert Knight wrote:
> > Methods are okay now.  The comments need some clarifications:
> > 
> > For foregroundProcessId() - This is the id of the process which currently has control of the terminal, or in other words, the process which the user's input will be sent to.  This may be the same as terminalProcessId() or it may be another process.
> > For foregroundProcessName() - This is the name of the process which currently has control of the terminal.
> 
> Rahman Duran wrote:
>     Robert, we implemented foregoundProcessId to be returned -1 if there is no process running different then shell. (in konsole/session) So it will never return the PID of terminalProcessID as we chack this internally in the implementation code. So I guess there is no reason to bother TerminalInterface clients with extra technical terms.

> Robert, we implemented foregoundProcessId to be returned -1 if there is no process running different then shell

I'm thinking that is probably not the most useful approach though.  Supposing the client wants to display some information about the program which the user is currently interacting with, at the moment they would need to call foregroundProcessId() and if that returns -1, remember to check terminalProcessId() instead.  If foregroundProcessId() is allowed to return terminalProcessId() then they don't need to do that check.  If they want to see if the user has started another program in the terminal they can check whether terminalProcessId() == foregroundProcessId().  The same applies to foregroundProcessName() - if you wanted to display the name of the active program in a window title, it would be easier if foregroundProcessName() could return the name for whichever process the user is interacting with, whether it is the shell or another process invoked by the user.

> So I guess there is no reason to bother TerminalInterface clients with extra technical terms.

The documentation does need to explain what the 'foreground process' is so users of the interface know what to expect when, for example, multiple processes are running in the shell at the same time or when a job is started in the shell but is then moved to the background.


- Robert


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/444/#review676
-----------------------------------------------------------


On 2009-03-28 15:58:08, Rahman Duran wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/444/
> -----------------------------------------------------------
> 
> (Updated 2009-03-28 15:58:08)
> 
> 
> Review request for kdelibs and Konsole.
> 
> 
> Summary
> -------
> 
> This is a new interface that extends the old ones functionality. 
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdelibs/interfaces/terminal/CMakeLists.txt 945618 
>   trunk/KDE/kdelibs/interfaces/terminal/kde_terminal_interface_v2.h PRE-CREATION 
> 
> Diff: http://reviewboard.kde.org/r/444/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Rahman
> 
>




More information about the konsole-devel mailing list