Re: 2 zvt problems + 1
- From: francex <francex tiscali it>
- To: gnome-devel-list gnome org
- Subject: Re: 2 zvt problems + 1
- Date: Wed, 6 Nov 2002 14:38:35 +0100
Hi,
> 1) I have selected blink cursor for zvtterm, and
> GTK_WIDGET_UNSET_FLAGS (label, GTK_CAN_FOCUS);
> GTK_WIDGET_UNSET_FLAGS (scrollbar, GTK_CAN_FOCUS);
> gtk_widget_grab_focus(terminal);
> (and gtk_widget_grab_focus(terminal); in every signal "switch-page")
> It works when I press keys but cursor is not blinking (just after i press
> main window title bar to move window, cursor start to blink).
> Have I missed anything?
I have resolved it (blink/focus), but problems for 2) and 3) remain. I have
read old mailing list thread and example in zvt term doc, but I don't know
resolve maximize window and triple width for zvt term. This is code that I
use:
---------------------------------------------------------------------
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_set_usize(window, gdk_screen_width() , gdk_screen_height() );
gtk_window_set_title (GTK_WINDOW (window), _("zvt term"));
gtk_window_set_wmclass (GTK_WINDOW (window), "zterm", "zterm");
gtk_widget_realize (window);
gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER);
vbox = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox);
gtk_container_add (GTK_CONTAINER (window), vbox);
notebook = gtk_notebook_new ();
gtk_box_pack_start (GTK_BOX (vbox), notebook, TRUE, TRUE, 0);
..... other pages for notebook
hbox = gtk_hbox_new (FALSE, 0);
gtk_box_set_spacing (GTK_BOX (hbox), 2);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 2);
gtk_widget_show (hbox);
term = zvt_term_new_with_size(80,24);
...other zvt_term_ options
gtk_widget_show (term);
scrollbar = gtk_vscrollbar_new (GTK_ADJUSTMENT (ZVT_TERM(term)->adjustment));
GTK_WIDGET_UNSET_FLAGS (scrollbar, GTK_CAN_FOCUS);
if (scrollpos == LEFT) {
gtk_box_pack_start (GTK_BOX (hbox), scrollbar, FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (hbox, term, 1, 1, 0);
} else {
gtk_box_pack_start (GTK_BOX (hbox), term, 1, 1, 0);
gtk_box_pack_start (GTK_BOX (hbox), scrollbar, FALSE, TRUE, 0);
}
gtk_widget_show (scrollbar);
label = gtk_label_new (_("Terminal"));
GTK_WIDGET_UNSET_FLAGS (label, GTK_CAN_FOCUS);
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
gtk_widget_show (scrollbar);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), hbox, label);
GTK_WIDGET_UNSET_FLAGS (notebook, GTK_CAN_FOCUS);
gtk_widget_show (notebook);
gtk_widget_grab_focus(term);
and show window
-----------------------
thanks and sorry for boring question
france
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]