Re: [gtk-list] Gtk-WARNING **: horizontal scrolling not implemented



Anders Melchiorsen wrote:
> 
> I get the warning
> 
>  Gtk-WARNING **: horizontal scrolling not implemented
> 
> whenever I destroy some of my windows. They are generated by Glade and
> I do not really know how they are built. It seems it happens when I
> have a text area in a scrollable window (I think).
> 
> Is this something I should care about? Is Glade generating incorrect
> code, am I using it wrongly, or is the message just a debugging
> message that I should not care about?


I think this is a tiny bug in GTK, though I don't think it will cause
problems.

Glade builds the text widgets in a very simple way (see code below) so
I don't think it's the Glade output causing the problem.

Also, maybe testgtk should be updated to use the new scrolled window
stuff for creating the text widget.

Damon

------------------------------------------------------------
Test code. If you close the window, generating a 'delete' signal (and
so destroying the window), you get the warning message.


GtkWidget*
create_window2 ()
{
  GtkWidget *window2;
  GtkWidget *vbox1;
  GtkWidget *scrolledwindow2;
  GtkWidget *text3;

  window2 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_object_set_data (GTK_OBJECT (window2), "window2", window2);
  gtk_window_set_title (GTK_WINDOW (window2), "window2");
  gtk_window_set_policy (GTK_WINDOW (window2), TRUE, TRUE, FALSE);

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_object_set_data (GTK_OBJECT (window2), "vbox1", vbox1);
  gtk_widget_show (vbox1);
  gtk_container_add (GTK_CONTAINER (window2), vbox1);

  scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL);
  gtk_object_set_data (GTK_OBJECT (window2), "scrolledwindow2",
scrolledwindow2);
  gtk_widget_show (scrolledwindow2);
  gtk_box_pack_start (GTK_BOX (vbox1), scrolledwindow2, TRUE, TRUE, 0);

  text3 = gtk_text_new (NULL, NULL);
  gtk_object_set_data (GTK_OBJECT (window2), "text3", text3);
  gtk_widget_show (text3);
  gtk_container_add (GTK_CONTAINER (scrolledwindow2), text3);

  return window2;
}


int
main (int argc, char *argv[])
{
  GtkWidget *window2;

  gtk_set_locale ();
  gtk_init (&argc, &argv);

  window2 = create_window2 ();
  gtk_widget_show (window2);

  gtk_main ();
  return 0;
}




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]