Closed
Bug 331115
Opened 20 years ago
Closed 7 years ago
Removing gtk_moz_embed from a container invalidates it
Categories
(Core Graveyard :: Embedding: GTK Widget, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: scott.ellington, Assigned: mpgritti)
Details
Attachments
(1 file)
|
1.26 KB,
text/plain
|
Details |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051210 Epiphany/1.8.3
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051210 Epiphany/1.8.3
Once a gtk_moz_embed widget has been added to a container and shown, removing it seems to place it in an invalid state. As when I add it right back to the same container, I get the following error:
(Gecko:28867): Gtk-CRITICAL **: gtk_container_add: assertion `GTK_IS_WIDGET (widget)' failed
If I try to do the same thing with a GtkButton, it can be removed and readded without such an error. I will attach sample code in one sec.
Reproducible: Always
| Reporter | ||
Comment 1•20 years ago
|
||
Comment 2•20 years ago
|
||
This is a programming error.
The docs for gtk_container_remove are quite clear:
Removes widget from container. widget must be inside container. Note that container will own a reference to widget, and that this may be the last reference held; so removing a widget from its container can destroy that widget. If you want to use widget again, you need to add a reference to it while it's not inside a container, using g_object_ref().
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 3•20 years ago
|
||
My mistake. I am not familiar with C Gtk. I am trying to reproduce a bug that occurs in Gtk#. However, with your tip, I was able to EXACTLY reproduce my problem.
Adding the call g_object_ref ( mozembed ) before it is added to the container removes the assertion error, however you will notice that the content of the mozembed widget is blanked out when it is re-added. This should not happen. This is the problem I am seeing in Gtk#: http://bugzilla.ximian.com/show_bug.cgi?id=76715
I am reopening. Thank you very much for your patience.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Comment 4•20 years ago
|
||
(In reply to comment #3)
> however you will notice that the content of the
> mozembed widget is blanked out when it is re-added. This should not happen.
> This is the problem I am seeing in Gtk#:
> http://bugzilla.ximian.com/show_bug.cgi?id=76715
I think this is the same as this bug: http://bugzilla.gnome.org/show_bug.cgi?id=169116
Updated•16 years ago
|
QA Contact: pavlov → gtk-widget
Updated•14 years ago
|
Product: Core → Core Graveyard
Comment 5•7 years ago
|
||
Embedding: GTK Widget isn't a thing, closing.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago → 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•