[patch] [gui] warning patrol no 2 gtk-peer stuff

Thomas Fitzsimmons fitzsim@redhat.com
Thu Oct 21 21:08:00 GMT 2004


Hi,

On Thu, 2004-10-21 at 16:19, Andreas Tobler wrote:

>        gtk_widget_set_size_request (gtk_bin_get_child (GTK_BIN (widget)),
>                                     width, height);
>        /* ...and the label's size request. */
> -      gtk_widget_set_size_request (gtk_bin_get_child (gtk_bin_get_child (GTK_BIN (widget))),
> -                                                      width, height);
> +      gtk_widget_set_size_request (gtk_bin_get_child (GTK_BIN (gtk_bin_get_child (GTK_BIN (widget)))), width, height);

I was sloppy here; we should create an intermediate child variable to
store the result of the inner gtk_bin_get_child call, to reduce the
length of this line.

>  
>    text = gtk_text_view_new ();
>    gtk_widget_set_size_request (text, textview_width, textview_height);
> -  gtk_text_view_set_cursor_visible(text, TRUE);
> +  gtk_text_view_set_cursor_visible((GtkTextView*)text, TRUE);

You should use the GTK_TEXT_VIEW wrapper macro rather than a direct
cast.

With these changes, this can be committed.

Tom




More information about the Java-patches mailing list