Re: Help about VteTerminal
- From: Brian <dol-sen telus net>
- To: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Re: Help about VteTerminal
- Date: Sun, 05 Dec 2004 08:33:45 -0800
On Sun, 2004-12-05 at 14:01 +0800, Shixin Zeng wrote:
I'm writing a Gtk+ frontend for lftp. I want to create a VteTerminal,
and launch "lftp" with the function vte_terminal_fork_command (). But
I don't know how to get the output of the child process? I need the
output to analysis and show it with GtkTreeView.
I have tried getting the output as well with the python interface
without any reliable results. I seemed to think it was that python was
too slow to keep up mostly. Some text would be duplicated, other times
it was missing a chunk.
If you enabled the docs when you installed the vte package it generates
html pages similar to devhelp that lists and explains all options
availabe. Here is the docs I found on nalins site:
http://people.redhat.com/nalin/vte/html/
I connected to the signal "cursor_moved", then used the
vte_terminal_get_text func. here is the short listing of them:
char* vte_terminal_get_text (VteTerminal *terminal,
gboolean (*is_selected) (VteTerminal *terminal,glong
column,glong row,gpointer data),
gpointer data,
GArray *attributes);
char* vte_terminal_get_text_range (VteTerminal *terminal,
glong start_row,
glong start_col,
glong end_row,
glong end_col,
gboolean (*is_selected) (VteTerminal *terminal,glong
column,glong row,gpointer data),
gpointer data,
GArray *attributes);
void vte_terminal_get_cursor_position
(VteTerminal *terminal,
glong *column,
glong *row);
I so far have been unable to get a signal back when a shell run command
has finished. I can get the "child_exited" and "eof" signals when the
fork() terminates, but I want to be able to keep the primary fork
running with a normal shell. Then feed the shell the commands. So far
I have not been able to get feedback when the command has finished. Any
ideas?
The only thing I have thought of so far is to chain another command to
it that somehow signals my monitoring function that it has completed.
e.g. my_command = "some_command & my_feedback_command"
vte_terminal_feed_child(my_command, len(my_command))
--
Brian <dol-sen telus net>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]