[gtkhtml] Bug 344076 - Crash after closing an inline view of text attachment
- From: Akhil Laddha <lakhil src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkhtml] Bug 344076 - Crash after closing an inline view of text attachment
- Date: Wed, 9 Jun 2010 06:12:06 +0000 (UTC)
commit c0317ea543865e1619ee6756cc438a9f937cdf7e
Author: Chenthill Palanisamy <pchenthill novell com>
Date: Wed Jun 9 11:36:11 2010 +0530
Bug 344076 - Crash after closing an inline view of text attachment
gtkhtml/htmlembedded.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gtkhtml/htmlembedded.c b/gtkhtml/htmlembedded.c
index 7b618dd..0587c3e 100644
--- a/gtkhtml/htmlembedded.c
+++ b/gtkhtml/htmlembedded.c
@@ -39,7 +39,7 @@
HTMLEmbeddedClass html_embedded_class;
static HTMLObjectClass *parent_class = NULL;
-#define d(x)
+#define d(x) x
static void
copy (HTMLObject *self,
@@ -75,21 +75,22 @@ draw (HTMLObject *o,
return;
if (element->parent) {
+ GtkWidget *parent;
new_x = o->x + tx;
new_y = o->y + ty - o->ascent;
- if (gtk_widget_get_parent (element->widget)) {
+ if ((parent = gtk_widget_get_parent (element->widget))) {
if (new_x != element->abs_x || new_y != element->abs_y) {
d (printf ("element: %p moveto: %d,%d shown: %d\n", element, new_x, new_y, GTK_WIDGET_VISIBLE (element->widget)));
- gtk_layout_move (GTK_LAYOUT(element->parent), element->widget, new_x, new_y);
- } else if (!GTK_HTML (element->parent)->engine->expose)
+ gtk_layout_move (GTK_LAYOUT(parent), element->widget, new_x, new_y);
+ } else if (!GTK_HTML (parent)->engine->expose)
gtk_widget_queue_draw (element->widget);
}
element->abs_x = new_x;
element->abs_y = new_y;
- if (!gtk_widget_get_parent (element->widget)) {
+ if (!parent) {
d (printf ("element: %p put: %d,%d shown: %d\n", element, new_x, new_y, GTK_WIDGET_VISIBLE (element->widget)));
gtk_layout_put (GTK_LAYOUT(element->parent), element->widget, new_x, new_y);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]