Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_menu.c ewl_popup.c Log Message: - formatting/cleanups =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_menu.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -3 -r1.43 -r1.44 --- ewl_menu.c 6 Mar 2007 21:25:08 -0000 1.43 +++ ewl_menu.c 7 Mar 2007 04:29:17 -0000 1.44 @@ -138,7 +138,7 @@ if ((parent && (ewl_box_orientation_get(parent) == EWL_ORIENTATION_VERTICAL)) - || EWL_MENU_ITEM(menu)->inmenu) + || EWL_MENU_ITEM(menu)->inmenu) ewl_popup_type_set(EWL_POPUP(menu->popup), EWL_POPUP_TYPE_MENU_HORIZONTAL); else @@ -218,6 +218,7 @@ ewl_window_raise(EWL_WINDOW(menu->popup)); if (item->inmenu) { Ewl_Context_Menu *cm; + cm = EWL_CONTEXT_MENU(item->inmenu); cm->open_menu = menu->popup; } @@ -242,7 +243,10 @@ DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("data", data); - /* XXX do we still need to this */ + /* We need to set the popup to NULL here in case the popup gets + * freed before the menu does. This makes sure we don't segv in the + * ewl_menu_cb_destroy function when we try to delete the callback + * on the deleted popup widget from our dangling reference */ m = data; if (m->popup) m->popup = NULL; =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_popup.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- ewl_popup.c 14 Feb 2007 06:42:28 -0000 1.9 +++ ewl_popup.c 7 Mar 2007 04:29:17 -0000 1.10 @@ -132,6 +132,7 @@ ewl_popup_cb_follow_configure, p); } + if (w) { ewl_callback_prepend(w, EWL_CALLBACK_DESTROY, ewl_popup_cb_follow_destroy, p); @@ -457,9 +458,10 @@ DRETURN(DLEVEL_STABLE); if (p->type == EWL_POPUP_TYPE_MENU_VERTICAL) - ewl_object_w_request(EWL_OBJECT(p), CURRENT_W(p->follow)); + ewl_object_w_request(EWL_OBJECT(p), CURRENT_W(p->follow)); + else if (p->type == EWL_POPUP_TYPE_MENU_HORIZONTAL) - ewl_object_h_request(EWL_OBJECT(p), CURRENT_H(p->follow)); + ewl_object_h_request(EWL_OBJECT(p), CURRENT_H(p->follow)); DLEAVE_FUNCTION(DLEVEL_STABLE); } ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs