Closed GoogleCodeExporter closed 9 years ago
0.7 has this pb too.
Original comment by gbtami
on 8 May 2007 at 5:36
Well, with
glib2-2.12.9
gtk2-2.10.8
pygtk2-2.10.4
pygobject2-2.12.3
I get this warning when removing the unparent line:
/home/thomas/Programmering/python/skak/0.7/lib/pychess/widgets/BoardPreview.py:6
8:
GtkWarning: Attempting to add a widget with type GtkVBox to a container of type
GtkAlignment, but the widget is already inside a container of type GtkWindow,
the
GTK+ FAQ at http://www.gtk.org/faq/ explains how to reparent a widget.
self.add(self.widgets["mainvbox"])
And when I open the load game dialog the previewboard doesn't show up.
The error you posted was given to you in cases where you did have the unparent
line,
correct?
It is strange how self.add(self.widgets["mainvbox"]) complains that
self.widgets["mainvbox"] but self.widgets["mainvbox"].unparent() doesn't seam
to do.
The problem might however be related to this: http://www.gtk.org/faq/#AEN636
In which case it should be fixable by replacing the unparent line with
self.widgets["mainvbox"].get_parent().remove(self.widgets["mainvbox"])
or perhaps even self.widgets["mainvbox"].reparent(self)
All three versions work fine for me.
Original comment by lobais
on 8 May 2007 at 8:14
"The error you posted was given to you in cases where you did have the unparent
line,
correct?"
Yes.
self.widgets["mainvbox"].get_parent().remove(self.widgets["mainvbox"])
doesn't worked(got tracaback).
self.widgets["mainvbox"].reparent(self)
worked with warning, and the preview was ok too.
Tried all with 0.7 svn.
Original comment by berad...@gmail.com
on 9 May 2007 at 8:57
After your last commit i tried it again, and pychess doesn't started again.
Then i rereaded all our conversation from beginning, and discovered my versions
doesn't match. pygobject 2.13.1 !!!
After downgrading pygobject to 2.12.3, your original code (unparent) worked
without
any problem. So it was my bad. Sorry for misleading you!
Original comment by berad...@gmail.com
on 5 Jun 2007 at 8:37
Original comment by gbtami
on 5 Jun 2007 at 8:40
Original issue reported on code.google.com by
gbtami
on 8 May 2007 at 5:16