Help with ZVT
- From: Marco Quezada <mquezada nlxcorp com>
- To: GTK List <gtk-app-devel-list gnome org>
- Subject: Help with ZVT
- Date: Fri, 23 Nov 2001 14:03:01 -0500
I'm trying to incorporate a ZVT widget into an existing GTK app I
recently developed. I can create the widget with no problem, and I can
use zvt_term_feed to pass text strings into the widget. Unfortunately I
can't get zvt to fork and run a shell (or any other command for that
matter). When I call zvt_term_forkpty() I get no errors but the ZVT
widget comes up with no shell in it. I attach the piece of the code that
I adapted to test the ZVT widget. Any ideas, comments or corrections
will be greatly appreciated.
Thanks.
// Create the terminal widget
Zvterm_Widget = zvt_term_new ();
CC_GLBL->ZVT = (ZvtTerm *)Zvterm_Widget;
zvt_term_set_font_name(CC_GLBL->ZVT, FONT);
zvt_term_set_blink (CC_GLBL->ZVT, TRUE);
zvt_term_set_scrollback (CC_GLBL->ZVT, 1500);
zvt_term_set_scroll_on_keystroke (CC_GLBL->ZVT, TRUE);
gtk_widget_ref (Zvterm_Widget);
gtk_object_set_data_full (GTK_OBJECT (control_window), "ZVT",
Zvterm_Widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (Zvterm_Widget);
gtk_box_pack_start (GTK_BOX (vbox1), Zvterm_Widget, TRUE, TRUE, 0);
//---------------------------------------------------------------------------------
gtk_signal_connect (GTK_OBJECT (Zvterm_Widget), "child_died",
GTK_SIGNAL_FUNC (shell_exit), NULL);
gtk_signal_connect (GTK_OBJECT (Zvterm_Widget), "title_changed",
GTK_SIGNAL_FUNC (menu_shell_title), NULL);
//
--------------------------------------------------------------------------------
switch (zvt_term_forkpty (ZVT_TERM(Zvterm_Widget), 0))
{
case -1:
printf("Unable to fork terminal process\n");
exit(0);
break;
case 0:
setenv ("COLORTERM", "zterm", 0);
execle ("/bin/csh", "csh", NULL, "COLORTERM");
perror ("Could not exec\n");
_exit (127);
}
--
Marco Quezada
Aerospaceo Engineero
NLX Corporation
22626 Sally Ride Dr.
Sterling, VA, 20164
mquezada nlxcorp com
703-234-2100 x1028
http://www.nlxcorp.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]