invalid cast from `GtkVBox' to `GtkScrolledWindow' in sendmsg-window



Can someone more familiar with this chunk of code take a look
and see what it should be?  In src/sendmsg-window.c,
in create_text_area(), the following code appears:

     table = gtk_vbox_new(FALSE, 0);

     msg->text_box = gtk_scrolled_window_new(GTK_TEXT(msg->text)->hadj,
				    GTK_TEXT(msg->text)->vadj);
     gtk_container_add(GTK_CONTAINER(msg->text_box), msg->text);
     gtk_container_add(GTK_CONTAINER(table), msg->text_box);
         gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(table),
     				   GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
     
Should the call to gtk_scrolled_window_set_policy() have
msg->text_box as it's first parameter instead of table?

I get these messages every time I compose a message:

Gtk-WARNING **: invalid cast from `GtkVBox' to `GtkScrolledWindow'

Gtk-CRITICAL **: file gtkscrolledwindow.c: line 429 
(gtk_scrolled_window_set_policy): assertion `GTK_IS_SCROLLED_WINDOW 
(scrolled_window)' failed.

and this bit of code looks like the culprit.  If I make the suggested
change, I get no more warnings.


-- 
Steve Wall



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