From 88f00310d70a56af39250acc878b8b38c26f0f94 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 20 Feb 2013 09:13:03 +0000 Subject: [PATCH] e toolbar gadgets no longer crash when trying to display a popup SVN revision: 84258 --- ChangeLog | 4 ++++ NEWS | 1 + src/bin/e_gadcon.c | 4 +++- src/bin/e_toolbar.c | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d6b58ecd8..7012b7330 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-02-20 Mike Blumenkrantz + + * toolbar gadgets no longer crash when trying to display a popup + 2013-02-19 Mike Blumenkrantz * e_util_size_debug_set now displays delete events diff --git a/NEWS b/NEWS index 5054b355b..9ecd22b73 100644 --- a/NEWS +++ b/NEWS @@ -183,3 +183,4 @@ Fixes: * fixed bug where e_layout would ignore frozen state and crash * fixed disable of input methods in input method config dialog * fixed pointer warp when pointer was inside warp window but not directly over it + * toolbar gadgets no longer crash when trying to display a popup diff --git a/src/bin/e_gadcon.c b/src/bin/e_gadcon.c index 5c1d2c3a9..769903003 100644 --- a/src/bin/e_gadcon.c +++ b/src/bin/e_gadcon.c @@ -748,7 +748,9 @@ e_gadcon_zone_get(E_Gadcon *gc) { E_OBJECT_CHECK_RETURN(gc, NULL); E_OBJECT_TYPE_CHECK_RETURN(gc, E_GADCON_TYPE, NULL); - return gc->zone; + if (gc->zone) return gc->zone; + if (!gc->toolbar) return NULL; + return gc->toolbar->fwin->border->zone; } EAPI void diff --git a/src/bin/e_toolbar.c b/src/bin/e_toolbar.c index adbc3cd9e..106cf168e 100644 --- a/src/bin/e_toolbar.c +++ b/src/bin/e_toolbar.c @@ -103,6 +103,7 @@ e_toolbar_new(Evas *evas, const char *name, E_Win *fwin, Evas_Object *fm2) e_gadcon_toolbar_set(tbar->gadcon, tbar); e_gadcon_xdnd_window_set(tbar->gadcon, tbar->fwin->evas_win); e_gadcon_dnd_window_set(tbar->gadcon, tbar->fwin->evas_win); + e_gadcon_ecore_evas_set(tbar->gadcon, tbar->fwin->ecore_evas); e_gadcon_util_menu_attach_func_set(tbar->gadcon, _e_toolbar_menu_items_append, tbar); e_gadcon_populate(tbar->gadcon);