zvt term problems



Hi (sorry for my poor english),

I use zvtterm in a notebook page:

notebook <-- hbox <-- (zvtterm + scrollbar)

1) When I select the terminal page, my window grow triple size in width! I 
have tried to set size (80,24) or usize the widget but It doesn't work. Can 
anybody help me?

2) When I maximize my window in Gnome works, but in KDE desktop too wide 
in width.
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_maximize   (window); 
????

this is my "window" code:
----------------------------------------------------------

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]