wxPython-gtk2 issues

Thank you for that pointer. I did that, rebuilt, and my problems
disappeared. I am slightly concerned over whatever breakage that might
cause, but I haven't seen any yet (in my very cursory examination of
my newly recovered application).

Perhaps someone who understands the internals of this could shed some
more light on what things might break when making the following
change:

in src/gtk/notebook.cpp:

static void wxInsertChildInNotebook( wxNotebook* parent, wxWindow* child )
{
    // Hack alert! We manually set the child window
    // parent field so that GTK can query the
    // notebook's style and font. Without that, GetBestSize could return
    // incorrect size, see bug #901694 for details
    // (http://sourceforge.net/tracker/?func=detail&aid=901694&group_id=9863&atid=109863)
    child->m_widget->parent = parent->m_widget;
}

commenting out/removing the only real line of source code there
(child->m_...) was the 'fix' and it seems to have worked.

The bugreport on sourceforge doesn't seem to speak to exactly the
problem I was experiencing, but I can see that it might be related
related.

Any Ideas?

Brian

···

On Thu, 15 Jul 2004 10:47:30 +0200, Pierre Hjälm <pierre.hjalm@dis.uu.se> wrote:

"Brian L." <zorander@gmail.com> writes:

> I have been using wxPython 2.5.1 with gtk2 for a while now with no
> issues. I, through a routine system upgrade (emerge -u world) ended up
> upgrading my gtk2 library. The old version was
> libgtk-x11-2.0.so.0.0.9, and the new one is libgtk-x11-2.0.so.0.400.1.
>
...
>
> Any Ideas?
>
I had (have) the same problem. I found this in the wx-dev mailing list:

http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?5:mss:48029:fleiihnakdneljafgoel

I changed notebook.cpp as per the answer and it seems to work ok (it
probably breaks something somewhere but I haven't noticed any ill effects).
Unfortunately I have to do this for every release now (and I do test all
of Robin's "daily" builds).

--
  Pierre Hjälm, Systems Administrator
  Department of Information Science, Uppsala University, Sweden
  email:pierre.hjalm@dis.uu.se phone:+46-(0)18-4711044 fax:+46-(0)18-554422

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

--
The years ahead pick up their dark bags.
They move closer. There's a slight rise in the silence

then nothing.

Brian L. wrote:

Thank you for that pointer. I did that, rebuilt, and my problems
disappeared. I am slightly concerned over whatever breakage that might
cause, but I haven't seen any yet (in my very cursory examination of
my newly recovered application).

Perhaps someone who understands the internals of this could shed some
more light on what things might break when making the following
change:

IIUC the problem was the fact that when controls are added to a window that will be a notebook page the items couldn't get an accurate representation of their default best size because the gtk widget containment heirarchy is not fully connected until the page is added to the notebook. So you would end up with items like static texts or checkboxes getting truncated by a few pixels. If you're not seeing that anywhere then there is probably nothing to worry about.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!