Fwd: How to eliminate get_preferred_height/width warning

---------- Forwarded message ----------
From: David Breeding <debmint49 gmail com>
Date: Fri, Jun 2, 2017 at 9:22 PM
Subject: Re: How to eliminate get_preferred_height/width warning
To: Torsten Schönfeld <kaffeetisch gmx de>

On Fri, Jun 2, 2017 at 3:39 AM, "Torsten Schönfeld" <kaffeetisch gmx de> wrote:
"David Breeding" <debmint49 gmail com>:
> When I expand the TreeStore, if its size exceeds the toplevel window, I get the warning: "Allocating size to GtkWindow 0x[address] without calling gtk_widget_get_preferred width/height()

How do you expand the tree store?  By calling size_allocate() on it?  If so, then you need to call get_preferred_size() or similar beforehand.
I have no functions to do any size allocations.  I just create the TreeStore and allow (or so I thought) Gtk to handle everything.  As I said in prev post, This began as a Gtk2-Perl program edited to be Gtk3, but this same code (except for Gtk3 names, etc, and a few modifications for published Gtk3 diffs) I did not see this error.

If that's not it, I think a complete minimal example reproducing the problem would help.

Ok, trying to keep it as minimal as possible, I don't know if the list accepts attachments or not.  I'll try and if not, I'll resend it inline.

Attachment: tst.pl
Description: Perl program

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