[glade] Fixed assertions for selected objects assumed to be widgets in GladeDesignLayout.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] Fixed assertions for selected objects assumed to be widgets in GladeDesignLayout.
- Date: Mon, 7 Mar 2011 20:22:28 +0000 (UTC)
commit 6e074589f429d14c36a96936d9869450bc0a40fa
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Mon Mar 7 15:59:48 2011 +0900
Fixed assertions for selected objects assumed to be widgets in GladeDesignLayout.
gladeui/glade-design-layout.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gladeui/glade-design-layout.c b/gladeui/glade-design-layout.c
index e322573..73791d3 100644
--- a/gladeui/glade-design-layout.c
+++ b/gladeui/glade-design-layout.c
@@ -236,7 +236,8 @@ glade_project_is_toplevel_active (GladeProject *project, GtkWidget *toplevel)
for (l = glade_project_selection_get (project); l; l = g_list_next (l))
{
- if (gtk_widget_is_ancestor (l->data, toplevel)) return TRUE;
+ if (GTK_IS_WIDGET (l->data) &&
+ gtk_widget_is_ancestor (l->data, toplevel)) return TRUE;
}
return FALSE;
@@ -682,7 +683,8 @@ glade_design_layout_draw (GtkWidget * widget, cairo_t * cr)
/* Dont draw selection on toplevels */
if (child != selection)
{
- if (gtk_widget_is_ancestor (selection, child))
+ if (GTK_IS_WIDGET (selection) &&
+ gtk_widget_is_ancestor (selection, child))
{
draw_selection (cr, widget, selection, r, g, b);
selected = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]